@wp-playground/client 0.9.26 → 0.9.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +60 -67
  2. package/index.js +10872 -7408
  3. package/package.json +8 -8
package/index.cjs CHANGED
@@ -1,15 +1,15 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ys=function(){var e;return typeof process<"u"&&((e=process.release)==null?void 0:e.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}();if(Ys==="NODE"){let e=function(r){return new Promise(function(n,s){r.onload=r.onerror=function(i){r.onload=r.onerror=null,i.type==="load"?n(r.result):s(new Error("Failed to read the blob/file"))}})},t=function(){const r=new Uint8Array([1,2,3,4]),s=new File([r],"test").stream();try{return s.getReader({mode:"byob"}),!0}catch{return!1}};if(typeof File>"u"){class r extends Blob{constructor(s,i,o){super(s);let u;o!=null&&o.lastModified&&(u=new Date),(!u||isNaN(u.getFullYear()))&&(u=new Date),this.lastModifiedDate=u,this.lastModified=u.getMilliseconds(),this.name=i||""}}global.File=r}typeof Blob.prototype.arrayBuffer>"u"&&(Blob.prototype.arrayBuffer=function(){const n=new FileReader;return n.readAsArrayBuffer(this),e(n)}),typeof Blob.prototype.text>"u"&&(Blob.prototype.text=function(){const n=new FileReader;return n.readAsText(this),e(n)}),(typeof Blob.prototype.stream>"u"||!t())&&(Blob.prototype.stream=function(){let r=0;const n=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:512*1024,async pull(s){const i=s.byobRequest.view,u=await n.slice(r,r+i.byteLength).arrayBuffer(),f=new Uint8Array(u);new Uint8Array(i.buffer).set(f);const l=f.byteLength;s.byobRequest.respond(l),r+=l,r>=n.size&&s.close()}})})}if(Ys==="NODE"&&typeof CustomEvent>"u"){class e extends Event{constructor(r,n={}){super(r,n),this.detail=n.detail}initCustomEvent(){}}globalThis.CustomEvent=e}const pn=["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"],Zs=Symbol("SleepFinished");function Do(e){return new Promise(t=>{setTimeout(()=>t(Zs),e)})}class Mo extends Error{constructor(){super("Acquiring lock timed out")}}class Lo{constructor({concurrency:t,timeout:r}){this._running=0,this.concurrency=t,this.timeout=r,this.queue=[]}get remaining(){return this.concurrency-this.running}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency){const t=new Promise(r=>{this.queue.push(r)});this.timeout!==void 0?await Promise.race([t,Do(this.timeout)]).then(r=>{if(r===Zs)throw new Mo}):await t}else{this._running++;let t=!1;return()=>{t||(t=!0,this._running--,this.queue.length>0&&this.queue.shift()())}}}async run(t){const r=await this.acquire();try{return await t()}finally{r()}}}function de(...e){function t(i){return i.substring(i.length-1)==="/"}let r=e.join("/");const n=r[0]==="/",s=t(r);return r=ei(r),!r&&!n&&(r="."),r&&s&&!t(r)&&(r+="/"),r}function Xs(e){if(e==="/")return"/";e=ei(e);const t=e.lastIndexOf("/");return t===-1?"":t===0?"/":e.substr(0,t)}function ei(e){const t=e[0]==="/";return e=Fo(e.split("/").filter(r=>!!r),!t).join("/"),(t?"/":"")+e.replace(/\/$/,"")}function Fo(e,t){let r=0;for(let n=e.length-1;n>=0;n--){const s=e[n];s==="."?e.splice(n,1):s===".."?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e}function ti(e=36,t="!@#$%^&*()_+=-[]/.,<>?"){const r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+t;let n="";for(let s=e;s>0;--s)n+=r[Math.floor(Math.random()*r.length)];return n}function qo(){return ti(36,"-_")}function ae(e){return`json_decode(base64_decode('${Uo(JSON.stringify(e))}'), true)`}function Zt(e){const t={};for(const r in e)t[r]=ae(e[r]);return t}function Uo(e){return zo(new TextEncoder().encode(e))}function zo(e){const t=String.fromCodePoint(...e);return btoa(t)}const Vo="playground-log",_s=(e,...t)=>{he.dispatchEvent(new CustomEvent(Vo,{detail:{log:e,args:t}}))},Wo=(e,...t)=>{switch(typeof e.message=="string"?e.message=rn(e.message):e.message.message&&typeof e.message.message=="string"&&(e.message.message=rn(e.message.message)),e.severity){case"Debug":console.debug(e.message,...t);break;case"Info":console.info(e.message,...t);break;case"Warn":console.warn(e.message,...t);break;case"Error":console.error(e.message,...t);break;case"Fatal":console.error(e.message,...t);break;default:console.log(e.message,...t)}},xo=e=>e instanceof Error?[e.message,e.stack].join(`
2
- `):JSON.stringify(e,null,2),ri=[],ws=e=>{ri.push(e)},tn=e=>{if(e.raw===!0)ws(e.message);else{const t=Go(typeof e.message=="object"?xo(e.message):e.message,e.severity??"Info",e.prefix??"JavaScript");ws(t)}};class Ho extends EventTarget{constructor(t=[]){super(),this.handlers=t,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes(tn)?[...ri]:(this.error(`Logs aren't stored because the logToMemory handler isn't registered.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const et=function(){var r;return typeof process<"u"&&((r=process.release)==null?void 0:r.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}();if(et==="NODE"){let r=function(n){return new Promise(function(p,l){n.onload=n.onerror=function(i){n.onload=n.onerror=null,i.type==="load"?p(n.result):l(new Error("Failed to read the blob/file"))}})},t=function(){const n=new Uint8Array([1,2,3,4]),l=new File([n],"test").stream();try{return l.getReader({mode:"byob"}),!0}catch{return!1}};if(typeof File>"u"){class n extends Blob{constructor(l,i,e){super(l);let u;e!=null&&e.lastModified&&(u=new Date),(!u||isNaN(u.getFullYear()))&&(u=new Date),this.lastModifiedDate=u,this.lastModified=u.getMilliseconds(),this.name=i||""}}global.File=n}typeof Blob.prototype.arrayBuffer>"u"&&(Blob.prototype.arrayBuffer=function(){const p=new FileReader;return p.readAsArrayBuffer(this),r(p)}),typeof Blob.prototype.text>"u"&&(Blob.prototype.text=function(){const p=new FileReader;return p.readAsText(this),r(p)}),(typeof Blob.prototype.stream>"u"||!t())&&(Blob.prototype.stream=function(){let n=0;const p=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:512*1024,async pull(l){const i=l.byobRequest.view,u=await p.slice(n,n+i.byteLength).arrayBuffer(),h=new Uint8Array(u);new Uint8Array(i.buffer).set(h);const b=h.byteLength;l.byobRequest.respond(b),n+=b,n>=p.size&&l.close()}})})}if(et==="NODE"&&typeof CustomEvent>"u"){class r extends Event{constructor(n,p={}){super(n,p),this.detail=p.detail}initCustomEvent(){}}globalThis.CustomEvent=r}const qr=["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"],rt=Symbol("SleepFinished");function Yt(r){return new Promise(t=>{setTimeout(()=>t(rt),r)})}class Zt extends Error{constructor(){super("Acquiring lock timed out")}}class Qt{constructor({concurrency:t,timeout:n}){this._running=0,this.concurrency=t,this.timeout=n,this.queue=[]}get remaining(){return this.concurrency-this.running}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency){const t=new Promise(n=>{this.queue.push(n)});this.timeout!==void 0?await Promise.race([t,Yt(this.timeout)]).then(n=>{if(n===rt)throw new Zt}):await t}else{this._running++;let t=!1;return()=>{t||(t=!0,this._running--,this.queue.length>0&&this.queue.shift()())}}}async run(t){const n=await this.acquire();try{return await t()}finally{n()}}}function ie(...r){function t(i){return i.substring(i.length-1)==="/"}let n=r.join("/");const p=n[0]==="/",l=t(n);return n=st(n),!n&&!p&&(n="."),n&&l&&!t(n)&&(n+="/"),n}function tt(r){if(r==="/")return"/";r=st(r);const t=r.lastIndexOf("/");return t===-1?"":t===0?"/":r.substr(0,t)}function st(r){const t=r[0]==="/";return r=Jt(r.split("/").filter(n=>!!n),!t).join("/"),(t?"/":"")+r.replace(/\/$/,"")}function Jt(r,t){let n=0;for(let p=r.length-1;p>=0;p--){const l=r[p];l==="."?r.splice(p,1):l===".."?(r.splice(p,1),n++):n&&(r.splice(p,1),n--)}if(t)for(;n;n--)r.unshift("..");return r}function it(r=36,t="!@#$%^&*()_+=-[]/.,<>?"){const n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+t;let p="";for(let l=r;l>0;--l)p+=n[Math.floor(Math.random()*n.length)];return p}function Kt(){return it(36,"-_")}function se(r){return`json_decode(base64_decode('${Xt(JSON.stringify(r))}'), true)`}function We(r){const t={};for(const n in r)t[n]=se(r[n]);return t}function Xt(r){return es(new TextEncoder().encode(r))}function es(r){const t=String.fromCodePoint(...r);return btoa(t)}const rs="playground-log",Mr=(r,...t)=>{ae.dispatchEvent(new CustomEvent(rs,{detail:{log:r,args:t}}))},ts=(r,...t)=>{switch(typeof r.message=="string"?r.message=Tr(r.message):r.message.message&&typeof r.message.message=="string"&&(r.message.message=Tr(r.message.message)),r.severity){case"Debug":console.debug(r.message,...t);break;case"Info":console.info(r.message,...t);break;case"Warn":console.warn(r.message,...t);break;case"Error":console.error(r.message,...t);break;case"Fatal":console.error(r.message,...t);break;default:console.log(r.message,...t)}},ss=r=>r instanceof Error?[r.message,r.stack].join(`
2
+ `):JSON.stringify(r,null,2),nt=[],Br=r=>{nt.push(r)},$r=r=>{if(r.raw===!0)Br(r.message);else{const t=os(typeof r.message=="object"?ss(r.message):r.message,r.severity??"Info",r.prefix??"JavaScript");Br(t)}};class is extends EventTarget{constructor(t=[]){super(),this.handlers=t,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes($r)?[...nt]:(this.error(`Logs aren't stored because the logToMemory handler isn't registered.
3
3
  If you're using a custom logger instance, make sure to register logToMemory handler.
4
- `),[])}logMessage(t,...r){for(const n of this.handlers)n(t,...r)}log(t,...r){this.logMessage({message:t,severity:void 0,prefix:"JavaScript",raw:!1},...r)}debug(t,...r){this.logMessage({message:t,severity:"Debug",prefix:"JavaScript",raw:!1},...r)}info(t,...r){this.logMessage({message:t,severity:"Info",prefix:"JavaScript",raw:!1},...r)}warn(t,...r){this.logMessage({message:t,severity:"Warn",prefix:"JavaScript",raw:!1},...r)}error(t,...r){this.logMessage({message:t,severity:"Error",prefix:"JavaScript",raw:!1},...r)}}const Bo=()=>{try{if(process.env.NODE_ENV==="test")return[tn,_s]}catch{}return[tn,Wo,_s]},he=new Ho(Bo()),rn=e=>e.replace(/\t/g,""),Go=(e,t,r)=>{const n=new Date,s=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"short",day:"2-digit",timeZone:"UTC"}).format(n).replace(/ /g,"-"),i=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"UTC",timeZoneName:"short"}).format(n),o=s+" "+i;return e=rn(e),`[${o}] ${r} ${t}: ${e}`};let xr=0;const vs="/wordpress/wp-content/debug.log",Ko=async e=>await e.fileExists(vs)?await e.readFileAsText(vs):"",Jo=(e,t)=>{t.addEventListener("request.end",async()=>{const r=await Ko(t);if(r.length>xr){const n=r.substring(xr);e.logMessage({message:n,raw:!0}),xr=r.length}}),t.addEventListener("request.error",r=>{r=r,r.error&&(e.logMessage({message:`${r.error.message} ${r.error.stack}`,severity:"Fatal",prefix:r.source==="request"?"PHP":"WASM Crash"}),e.dispatchEvent(new CustomEvent(e.fatalErrorEvent,{detail:{logs:e.getLogs(),source:r.source}})))})},Ar=async(e,{pluginPath:t,pluginName:r},n)=>{n==null||n.tracker.setCaption(`Activating ${r||t}`);const s=await e.documentRoot,i=await e.run({code:`<?php
4
+ `),[])}logMessage(t,...n){for(const p of this.handlers)p(t,...n)}log(t,...n){this.logMessage({message:t,severity:void 0,prefix:"JavaScript",raw:!1},...n)}debug(t,...n){this.logMessage({message:t,severity:"Debug",prefix:"JavaScript",raw:!1},...n)}info(t,...n){this.logMessage({message:t,severity:"Info",prefix:"JavaScript",raw:!1},...n)}warn(t,...n){this.logMessage({message:t,severity:"Warn",prefix:"JavaScript",raw:!1},...n)}error(t,...n){this.logMessage({message:t,severity:"Error",prefix:"JavaScript",raw:!1},...n)}}const ns=()=>{try{if(process.env.NODE_ENV==="test")return[$r,Mr]}catch{}return[$r,ts,Mr]},ae=new is(ns()),Tr=r=>r.replace(/\t/g,""),os=(r,t,n)=>{const p=new Date,l=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"short",day:"2-digit",timeZone:"UTC"}).format(p).replace(/ /g,"-"),i=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"UTC",timeZoneName:"short"}).format(p),e=l+" "+i;return r=Tr(r),`[${e}] ${n} ${t}: ${r}`};let wr=0;const Ur="/wordpress/wp-content/debug.log",as=async r=>await r.fileExists(Ur)?await r.readFileAsText(Ur):"",ps=(r,t)=>{t.addEventListener("request.end",async()=>{const n=await as(t);if(n.length>wr){const p=n.substring(wr);r.logMessage({message:p,raw:!0}),wr=n.length}}),t.addEventListener("request.error",n=>{n=n,n.error&&(r.logMessage({message:`${n.error.message} ${n.error.stack}`,severity:"Fatal",prefix:n.source==="request"?"PHP":"WASM Crash"}),r.dispatchEvent(new CustomEvent(r.fatalErrorEvent,{detail:{logs:r.getLogs(),source:n.source}})))})},dr=async(r,{pluginPath:t,pluginName:n},p)=>{p==null||p.tracker.setCaption(`Activating ${n||t}`);const l=await r.documentRoot,i=await r.run({code:`<?php
5
5
  define( 'WP_ADMIN', true );
6
- require_once( ${ae(s)}. "/wp-load.php" );
7
- require_once( ${ae(s)}. "/wp-admin/includes/plugin.php" );
6
+ require_once( ${se(l)}. "/wp-load.php" );
7
+ require_once( ${se(l)}. "/wp-admin/includes/plugin.php" );
8
8
 
9
9
  // Set current user to admin
10
10
  wp_set_current_user( get_users(array('role' => 'Administrator') )[0]->ID );
11
11
 
12
- $plugin_path = ${ae(t)};
12
+ $plugin_path = ${se(t)};
13
13
  $response = false;
14
14
  if (!is_dir($plugin_path)) {
15
15
  $response = activate_plugin($plugin_path);
@@ -33,13 +33,13 @@
33
33
  }
34
34
 
35
35
  throw new Exception( 'Unable to activate plugin' );
36
- `});if(i.text!=="Plugin activated successfully")throw he.debug(i),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`)},hn=async(e,{themeFolderName:t},r)=>{r==null||r.tracker.setCaption(`Activating ${t}`);const n=await e.documentRoot,s=`${n}/wp-content/themes/${t}`;if(!await e.fileExists(s))throw new Error(`
36
+ `});if(i.text!=="Plugin activated successfully")throw ae.debug(i),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`)},Rr=async(r,{themeFolderName:t},n)=>{n==null||n.tracker.setCaption(`Activating ${t}`);const p=await r.documentRoot,l=`${p}/wp-content/themes/${t}`;if(!await r.fileExists(l))throw new Error(`
37
37
  Couldn't activate theme ${t}.
38
- Theme not found at the provided theme path: ${s}.
38
+ Theme not found at the provided theme path: ${l}.
39
39
  Check the theme path to ensure it's correct.
40
40
  If the theme is not installed, you can install it using the installTheme step.
41
41
  More info can be found in the Blueprint documentation: https://wordpress.github.io/wordpress-playground/blueprints-api/steps/#ActivateThemeStep
42
- `);const i=await e.run({code:`<?php
42
+ `);const i=await r.run({code:`<?php
43
43
  define( 'WP_ADMIN', true );
44
44
  require_once( getenv('docroot') . "/wp-load.php" );
45
45
 
@@ -52,7 +52,7 @@
52
52
  throw new Exception( 'Theme ' . getenv('themeFolderName') . ' could not be activated.' );
53
53
  }
54
54
  die('Theme activated successfully');
55
- `,env:{docroot:n,themeFolderName:t}});if(i.text!=="Theme activated successfully")throw he.debug(i),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`)},ni=async(e,{code:t})=>await e.run({code:t}),si=async(e,{options:t})=>await e.run(t),mn=async(e,{path:t})=>{await e.unlink(t)},ii=async(e,{sql:t},r)=>{r==null||r.tracker.setCaption("Executing SQL Queries");const n=`/tmp/${qo()}.sql`;await e.writeFile(n,new Uint8Array(await t.arrayBuffer()));const s=await e.documentRoot,i=Zt({docroot:s,sqlFilename:n}),o=await e.run({code:`<?php
55
+ `,env:{docroot:p,themeFolderName:t}});if(i.text!=="Theme activated successfully")throw ae.debug(i),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`)},ot=async(r,{code:t})=>await r.run({code:t}),at=async(r,{options:t})=>await r.run(t),Sr=async(r,{path:t})=>{await r.unlink(t)},pt=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const p=`/tmp/${Kt()}.sql`;await r.writeFile(p,new Uint8Array(await t.arrayBuffer()));const l=await r.documentRoot,i=We({docroot:l,sqlFilename:p}),e=await r.run({code:`<?php
56
56
  require_once ${i.docroot} . '/wp-load.php';
57
57
 
58
58
  $handle = fopen(${i.sqlFilename}, 'r');
@@ -71,7 +71,7 @@
71
71
  $wpdb->query($buffer);
72
72
  $buffer = '';
73
73
  }
74
- `});return await mn(e,{path:n}),o},br=async(e,{request:t})=>{he.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const r=await e.request(t);if(r.httpStatusCode>399||r.httpStatusCode<200)throw he.warn("WordPress response was",{response:r}),new Error(`Request failed with status ${r.httpStatusCode}`);return r},Qo=`<?php
74
+ `});return await Sr(r,{path:p}),e},nr=async(r,{request:t})=>{ae.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.warn("WordPress response was",{response:n}),new Error(`Request failed with status ${n.httpStatusCode}`);return n},ls=`<?php
75
75
 
76
76
  /**
77
77
  * Rewrites the wp-config.php file to ensure specific constants are defined
@@ -402,33 +402,33 @@ function skip_whitespace($tokens) {
402
402
  }
403
403
  return $output;
404
404
  }
405
- `,Qt=async(e,{consts:t,method:r="define-before-run"})=>{switch(r){case"define-before-run":await Yo(e,t);break;case"rewrite-wp-config":{const n=await e.documentRoot,s=de(n,"/wp-config.php"),i=await e.readFileAsText(s),o=await Zo(e,i,t);await e.writeFile(s,o);break}default:throw new Error(`Invalid method: ${r}`)}};async function Yo(e,t){for(const r in t)await e.defineConstant(r,t[r])}async function Zo(e,t,r){await e.writeFile("/tmp/code.php",t);const n=Zt({consts:r});return await e.run({code:`${Qo}
405
+ `,Ie=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await fs(r,t);break;case"rewrite-wp-config":{const p=await r.documentRoot,l=ie(p,"/wp-config.php"),i=await r.readFileAsText(l),e=await us(r,i,t);await r.writeFile(l,e);break}default:throw new Error(`Invalid method: ${n}`)}};async function fs(r,t){for(const n in t)await r.defineConstant(n,t[n])}async function us(r,t,n){await r.writeFile("/tmp/code.php",t);const p=We({consts:n});return await r.run({code:`${ls}
406
406
  $wp_config_path = '/tmp/code.php';
407
407
  $wp_config = file_get_contents($wp_config_path);
408
- $new_wp_config = rewrite_wp_config_to_define_constants($wp_config, ${n.consts});
408
+ $new_wp_config = rewrite_wp_config_to_define_constants($wp_config, ${p.consts});
409
409
  file_put_contents($wp_config_path, $new_wp_config);
410
- `}),await e.readFileAsText("/tmp/code.php")}const Er=async(e,{username:t="admin",password:r="password"}={},n)=>{var i,o,u;n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Logging in"),await e.request({url:"/wp-login.php"});const s=await e.request({url:"/wp-login.php",method:"POST",body:{log:t,pwd:r,rememberme:"forever"}});if(!((u=(o=(i=s.headers)==null?void 0:i.location)==null?void 0:o[0])!=null&&u.includes("/wp-admin/")))throw he.warn("WordPress response was",{response:s,text:s.text}),new Error(`Failed to log in as ${t} with password ${r}`)},yn=async(e,{options:t})=>{const r=await e.documentRoot;await e.run({code:`<?php
411
- include ${ae(r)} . '/wp-load.php';
412
- $site_options = ${ae(t)};
410
+ `}),await r.readFileAsText("/tmp/code.php")}const or=async(r,{username:t="admin",password:n="password"}={},p)=>{var i,e,u;p==null||p.tracker.setCaption((p==null?void 0:p.initialCaption)||"Logging in"),await r.request({url:"/wp-login.php"});const l=await r.request({url:"/wp-login.php",method:"POST",body:{log:t,pwd:n,rememberme:"forever"}});if(!((u=(e=(i=l.headers)==null?void 0:i.location)==null?void 0:e[0])!=null&&u.includes("/wp-admin/")))throw ae.warn("WordPress response was",{response:l,text:l.text}),new Error(`Failed to log in as ${t} with password ${n}`)},Lr=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
411
+ include ${se(n)} . '/wp-load.php';
412
+ $site_options = ${se(t)};
413
413
  foreach($site_options as $name => $value) {
414
414
  update_option($name, $value);
415
415
  }
416
416
  echo "Success";
417
- `})},oi=async(e,{meta:t,userId:r})=>{const n=await e.documentRoot;await e.run({code:`<?php
418
- include ${ae(n)} . '/wp-load.php';
419
- $meta = ${ae(t)};
417
+ `})},lt=async(r,{meta:t,userId:n})=>{const p=await r.documentRoot;await r.run({code:`<?php
418
+ include ${se(p)} . '/wp-load.php';
419
+ $meta = ${se(t)};
420
420
  foreach($meta as $name => $value) {
421
- update_user_meta(${ae(r)}, $name, $value);
421
+ update_user_meta(${se(n)}, $name, $value);
422
422
  }
423
- `})};function ai(e){return e.pathname.startsWith("/scope:")}function Xo(e){return ai(e)?e.pathname.split("/")[1].split(":")[1]:null}const ci=async e=>{var _;await Qt(e,{consts:{WP_ALLOW_MULTISITE:1}});const t=new URL(await e.absoluteUrl);if(t.port!==""){let b=`The current host is ${t.host}, but WordPress multisites do not support custom ports.`;throw t.hostname==="localhost"&&(b+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(b)}const r=t.pathname.replace(/\/$/,"")+"/",n=`${t.protocol}//${t.hostname}${r}`;await yn(e,{options:{siteurl:n,home:n}}),await Er(e,{});const s=await e.documentRoot,o=(await e.run({code:`<?php
423
+ `})};function ft(r){return r.pathname.startsWith("/scope:")}function ds(r){return ft(r)?r.pathname.split("/")[1].split(":")[1]:null}const ut=async r=>{var E;await Ie(r,{consts:{WP_ALLOW_MULTISITE:1}});const t=new URL(await r.absoluteUrl);if(t.port!==""){let S=`The current host is ${t.host}, but WordPress multisites do not support custom ports.`;throw t.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 n=t.pathname.replace(/\/$/,"")+"/",p=`${t.protocol}//${t.hostname}${n}`;await Lr(r,{options:{siteurl:p,home:p}}),await or(r,{});const l=await r.documentRoot,e=(await r.run({code:`<?php
424
424
  define( 'WP_ADMIN', true );
425
- require_once(${ae(s)} . "/wp-load.php");
425
+ require_once(${se(l)} . "/wp-load.php");
426
426
 
427
427
  // Set current user to admin
428
428
  ( get_users(array('role' => 'Administrator') )[0] );
429
429
 
430
- require_once(${ae(s)} . "/wp-admin/includes/plugin.php");
431
- $plugins_root = ${ae(s)} . "/wp-content/plugins";
430
+ require_once(${se(l)} . "/wp-admin/includes/plugin.php");
431
+ $plugins_root = ${se(l)} . "/wp-content/plugins";
432
432
  $plugins = glob($plugins_root . "/*");
433
433
 
434
434
  $deactivated_plugins = [];
@@ -452,19 +452,19 @@ foreach($plugins as $plugin_path) {
452
452
  }
453
453
  }
454
454
  echo json_encode($deactivated_plugins);
455
- `})).json,f=(_=(await br(e,{request:{url:"/wp-admin/network.php"}})).text.match(/name="_wpnonce"\s+value="([^"]+)"/))==null?void 0:_[1],l=await br(e,{request:{url:"/wp-admin/network.php",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:ea({_wpnonce:f,_wp_http_referer:r+"wp-admin/network.php",sitename:"My WordPress Website Sites",email:"admin@localhost.com",submit:"Install"})}});if(l.httpStatusCode!==200)throw he.warn("WordPress response was",{response:l,text:l.text,headers:l.headers}),new Error(`Failed to enable multisite. Response code was ${l.httpStatusCode}`);await Qt(e,{consts:{MULTISITE:!0,SUBDOMAIN_INSTALL:!1,SITE_ID_CURRENT_SITE:1,BLOG_ID_CURRENT_SITE:1,DOMAIN_CURRENT_SITE:t.hostname,PATH_CURRENT_SITE:r}});const d=new URL(await e.absoluteUrl),p=ai(d)?"scope:"+Xo(d):null;await e.writeFile("/internal/shared/preload/sunrise.php",`<?php
456
- $_SERVER['HTTP_HOST'] = ${ae(d.hostname)};
457
- $folder = ${ae(p)};
455
+ `})).json,h=(E=(await nr(r,{request:{url:"/wp-admin/network.php"}})).text.match(/name="_wpnonce"\s+value="([^"]+)"/))==null?void 0:E[1],b=await nr(r,{request:{url:"/wp-admin/network.php",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:cs({_wpnonce:h,_wp_http_referer:n+"wp-admin/network.php",sitename:"My WordPress Website Sites",email:"admin@localhost.com",submit:"Install"})}});if(b.httpStatusCode!==200)throw ae.warn("WordPress response was",{response:b,text:b.text,headers:b.headers}),new Error(`Failed to enable multisite. Response code was ${b.httpStatusCode}`);await Ie(r,{consts:{MULTISITE:!0,SUBDOMAIN_INSTALL:!1,SITE_ID_CURRENT_SITE:1,BLOG_ID_CURRENT_SITE:1,DOMAIN_CURRENT_SITE:t.hostname,PATH_CURRENT_SITE:n}});const k=new URL(await r.absoluteUrl),y=ft(k)?"scope:"+ds(k):null;await r.writeFile("/internal/shared/preload/sunrise.php",`<?php
456
+ $_SERVER['HTTP_HOST'] = ${se(k.hostname)};
457
+ $folder = ${se(y)};
458
458
  if ($folder && strpos($_SERVER['REQUEST_URI'],"/$folder") === false) {
459
459
  $_SERVER['REQUEST_URI'] = "/$folder/" . ltrim($_SERVER['REQUEST_URI'], '/');
460
460
  }
461
- `),await e.writeFile("/internal/shared/mu-plugins/sunrise.php",`<?php
461
+ `),await r.writeFile("/internal/shared/mu-plugins/sunrise.php",`<?php
462
462
  if ( !defined( 'BLOG_ID_CURRENT_SITE' ) ) {
463
463
  define( 'BLOG_ID_CURRENT_SITE', 1 );
464
464
  }
465
- `),await Er(e,{});for(const b of o)await Ar(e,{pluginPath:b})};function ea(e){return Object.keys(e).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t])).join("&")}const li=async(e,{fromPath:t,toPath:r})=>{await e.writeFile(r,await e.readFileAsBuffer(t))},ui=async(e,{fromPath:t,toPath:r})=>{await e.mv(t,r)},di=async(e,{path:t})=>{await e.mkdir(t)},fi=async(e,{path:t})=>{await e.rmdir(t)},gn=async(e,{path:t,data:r})=>{r instanceof File&&(r=new Uint8Array(await r.arrayBuffer())),t.startsWith("/wordpress/wp-content/mu-plugins")&&!await e.fileExists("/wordpress/wp-content/mu-plugins")&&await e.mkdir("/wordpress/wp-content/mu-plugins"),await e.writeFile(t,r)},$n=async(e,{siteUrl:t})=>{await Qt(e,{consts:{WP_HOME:t,WP_SITEURL:t}})},pi=async(e,{file:t},r)=>{var s;(s=r==null?void 0:r.tracker)==null||s.setCaption("Importing content"),await gn(e,{path:"/tmp/import.wxr",data:t});const n=await e.documentRoot;await e.run({code:`<?php
466
- require ${ae(n)} . '/wp-load.php';
467
- require ${ae(n)} . '/wp-admin/includes/admin.php';
465
+ `),await or(r,{});for(const S of e)await dr(r,{pluginPath:S})};function cs(r){return Object.keys(r).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(r[t])).join("&")}const dt=async(r,{fromPath:t,toPath:n})=>{await r.writeFile(n,await r.readFileAsBuffer(t))},ct=async(r,{fromPath:t,toPath:n})=>{await r.mv(t,n)},mt=async(r,{path:t})=>{await r.mkdir(t)},yt=async(r,{path:t})=>{await r.rmdir(t)},xr=async(r,{path:t,data:n})=>{n instanceof File&&(n=new Uint8Array(await n.arrayBuffer())),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)},Nr=async(r,{siteUrl:t})=>{await Ie(r,{consts:{WP_HOME:t,WP_SITEURL:t}})},ht=async(r,{file:t},n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Importing content"),await xr(r,{path:"/tmp/import.wxr",data:t});const p=await r.documentRoot;await r.run({code:`<?php
466
+ require ${se(p)} . '/wp-load.php';
467
+ require ${se(p)} . '/wp-admin/includes/admin.php';
468
468
 
469
469
  kses_remove_filters();
470
470
  $admin_id = get_users(array('role' => 'Administrator') )[0]->ID;
@@ -482,7 +482,7 @@ echo json_encode($deactivated_plugins);
482
482
  });
483
483
 
484
484
  $result = $importer->import( '/tmp/import.wxr' );
485
- `})},_n=async(e,{themeSlug:t=""},r)=>{var s;(s=r==null?void 0:r.tracker)==null||s.setCaption("Importing theme starter content");const n=await e.documentRoot;await e.run({code:`<?php
485
+ `})},Fr=async(r,{themeSlug:t=""},n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Importing theme starter content");const p=await r.documentRoot;await r.run({code:`<?php
486
486
 
487
487
  /**
488
488
  * Ensure that the customizer loads as an admin user.
@@ -505,7 +505,7 @@ echo json_encode($deactivated_plugins);
505
505
  * See _wp_customize_include()
506
506
  */
507
507
  $_REQUEST['wp_customize'] = 'on';
508
- $_REQUEST['customize_theme'] = ${ae(t)} ?: get_stylesheet();
508
+ $_REQUEST['customize_theme'] = ${se(t)} ?: get_stylesheet();
509
509
 
510
510
  /*
511
511
  * Claim this is a ajax request saving settings, to avoid the preview filters being applied.
@@ -517,7 +517,7 @@ echo json_encode($deactivated_plugins);
517
517
  }
518
518
  playground_add_filter( 'plugins_loaded', 'importThemeStarterContent_plugins_loaded', 0 );
519
519
 
520
- require ${ae(n)} . '/wp-load.php';
520
+ require ${se(p)} . '/wp-load.php';
521
521
 
522
522
  // Return early if there's no starter content.
523
523
  if ( ! get_theme_starter_content() ) {
@@ -529,7 +529,7 @@ echo json_encode($deactivated_plugins);
529
529
 
530
530
  // Publish the changeset, which publishes the starter content.
531
531
  wp_publish_post( $wp_customize->changeset_post_id() );
532
- `})},Hr="/tmp/file.zip",hi=async(e,t,r,n=!0)=>{if(t instanceof File){const i=t;t=Hr,await e.writeFile(t,new Uint8Array(await i.arrayBuffer()))}const s=Zt({zipPath:t,extractToPath:r,overwriteFiles:n});await e.run({code:`<?php
532
+ `})},vr="/tmp/file.zip",gt=async(r,t,n,p=!0)=>{if(t instanceof File){const i=t;t=vr,await r.writeFile(t,new Uint8Array(await i.arrayBuffer()))}const l=We({zipPath:t,extractToPath:n,overwriteFiles:p});await r.run({code:`<?php
533
533
  function unzip($zipPath, $extractTo, $overwriteFiles = true)
534
534
  {
535
535
  if (!is_dir($extractTo)) {
@@ -554,11 +554,11 @@ echo json_encode($deactivated_plugins);
554
554
  throw new Exception("Could not unzip file");
555
555
  }
556
556
  }
557
- unzip(${s.zipPath}, ${s.extractToPath}, ${s.overwriteFiles});
558
- `}),await e.fileExists(Hr)&&await e.unlink(Hr)},Dr=async(e,{zipFile:t,zipPath:r,extractToPath:n})=>{if(r)he.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 hi(e,t||r,n)},mi=async(e,{wordPressFilesZip:t,pathInZip:r=""})=>{const n=await e.documentRoot;let s=de("/tmp","import");await e.mkdir(s),await Dr(e,{zipFile:t,extractToPath:s}),s=de(s,r);const i=de(s,"wp-content"),o=de(n,"wp-content");for(const d of pn){const p=de(i,d);await bs(e,p);const _=de(o,d);await e.fileExists(_)&&(await e.mkdir(Xs(p)),await e.mv(_,p))}const u=de(s,"wp-content","database");await e.fileExists(u)||await e.mv(de(n,"wp-content","database"),u);const f=await e.listFiles(s);for(const d of f)await bs(e,de(n,d)),await e.mv(de(s,d),de(n,d));await e.rmdir(s),await $n(e,{siteUrl:await e.absoluteUrl});const l=ae(de(n,"wp-admin","upgrade.php"));await e.run({code:`<?php
557
+ unzip(${l.zipPath}, ${l.extractToPath}, ${l.overwriteFiles});
558
+ `}),await r.fileExists(vr)&&await r.unlink(vr)},cr=async(r,{zipFile:t,zipPath:n,extractToPath:p})=>{if(n)ae.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 gt(r,t||n,p)},bt=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const p=await r.documentRoot;let l=ie("/tmp","import");await r.mkdir(l),await cr(r,{zipFile:t,extractToPath:l}),l=ie(l,n);const i=ie(l,"wp-content"),e=ie(p,"wp-content");for(const k of qr){const y=ie(i,k);await zr(r,y);const E=ie(e,k);await r.fileExists(E)&&(await r.mkdir(tt(y)),await r.mv(E,y))}const u=ie(l,"wp-content","database");await r.fileExists(u)||await r.mv(ie(p,"wp-content","database"),u);const h=await r.listFiles(l);for(const k of h)await zr(r,ie(p,k)),await r.mv(ie(l,k),ie(p,k));await r.rmdir(l),await Nr(r,{siteUrl:await r.absoluteUrl});const b=se(ie(p,"wp-admin","upgrade.php"));await r.run({code:`<?php
559
559
  $_GET['step'] = 'upgrade_db';
560
- require ${l};
561
- `})};async function bs(e,t){await e.fileExists(t)&&(await e.isDir(t)?await e.rmdir(t):await e.unlink(t))}async function yi(e){const t=await e.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function gi(e,{targetPath:t,zipFile:r,ifAlreadyInstalled:n="overwrite"}){const i=r.name.replace(/\.zip$/,""),o=de(await e.documentRoot,"wp-content"),u=de(o,ti()),f=de(u,"assets",i);await e.fileExists(f)&&await e.rmdir(u,{recursive:!0}),await e.mkdir(u);try{await Dr(e,{zipFile:r,extractToPath:f});let l=await e.listFiles(f,{prependPath:!0});l=l.filter(P=>!P.endsWith("/__MACOSX"));const d=l.length===1&&await e.isDir(l[0]);let p,_="";d?(_=l[0],p=l[0].split("/").pop()):(_=f,p=i);const b=`${t}/${p}`;if(await e.fileExists(b)){if(!await e.isDir(b))throw new Error(`Cannot install asset ${p} to ${b} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(n==="overwrite")await e.rmdir(b,{recursive:!0});else{if(n==="skip")return{assetFolderPath:b,assetFolderName:p};throw new Error(`Cannot install asset ${p} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${n}`)}}return await e.mv(_,b),{assetFolderPath:b,assetFolderName:p}}finally{await e.rmdir(u,{recursive:!0})}}function Mr(e){const t=e.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const $i=async(e,{pluginZipFile:t,ifAlreadyInstalled:r,options:n={}},s)=>{const i=t.name.split("/").pop()||"plugin.zip",o=Mr(i);s==null||s.tracker.setCaption(`Installing the ${o} plugin`);const{assetFolderPath:u}=await gi(e,{ifAlreadyInstalled:r,zipFile:t,targetPath:`${await e.documentRoot}/wp-content/plugins`});("activate"in n?n.activate:!0)&&await Ar(e,{pluginPath:u,pluginName:o},s)},_i=async(e,{themeZipFile:t,ifAlreadyInstalled:r,options:n={}},s)=>{const i=Mr(t.name);s==null||s.tracker.setCaption(`Installing the ${i} theme`);const{assetFolderName:o}=await gi(e,{ifAlreadyInstalled:r,zipFile:t,targetPath:`${await e.documentRoot}/wp-content/themes`});("activate"in n?n.activate:!0)&&await hn(e,{themeFolderName:o},s),("importStarterContent"in n?n.importStarterContent:!1)&&await _n(e,{themeSlug:o},s)},wi=async(e,t,r)=>{var s;(s=r==null?void 0:r.tracker)==null||s.setCaption("Resetting WordPress data");const n=await e.documentRoot;await e.run({env:{DOCROOT:n},code:`<?php
560
+ require ${b};
561
+ `})};async function zr(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function wt(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function vt(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:p="overwrite"}){const i=n.name.replace(/\.zip$/,""),e=ie(await r.documentRoot,"wp-content"),u=ie(e,it()),h=ie(u,"assets",i);await r.fileExists(h)&&await r.rmdir(u,{recursive:!0}),await r.mkdir(u);try{await cr(r,{zipFile:n,extractToPath:h});let b=await r.listFiles(h,{prependPath:!0});b=b.filter(I=>!I.endsWith("/__MACOSX"));const k=b.length===1&&await r.isDir(b[0]);let y,E="";k?(E=b[0],y=b[0].split("/").pop()):(E=h,y=i);const S=`${t}/${y}`;if(await r.fileExists(S)){if(!await r.isDir(S))throw new Error(`Cannot install asset ${y} to ${S} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(p==="overwrite")await r.rmdir(S,{recursive:!0});else{if(p==="skip")return{assetFolderPath:S,assetFolderName:y};throw new Error(`Cannot install asset ${y} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${p}`)}}return await r.mv(E,S),{assetFolderPath:S,assetFolderName:y}}finally{await r.rmdir(u,{recursive:!0})}}function mr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const Pt=async(r,{pluginZipFile:t,ifAlreadyInstalled:n,options:p={}},l)=>{const i=t.name.split("/").pop()||"plugin.zip",e=mr(i);l==null||l.tracker.setCaption(`Installing the ${e} plugin`);const{assetFolderPath:u}=await vt(r,{ifAlreadyInstalled:n,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`});("activate"in p?p.activate:!0)&&await dr(r,{pluginPath:u,pluginName:e},l)},_t=async(r,{themeZipFile:t,ifAlreadyInstalled:n,options:p={}},l)=>{const i=mr(t.name);l==null||l.tracker.setCaption(`Installing the ${i} theme`);const{assetFolderName:e}=await vt(r,{ifAlreadyInstalled:n,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`});("activate"in p?p.activate:!0)&&await Rr(r,{themeFolderName:e},l),("importStarterContent"in p?p.importStarterContent:!1)&&await Fr(r,{themeSlug:e},l)},kt=async(r,t,n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Resetting WordPress data");const p=await r.documentRoot;await r.run({env:{DOCROOT:p},code:`<?php
562
562
  require getenv('DOCROOT') . '/wp-load.php';
563
563
 
564
564
  $GLOBALS['@pdo']->query('DELETE FROM wp_posts WHERE id > 0');
@@ -572,11 +572,11 @@ echo json_encode($deactivated_plugins);
572
572
 
573
573
  $GLOBALS['@pdo']->query('DELETE FROM wp_commentmeta');
574
574
  $GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
575
- `})},vi=async(e,{options:t})=>{await e.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"}})},bi=async(e,{selfContained:t=!1}={})=>{const r="/tmp/wordpress-playground.zip",n=await e.documentRoot,s=de(n,"wp-content");let i=pn;t&&(i=i.filter(f=>!f.startsWith("themes/twenty")).filter(f=>f!=="mu-plugins/sqlite-database-integration"));const o=Zt({zipPath:r,wpContentPath:s,documentRoot:n,exceptPaths:i.map(f=>de(n,"wp-content",f)),additionalPaths:t?{[de(n,"wp-config.php")]:"wp-config.php"}:{}});await ra(e,`zipDir(${o.wpContentPath}, ${o.zipPath}, array(
576
- 'exclude_paths' => ${o.exceptPaths},
577
- 'zip_root' => ${o.documentRoot},
578
- 'additional_paths' => ${o.additionalPaths}
579
- ));`);const u=await e.readFileAsBuffer(r);return e.unlink(r),u},ta=`<?php
575
+ `})},Ot=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",p=await r.documentRoot,l=ie(p,"wp-content");let i=qr;t&&(i=i.filter(h=>!h.startsWith("themes/twenty")).filter(h=>h!=="mu-plugins/sqlite-database-integration"));const e=We({zipPath:n,wpContentPath:l,documentRoot:p,exceptPaths:i.map(h=>ie(p,"wp-content",h)),additionalPaths:t?{[ie(p,"wp-config.php")]:"wp-config.php"}:{}});await ys(r,`zipDir(${e.wpContentPath}, ${e.zipPath}, array(
576
+ 'exclude_paths' => ${e.exceptPaths},
577
+ 'zip_root' => ${e.documentRoot},
578
+ 'additional_paths' => ${e.additionalPaths}
579
+ ));`);const u=await r.readFileAsBuffer(n);return r.unlink(n),u},ms=`<?php
580
580
 
581
581
  function zipDir($root, $output, $options = array())
582
582
  {
@@ -635,7 +635,7 @@ function join_paths()
635
635
 
636
636
  return preg_replace('#/+#', '/', join('/', $paths));
637
637
  }
638
- `;async function ra(e,t){return await e.run({code:ta+t})}const Ei=async(e,{command:t,wpCliPath:r="/tmp/wp-cli.phar"})=>{if(!await e.fileExists(r))throw new Error(`wp-cli.phar not found at ${r}`);let n;if(typeof t=="string"?(t=t.trim(),n=na(t)):n=t,n.shift()!=="wp")throw new Error('The first argument must be "wp".');await e.writeFile("/tmp/stdout",""),await e.writeFile("/tmp/stderr",""),await e.writeFile("/wordpress/run-cli.php",`<?php
638
+ `;async function ys(r,t){return await r.run({code:ms+t})}const $t=async(r,{command:t,wpCliPath:n="/tmp/wp-cli.phar"})=>{if(!await r.fileExists(n))throw new Error(`wp-cli.phar not found at ${n}`);let p;if(typeof t=="string"?(t=t.trim(),p=hs(t)):p=t,p.shift()!=="wp")throw new Error('The first argument must be "wp".');await r.writeFile("/tmp/stdout",""),await r.writeFile("/tmp/stderr",""),await r.writeFile("/wordpress/run-cli.php",`<?php
639
639
  // Set up the environment to emulate a shell script
640
640
  // call.
641
641
 
@@ -648,7 +648,7 @@ function join_paths()
648
648
  $GLOBALS['argv'] = array_merge([
649
649
  "/tmp/wp-cli.phar",
650
650
  "--path=/wordpress"
651
- ], ${ae(n)});
651
+ ], ${se(p)});
652
652
 
653
653
  // Provide stdin, stdout, stderr streams outside of
654
654
  // the CLI SAPI.
@@ -656,13 +656,13 @@ function join_paths()
656
656
  define('STDOUT', fopen('php://stdout', 'wb'));
657
657
  define('STDERR', fopen('php://stderr', 'wb'));
658
658
 
659
- require( ${ae(r)} );
660
- `);const i=await e.run({scriptPath:"/wordpress/run-cli.php"});if(i.errors)throw new Error(i.errors);return i};function na(e){let n=0,s="";const i=[];let o="";for(let u=0;u<e.length;u++){const f=e[u];n===0?f==='"'||f==="'"?(n=1,s=f):f.match(/\s/)?(o&&i.push(o),o=""):o+=f:n===1&&(f==="\\"?(u++,o+=e[u]):f===s?(n=0,s=""):o+=f)}return o&&i.push(o),i}const Pi=async(e,{language:t},r)=>{r==null||r.tracker.setCaption((r==null?void 0:r.initialCaption)||"Translating"),await e.defineConstant("WPLANG",t);const n=await e.documentRoot,i=[{url:`https://downloads.wordpress.org/translation/core/${(await e.run({code:`<?php
661
- require '${n}/wp-includes/version.php';
659
+ require( ${se(n)} );
660
+ `);const i=await r.run({scriptPath:"/wordpress/run-cli.php"});if(i.errors)throw new Error(i.errors);return i};function hs(r){let p=0,l="";const i=[];let e="";for(let u=0;u<r.length;u++){const h=r[u];p===0?h==='"'||h==="'"?(p=1,l=h):h.match(/\s/)?(e&&i.push(e),e=""):e+=h:p===1&&(h==="\\"?(u++,e+=r[u]):h===l?(p=0,l=""):e+=h)}return e&&i.push(e),i}const Tt=async(r,{language:t},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Translating"),await r.defineConstant("WPLANG",t);const p=await r.documentRoot,i=[{url:`https://downloads.wordpress.org/translation/core/${(await r.run({code:`<?php
661
+ require '${p}/wp-includes/version.php';
662
662
  echo $wp_version;
663
- `})).text}/${t}.zip`,type:"core"}],u=(await e.run({code:`<?php
664
- require_once('${n}/wp-load.php');
665
- require_once('${n}/wp-admin/includes/plugin.php');
663
+ `})).text}/${t}.zip`,type:"core"}],u=(await r.run({code:`<?php
664
+ require_once('${p}/wp-load.php');
665
+ require_once('${p}/wp-admin/includes/plugin.php');
666
666
  echo json_encode(
667
667
  array_values(
668
668
  array_map(
@@ -680,9 +680,9 @@ function join_paths()
680
680
  )
681
681
  )
682
682
  )
683
- );`})).json;for(const{slug:d,version:p}of u)i.push({url:`https://downloads.wordpress.org/translation/plugin/${d}/${p}/${t}.zip`,type:"plugin"});const l=(await e.run({code:`<?php
684
- require_once('${n}/wp-load.php');
685
- require_once('${n}/wp-admin/includes/theme.php');
683
+ );`})).json;for(const{slug:k,version:y}of u)i.push({url:`https://downloads.wordpress.org/translation/plugin/${k}/${y}/${t}.zip`,type:"plugin"});const b=(await r.run({code:`<?php
684
+ require_once('${p}/wp-load.php');
685
+ require_once('${p}/wp-admin/includes/theme.php');
686
686
  echo json_encode(
687
687
  array_values(
688
688
  array_map(
@@ -695,9 +695,9 @@ function join_paths()
695
695
  wp_get_themes()
696
696
  )
697
697
  )
698
- );`})).json;for(const{slug:d,version:p}of l)i.push({url:`https://downloads.wordpress.org/translation/theme/${d}/${p}/${t}.zip`,type:"theme"});await e.isDir(`${n}/wp-content/languages/plugins`)||await e.mkdir(`${n}/wp-content/languages/plugins`),await e.isDir(`${n}/wp-content/languages/themes`)||await e.mkdir(`${n}/wp-content/languages/themes`);for(const{url:d,type:p}of i)try{const _=await fetch(d);if(!_.ok)throw new Error(`Failed to download translations for ${p}: ${_.statusText}`);let b=`${n}/wp-content/languages`;p==="plugin"?b+="/plugins":p==="theme"&&(b+="/themes"),await hi(e,new File([await _.blob()],`${t}-${p}.zip`),b)}catch(_){if(p==="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/.`);he.warn(`Error downloading translations for ${p}: ${_}`)}},sa=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:Ar,activateTheme:hn,cp:li,defineSiteUrl:$n,defineWpConfigConsts:Qt,enableMultisite:ci,exportWXR:yi,importThemeStarterContent:_n,importWordPressFiles:mi,importWxr:pi,installPlugin:$i,installTheme:_i,login:Er,mkdir:di,mv:ui,request:br,resetData:wi,rm:mn,rmdir:fi,runPHP:ni,runPHPWithOptions:si,runSql:ii,runWpInstallationWizard:vi,setSiteLanguage:Pi,setSiteOptions:yn,unzip:Dr,updateUserMeta:oi,wpCLI:Ei,writeFile:gn,zipWpContent:bi},Symbol.toStringTag,{value:"Module"})),ia=5*1024*1024;function oa(e,t){const r=e.headers.get("content-length")||"",n=parseInt(r,10)||ia;function s(i,o){t(new CustomEvent("progress",{detail:{loaded:i,total:o}}))}return new Response(new ReadableStream({async start(i){if(!e.body){i.close();return}const o=e.body.getReader();let u=0;for(;;)try{const{done:f,value:l}=await o.read();if(l&&(u+=l.byteLength),f){s(u,u),i.close();break}else s(u,n),i.enqueue(l)}catch(f){he.error({e:f}),i.error(f);break}}}),{status:e.status,statusText:e.statusText,headers:e.headers})}const Br=1e-5;class Lr extends EventTarget{constructor({weight:t=1,caption:r="",fillTime:n=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=t,this._selfCaption=r,this._fillTime=n}stage(t,r=""){if(t||(t=this._selfWeight),this._selfWeight-t<-Br)throw new Error(`Cannot add a stage with weight ${t} as the total weight of registered stages would exceed 1.`);this._selfWeight-=t;const n=new Lr({caption:r,weight:t,fillTime:this._fillTime});return this._subTrackers.push(n),n.addEventListener("progress",()=>this.notifyProgress()),n.addEventListener("done",()=>{this.done&&this.notifyDone()}),n}fillSlowly({stopBeforeFinishing:t=!0}={}){if(this._isFilling)return;this._isFilling=!0;const r=100,n=this._fillTime/r;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),t&&this._selfProgress>=99&&clearInterval(this._fillInterval)},n)}set(t){this._selfProgress=Math.min(t,100),this.notifyProgress(),this._selfProgress+Br>=100&&this.finish()}finish(){this._fillInterval&&clearInterval(this._fillInterval),this._selfDone=!0,this._selfProgress=100,this._isFilling=!1,this._fillInterval=void 0,this.notifyProgress(),this.notifyDone()}get caption(){for(let t=this._subTrackers.length-1;t>=0;t--)if(!this._subTrackers[t].done){const r=this._subTrackers[t].caption;if(r)return r}return this._selfCaption}setCaption(t){this._selfCaption=t,this.notifyProgress()}get done(){return this.progress+Br>=100}get progress(){if(this._selfDone)return 100;const t=this._subTrackers.reduce((r,n)=>r+n.progress*n.weight,this._selfProgress*this._selfWeight);return Math.round(t*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=t=>{this.set(t)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=t=>{this.set(t.detail.loaded/t.detail.total*100)}),this._loadingListener}pipe(t){t.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",r=>{t.setProgress({progress:r.detail.progress,caption:r.detail.caption})}),this.addEventListener("done",()=>{t.setLoaded()})}addEventListener(t,r){super.addEventListener(t,r)}removeEventListener(t,r){super.removeEventListener(t,r)}notifyProgress(){const t=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return t.progress},get caption(){return t.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}const Pr={0:"No error occurred. System call completed successfully.",1:"Argument list too long.",2:"Permission denied.",3:"Address in use.",4:"Address not available.",5:"Address family not supported.",6:"Resource unavailable, or operation would block.",7:"Connection already in progress.",8:"Bad file descriptor.",9:"Bad message.",10:"Device or resource busy.",11:"Operation canceled.",12:"No child processes.",13:"Connection aborted.",14:"Connection refused.",15:"Connection reset.",16:"Resource deadlock would occur.",17:"Destination address required.",18:"Mathematics argument out of domain of function.",19:"Reserved.",20:"File exists.",21:"Bad address.",22:"File too large.",23:"Host is unreachable.",24:"Identifier removed.",25:"Illegal byte sequence.",26:"Operation in progress.",27:"Interrupted function.",28:"Invalid argument.",29:"I/O error.",30:"Socket is connected.",31:"There is a directory under that path.",32:"Too many levels of symbolic links.",33:"File descriptor value too large.",34:"Too many links.",35:"Message too large.",36:"Reserved.",37:"Filename too long.",38:"Network is down.",39:"Connection aborted by network.",40:"Network unreachable.",41:"Too many files open in system.",42:"No buffer space available.",43:"No such device.",44:"There is no such file or directory OR the parent directory does not exist.",45:"Executable file format error.",46:"No locks available.",47:"Reserved.",48:"Not enough space.",49:"No message of the desired type.",50:"Protocol not available.",51:"No space left on device.",52:"Function not supported.",53:"The socket is not connected.",54:"Not a directory or a symbolic link to a directory.",55:"Directory not empty.",56:"State not recoverable.",57:"Not a socket.",58:"Not supported, or operation not supported on socket.",59:"Inappropriate I/O control operation.",60:"No such device or address.",61:"Value too large to be stored in data type.",62:"Previous owner died.",63:"Operation not permitted.",64:"Broken pipe.",65:"Protocol error.",66:"Protocol not supported.",67:"Protocol wrong type for socket.",68:"Result too large.",69:"Read-only file system.",70:"Invalid seek.",71:"No such process.",72:"Reserved.",73:"Connection timed out.",74:"Text file busy.",75:"Cross-device link.",76:"Extension: Capabilities insufficient."};function aa(e){const t=typeof e=="object"?e==null?void 0:e.errno:null;if(t in Pr)return Pr[t]}function Ue(e=""){return function(r,n,s){const i=s.value;s.value=function(...o){try{return i.apply(this,o)}catch(u){const f=typeof u=="object"?u==null?void 0:u.errno:null;if(f in Pr){const l=Pr[f],d=typeof o[1]=="string"?o[1]:null,p=d!==null?e.replaceAll("{path}",d):e;throw new Error(`${p}: ${l}`,{cause:u})}throw u}}}}var ca=Object.defineProperty,la=Object.getOwnPropertyDescriptor,ze=(e,t,r,n)=>{for(var s=n>1?void 0:n?la(t,r):t,i=e.length-1,o;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&ca(t,r,s),s};const Ve=class Ee{static readFileAsText(t,r){return new TextDecoder().decode(Ee.readFileAsBuffer(t,r))}static readFileAsBuffer(t,r){return t.readFile(r)}static writeFile(t,r,n){t.writeFile(r,n)}static unlink(t,r){t.unlink(r)}static mv(t,r,n){try{const s=t.lookupPath(r).node.mount,i=Ee.fileExists(t,n)?t.lookupPath(n).node.mount:t.lookupPath(Xs(n)).node.mount;s.mountpoint!==i.mountpoint?(Ee.copyRecursive(t,r,n),Ee.rmdir(t,r,{recursive:!0})):t.rename(r,n)}catch(s){const i=aa(s);throw i?new Error(`Could not move ${r} to ${n}: ${i}`,{cause:s}):s}}static rmdir(t,r,n={recursive:!0}){n!=null&&n.recursive&&Ee.listFiles(t,r).forEach(s=>{const i=`${r}/${s}`;Ee.isDir(t,i)?Ee.rmdir(t,i,n):Ee.unlink(t,i)}),t.rmdir(r)}static listFiles(t,r,n={prependPath:!1}){if(!Ee.fileExists(t,r))return[];try{const s=t.readdir(r).filter(i=>i!=="."&&i!=="..");if(n.prependPath){const i=r.replace(/\/$/,"");return s.map(o=>`${i}/${o}`)}return s}catch(s){return he.error(s,{path:r}),[]}}static isDir(t,r){return Ee.fileExists(t,r)?t.isDir(t.lookupPath(r).node.mode):!1}static isFile(t,r){return Ee.fileExists(t,r)?t.isFile(t.lookupPath(r).node.mode):!1}static fileExists(t,r){try{return t.lookupPath(r),!0}catch{return!1}}static mkdir(t,r){t.mkdirTree(r)}static copyRecursive(t,r,n){const s=t.lookupPath(r).node;if(t.isDir(s.mode)){t.mkdirTree(n);const i=t.readdir(r).filter(o=>o!=="."&&o!=="..");for(const o of i)Ee.copyRecursive(t,de(r,o),de(n,o))}else t.writeFile(n,t.readFile(r))}};ze([Ue('Could not read "{path}"')],Ve,"readFileAsText",1);ze([Ue('Could not read "{path}"')],Ve,"readFileAsBuffer",1);ze([Ue('Could not write to "{path}"')],Ve,"writeFile",1);ze([Ue('Could not unlink "{path}"')],Ve,"unlink",1);ze([Ue('Could not remove directory "{path}"')],Ve,"rmdir",1);ze([Ue('Could not list files in "{path}"')],Ve,"listFiles",1);ze([Ue('Could not stat "{path}"')],Ve,"isDir",1);ze([Ue('Could not stat "{path}"')],Ve,"fileExists",1);ze([Ue('Could not create directory "{path}"')],Ve,"mkdir",1);ze([Ue('Could not copy files from "{path}"')],Ve,"copyRecursive",1);const ua={500:"Internal Server Error",502:"Bad Gateway",404:"Not Found",403:"Forbidden",401:"Unauthorized",400:"Bad Request",301:"Moved Permanently",302:"Found",307:"Temporary Redirect",308:"Permanent Redirect",204:"No Content",201:"Created",200:"OK"};class Sr{constructor(t,r,n,s="",i=0){this.httpStatusCode=t,this.headers=r,this.bytes=n,this.exitCode=i,this.errors=s}static forHttpCode(t,r=""){return new Sr(t,{},new TextEncoder().encode(r||ua[t]||""))}static fromRawData(t){return new Sr(t.httpStatusCode,t.headers,t.bytes,t.errors,t.exitCode)}toRawData(){return{headers:this.headers,bytes:this.bytes,errors:this.errors,exitCode:this.exitCode,httpStatusCode:this.httpStatusCode}}get json(){return JSON.parse(this.text)}get text(){return new TextDecoder().decode(this.bytes)}}(function(){var e;return typeof process<"u"&&((e=process.release)==null?void 0:e.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"})();const Es="/internal/shared/php.ini";var da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const{hasOwnProperty:Gr}=Object.prototype,nn=(e,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;const r=t.platform==="win32"?`\r
698
+ );`})).json;for(const{slug:k,version:y}of b)i.push({url:`https://downloads.wordpress.org/translation/theme/${k}/${y}/${t}.zip`,type:"theme"});await r.isDir(`${p}/wp-content/languages/plugins`)||await r.mkdir(`${p}/wp-content/languages/plugins`),await r.isDir(`${p}/wp-content/languages/themes`)||await r.mkdir(`${p}/wp-content/languages/themes`);for(const{url:k,type:y}of i)try{const E=await fetch(k);if(!E.ok)throw new Error(`Failed to download translations for ${y}: ${E.statusText}`);let S=`${p}/wp-content/languages`;y==="plugin"?S+="/plugins":y==="theme"&&(S+="/themes"),await gt(r,new File([await E.blob()],`${t}-${y}.zip`),S)}catch(E){if(y==="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.warn(`Error downloading translations for ${y}: ${E}`)}},gs=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:dr,activateTheme:Rr,cp:dt,defineSiteUrl:Nr,defineWpConfigConsts:Ie,enableMultisite:ut,exportWXR:wt,importThemeStarterContent:Fr,importWordPressFiles:bt,importWxr:ht,installPlugin:Pt,installTheme:_t,login:or,mkdir:mt,mv:ct,request:nr,resetData:kt,rm:Sr,rmdir:yt,runPHP:ot,runPHPWithOptions:at,runSql:pt,runWpInstallationWizard:Ot,setSiteLanguage:Tt,setSiteOptions:Lr,unzip:cr,updateUserMeta:lt,wpCLI:$t,writeFile:xr,zipWpContent:Et},Symbol.toStringTag,{value:"Module"})),bs=5*1024*1024;function ws(r,t){const n=r.headers.get("content-length")||"",p=parseInt(n,10)||bs;function l(i,e){t(new CustomEvent("progress",{detail:{loaded:i,total:e}}))}return new Response(new ReadableStream({async start(i){if(!r.body){i.close();return}const e=r.body.getReader();let u=0;for(;;)try{const{done:h,value:b}=await e.read();if(b&&(u+=b.byteLength),h){l(u,u),i.close();break}else l(u,p),i.enqueue(b)}catch(h){ae.error({e:h}),i.error(h);break}}}),{status:r.status,statusText:r.statusText,headers:r.headers})}const Pr=1e-5;class yr extends EventTarget{constructor({weight:t=1,caption:n="",fillTime:p=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=t,this._selfCaption=n,this._fillTime=p}stage(t,n=""){if(t||(t=this._selfWeight),this._selfWeight-t<-Pr)throw new Error(`Cannot add a stage with weight ${t} as the total weight of registered stages would exceed 1.`);this._selfWeight-=t;const p=new yr({caption:n,weight:t,fillTime:this._fillTime});return this._subTrackers.push(p),p.addEventListener("progress",()=>this.notifyProgress()),p.addEventListener("done",()=>{this.done&&this.notifyDone()}),p}fillSlowly({stopBeforeFinishing:t=!0}={}){if(this._isFilling)return;this._isFilling=!0;const n=100,p=this._fillTime/n;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),t&&this._selfProgress>=99&&clearInterval(this._fillInterval)},p)}set(t){this._selfProgress=Math.min(t,100),this.notifyProgress(),this._selfProgress+Pr>=100&&this.finish()}finish(){this._fillInterval&&clearInterval(this._fillInterval),this._selfDone=!0,this._selfProgress=100,this._isFilling=!1,this._fillInterval=void 0,this.notifyProgress(),this.notifyDone()}get caption(){for(let t=this._subTrackers.length-1;t>=0;t--)if(!this._subTrackers[t].done){const n=this._subTrackers[t].caption;if(n)return n}return this._selfCaption}setCaption(t){this._selfCaption=t,this.notifyProgress()}get done(){return this.progress+Pr>=100}get progress(){if(this._selfDone)return 100;const t=this._subTrackers.reduce((n,p)=>n+p.progress*p.weight,this._selfProgress*this._selfWeight);return Math.round(t*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=t=>{this.set(t)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=t=>{this.set(t.detail.loaded/t.detail.total*100)}),this._loadingListener}pipe(t){t.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",n=>{t.setProgress({progress:n.detail.progress,caption:n.detail.caption})}),this.addEventListener("done",()=>{t.setLoaded()})}addEventListener(t,n){super.addEventListener(t,n)}removeEventListener(t,n){super.removeEventListener(t,n)}notifyProgress(){const t=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return t.progress},get caption(){return t.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}const ar={0:"No error occurred. System call completed successfully.",1:"Argument list too long.",2:"Permission denied.",3:"Address in use.",4:"Address not available.",5:"Address family not supported.",6:"Resource unavailable, or operation would block.",7:"Connection already in progress.",8:"Bad file descriptor.",9:"Bad message.",10:"Device or resource busy.",11:"Operation canceled.",12:"No child processes.",13:"Connection aborted.",14:"Connection refused.",15:"Connection reset.",16:"Resource deadlock would occur.",17:"Destination address required.",18:"Mathematics argument out of domain of function.",19:"Reserved.",20:"File exists.",21:"Bad address.",22:"File too large.",23:"Host is unreachable.",24:"Identifier removed.",25:"Illegal byte sequence.",26:"Operation in progress.",27:"Interrupted function.",28:"Invalid argument.",29:"I/O error.",30:"Socket is connected.",31:"There is a directory under that path.",32:"Too many levels of symbolic links.",33:"File descriptor value too large.",34:"Too many links.",35:"Message too large.",36:"Reserved.",37:"Filename too long.",38:"Network is down.",39:"Connection aborted by network.",40:"Network unreachable.",41:"Too many files open in system.",42:"No buffer space available.",43:"No such device.",44:"There is no such file or directory OR the parent directory does not exist.",45:"Executable file format error.",46:"No locks available.",47:"Reserved.",48:"Not enough space.",49:"No message of the desired type.",50:"Protocol not available.",51:"No space left on device.",52:"Function not supported.",53:"The socket is not connected.",54:"Not a directory or a symbolic link to a directory.",55:"Directory not empty.",56:"State not recoverable.",57:"Not a socket.",58:"Not supported, or operation not supported on socket.",59:"Inappropriate I/O control operation.",60:"No such device or address.",61:"Value too large to be stored in data type.",62:"Previous owner died.",63:"Operation not permitted.",64:"Broken pipe.",65:"Protocol error.",66:"Protocol not supported.",67:"Protocol wrong type for socket.",68:"Result too large.",69:"Read-only file system.",70:"Invalid seek.",71:"No such process.",72:"Reserved.",73:"Connection timed out.",74:"Text file busy.",75:"Cross-device link.",76:"Extension: Capabilities insufficient."};function vs(r){const t=typeof r=="object"?r==null?void 0:r.errno:null;if(t in ar)return ar[t]}function _e(r=""){return function(n,p,l){const i=l.value;l.value=function(...e){try{return i.apply(this,e)}catch(u){const h=typeof u=="object"?u==null?void 0:u.errno:null;if(h in ar){const b=ar[h],k=typeof e[1]=="string"?e[1]:null,y=k!==null?r.replaceAll("{path}",k):r;throw new Error(`${y}: ${b}`,{cause:u})}throw u}}}}var Ps=Object.defineProperty,_s=Object.getOwnPropertyDescriptor,ke=(r,t,n,p)=>{for(var l=p>1?void 0:p?_s(t,n):t,i=r.length-1,e;i>=0;i--)(e=r[i])&&(l=(p?e(t,n,l):e(l))||l);return p&&l&&Ps(t,n,l),l};const Oe=class me{static readFileAsText(t,n){return new TextDecoder().decode(me.readFileAsBuffer(t,n))}static readFileAsBuffer(t,n){return t.readFile(n)}static writeFile(t,n,p){t.writeFile(n,p)}static unlink(t,n){t.unlink(n)}static mv(t,n,p){try{const l=t.lookupPath(n).node.mount,i=me.fileExists(t,p)?t.lookupPath(p).node.mount:t.lookupPath(tt(p)).node.mount;l.mountpoint!==i.mountpoint?(me.copyRecursive(t,n,p),me.rmdir(t,n,{recursive:!0})):t.rename(n,p)}catch(l){const i=vs(l);throw i?new Error(`Could not move ${n} to ${p}: ${i}`,{cause:l}):l}}static rmdir(t,n,p={recursive:!0}){p!=null&&p.recursive&&me.listFiles(t,n).forEach(l=>{const i=`${n}/${l}`;me.isDir(t,i)?me.rmdir(t,i,p):me.unlink(t,i)}),t.rmdir(n)}static listFiles(t,n,p={prependPath:!1}){if(!me.fileExists(t,n))return[];try{const l=t.readdir(n).filter(i=>i!=="."&&i!=="..");if(p.prependPath){const i=n.replace(/\/$/,"");return l.map(e=>`${i}/${e}`)}return l}catch(l){return ae.error(l,{path:n}),[]}}static isDir(t,n){return me.fileExists(t,n)?t.isDir(t.lookupPath(n).node.mode):!1}static isFile(t,n){return me.fileExists(t,n)?t.isFile(t.lookupPath(n).node.mode):!1}static fileExists(t,n){try{return t.lookupPath(n),!0}catch{return!1}}static mkdir(t,n){t.mkdirTree(n)}static copyRecursive(t,n,p){const l=t.lookupPath(n).node;if(t.isDir(l.mode)){t.mkdirTree(p);const i=t.readdir(n).filter(e=>e!=="."&&e!=="..");for(const e of i)me.copyRecursive(t,ie(n,e),ie(p,e))}else t.writeFile(p,t.readFile(n))}};ke([_e('Could not read "{path}"')],Oe,"readFileAsText",1);ke([_e('Could not read "{path}"')],Oe,"readFileAsBuffer",1);ke([_e('Could not write to "{path}"')],Oe,"writeFile",1);ke([_e('Could not unlink "{path}"')],Oe,"unlink",1);ke([_e('Could not remove directory "{path}"')],Oe,"rmdir",1);ke([_e('Could not list files in "{path}"')],Oe,"listFiles",1);ke([_e('Could not stat "{path}"')],Oe,"isDir",1);ke([_e('Could not stat "{path}"')],Oe,"fileExists",1);ke([_e('Could not create directory "{path}"')],Oe,"mkdir",1);ke([_e('Could not copy files from "{path}"')],Oe,"copyRecursive",1);const ks={500:"Internal Server Error",502:"Bad Gateway",404:"Not Found",403:"Forbidden",401:"Unauthorized",400:"Bad Request",301:"Moved Permanently",302:"Found",307:"Temporary Redirect",308:"Permanent Redirect",204:"No Content",201:"Created",200:"OK"};class pr{constructor(t,n,p,l="",i=0){this.httpStatusCode=t,this.headers=n,this.bytes=p,this.exitCode=i,this.errors=l}static forHttpCode(t,n=""){return new pr(t,{},new TextEncoder().encode(n||ks[t]||""))}static fromRawData(t){return new pr(t.httpStatusCode,t.headers,t.bytes,t.errors,t.exitCode)}toRawData(){return{headers:this.headers,bytes:this.bytes,errors:this.errors,exitCode:this.exitCode,httpStatusCode:this.httpStatusCode}}get json(){return JSON.parse(this.text)}get text(){return new TextDecoder().decode(this.bytes)}}(function(){var r;return typeof process<"u"&&((r=process.release)==null?void 0:r.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"})();const Vr="/internal/shared/php.ini",{hasOwnProperty:_r}=Object.prototype,jr=(r,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;const n=t.platform==="win32"?`\r
699
699
  `:`
700
- `,n=t.whitespace?" = ":"=",s=[],i=t.sort?Object.keys(e).sort():Object.keys(e);let o=0;t.align&&(o=He(i.filter(l=>e[l]===null||Array.isArray(e[l])||typeof e[l]!="object").map(l=>Array.isArray(e[l])?`${l}[]`:l).concat([""]).reduce((l,d)=>He(l).length>=He(d).length?l:d)).length);let u="";const f=t.bracketedArray?"[]":"";for(const l of i){const d=e[l];if(d&&Array.isArray(d))for(const p of d)u+=He(`${l}${f}`).padEnd(o," ")+n+He(p)+r;else d&&typeof d=="object"?s.push(l):u+=He(l).padEnd(o," ")+n+He(d)+r}t.section&&u.length&&(u="["+He(t.section)+"]"+(t.newline?r+r:r)+u);for(const l of s){const d=Si(l,".").join("\\."),p=(t.section?t.section+".":"")+d,_=nn(e[l],{...t,section:p});u.length&&_.length&&(u+=r),u+=_}return u};function Si(e,t){var r=0,n=0,s=0,i=[];do if(s=e.indexOf(t,r),s!==-1){if(r=s+t.length,s>0&&e[s-1]==="\\")continue;i.push(e.slice(n,s)),n=s+t.length}while(s!==-1);return i.push(e.slice(n)),i}const Ps=(e,t={})=>{t.bracketedArray=t.bracketedArray!==!1;const r=Object.create(null);let n=r,s=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=e.split(/[\r\n]+/g),u={};for(const l of o){if(!l||l.match(/^\s*[;#]/)||l.match(/^\s*$/))continue;const d=l.match(i);if(!d)continue;if(d[1]!==void 0){if(s=mr(d[1]),s==="__proto__"){n=Object.create(null);continue}n=r[s]=r[s]||Object.create(null);continue}const p=mr(d[2]);let _;t.bracketedArray?_=p.length>2&&p.slice(-2)==="[]":(u[p]=((u==null?void 0:u[p])||0)+1,_=u[p]>1);const b=_?p.slice(0,-2):p;if(b==="__proto__")continue;const P=d[3]?mr(d[4]):!0,O=P==="true"||P==="false"||P==="null"?JSON.parse(P):P;_&&(Gr.call(n,b)?Array.isArray(n[b])||(n[b]=[n[b]]):n[b]=[]),Array.isArray(n[b])?n[b].push(O):n[b]=O}const f=[];for(const l of Object.keys(r)){if(!Gr.call(r,l)||typeof r[l]!="object"||Array.isArray(r[l]))continue;const d=Si(l,".");n=r;const p=d.pop(),_=p.replace(/\\\./g,".");for(const b of d)b!=="__proto__"&&((!Gr.call(n,b)||typeof n[b]!="object")&&(n[b]=Object.create(null)),n=n[b]);n===r&&_===p||(n[_]=r[l],f.push(l))}for(const l of f)delete r[l];return r},Ti=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),He=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Ti(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),mr=e=>{if(e=(e||"").trim(),Ti(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let t=!1,r="";for(let n=0,s=e.length;n<s;n++){const i=e.charAt(n);if(t)"\\;#".indexOf(i)!==-1?r+=i:r+="\\"+i,t=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?t=!0:r+=i}}return t&&(r+="\\"),r.trim()}return e};var Ss={parse:Ps,decode:Ps,stringify:nn,encode:nn,safe:He,unsafe:mr};async function pa(e,t){const r=Ss.parse(await e.readFileAsText(Es));for(const[n,s]of Object.entries(t))s==null?delete r[n]:r[n]=s;await e.writeFile(Es,Ss.stringify(r))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const e=this.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)return;yield r}}finally{e.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const Fr=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],Ri=Fr[0],ha=Fr,ki=["iconv","mbstring","xml-bundle","gd"],Ts={"kitchen-sink":ki,light:[]},ma=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url"];function ya(e){return e&&typeof e=="object"&&typeof e.resource=="string"&&ma.includes(e.resource)}class ft{static create(t,{semaphore:r,progress:n}){let s;switch(t.resource){case"vfs":s=new ga(t,n);break;case"literal":s=new $a(t,n);break;case"wordpress.org/themes":s=new va(t,n);break;case"wordpress.org/plugins":s=new ba(t,n);break;case"url":s=new wa(t,n);break;default:throw new Error(`Invalid resource: ${t}`)}return s=new Ea(s),r&&(s=new Pa(s,r)),s}setPlayground(t){this.playground=t}get isAsync(){return!1}}class ga extends ft{constructor(t,r){super(),this.resource=t,this.progress=r}async resolve(){var r;const t=await this.playground.readFileAsBuffer(this.resource.path);return(r=this.progress)==null||r.set(100),new File([t],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class $a extends ft{constructor(t,r){super(),this.resource=t,this.progress=r}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 wn extends ft{constructor(t){super(),this.progress=t}async resolve(){var r,n;(r=this.progress)==null||r.setCaption(this.caption);const t=this.getURL();try{let s=await fetch(t);if(!s.ok)throw new Error(`Could not download "${t}"`);if(s=await oa(s,((n=this.progress)==null?void 0:n.loadingListener)??_a),s.status!==200)throw new Error(`Could not download "${t}"`);return new File([await s.blob()],this.name)}catch(s){throw new Error(`Could not download "${t}".
700
+ `,p=t.whitespace?" = ":"=",l=[],i=t.sort?Object.keys(r).sort():Object.keys(r);let e=0;t.align&&(e=Ee(i.filter(b=>r[b]===null||Array.isArray(r[b])||typeof r[b]!="object").map(b=>Array.isArray(r[b])?`${b}[]`:b).concat([""]).reduce((b,k)=>Ee(b).length>=Ee(k).length?b:k)).length);let u="";const h=t.bracketedArray?"[]":"";for(const b of i){const k=r[b];if(k&&Array.isArray(k))for(const y of k)u+=Ee(`${b}${h}`).padEnd(e," ")+p+Ee(y)+n;else k&&typeof k=="object"?l.push(b):u+=Ee(b).padEnd(e," ")+p+Ee(k)+n}t.section&&u.length&&(u="["+Ee(t.section)+"]"+(t.newline?n+n:n)+u);for(const b of l){const k=jt(b,".").join("\\."),y=(t.section?t.section+".":"")+k,E=jr(r[b],{...t,section:y});u.length&&E.length&&(u+=n),u+=E}return u};function jt(r,t){var n=0,p=0,l=0,i=[];do if(l=r.indexOf(t,n),l!==-1){if(n=l+t.length,l>0&&r[l-1]==="\\")continue;i.push(r.slice(p,l)),p=l+t.length}while(l!==-1);return i.push(r.slice(p)),i}const Hr=(r,t={})=>{t.bracketedArray=t.bracketedArray!==!1;const n=Object.create(null);let p=n,l=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,e=r.split(/[\r\n]+/g),u={};for(const b of e){if(!b||b.match(/^\s*[;#]/)||b.match(/^\s*$/))continue;const k=b.match(i);if(!k)continue;if(k[1]!==void 0){if(l=rr(k[1]),l==="__proto__"){p=Object.create(null);continue}p=n[l]=n[l]||Object.create(null);continue}const y=rr(k[2]);let E;t.bracketedArray?E=y.length>2&&y.slice(-2)==="[]":(u[y]=((u==null?void 0:u[y])||0)+1,E=u[y]>1);const S=E?y.slice(0,-2):y;if(S==="__proto__")continue;const I=k[3]?rr(k[4]):!0,_=I==="true"||I==="false"||I==="null"?JSON.parse(I):I;E&&(_r.call(p,S)?Array.isArray(p[S])||(p[S]=[p[S]]):p[S]=[]),Array.isArray(p[S])?p[S].push(_):p[S]=_}const h=[];for(const b of Object.keys(n)){if(!_r.call(n,b)||typeof n[b]!="object"||Array.isArray(n[b]))continue;const k=jt(b,".");p=n;const y=k.pop(),E=y.replace(/\\\./g,".");for(const S of k)S!=="__proto__"&&((!_r.call(p,S)||typeof p[S]!="object")&&(p[S]=Object.create(null)),p=p[S]);p===n&&E===y||(p[E]=n[b],h.push(b))}for(const b of h)delete n[b];return n},At=r=>r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'"),Ee=r=>typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&At(r)||r!==r.trim()?JSON.stringify(r):r.split(";").join("\\;").split("#").join("\\#"),rr=r=>{if(r=(r||"").trim(),At(r)){r.charAt(0)==="'"&&(r=r.slice(1,-1));try{r=JSON.parse(r)}catch{}}else{let t=!1,n="";for(let p=0,l=r.length;p<l;p++){const i=r.charAt(p);if(t)"\\;#".indexOf(i)!==-1?n+=i:n+="\\"+i,t=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?t=!0:n+=i}}return t&&(n+="\\"),n.trim()}return r};var Gr={parse:Hr,decode:Hr,stringify:jr,encode:jr,safe:Ee,unsafe:rr};async function Os(r,t){const n=Gr.parse(await r.readFileAsText(Vr));for(const[p,l]of Object.entries(t))l==null?delete n[p]:n[p]=l;await r.writeFile(Vr,Gr.stringify(n))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const r=this.getReader();try{for(;;){const{done:t,value:n}=await r.read();if(t)return;yield n}}finally{r.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const hr=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],qt=hr[0],Es=hr,Rt=["iconv","mbstring","xml-bundle","gd"],Yr={"kitchen-sink":Rt,light:[]},$s=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url"];function Ts(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&$s.includes(r.resource)}class Se{static create(t,{semaphore:n,progress:p}){let l;switch(t.resource){case"vfs":l=new js(t,p);break;case"literal":l=new As(t,p);break;case"wordpress.org/themes":l=new Ss(t,p);break;case"wordpress.org/plugins":l=new Ls(t,p);break;case"url":l=new Rs(t,p);break;default:throw new Error(`Invalid resource: ${t}`)}return l=new xs(l),n&&(l=new Ns(l,n)),l}setPlayground(t){this.playground=t}get isAsync(){return!1}}class js extends Se{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 As extends Se{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 Se{constructor(t){super(),this.progress=t}async resolve(){var n,p;(n=this.progress)==null||n.setCaption(this.caption);const t=this.getURL();try{let l=await fetch(t);if(!l.ok)throw new Error(`Could not download "${t}"`);if(l=await ws(l,((p=this.progress)==null?void 0:p.loadingListener)??qs),l.status!==200)throw new Error(`Could not download "${t}"`);return new File([await l.blob()],this.name)}catch(l){throw new Error(`Could not download "${t}".
701
701
  Check if the URL is correct and the server is reachable.
702
702
  If it is reachable, the server might be blocking the request.
703
703
  Check the browser console and network tabs for more information.
@@ -721,21 +721,14 @@ function join_paths()
721
721
  https://raw.githubusercontent.com/username/repository/branch/filename
722
722
 
723
723
  Error:
724
- ${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}}const _a=()=>{};class wa extends wn{constructor(t,r){super(r),this.resource=t}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class va extends wn{constructor(t,r){super(r),this.resource=t}get name(){return Mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${Oi(this.resource.slug)}`}}class ba extends wn{constructor(t,r){super(r),this.resource=t}get name(){return Mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${Oi(this.resource.slug)}`}}function Oi(e){return!e||e.endsWith(".zip")?e:e+".latest-stable.zip"}class Ci extends ft{constructor(t){super(),this.resource=t}async resolve(){return this.resource.resolve()}async setPlayground(t){return this.resource.setPlayground(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}}class Ea extends Ci{async resolve(){return this.promise||(this.promise=super.resolve()),this.promise}}class Pa extends Ci{constructor(t,r){super(t),this.semaphore=r}async resolve(){return this.isAsync?this.semaphore.run(()=>super.resolve()):super.resolve()}}var sn={exports:{}},Ni={},Ne={},kt={},Xt={},B={},Yt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor($){if(super(),!e.IDENTIFIER.test($))throw new Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor($){super(),this._items=typeof $=="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((S,I)=>`${S}${I}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((S,I)=>(I instanceof r&&(S[I.str]=(S[I.str]||0)+1),S),{})}}e._Code=n,e.nil=new n("");function s(g,...$){const S=[g[0]];let I=0;for(;I<$.length;)u(S,$[I]),S.push(g[++I]);return new n(S)}e._=s;const i=new n("+");function o(g,...$){const S=[b(g[0])];let I=0;for(;I<$.length;)S.push(i),u(S,$[I]),S.push(i,b(g[++I]));return f(S),new n(S)}e.str=o;function u(g,$){$ instanceof n?g.push(...$._items):$ instanceof r?g.push($):g.push(p($))}e.addCodeArg=u;function f(g){let $=1;for(;$<g.length-1;){if(g[$]===i){const S=l(g[$-1],g[$+1]);if(S!==void 0){g.splice($-1,3,S);continue}g[$++]="+"}$++}}function l(g,$){if($==='""')return g;if(g==='""')return $;if(typeof g=="string")return $ instanceof r||g[g.length-1]!=='"'?void 0:typeof $!="string"?`${g.slice(0,-1)}${$}"`:$[0]==='"'?g.slice(0,-1)+$.slice(1):void 0;if(typeof $=="string"&&$[0]==='"'&&!(g instanceof r))return`"${g}${$.slice(1)}`}function d(g,$){return $.emptyStr()?g:g.emptyStr()?$:o`${g}${$}`}e.strConcat=d;function p(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:b(Array.isArray(g)?g.join(","):g)}function _(g){return new n(b(g))}e.stringify=_;function b(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=b;function P(g){return typeof g=="string"&&e.IDENTIFIER.test(g)?new n(`.${g}`):s`[${g}]`}e.getProperty=P;function O(g){if(typeof g=="string"&&e.IDENTIFIER.test(g))return new n(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}e.getEsmExportName=O;function w(g){return new n(g.toString())}e.regexpCode=w})(Yt);var on={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Yt;class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(f){f[f.Started=0]="Started",f[f.Completed=1]="Completed"})(n=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:l,parent:d}={}){this._names={},this._prefixes=l,this._parent=d}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const d=this._names[l]||this._nameGroup(l);return`${l}${d.index++}`}_nameGroup(l){var d,p;if(!((p=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||p===void 0)&&p.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=s;class i extends t.Name{constructor(l,d){super(d),this.prefix=l}setValue(l,{property:d,itemIndex:p}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(d)}[${p}]`}}e.ValueScopeName=i;const o=(0,t._)`\n`;class u extends s{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?o:t.nil}}get(){return this._scope}name(l){return new i(l,this._newName(l))}value(l,d){var p;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const _=this.toName(l),{prefix:b}=_,P=(p=d.key)!==null&&p!==void 0?p:d.ref;let O=this._values[b];if(O){const $=O.get(P);if($)return $}else O=this._values[b]=new Map;O.set(P,_);const w=this._scope[b]||(this._scope[b]=[]),g=w.length;return w[g]=d.ref,_.setValue(d,{property:b,itemIndex:g}),_}getValue(l,d){const p=this._values[l];if(p)return p.get(d)}scopeRefs(l,d=this._values){return this._reduceValues(d,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${l}${p.scopePath}`})}scopeCode(l=this._values,d,p){return this._reduceValues(l,_=>{if(_.value===void 0)throw new Error(`CodeGen: name "${_}" has no value`);return _.value.code},d,p)}_reduceValues(l,d,p={},_){let b=t.nil;for(const P in l){const O=l[P];if(!O)continue;const w=p[P]=p[P]||new Map;O.forEach(g=>{if(w.has(g))return;w.set(g,n.Started);let $=d(g);if($){const S=this.opts.es5?e.varKinds.var:e.varKinds.const;b=(0,t._)`${b}${S} ${g} = ${$};${this.opts._n}`}else if($=_==null?void 0:_(g))b=(0,t._)`${b}${$}${this.opts._n}`;else throw new r(g);w.set(g,n.Completed)})}return b}}e.ValueScope=u})(on);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Yt,r=on;var n=Yt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=on;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(a,m){return this}}class o extends i{constructor(a,m,N){super(),this.varKind=a,this.name=m,this.rhs=N}render({es5:a,_n:m}){const N=a?r.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${N} ${this.name}${L};`+m}optimizeNames(a,m){if(a[this.name.str])return this.rhs&&(this.rhs=fe(this.rhs,a,m)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends i{constructor(a,m,N){super(),this.lhs=a,this.rhs=m,this.sideEffects=N}render({_n:a}){return`${this.lhs} = ${this.rhs};`+a}optimizeNames(a,m){if(!(this.lhs instanceof t.Name&&!a[this.lhs.str]&&!this.sideEffects))return this.rhs=fe(this.rhs,a,m),this}get names(){const a=this.lhs instanceof t.Name?{}:{...this.lhs.names};return Pe(a,this.rhs)}}class f extends u{constructor(a,m,N,L){super(a,N,L),this.op=m}render({_n:a}){return`${this.lhs} ${this.op}= ${this.rhs};`+a}}class l extends i{constructor(a){super(),this.label=a,this.names={}}render({_n:a}){return`${this.label}:`+a}}class d extends i{constructor(a){super(),this.label=a,this.names={}}render({_n:a}){return`break${this.label?` ${this.label}`:""};`+a}}class p extends i{constructor(a){super(),this.error=a}render({_n:a}){return`throw ${this.error};`+a}get names(){return this.error.names}}class _ extends i{constructor(a){super(),this.code=a}render({_n:a}){return`${this.code};`+a}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(a,m){return this.code=fe(this.code,a,m),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class b extends i{constructor(a=[]){super(),this.nodes=a}render(a){return this.nodes.reduce((m,N)=>m+N.render(a),"")}optimizeNodes(){const{nodes:a}=this;let m=a.length;for(;m--;){const N=a[m].optimizeNodes();Array.isArray(N)?a.splice(m,1,...N):N?a[m]=N:a.splice(m,1)}return a.length>0?this:void 0}optimizeNames(a,m){const{nodes:N}=this;let L=N.length;for(;L--;){const F=N[L];F.optimizeNames(a,m)||(Xe(a,F.names),N.splice(L,1))}return N.length>0?this:void 0}get names(){return this.nodes.reduce((a,m)=>Y(a,m.names),{})}}class P extends b{render(a){return"{"+a._n+super.render(a)+"}"+a._n}}class O extends b{}class w extends P{}w.kind="else";class g extends P{constructor(a,m){super(m),this.condition=a}render(a){let m=`if(${this.condition})`+super.render(a);return this.else&&(m+="else "+this.else.render(a)),m}optimizeNodes(){super.optimizeNodes();const a=this.condition;if(a===!0)return this.nodes;let m=this.else;if(m){const N=m.optimizeNodes();m=this.else=Array.isArray(N)?new w(N):N}if(m)return a===!1?m instanceof g?m:m.nodes:this.nodes.length?this:new g(et(a),m instanceof g?[m]:m.nodes);if(!(a===!1||!this.nodes.length))return this}optimizeNames(a,m){var N;if(this.else=(N=this.else)===null||N===void 0?void 0:N.optimizeNames(a,m),!!(super.optimizeNames(a,m)||this.else))return this.condition=fe(this.condition,a,m),this}get names(){const a=super.names;return Pe(a,this.condition),this.else&&Y(a,this.else.names),a}}g.kind="if";class $ extends P{}$.kind="for";class S extends ${constructor(a){super(),this.iteration=a}render(a){return`for(${this.iteration})`+super.render(a)}optimizeNames(a,m){if(super.optimizeNames(a,m))return this.iteration=fe(this.iteration,a,m),this}get names(){return Y(super.names,this.iteration.names)}}class I extends ${constructor(a,m,N,L){super(),this.varKind=a,this.name=m,this.from=N,this.to=L}render(a){const m=a.es5?r.varKinds.var:this.varKind,{name:N,from:L,to:F}=this;return`for(${m} ${N}=${L}; ${N}<${F}; ${N}++)`+super.render(a)}get names(){const a=Pe(super.names,this.from);return Pe(a,this.to)}}class D extends ${constructor(a,m,N,L){super(),this.loop=a,this.varKind=m,this.name=N,this.iterable=L}render(a){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(a)}optimizeNames(a,m){if(super.optimizeNames(a,m))return this.iterable=fe(this.iterable,a,m),this}get names(){return Y(super.names,this.iterable.names)}}class E extends P{constructor(a,m,N){super(),this.name=a,this.args=m,this.async=N}render(a){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(a)}}E.kind="func";class C extends b{render(a){return"return "+super.render(a)}}C.kind="return";class A extends P{render(a){let m="try"+super.render(a);return this.catch&&(m+=this.catch.render(a)),this.finally&&(m+=this.finally.render(a)),m}optimizeNodes(){var a,m;return super.optimizeNodes(),(a=this.catch)===null||a===void 0||a.optimizeNodes(),(m=this.finally)===null||m===void 0||m.optimizeNodes(),this}optimizeNames(a,m){var N,L;return super.optimizeNames(a,m),(N=this.catch)===null||N===void 0||N.optimizeNames(a,m),(L=this.finally)===null||L===void 0||L.optimizeNames(a,m),this}get names(){const a=super.names;return this.catch&&Y(a,this.catch.names),this.finally&&Y(a,this.finally.names),a}}class W extends P{constructor(a){super(),this.error=a}render(a){return`catch(${this.error})`+super.render(a)}}W.kind="catch";class G extends P{render(a){return"finally"+super.render(a)}}G.kind="finally";class ie{constructor(a,m={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...m,_n:m.lines?`
725
- `:""},this._extScope=a,this._scope=new r.Scope({parent:a}),this._nodes=[new O]}toString(){return this._root.render(this.opts)}name(a){return this._scope.name(a)}scopeName(a){return this._extScope.name(a)}scopeValue(a,m){const N=this._extScope.value(a,m);return(this._values[N.prefix]||(this._values[N.prefix]=new Set)).add(N),N}getScopeValue(a,m){return this._extScope.getValue(a,m)}scopeRefs(a){return this._extScope.scopeRefs(a,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(a,m,N,L){const F=this._scope.toName(m);return N!==void 0&&L&&(this._constants[F.str]=N),this._leafNode(new o(a,F,N)),F}const(a,m,N){return this._def(r.varKinds.const,a,m,N)}let(a,m,N){return this._def(r.varKinds.let,a,m,N)}var(a,m,N){return this._def(r.varKinds.var,a,m,N)}assign(a,m,N){return this._leafNode(new u(a,m,N))}add(a,m){return this._leafNode(new f(a,e.operators.ADD,m))}code(a){return typeof a=="function"?a():a!==t.nil&&this._leafNode(new _(a)),this}object(...a){const m=["{"];for(const[N,L]of a)m.length>1&&m.push(","),m.push(N),(N!==L||this.opts.es5)&&(m.push(":"),(0,t.addCodeArg)(m,L));return m.push("}"),new t._Code(m)}if(a,m,N){if(this._blockNode(new g(a)),m&&N)this.code(m).else().code(N).endIf();else if(m)this.code(m).endIf();else if(N)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(a){return this._elseNode(new g(a))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(g,w)}_for(a,m){return this._blockNode(a),m&&this.code(m).endFor(),this}for(a,m){return this._for(new S(a),m)}forRange(a,m,N,L,F=this.opts.es5?r.varKinds.var:r.varKinds.let){const K=this._scope.toName(a);return this._for(new I(F,K,m,N),()=>L(K))}forOf(a,m,N,L=r.varKinds.const){const F=this._scope.toName(a);if(this.opts.es5){const K=m instanceof t.Name?m:this.var("_arr",m);return this.forRange("_i",0,(0,t._)`${K}.length`,Q=>{this.var(F,(0,t._)`${K}[${Q}]`),N(F)})}return this._for(new D("of",L,F,m),()=>N(F))}forIn(a,m,N,L=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(a,(0,t._)`Object.keys(${m})`,N);const F=this._scope.toName(a);return this._for(new D("in",L,F,m),()=>N(F))}endFor(){return this._endBlockNode($)}label(a){return this._leafNode(new l(a))}break(a){return this._leafNode(new d(a))}return(a){const m=new C;if(this._blockNode(m),this.code(a),m.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(a,m,N){if(!m&&!N)throw new Error('CodeGen: "try" without "catch" and "finally"');const L=new A;if(this._blockNode(L),this.code(a),m){const F=this.name("e");this._currNode=L.catch=new W(F),m(F)}return N&&(this._currNode=L.finally=new G,this.code(N)),this._endBlockNode(W,G)}throw(a){return this._leafNode(new p(a))}block(a,m){return this._blockStarts.push(this._nodes.length),a&&this.code(a).endBlock(m),this}endBlock(a){const m=this._blockStarts.pop();if(m===void 0)throw new Error("CodeGen: not in self-balancing block");const N=this._nodes.length-m;if(N<0||a!==void 0&&N!==a)throw new Error(`CodeGen: wrong number of nodes: ${N} vs ${a} expected`);return this._nodes.length=m,this}func(a,m=t.nil,N,L){return this._blockNode(new E(a,m,N)),L&&this.code(L).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(a=1){for(;a-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(a){return this._currNode.nodes.push(a),this}_blockNode(a){this._currNode.nodes.push(a),this._nodes.push(a)}_endBlockNode(a,m){const N=this._currNode;if(N instanceof a||m&&N instanceof m)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${m?`${a.kind}/${m.kind}`:a.kind}"`)}_elseNode(a){const m=this._currNode;if(!(m instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=m.else=a,this}get _root(){return this._nodes[0]}get _currNode(){const a=this._nodes;return a[a.length-1]}set _currNode(a){const m=this._nodes;m[m.length-1]=a}}e.CodeGen=ie;function Y(T,a){for(const m in a)T[m]=(T[m]||0)+(a[m]||0);return T}function Pe(T,a){return a instanceof t._CodeOrName?Y(T,a.names):T}function fe(T,a,m){if(T instanceof t.Name)return N(T);if(!L(T))return T;return new t._Code(T._items.reduce((F,K)=>(K instanceof t.Name&&(K=N(K)),K instanceof t._Code?F.push(...K._items):F.push(K),F),[]));function N(F){const K=m[F.str];return K===void 0||a[F.str]!==1?F:(delete a[F.str],K)}function L(F){return F instanceof t._Code&&F._items.some(K=>K instanceof t.Name&&a[K.str]===1&&m[K.str]!==void 0)}}function Xe(T,a){for(const m in a)T[m]=(T[m]||0)-(a[m]||0)}function et(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${j(T)}`}e.not=et;const pt=v(e.operators.AND);function It(...T){return T.reduce(pt)}e.and=It;const ht=v(e.operators.OR);function M(...T){return T.reduce(ht)}e.or=M;function v(T){return(a,m)=>a===t.nil?m:m===t.nil?a:(0,t._)`${j(a)} ${T} ${j(m)}`}function j(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(B);var X={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=B,r=Yt;function n(E){const C={};for(const A of E)C[A]=!0;return C}e.toHash=n;function s(E,C){return typeof C=="boolean"?C:Object.keys(C).length===0?!0:(i(E,C),!o(C,E.self.RULES.all))}e.alwaysValidSchema=s;function i(E,C=E.schema){const{opts:A,self:W}=E;if(!A.strictSchema||typeof C=="boolean")return;const G=W.RULES.keywords;for(const ie in C)G[ie]||D(E,`unknown keyword: "${ie}"`)}e.checkUnknownRules=i;function o(E,C){if(typeof E=="boolean")return!E;for(const A in E)if(C[A])return!0;return!1}e.schemaHasRules=o;function u(E,C){if(typeof E=="boolean")return!E;for(const A in E)if(A!=="$ref"&&C.all[A])return!0;return!1}e.schemaHasRulesButRef=u;function f({topSchemaRef:E,schemaPath:C},A,W,G){if(!G){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,t._)`${A}`}return(0,t._)`${E}${C}${(0,t.getProperty)(W)}`}e.schemaRefOrVal=f;function l(E){return _(decodeURIComponent(E))}e.unescapeFragment=l;function d(E){return encodeURIComponent(p(E))}e.escapeFragment=d;function p(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=p;function _(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=_;function b(E,C){if(Array.isArray(E))for(const A of E)C(A);else C(E)}e.eachItem=b;function P({mergeNames:E,mergeToName:C,mergeValues:A,resultToName:W}){return(G,ie,Y,Pe)=>{const fe=Y===void 0?ie:Y instanceof t.Name?(ie instanceof t.Name?E(G,ie,Y):C(G,ie,Y),Y):ie instanceof t.Name?(C(G,Y,ie),ie):A(ie,Y);return Pe===t.Name&&!(fe instanceof t.Name)?W(G,fe):fe}}e.mergeEvaluated={props:P({mergeNames:(E,C,A)=>E.if((0,t._)`${A} !== true && ${C} !== undefined`,()=>{E.if((0,t._)`${C} === true`,()=>E.assign(A,!0),()=>E.assign(A,(0,t._)`${A} || {}`).code((0,t._)`Object.assign(${A}, ${C})`))}),mergeToName:(E,C,A)=>E.if((0,t._)`${A} !== true`,()=>{C===!0?E.assign(A,!0):(E.assign(A,(0,t._)`${A} || {}`),w(E,A,C))}),mergeValues:(E,C)=>E===!0?!0:{...E,...C},resultToName:O}),items:P({mergeNames:(E,C,A)=>E.if((0,t._)`${A} !== true && ${C} !== undefined`,()=>E.assign(A,(0,t._)`${C} === true ? true : ${A} > ${C} ? ${A} : ${C}`)),mergeToName:(E,C,A)=>E.if((0,t._)`${A} !== true`,()=>E.assign(A,C===!0?!0:(0,t._)`${A} > ${C} ? ${A} : ${C}`)),mergeValues:(E,C)=>E===!0?!0:Math.max(E,C),resultToName:(E,C)=>E.var("items",C)})};function O(E,C){if(C===!0)return E.var("props",!0);const A=E.var("props",(0,t._)`{}`);return C!==void 0&&w(E,A,C),A}e.evaluatedPropsToName=O;function w(E,C,A){Object.keys(A).forEach(W=>E.assign((0,t._)`${C}${(0,t.getProperty)(W)}`,!0))}e.setEvaluated=w;const g={};function $(E,C){return E.scopeValue("func",{ref:C,code:g[C.code]||(g[C.code]=new r._Code(C.code))})}e.useFunc=$;var S;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(S=e.Type||(e.Type={}));function I(E,C,A){if(E instanceof t.Name){const W=C===S.Num;return A?W?(0,t._)`"[" + ${E} + "]"`:(0,t._)`"['" + ${E} + "']"`:W?(0,t._)`"/" + ${E}`:(0,t._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,t.getProperty)(E).toString():"/"+p(E)}e.getErrorPath=I;function D(E,C,A=E.opts.strictSchema){if(A){if(C=`strict mode: ${C}`,A===!0)throw new Error(C);E.self.logger.warn(C)}}e.checkStrictMode=D})(X);var We={};Object.defineProperty(We,"__esModule",{value:!0});const ge=B,Sa={data:new ge.Name("data"),valCxt:new ge.Name("valCxt"),instancePath:new ge.Name("instancePath"),parentData:new ge.Name("parentData"),parentDataProperty:new ge.Name("parentDataProperty"),rootData:new ge.Name("rootData"),dynamicAnchors:new ge.Name("dynamicAnchors"),vErrors:new ge.Name("vErrors"),errors:new ge.Name("errors"),this:new ge.Name("this"),self:new ge.Name("self"),scope:new ge.Name("scope"),json:new ge.Name("json"),jsonPos:new ge.Name("jsonPos"),jsonLen:new ge.Name("jsonLen"),jsonPart:new ge.Name("jsonPart")};We.default=Sa;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=B,r=X,n=We;e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:g})=>g?(0,t.str)`"${w}" keyword must be ${g} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function s(w,g=e.keywordError,$,S){const{it:I}=w,{gen:D,compositeRule:E,allErrors:C}=I,A=p(w,g,$);S??(E||C)?f(D,A):l(I,(0,t._)`[${A}]`)}e.reportError=s;function i(w,g=e.keywordError,$){const{it:S}=w,{gen:I,compositeRule:D,allErrors:E}=S,C=p(w,g,$);f(I,C),D||E||l(S,n.default.vErrors)}e.reportExtraError=i;function o(w,g){w.assign(n.default.errors,g),w.if((0,t._)`${n.default.vErrors} !== null`,()=>w.if(g,()=>w.assign((0,t._)`${n.default.vErrors}.length`,g),()=>w.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function u({gen:w,keyword:g,schemaValue:$,data:S,errsCount:I,it:D}){if(I===void 0)throw new Error("ajv implementation error");const E=w.name("err");w.forRange("i",I,n.default.errors,C=>{w.const(E,(0,t._)`${n.default.vErrors}[${C}]`),w.if((0,t._)`${E}.instancePath === undefined`,()=>w.assign((0,t._)`${E}.instancePath`,(0,t.strConcat)(n.default.instancePath,D.errorPath))),w.assign((0,t._)`${E}.schemaPath`,(0,t.str)`${D.errSchemaPath}/${g}`),D.opts.verbose&&(w.assign((0,t._)`${E}.schema`,$),w.assign((0,t._)`${E}.data`,S))})}e.extendErrors=u;function f(w,g){const $=w.const("err",g);w.if((0,t._)`${n.default.vErrors} === null`,()=>w.assign(n.default.vErrors,(0,t._)`[${$}]`),(0,t._)`${n.default.vErrors}.push(${$})`),w.code((0,t._)`${n.default.errors}++`)}function l(w,g){const{gen:$,validateName:S,schemaEnv:I}=w;I.$async?$.throw((0,t._)`new ${w.ValidationError}(${g})`):($.assign((0,t._)`${S}.errors`,g),$.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(w,g,$){const{createErrors:S}=w.it;return S===!1?(0,t._)`{}`:_(w,g,$)}function _(w,g,$={}){const{gen:S,it:I}=w,D=[b(I,$),P(w,$)];return O(w,g,D),S.object(...D)}function b({errorPath:w},{instancePath:g}){const $=g?(0,t.str)`${w}${(0,r.getErrorPath)(g,r.Type.Str)}`:w;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,$)]}function P({keyword:w,it:{errSchemaPath:g}},{schemaPath:$,parentSchema:S}){let I=S?g:(0,t.str)`${g}/${w}`;return $&&(I=(0,t.str)`${I}${(0,r.getErrorPath)($,r.Type.Str)}`),[d.schemaPath,I]}function O(w,{params:g,message:$},S){const{keyword:I,data:D,schemaValue:E,it:C}=w,{opts:A,propertyName:W,topSchemaRef:G,schemaPath:ie}=C;S.push([d.keyword,I],[d.params,typeof g=="function"?g(w):g||(0,t._)`{}`]),A.messages&&S.push([d.message,typeof $=="function"?$(w):$]),A.verbose&&S.push([d.schema,E],[d.parentSchema,(0,t._)`${G}${ie}`],[n.default.data,D]),W&&S.push([d.propertyName,W])}})(Xt);Object.defineProperty(kt,"__esModule",{value:!0});kt.boolOrEmptySchema=kt.topBoolOrEmptySchema=void 0;const Ta=Xt,Ra=B,ka=We,Oa={message:"boolean schema is false"};function Ca(e){const{gen:t,schema:r,validateName:n}=e;r===!1?Ii(e,!1):typeof r=="object"&&r.$async===!0?t.return(ka.default.data):(t.assign((0,Ra._)`${n}.errors`,null),t.return(!0))}kt.topBoolOrEmptySchema=Ca;function Na(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Ii(e)):r.var(t,!0)}kt.boolOrEmptySchema=Na;function Ii(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Ta.reportError)(s,Oa,void 0,t)}var er={},ut={};Object.defineProperty(ut,"__esModule",{value:!0});ut.getRules=ut.isJSONType=void 0;const Ia=["string","number","integer","boolean","null","object","array"],ja=new Set(Ia);function Aa(e){return typeof e=="string"&&ja.has(e)}ut.isJSONType=Aa;function Da(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}ut.getRules=Da;var Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be.shouldUseRule=Be.shouldUseGroup=Be.schemaHasRulesForType=void 0;function Ma({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&ji(e,n)}Be.schemaHasRulesForType=Ma;function ji(e,t){return t.rules.some(r=>Ai(e,r))}Be.shouldUseGroup=ji;function Ai(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Be.shouldUseRule=Ai;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=ut,r=Be,n=Xt,s=B,i=X;var o;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(o=e.DataType||(e.DataType={}));function u(S){const I=f(S.type);if(I.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!I.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&I.push("null")}return I}e.getSchemaTypes=u;function f(S){const I=Array.isArray(S)?S:S?[S]:[];if(I.every(t.isJSONType))return I;throw new Error("type must be JSONType or JSONType[]: "+I.join(","))}e.getJSONTypes=f;function l(S,I){const{gen:D,data:E,opts:C}=S,A=p(I,C.coerceTypes),W=I.length>0&&!(A.length===0&&I.length===1&&(0,r.schemaHasRulesForType)(S,I[0]));if(W){const G=O(I,E,C.strictNumbers,o.Wrong);D.if(G,()=>{A.length?_(S,I,A):g(S)})}return W}e.coerceAndCheckDataType=l;const d=new Set(["string","number","integer","boolean","null"]);function p(S,I){return I?S.filter(D=>d.has(D)||I==="array"&&D==="array"):[]}function _(S,I,D){const{gen:E,data:C,opts:A}=S,W=E.let("dataType",(0,s._)`typeof ${C}`),G=E.let("coerced",(0,s._)`undefined`);A.coerceTypes==="array"&&E.if((0,s._)`${W} == 'object' && Array.isArray(${C}) && ${C}.length == 1`,()=>E.assign(C,(0,s._)`${C}[0]`).assign(W,(0,s._)`typeof ${C}`).if(O(I,C,A.strictNumbers),()=>E.assign(G,C))),E.if((0,s._)`${G} !== undefined`);for(const Y of D)(d.has(Y)||Y==="array"&&A.coerceTypes==="array")&&ie(Y);E.else(),g(S),E.endIf(),E.if((0,s._)`${G} !== undefined`,()=>{E.assign(C,G),b(S,G)});function ie(Y){switch(Y){case"string":E.elseIf((0,s._)`${W} == "number" || ${W} == "boolean"`).assign(G,(0,s._)`"" + ${C}`).elseIf((0,s._)`${C} === null`).assign(G,(0,s._)`""`);return;case"number":E.elseIf((0,s._)`${W} == "boolean" || ${C} === null
726
- || (${W} == "string" && ${C} && ${C} == +${C})`).assign(G,(0,s._)`+${C}`);return;case"integer":E.elseIf((0,s._)`${W} === "boolean" || ${C} === null
727
- || (${W} === "string" && ${C} && ${C} == +${C} && !(${C} % 1))`).assign(G,(0,s._)`+${C}`);return;case"boolean":E.elseIf((0,s._)`${C} === "false" || ${C} === 0 || ${C} === null`).assign(G,!1).elseIf((0,s._)`${C} === "true" || ${C} === 1`).assign(G,!0);return;case"null":E.elseIf((0,s._)`${C} === "" || ${C} === 0 || ${C} === false`),E.assign(G,null);return;case"array":E.elseIf((0,s._)`${W} === "string" || ${W} === "number"
728
- || ${W} === "boolean" || ${C} === null`).assign(G,(0,s._)`[${C}]`)}}}function b({gen:S,parentData:I,parentDataProperty:D},E){S.if((0,s._)`${I} !== undefined`,()=>S.assign((0,s._)`${I}[${D}]`,E))}function P(S,I,D,E=o.Correct){const C=E===o.Correct?s.operators.EQ:s.operators.NEQ;let A;switch(S){case"null":return(0,s._)`${I} ${C} null`;case"array":A=(0,s._)`Array.isArray(${I})`;break;case"object":A=(0,s._)`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;break;case"integer":A=W((0,s._)`!(${I} % 1) && !isNaN(${I})`);break;case"number":A=W();break;default:return(0,s._)`typeof ${I} ${C} ${S}`}return E===o.Correct?A:(0,s.not)(A);function W(G=s.nil){return(0,s.and)((0,s._)`typeof ${I} == "number"`,G,D?(0,s._)`isFinite(${I})`:s.nil)}}e.checkDataType=P;function O(S,I,D,E){if(S.length===1)return P(S[0],I,D,E);let C;const A=(0,i.toHash)(S);if(A.array&&A.object){const W=(0,s._)`typeof ${I} != "object"`;C=A.null?W:(0,s._)`!${I} || ${W}`,delete A.null,delete A.array,delete A.object}else C=s.nil;A.number&&delete A.integer;for(const W in A)C=(0,s.and)(C,P(W,I,D,E));return C}e.checkDataTypes=O;const w={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:I})=>typeof S=="string"?(0,s._)`{type: ${S}}`:(0,s._)`{type: ${I}}`};function g(S){const I=$(S);(0,n.reportError)(I,w)}e.reportTypeError=g;function $(S){const{gen:I,data:D,schema:E}=S,C=(0,i.schemaRefOrVal)(S,E,"type");return{gen:I,keyword:"type",data:D,schema:E.type,schemaCode:C,schemaValue:C,parentSchema:E,params:{},it:S}}})(er);var qr={};Object.defineProperty(qr,"__esModule",{value:!0});qr.assignDefaults=void 0;const bt=B,La=X;function Fa(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const s in r)Rs(e,s,r[s].default);else t==="array"&&Array.isArray(n)&&n.forEach((s,i)=>Rs(e,i,s.default))}qr.assignDefaults=Fa;function Rs(e,t,r){const{gen:n,compositeRule:s,data:i,opts:o}=e;if(r===void 0)return;const u=(0,bt._)`${i}${(0,bt.getProperty)(t)}`;if(s){(0,La.checkStrictMode)(e,`default is ignored for: ${u}`);return}let f=(0,bt._)`${u} === undefined`;o.useDefaults==="empty"&&(f=(0,bt._)`${f} || ${u} === null || ${u} === ""`),n.if(f,(0,bt._)`${u} = ${(0,bt.stringify)(r)}`)}var qe={},H={};Object.defineProperty(H,"__esModule",{value:!0});H.validateUnion=H.validateArray=H.usePattern=H.callValidateCode=H.schemaProperties=H.allSchemaProperties=H.noPropertyInData=H.propertyInData=H.isOwnProperty=H.hasPropFunc=H.reportMissingProp=H.checkMissingProp=H.checkReportMissingProp=void 0;const re=B,vn=X,Je=We,qa=X;function Ua(e,t){const{gen:r,data:n,it:s}=e;r.if(En(r,n,t,s.opts.ownProperties),()=>{e.setParams({missingProperty:(0,re._)`${t}`},!0),e.error()})}H.checkReportMissingProp=Ua;function za({gen:e,data:t,it:{opts:r}},n,s){return(0,re.or)(...n.map(i=>(0,re.and)(En(e,t,i,r.ownProperties),(0,re._)`${s} = ${i}`)))}H.checkMissingProp=za;function Va(e,t){e.setParams({missingProperty:t},!0),e.error()}H.reportMissingProp=Va;function Di(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,re._)`Object.prototype.hasOwnProperty`})}H.hasPropFunc=Di;function bn(e,t,r){return(0,re._)`${Di(e)}.call(${t}, ${r})`}H.isOwnProperty=bn;function Wa(e,t,r,n){const s=(0,re._)`${t}${(0,re.getProperty)(r)} !== undefined`;return n?(0,re._)`${s} && ${bn(e,t,r)}`:s}H.propertyInData=Wa;function En(e,t,r,n){const s=(0,re._)`${t}${(0,re.getProperty)(r)} === undefined`;return n?(0,re.or)(s,(0,re.not)(bn(e,t,r))):s}H.noPropertyInData=En;function Mi(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}H.allSchemaProperties=Mi;function xa(e,t){return Mi(t).filter(r=>!(0,vn.alwaysValidSchema)(e,t[r]))}H.schemaProperties=xa;function Ha({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:i},it:o},u,f,l){const d=l?(0,re._)`${e}, ${t}, ${n}${s}`:t,p=[[Je.default.instancePath,(0,re.strConcat)(Je.default.instancePath,i)],[Je.default.parentData,o.parentData],[Je.default.parentDataProperty,o.parentDataProperty],[Je.default.rootData,Je.default.rootData]];o.opts.dynamicRef&&p.push([Je.default.dynamicAnchors,Je.default.dynamicAnchors]);const _=(0,re._)`${d}, ${r.object(...p)}`;return f!==re.nil?(0,re._)`${u}.call(${f}, ${_})`:(0,re._)`${u}(${_})`}H.callValidateCode=Ha;const Ba=(0,re._)`new RegExp`;function Ga({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,i=s(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,re._)`${s.code==="new RegExp"?Ba:(0,qa.useFunc)(e,s)}(${r}, ${n})`})}H.usePattern=Ga;function Ka(e){const{gen:t,data:r,keyword:n,it:s}=e,i=t.name("valid");if(s.allErrors){const u=t.let("valid",!0);return o(()=>t.assign(u,!1)),u}return t.var(i,!0),o(()=>t.break()),i;function o(u){const f=t.const("len",(0,re._)`${r}.length`);t.forRange("i",0,f,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:vn.Type.Num},i),t.if((0,re.not)(i),u)})}}H.validateArray=Ka;function Ja(e){const{gen:t,schema:r,keyword:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(f=>(0,vn.alwaysValidSchema)(s,f))&&!s.opts.unevaluated)return;const o=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((f,l)=>{const d=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(o,(0,re._)`${o} || ${u}`),e.mergeValidEvaluated(d,u)||t.if((0,re.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}H.validateUnion=Ja;Object.defineProperty(qe,"__esModule",{value:!0});qe.validateKeywordUsage=qe.validSchemaType=qe.funcKeywordCode=qe.macroKeywordCode=void 0;const $e=B,ot=We,Qa=H,Ya=Xt;function Za(e,t){const{gen:r,keyword:n,schema:s,parentSchema:i,it:o}=e,u=t.macro.call(o.self,s,i,o),f=Li(r,n,u);o.opts.validateSchema!==!1&&o.self.validateSchema(u,!0);const l=r.name("valid");e.subschema({schema:u,schemaPath:$e.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:f,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}qe.macroKeywordCode=Za;function Xa(e,t){var r;const{gen:n,keyword:s,schema:i,parentSchema:o,$data:u,it:f}=e;tc(f,t);const l=!u&&t.compile?t.compile.call(f.self,i,o,f):t.validate,d=Li(n,s,l),p=n.let("valid");e.block$data(p,_),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function _(){if(t.errors===!1)O(),t.modifying&&ks(e),w(()=>e.error());else{const g=t.async?b():P();t.modifying&&ks(e),w(()=>ec(e,g))}}function b(){const g=n.let("ruleErrs",null);return n.try(()=>O((0,$e._)`await `),$=>n.assign(p,!1).if((0,$e._)`${$} instanceof ${f.ValidationError}`,()=>n.assign(g,(0,$e._)`${$}.errors`),()=>n.throw($))),g}function P(){const g=(0,$e._)`${d}.errors`;return n.assign(g,null),O($e.nil),g}function O(g=t.async?(0,$e._)`await `:$e.nil){const $=f.opts.passContext?ot.default.this:ot.default.self,S=!("compile"in t&&!u||t.schema===!1);n.assign(p,(0,$e._)`${g}${(0,Qa.callValidateCode)(e,d,$,S)}`,t.modifying)}function w(g){var $;n.if((0,$e.not)(($=t.valid)!==null&&$!==void 0?$:p),g)}}qe.funcKeywordCode=Xa;function ks(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,$e._)`${n.parentData}[${n.parentDataProperty}]`))}function ec(e,t){const{gen:r}=e;r.if((0,$e._)`Array.isArray(${t})`,()=>{r.assign(ot.default.vErrors,(0,$e._)`${ot.default.vErrors} === null ? ${t} : ${ot.default.vErrors}.concat(${t})`).assign(ot.default.errors,(0,$e._)`${ot.default.vErrors}.length`),(0,Ya.extendErrors)(e)},()=>e.error())}function tc({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Li(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,$e.stringify)(r)})}function rc(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}qe.validSchemaType=rc;function nc({schema:e,opts:t,self:r,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const o=s.dependencies;if(o!=null&&o.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema&&!s.validateSchema(e[i])){const f=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(f);else throw new Error(f)}}qe.validateKeywordUsage=nc;var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.extendSubschemaMode=Ze.extendSubschemaData=Ze.getSubschema=void 0;const Fe=B,Fi=X;function sc(e,{keyword:t,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,Fe._)`${e.schemaPath}${(0,Fe.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,Fe._)`${e.schemaPath}${(0,Fe.getProperty)(t)}${(0,Fe.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Fi.escapeFragment)(r)}`}}if(n!==void 0){if(s===void 0||i===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:o,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Ze.getSubschema=sc;function ic(e,t,{dataProp:r,dataPropType:n,data:s,dataTypes:i,propertyName:o}){if(s!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=t;if(r!==void 0){const{errorPath:l,dataPathArr:d,opts:p}=t,_=u.let("data",(0,Fe._)`${t.data}${(0,Fe.getProperty)(r)}`,!0);f(_),e.errorPath=(0,Fe.str)`${l}${(0,Fi.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,Fe._)`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(s!==void 0){const l=s instanceof Fe.Name?s:u.let("data",s,!0);f(l),o!==void 0&&(e.propertyName=o)}i&&(e.dataTypes=i);function f(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}Ze.extendSubschemaData=ic;function oc(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(e.compositeRule=n),s!==void 0&&(e.createErrors=s),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Ze.extendSubschemaMode=oc;var ye={},qi=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},Ui={exports:{}},Ye=Ui.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},s=r.post||function(){};yr(t,n,s,e,"",e)};Ye.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ye.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ye.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ye.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function yr(e,t,r,n,s,i,o,u,f,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,s,i,o,u,f,l);for(var d in n){var p=n[d];if(Array.isArray(p)){if(d in Ye.arrayKeywords)for(var _=0;_<p.length;_++)yr(e,t,r,p[_],s+"/"+d+"/"+_,i,s,d,n,_)}else if(d in Ye.propsKeywords){if(p&&typeof p=="object")for(var b in p)yr(e,t,r,p[b],s+"/"+d+"/"+ac(b),i,s,d,n,b)}else(d in Ye.keywords||e.allKeys&&!(d in Ye.skipKeywords))&&yr(e,t,r,p,s+"/"+d,i,s,d,n)}r(n,s,i,o,u,f,l)}}function ac(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var cc=Ui.exports;Object.defineProperty(ye,"__esModule",{value:!0});ye.getSchemaRefs=ye.resolveUrl=ye.normalizeId=ye._getFullPath=ye.getFullPath=ye.inlineRef=void 0;const lc=X,uc=qi,dc=cc,fc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function pc(e,t=!0){return typeof e=="boolean"?!0:t===!0?!an(e):t?zi(e)<=t:!1}ye.inlineRef=pc;const hc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function an(e){for(const t in e){if(hc.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(an)||typeof r=="object"&&an(r))return!0}return!1}function zi(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!fc.has(r)&&(typeof e[r]=="object"&&(0,lc.eachItem)(e[r],n=>t+=zi(n)),t===1/0))return 1/0}return t}function Vi(e,t="",r){r!==!1&&(t=Rt(t));const n=e.parse(t);return Wi(e,n)}ye.getFullPath=Vi;function Wi(e,t){return e.serialize(t).split("#")[0]+"#"}ye._getFullPath=Wi;const mc=/#\/?$/;function Rt(e){return e?e.replace(mc,""):""}ye.normalizeId=Rt;function yc(e,t,r){return r=Rt(r),e.resolve(t,r)}ye.resolveUrl=yc;const gc=/^[a-z_][-a-z0-9._]*$/i;function $c(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,s=Rt(e[r]||t),i={"":s},o=Vi(n,s,!1),u={},f=new Set;return dc(e,{allKeys:!0},(p,_,b,P)=>{if(P===void 0)return;const O=o+_;let w=i[P];typeof p[r]=="string"&&(w=g.call(this,p[r])),$.call(this,p.$anchor),$.call(this,p.$dynamicAnchor),i[_]=w;function g(S){const I=this.opts.uriResolver.resolve;if(S=Rt(w?I(w,S):S),f.has(S))throw d(S);f.add(S);let D=this.refs[S];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?l(p,D.schema,S):S!==Rt(O)&&(S[0]==="#"?(l(p,u[S],S),u[S]=p):this.refs[S]=O),S}function $(S){if(typeof S=="string"){if(!gc.test(S))throw new Error(`invalid anchor "${S}"`);g.call(this,`#${S}`)}}}),u;function l(p,_,b){if(_!==void 0&&!uc(p,_))throw d(b)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}ye.getSchemaRefs=$c;Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getData=Ne.KeywordCxt=Ne.validateFunctionCode=void 0;const xi=kt,Os=er,Pn=Be,Tr=er,_c=qr,Ht=qe,Kr=Ze,q=B,V=We,wc=ye,Ge=X,Vt=Xt;function vc(e){if(Gi(e)&&(Ki(e),Bi(e))){Pc(e);return}Hi(e,()=>(0,xi.topBoolOrEmptySchema)(e))}Ne.validateFunctionCode=vc;function Hi({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},i){s.code.es5?e.func(t,(0,q._)`${V.default.data}, ${V.default.valCxt}`,n.$async,()=>{e.code((0,q._)`"use strict"; ${Cs(r,s)}`),Ec(e,s),e.code(i)}):e.func(t,(0,q._)`${V.default.data}, ${bc(s)}`,n.$async,()=>e.code(Cs(r,s)).code(i))}function bc(e){return(0,q._)`{${V.default.instancePath}="", ${V.default.parentData}, ${V.default.parentDataProperty}, ${V.default.rootData}=${V.default.data}${e.dynamicRef?(0,q._)`, ${V.default.dynamicAnchors}={}`:q.nil}}={}`}function Ec(e,t){e.if(V.default.valCxt,()=>{e.var(V.default.instancePath,(0,q._)`${V.default.valCxt}.${V.default.instancePath}`),e.var(V.default.parentData,(0,q._)`${V.default.valCxt}.${V.default.parentData}`),e.var(V.default.parentDataProperty,(0,q._)`${V.default.valCxt}.${V.default.parentDataProperty}`),e.var(V.default.rootData,(0,q._)`${V.default.valCxt}.${V.default.rootData}`),t.dynamicRef&&e.var(V.default.dynamicAnchors,(0,q._)`${V.default.valCxt}.${V.default.dynamicAnchors}`)},()=>{e.var(V.default.instancePath,(0,q._)`""`),e.var(V.default.parentData,(0,q._)`undefined`),e.var(V.default.parentDataProperty,(0,q._)`undefined`),e.var(V.default.rootData,V.default.data),t.dynamicRef&&e.var(V.default.dynamicAnchors,(0,q._)`{}`)})}function Pc(e){const{schema:t,opts:r,gen:n}=e;Hi(e,()=>{r.$comment&&t.$comment&&Qi(e),Oc(e),n.let(V.default.vErrors,null),n.let(V.default.errors,0),r.unevaluated&&Sc(e),Ji(e),Ic(e)})}function Sc(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,q._)`${r}.evaluated`),t.if((0,q._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,q._)`${e.evaluated}.props`,(0,q._)`undefined`)),t.if((0,q._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,q._)`${e.evaluated}.items`,(0,q._)`undefined`))}function Cs(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,q._)`/*# sourceURL=${r} */`:q.nil}function Tc(e,t){if(Gi(e)&&(Ki(e),Bi(e))){Rc(e,t);return}(0,xi.boolOrEmptySchema)(e,t)}function Bi({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function Gi(e){return typeof e.schema!="boolean"}function Rc(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&Qi(e),Cc(e),Nc(e);const i=n.const("_errs",V.default.errors);Ji(e,i),n.var(t,(0,q._)`${i} === ${V.default.errors}`)}function Ki(e){(0,Ge.checkUnknownRules)(e),kc(e)}function Ji(e,t){if(e.opts.jtd)return Ns(e,[],!1,t);const r=(0,Os.getSchemaTypes)(e.schema),n=(0,Os.coerceAndCheckDataType)(e,r);Ns(e,r,!n,t)}function kc(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Ge.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Oc(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ge.checkStrictMode)(e,"default is ignored in the schema root")}function Cc(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,wc.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Nc(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Qi({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const i=r.$comment;if(s.$comment===!0)e.code((0,q._)`${V.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){const o=(0,q.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,q._)`${V.default.self}.opts.$comment(${i}, ${o}, ${u}.schema)`)}}function Ic(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:i}=e;r.$async?t.if((0,q._)`${V.default.errors} === 0`,()=>t.return(V.default.data),()=>t.throw((0,q._)`new ${s}(${V.default.vErrors})`)):(t.assign((0,q._)`${n}.errors`,V.default.vErrors),i.unevaluated&&jc(e),t.return((0,q._)`${V.default.errors} === 0`))}function jc({gen:e,evaluated:t,props:r,items:n}){r instanceof q.Name&&e.assign((0,q._)`${t}.props`,r),n instanceof q.Name&&e.assign((0,q._)`${t}.items`,n)}function Ns(e,t,r,n){const{gen:s,schema:i,data:o,allErrors:u,opts:f,self:l}=e,{RULES:d}=l;if(i.$ref&&(f.ignoreKeywordsWithRef||!(0,Ge.schemaHasRulesButRef)(i,d))){s.block(()=>Xi(e,"$ref",d.all.$ref.definition));return}f.jtd||Ac(e,t),s.block(()=>{for(const _ of d.rules)p(_);p(d.post)});function p(_){(0,Pn.shouldUseGroup)(i,_)&&(_.type?(s.if((0,Tr.checkDataType)(_.type,o,f.strictNumbers)),Is(e,_),t.length===1&&t[0]===_.type&&r&&(s.else(),(0,Tr.reportTypeError)(e)),s.endIf()):Is(e,_),u||s.if((0,q._)`${V.default.errors} === ${n||0}`))}}function Is(e,t){const{gen:r,schema:n,opts:{useDefaults:s}}=e;s&&(0,_c.assignDefaults)(e,t.type),r.block(()=>{for(const i of t.rules)(0,Pn.shouldUseRule)(n,i)&&Xi(e,i.keyword,i.definition,t.type)})}function Ac(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Dc(e,t),e.opts.allowUnionTypes||Mc(e,t),Lc(e,e.dataTypes))}function Dc(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Yi(e.dataTypes,r)||Sn(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),qc(e,t)}}function Mc(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Sn(e,"use allowUnionTypes to allow union type keyword")}function Lc(e,t){const r=e.self.RULES.all;for(const n in r){const s=r[n];if(typeof s=="object"&&(0,Pn.shouldUseRule)(e.schema,s)){const{type:i}=s.definition;i.length&&!i.some(o=>Fc(t,o))&&Sn(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function Fc(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Yi(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function qc(e,t){const r=[];for(const n of e.dataTypes)Yi(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Sn(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Ge.checkStrictMode)(e,t,e.opts.strictTypes)}class Zi{constructor(t,r,n){if((0,Ht.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ge.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",eo(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ht.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",V.default.errors))}result(t,r,n){this.failResult((0,q.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,q.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,q._)`${r} !== undefined && (${(0,q.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Vt.reportExtraError:Vt.reportError)(this,this.def.error,r)}$dataError(){(0,Vt.reportError)(this,this.def.$dataError||Vt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Vt.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=q.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=q.nil,r=q.nil){if(!this.$data)return;const{gen:n,schemaCode:s,schemaType:i,def:o}=this;n.if((0,q.or)((0,q._)`${s} === undefined`,r)),t!==q.nil&&n.assign(t,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==q.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:s,it:i}=this;return(0,q.or)(o(),u());function o(){if(n.length){if(!(r instanceof q.Name))throw new Error("ajv implementation error");const f=Array.isArray(n)?n:[n];return(0,q._)`${(0,Tr.checkDataTypes)(f,r,i.opts.strictNumbers,Tr.DataType.Wrong)}`}return q.nil}function u(){if(s.validateSchema){const f=t.scopeValue("validate$data",{ref:s.validateSchema});return(0,q._)`!${f}(${r})`}return q.nil}}subschema(t,r){const n=(0,Kr.getSubschema)(this.it,t);(0,Kr.extendSubschemaData)(n,this.it,t),(0,Kr.extendSubschemaMode)(n,t);const s={...this.it,...n,items:void 0,props:void 0};return Tc(s,r),s}mergeEvaluated(t,r){const{it:n,gen:s}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Ge.mergeEvaluated.props(s,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Ge.mergeEvaluated.items(s,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(r,()=>this.mergeEvaluated(t,q.Name)),!0}}Ne.KeywordCxt=Zi;function Xi(e,t,r,n){const s=new Zi(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,Ht.funcKeywordCode)(s,r):"macro"in r?(0,Ht.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,Ht.funcKeywordCode)(s,r)}const Uc=/^\/(?:[^~]|~0|~1)*$/,zc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function eo(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,i;if(e==="")return V.default.rootData;if(e[0]==="/"){if(!Uc.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,i=V.default.rootData}else{const l=zc.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);const d=+l[1];if(s=l[2],s==="#"){if(d>=t)throw new Error(f("property/index",d));return n[t-d]}if(d>t)throw new Error(f("data",d));if(i=r[t-d],!s)return i}let o=i;const u=s.split("/");for(const l of u)l&&(i=(0,q._)`${i}${(0,q.getProperty)((0,Ge.unescapeJsonPointer)(l))}`,o=(0,q._)`${o} && ${i}`);return o;function f(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}Ne.getData=eo;var tr={};Object.defineProperty(tr,"__esModule",{value:!0});class Vc extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}tr.default=Vc;var rr={};Object.defineProperty(rr,"__esModule",{value:!0});const Jr=ye;class Wc extends Error{constructor(t,r,n,s){super(s||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Jr.resolveUrl)(t,r,n),this.missingSchema=(0,Jr.normalizeId)((0,Jr.getFullPath)(t,this.missingRef))}}rr.default=Wc;var ve={};Object.defineProperty(ve,"__esModule",{value:!0});ve.resolveSchema=ve.getCompilingSchema=ve.resolveRef=ve.compileSchema=ve.SchemaEnv=void 0;const ke=B,xc=tr,it=We,Ce=ye,js=X,Hc=Ne;class Ur{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Ce.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}ve.SchemaEnv=Ur;function Tn(e){const t=to.call(this,e);if(t)return t;const r=(0,Ce.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,o=new ke.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i});let u;e.$async&&(u=o.scopeValue("Error",{ref:xc.default,code:(0,ke._)`require("ajv/dist/runtime/validation_error").default`}));const f=o.scopeName("validate");e.validateName=f;const l={gen:o,allErrors:this.opts.allErrors,data:it.default.data,parentData:it.default.parentData,parentDataProperty:it.default.parentDataProperty,dataNames:[it.default.data],dataPathArr:[ke.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,ke.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:ke.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ke._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(e),(0,Hc.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);const p=o.toString();d=`${o.scopeRefs(it.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,e));const b=new Function(`${it.default.self}`,`${it.default.scope}`,d)(this,this.scope.get());if(this.scope.value(f,{ref:b}),b.errors=null,b.schema=e.schema,b.schemaEnv=e,e.$async&&(b.$async=!0),this.opts.code.source===!0&&(b.source={validateName:f,validateCode:p,scopeValues:o._values}),this.opts.unevaluated){const{props:P,items:O}=l;b.evaluated={props:P instanceof ke.Name?void 0:P,items:O instanceof ke.Name?void 0:O,dynamicProps:P instanceof ke.Name,dynamicItems:O instanceof ke.Name},b.source&&(b.source.evaluated=(0,ke.stringify)(b.evaluated))}return e.validate=b,e}catch(p){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(e)}}ve.compileSchema=Tn;function Bc(e,t,r){var n;r=(0,Ce.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let i=Jc.call(this,e,r);if(i===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;o&&(i=new Ur({schema:o,schemaId:u,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=Gc.call(this,i)}ve.resolveRef=Bc;function Gc(e){return(0,Ce.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Tn.call(this,e)}function to(e){for(const t of this._compilations)if(Kc(t,e))return t}ve.getCompilingSchema=to;function Kc(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Jc(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||zr.call(this,e,t)}function zr(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Ce._getFullPath)(this.opts.uriResolver,r);let s=(0,Ce.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return Qr.call(this,r,e);const i=(0,Ce.normalizeId)(n),o=this.refs[i]||this.schemas[i];if(typeof o=="string"){const u=zr.call(this,e,o);return typeof(u==null?void 0:u.schema)!="object"?void 0:Qr.call(this,r,u)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||Tn.call(this,o),i===(0,Ce.normalizeId)(t)){const{schema:u}=o,{schemaId:f}=this.opts,l=u[f];return l&&(s=(0,Ce.resolveUrl)(this.opts.uriResolver,s,l)),new Ur({schema:u,schemaId:f,root:e,baseId:s})}return Qr.call(this,r,o)}}ve.resolveSchema=zr;const Qc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Qr(e,{baseId:t,schema:r,root:n}){var s;if(((s=e.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(const u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const f=r[(0,js.unescapeFragment)(u)];if(f===void 0)return;r=f;const l=typeof r=="object"&&r[this.opts.schemaId];!Qc.has(u)&&l&&(t=(0,Ce.resolveUrl)(this.opts.uriResolver,t,l))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,js.schemaHasRulesButRef)(r,this.RULES)){const u=(0,Ce.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=zr.call(this,n,u)}const{schemaId:o}=this.opts;if(i=i||new Ur({schema:r,schemaId:o,root:n,baseId:t}),i.schema!==i.root.schema)return i}const Yc="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Zc="Meta-schema for $data reference (JSON AnySchema extension proposal)",Xc="object",el=["$data"],tl={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},rl=!1,nl={$id:Yc,description:Zc,type:Xc,required:el,properties:tl,additionalProperties:rl};var Rn={},cn={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(da,function(r){function n(){for(var h=arguments.length,c=Array(h),y=0;y<h;y++)c[y]=arguments[y];if(c.length>1){c[0]=c[0].slice(0,-1);for(var k=c.length-1,R=1;R<k;++R)c[R]=c[R].slice(1,-1);return c[k]=c[k].slice(1),c.join("")}else return c[0]}function s(h){return"(?:"+h+")"}function i(h){return h===void 0?"undefined":h===null?"null":Object.prototype.toString.call(h).split(" ").pop().split("]").shift().toLowerCase()}function o(h){return h.toUpperCase()}function u(h){return h!=null?h instanceof Array?h:typeof h.length!="number"||h.split||h.setInterval||h.call?[h]:Array.prototype.slice.call(h):[]}function f(h,c){var y=h;if(c)for(var k in c)y[k]=c[k];return y}function l(h){var c="[A-Za-z]",y="[0-9]",k=n(y,"[A-Fa-f]"),R=s(s("%[EFef]"+k+"%"+k+k+"%"+k+k)+"|"+s("%[89A-Fa-f]"+k+"%"+k+k)+"|"+s("%"+k+k)),U="[\\:\\/\\?\\#\\[\\]\\@]",z="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Z=n(U,z),te=h?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ce=h?"[\\uE000-\\uF8FF]":"[]",J=n(c,y,"[\\-\\.\\_\\~]",te);s(c+n(c,y,"[\\+\\-\\.]")+"*"),s(s(R+"|"+n(J,z,"[\\:]"))+"*");var ee=s(s("25[0-5]")+"|"+s("2[0-4]"+y)+"|"+s("1"+y+y)+"|"+s("0?[1-9]"+y)+"|0?0?"+y),le=s(ee+"\\."+ee+"\\."+ee+"\\."+ee),x=s(k+"{1,4}"),ne=s(s(x+"\\:"+x)+"|"+le),pe=s(s(x+"\\:")+"{6}"+ne),se=s("\\:\\:"+s(x+"\\:")+"{5}"+ne),Ke=s(s(x)+"?\\:\\:"+s(x+"\\:")+"{4}"+ne),De=s(s(s(x+"\\:")+"{0,1}"+x)+"?\\:\\:"+s(x+"\\:")+"{3}"+ne),Me=s(s(s(x+"\\:")+"{0,2}"+x)+"?\\:\\:"+s(x+"\\:")+"{2}"+ne),vt=s(s(s(x+"\\:")+"{0,3}"+x)+"?\\:\\:"+x+"\\:"+ne),nt=s(s(s(x+"\\:")+"{0,4}"+x)+"?\\:\\:"+ne),Te=s(s(s(x+"\\:")+"{0,5}"+x)+"?\\:\\:"+x),Le=s(s(s(x+"\\:")+"{0,6}"+x)+"?\\:\\:"),st=s([pe,se,Ke,De,Me,vt,nt,Te,Le].join("|")),xe=s(s(J+"|"+R)+"+");s("[vV]"+k+"+\\."+n(J,z,"[\\:]")+"+"),s(s(R+"|"+n(J,z))+"*");var Ut=s(R+"|"+n(J,z,"[\\:\\@]"));return s(s(R+"|"+n(J,z,"[\\@]"))+"+"),s(s(Ut+"|"+n("[\\/\\?]",ce))+"*"),{NOT_SCHEME:new RegExp(n("[^]",c,y,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",J,z),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",J,z),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",J,z),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",J,z),"g"),NOT_QUERY:new RegExp(n("[^\\%]",J,z,"[\\:\\@\\/\\?]",ce),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",J,z,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",J,z),"g"),UNRESERVED:new RegExp(J,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",J,Z),"g"),PCT_ENCODED:new RegExp(R,"g"),IPV4ADDRESS:new RegExp("^("+le+")$"),IPV6ADDRESS:new RegExp("^\\[?("+st+")"+s(s("\\%25|\\%(?!"+k+"{2})")+"("+xe+")")+"?\\]?$")}}var d=l(!1),p=l(!0),_=function(){function h(c,y){var k=[],R=!0,U=!1,z=void 0;try{for(var Z=c[Symbol.iterator](),te;!(R=(te=Z.next()).done)&&(k.push(te.value),!(y&&k.length===y));R=!0);}catch(ce){U=!0,z=ce}finally{try{!R&&Z.return&&Z.return()}finally{if(U)throw z}}return k}return function(c,y){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return h(c,y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(h){if(Array.isArray(h)){for(var c=0,y=Array(h.length);c<h.length;c++)y[c]=h[c];return y}else return Array.from(h)},P=2147483647,O=36,w=1,g=26,$=38,S=700,I=72,D=128,E="-",C=/^xn--/,A=/[^\0-\x7E]/,W=/[\x2E\u3002\uFF0E\uFF61]/g,G={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ie=O-w,Y=Math.floor,Pe=String.fromCharCode;function fe(h){throw new RangeError(G[h])}function Xe(h,c){for(var y=[],k=h.length;k--;)y[k]=c(h[k]);return y}function et(h,c){var y=h.split("@"),k="";y.length>1&&(k=y[0]+"@",h=y[1]),h=h.replace(W,".");var R=h.split("."),U=Xe(R,c).join(".");return k+U}function pt(h){for(var c=[],y=0,k=h.length;y<k;){var R=h.charCodeAt(y++);if(R>=55296&&R<=56319&&y<k){var U=h.charCodeAt(y++);(U&64512)==56320?c.push(((R&1023)<<10)+(U&1023)+65536):(c.push(R),y--)}else c.push(R)}return c}var It=function(c){return String.fromCodePoint.apply(String,b(c))},ht=function(c){return c-48<10?c-22:c-65<26?c-65:c-97<26?c-97:O},M=function(c,y){return c+22+75*(c<26)-((y!=0)<<5)},v=function(c,y,k){var R=0;for(c=k?Y(c/S):c>>1,c+=Y(c/y);c>ie*g>>1;R+=O)c=Y(c/ie);return Y(R+(ie+1)*c/(c+$))},j=function(c){var y=[],k=c.length,R=0,U=D,z=I,Z=c.lastIndexOf(E);Z<0&&(Z=0);for(var te=0;te<Z;++te)c.charCodeAt(te)>=128&&fe("not-basic"),y.push(c.charCodeAt(te));for(var ce=Z>0?Z+1:0;ce<k;){for(var J=R,ee=1,le=O;;le+=O){ce>=k&&fe("invalid-input");var x=ht(c.charCodeAt(ce++));(x>=O||x>Y((P-R)/ee))&&fe("overflow"),R+=x*ee;var ne=le<=z?w:le>=z+g?g:le-z;if(x<ne)break;var pe=O-ne;ee>Y(P/pe)&&fe("overflow"),ee*=pe}var se=y.length+1;z=v(R-J,se,J==0),Y(R/se)>P-U&&fe("overflow"),U+=Y(R/se),R%=se,y.splice(R++,0,U)}return String.fromCodePoint.apply(String,y)},T=function(c){var y=[];c=pt(c);var k=c.length,R=D,U=0,z=I,Z=!0,te=!1,ce=void 0;try{for(var J=c[Symbol.iterator](),ee;!(Z=(ee=J.next()).done);Z=!0){var le=ee.value;le<128&&y.push(Pe(le))}}catch(zt){te=!0,ce=zt}finally{try{!Z&&J.return&&J.return()}finally{if(te)throw ce}}var x=y.length,ne=x;for(x&&y.push(E);ne<k;){var pe=P,se=!0,Ke=!1,De=void 0;try{for(var Me=c[Symbol.iterator](),vt;!(se=(vt=Me.next()).done);se=!0){var nt=vt.value;nt>=R&&nt<pe&&(pe=nt)}}catch(zt){Ke=!0,De=zt}finally{try{!se&&Me.return&&Me.return()}finally{if(Ke)throw De}}var Te=ne+1;pe-R>Y((P-U)/Te)&&fe("overflow"),U+=(pe-R)*Te,R=pe;var Le=!0,st=!1,xe=void 0;try{for(var Ut=c[Symbol.iterator](),ms;!(Le=(ms=Ut.next()).done);Le=!0){var ys=ms.value;if(ys<R&&++U>P&&fe("overflow"),ys==R){for(var ir=U,or=O;;or+=O){var ar=or<=z?w:or>=z+g?g:or-z;if(ir<ar)break;var gs=ir-ar,$s=O-ar;y.push(Pe(M(ar+gs%$s,0))),ir=Y(gs/$s)}y.push(Pe(M(ir,0))),z=v(U,Te,ne==x),U=0,++ne}}}catch(zt){st=!0,xe=zt}finally{try{!Le&&Ut.return&&Ut.return()}finally{if(st)throw xe}}++U,++R}return y.join("")},a=function(c){return et(c,function(y){return C.test(y)?j(y.slice(4).toLowerCase()):y})},m=function(c){return et(c,function(y){return A.test(y)?"xn--"+T(y):y})},N={version:"2.1.0",ucs2:{decode:pt,encode:It},decode:j,encode:T,toASCII:m,toUnicode:a},L={};function F(h){var c=h.charCodeAt(0),y=void 0;return c<16?y="%0"+c.toString(16).toUpperCase():c<128?y="%"+c.toString(16).toUpperCase():c<2048?y="%"+(c>>6|192).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase():y="%"+(c>>12|224).toString(16).toUpperCase()+"%"+(c>>6&63|128).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase(),y}function K(h){for(var c="",y=0,k=h.length;y<k;){var R=parseInt(h.substr(y+1,2),16);if(R<128)c+=String.fromCharCode(R),y+=3;else if(R>=194&&R<224){if(k-y>=6){var U=parseInt(h.substr(y+4,2),16);c+=String.fromCharCode((R&31)<<6|U&63)}else c+=h.substr(y,6);y+=6}else if(R>=224){if(k-y>=9){var z=parseInt(h.substr(y+4,2),16),Z=parseInt(h.substr(y+7,2),16);c+=String.fromCharCode((R&15)<<12|(z&63)<<6|Z&63)}else c+=h.substr(y,9);y+=9}else c+=h.substr(y,3),y+=3}return c}function Q(h,c){function y(k){var R=K(k);return R.match(c.UNRESERVED)?R:k}return h.scheme&&(h.scheme=String(h.scheme).replace(c.PCT_ENCODED,y).toLowerCase().replace(c.NOT_SCHEME,"")),h.userinfo!==void 0&&(h.userinfo=String(h.userinfo).replace(c.PCT_ENCODED,y).replace(c.NOT_USERINFO,F).replace(c.PCT_ENCODED,o)),h.host!==void 0&&(h.host=String(h.host).replace(c.PCT_ENCODED,y).toLowerCase().replace(c.NOT_HOST,F).replace(c.PCT_ENCODED,o)),h.path!==void 0&&(h.path=String(h.path).replace(c.PCT_ENCODED,y).replace(h.scheme?c.NOT_PATH:c.NOT_PATH_NOSCHEME,F).replace(c.PCT_ENCODED,o)),h.query!==void 0&&(h.query=String(h.query).replace(c.PCT_ENCODED,y).replace(c.NOT_QUERY,F).replace(c.PCT_ENCODED,o)),h.fragment!==void 0&&(h.fragment=String(h.fragment).replace(c.PCT_ENCODED,y).replace(c.NOT_FRAGMENT,F).replace(c.PCT_ENCODED,o)),h}function oe(h){return h.replace(/^0*(.*)/,"$1")||"0"}function Ie(h,c){var y=h.match(c.IPV4ADDRESS)||[],k=_(y,2),R=k[1];return R?R.split(".").map(oe).join("."):h}function mt(h,c){var y=h.match(c.IPV6ADDRESS)||[],k=_(y,3),R=k[1],U=k[2];if(R){for(var z=R.toLowerCase().split("::").reverse(),Z=_(z,2),te=Z[0],ce=Z[1],J=ce?ce.split(":").map(oe):[],ee=te.split(":").map(oe),le=c.IPV4ADDRESS.test(ee[ee.length-1]),x=le?7:8,ne=ee.length-x,pe=Array(x),se=0;se<x;++se)pe[se]=J[se]||ee[ne+se]||"";le&&(pe[x-1]=Ie(pe[x-1],c));var Ke=pe.reduce(function(Te,Le,st){if(!Le||Le==="0"){var xe=Te[Te.length-1];xe&&xe.index+xe.length===st?xe.length++:Te.push({index:st,length:1})}return Te},[]),De=Ke.sort(function(Te,Le){return Le.length-Te.length})[0],Me=void 0;if(De&&De.length>1){var vt=pe.slice(0,De.index),nt=pe.slice(De.index+De.length);Me=vt.join(":")+"::"+nt.join(":")}else Me=pe.join(":");return U&&(Me+="%"+U),Me}else return h}var jt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,At="".match(/(){0}/)[1]===void 0;function be(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y={},k=c.iri!==!1?p:d;c.reference==="suffix"&&(h=(c.scheme?c.scheme+":":"")+"//"+h);var R=h.match(jt);if(R){At?(y.scheme=R[1],y.userinfo=R[3],y.host=R[4],y.port=parseInt(R[5],10),y.path=R[6]||"",y.query=R[7],y.fragment=R[8],isNaN(y.port)&&(y.port=R[5])):(y.scheme=R[1]||void 0,y.userinfo=h.indexOf("@")!==-1?R[3]:void 0,y.host=h.indexOf("//")!==-1?R[4]:void 0,y.port=parseInt(R[5],10),y.path=R[6]||"",y.query=h.indexOf("?")!==-1?R[7]:void 0,y.fragment=h.indexOf("#")!==-1?R[8]:void 0,isNaN(y.port)&&(y.port=h.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?R[4]:void 0)),y.host&&(y.host=mt(Ie(y.host,k),k)),y.scheme===void 0&&y.userinfo===void 0&&y.host===void 0&&y.port===void 0&&!y.path&&y.query===void 0?y.reference="same-document":y.scheme===void 0?y.reference="relative":y.fragment===void 0?y.reference="absolute":y.reference="uri",c.reference&&c.reference!=="suffix"&&c.reference!==y.reference&&(y.error=y.error||"URI is not a "+c.reference+" reference.");var U=L[(c.scheme||y.scheme||"").toLowerCase()];if(!c.unicodeSupport&&(!U||!U.unicodeSupport)){if(y.host&&(c.domainHost||U&&U.domainHost))try{y.host=N.toASCII(y.host.replace(k.PCT_ENCODED,K).toLowerCase())}catch(z){y.error=y.error||"Host's domain name can not be converted to ASCII via punycode: "+z}Q(y,d)}else Q(y,k);U&&U.parse&&U.parse(y,c)}else y.error=y.error||"URI can not be parsed.";return y}function Dt(h,c){var y=c.iri!==!1?p:d,k=[];return h.userinfo!==void 0&&(k.push(h.userinfo),k.push("@")),h.host!==void 0&&k.push(mt(Ie(String(h.host),y),y).replace(y.IPV6ADDRESS,function(R,U,z){return"["+U+(z?"%25"+z:"")+"]"})),(typeof h.port=="number"||typeof h.port=="string")&&(k.push(":"),k.push(String(h.port))),k.length?k.join(""):void 0}var yt=/^\.\.?\//,gt=/^\/\.(\/|$)/,$t=/^\/\.\.(\/|$)/,Mt=/^\/?(?:.|\n)*?(?=\/|$)/;function je(h){for(var c=[];h.length;)if(h.match(yt))h=h.replace(yt,"");else if(h.match(gt))h=h.replace(gt,"/");else if(h.match($t))h=h.replace($t,"/"),c.pop();else if(h==="."||h==="..")h="";else{var y=h.match(Mt);if(y){var k=y[0];h=h.slice(k.length),c.push(k)}else throw new Error("Unexpected dot segment condition")}return c.join("")}function _e(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=c.iri?p:d,k=[],R=L[(c.scheme||h.scheme||"").toLowerCase()];if(R&&R.serialize&&R.serialize(h,c),h.host&&!y.IPV6ADDRESS.test(h.host)){if(c.domainHost||R&&R.domainHost)try{h.host=c.iri?N.toUnicode(h.host):N.toASCII(h.host.replace(y.PCT_ENCODED,K).toLowerCase())}catch(Z){h.error=h.error||"Host's domain name can not be converted to "+(c.iri?"Unicode":"ASCII")+" via punycode: "+Z}}Q(h,y),c.reference!=="suffix"&&h.scheme&&(k.push(h.scheme),k.push(":"));var U=Dt(h,c);if(U!==void 0&&(c.reference!=="suffix"&&k.push("//"),k.push(U),h.path&&h.path.charAt(0)!=="/"&&k.push("/")),h.path!==void 0){var z=h.path;!c.absolutePath&&(!R||!R.absolutePath)&&(z=je(z)),U===void 0&&(z=z.replace(/^\/\//,"/%2F")),k.push(z)}return h.query!==void 0&&(k.push("?"),k.push(h.query)),h.fragment!==void 0&&(k.push("#"),k.push(h.fragment)),k.join("")}function _t(h,c){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=arguments[3],R={};return k||(h=be(_e(h,y),y),c=be(_e(c,y),y)),y=y||{},!y.tolerant&&c.scheme?(R.scheme=c.scheme,R.userinfo=c.userinfo,R.host=c.host,R.port=c.port,R.path=je(c.path||""),R.query=c.query):(c.userinfo!==void 0||c.host!==void 0||c.port!==void 0?(R.userinfo=c.userinfo,R.host=c.host,R.port=c.port,R.path=je(c.path||""),R.query=c.query):(c.path?(c.path.charAt(0)==="/"?R.path=je(c.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?R.path="/"+c.path:h.path?R.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+c.path:R.path=c.path,R.path=je(R.path)),R.query=c.query):(R.path=h.path,c.query!==void 0?R.query=c.query:R.query=h.query),R.userinfo=h.userinfo,R.host=h.host,R.port=h.port),R.scheme=h.scheme),R.fragment=c.fragment,R}function Lt(h,c,y){var k=f({scheme:"null"},y);return _e(_t(be(h,k),be(c,k),k,!0),k)}function tt(h,c){return typeof h=="string"?h=_e(be(h,c),c):i(h)==="object"&&(h=be(_e(h,c),c)),h}function Ft(h,c,y){return typeof h=="string"?h=_e(be(h,y),y):i(h)==="object"&&(h=_e(h,y)),typeof c=="string"?c=_e(be(c,y),y):i(c)==="object"&&(c=_e(c,y)),h===c}function sr(h,c){return h&&h.toString().replace(!c||!c.iri?d.ESCAPE:p.ESCAPE,F)}function Se(h,c){return h&&h.toString().replace(!c||!c.iri?d.PCT_ENCODED:p.PCT_ENCODED,K)}var rt={scheme:"http",domainHost:!0,parse:function(c,y){return c.host||(c.error=c.error||"HTTP URIs must have a host."),c},serialize:function(c,y){var k=String(c.scheme).toLowerCase()==="https";return(c.port===(k?443:80)||c.port==="")&&(c.port=void 0),c.path||(c.path="/"),c}},as={scheme:"https",domainHost:rt.domainHost,parse:rt.parse,serialize:rt.serialize};function cs(h){return typeof h.secure=="boolean"?h.secure:String(h.scheme).toLowerCase()==="wss"}var qt={scheme:"ws",domainHost:!0,parse:function(c,y){var k=c;return k.secure=cs(k),k.resourceName=(k.path||"/")+(k.query?"?"+k.query:""),k.path=void 0,k.query=void 0,k},serialize:function(c,y){if((c.port===(cs(c)?443:80)||c.port==="")&&(c.port=void 0),typeof c.secure=="boolean"&&(c.scheme=c.secure?"wss":"ws",c.secure=void 0),c.resourceName){var k=c.resourceName.split("?"),R=_(k,2),U=R[0],z=R[1];c.path=U&&U!=="/"?U:void 0,c.query=z,c.resourceName=void 0}return c.fragment=void 0,c}},ls={scheme:"wss",domainHost:qt.domainHost,parse:qt.parse,serialize:qt.serialize},Po={},us="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ae="[0-9A-Fa-f]",So=s(s("%[EFef]"+Ae+"%"+Ae+Ae+"%"+Ae+Ae)+"|"+s("%[89A-Fa-f]"+Ae+"%"+Ae+Ae)+"|"+s("%"+Ae+Ae)),To="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Ro="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",ko=n(Ro,'[\\"\\\\]'),Oo="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Co=new RegExp(us,"g"),wt=new RegExp(So,"g"),No=new RegExp(n("[^]",To,"[\\.]",'[\\"]',ko),"g"),ds=new RegExp(n("[^]",us,Oo),"g"),Io=ds;function Wr(h){var c=K(h);return c.match(Co)?c:h}var fs={scheme:"mailto",parse:function(c,y){var k=c,R=k.to=k.path?k.path.split(","):[];if(k.path=void 0,k.query){for(var U=!1,z={},Z=k.query.split("&"),te=0,ce=Z.length;te<ce;++te){var J=Z[te].split("=");switch(J[0]){case"to":for(var ee=J[1].split(","),le=0,x=ee.length;le<x;++le)R.push(ee[le]);break;case"subject":k.subject=Se(J[1],y);break;case"body":k.body=Se(J[1],y);break;default:U=!0,z[Se(J[0],y)]=Se(J[1],y);break}}U&&(k.headers=z)}k.query=void 0;for(var ne=0,pe=R.length;ne<pe;++ne){var se=R[ne].split("@");if(se[0]=Se(se[0]),y.unicodeSupport)se[1]=Se(se[1],y).toLowerCase();else try{se[1]=N.toASCII(Se(se[1],y).toLowerCase())}catch(Ke){k.error=k.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ke}R[ne]=se.join("@")}return k},serialize:function(c,y){var k=c,R=u(c.to);if(R){for(var U=0,z=R.length;U<z;++U){var Z=String(R[U]),te=Z.lastIndexOf("@"),ce=Z.slice(0,te).replace(wt,Wr).replace(wt,o).replace(No,F),J=Z.slice(te+1);try{J=y.iri?N.toUnicode(J):N.toASCII(Se(J,y).toLowerCase())}catch(ne){k.error=k.error||"Email address's domain name can not be converted to "+(y.iri?"Unicode":"ASCII")+" via punycode: "+ne}R[U]=ce+"@"+J}k.path=R.join(",")}var ee=c.headers=c.headers||{};c.subject&&(ee.subject=c.subject),c.body&&(ee.body=c.body);var le=[];for(var x in ee)ee[x]!==Po[x]&&le.push(x.replace(wt,Wr).replace(wt,o).replace(ds,F)+"="+ee[x].replace(wt,Wr).replace(wt,o).replace(Io,F));return le.length&&(k.query=le.join("&")),k}},jo=/^([^\:]+)\:(.*)/,ps={scheme:"urn",parse:function(c,y){var k=c.path&&c.path.match(jo),R=c;if(k){var U=y.scheme||R.scheme||"urn",z=k[1].toLowerCase(),Z=k[2],te=U+":"+(y.nid||z),ce=L[te];R.nid=z,R.nss=Z,R.path=void 0,ce&&(R=ce.parse(R,y))}else R.error=R.error||"URN can not be parsed.";return R},serialize:function(c,y){var k=y.scheme||c.scheme||"urn",R=c.nid,U=k+":"+(y.nid||R),z=L[U];z&&(c=z.serialize(c,y));var Z=c,te=c.nss;return Z.path=(R||y.nid)+":"+te,Z}},Ao=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,hs={scheme:"urn:uuid",parse:function(c,y){var k=c;return k.uuid=k.nss,k.nss=void 0,!y.tolerant&&(!k.uuid||!k.uuid.match(Ao))&&(k.error=k.error||"UUID is not valid."),k},serialize:function(c,y){var k=c;return k.nss=(c.uuid||"").toLowerCase(),k}};L[rt.scheme]=rt,L[as.scheme]=as,L[qt.scheme]=qt,L[ls.scheme]=ls,L[fs.scheme]=fs,L[ps.scheme]=ps,L[hs.scheme]=hs,r.SCHEMES=L,r.pctEncChar=F,r.pctDecChars=K,r.parse=be,r.removeDotSegments=je,r.serialize=_e,r.resolveComponents=_t,r.resolve=Lt,r.normalize=tt,r.equal=Ft,r.escapeComponent=sr,r.unescapeComponent=Se,Object.defineProperty(r,"__esModule",{value:!0})})})(cn,cn.exports);var sl=cn.exports;Object.defineProperty(Rn,"__esModule",{value:!0});const ro=sl;ro.code='require("ajv/dist/runtime/uri").default';Rn.default=ro;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Ne;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=B;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=tr,s=rr,i=ut,o=ve,u=B,f=ye,l=er,d=X,p=nl,_=Rn,b=(M,v)=>new RegExp(M,v);b.code="new RegExp";const P=["removeAdditional","useDefaults","coerceTypes"],O=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},$=200;function S(M){var v,j,T,a,m,N,L,F,K,Q,oe,Ie,mt,jt,At,be,Dt,yt,gt,$t,Mt,je,_e,_t,Lt;const tt=M.strict,Ft=(v=M.code)===null||v===void 0?void 0:v.optimize,sr=Ft===!0||Ft===void 0?1:Ft||0,Se=(T=(j=M.code)===null||j===void 0?void 0:j.regExp)!==null&&T!==void 0?T:b,rt=(a=M.uriResolver)!==null&&a!==void 0?a:_.default;return{strictSchema:(N=(m=M.strictSchema)!==null&&m!==void 0?m:tt)!==null&&N!==void 0?N:!0,strictNumbers:(F=(L=M.strictNumbers)!==null&&L!==void 0?L:tt)!==null&&F!==void 0?F:!0,strictTypes:(Q=(K=M.strictTypes)!==null&&K!==void 0?K:tt)!==null&&Q!==void 0?Q:"log",strictTuples:(Ie=(oe=M.strictTuples)!==null&&oe!==void 0?oe:tt)!==null&&Ie!==void 0?Ie:"log",strictRequired:(jt=(mt=M.strictRequired)!==null&&mt!==void 0?mt:tt)!==null&&jt!==void 0?jt:!1,code:M.code?{...M.code,optimize:sr,regExp:Se}:{optimize:sr,regExp:Se},loopRequired:(At=M.loopRequired)!==null&&At!==void 0?At:$,loopEnum:(be=M.loopEnum)!==null&&be!==void 0?be:$,meta:(Dt=M.meta)!==null&&Dt!==void 0?Dt:!0,messages:(yt=M.messages)!==null&&yt!==void 0?yt:!0,inlineRefs:(gt=M.inlineRefs)!==null&&gt!==void 0?gt:!0,schemaId:($t=M.schemaId)!==null&&$t!==void 0?$t:"$id",addUsedSchema:(Mt=M.addUsedSchema)!==null&&Mt!==void 0?Mt:!0,validateSchema:(je=M.validateSchema)!==null&&je!==void 0?je:!0,validateFormats:(_e=M.validateFormats)!==null&&_e!==void 0?_e:!0,unicodeRegExp:(_t=M.unicodeRegExp)!==null&&_t!==void 0?_t:!0,int32range:(Lt=M.int32range)!==null&&Lt!==void 0?Lt:!0,uriResolver:rt}}class I{constructor(v={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,v=this.opts={...v,...S(v)};const{es5:j,lines:T}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:O,es5:j,lines:T}),this.logger=Y(v.logger);const a=v.validateFormats;v.validateFormats=!1,this.RULES=(0,i.getRules)(),D.call(this,w,v,"NOT SUPPORTED"),D.call(this,g,v,"DEPRECATED","warn"),this._metaOpts=G.call(this),v.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),v.keywords&&W.call(this,v.keywords),typeof v.meta=="object"&&this.addMetaSchema(v.meta),C.call(this),v.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:v,meta:j,schemaId:T}=this.opts;let a=p;T==="id"&&(a={...p},a.id=a.$id,delete a.$id),j&&v&&this.addMetaSchema(a,a[T],!1)}defaultMeta(){const{meta:v,schemaId:j}=this.opts;return this.opts.defaultMeta=typeof v=="object"?v[j]||v:void 0}validate(v,j){let T;if(typeof v=="string"){if(T=this.getSchema(v),!T)throw new Error(`no schema with key or ref "${v}"`)}else T=this.compile(v);const a=T(j);return"$async"in T||(this.errors=T.errors),a}compile(v,j){const T=this._addSchema(v,j);return T.validate||this._compileSchemaEnv(T)}compileAsync(v,j){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return a.call(this,v,j);async function a(Q,oe){await m.call(this,Q.$schema);const Ie=this._addSchema(Q,oe);return Ie.validate||N.call(this,Ie)}async function m(Q){Q&&!this.getSchema(Q)&&await a.call(this,{$ref:Q},!0)}async function N(Q){try{return this._compileSchemaEnv(Q)}catch(oe){if(!(oe instanceof s.default))throw oe;return L.call(this,oe),await F.call(this,oe.missingSchema),N.call(this,Q)}}function L({missingSchema:Q,missingRef:oe}){if(this.refs[Q])throw new Error(`AnySchema ${Q} is loaded but ${oe} cannot be resolved`)}async function F(Q){const oe=await K.call(this,Q);this.refs[Q]||await m.call(this,oe.$schema),this.refs[Q]||this.addSchema(oe,Q,j)}async function K(Q){const oe=this._loading[Q];if(oe)return oe;try{return await(this._loading[Q]=T(Q))}finally{delete this._loading[Q]}}}addSchema(v,j,T,a=this.opts.validateSchema){if(Array.isArray(v)){for(const N of v)this.addSchema(N,void 0,T,a);return this}let m;if(typeof v=="object"){const{schemaId:N}=this.opts;if(m=v[N],m!==void 0&&typeof m!="string")throw new Error(`schema ${N} must be string`)}return j=(0,f.normalizeId)(j||m),this._checkUnique(j),this.schemas[j]=this._addSchema(v,T,j,a,!0),this}addMetaSchema(v,j,T=this.opts.validateSchema){return this.addSchema(v,j,!0,T),this}validateSchema(v,j){if(typeof v=="boolean")return!0;let T;if(T=v.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const a=this.validate(T,v);if(!a&&j){const m="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(m);else throw new Error(m)}return a}getSchema(v){let j;for(;typeof(j=E.call(this,v))=="string";)v=j;if(j===void 0){const{schemaId:T}=this.opts,a=new o.SchemaEnv({schema:{},schemaId:T});if(j=o.resolveSchema.call(this,a,v),!j)return;this.refs[v]=j}return j.validate||this._compileSchemaEnv(j)}removeSchema(v){if(v instanceof RegExp)return this._removeAllSchemas(this.schemas,v),this._removeAllSchemas(this.refs,v),this;switch(typeof v){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const j=E.call(this,v);return typeof j=="object"&&this._cache.delete(j.schema),delete this.schemas[v],delete this.refs[v],this}case"object":{const j=v;this._cache.delete(j);let T=v[this.opts.schemaId];return T&&(T=(0,f.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(v){for(const j of v)this.addKeyword(j);return this}addKeyword(v,j){let T;if(typeof v=="string")T=v,typeof j=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),j.keyword=T);else if(typeof v=="object"&&j===void 0){if(j=v,T=j.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(fe.call(this,T,j),!j)return(0,d.eachItem)(T,m=>Xe.call(this,m)),this;pt.call(this,j);const a={...j,type:(0,l.getJSONTypes)(j.type),schemaType:(0,l.getJSONTypes)(j.schemaType)};return(0,d.eachItem)(T,a.type.length===0?m=>Xe.call(this,m,a):m=>a.type.forEach(N=>Xe.call(this,m,a,N))),this}getKeyword(v){const j=this.RULES.all[v];return typeof j=="object"?j.definition:!!j}removeKeyword(v){const{RULES:j}=this;delete j.keywords[v],delete j.all[v];for(const T of j.rules){const a=T.rules.findIndex(m=>m.keyword===v);a>=0&&T.rules.splice(a,1)}return this}addFormat(v,j){return typeof j=="string"&&(j=new RegExp(j)),this.formats[v]=j,this}errorsText(v=this.errors,{separator:j=", ",dataVar:T="data"}={}){return!v||v.length===0?"No errors":v.map(a=>`${T}${a.instancePath} ${a.message}`).reduce((a,m)=>a+j+m)}$dataMetaSchema(v,j){const T=this.RULES.all;v=JSON.parse(JSON.stringify(v));for(const a of j){const m=a.split("/").slice(1);let N=v;for(const L of m)N=N[L];for(const L in T){const F=T[L];if(typeof F!="object")continue;const{$data:K}=F.definition,Q=N[L];K&&Q&&(N[L]=ht(Q))}}return v}_removeAllSchemas(v,j){for(const T in v){const a=v[T];(!j||j.test(T))&&(typeof a=="string"?delete v[T]:a&&!a.meta&&(this._cache.delete(a.schema),delete v[T]))}}_addSchema(v,j,T,a=this.opts.validateSchema,m=this.opts.addUsedSchema){let N;const{schemaId:L}=this.opts;if(typeof v=="object")N=v[L];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof v!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get(v);if(F!==void 0)return F;T=(0,f.normalizeId)(N||T);const K=f.getSchemaRefs.call(this,v,T);return F=new o.SchemaEnv({schema:v,schemaId:L,meta:j,baseId:T,localRefs:K}),this._cache.set(F.schema,F),m&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=F),a&&this.validateSchema(v,!0),F}_checkUnique(v){if(this.schemas[v]||this.refs[v])throw new Error(`schema with key or id "${v}" already exists`)}_compileSchemaEnv(v){if(v.meta?this._compileMetaSchema(v):o.compileSchema.call(this,v),!v.validate)throw new Error("ajv implementation error");return v.validate}_compileMetaSchema(v){const j=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,v)}finally{this.opts=j}}}e.default=I,I.ValidationError=n.default,I.MissingRefError=s.default;function D(M,v,j,T="error"){for(const a in M){const m=a;m in v&&this.logger[T](`${j}: option ${a}. ${M[m]}`)}}function E(M){return M=(0,f.normalizeId)(M),this.schemas[M]||this.refs[M]}function C(){const M=this.opts.schemas;if(M)if(Array.isArray(M))this.addSchema(M);else for(const v in M)this.addSchema(M[v],v)}function A(){for(const M in this.opts.formats){const v=this.opts.formats[M];v&&this.addFormat(M,v)}}function W(M){if(Array.isArray(M)){this.addVocabulary(M);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const v in M){const j=M[v];j.keyword||(j.keyword=v),this.addKeyword(j)}}function G(){const M={...this.opts};for(const v of P)delete M[v];return M}const ie={log(){},warn(){},error(){}};function Y(M){if(M===!1)return ie;if(M===void 0)return console;if(M.log&&M.warn&&M.error)return M;throw new Error("logger must implement log, warn and error methods")}const Pe=/^[a-z_$][a-z0-9_$:-]*$/i;function fe(M,v){const{RULES:j}=this;if((0,d.eachItem)(M,T=>{if(j.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!Pe.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!v&&v.$data&&!("code"in v||"validate"in v))throw new Error('$data keyword must have "code" or "validate" function')}function Xe(M,v,j){var T;const a=v==null?void 0:v.post;if(j&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:m}=this;let N=a?m.post:m.rules.find(({type:F})=>F===j);if(N||(N={type:j,rules:[]},m.rules.push(N)),m.keywords[M]=!0,!v)return;const L={keyword:M,definition:{...v,type:(0,l.getJSONTypes)(v.type),schemaType:(0,l.getJSONTypes)(v.schemaType)}};v.before?et.call(this,N,L,v.before):N.rules.push(L),m.all[M]=L,(T=v.implements)===null||T===void 0||T.forEach(F=>this.addKeyword(F))}function et(M,v,j){const T=M.rules.findIndex(a=>a.keyword===j);T>=0?M.rules.splice(T,0,v):(M.rules.push(v),this.logger.warn(`rule ${j} is not defined`))}function pt(M){let{metaSchema:v}=M;v!==void 0&&(M.$data&&this.opts.$data&&(v=ht(v)),M.validateSchema=this.compile(v,!0))}const It={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ht(M){return{anyOf:[M,It]}}})(Ni);var kn={},On={},Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});const il={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Cn.default=il;var dt={};Object.defineProperty(dt,"__esModule",{value:!0});dt.callRef=dt.getValidate=void 0;const ol=rr,As=H,we=B,Et=We,Ds=ve,cr=X,al={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:s,schemaEnv:i,validateName:o,opts:u,self:f}=n,{root:l}=i;if((r==="#"||r==="#/")&&s===l.baseId)return p();const d=Ds.resolveRef.call(f,l,s,r);if(d===void 0)throw new ol.default(n.opts.uriResolver,s,r);if(d instanceof Ds.SchemaEnv)return _(d);return b(d);function p(){if(i===l)return gr(e,o,i,i.$async);const P=t.scopeValue("root",{ref:l});return gr(e,(0,we._)`${P}.validate`,l,l.$async)}function _(P){const O=no(e,P);gr(e,O,P,P.$async)}function b(P){const O=t.scopeValue("schema",u.code.source===!0?{ref:P,code:(0,we.stringify)(P)}:{ref:P}),w=t.name("valid"),g=e.subschema({schema:P,dataTypes:[],schemaPath:we.nil,topSchemaRef:O,errSchemaPath:r},w);e.mergeEvaluated(g),e.ok(w)}}};function no(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,we._)`${r.scopeValue("wrapper",{ref:t})}.validate`}dt.getValidate=no;function gr(e,t,r,n){const{gen:s,it:i}=e,{allErrors:o,schemaEnv:u,opts:f}=i,l=f.passContext?Et.default.this:we.nil;n?d():p();function d(){if(!u.$async)throw new Error("async schema referenced by sync schema");const P=s.let("valid");s.try(()=>{s.code((0,we._)`await ${(0,As.callValidateCode)(e,t,l)}`),b(t),o||s.assign(P,!0)},O=>{s.if((0,we._)`!(${O} instanceof ${i.ValidationError})`,()=>s.throw(O)),_(O),o||s.assign(P,!1)}),e.ok(P)}function p(){e.result((0,As.callValidateCode)(e,t,l),()=>b(t),()=>_(t))}function _(P){const O=(0,we._)`${P}.errors`;s.assign(Et.default.vErrors,(0,we._)`${Et.default.vErrors} === null ? ${O} : ${Et.default.vErrors}.concat(${O})`),s.assign(Et.default.errors,(0,we._)`${Et.default.vErrors}.length`)}function b(P){var O;if(!i.opts.unevaluated)return;const w=(O=r==null?void 0:r.validate)===null||O===void 0?void 0:O.evaluated;if(i.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(i.props=cr.mergeEvaluated.props(s,w.props,i.props));else{const g=s.var("props",(0,we._)`${P}.evaluated.props`);i.props=cr.mergeEvaluated.props(s,g,i.props,we.Name)}if(i.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(i.items=cr.mergeEvaluated.items(s,w.items,i.items));else{const g=s.var("items",(0,we._)`${P}.evaluated.items`);i.items=cr.mergeEvaluated.items(s,g,i.items,we.Name)}}}dt.callRef=gr;dt.default=al;Object.defineProperty(On,"__esModule",{value:!0});const cl=Cn,ll=dt,ul=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",cl.default,ll.default];On.default=ul;var Nn={},In={};Object.defineProperty(In,"__esModule",{value:!0});const Rr=B,Qe=Rr.operators,kr={maximum:{okStr:"<=",ok:Qe.LTE,fail:Qe.GT},minimum:{okStr:">=",ok:Qe.GTE,fail:Qe.LT},exclusiveMaximum:{okStr:"<",ok:Qe.LT,fail:Qe.GTE},exclusiveMinimum:{okStr:">",ok:Qe.GT,fail:Qe.LTE}},dl={message:({keyword:e,schemaCode:t})=>(0,Rr.str)`must be ${kr[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Rr._)`{comparison: ${kr[e].okStr}, limit: ${t}}`},fl={keyword:Object.keys(kr),type:"number",schemaType:"number",$data:!0,error:dl,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Rr._)`${r} ${kr[t].fail} ${n} || isNaN(${r})`)}};In.default=fl;var jn={};Object.defineProperty(jn,"__esModule",{value:!0});const Bt=B,pl={message:({schemaCode:e})=>(0,Bt.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Bt._)`{multipleOf: ${e}}`},hl={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:pl,code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,i=s.opts.multipleOfPrecision,o=t.let("res"),u=i?(0,Bt._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}`:(0,Bt._)`${o} !== parseInt(${o})`;e.fail$data((0,Bt._)`(${n} === 0 || (${o} = ${r}/${n}, ${u}))`)}};jn.default=hl;var An={},Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});function so(e){const t=e.length;let r=0,n=0,s;for(;n<t;)r++,s=e.charCodeAt(n++),s>=55296&&s<=56319&&n<t&&(s=e.charCodeAt(n),(s&64512)===56320&&n++);return r}Dn.default=so;so.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(An,"__esModule",{value:!0});const at=B,ml=X,yl=Dn,gl={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,at.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,at._)`{limit: ${e}}`},$l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:gl,code(e){const{keyword:t,data:r,schemaCode:n,it:s}=e,i=t==="maxLength"?at.operators.GT:at.operators.LT,o=s.opts.unicode===!1?(0,at._)`${r}.length`:(0,at._)`${(0,ml.useFunc)(e.gen,yl.default)}(${r})`;e.fail$data((0,at._)`${o} ${i} ${n}`)}};An.default=$l;var Mn={};Object.defineProperty(Mn,"__esModule",{value:!0});const _l=H,Or=B,wl={message:({schemaCode:e})=>(0,Or.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Or._)`{pattern: ${e}}`},vl={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:wl,code(e){const{data:t,$data:r,schema:n,schemaCode:s,it:i}=e,o=i.opts.unicodeRegExp?"u":"",u=r?(0,Or._)`(new RegExp(${s}, ${o}))`:(0,_l.usePattern)(e,n);e.fail$data((0,Or._)`!${u}.test(${t})`)}};Mn.default=vl;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});const Gt=B,bl={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Gt.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Gt._)`{limit: ${e}}`},El={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:bl,code(e){const{keyword:t,data:r,schemaCode:n}=e,s=t==="maxProperties"?Gt.operators.GT:Gt.operators.LT;e.fail$data((0,Gt._)`Object.keys(${r}).length ${s} ${n}`)}};Ln.default=El;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});const Wt=H,Kt=B,Pl=X,Sl={message:({params:{missingProperty:e}})=>(0,Kt.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Kt._)`{missingProperty: ${e}}`},Tl={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Sl,code(e){const{gen:t,schema:r,schemaCode:n,data:s,$data:i,it:o}=e,{opts:u}=o;if(!i&&r.length===0)return;const f=r.length>=u.loopRequired;if(o.allErrors?l():d(),u.strictRequired){const b=e.parentSchema.properties,{definedProperties:P}=e.it;for(const O of r)if((b==null?void 0:b[O])===void 0&&!P.has(O)){const w=o.schemaEnv.baseId+o.errSchemaPath,g=`required property "${O}" is not defined at "${w}" (strictRequired)`;(0,Pl.checkStrictMode)(o,g,o.opts.strictRequired)}}function l(){if(f||i)e.block$data(Kt.nil,p);else for(const b of r)(0,Wt.checkReportMissingProp)(e,b)}function d(){const b=t.let("missing");if(f||i){const P=t.let("valid",!0);e.block$data(P,()=>_(b,P)),e.ok(P)}else t.if((0,Wt.checkMissingProp)(e,r,b)),(0,Wt.reportMissingProp)(e,b),t.else()}function p(){t.forOf("prop",n,b=>{e.setParams({missingProperty:b}),t.if((0,Wt.noPropertyInData)(t,s,b,u.ownProperties),()=>e.error())})}function _(b,P){e.setParams({missingProperty:b}),t.forOf(b,n,()=>{t.assign(P,(0,Wt.propertyInData)(t,s,b,u.ownProperties)),t.if((0,Kt.not)(P),()=>{e.error(),t.break()})},Kt.nil)}}};Fn.default=Tl;var qn={};Object.defineProperty(qn,"__esModule",{value:!0});const Jt=B,Rl={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Jt.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Jt._)`{limit: ${e}}`},kl={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Rl,code(e){const{keyword:t,data:r,schemaCode:n}=e,s=t==="maxItems"?Jt.operators.GT:Jt.operators.LT;e.fail$data((0,Jt._)`${r}.length ${s} ${n}`)}};qn.default=kl;var Un={},nr={};Object.defineProperty(nr,"__esModule",{value:!0});const io=qi;io.code='require("ajv/dist/runtime/equal").default';nr.default=io;Object.defineProperty(Un,"__esModule",{value:!0});const Yr=er,me=B,Ol=X,Cl=nr,Nl={message:({params:{i:e,j:t}})=>(0,me.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,me._)`{i: ${e}, j: ${t}}`},Il={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Nl,code(e){const{gen:t,data:r,$data:n,schema:s,parentSchema:i,schemaCode:o,it:u}=e;if(!n&&!s)return;const f=t.let("valid"),l=i.items?(0,Yr.getSchemaTypes)(i.items):[];e.block$data(f,d,(0,me._)`${o} === false`),e.ok(f);function d(){const P=t.let("i",(0,me._)`${r}.length`),O=t.let("j");e.setParams({i:P,j:O}),t.assign(f,!0),t.if((0,me._)`${P} > 1`,()=>(p()?_:b)(P,O))}function p(){return l.length>0&&!l.some(P=>P==="object"||P==="array")}function _(P,O){const w=t.name("item"),g=(0,Yr.checkDataTypes)(l,w,u.opts.strictNumbers,Yr.DataType.Wrong),$=t.const("indices",(0,me._)`{}`);t.for((0,me._)`;${P}--;`,()=>{t.let(w,(0,me._)`${r}[${P}]`),t.if(g,(0,me._)`continue`),l.length>1&&t.if((0,me._)`typeof ${w} == "string"`,(0,me._)`${w} += "_"`),t.if((0,me._)`typeof ${$}[${w}] == "number"`,()=>{t.assign(O,(0,me._)`${$}[${w}]`),e.error(),t.assign(f,!1).break()}).code((0,me._)`${$}[${w}] = ${P}`)})}function b(P,O){const w=(0,Ol.useFunc)(t,Cl.default),g=t.name("outer");t.label(g).for((0,me._)`;${P}--;`,()=>t.for((0,me._)`${O} = ${P}; ${O}--;`,()=>t.if((0,me._)`${w}(${r}[${P}], ${r}[${O}])`,()=>{e.error(),t.assign(f,!1).break(g)})))}}};Un.default=Il;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});const ln=B,jl=X,Al=nr,Dl={message:"must be equal to constant",params:({schemaCode:e})=>(0,ln._)`{allowedValue: ${e}}`},Ml={keyword:"const",$data:!0,error:Dl,code(e){const{gen:t,data:r,$data:n,schemaCode:s,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,ln._)`!${(0,jl.useFunc)(t,Al.default)}(${r}, ${s})`):e.fail((0,ln._)`${i} !== ${r}`)}};zn.default=Ml;var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});const xt=B,Ll=X,Fl=nr,ql={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,xt._)`{allowedValues: ${e}}`},Ul={keyword:"enum",schemaType:"array",$data:!0,error:ql,code(e){const{gen:t,data:r,$data:n,schema:s,schemaCode:i,it:o}=e;if(!n&&s.length===0)throw new Error("enum must have non-empty array");const u=s.length>=o.opts.loopEnum;let f;const l=()=>f??(f=(0,Ll.useFunc)(t,Fl.default));let d;if(u||n)d=t.let("valid"),e.block$data(d,p);else{if(!Array.isArray(s))throw new Error("ajv implementation error");const b=t.const("vSchema",i);d=(0,xt.or)(...s.map((P,O)=>_(b,O)))}e.pass(d);function p(){t.assign(d,!1),t.forOf("v",i,b=>t.if((0,xt._)`${l()}(${r}, ${b})`,()=>t.assign(d,!0).break()))}function _(b,P){const O=s[P];return typeof O=="object"&&O!==null?(0,xt._)`${l()}(${r}, ${b}[${P}])`:(0,xt._)`${r} === ${O}`}}};Vn.default=Ul;Object.defineProperty(Nn,"__esModule",{value:!0});const zl=In,Vl=jn,Wl=An,xl=Mn,Hl=Ln,Bl=Fn,Gl=qn,Kl=Un,Jl=zn,Ql=Vn,Yl=[zl.default,Vl.default,Wl.default,xl.default,Hl.default,Bl.default,Gl.default,Kl.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Jl.default,Ql.default];Nn.default=Yl;var Wn={},Ct={};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateAdditionalItems=void 0;const ct=B,un=X,Zl={message:({params:{len:e}})=>(0,ct.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ct._)`{limit: ${e}}`},Xl={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Zl,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,un.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}oo(e,n)}};function oo(e,t){const{gen:r,schema:n,data:s,keyword:i,it:o}=e;o.items=!0;const u=r.const("len",(0,ct._)`${s}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,ct._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,un.alwaysValidSchema)(o,n)){const l=r.var("valid",(0,ct._)`${u} <= ${t.length}`);r.if((0,ct.not)(l),()=>f(l)),e.ok(l)}function f(l){r.forRange("i",t.length,u,d=>{e.subschema({keyword:i,dataProp:d,dataPropType:un.Type.Num},l),o.allErrors||r.if((0,ct.not)(l),()=>r.break())})}}Ct.validateAdditionalItems=oo;Ct.default=Xl;var xn={},Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.validateTuple=void 0;const Ms=B,$r=X,eu=H,tu={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return ao(e,"additionalItems",t);r.items=!0,!(0,$r.alwaysValidSchema)(r,t)&&e.ok((0,eu.validateArray)(e))}};function ao(e,t,r=e.schema){const{gen:n,parentSchema:s,data:i,keyword:o,it:u}=e;d(s),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=$r.mergeEvaluated.items(n,r.length,u.items));const f=n.name("valid"),l=n.const("len",(0,Ms._)`${i}.length`);r.forEach((p,_)=>{(0,$r.alwaysValidSchema)(u,p)||(n.if((0,Ms._)`${l} > ${_}`,()=>e.subschema({keyword:o,schemaProp:_,dataProp:_},f)),e.ok(f))});function d(p){const{opts:_,errSchemaPath:b}=u,P=r.length,O=P===p.minItems&&(P===p.maxItems||p[t]===!1);if(_.strictTuples&&!O){const w=`"${o}" is ${P}-tuple, but minItems or maxItems/${t} are not specified or different at path "${b}"`;(0,$r.checkStrictMode)(u,w,_.strictTuples)}}}Nt.validateTuple=ao;Nt.default=tu;Object.defineProperty(xn,"__esModule",{value:!0});const ru=Nt,nu={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,ru.validateTuple)(e,"items")};xn.default=nu;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const Ls=B,su=X,iu=H,ou=Ct,au={message:({params:{len:e}})=>(0,Ls.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ls._)`{limit: ${e}}`},cu={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:au,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,!(0,su.alwaysValidSchema)(n,t)&&(s?(0,ou.validateAdditionalItems)(e,s):e.ok((0,iu.validateArray)(e)))}};Hn.default=cu;var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});const Re=B,lr=X,lu={message:({params:{min:e,max:t}})=>t===void 0?(0,Re.str)`must contain at least ${e} valid item(s)`:(0,Re.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Re._)`{minContains: ${e}}`:(0,Re._)`{minContains: ${e}, maxContains: ${t}}`},uu={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:lu,code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;let o,u;const{minContains:f,maxContains:l}=n;i.opts.next?(o=f===void 0?1:f,u=l):o=1;const d=t.const("len",(0,Re._)`${s}.length`);if(e.setParams({min:o,max:u}),u===void 0&&o===0){(0,lr.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&o>u){(0,lr.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,lr.alwaysValidSchema)(i,r)){let O=(0,Re._)`${d} >= ${o}`;u!==void 0&&(O=(0,Re._)`${O} && ${d} <= ${u}`),e.pass(O);return}i.items=!0;const p=t.name("valid");u===void 0&&o===1?b(p,()=>t.if(p,()=>t.break())):o===0?(t.let(p,!0),u!==void 0&&t.if((0,Re._)`${s}.length > 0`,_)):(t.let(p,!1),_()),e.result(p,()=>e.reset());function _(){const O=t.name("_valid"),w=t.let("count",0);b(O,()=>t.if(O,()=>P(w)))}function b(O,w){t.forRange("i",0,d,g=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:lr.Type.Num,compositeRule:!0},O),w()})}function P(O){t.code((0,Re._)`${O}++`),u===void 0?t.if((0,Re._)`${O} >= ${o}`,()=>t.assign(p,!0).break()):(t.if((0,Re._)`${O} > ${u}`,()=>t.assign(p,!1).break()),o===1?t.assign(p,!0):t.if((0,Re._)`${O} >= ${o}`,()=>t.assign(p,!0)))}}};Bn.default=uu;var co={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=B,r=X,n=H;e.error={message:({params:{property:f,depsCount:l,deps:d}})=>{const p=l===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${f} is present`},params:({params:{property:f,depsCount:l,deps:d,missingProperty:p}})=>(0,t._)`{property: ${f},
729
- missingProperty: ${p},
730
- depsCount: ${l},
731
- deps: ${d}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[l,d]=i(f);o(f,l),u(f,d)}};function i({schema:f}){const l={},d={};for(const p in f){if(p==="__proto__")continue;const _=Array.isArray(f[p])?l:d;_[p]=f[p]}return[l,d]}function o(f,l=f.schema){const{gen:d,data:p,it:_}=f;if(Object.keys(l).length===0)return;const b=d.let("missing");for(const P in l){const O=l[P];if(O.length===0)continue;const w=(0,n.propertyInData)(d,p,P,_.opts.ownProperties);f.setParams({property:P,depsCount:O.length,deps:O.join(", ")}),_.allErrors?d.if(w,()=>{for(const g of O)(0,n.checkReportMissingProp)(f,g)}):(d.if((0,t._)`${w} && (${(0,n.checkMissingProp)(f,O,b)})`),(0,n.reportMissingProp)(f,b),d.else())}}e.validatePropertyDeps=o;function u(f,l=f.schema){const{gen:d,data:p,keyword:_,it:b}=f,P=d.name("valid");for(const O in l)(0,r.alwaysValidSchema)(b,l[O])||(d.if((0,n.propertyInData)(d,p,O,b.opts.ownProperties),()=>{const w=f.subschema({keyword:_,schemaProp:O},P);f.mergeValidEvaluated(w,P)},()=>d.var(P,!0)),f.ok(P))}e.validateSchemaDeps=u,e.default=s})(co);var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});const lo=B,du=X,fu={message:"property name must be valid",params:({params:e})=>(0,lo._)`{propertyName: ${e.propertyName}}`},pu={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:fu,code(e){const{gen:t,schema:r,data:n,it:s}=e;if((0,du.alwaysValidSchema)(s,r))return;const i=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),t.if((0,lo.not)(i),()=>{e.error(!0),s.allErrors||t.break()})}),e.ok(i)}};Gn.default=pu;var Vr={};Object.defineProperty(Vr,"__esModule",{value:!0});const ur=H,Oe=B,hu=We,dr=X,mu={message:"must NOT have additional properties",params:({params:e})=>(0,Oe._)`{additionalProperty: ${e.additionalProperty}}`},yu={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:mu,code(e){const{gen:t,schema:r,parentSchema:n,data:s,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:u,opts:f}=o;if(o.props=!0,f.removeAdditional!=="all"&&(0,dr.alwaysValidSchema)(o,r))return;const l=(0,ur.allSchemaProperties)(n.properties),d=(0,ur.allSchemaProperties)(n.patternProperties);p(),e.ok((0,Oe._)`${i} === ${hu.default.errors}`);function p(){t.forIn("key",s,w=>{!l.length&&!d.length?P(w):t.if(_(w),()=>P(w))})}function _(w){let g;if(l.length>8){const $=(0,dr.schemaRefOrVal)(o,n.properties,"properties");g=(0,ur.isOwnProperty)(t,$,w)}else l.length?g=(0,Oe.or)(...l.map($=>(0,Oe._)`${w} === ${$}`)):g=Oe.nil;return d.length&&(g=(0,Oe.or)(g,...d.map($=>(0,Oe._)`${(0,ur.usePattern)(e,$)}.test(${w})`))),(0,Oe.not)(g)}function b(w){t.code((0,Oe._)`delete ${s}[${w}]`)}function P(w){if(f.removeAdditional==="all"||f.removeAdditional&&r===!1){b(w);return}if(r===!1){e.setParams({additionalProperty:w}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,dr.alwaysValidSchema)(o,r)){const g=t.name("valid");f.removeAdditional==="failing"?(O(w,g,!1),t.if((0,Oe.not)(g),()=>{e.reset(),b(w)})):(O(w,g),u||t.if((0,Oe.not)(g),()=>t.break()))}}function O(w,g,$){const S={keyword:"additionalProperties",dataProp:w,dataPropType:dr.Type.Str};$===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,g)}}};Vr.default=yu;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const gu=Ne,Fs=H,Zr=X,qs=Vr,$u={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:s,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&qs.default.code(new gu.KeywordCxt(i,qs.default,"additionalProperties"));const o=(0,Fs.allSchemaProperties)(r);for(const p of o)i.definedProperties.add(p);i.opts.unevaluated&&o.length&&i.props!==!0&&(i.props=Zr.mergeEvaluated.props(t,(0,Zr.toHash)(o),i.props));const u=o.filter(p=>!(0,Zr.alwaysValidSchema)(i,r[p]));if(u.length===0)return;const f=t.name("valid");for(const p of u)l(p)?d(p):(t.if((0,Fs.propertyInData)(t,s,p,i.opts.ownProperties)),d(p),i.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(f);function l(p){return i.opts.useDefaults&&!i.compositeRule&&r[p].default!==void 0}function d(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},f)}}};Kn.default=$u;var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});const Us=H,fr=B,zs=X,Vs=X,_u={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:s,it:i}=e,{opts:o}=i,u=(0,Us.allSchemaProperties)(r),f=u.filter(O=>(0,zs.alwaysValidSchema)(i,r[O]));if(u.length===0||f.length===u.length&&(!i.opts.unevaluated||i.props===!0))return;const l=o.strictSchema&&!o.allowMatchingProperties&&s.properties,d=t.name("valid");i.props!==!0&&!(i.props instanceof fr.Name)&&(i.props=(0,Vs.evaluatedPropsToName)(t,i.props));const{props:p}=i;_();function _(){for(const O of u)l&&b(O),i.allErrors?P(O):(t.var(d,!0),P(O),t.if(d))}function b(O){for(const w in l)new RegExp(O).test(w)&&(0,zs.checkStrictMode)(i,`property ${w} matches pattern ${O} (use allowMatchingProperties)`)}function P(O){t.forIn("key",n,w=>{t.if((0,fr._)`${(0,Us.usePattern)(e,O)}.test(${w})`,()=>{const g=f.includes(O);g||e.subschema({keyword:"patternProperties",schemaProp:O,dataProp:w,dataPropType:Vs.Type.Str},d),i.opts.unevaluated&&p!==!0?t.assign((0,fr._)`${p}[${w}]`,!0):!g&&!i.allErrors&&t.if((0,fr.not)(d),()=>t.break())})})}}};Jn.default=_u;var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});const wu=X,vu={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,wu.alwaysValidSchema)(n,r)){e.fail();return}const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Qn.default=vu;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});const bu=H,Eu={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:bu.validateUnion,error:{message:"must match a schema in anyOf"}};Yn.default=Eu;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});const _r=B,Pu=X,Su={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,_r._)`{passingSchemas: ${e.passing}}`},Tu={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Su,code(e){const{gen:t,schema:r,parentSchema:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;const i=r,o=t.let("valid",!1),u=t.let("passing",null),f=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(o,()=>e.reset(),()=>e.error(!0));function l(){i.forEach((d,p)=>{let _;(0,Pu.alwaysValidSchema)(s,d)?t.var(f,!0):_=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},f),p>0&&t.if((0,_r._)`${f} && ${o}`).assign(o,!1).assign(u,(0,_r._)`[${u}, ${p}]`).else(),t.if(f,()=>{t.assign(o,!0),t.assign(u,p),_&&e.mergeEvaluated(_,_r.Name)})})}}};Zn.default=Tu;var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const Ru=X,ku={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach((i,o)=>{if((0,Ru.alwaysValidSchema)(n,i))return;const u=e.subschema({keyword:"allOf",schemaProp:o},s);e.ok(s),e.mergeEvaluated(u)})}};Xn.default=ku;var es={};Object.defineProperty(es,"__esModule",{value:!0});const Cr=B,uo=X,Ou={message:({params:e})=>(0,Cr.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Cr._)`{failingKeyword: ${e.ifClause}}`},Cu={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Ou,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,uo.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const s=Ws(n,"then"),i=Ws(n,"else");if(!s&&!i)return;const o=t.let("valid",!0),u=t.name("_valid");if(f(),e.reset(),s&&i){const d=t.let("ifClause");e.setParams({ifClause:d}),t.if(u,l("then",d),l("else",d))}else s?t.if(u,l("then")):t.if((0,Cr.not)(u),l("else"));e.pass(o,()=>e.error(!0));function f(){const d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(d)}function l(d,p){return()=>{const _=e.subschema({keyword:d},u);t.assign(o,u),e.mergeValidEvaluated(_,o),p?t.assign(p,(0,Cr._)`${d}`):e.setParams({ifClause:d})}}}};function Ws(e,t){const r=e.schema[t];return r!==void 0&&!(0,uo.alwaysValidSchema)(e,r)}es.default=Cu;var ts={};Object.defineProperty(ts,"__esModule",{value:!0});const Nu=X,Iu={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Nu.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};ts.default=Iu;Object.defineProperty(Wn,"__esModule",{value:!0});const ju=Ct,Au=xn,Du=Nt,Mu=Hn,Lu=Bn,Fu=co,qu=Gn,Uu=Vr,zu=Kn,Vu=Jn,Wu=Qn,xu=Yn,Hu=Zn,Bu=Xn,Gu=es,Ku=ts;function Ju(e=!1){const t=[Wu.default,xu.default,Hu.default,Bu.default,Gu.default,Ku.default,qu.default,Uu.default,Fu.default,zu.default,Vu.default];return e?t.push(Au.default,Mu.default):t.push(ju.default,Du.default),t.push(Lu.default),t}Wn.default=Ju;var rs={},ns={};Object.defineProperty(ns,"__esModule",{value:!0});const ue=B,Qu={message:({schemaCode:e})=>(0,ue.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,ue._)`{format: ${e}}`},Yu={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Qu,code(e,t){const{gen:r,data:n,$data:s,schema:i,schemaCode:o,it:u}=e,{opts:f,errSchemaPath:l,schemaEnv:d,self:p}=u;if(!f.validateFormats)return;s?_():b();function _(){const P=r.scopeValue("formats",{ref:p.formats,code:f.code.formats}),O=r.const("fDef",(0,ue._)`${P}[${o}]`),w=r.let("fType"),g=r.let("format");r.if((0,ue._)`typeof ${O} == "object" && !(${O} instanceof RegExp)`,()=>r.assign(w,(0,ue._)`${O}.type || "string"`).assign(g,(0,ue._)`${O}.validate`),()=>r.assign(w,(0,ue._)`"string"`).assign(g,O)),e.fail$data((0,ue.or)($(),S()));function $(){return f.strictSchema===!1?ue.nil:(0,ue._)`${o} && !${g}`}function S(){const I=d.$async?(0,ue._)`(${O}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,ue._)`${g}(${n})`,D=(0,ue._)`(typeof ${g} == "function" ? ${I} : ${g}.test(${n}))`;return(0,ue._)`${g} && ${g} !== true && ${w} === ${t} && !${D}`}}function b(){const P=p.formats[i];if(!P){$();return}if(P===!0)return;const[O,w,g]=S(P);O===t&&e.pass(I());function $(){if(f.strictSchema===!1){p.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function S(D){const E=D instanceof RegExp?(0,ue.regexpCode)(D):f.code.formats?(0,ue._)`${f.code.formats}${(0,ue.getProperty)(i)}`:void 0,C=r.scopeValue("formats",{key:i,ref:D,code:E});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,ue._)`${C}.validate`]:["string",D,C]}function I(){if(typeof P=="object"&&!(P instanceof RegExp)&&P.async){if(!d.$async)throw new Error("async format in sync schema");return(0,ue._)`await ${g}(${n})`}return typeof w=="function"?(0,ue._)`${g}(${n})`:(0,ue._)`${g}.test(${n})`}}}};ns.default=Yu;Object.defineProperty(rs,"__esModule",{value:!0});const Zu=ns,Xu=[Zu.default];rs.default=Xu;var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.contentVocabulary=Ot.metadataVocabulary=void 0;Ot.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ot.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(kn,"__esModule",{value:!0});const ed=On,td=Nn,rd=Wn,nd=rs,xs=Ot,sd=[ed.default,td.default,(0,rd.default)(),nd.default,xs.metadataVocabulary,xs.contentVocabulary];kn.default=sd;var ss={},fo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(fo);Object.defineProperty(ss,"__esModule",{value:!0});const Pt=B,dn=fo,Hs=ve,id=X,od={message:({params:{discrError:e,tagName:t}})=>e===dn.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Pt._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},ad={keyword:"discriminator",type:"object",schemaType:"object",error:od,code(e){const{gen:t,data:r,schema:n,parentSchema:s,it:i}=e,{oneOf:o}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),l=t.const("tag",(0,Pt._)`${r}${(0,Pt.getProperty)(u)}`);t.if((0,Pt._)`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:dn.DiscrError.Tag,tag:l,tagName:u})),e.ok(f);function d(){const b=_();t.if(!1);for(const P in b)t.elseIf((0,Pt._)`${l} === ${P}`),t.assign(f,p(b[P]));t.else(),e.error(!1,{discrError:dn.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}function p(b){const P=t.name("valid"),O=e.subschema({keyword:"oneOf",schemaProp:b},P);return e.mergeEvaluated(O,Pt.Name),P}function _(){var b;const P={},O=g(s);let w=!0;for(let I=0;I<o.length;I++){let D=o[I];D!=null&&D.$ref&&!(0,id.schemaHasRulesButRef)(D,i.self.RULES)&&(D=Hs.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,D==null?void 0:D.$ref),D instanceof Hs.SchemaEnv&&(D=D.schema));const E=(b=D==null?void 0:D.properties)===null||b===void 0?void 0:b[u];if(typeof E!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);w=w&&(O||g(D)),$(E,I)}if(!w)throw new Error(`discriminator: "${u}" must be required`);return P;function g({required:I}){return Array.isArray(I)&&I.includes(u)}function $(I,D){if(I.const)S(I.const,D);else if(I.enum)for(const E of I.enum)S(E,D);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function S(I,D){if(typeof I!="string"||I in P)throw new Error(`discriminator: "${u}" values must be unique strings`);P[I]=D}}}};ss.default=ad;const cd="http://json-schema.org/draft-07/schema#",ld="http://json-schema.org/draft-07/schema#",ud="Core schema meta-schema",dd={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},fd=["object","boolean"],pd={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},hd={$schema:cd,$id:ld,title:ud,definitions:dd,type:fd,properties:pd,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=Ni,n=kn,s=ss,i=hd,o=["/properties"],u="http://json-schema.org/draft-07/schema";class f extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(P=>this.addVocabulary(P)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const P=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(P,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var l=Ne;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var d=B;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=tr;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var _=rr;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})(sn,sn.exports);var md=sn.exports;const yd=fa(md),gd="http://json-schema.org/schema",$d="#/definitions/Blueprint",_d={Blueprint:{type:"object",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:{networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},constants:{type:"object",additionalProperties:{type:"string"},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:{type:"array",items:{$ref:"#/definitions/SupportedPHPExtensionBundle"},description:"The PHP extensions to use."},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"}},additionalProperties:!1},SupportedPHPVersion:{type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},FileReference:{anyOf:[{$ref:"#/definitions/VFSReference"},{$ref:"#/definitions/LiteralReference"},{$ref:"#/definitions/CoreThemeReference"},{$ref:"#/definitions/CorePluginReference"},{$ref:"#/definitions/UrlReference"}]},VFSReference:{type:"object",properties:{resource:{type:"string",const:"vfs",description:"Identifies the file resource as Virtual File System (VFS)"},path:{type:"string",description:"The path to the file in the VFS"}},required:["resource","path"],additionalProperties:!1},LiteralReference:{type:"object",properties:{resource:{type:"string",const:"literal",description:"Identifies the file resource as a literal file"},name:{type:"string",description:"The name of the file"},contents:{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:"The contents of the file"}},required:["resource","name","contents"],additionalProperties:!1},CoreThemeReference:{type:"object",properties:{resource:{type:"string",const:"wordpress.org/themes",description:"Identifies the file resource as a WordPress Core theme"},slug:{type:"string",description:"The slug of the WordPress Core theme"}},required:["resource","slug"],additionalProperties:!1},CorePluginReference:{type:"object",properties:{resource:{type:"string",const:"wordpress.org/plugins",description:"Identifies the file resource as a WordPress Core plugin"},slug:{type:"string",description:"The slug of the WordPress Core plugin"}},required:["resource","slug"],additionalProperties:!1},UrlReference:{type:"object",properties:{resource:{type:"string",const:"url",description:"Identifies the file resource as a URL"},url:{type:"string",description:"The URL of the file"},caption:{type:"string",description:"Optional caption for displaying a progress message"}},required:["resource","url"],additionalProperties:!1},SupportedPHPExtensionBundle:{type:"string",enum:["kitchen-sink","light"]},StepDefinition:{type:"object",discriminator:{propertyName:"step"},required:["step"],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:
724
+ ${l}`)}}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}}const qs=()=>{};class Rs extends Cr{constructor(t,n){super(n),this.resource=t}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class Ss extends Cr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${St(this.resource.slug)}`}}class Ls extends Cr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${St(this.resource.slug)}`}}function St(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class Lt extends Se{constructor(t){super(),this.resource=t}async resolve(){return this.resource.resolve()}async setPlayground(t){return this.resource.setPlayground(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}}class xs extends Lt{async resolve(){return this.promise||(this.promise=super.resolve()),this.promise}}class Ns extends Lt{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>super.resolve()):super.resolve()}}const Fs={type:"object",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:{networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},constants:{type:"object",additionalProperties:{type:"string"},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:{type:"array",items:{$ref:"#/definitions/SupportedPHPExtensionBundle"},description:"The PHP extensions to use."},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"}},additionalProperties:!1},Cs={type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},Is={type:"string",enum:["kitchen-sink","light"]},xt=Object.prototype.hasOwnProperty;function ee(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;const u=e;let h=!1;const b=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let W;if(r.resource===void 0&&(W="resource")||r.path===void 0&&(W="path")){const J={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:W},message:"must have required property '"+W+"'"};i===null?i=[J]:i.push(J),e++}else{const J=e;for(const m in r)if(!(m==="resource"||m==="path")){const R={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};i===null?i=[R]:i.push(R),e++;break}if(J===e){if(r.resource!==void 0){let m=r.resource;const R=e;if(typeof m!="string"){const V={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}if(m!=="vfs"){const V={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};i===null?i=[V]:i.push(V),e++}var y=R===e}else var y=!0;if(y)if(r.path!==void 0){const m=e;if(typeof r.path!="string"){const V={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}var y=m===e}else var y=!0}}}else{const W={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[W]:i.push(W),e++}var E=b===e;if(h=h||E,!h){const W=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let R;if(r.resource===void 0&&(R="resource")||r.name===void 0&&(R="name")||r.contents===void 0&&(R="contents")){const V={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};i===null?i=[V]:i.push(V),e++}else{const V=e;for(const g in r)if(!(g==="resource"||g==="name"||g==="contents")){const O={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};i===null?i=[O]:i.push(O),e++;break}if(V===e){if(r.resource!==void 0){let g=r.resource;const O=e;if(typeof g!="string"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[w]:i.push(w),e++}if(g!=="literal"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};i===null?i=[w]:i.push(w),e++}var S=O===e}else var S=!0;if(S){if(r.name!==void 0){const g=e;if(typeof r.name!="string"){const w={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[w]:i.push(w),e++}var S=g===e}else var S=!0;if(S)if(r.contents!==void 0){let g=r.contents;const O=e,w=e;let $=!1;const v=e;if(typeof g!="string"){const N={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[N]:i.push(N),e++}var I=v===e;if($=$||I,!$){const N=e;if(e===N)if(g&&typeof g=="object"&&!Array.isArray(g)){let j;if(g.BYTES_PER_ELEMENT===void 0&&(j="BYTES_PER_ELEMENT")||g.buffer===void 0&&(j="buffer")||g.byteLength===void 0&&(j="byteLength")||g.byteOffset===void 0&&(j="byteOffset")||g.length===void 0&&(j="length")){const M={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:j},message:"must have required property '"+j+"'"};i===null?i=[M]:i.push(M),e++}else{const M=e;for(const q in g)if(!(q==="BYTES_PER_ELEMENT"||q==="buffer"||q==="byteLength"||q==="byteOffset"||q==="length")){let H=g[q];const te=e;if(!(typeof H=="number"&&isFinite(H))){const Z={instancePath:t+"/contents/"+q.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),e++}var _=te===e;if(!_)break}if(M===e){if(g.BYTES_PER_ELEMENT!==void 0){let q=g.BYTES_PER_ELEMENT;const H=e;if(!(typeof q=="number"&&isFinite(q))){const te={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"};i===null?i=[te]:i.push(te),e++}var D=H===e}else var D=!0;if(D){if(g.buffer!==void 0){let q=g.buffer;const H=e;if(e===H)if(q&&typeof q=="object"&&!Array.isArray(q)){let Z;if(q.byteLength===void 0&&(Z="byteLength")){const C={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:Z},message:"must have required property '"+Z+"'"};i===null?i=[C]:i.push(C),e++}else{const C=e;for(const U in q)if(U!=="byteLength"){const z={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:U},message:"must NOT have additional properties"};i===null?i=[z]:i.push(z),e++;break}if(C===e&&q.byteLength!==void 0){let U=q.byteLength;if(!(typeof U=="number"&&isFinite(U))){const z={instancePath:t+"/contents/buffer/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[z]:i.push(z),e++}}}}else{const Z={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Z]:i.push(Z),e++}var D=H===e}else var D=!0;if(D){if(g.byteLength!==void 0){let q=g.byteLength;const H=e;if(!(typeof q=="number"&&isFinite(q))){const Z={instancePath:t+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),e++}var D=H===e}else var D=!0;if(D){if(g.byteOffset!==void 0){let q=g.byteOffset;const H=e;if(!(typeof q=="number"&&isFinite(q))){const Z={instancePath:t+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),e++}var D=H===e}else var D=!0;if(D)if(g.length!==void 0){let q=g.length;const H=e;if(!(typeof q=="number"&&isFinite(q))){const Z={instancePath:t+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),e++}var D=H===e}else var D=!0}}}}}}else{const j={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[j]:i.push(j),e++}var I=N===e;$=$||I}if($)e=w,i!==null&&(w?i.length=w:i=null);else{const N={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[N]:i.push(N),e++}var S=O===e}else var S=!0}}}}else{const R={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[R]:i.push(R),e++}var E=W===e;if(h=h||E,!h){const R=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let O;if(r.resource===void 0&&(O="resource")||r.slug===void 0&&(O="slug")){const w={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};i===null?i=[w]:i.push(w),e++}else{const w=e;for(const $ in r)if(!($==="resource"||$==="slug")){const v={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};i===null?i=[v]:i.push(v),e++;break}if(w===e){if(r.resource!==void 0){let $=r.resource;const v=e;if(typeof $!="string"){const c={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[c]:i.push(c),e++}if($!=="wordpress.org/themes"){const c={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};i===null?i=[c]:i.push(c),e++}var X=v===e}else var X=!0;if(X)if(r.slug!==void 0){const $=e;if(typeof r.slug!="string"){const c={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[c]:i.push(c),e++}var X=$===e}else var X=!0}}}else{const O={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[O]:i.push(O),e++}var E=R===e;if(h=h||E,!h){const O=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let v;if(r.resource===void 0&&(v="resource")||r.slug===void 0&&(v="slug")){const c={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"};i===null?i=[c]:i.push(c),e++}else{const c=e;for(const N in r)if(!(N==="resource"||N==="slug")){const L={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};i===null?i=[L]:i.push(L),e++;break}if(c===e){if(r.resource!==void 0){let N=r.resource;const L=e;if(typeof N!="string"){const j={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),e++}if(N!=="wordpress.org/plugins"){const j={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};i===null?i=[j]:i.push(j),e++}var x=L===e}else var x=!0;if(x)if(r.slug!==void 0){const N=e;if(typeof r.slug!="string"){const j={instancePath:t+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),e++}var x=N===e}else var x=!0}}}else{const v={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[v]:i.push(v),e++}var E=O===e;if(h=h||E,!h){const v=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let L;if(r.resource===void 0&&(L="resource")||r.url===void 0&&(L="url")){const j={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};i===null?i=[j]:i.push(j),e++}else{const j=e;for(const M in r)if(!(M==="resource"||M==="url"||M==="caption")){const q={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:M},message:"must NOT have additional properties"};i===null?i=[q]:i.push(q),e++;break}if(j===e){if(r.resource!==void 0){let M=r.resource;const q=e;if(typeof M!="string"){const H={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),e++}if(M!=="url"){const H={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};i===null?i=[H]:i.push(H),e++}var P=q===e}else var P=!0;if(P){if(r.url!==void 0){const M=e;if(typeof r.url!="string"){const H={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),e++}var P=M===e}else var P=!0;if(P)if(r.caption!==void 0){const M=e;if(typeof r.caption!="string"){const H={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),e++}var P=M===e}else var P=!0}}}}else{const L={instancePath:t,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[L]:i.push(L),e++}var E=v===e;h=h||E}}}}if(h)e=u,i!==null&&(u?i.length=u:i=null);else{const W={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[W]:i.push(W),e++,ee.errors=i,!1}return ee.errors=i,e===0}const kr={type:"object",discriminator:{propertyName:"step"},required:["step"],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:
732
725
 
733
726
  - 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.
734
727
 
735
728
  - 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.
736
729
  This option is only kept in here to avoid breaking Blueprint schema validation
737
- 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"}},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"}},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."},pluginZipFile:{$ref:"#/definitions/FileReference",description:"The plugin zip file to install."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginZipFile","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."},themeZipFile:{$ref:"#/definitions/FileReference",description:"The theme zip file to install."},options:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the theme after installing it."},importStarterContent:{type:"boolean",description:"Whether to import the theme's starter content after installing it."}},additionalProperties:!1,description:"Optional installation options."}},required:["step","themeZipFile"]},{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",description:"The password to log in with. Defaults to 'password'."}},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:{type:"string",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:"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"]}]},InstallPluginOptions:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the plugin after installing it."}},additionalProperties:!1},PHPRequest:{type:"object",properties:{method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},url:{type:"string",description:"Request path or absolute URL."},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"}},{type:"object",additionalProperties:{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"}},{type:"object",properties:{size:{type:"number"},type:{type:"string"},lastModified:{type:"number"},name:{type:"string"},webkitRelativePath:{type:"string"}},required:["lastModified","name","size","type","webkitRelativePath"],additionalProperties:!1}]}}],description:"Request body. If an object is given, the request will be encoded as multipart and sent with a `multipart/form-data` header."}},required:["url"],additionalProperties:!1},HTTPMethod:{type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]},PHPRequestHeaders:{type:"object",additionalProperties:{type:"string"}},PHPRunOptions:{type:"object",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."}},additionalProperties:!1},WordPressInstallationOptions:{type:"object",properties:{adminUsername:{type:"string"},adminPassword:{type:"string"}},additionalProperties:!1}},wd={$schema:gd,$ref:$d,definitions:_d},{wpCLI:vd,...Bs}=sa,bd={...Bs,"wp-cli":vd,importFile:Bs.importWxr};function po(e,{progress:t=new Lr,semaphore:r=new Lo({concurrency:3}),onStepCompleted:n=()=>{}}={}){var p,_,b,P,O,w,g;e={...e,steps:(e.steps||[]).filter(Rd).filter(kd)};for(const $ of e.steps)typeof $=="object"&&$.step==="importFile"&&($.step="importWxr",he.warn('The "importFile" step is deprecated. Use "importWxr" instead.'));if(e.constants&&e.steps.unshift({step:"defineWpConfigConsts",consts:e.constants}),e.siteOptions&&e.steps.unshift({step:"setSiteOptions",options:e.siteOptions}),e.plugins){const $=e.plugins.map(S=>typeof S=="string"?S.startsWith("https://")?{resource:"url",url:S}:{resource:"wordpress.org/plugins",slug:S}:S).map(S=>({step:"installPlugin",pluginZipFile:S}));e.steps.unshift(...$)}e.login&&e.steps.push({step:"login",...e.login===!0?{username:"admin",password:"password"}:e.login}),e.phpExtensionBundles||(e.phpExtensionBundles=[]),e.phpExtensionBundles||(e.phpExtensionBundles=[]),e.phpExtensionBundles.length===0&&e.phpExtensionBundles.push("kitchen-sink");const s=(p=e.steps)==null?void 0:p.findIndex($=>typeof $=="object"&&($==null?void 0:$.step)==="wp-cli");s!==void 0&&s>-1&&(e.phpExtensionBundles.includes("light")&&(e.phpExtensionBundles=e.phpExtensionBundles.filter($=>$!=="light"),he.warn("The wpCli step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(_=e.steps)==null||_.splice(s,0,{step:"writeFile",data:{resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},path:"/tmp/wp-cli.phar"}));const i=(b=e.steps)==null?void 0:b.findIndex($=>typeof $=="object"&&($==null?void 0:$.step)==="importWxr");i!==void 0&&i>-1&&(e.phpExtensionBundles.includes("light")&&(e.phpExtensionBundles=e.phpExtensionBundles.filter($=>$!=="light"),he.warn("The importWxr step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(P=e.steps)==null||P.splice(i,0,{step:"installPlugin",pluginZipFile:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:o,errors:u}=Pd(e);if(!o){const $=new Error(`Invalid blueprint: ${u[0].message} at ${u[0].instancePath}`);throw $.errors=u,$}const f=e.steps||[],l=f.reduce(($,S)=>{var I;return $+(((I=S.progress)==null?void 0:I.weight)||1)},0),d=f.map($=>Od($,{semaphore:r,rootProgressTracker:t,totalProgressWeight:l}));return{versions:{php:Sd((O=e.preferredVersions)==null?void 0:O.php,Fr,Ri),wp:((w=e.preferredVersions)==null?void 0:w.wp)||"latest"},phpExtensions:Td([],e.phpExtensionBundles||[]),features:{networking:((g=e.features)==null?void 0:g.networking)??!1},run:async $=>{try{for(const{resources:S}of d)for(const I of S)I.setPlayground($),I.isAsync&&I.resolve();for(const[S,{run:I,step:D}]of Object.entries(d))try{const E=await I($);n(E,D)}catch(E){throw he.error(E),new Error(`Error when executing the blueprint step #${S} (${JSON.stringify(D)}) ${E instanceof Error?`: ${E.message}`:E}`,{cause:E})}}finally{try{await $.goTo(e.landingPage||"/")}catch{}t.finish()}}}}const Ed=new yd({discriminator:!0});let pr;function Pd(e){var s;pr=Ed.compile(wd);const t=pr(e);if(t)return{valid:t};const r=new Set;for(const i of pr.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||r.add(i.instancePath);const n=(s=pr.errors)==null?void 0:s.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&r.has(i.instancePath)));return{valid:t,errors:n}}function Sd(e,t,r){return e&&t.includes(e)?e:r}function Td(e,t){const r=ki.filter(s=>e.includes(s)),n=t.flatMap(s=>s in Ts?Ts[s]:[]);return Array.from(new Set([...r,...n]))}function Rd(e){return!!(typeof e=="object"&&e)}function kd(e){return["setPhpIniEntry","request"].includes(e.step)?(he.warn(`The "${e.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function Od(e,{semaphore:t,rootProgressTracker:r,totalProgressWeight:n}){var d;const s=r.stage((((d=e.progress)==null?void 0:d.weight)||1)/n),i={};for(const p of Object.keys(e)){let _=e[p];ya(_)&&(_=ft.create(_,{semaphore:t})),i[p]=_}const o=async p=>{var _;try{return s.fillSlowly(),await bd[e.step](p,await Cd(i),{tracker:s,initialCaption:(_=e.progress)==null?void 0:_.caption})}finally{s.finish()}},u=Gs(i),f=Gs(i).filter(p=>p.isAsync),l=1/(f.length+1);for(const p of f)p.progress=s.stage(l);return{run:o,step:e,resources:u}}function Gs(e){const t=[];for(const r in e){const n=e[r];n instanceof ft&&t.push(n)}return t}async function Cd(e){const t={};for(const r in e){const n=e[r];n instanceof ft?t[r]=await n.resolve():t[r]=n}return t}async function ho(e,t){await e.run(t)}function Nd(){}/**
730
+ 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"}},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"}},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."},pluginZipFile:{$ref:"#/definitions/FileReference",description:"The plugin zip file to install."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginZipFile","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."},themeZipFile:{$ref:"#/definitions/FileReference",description:"The theme zip file to install."},options:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the theme after installing it."},importStarterContent:{type:"boolean",description:"Whether to import the theme's starter content after installing it."}},additionalProperties:!1,description:"Optional installation options."}},required:["step","themeZipFile"]},{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",description:"The password to log in with. Defaults to 'password'."}},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:{type:"string",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:"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"]}]},Nt={type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ye(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let X;if(r.url===void 0&&(X="url"))return ye.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:X},message:"must have required property '"+X+"'"}],!1;{const x=e;for(const P in r)if(!(P==="method"||P==="url"||P==="headers"||P==="body"))return ye.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(x===e){if(r.method!==void 0){let P=r.method;const W=e;if(typeof P!="string")return ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(P==="GET"||P==="POST"||P==="HEAD"||P==="OPTIONS"||P==="PATCH"||P==="PUT"||P==="DELETE"))return ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:Nt.enum},message:"must be equal to one of the allowed values"}],!1;var u=W===e}else var u=!0;if(u){if(r.url!==void 0){const P=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 u=P===e}else var u=!0;if(u){if(r.headers!==void 0){let P=r.headers;const W=e;if(e===e)if(P&&typeof P=="object"&&!Array.isArray(P))for(const R in P){const V=e;if(typeof P[R]!="string")return ye.errors=[{instancePath:t+"/headers/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=V===e;if(!h)break}else return ye.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=W===e}else var u=!0;if(u)if(r.body!==void 0){let P=r.body;const W=e,J=e;let m=!1;const R=e;if(typeof P!="string"){const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[g]:i.push(g),e++}var b=R===e;if(m=m||b,!m){const g=e;if(e===g)if(P&&typeof P=="object"&&!Array.isArray(P)){let w;if(P.BYTES_PER_ELEMENT===void 0&&(w="BYTES_PER_ELEMENT")||P.buffer===void 0&&(w="buffer")||P.byteLength===void 0&&(w="byteLength")||P.byteOffset===void 0&&(w="byteOffset")||P.length===void 0&&(w="length")){const $={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"};i===null?i=[$]:i.push($),e++}else{const $=e;for(const v in P)if(!(v==="BYTES_PER_ELEMENT"||v==="buffer"||v==="byteLength"||v==="byteOffset"||v==="length")){let c=P[v];const N=e;if(!(typeof c=="number"&&isFinite(c))){const L={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[L]:i.push(L),e++}var k=N===e;if(!k)break}if($===e){if(P.BYTES_PER_ELEMENT!==void 0){let v=P.BYTES_PER_ELEMENT;const c=e;if(!(typeof v=="number"&&isFinite(v))){const N={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"};i===null?i=[N]:i.push(N),e++}var y=c===e}else var y=!0;if(y){if(P.buffer!==void 0){let v=P.buffer;const c=e;if(e===c)if(v&&typeof v=="object"&&!Array.isArray(v)){let L;if(v.byteLength===void 0&&(L="byteLength")){const j={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};i===null?i=[j]:i.push(j),e++}else{const j=e;for(const M in v)if(M!=="byteLength"){const q={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:M},message:"must NOT have additional properties"};i===null?i=[q]:i.push(q),e++;break}if(j===e&&v.byteLength!==void 0){let M=v.byteLength;if(!(typeof M=="number"&&isFinite(M))){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"};i===null?i=[q]:i.push(q),e++}}}}else{const L={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[L]:i.push(L),e++}var y=c===e}else var y=!0;if(y){if(P.byteLength!==void 0){let v=P.byteLength;const c=e;if(!(typeof v=="number"&&isFinite(v))){const L={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[L]:i.push(L),e++}var y=c===e}else var y=!0;if(y){if(P.byteOffset!==void 0){let v=P.byteOffset;const c=e;if(!(typeof v=="number"&&isFinite(v))){const L={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[L]:i.push(L),e++}var y=c===e}else var y=!0;if(y)if(P.length!==void 0){let v=P.length;const c=e;if(!(typeof v=="number"&&isFinite(v))){const L={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[L]:i.push(L),e++}var y=c===e}else var y=!0}}}}}}else{const w={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[w]:i.push(w),e++}var b=g===e;if(m=m||b,!m){const w=e;if(e===w)if(P&&typeof P=="object"&&!Array.isArray(P))for(const v in P){let c=P[v];const N=e,L=e;let j=!1;const M=e;if(typeof c!="string"){const q={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}var E=M===e;if(j=j||E,!j){const q=e;if(e===q)if(c&&typeof c=="object"&&!Array.isArray(c)){let te;if(c.BYTES_PER_ELEMENT===void 0&&(te="BYTES_PER_ELEMENT")||c.buffer===void 0&&(te="buffer")||c.byteLength===void 0&&(te="byteLength")||c.byteOffset===void 0&&(te="byteOffset")||c.length===void 0&&(te="length")){const Z={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:te},message:"must have required property '"+te+"'"};i===null?i=[Z]:i.push(Z),e++}else{const Z=e;for(const C in c)if(!(C==="BYTES_PER_ELEMENT"||C==="buffer"||C==="byteLength"||C==="byteOffset"||C==="length")){let U=c[C];const z=e;if(!(typeof U=="number"&&isFinite(U))){const G={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+C.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"};i===null?i=[G]:i.push(G),e++}var S=z===e;if(!S)break}if(Z===e){if(c.BYTES_PER_ELEMENT!==void 0){let C=c.BYTES_PER_ELEMENT;const U=e;if(!(typeof C=="number"&&isFinite(C))){const z={instancePath:t+"/body/"+v.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"};i===null?i=[z]:i.push(z),e++}var I=U===e}else var I=!0;if(I){if(c.buffer!==void 0){let C=c.buffer;const U=e;if(e===U)if(C&&typeof C=="object"&&!Array.isArray(C)){let G;if(C.byteLength===void 0&&(G="byteLength")){const re={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:G},message:"must have required property '"+G+"'"};i===null?i=[re]:i.push(re),e++}else{const re=e;for(const pe in C)if(pe!=="byteLength"){const le={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:pe},message:"must NOT have additional properties"};i===null?i=[le]:i.push(le),e++;break}if(re===e&&C.byteLength!==void 0){let pe=C.byteLength;if(!(typeof pe=="number"&&isFinite(pe))){const le={instancePath:t+"/body/"+v.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"};i===null?i=[le]:i.push(le),e++}}}}else{const G={instancePath:t+"/body/"+v.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"};i===null?i=[G]:i.push(G),e++}var I=U===e}else var I=!0;if(I){if(c.byteLength!==void 0){let C=c.byteLength;const U=e;if(!(typeof C=="number"&&isFinite(C))){const G={instancePath:t+"/body/"+v.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"};i===null?i=[G]:i.push(G),e++}var I=U===e}else var I=!0;if(I){if(c.byteOffset!==void 0){let C=c.byteOffset;const U=e;if(!(typeof C=="number"&&isFinite(C))){const G={instancePath:t+"/body/"+v.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"};i===null?i=[G]:i.push(G),e++}var I=U===e}else var I=!0;if(I)if(c.length!==void 0){let C=c.length;const U=e;if(!(typeof C=="number"&&isFinite(C))){const G={instancePath:t+"/body/"+v.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"};i===null?i=[G]:i.push(G),e++}var I=U===e}else var I=!0}}}}}}else{const te={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[te]:i.push(te),e++}var E=q===e;if(j=j||E,!j){const te=e;if(e===te)if(c&&typeof c=="object"&&!Array.isArray(c)){let C;if(c.lastModified===void 0&&(C="lastModified")||c.name===void 0&&(C="name")||c.size===void 0&&(C="size")||c.type===void 0&&(C="type")||c.webkitRelativePath===void 0&&(C="webkitRelativePath")){const U={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};i===null?i=[U]:i.push(U),e++}else{const U=e;for(const z in c)if(!(z==="size"||z==="type"||z==="lastModified"||z==="name"||z==="webkitRelativePath")){const G={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:z},message:"must NOT have additional properties"};i===null?i=[G]:i.push(G),e++;break}if(U===e){if(c.size!==void 0){let z=c.size;const G=e;if(!(typeof z=="number"&&isFinite(z))){const re={instancePath:t+"/body/"+v.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"};i===null?i=[re]:i.push(re),e++}var _=G===e}else var _=!0;if(_){if(c.type!==void 0){const z=e;if(typeof c.type!="string"){const re={instancePath:t+"/body/"+v.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"};i===null?i=[re]:i.push(re),e++}var _=z===e}else var _=!0;if(_){if(c.lastModified!==void 0){let z=c.lastModified;const G=e;if(!(typeof z=="number"&&isFinite(z))){const pe={instancePath:t+"/body/"+v.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"};i===null?i=[pe]:i.push(pe),e++}var _=G===e}else var _=!0;if(_){if(c.name!==void 0){const z=e;if(typeof c.name!="string"){const re={instancePath:t+"/body/"+v.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"};i===null?i=[re]:i.push(re),e++}var _=z===e}else var _=!0;if(_)if(c.webkitRelativePath!==void 0){const z=e;if(typeof c.webkitRelativePath!="string"){const re={instancePath:t+"/body/"+v.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"};i===null?i=[re]:i.push(re),e++}var _=z===e}else var _=!0}}}}}}else{const C={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[C]:i.push(C),e++}var E=te===e;j=j||E}}if(j)e=L,i!==null&&(L?i.length=L:i=null);else{const q={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[q]:i.push(q),e++}var D=N===e;if(!D)break}else{const v={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[v]:i.push(v),e++}var b=w===e;m=m||b}}if(m)e=J,i!==null&&(J?i.length=J:i=null);else{const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[g]:i.push(g),e++,ye.errors=i,!1}var u=W===e}else var u=!0}}}}}else return ye.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ye.errors=i,e===0}const Ws={type:"object",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."}},additionalProperties:!1};function ne(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const I=e;for(const _ in r)if(!xt.call(Ws.properties,_))return ne.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;if(I===e){if(r.relativeUri!==void 0){const _=e;if(typeof r.relativeUri!="string")return ne.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=_===e}else var u=!0;if(u){if(r.scriptPath!==void 0){const _=e;if(typeof r.scriptPath!="string")return ne.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=_===e}else var u=!0;if(u){if(r.protocol!==void 0){const _=e;if(typeof r.protocol!="string")return ne.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=_===e}else var u=!0;if(u){if(r.method!==void 0){let _=r.method;const D=e;if(typeof _!="string")return ne.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(_==="GET"||_==="POST"||_==="HEAD"||_==="OPTIONS"||_==="PATCH"||_==="PUT"||_==="DELETE"))return ne.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:Nt.enum},message:"must be equal to one of the allowed values"}],!1;var u=D===e}else var u=!0;if(u){if(r.headers!==void 0){let _=r.headers;const D=e;if(e===e)if(_&&typeof _=="object"&&!Array.isArray(_))for(const P in _){const W=e;if(typeof _[P]!="string")return ne.errors=[{instancePath:t+"/headers/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=W===e;if(!h)break}else return ne.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=D===e}else var u=!0;if(u){if(r.body!==void 0){let _=r.body;const D=e,X=e;let x=!1;const P=e;if(typeof _!="string"){const J={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[J]:i.push(J),e++}var b=P===e;if(x=x||b,!x){const J=e;if(e===J)if(_&&typeof _=="object"&&!Array.isArray(_)){let R;if(_.BYTES_PER_ELEMENT===void 0&&(R="BYTES_PER_ELEMENT")||_.buffer===void 0&&(R="buffer")||_.byteLength===void 0&&(R="byteLength")||_.byteOffset===void 0&&(R="byteOffset")||_.length===void 0&&(R="length")){const V={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};i===null?i=[V]:i.push(V),e++}else{const V=e;for(const g in _)if(!(g==="BYTES_PER_ELEMENT"||g==="buffer"||g==="byteLength"||g==="byteOffset"||g==="length")){let O=_[g];const w=e;if(!(typeof O=="number"&&isFinite(O))){const $={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"};i===null?i=[$]:i.push($),e++}var k=w===e;if(!k)break}if(V===e){if(_.BYTES_PER_ELEMENT!==void 0){let g=_.BYTES_PER_ELEMENT;const O=e;if(!(typeof g=="number"&&isFinite(g))){const w={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"};i===null?i=[w]:i.push(w),e++}var y=O===e}else var y=!0;if(y){if(_.buffer!==void 0){let g=_.buffer;const O=e;if(e===O)if(g&&typeof g=="object"&&!Array.isArray(g)){let $;if(g.byteLength===void 0&&($="byteLength")){const v={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"};i===null?i=[v]:i.push(v),e++}else{const v=e;for(const c in g)if(c!=="byteLength"){const N={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};i===null?i=[N]:i.push(N),e++;break}if(v===e&&g.byteLength!==void 0){let c=g.byteLength;if(!(typeof c=="number"&&isFinite(c))){const N={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}}}}else{const $={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[$]:i.push($),e++}var y=O===e}else var y=!0;if(y){if(_.byteLength!==void 0){let g=_.byteLength;const O=e;if(!(typeof g=="number"&&isFinite(g))){const $={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[$]:i.push($),e++}var y=O===e}else var y=!0;if(y){if(_.byteOffset!==void 0){let g=_.byteOffset;const O=e;if(!(typeof g=="number"&&isFinite(g))){const $={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[$]:i.push($),e++}var y=O===e}else var y=!0;if(y)if(_.length!==void 0){let g=_.length;const O=e;if(!(typeof g=="number"&&isFinite(g))){const $={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[$]:i.push($),e++}var y=O===e}else var y=!0}}}}}}else{const R={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[R]:i.push(R),e++}var b=J===e;x=x||b}if(x)e=X,i!==null&&(X?i.length=X:i=null);else{const J={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[J]:i.push(J),e++,ne.errors=i,!1}var u=D===e}else var u=!0;if(u){if(r.env!==void 0){let _=r.env;const D=e;if(e===D)if(_&&typeof _=="object"&&!Array.isArray(_))for(const x in _){const P=e;if(typeof _[x]!="string")return ne.errors=[{instancePath:t+"/env/"+x.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=P===e;if(!E)break}else return ne.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=D===e}else var u=!0;if(u){if(r.$_SERVER!==void 0){let _=r.$_SERVER;const D=e;if(e===D)if(_&&typeof _=="object"&&!Array.isArray(_))for(const x in _){const P=e;if(typeof _[x]!="string")return ne.errors=[{instancePath:t+"/$_SERVER/"+x.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=P===e;if(!S)break}else return ne.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=D===e}else var u=!0;if(u)if(r.code!==void 0){const _=e;if(typeof r.code!="string")return ne.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=_===e}else var u=!0}}}}}}}}}else return ne.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ne.errors=i,e===0}function o(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let br;if(r.step===void 0&&(br="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:br},message:"must have required property '"+br+"'"}],!1;{const Y=r.step;if(typeof Y=="string")if(Y==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.pluginPath===void 0&&(d="pluginPath")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="pluginPath"||s==="pluginName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 u=T===e}else var u=!0;if(u)if(s.caption!==void 0){const a=e;if(typeof s.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 u=a===e}else var u=!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 h=f===e}else var h=!0;if(h){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 h=f===e}else var h=!0;if(h){if(r.pluginPath!==void 0){const s=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 h=s===e}else var h=!0;if(h)if(r.pluginName!==void 0){const s=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 h=s===e}else var h=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="activateTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.themeFolderName===void 0&&(d="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 b=T===e}else var b=!0;if(b)if(s.caption!==void 0){const a=e;if(typeof s.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 b=a===e}else var b=!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 k=f===e}else var k=!0;if(k){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 k=f===e}else var k=!0;if(k)if(r.themeFolderName!==void 0){const s=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 k=s===e}else var k=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="cp"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.fromPath===void 0&&(d="fromPath")||r.step===void 0&&(d="step")||r.toPath===void 0&&(d="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="fromPath"||s==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 y=T===e}else var y=!0;if(y)if(s.caption!==void 0){const a=e;if(typeof s.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 y=a===e}else var y=!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 E=f===e}else var E=!0;if(E){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 E=f===e}else var E=!0;if(E){if(r.fromPath!==void 0){const s=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 E=s===e}else var E=!0;if(E)if(r.toPath!==void 0){const s=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 E=s===e}else var E=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="defineWpConfigConsts"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.consts===void 0&&(d="consts")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="consts"||s==="method"||s==="virtualize"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 S=T===e}else var S=!0;if(S)if(s.caption!==void 0){const a=e;if(typeof s.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 S=a===e}else var S=!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 I=f===e}else var I=!0;if(I){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 I=f===e}else var I=!0;if(I){if(r.consts!==void 0){let s=r.consts;const f=e;if(e===f&&!(s&&typeof s=="object"&&!Array.isArray(s)))return o.errors=[{instancePath:t+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var I=f===e}else var I=!0;if(I){if(r.method!==void 0){let s=r.method;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="rewrite-wp-config"||s==="define-before-run"))return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:kr.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var I=f===e}else var I=!0;if(I)if(r.virtualize!==void 0){const s=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=s===e}else var I=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="defineSiteUrl"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.siteUrl===void 0&&(d="siteUrl")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="siteUrl"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 _=T===e}else var _=!0;if(_)if(s.caption!==void 0){const a=e;if(typeof s.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 _=a===e}else var _=!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 D=f===e}else var D=!0;if(D){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 D=f===e}else var D=!0;if(D)if(r.siteUrl!==void 0){const s=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 D=s===e}else var D=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="enableMultisite"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 X=T===e}else var X=!0;if(X)if(s.caption!==void 0){const a=e;if(typeof s.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 X=a===e}else var X=!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 x=f===e}else var x=!0;if(x)if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 x=f===e}else var x=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="importWxr"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.file===void 0&&(d="file")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="file"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 P=T===e}else var P=!0;if(P)if(s.caption!==void 0){const a=e;if(typeof s.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 P=a===e}else var P=!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 W=f===e}else var W=!0;if(W){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 W=f===e}else var W=!0;if(W)if(r.file!==void 0){const s=e;ee(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var W=s===e}else var W=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="importThemeStarterContent"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="themeSlug"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 J=T===e}else var J=!0;if(J)if(s.caption!==void 0){const a=e;if(typeof s.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 J=a===e}else var J=!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 m=f===e}else var m=!0;if(m){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 m=f===e}else var m=!0;if(m)if(r.themeSlug!==void 0){const s=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 m=s===e}else var m=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="importWordPressFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.wordPressFilesZip===void 0&&(d="wordPressFilesZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="wordPressFilesZip"||s==="pathInZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 R=T===e}else var R=!0;if(R)if(s.caption!==void 0){const a=e;if(typeof s.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 R=a===e}else var R=!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 V=f===e}else var V=!0;if(V){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 V=f===e}else var V=!0;if(V){if(r.wordPressFilesZip!==void 0){const s=e;ee(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var V=s===e}else var V=!0;if(V)if(r.pathInZip!==void 0){const s=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 V=s===e}else var V=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="installPlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.pluginZipFile===void 0&&(d="pluginZipFile")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="ifAlreadyInstalled"||s==="step"||s==="pluginZipFile"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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=T===e}else var g=!0;if(g)if(s.caption!==void 0){const a=e;if(typeof s.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 O=f===e}else var O=!0;if(O){if(r.ifAlreadyInstalled!==void 0){let s=r.ifAlreadyInstalled;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="overwrite"||s==="skip"||s==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:kr.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var O=f===e}else var O=!0;if(O){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 O=f===e}else var O=!0;if(O){if(r.pluginZipFile!==void 0){const s=e;ee(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var O=s===e}else var O=!0;if(O)if(r.options!==void 0){let s=r.options;const f=e;if(e===e)if(s&&typeof s=="object"&&!Array.isArray(s)){const T=e;for(const ve in s)if(ve!=="activate")return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ve},message:"must NOT have additional properties"}],!1;if(T===e&&s.activate!==void 0&&typeof s.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}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var O=f===e}else var O=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="installTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.themeZipFile===void 0&&(d="themeZipFile"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="ifAlreadyInstalled"||s==="step"||s==="themeZipFile"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 w=T===e}else var w=!0;if(w)if(s.caption!==void 0){const a=e;if(typeof s.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 w=a===e}else var w=!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 $=f===e}else var $=!0;if($){if(r.ifAlreadyInstalled!==void 0){let s=r.ifAlreadyInstalled;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="overwrite"||s==="skip"||s==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:kr.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var $=f===e}else var $=!0;if($){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 $=f===e}else var $=!0;if($){if(r.themeZipFile!==void 0){const s=e;ee(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var $=s===e}else var $=!0;if($)if(r.options!==void 0){let s=r.options;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const a=e;for(const T in s)if(!(T==="activate"||T==="importStarterContent"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/10/properties/options/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:T},message:"must NOT have additional properties"}],!1;if(a===e){if(s.activate!==void 0){const T=e;if(typeof s.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/oneOf/10/properties/options/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var v=T===e}else var v=!0;if(v)if(s.importStarterContent!==void 0){const T=e;if(typeof s.importStarterContent!="boolean")return o.errors=[{instancePath:t+"/options/importStarterContent",schemaPath:"#/oneOf/10/properties/options/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var v=T===e}else var v=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/10/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=f===e}else var $=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="login"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="username"||s==="password"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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=T===e}else var c=!0;if(c)if(s.caption!==void 0){const a=e;if(typeof s.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 N=f===e}else var N=!0;if(N){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 N=f===e}else var N=!0;if(N){if(r.username!==void 0){const s=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 N=s===e}else var N=!0;if(N)if(r.password!==void 0){const s=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 N=s===e}else var N=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="mkdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 L=T===e}else var L=!0;if(L)if(s.caption!==void 0){const a=e;if(typeof s.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 L=a===e}else var L=!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 j=f===e}else var j=!0;if(j){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 j=f===e}else var j=!0;if(j)if(r.path!==void 0){const s=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 j=s===e}else var j=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.fromPath===void 0&&(d="fromPath")||r.step===void 0&&(d="step")||r.toPath===void 0&&(d="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="fromPath"||s==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 M=T===e}else var M=!0;if(M)if(s.caption!==void 0){const a=e;if(typeof s.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 M=a===e}else var M=!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 q=f===e}else var q=!0;if(q){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 q=f===e}else var q=!0;if(q){if(r.fromPath!==void 0){const s=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 q=s===e}else var q=!0;if(q)if(r.toPath!==void 0){const s=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 q=s===e}else var q=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="resetData"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 H=T===e}else var H=!0;if(H)if(s.caption!==void 0){const a=e;if(typeof s.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 H=a===e}else var H=!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 te=f===e}else var te=!0;if(te)if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 te=f===e}else var te=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="request"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.request===void 0&&(d="request")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="request"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 Z=T===e}else var Z=!0;if(Z)if(s.caption!==void 0){const a=e;if(typeof s.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 Z=a===e}else var Z=!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 C=f===e}else var C=!0;if(C){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 C=f===e}else var C=!0;if(C)if(r.request!==void 0){const s=e;ye(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:l})||(i=i===null?ye.errors:i.concat(ye.errors),e=i.length);var C=s===e}else var C=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="rm"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 U=T===e}else var U=!0;if(U)if(s.caption!==void 0){const a=e;if(typeof s.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 U=a===e}else var U=!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 z=f===e}else var z=!0;if(z){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 z=f===e}else var z=!0;if(z)if(r.path!==void 0){const s=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 z=s===e}else var z=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 G=T===e}else var G=!0;if(G)if(s.caption!==void 0){const a=e;if(typeof s.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 G=a===e}else var G=!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 re=f===e}else var re=!0;if(re){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 re=f===e}else var re=!0;if(re)if(r.path!==void 0){const s=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 re=s===e}else var re=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="runPHP"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.code===void 0&&(d="code")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="code"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 pe=T===e}else var pe=!0;if(pe)if(s.caption!==void 0){const a=e;if(typeof s.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 pe=a===e}else var pe=!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 le=f===e}else var le=!0;if(le){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 le=f===e}else var le=!0;if(le)if(r.code!==void 0){const s=e;if(typeof r.code!="string")return o.errors=[{instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var le=s===e}else var le=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="runPHPWithOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 De=T===e}else var De=!0;if(De)if(s.caption!==void 0){const a=e;if(typeof s.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 De=a===e}else var De=!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=f===e}else var $e=!0;if($e){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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=f===e}else var $e=!0;if($e)if(r.options!==void 0){const s=e;ne(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:l})||(i=i===null?ne.errors:i.concat(ne.errors),e=i.length);var $e=s===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(Y==="runWpInstallationWizard"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Me=T===e}else var Me=!0;if(Me)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Me=a===e}else var Me=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Te=f===e}else var Te=!0;if(Te){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 Te=f===e}else var Te=!0;if(Te)if(r.options!==void 0){let s=r.options;const f=e;if(e===e)if(s&&typeof s=="object"&&!Array.isArray(s)){const T=e;for(const ve in s)if(!(ve==="adminUsername"||ve==="adminPassword"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ve},message:"must NOT have additional properties"}],!1;if(T===e){if(s.adminUsername!==void 0){const ve=e;if(typeof s.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 Be=ve===e}else var Be=!0;if(Be)if(s.adminPassword!==void 0){const ve=e;if(typeof s.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 Be=ve===e}else var Be=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Te=f===e}else var Te=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="runSql"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.sql===void 0&&(d="sql")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="sql"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 Ue=T===e}else var Ue=!0;if(Ue)if(s.caption!==void 0){const a=e;if(typeof s.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 Ue=a===e}else var Ue=!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 je=f===e}else var je=!0;if(je){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 je=f===e}else var je=!0;if(je)if(r.sql!==void 0){const s=e;ee(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var je=s===e}else var je=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="setSiteOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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=T===e}else var ze=!0;if(ze)if(s.caption!==void 0){const a=e;if(typeof s.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 Ae=f===e}else var Ae=!0;if(Ae){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 Ae=f===e}else var Ae=!0;if(Ae)if(r.options!==void 0){let s=r.options;const f=e;if(e===f&&!(s&&typeof s=="object"&&!Array.isArray(s)))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=f===e}else var Ae=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="unzip"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.extractToPath===void 0&&(d="extractToPath")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="zipFile"||s==="zipPath"||s==="extractToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 Ve=T===e}else var Ve=!0;if(Ve)if(s.caption!==void 0){const a=e;if(typeof s.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 Ve=a===e}else var Ve=!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 fe=f===e}else var fe=!0;if(fe){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 fe=f===e}else var fe=!0;if(fe){if(r.zipFile!==void 0){const s=e;ee(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var fe=s===e}else var fe=!0;if(fe){if(r.zipPath!==void 0){const s=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 fe=s===e}else var fe=!0;if(fe)if(r.extractToPath!==void 0){const s=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 fe=s===e}else var fe=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="updateUserMeta"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.meta===void 0&&(d="meta")||r.step===void 0&&(d="step")||r.userId===void 0&&(d="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="meta"||s==="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 He=T===e}else var He=!0;if(He)if(s.caption!==void 0){const a=e;if(typeof s.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 He=a===e}else var He=!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 ge=f===e}else var ge=!0;if(ge){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 ge=f===e}else var ge=!0;if(ge){if(r.meta!==void 0){let s=r.meta;const f=e;if(e===f&&!(s&&typeof s=="object"&&!Array.isArray(s)))return o.errors=[{instancePath:t+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ge=f===e}else var ge=!0;if(ge)if(r.userId!==void 0){let s=r.userId;const f=e;if(!(typeof s=="number"&&isFinite(s)))return o.errors=[{instancePath:t+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ge=f===e}else var ge=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="writeFile"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.data===void 0&&(d="data")||r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"||s==="data"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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=T===e}else var Ge=!0;if(Ge)if(s.caption!==void 0){const a=e;if(typeof s.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 be=f===e}else var be=!0;if(be){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="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 be=f===e}else var be=!0;if(be){if(r.path!==void 0){const s=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 be=s===e}else var be=!0;if(be)if(r.data!==void 0){let s=r.data;const f=e,A=e;let a=!1;const T=e;ee(s,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var Ne=T===e;if(a=a||Ne,!a){const de=e;if(typeof s!="string"){const Pe={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Pe]:i.push(Pe),e++}var Ne=de===e;if(a=a||Ne,!a){const Pe=e;if(e===Pe)if(s&&typeof s=="object"&&!Array.isArray(s)){let he;if(s.BYTES_PER_ELEMENT===void 0&&(he="BYTES_PER_ELEMENT")||s.buffer===void 0&&(he="buffer")||s.byteLength===void 0&&(he="byteLength")||s.byteOffset===void 0&&(he="byteOffset")||s.length===void 0&&(he="length")){const Je={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:he},message:"must have required property '"+he+"'"};i===null?i=[Je]:i.push(Je),e++}else{const Je=e;for(const Q in s)if(!(Q==="BYTES_PER_ELEMENT"||Q==="buffer"||Q==="byteLength"||Q==="byteOffset"||Q==="length")){let ce=s[Q];const Ke=e;if(!(typeof ce=="number"&&isFinite(ce))){const oe={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"};i===null?i=[oe]:i.push(oe),e++}var Gt=Ke===e;if(!Gt)break}if(Je===e){if(s.BYTES_PER_ELEMENT!==void 0){let Q=s.BYTES_PER_ELEMENT;const ce=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"};i===null?i=[Ke]:i.push(Ke),e++}var ue=ce===e}else var ue=!0;if(ue){if(s.buffer!==void 0){let Q=s.buffer;const ce=e;if(e===ce)if(Q&&typeof Q=="object"&&!Array.isArray(Q)){let oe;if(Q.byteLength===void 0&&(oe="byteLength")){const Xe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:oe},message:"must have required property '"+oe+"'"};i===null?i=[Xe]:i.push(Xe),e++}else{const Xe=e;for(const Fe in Q)if(Fe!=="byteLength"){const Ce={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Fe},message:"must NOT have additional properties"};i===null?i=[Ce]:i.push(Ce),e++;break}if(Xe===e&&Q.byteLength!==void 0){let Fe=Q.byteLength;if(!(typeof Fe=="number"&&isFinite(Fe))){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"};i===null?i=[Ce]:i.push(Ce),e++}}}}else{const oe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0;if(ue){if(s.byteLength!==void 0){let Q=s.byteLength;const ce=e;if(!(typeof Q=="number"&&isFinite(Q))){const oe={instancePath:t+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0;if(ue){if(s.byteOffset!==void 0){let Q=s.byteOffset;const ce=e;if(!(typeof Q=="number"&&isFinite(Q))){const oe={instancePath:t+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0;if(ue)if(s.length!==void 0){let Q=s.length;const ce=e;if(!(typeof Q=="number"&&isFinite(Q))){const oe={instancePath:t+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0}}}}}}else{const he={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[he]:i.push(he),e++}var Ne=Pe===e;a=a||Ne}}if(a)e=A,i!==null&&(A?i.length=A:i=null);else{const de={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[de]:i.push(de),e++,o.errors=i,!1}var be=f===e}else var be=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="wp-cli"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.command===void 0&&(d="command")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="command"||s==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 Ye=T===e}else var Ye=!0;if(Ye)if(s.caption!==void 0){const a=e;if(typeof s.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 Ye=a===e}else var Ye=!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 we=f===e}else var we=!0;if(we){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="wp-cli")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var we=f===e}else var we=!0;if(we){if(r.command!==void 0){let s=r.command;const f=e,A=e;let a=!1;const T=e;if(typeof s!="string"){const de={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[de]:i.push(de),e++}var gr=T===e;if(a=a||gr,!a){const de=e;if(e===de)if(Array.isArray(s)){var Dr=!0;const Pe=s.length;for(let Qe=0;Qe<Pe;Qe++){const he=e;if(typeof s[Qe]!="string"){const Q={instancePath:t+"/command/"+Qe,schemaPath:"#/oneOf/26/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Q]:i.push(Q),e++}var Dr=he===e;if(!Dr)break}}else{const Pe={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};i===null?i=[Pe]:i.push(Pe),e++}var gr=de===e;a=a||gr}if(a)e=A,i!==null&&(A?i.length=A:i=null);else{const de={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[de]:i.push(de),e++,o.errors=i,!1}var we=f===e}else var we=!0;if(we)if(r.wpCliPath!==void 0){const s=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/26/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var we=s===e}else var we=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="setSiteLanguage"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.language===void 0&&(d="language")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="language"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)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(A===e){if(s.weight!==void 0){let a=s.weight;const T=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 Ze=T===e}else var Ze=!0;if(Ze)if(s.caption!==void 0){const a=e;if(typeof s.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 Ze=a===e}else var Ze=!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 qe=f===e}else var qe=!0;if(qe){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="setSiteLanguage")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var qe=f===e}else var qe=!0;if(qe)if(r.language!==void 0){const s=e;if(typeof r.language!="string")return o.errors=[{instancePath:t+"/language",schemaPath:"#/oneOf/27/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var qe=s===e}else var qe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/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:Y},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:Y},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=i,e===0}function B(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const J=e;for(const m in r)if(!xt.call(Fs.properties,m))return B.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(J===e){if(r.landingPage!==void 0){const m=e;if(typeof r.landingPage!="string")return B.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=m===e}else var u=!0;if(u){if(r.description!==void 0){const m=e;if(typeof r.description!="string")return B.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=m===e}else var u=!0;if(u){if(r.meta!==void 0){let m=r.meta;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m)){let g;if(m.title===void 0&&(g="title")||m.author===void 0&&(g="author"))return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"}],!1;{const O=e;for(const w in m)if(!(w==="title"||w==="description"||w==="author"||w==="categories"))return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"}],!1;if(O===e){if(m.title!==void 0){const w=e;if(typeof m.title!="string")return B.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=w===e}else var h=!0;if(h){if(m.description!==void 0){const w=e;if(typeof m.description!="string")return B.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=w===e}else var h=!0;if(h){if(m.author!==void 0){const w=e;if(typeof m.author!="string")return B.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=w===e}else var h=!0;if(h)if(m.categories!==void 0){let w=m.categories;const $=e;if(e===$)if(Array.isArray(w)){var b=!0;const c=w.length;for(let N=0;N<c;N++){const L=e;if(typeof w[N]!="string")return B.errors=[{instancePath:t+"/meta/categories/"+N,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=L===e;if(!b)break}}else return B.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var h=$===e}else var h=!0}}}}}else return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.preferredVersions!==void 0){let m=r.preferredVersions;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m)){let g;if(m.php===void 0&&(g="php")||m.wp===void 0&&(g="wp"))return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"}],!1;{const O=e;for(const w in m)if(!(w==="php"||w==="wp"))return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"}],!1;if(O===e){if(m.php!==void 0){let w=m.php;const $=e,v=e;let c=!1;const N=e;if(typeof w!="string"){const L={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[L]:i.push(L),e++}if(!(w==="8.3"||w==="8.2"||w==="8.1"||w==="8.0"||w==="7.4"||w==="7.3"||w==="7.2"||w==="7.1"||w==="7.0")){const L={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:Cs.enum},message:"must be equal to one of the allowed values"};i===null?i=[L]:i.push(L),e++}var k=N===e;if(c=c||k,!c){const L=e;if(typeof w!="string"){const M={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[M]:i.push(M),e++}if(w!=="latest"){const M={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};i===null?i=[M]:i.push(M),e++}var k=L===e;c=c||k}if(c)e=v,i!==null&&(v?i.length=v:i=null);else{const L={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[L]:i.push(L),e++,B.errors=i,!1}var y=$===e}else var y=!0;if(y)if(m.wp!==void 0){const w=e;if(typeof m.wp!="string")return B.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=w===e}else var y=!0}}}else return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.features!==void 0){let m=r.features;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m)){const g=e;for(const O in m)if(O!=="networking")return B.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"}],!1;if(g===e&&m.networking!==void 0&&typeof m.networking!="boolean")return B.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return B.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.constants!==void 0){let m=r.constants;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m))for(const g in m){const O=e;if(typeof m[g]!="string")return B.errors=[{instancePath:t+"/constants/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constants/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=O===e;if(!E)break}else return B.errors=[{instancePath:t+"/constants",schemaPath:"#/properties/constants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.plugins!==void 0){let m=r.plugins;const R=e;if(e===R)if(Array.isArray(m)){var S=!0;const g=m.length;for(let O=0;O<g;O++){let w=m[O];const $=e,v=e;let c=!1;const N=e;if(typeof w!="string"){const j={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),e++}var I=N===e;if(c=c||I,!c){const j=e;ee(w,{instancePath:t+"/plugins/"+O,parentData:m,parentDataProperty:O,rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var I=j===e;c=c||I}if(c)e=v,i!==null&&(v?i.length=v:i=null);else{const j={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[j]:i.push(j),e++,B.errors=i,!1}var S=$===e;if(!S)break}}else return B.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var u=R===e}else var u=!0;if(u){if(r.siteOptions!==void 0){let m=r.siteOptions;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m)){const g=e;for(const O in m)if(O!=="blogname"){const w=e;if(typeof m[O]!="string")return B.errors=[{instancePath:t+"/siteOptions/"+O.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=w===e;if(!_)break}if(g===e&&m.blogname!==void 0&&typeof m.blogname!="string")return B.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return B.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.login!==void 0){let m=r.login;const R=e,V=e;let g=!1;const O=e;if(typeof m!="boolean"){const $={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[$]:i.push($),e++}var D=O===e;if(g=g||D,!g){const $=e;if(e===$)if(m&&typeof m=="object"&&!Array.isArray(m)){let c;if(m.username===void 0&&(c="username")||m.password===void 0&&(c="password")){const N={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"};i===null?i=[N]:i.push(N),e++}else{const N=e;for(const L in m)if(!(L==="username"||L==="password")){const j={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"};i===null?i=[j]:i.push(j),e++;break}if(N===e){if(m.username!==void 0){const L=e;if(typeof m.username!="string"){const j={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),e++}var X=L===e}else var X=!0;if(X)if(m.password!==void 0){const L=e;if(typeof m.password!="string"){const M={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[M]:i.push(M),e++}var X=L===e}else var X=!0}}}else{const c={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[c]:i.push(c),e++}var D=$===e;g=g||D}if(g)e=V,i!==null&&(V?i.length=V:i=null);else{const $={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[$]:i.push($),e++,B.errors=i,!1}var u=R===e}else var u=!0;if(u){if(r.phpExtensionBundles!==void 0){let m=r.phpExtensionBundles;const R=e;if(e===R)if(Array.isArray(m)){var x=!0;const g=m.length;for(let O=0;O<g;O++){let w=m[O];const $=e;if(typeof w!="string")return B.errors=[{instancePath:t+"/phpExtensionBundles/"+O,schemaPath:"#/definitions/SupportedPHPExtensionBundle/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(w==="kitchen-sink"||w==="light"))return B.errors=[{instancePath:t+"/phpExtensionBundles/"+O,schemaPath:"#/definitions/SupportedPHPExtensionBundle/enum",keyword:"enum",params:{allowedValues:Is.enum},message:"must be equal to one of the allowed values"}],!1;var x=$===e;if(!x)break}}else return B.errors=[{instancePath:t+"/phpExtensionBundles",schemaPath:"#/properties/phpExtensionBundles/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var u=R===e}else var u=!0;if(u){if(r.steps!==void 0){let m=r.steps;const R=e;if(e===R)if(Array.isArray(m)){var P=!0;const g=m.length;for(let O=0;O<g;O++){let w=m[O];const $=e,v=e;let c=!1;const N=e;o(w,{instancePath:t+"/steps/"+O,parentData:m,parentDataProperty:O,rootData:l})||(i=i===null?o.errors:i.concat(o.errors),e=i.length);var W=N===e;if(c=c||W,!c){const j=e;if(typeof w!="string"){const q={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}var W=j===e;if(c=c||W,!c){const q=e,H={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};i===null?i=[H]:i.push(H),e++;var W=q===e;if(c=c||W,!c){const Z=e;if(typeof w!="boolean"){const U={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[U]:i.push(U),e++}if(w!==!1){const U={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};i===null?i=[U]:i.push(U),e++}var W=Z===e;if(c=c||W,!c){const U=e;if(w!==null){const G={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};i===null?i=[G]:i.push(G),e++}var W=U===e;c=c||W}}}}if(c)e=v,i!==null&&(v?i.length=v:i=null);else{const j={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[j]:i.push(j),e++,B.errors=i,!1}var P=$===e;if(!P)break}}else return B.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var u=R===e}else var u=!0;if(u)if(r.$schema!==void 0){const m=e;if(typeof r.$schema!="string")return B.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=m===e}else var u=!0}}}}}}}}}}}}else return B.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return B.errors=i,e===0}function tr(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;return B(r,{instancePath:t,parentData:n,parentDataProperty:p,rootData:l})||(i=i===null?B.errors:i.concat(B.errors),e=i.length),tr.errors=i,e===0}const{wpCLI:Ds,...Zr}=gs,Ms={...Zr,"wp-cli":Ds,importFile:Zr.importWxr};function Ft(r,{progress:t=new yr,semaphore:n=new Qt({concurrency:3}),onStepCompleted:p=()=>{}}={}){var y,E,S,I,_,D,X;r={...r,steps:(r.steps||[]).filter(Vs).filter(Hs)};for(const x of r.steps)typeof x=="object"&&x.step==="importFile"&&(x.step="importWxr",ae.warn('The "importFile" step is deprecated. Use "importWxr" 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 x=r.plugins.map(P=>typeof P=="string"?P.startsWith("https://")?{resource:"url",url:P}:{resource:"wordpress.org/plugins",slug:P}:P).map(P=>({step:"installPlugin",pluginZipFile:P}));r.steps.unshift(...x)}r.login&&r.steps.push({step:"login",...r.login===!0?{username:"admin",password:"password"}:r.login}),r.phpExtensionBundles||(r.phpExtensionBundles=[]),r.phpExtensionBundles||(r.phpExtensionBundles=[]),r.phpExtensionBundles.length===0&&r.phpExtensionBundles.push("kitchen-sink");const l=(y=r.steps)==null?void 0:y.findIndex(x=>typeof x=="object"&&(x==null?void 0:x.step)==="wp-cli");l!==void 0&&l>-1&&(r.phpExtensionBundles.includes("light")&&(r.phpExtensionBundles=r.phpExtensionBundles.filter(x=>x!=="light"),ae.warn("The wpCli step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(E=r.steps)==null||E.splice(l,0,{step:"writeFile",data:{resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},path:"/tmp/wp-cli.phar"}));const i=(S=r.steps)==null?void 0:S.findIndex(x=>typeof x=="object"&&(x==null?void 0:x.step)==="importWxr");i!==void 0&&i>-1&&(r.phpExtensionBundles.includes("light")&&(r.phpExtensionBundles=r.phpExtensionBundles.filter(x=>x!=="light"),ae.warn("The importWxr step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(I=r.steps)==null||I.splice(i,0,{step:"installPlugin",pluginZipFile:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:e,errors:u}=Bs(r);if(!e){const x=new Error(`Invalid blueprint: ${u[0].message} at ${u[0].instancePath}`);throw x.errors=u,x}const h=r.steps||[],b=h.reduce((x,P)=>{var W;return x+(((W=P.progress)==null?void 0:W.weight)||1)},0),k=h.map(x=>Gs(x,{semaphore:n,rootProgressTracker:t,totalProgressWeight:b}));return{versions:{php:Us((_=r.preferredVersions)==null?void 0:_.php,hr,qt),wp:((D=r.preferredVersions)==null?void 0:D.wp)||"latest"},phpExtensions:zs([],r.phpExtensionBundles||[]),features:{networking:((X=r.features)==null?void 0:X.networking)??!1},run:async x=>{try{for(const{resources:P}of k)for(const W of P)W.setPlayground(x),W.isAsync&&W.resolve();for(const[P,{run:W,step:J}]of Object.entries(k))try{const m=await W(x);p(m,J)}catch(m){throw ae.error(m),new Error(`Error when executing the blueprint step #${P} (${JSON.stringify(J)}) ${m instanceof Error?`: ${m.message}`:m}`,{cause:m})}}finally{try{await x.goTo(r.landingPage||"/")}catch{}t.finish()}}}}function Bs(r){var l;const t=tr(r);if(t)return{valid:t};const n=new Set;for(const i of tr.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(i.instancePath);const p=(l=tr.errors)==null?void 0:l.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(i.instancePath)));return{valid:t,errors:p}}function Us(r,t,n){return r&&t.includes(r)?r:n}function zs(r,t){const n=Rt.filter(l=>r.includes(l)),p=t.flatMap(l=>l in Yr?Yr[l]:[]);return Array.from(new Set([...n,...p]))}function Vs(r){return!!(typeof r=="object"&&r)}function Hs(r){return["setPhpIniEntry","request"].includes(r.step)?(ae.warn(`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function Gs(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:p}){var k;const l=n.stage((((k=r.progress)==null?void 0:k.weight)||1)/p),i={};for(const y of Object.keys(r)){let E=r[y];Ts(E)&&(E=Se.create(E,{semaphore:t})),i[y]=E}const e=async y=>{var E;try{return l.fillSlowly(),await Ms[r.step](y,await Ys(i),{tracker:l,initialCaption:(E=r.progress)==null?void 0:E.caption})}finally{l.finish()}},u=Qr(i),h=Qr(i).filter(y=>y.isAsync),b=1/(h.length+1);for(const y of h)y.progress=l.stage(b);return{run:e,step:r,resources:u}}function Qr(r){const t=[];for(const n in r){const p=r[n];p instanceof Se&&t.push(p)}return t}async function Ys(r){const t={};for(const n in r){const p=r[n];p instanceof Se?t[n]=await p.resolve():t[n]=p}return t}async function Ct(r,t){await r.run(t)}function Zs(){}/**
738
731
  * @license
739
732
  * Copyright 2019 Google LLC
740
733
  * SPDX-License-Identifier: Apache-2.0
741
- */const mo=Symbol("Comlink.proxy"),Id=Symbol("Comlink.endpoint"),jd=Symbol("Comlink.releaseProxy"),Xr=Symbol("Comlink.finalizer"),wr=Symbol("Comlink.thrown"),yo=e=>typeof e=="object"&&e!==null||typeof e=="function",Ad={canHandle:e=>yo(e)&&e[mo],serialize(e){const{port1:t,port2:r}=new MessageChannel;return is(e,t),[r,[r]]},deserialize(e){return e.start(),os(e)}},Dd={canHandle:e=>yo(e)&&wr in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},Tt=new Map([["proxy",Ad],["throw",Dd]]);function Md(e,t){for(const r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return!0;return!1}function is(e,t=globalThis,r=["*"]){t.addEventListener("message",function n(s){if(!s||!s.data)return;if(!Md(r,s.origin)){console.warn(`Invalid origin '${s.origin}' for comlink proxy`);return}const{id:i,type:o,path:u}=Object.assign({path:[]},s.data),f=(s.data.argumentList||[]).map(lt);let l;try{const d=u.slice(0,-1).reduce((_,b)=>_[b],e),p=u.reduce((_,b)=>_[b],e);switch(o){case"GET":l=p;break;case"SET":d[u.slice(-1)[0]]=lt(s.data.value),l=!0;break;case"APPLY":l=p.apply(d,f);break;case"CONSTRUCT":{const _=new p(...f);l=wo(_)}break;case"ENDPOINT":{const{port1:_,port2:b}=new MessageChannel;is(e,b),l=zd(_,[_])}break;case"RELEASE":l=void 0;break;default:return}}catch(d){l={value:d,[wr]:0}}Promise.resolve(l).catch(d=>({value:d,[wr]:0})).then(d=>{const[p,_]=jr(d);t.postMessage(Object.assign(Object.assign({},p),{id:i}),_),o==="RELEASE"&&(t.removeEventListener("message",n),go(t),Xr in e&&typeof e[Xr]=="function"&&e[Xr]())}).catch(d=>{const[p,_]=jr({value:new TypeError("Unserializable return value"),[wr]:0});t.postMessage(Object.assign(Object.assign({},p),{id:i}),_)})}),t.start&&t.start()}function Ld(e){return e.constructor.name==="MessagePort"}function go(e){Ld(e)&&e.close()}function os(e,t){return fn(e,[],t)}function hr(e){if(e)throw new Error("Proxy has been released and is not useable")}function $o(e){return St(e,{type:"RELEASE"}).then(()=>{go(e)})}const Nr=new WeakMap,Ir="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(Nr.get(e)||0)-1;Nr.set(e,t),t===0&&$o(e)});function Fd(e,t){const r=(Nr.get(t)||0)+1;Nr.set(t,r),Ir&&Ir.register(e,t,e)}function qd(e){Ir&&Ir.unregister(e)}function fn(e,t=[],r=function(){}){let n=!1;const s=new Proxy(r,{get(i,o){if(hr(n),o===jd)return()=>{qd(s),$o(e),n=!0};if(o==="then"){if(t.length===0)return{then:()=>s};const u=St(e,{type:"GET",path:t.map(f=>f.toString())}).then(lt);return u.then.bind(u)}return fn(e,[...t,o])},set(i,o,u){hr(n);const[f,l]=jr(u);return St(e,{type:"SET",path:[...t,o].map(d=>d.toString()),value:f},l).then(lt)},apply(i,o,u){hr(n);const f=t[t.length-1];if(f===Id)return St(e,{type:"ENDPOINT"}).then(lt);if(f==="bind")return fn(e,t.slice(0,-1));const[l,d]=Ks(u);return St(e,{type:"APPLY",path:t.map(p=>p.toString()),argumentList:l},d).then(lt)},construct(i,o){hr(n);const[u,f]=Ks(o);return St(e,{type:"CONSTRUCT",path:t.map(l=>l.toString()),argumentList:u},f).then(lt)}});return Fd(s,e),s}function Ud(e){return Array.prototype.concat.apply([],e)}function Ks(e){const t=e.map(jr);return[t.map(r=>r[0]),Ud(t.map(r=>r[1]))]}const _o=new WeakMap;function zd(e,t){return _o.set(e,t),e}function wo(e){return Object.assign(e,{[mo]:!0})}function Vd(e,t=globalThis,r="*"){return{postMessage:(n,s)=>e.postMessage(n,r,s),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function jr(e){for(const[t,r]of Tt)if(r.canHandle(e)){const[n,s]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},s]}return[{type:"RAW",value:e},_o.get(e)||[]]}function lt(e){switch(e.type){case"HANDLER":return Tt.get(e.name).deserialize(e.value);case"RAW":return e.value}}function St(e,t,r){return new Promise(n=>{const s=Wd();e.addEventListener("message",function i(o){!o.data||!o.data.id||o.data.id!==s||(e.removeEventListener("message",i),n(o.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:s},t),r)})}function Wd(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function vo(e,t=void 0){Hd();const r=e instanceof Worker?e:Vd(e,t),n=os(r),s=bo(n);return new Proxy(s,{get:(i,o)=>o==="isConnected"?async()=>{for(;;)try{await xd(n.isConnected(),200);break}catch{}}:n[o]})}async function xd(e,t){return new Promise((r,n)=>{setTimeout(n,t),e.then(r)})}let Js=!1;function Hd(){if(Js)return;Js=!0,Tt.set("EVENT",{canHandle:r=>r instanceof CustomEvent,serialize:r=>[{detail:r.detail},[]],deserialize:r=>r}),Tt.set("FUNCTION",{canHandle:r=>typeof r=="function",serialize(r){const{port1:n,port2:s}=new MessageChannel;return is(r,n),[s,[s]]},deserialize(r){return r.start(),os(r)}}),Tt.set("PHPResponse",{canHandle:r=>typeof r=="object"&&r!==null&&"headers"in r&&"bytes"in r&&"errors"in r&&"exitCode"in r&&"httpStatusCode"in r,serialize(r){return[r.toRawData(),[]]},deserialize(r){return Sr.fromRawData(r)}});const e=Tt.get("throw"),t=e==null?void 0:e.serialize;e.serialize=({value:r})=>{const n=t({value:r});return r.response&&(n[0].value.response=r.response),r.source&&(n[0].value.source=r.source),n}}function bo(e){return new Proxy(e,{get(t,r){switch(typeof t[r]){case"function":return(...n)=>t[r](...n);case"object":return t[r]===null?t[r]:bo(t[r]);case"undefined":case"number":case"string":return t[r];default:return wo(t[r])}}})}new Promise(e=>{});async function Eo({iframe:e,blueprint:t,remoteUrl:r,progressTracker:n=new Lr,disableProgressBar:s,onBlueprintStepCompleted:i,onClientConnected:o=()=>{},sapiName:u,onBeforeBlueprint:f,siteSlug:l}){if(Gd(r),Bd(e),r=en(r,{progressbar:!s}),n.setCaption("Preparing WordPress"),!t){const _=await Qs(e,en(r,{"php-extension":"kitchen-sink","site-slug":l}),n);return o(_),_}const d=po(t,{progress:n.stage(.5),onStepCompleted:i}),p=await Qs(e,en(r,{php:d.versions.php,wp:d.versions.wp,"sapi-name":u,"php-extension":d.phpExtensions,networking:d.features.networking?"yes":"no","site-slug":l}),n);return Jo(he,p),o(p),f&&await f(),await ho(d,p),n.finish(),p}function Bd(e){var t,r;(t=e.sandbox)!=null&&t.length&&!((r=e.sandbox)!=null&&r.contains("allow-storage-access-by-user-activation"))&&e.sandbox.add("allow-storage-access-by-user-activation")}async function Qs(e,t,r){await new Promise(i=>{e.src=t,e.addEventListener("load",i,!1)});const n=vo(e.contentWindow,e.ownerDocument.defaultView);await n.isConnected(),r.pipe(n);const s=r.stage();return await n.onDownloadProgress(s.loadingListener),await n.isReady(),s.finish(),n}const vr="https://playground.wordpress.net";function Gd(e){const t=new URL(e,vr);if((t.origin===vr||t.hostname==="localhost")&&t.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${t}. Expected origin to be ${vr}/remote.html.`)}function en(e,t){const r=new URL(e,vr),n=new URLSearchParams(r.search);for(const[s,i]of Object.entries(t))if(i!=null&&i!==!1)if(Array.isArray(i))for(const o of i)n.append(s,o.toString());else n.set(s,i.toString());return r.search=n.toString(),r.toString()}async function Kd(e,t){if(he.warn("`connectPlayground` is deprecated and will be removed. Use `startPlayground` instead."),t!=null&&t.loadRemote)return Eo({iframe:e,remoteUrl:t.loadRemote});const r=vo(e.contentWindow,e.ownerDocument.defaultView);return await r.isConnected(),r}exports.LatestSupportedPHPVersion=Ri;exports.SupportedPHPVersions=Fr;exports.SupportedPHPVersionsList=ha;exports.activatePlugin=Ar;exports.activateTheme=hn;exports.compileBlueprint=po;exports.connectPlayground=Kd;exports.cp=li;exports.defineSiteUrl=$n;exports.defineWpConfigConsts=Qt;exports.enableMultisite=ci;exports.exportWXR=yi;exports.importThemeStarterContent=_n;exports.importWordPressFiles=mi;exports.importWxr=pi;exports.installPlugin=$i;exports.installTheme=_i;exports.login=Er;exports.mkdir=di;exports.mv=ui;exports.phpVar=ae;exports.phpVars=Zt;exports.request=br;exports.resetData=wi;exports.rm=mn;exports.rmdir=fi;exports.runBlueprintSteps=ho;exports.runPHP=ni;exports.runPHPWithOptions=si;exports.runSql=ii;exports.runWpInstallationWizard=vi;exports.setPhpIniEntries=pa;exports.setPluginProxyURL=Nd;exports.setSiteLanguage=Pi;exports.setSiteOptions=yn;exports.startPlaygroundWeb=Eo;exports.unzip=Dr;exports.updateUserMeta=oi;exports.wpCLI=Ei;exports.wpContentFilesExcludedFromExport=pn;exports.writeFile=gn;exports.zipWpContent=bi;
734
+ */const It=Symbol("Comlink.proxy"),Qs=Symbol("Comlink.endpoint"),Js=Symbol("Comlink.releaseProxy"),Or=Symbol("Comlink.finalizer"),sr=Symbol("Comlink.thrown"),Wt=r=>typeof r=="object"&&r!==null||typeof r=="function",Ks={canHandle:r=>Wt(r)&&r[It],serialize(r){const{port1:t,port2:n}=new MessageChannel;return Ir(r,t),[n,[n]]},deserialize(r){return r.start(),Wr(r)}},Xs={canHandle:r=>Wt(r)&&sr in r,serialize({value:r}){let t;return r instanceof Error?t={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:t={isError:!1,value:r},[t,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},xe=new Map([["proxy",Ks],["throw",Xs]]);function ei(r,t){for(const n of r)if(t===n||n==="*"||n instanceof RegExp&&n.test(t))return!0;return!1}function Ir(r,t=globalThis,n=["*"]){t.addEventListener("message",function p(l){if(!l||!l.data)return;if(!ei(n,l.origin)){console.warn(`Invalid origin '${l.origin}' for comlink proxy`);return}const{id:i,type:e,path:u}=Object.assign({path:[]},l.data),h=(l.data.argumentList||[]).map(Re);let b;try{const k=u.slice(0,-1).reduce((E,S)=>E[S],r),y=u.reduce((E,S)=>E[S],r);switch(e){case"GET":b=y;break;case"SET":k[u.slice(-1)[0]]=Re(l.data.value),b=!0;break;case"APPLY":b=y.apply(k,h);break;case"CONSTRUCT":{const E=new y(...h);b=Ut(E)}break;case"ENDPOINT":{const{port1:E,port2:S}=new MessageChannel;Ir(r,S),b=ni(E,[E])}break;case"RELEASE":b=void 0;break;default:return}}catch(k){b={value:k,[sr]:0}}Promise.resolve(b).catch(k=>({value:k,[sr]:0})).then(k=>{const[y,E]=ur(k);t.postMessage(Object.assign(Object.assign({},y),{id:i}),E),e==="RELEASE"&&(t.removeEventListener("message",p),Dt(t),Or in r&&typeof r[Or]=="function"&&r[Or]())}).catch(k=>{const[y,E]=ur({value:new TypeError("Unserializable return value"),[sr]:0});t.postMessage(Object.assign(Object.assign({},y),{id:i}),E)})}),t.start&&t.start()}function ri(r){return r.constructor.name==="MessagePort"}function Dt(r){ri(r)&&r.close()}function Wr(r,t){return Ar(r,[],t)}function er(r){if(r)throw new Error("Proxy has been released and is not useable")}function Mt(r){return Le(r,{type:"RELEASE"}).then(()=>{Dt(r)})}const lr=new WeakMap,fr="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const t=(lr.get(r)||0)-1;lr.set(r,t),t===0&&Mt(r)});function ti(r,t){const n=(lr.get(t)||0)+1;lr.set(t,n),fr&&fr.register(r,t,r)}function si(r){fr&&fr.unregister(r)}function Ar(r,t=[],n=function(){}){let p=!1;const l=new Proxy(n,{get(i,e){if(er(p),e===Js)return()=>{si(l),Mt(r),p=!0};if(e==="then"){if(t.length===0)return{then:()=>l};const u=Le(r,{type:"GET",path:t.map(h=>h.toString())}).then(Re);return u.then.bind(u)}return Ar(r,[...t,e])},set(i,e,u){er(p);const[h,b]=ur(u);return Le(r,{type:"SET",path:[...t,e].map(k=>k.toString()),value:h},b).then(Re)},apply(i,e,u){er(p);const h=t[t.length-1];if(h===Qs)return Le(r,{type:"ENDPOINT"}).then(Re);if(h==="bind")return Ar(r,t.slice(0,-1));const[b,k]=Jr(u);return Le(r,{type:"APPLY",path:t.map(y=>y.toString()),argumentList:b},k).then(Re)},construct(i,e){er(p);const[u,h]=Jr(e);return Le(r,{type:"CONSTRUCT",path:t.map(b=>b.toString()),argumentList:u},h).then(Re)}});return ti(l,r),l}function ii(r){return Array.prototype.concat.apply([],r)}function Jr(r){const t=r.map(ur);return[t.map(n=>n[0]),ii(t.map(n=>n[1]))]}const Bt=new WeakMap;function ni(r,t){return Bt.set(r,t),r}function Ut(r){return Object.assign(r,{[It]:!0})}function oi(r,t=globalThis,n="*"){return{postMessage:(p,l)=>r.postMessage(p,n,l),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function ur(r){for(const[t,n]of xe)if(n.canHandle(r)){const[p,l]=n.serialize(r);return[{type:"HANDLER",name:t,value:p},l]}return[{type:"RAW",value:r},Bt.get(r)||[]]}function Re(r){switch(r.type){case"HANDLER":return xe.get(r.name).deserialize(r.value);case"RAW":return r.value}}function Le(r,t,n){return new Promise(p=>{const l=ai();r.addEventListener("message",function i(e){!e.data||!e.data.id||e.data.id!==l||(r.removeEventListener("message",i),p(e.data))}),r.start&&r.start(),r.postMessage(Object.assign({id:l},t),n)})}function ai(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function zt(r,t=void 0){li();const n=r instanceof Worker?r:oi(r,t),p=Wr(n),l=Vt(p);return new Proxy(l,{get:(i,e)=>e==="isConnected"?async()=>{for(;;)try{await pi(p.isConnected(),200);break}catch{}}:p[e]})}async function pi(r,t){return new Promise((n,p)=>{setTimeout(p,t),r.then(n)})}let Kr=!1;function li(){if(Kr)return;Kr=!0,xe.set("EVENT",{canHandle:n=>n instanceof CustomEvent,serialize:n=>[{detail:n.detail},[]],deserialize:n=>n}),xe.set("FUNCTION",{canHandle:n=>typeof n=="function",serialize(n){const{port1:p,port2:l}=new MessageChannel;return Ir(n,p),[l,[l]]},deserialize(n){return n.start(),Wr(n)}}),xe.set("PHPResponse",{canHandle:n=>typeof n=="object"&&n!==null&&"headers"in n&&"bytes"in n&&"errors"in n&&"exitCode"in n&&"httpStatusCode"in n,serialize(n){return[n.toRawData(),[]]},deserialize(n){return pr.fromRawData(n)}});const r=xe.get("throw"),t=r==null?void 0:r.serialize;r.serialize=({value:n})=>{const p=t({value:n});return n.response&&(p[0].value.response=n.response),n.source&&(p[0].value.source=n.source),p}}function Vt(r){return new Proxy(r,{get(t,n){switch(typeof t[n]){case"function":return(...p)=>t[n](...p);case"object":return t[n]===null?t[n]:Vt(t[n]);case"undefined":case"number":case"string":return t[n];default:return Ut(t[n])}}})}new Promise(r=>{});async function Ht({iframe:r,blueprint:t,remoteUrl:n,progressTracker:p=new yr,disableProgressBar:l,onBlueprintStepCompleted:i,onClientConnected:e=()=>{},sapiName:u,onBeforeBlueprint:h,siteSlug:b}){if(ui(n),fi(r),n=Er(n,{progressbar:!l}),p.setCaption("Preparing WordPress"),!t){const E=await Xr(r,Er(n,{"php-extension":"kitchen-sink","site-slug":b}),p);return e(E),E}const k=Ft(t,{progress:p.stage(.5),onStepCompleted:i}),y=await Xr(r,Er(n,{php:k.versions.php,wp:k.versions.wp,"sapi-name":u,"php-extension":k.phpExtensions,networking:k.features.networking?"yes":"no","site-slug":b}),p);return ps(ae,y),e(y),h&&await h(),await Ct(k,y),p.finish(),y}function fi(r){var t,n;(t=r.sandbox)!=null&&t.length&&!((n=r.sandbox)!=null&&n.contains("allow-storage-access-by-user-activation"))&&r.sandbox.add("allow-storage-access-by-user-activation")}async function Xr(r,t,n){await new Promise(i=>{r.src=t,r.addEventListener("load",i,!1)});const p=zt(r.contentWindow,r.ownerDocument.defaultView);await p.isConnected(),n.pipe(p);const l=n.stage();return await p.onDownloadProgress(l.loadingListener),await p.isReady(),l.finish(),p}const ir="https://playground.wordpress.net";function ui(r){const t=new URL(r,ir);if((t.origin===ir||t.hostname==="localhost")&&t.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${t}. Expected origin to be ${ir}/remote.html.`)}function Er(r,t){const n=new URL(r,ir),p=new URLSearchParams(n.search);for(const[l,i]of Object.entries(t))if(i!=null&&i!==!1)if(Array.isArray(i))for(const e of i)p.append(l,e.toString());else p.set(l,i.toString());return n.search=p.toString(),n.toString()}async function di(r,t){if(ae.warn("`connectPlayground` is deprecated and will be removed. Use `startPlayground` instead."),t!=null&&t.loadRemote)return Ht({iframe:r,remoteUrl:t.loadRemote});const n=zt(r.contentWindow,r.ownerDocument.defaultView);return await n.isConnected(),n}exports.LatestSupportedPHPVersion=qt;exports.SupportedPHPVersions=hr;exports.SupportedPHPVersionsList=Es;exports.activatePlugin=dr;exports.activateTheme=Rr;exports.compileBlueprint=Ft;exports.connectPlayground=di;exports.cp=dt;exports.defineSiteUrl=Nr;exports.defineWpConfigConsts=Ie;exports.enableMultisite=ut;exports.exportWXR=wt;exports.importThemeStarterContent=Fr;exports.importWordPressFiles=bt;exports.importWxr=ht;exports.installPlugin=Pt;exports.installTheme=_t;exports.login=or;exports.mkdir=mt;exports.mv=ct;exports.phpVar=se;exports.phpVars=We;exports.request=nr;exports.resetData=kt;exports.rm=Sr;exports.rmdir=yt;exports.runBlueprintSteps=Ct;exports.runPHP=ot;exports.runPHPWithOptions=at;exports.runSql=pt;exports.runWpInstallationWizard=Ot;exports.setPhpIniEntries=Os;exports.setPluginProxyURL=Zs;exports.setSiteLanguage=Tt;exports.setSiteOptions=Lr;exports.startPlaygroundWeb=Ht;exports.unzip=cr;exports.updateUserMeta=lt;exports.wpCLI=$t;exports.wpContentFilesExcludedFromExport=qr;exports.writeFile=xr;exports.zipWpContent=Et;