@wp-playground/client 1.0.4 → 1.0.5

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 (4) hide show
  1. package/index.cjs +71 -75
  2. package/index.d.ts +1 -1
  3. package/index.js +3977 -3638
  4. package/package.json +9 -8
package/index.cjs CHANGED
@@ -1,15 +1,15 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Bn=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(Bn==="NODE"){let e=function(s){return new Promise(function(n,o){s.onload=s.onerror=function(i){s.onload=s.onerror=null,i.type==="load"?n(s.result):o(new Error("Failed to read the blob/file"))}})},r=function(){const s=new Uint8Array([1,2,3,4]),o=new File([s],"test").stream();try{return o.getReader({mode:"byob"}),!0}catch{return!1}};if(typeof File>"u"){class s extends Blob{constructor(o,i,t){super(o);let p;t!=null&&t.lastModified&&(p=new Date),(!p||isNaN(p.getFullYear()))&&(p=new Date),this.lastModifiedDate=p,this.lastModified=p.getMilliseconds(),this.name=i||""}}global.File=s}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"||!r())&&(Blob.prototype.stream=function(){let s=0;const n=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:512*1024,async pull(o){const i=o.byobRequest.view,p=await n.slice(s,s+i.byteLength).arrayBuffer(),y=new Uint8Array(p);new Uint8Array(i.buffer).set(y);const u=y.byteLength;o.byobRequest.respond(u),s+=u,s>=n.size&&o.close()}})})}if(Bn==="NODE"&&typeof CustomEvent>"u"){class e extends Event{constructor(s,n={}){super(s,n),this.detail=n.detail}initCustomEvent(){}}globalThis.CustomEvent=e}const ii=["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"],In=Symbol("SleepFinished");function Ao(e){return new Promise(r=>{setTimeout(()=>r(In),e)})}class So extends Error{constructor(){super("Acquiring lock timed out")}}class Ro{constructor({concurrency:r,timeout:s}){this._running=0,this.concurrency=r,this.timeout=s,this.queue=[]}get remaining(){return this.concurrency-this.running}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency){const r=new Promise(s=>{this.queue.push(s)});this.timeout!==void 0?await Promise.race([r,Ao(this.timeout)]).then(s=>{if(s===In)throw new So}):await r}else{this._running++;let r=!1;return()=>{r||(r=!0,this._running--,this.queue.length>0&&this.queue.shift()())}}}async run(r){const s=await this.acquire();try{return await r()}finally{s()}}}function ge(...e){function r(i){return i.substring(i.length-1)==="/"}let s=e.join("/");const n=s[0]==="/",o=r(s);return s=ni(s),!s&&!n&&(s="."),s&&o&&!r(s)&&(s+="/"),s}function gt(e){if(e==="/")return"/";e=ni(e);const r=e.lastIndexOf("/");return r===-1?"":r===0?"/":e.substr(0,r)}function ni(e){const r=e[0]==="/";return e=Fo(e.split("/").filter(s=>!!s),!r).join("/"),(r?"/":"")+e.replace(/\/$/,"")}function Fo(e,r){let s=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o==="."?e.splice(n,1):o===".."?(e.splice(n,1),s++):s&&(e.splice(n,1),s--)}if(r)for(;s;s--)e.unshift("..");return e}function jn(e=36,r="!@#$%^&*()_+=-[]/.,<>?"){const s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+r;let n="";for(let o=e;o>0;--o)n+=s[Math.floor(Math.random()*s.length)];return n}function Bo(){return jn(36,"-_")}function Fe(e){return`json_decode(base64_decode('${Io(JSON.stringify(e))}'), true)`}function xt(e){const r={};for(const s in e)r[s]=Fe(e[s]);return r}function Io(e){return jo(new TextEncoder().encode(e))}function jo(e){const r=String.fromCodePoint(...e);return btoa(r)}const Lo="playground-log",$i=(e,...r)=>{Se.dispatchEvent(new CustomEvent(Lo,{detail:{log:e,args:r}}))},No=(e,...r)=>{switch(typeof e.message=="string"?Reflect.set(e,"message",Ws(e.message)):e.message.message&&typeof e.message.message=="string"&&Reflect.set(e.message,"message",Ws(e.message.message)),e.severity){case"Debug":console.debug(e.message,...r);break;case"Info":console.info(e.message,...r);break;case"Warn":console.warn(e.message,...r);break;case"Error":console.error(e.message,...r);break;case"Fatal":console.error(e.message,...r);break;default:console.log(e.message,...r)}},Co=e=>e instanceof Error?[e.message,e.stack].join(`
2
- `):JSON.stringify(e,null,2),Ln=[],Ai=e=>{Ln.push(e)},Ms=e=>{if(e.raw===!0)Ai(e.message);else{const r=Mo(typeof e.message=="object"?Co(e.message):e.message,e.severity??"Info",e.prefix??"JavaScript");Ai(r)}};let bs=0;const Si="/wordpress/wp-content/debug.log",Do=async e=>await e.fileExists(Si)?await e.readFileAsText(Si):"",qo=(e,r)=>{r.addEventListener("request.end",async()=>{const s=await Do(r);if(s.length>bs){const n=s.substring(bs);e.logMessage({message:n,raw:!0}),bs=s.length}}),r.addEventListener("request.error",s=>{s=s,s.error&&(e.logMessage({message:`${s.error.message} ${s.error.stack}`,severity:"Fatal",prefix:s.source==="request"?"PHP":"WASM Crash"}),e.dispatchEvent(new CustomEvent(e.fatalErrorEvent,{detail:{logs:e.getLogs(),source:s.source}})))})};class Uo extends EventTarget{constructor(r=[]){super(),this.handlers=r,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes(Ms)?[...Ln]:(this.error(`Logs aren't stored because the logToMemory handler isn't registered.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $n=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($n==="NODE"){let e=function(s){return new Promise(function(n,o){s.onload=s.onerror=function(i){s.onload=s.onerror=null,i.type==="load"?n(s.result):o(new Error("Failed to read the blob/file"))}})},r=function(){const s=new Uint8Array([1,2,3,4]),o=new File([s],"test").stream();try{return o.getReader({mode:"byob"}),!0}catch{return!1}};if(typeof File>"u"){class s extends Blob{constructor(o,i,t){super(o);let p;t!=null&&t.lastModified&&(p=new Date),(!p||isNaN(p.getFullYear()))&&(p=new Date),this.lastModifiedDate=p,this.lastModified=p.getMilliseconds(),this.name=i||""}}global.File=s}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"||!r())&&(Blob.prototype.stream=function(){let s=0;const n=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:512*1024,async pull(o){const i=o.byobRequest.view,p=await n.slice(s,s+i.byteLength).arrayBuffer(),y=new Uint8Array(p);new Uint8Array(i.buffer).set(y);const u=y.byteLength;o.byobRequest.respond(u),s+=u,s>=n.size&&o.close()}})})}if($n==="NODE"&&typeof CustomEvent>"u"){class e extends Event{constructor(s,n={}){super(s,n),this.detail=n.detail}initCustomEvent(){}}globalThis.CustomEvent=e}const ni=["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"],Rn=Symbol("SleepFinished");function xo(e){return new Promise(r=>{setTimeout(()=>r(Rn),e)})}class Lo extends Error{constructor(){super("Acquiring lock timed out")}}class Io{constructor({concurrency:r,timeout:s}){this._running=0,this.concurrency=r,this.timeout=s,this.queue=[]}get remaining(){return this.concurrency-this.running}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency){const r=new Promise(s=>{this.queue.push(s)});this.timeout!==void 0?await Promise.race([r,xo(this.timeout)]).then(s=>{if(s===Rn)throw new Lo}):await r}else{this._running++;let r=!1;return()=>{r||(r=!0,this._running--,this.queue.length>0&&this.queue.shift()())}}}async run(r){const s=await this.acquire();try{return await r()}finally{s()}}}function _e(...e){function r(i){return i.substring(i.length-1)==="/"}let s=e.join("/");const n=s[0]==="/",o=r(s);return s=ai(s),!s&&!n&&(s="."),s&&o&&!r(s)&&(s+="/"),s}function gt(e){if(e==="/")return"/";e=ai(e);const r=e.lastIndexOf("/");return r===-1?"":r===0?"/":e.substr(0,r)}function ai(e){const r=e[0]==="/";return e=Ho(e.split("/").filter(s=>!!s),!r).join("/"),(r?"/":"")+e.replace(/\/$/,"")}function Ho(e,r){let s=0;for(let n=e.length-1;n>=0;n--){const o=e[n];o==="."?e.splice(n,1):o===".."?(e.splice(n,1),s++):s&&(e.splice(n,1),s--)}if(r)for(;s;s--)e.unshift("..");return e}function Dn(e=36,r="!@#$%^&*()_+=-[]/.,<>?"){const s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+r;let n="";for(let o=e;o>0;--o)n+=s[Math.floor(Math.random()*s.length)];return n}function $o(){return Dn(36,"-_")}function Ie(e){return`json_decode(base64_decode('${Ro(JSON.stringify(e))}'), true)`}function Tt(e){const r={};for(const s in e)r[s]=Ie(e[s]);return r}function Ro(e){return Do(new TextEncoder().encode(e))}function Do(e){const r=String.fromCodePoint(...e);return btoa(r)}const Bo="playground-log",Oi=(e,...r)=>{xe.dispatchEvent(new CustomEvent(Bo,{detail:{log:e,args:r}}))},Fo=(e,...r)=>{switch(typeof e.message=="string"?Reflect.set(e,"message",Ks(e.message)):e.message.message&&typeof e.message.message=="string"&&Reflect.set(e.message,"message",Ks(e.message.message)),e.severity){case"Debug":console.debug(e.message,...r);break;case"Info":console.info(e.message,...r);break;case"Warn":console.warn(e.message,...r);break;case"Error":console.error(e.message,...r);break;case"Fatal":console.error(e.message,...r);break;default:console.log(e.message,...r)}},jo=e=>e instanceof Error?[e.message,e.stack].join(`
2
+ `):JSON.stringify(e,null,2),Bn=[],xi=e=>{Bn.push(e)},Ms=e=>{if(e.raw===!0)xi(e.message);else{const r=Mo(typeof e.message=="object"?jo(e.message):e.message,e.severity??"Info",e.prefix??"JavaScript");xi(r)}};let bs=0;const Li="/wordpress/wp-content/debug.log",No=async e=>await e.fileExists(Li)?await e.readFileAsText(Li):"",Wo=(e,r)=>{r.addEventListener("request.end",async()=>{const s=await No(r);if(s.length>bs){const n=s.substring(bs);e.logMessage({message:n,raw:!0}),bs=s.length}}),r.addEventListener("request.error",s=>{s=s,s.error&&(e.logMessage({message:`${s.error.message} ${s.error.stack}`,severity:"Fatal",prefix:s.source==="request"?"PHP":"WASM Crash"}),e.dispatchEvent(new CustomEvent(e.fatalErrorEvent,{detail:{logs:e.getLogs(),source:s.source}})))})};class Uo extends EventTarget{constructor(r=[]){super(),this.handlers=r,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes(Ms)?[...Bn]:(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(r,...s){for(const n of this.handlers)n(r,...s)}log(r,...s){this.logMessage({message:r,severity:void 0,prefix:"JavaScript",raw:!1},...s)}debug(r,...s){this.logMessage({message:r,severity:"Debug",prefix:"JavaScript",raw:!1},...s)}info(r,...s){this.logMessage({message:r,severity:"Info",prefix:"JavaScript",raw:!1},...s)}warn(r,...s){this.logMessage({message:r,severity:"Warn",prefix:"JavaScript",raw:!1},...s)}error(r,...s){this.logMessage({message:r,severity:"Error",prefix:"JavaScript",raw:!1},...s)}}const zo=()=>{try{if(process.env.NODE_ENV==="test")return[Ms,$i]}catch{}return[Ms,No,$i]},Se=new Uo(zo()),Ws=e=>e.replace(/\t/g,""),Mo=(e,r,s)=>{const n=new Date,o=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),t=o+" "+i;return e=Ws(e),`[${t}] ${s} ${r}: ${e}`},ai=async(e,{pluginPath:r,pluginName:s},n)=>{n==null||n.tracker.setCaption(`Activating ${s||r}`);const o=await e.documentRoot,i=await e.run({code:`<?php
4
+ `),[])}logMessage(r,...s){for(const n of this.handlers)n(r,...s)}log(r,...s){this.logMessage({message:r,severity:void 0,prefix:"JavaScript",raw:!1},...s)}debug(r,...s){this.logMessage({message:r,severity:"Debug",prefix:"JavaScript",raw:!1},...s)}info(r,...s){this.logMessage({message:r,severity:"Info",prefix:"JavaScript",raw:!1},...s)}warn(r,...s){this.logMessage({message:r,severity:"Warn",prefix:"JavaScript",raw:!1},...s)}error(r,...s){this.logMessage({message:r,severity:"Error",prefix:"JavaScript",raw:!1},...s)}}const qo=()=>{try{if(process.env.NODE_ENV==="test")return[Ms,Oi]}catch{}return[Ms,Fo,Oi]},xe=new Uo(qo()),Ks=e=>e.replace(/\t/g,""),Mo=(e,r,s)=>{const n=new Date,o=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),t=o+" "+i;return e=Ks(e),`[${t}] ${s} ${r}: ${e}`},oi=async(e,{pluginPath:r,pluginName:s},n)=>{n==null||n.tracker.setCaption(`Activating ${s||r}`);const o=await e.documentRoot,i=await e.run({code:`<?php
5
5
  define( 'WP_ADMIN', true );
6
- require_once( ${Fe(o)}. "/wp-load.php" );
7
- require_once( ${Fe(o)}. "/wp-admin/includes/plugin.php" );
6
+ require_once( ${Ie(o)}. "/wp-load.php" );
7
+ require_once( ${Ie(o)}. "/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 = ${Fe(r)};
12
+ $plugin_path = ${Ie(r)};
13
13
  $response = false;
14
14
  if (!is_dir($plugin_path)) {
15
15
  $response = activate_plugin($plugin_path);
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  throw new Exception( 'Unable to activate plugin' );
36
- `});if(i.text!=="Plugin activated successfully")throw Se.debug(i),new Error(`Plugin ${r} 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`)},oi=async(e,{themeFolderName:r},s)=>{s==null||s.tracker.setCaption(`Activating ${r}`);const n=await e.documentRoot,o=`${n}/wp-content/themes/${r}`;if(!await e.fileExists(o))throw new Error(`
36
+ `});if(i.text!=="Plugin activated successfully")throw xe.debug(i),new Error(`Plugin ${r} 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`)},pi=async(e,{themeFolderName:r},s)=>{s==null||s.tracker.setCaption(`Activating ${r}`);const n=await e.documentRoot,o=`${n}/wp-content/themes/${r}`;if(!await e.fileExists(o))throw new Error(`
37
37
  Couldn't activate theme ${r}.
38
38
  Theme not found at the provided theme path: ${o}.
39
39
  Check the theme path to ensure it's correct.
@@ -52,26 +52,22 @@
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:r}});if(i.text!=="Theme activated successfully")throw Se.debug(i),new Error(`Theme ${r} 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`)},Nn=async(e,{code:r})=>await e.run({code:r}),Cn=async(e,{options:r})=>await e.run(r),pi=async(e,{path:r})=>{await e.unlink(r)},Dn=async(e,{sql:r},s)=>{s==null||s.tracker.setCaption("Executing SQL Queries");const n=`/tmp/${Bo()}.sql`;await e.writeFile(n,new Uint8Array(await r.arrayBuffer()));const o=await e.documentRoot,i=xt({docroot:o,sqlFilename:n}),t=await e.run({code:`<?php
55
+ `,env:{docroot:n,themeFolderName:r}});if(i.text!=="Theme activated successfully")throw xe.debug(i),new Error(`Theme ${r} 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`)},Fn=async(e,{code:r})=>await e.run({code:r}),jn=async(e,{options:r})=>await e.run(r),fi=async(e,{path:r})=>{await e.unlink(r)},Nn=async(e,{sql:r},s)=>{s==null||s.tracker.setCaption("Executing SQL Queries");const n=`/tmp/${$o()}.sql`;await e.writeFile(n,new Uint8Array(await r.arrayBuffer()));const o=await e.documentRoot,i=Tt({docroot:o,sqlFilename:n}),t=await e.run({code:`<?php
56
56
  require_once ${i.docroot} . '/wp-load.php';
57
57
 
58
58
  $handle = fopen(${i.sqlFilename}, 'r');
59
- $buffer = '';
60
59
 
61
60
  global $wpdb;
62
61
 
63
- while ($bytes = fgets($handle)) {
64
- $buffer .= $bytes;
65
-
66
- if (!feof($handle) && substr($buffer, -1, 1) !== "
67
- ") {
62
+ while ($line = fgets($handle)) {
63
+ if(trim($line, "
64
+ ;") === '') {
68
65
  continue;
69
66
  }
70
67
 
71
- $wpdb->query($buffer);
72
- $buffer = '';
68
+ $wpdb->query($line);
73
69
  }
74
- `});return await pi(e,{path:n}),t},qn=async(e,{request:r})=>{Se.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const s=await e.request(r);if(s.httpStatusCode>399||s.httpStatusCode<200)throw Se.warn("WordPress response was",{response:s}),new Error(`Request failed with status ${s.httpStatusCode}`);return s},Wo=`<?php
70
+ `});return await fi(e,{path:n}),t},Wn=async(e,{request:r})=>{xe.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const s=await e.request(r);if(s.httpStatusCode>399||s.httpStatusCode<200)throw xe.warn("WordPress response was",{response:s}),new Error(`Request failed with status ${s.httpStatusCode}`);return s},Ko=`<?php
75
71
 
76
72
  /**
77
73
  * Rewrites the wp-config.php file to ensure specific constants are defined
@@ -402,31 +398,31 @@ function skip_whitespace($tokens) {
402
398
  }
403
399
  return $output;
404
400
  }
405
- `,ns=async(e,{consts:r,method:s="define-before-run"})=>{switch(s){case"define-before-run":await Ho(e,r);break;case"rewrite-wp-config":{const n=await e.documentRoot,o=ge(n,"/wp-config.php"),i=await e.readFileAsText(o),t=await Zo(e,i,r);await e.writeFile(o,t);break}default:throw new Error(`Invalid method: ${s}`)}};async function Ho(e,r){for(const s in r)await e.defineConstant(s,r[s])}async function Zo(e,r,s){await e.writeFile("/tmp/code.php",r);const n=xt({consts:s});return await e.run({code:`${Wo}
401
+ `,as=async(e,{consts:r,method:s="define-before-run"})=>{switch(s){case"define-before-run":await zo(e,r);break;case"rewrite-wp-config":{const n=await e.documentRoot,o=_e(n,"/wp-config.php"),i=await e.readFileAsText(o),t=await Go(e,i,r);await e.writeFile(o,t);break}default:throw new Error(`Invalid method: ${s}`)}};async function zo(e,r){for(const s in r)await e.defineConstant(s,r[s])}async function Go(e,r,s){await e.writeFile("/tmp/code.php",r);const n=Tt({consts:s});return await e.run({code:`${Ko}
406
402
  $wp_config_path = '/tmp/code.php';
407
403
  $wp_config = file_get_contents($wp_config_path);
408
404
  $new_wp_config = rewrite_wp_config_to_define_constants($wp_config, ${n.consts});
409
405
  file_put_contents($wp_config_path, $new_wp_config);
410
- `}),await e.readFileAsText("/tmp/code.php")}const fi=async(e,{options:r})=>{const s=await e.documentRoot;await e.run({code:`<?php
411
- include ${Fe(s)} . '/wp-load.php';
412
- $site_options = ${Fe(r)};
406
+ `}),await e.readFileAsText("/tmp/code.php")}const li=async(e,{options:r})=>{const s=await e.documentRoot;await e.run({code:`<?php
407
+ include ${Ie(s)} . '/wp-load.php';
408
+ $site_options = ${Ie(r)};
413
409
  foreach($site_options as $name => $value) {
414
410
  update_option($name, $value);
415
411
  }
416
412
  echo "Success";
417
413
  `})},Un=async(e,{meta:r,userId:s})=>{const n=await e.documentRoot;await e.run({code:`<?php
418
- include ${Fe(n)} . '/wp-load.php';
419
- $meta = ${Fe(r)};
414
+ include ${Ie(n)} . '/wp-load.php';
415
+ $meta = ${Ie(r)};
420
416
  foreach($meta as $name => $value) {
421
- update_user_meta(${Fe(s)}, $name, $value);
417
+ update_user_meta(${Ie(s)}, $name, $value);
422
418
  }
423
- `})},li="/tmp/wp-cli.phar",Vo={resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},zn=async(e,r=li)=>{if(!await e.fileExists(r))throw new Error(`wp-cli.phar not found at ${r}.
419
+ `})},ui="/tmp/wp-cli.phar",Zo={resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},qn=async(e,r=ui)=>{if(!await e.fileExists(r))throw new Error(`wp-cli.phar not found at ${r}.
424
420
  You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
425
421
  {
426
422
  "extraLibraries": [ "wp-cli" ]
427
423
  }
428
424
  Read more about it in the documentation.
429
- https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},ui=async(e,{command:r,wpCliPath:s=li})=>{await zn(e,s);let n;if(typeof r=="string"?(r=r.trim(),n=Go(r)):n=r,n.shift()!=="wp")throw new Error('The first argument must be "wp".');const i=await e.documentRoot;await e.writeFile("/tmp/stdout",""),await e.writeFile("/tmp/stderr",""),await e.writeFile(ge(i,"run-cli.php"),`<?php
425
+ https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`)},ci=async(e,{command:r,wpCliPath:s=ui})=>{await qn(e,s);let n;if(typeof r=="string"?(r=r.trim(),n=Vo(r)):n=r,n.shift()!=="wp")throw new Error('The first argument must be "wp".');const i=await e.documentRoot;await e.writeFile("/tmp/stdout",""),await e.writeFile("/tmp/stderr",""),await e.writeFile(_e(i,"run-cli.php"),`<?php
430
426
  // Set up the environment to emulate a shell script
431
427
  // call.
432
428
 
@@ -439,7 +435,7 @@ function skip_whitespace($tokens) {
439
435
  $GLOBALS['argv'] = array_merge([
440
436
  "/tmp/wp-cli.phar",
441
437
  "--path=${i}"
442
- ], ${Fe(n)});
438
+ ], ${Ie(n)});
443
439
 
444
440
  // Provide stdin, stdout, stderr streams outside of
445
441
  // the CLI SAPI.
@@ -447,12 +443,12 @@ function skip_whitespace($tokens) {
447
443
  define('STDOUT', fopen('php://stdout', 'wb'));
448
444
  define('STDERR', fopen('php://stderr', 'wb'));
449
445
 
450
- require( ${Fe(s)} );
451
- `);const t=await e.run({scriptPath:ge(i,"run-cli.php")});if(t.errors)throw new Error(t.errors);return t};function Go(e){let n=0,o="";const i=[];let t="";for(let p=0;p<e.length;p++){const y=e[p];n===0?y==='"'||y==="'"?(n=1,o=y):y.match(/\s/)?(t&&i.push(t),t=""):t+=y:n===1&&(y==="\\"?(p++,t+=e[p]):y===o?(n=0,o=""):t+=y)}return t&&i.push(t),i}const Mn=async(e,{wpCliPath:r})=>{await zn(e,r),await ns(e,{consts:{WP_ALLOW_MULTISITE:1}});const s=new URL(await e.absoluteUrl);if(s.port!==""){let i=`The current host is ${s.host}, but WordPress multisites do not support custom ports.`;throw s.hostname==="localhost"&&(i+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(i)}const n=s.pathname.replace(/\/$/,"")+"/",o=`${s.protocol}//${s.hostname}${n}`;await fi(e,{options:{siteurl:o,home:o}}),await ui(e,{command:"wp core multisite-convert"})},Wn=async(e,{fromPath:r,toPath:s})=>{await e.writeFile(s,await e.readFileAsBuffer(r))},Hn=async(e,{fromPath:r,toPath:s})=>{await e.mv(r,s)},Zn=async(e,{path:r})=>{await e.mkdir(r)},Vn=async(e,{path:r})=>{await e.rmdir(r)},ci=async(e,{path:r,data:s})=>{s instanceof File&&(s=new Uint8Array(await s.arrayBuffer())),r.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(r,s)},Xt={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 Yo(e){const r=typeof e=="object"?e==null?void 0:e.errno:null;if(r in Xt)return Xt[r]}function Ye(e=""){return function(s,n,o){const i=o.value;o.value=function(...t){try{return i.apply(this,t)}catch(p){const y=typeof p=="object"?p==null?void 0:p.errno:null;if(y in Xt){const u=Xt[y],d=typeof t[1]=="string"?t[1]:null,w=d!==null?e.replaceAll("{path}",d):e;throw new Error(`${w}: ${u}`,{cause:p})}throw p}}}}var Ko=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,Ke=(e,r,s,n)=>{for(var o=n>1?void 0:n?Xo(r,s):r,i=e.length-1,t;i>=0;i--)(t=e[i])&&(o=(n?t(r,s,o):t(o))||o);return n&&o&&Ko(r,s,o),o};const Xe=class Ie{static readFileAsText(r,s){return new TextDecoder().decode(Ie.readFileAsBuffer(r,s))}static readFileAsBuffer(r,s){return r.readFile(s)}static writeFile(r,s,n){r.writeFile(s,n)}static unlink(r,s){r.unlink(s)}static mv(r,s,n){try{const o=r.lookupPath(s).node.mount,i=Ie.fileExists(r,n)?r.lookupPath(n).node.mount:r.lookupPath(gt(n)).node.mount;o.mountpoint!==i.mountpoint?(Ie.copyRecursive(r,s,n),Ie.isDir(r,s)?Ie.rmdir(r,s,{recursive:!0}):r.unlink(s)):r.rename(s,n)}catch(o){const i=Yo(o);throw i?new Error(`Could not move ${s} to ${n}: ${i}`,{cause:o}):o}}static rmdir(r,s,n={recursive:!0}){n!=null&&n.recursive&&Ie.listFiles(r,s).forEach(o=>{const i=`${s}/${o}`;Ie.isDir(r,i)?Ie.rmdir(r,i,n):Ie.unlink(r,i)}),r.rmdir(s)}static listFiles(r,s,n={prependPath:!1}){if(!Ie.fileExists(r,s))return[];try{const o=r.readdir(s).filter(i=>i!=="."&&i!=="..");if(n.prependPath){const i=s.replace(/\/$/,"");return o.map(t=>`${i}/${t}`)}return o}catch(o){return Se.error(o,{path:s}),[]}}static isDir(r,s){return Ie.fileExists(r,s)?r.isDir(r.lookupPath(s,{follow:!0}).node.mode):!1}static isFile(r,s){return Ie.fileExists(r,s)?r.isFile(r.lookupPath(s,{follow:!0}).node.mode):!1}static symlink(r,s,n){return r.symlink(s,n)}static isSymlink(r,s){return Ie.fileExists(r,s)?r.isLink(r.lookupPath(s).node.mode):!1}static readlink(r,s){return r.readlink(s)}static realpath(r,s){return r.lookupPath(s,{follow:!0}).path}static fileExists(r,s){try{return r.lookupPath(s),!0}catch{return!1}}static mkdir(r,s){r.mkdirTree(s)}static copyRecursive(r,s,n){const o=r.lookupPath(s).node;if(r.isDir(o.mode)){r.mkdirTree(n);const i=r.readdir(s).filter(t=>t!=="."&&t!=="..");for(const t of i)Ie.copyRecursive(r,ge(s,t),ge(n,t))}else r.writeFile(n,r.readFile(s))}};Ke([Ye('Could not read "{path}"')],Xe,"readFileAsText",1);Ke([Ye('Could not read "{path}"')],Xe,"readFileAsBuffer",1);Ke([Ye('Could not write to "{path}"')],Xe,"writeFile",1);Ke([Ye('Could not unlink "{path}"')],Xe,"unlink",1);Ke([Ye('Could not remove directory "{path}"')],Xe,"rmdir",1);Ke([Ye('Could not list files in "{path}"')],Xe,"listFiles",1);Ke([Ye('Could not stat "{path}"')],Xe,"isDir",1);Ke([Ye('Could not stat "{path}"')],Xe,"isFile",1);Ke([Ye('Could not stat "{path}"')],Xe,"realpath",1);Ke([Ye('Could not stat "{path}"')],Xe,"fileExists",1);Ke([Ye('Could not create directory "{path}"')],Xe,"mkdir",1);Ke([Ye('Could not copy files from "{path}"')],Xe,"copyRecursive",1);const Qo={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 Qt{constructor(r,s,n,o="",i=0){this.httpStatusCode=r,this.headers=s,this.bytes=n,this.exitCode=i,this.errors=o}static forHttpCode(r,s=""){return new Qt(r,{},new TextEncoder().encode(s||Qo[r]||""))}static fromRawData(r){return new Qt(r.httpStatusCode,r.headers,r.bytes,r.errors,r.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 Ri="/internal/shared/php.ini";function di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const{hasOwnProperty:_s}=Object.prototype,Hs=(e,r={})=>{typeof r=="string"&&(r={section:r}),r.align=r.align===!0,r.newline=r.newline===!0,r.sort=r.sort===!0,r.whitespace=r.whitespace===!0||r.align===!0,r.platform=r.platform||typeof process<"u"&&process.platform,r.bracketedArray=r.bracketedArray!==!1;const s=r.platform==="win32"?`\r
446
+ require( ${Ie(s)} );
447
+ `);const t=await e.run({scriptPath:_e(i,"run-cli.php")});if(t.errors)throw new Error(t.errors);return t};function Vo(e){let n=0,o="";const i=[];let t="";for(let p=0;p<e.length;p++){const y=e[p];n===0?y==='"'||y==="'"?(n=1,o=y):y.match(/\s/)?(t&&i.push(t),t=""):t+=y:n===1&&(y==="\\"?(p++,t+=e[p]):y===o?(n=0,o=""):t+=y)}return t&&i.push(t),i}const Mn=async(e,{wpCliPath:r})=>{await qn(e,r),await as(e,{consts:{WP_ALLOW_MULTISITE:1}});const s=new URL(await e.absoluteUrl);if(s.port!==""){let i=`The current host is ${s.host}, but WordPress multisites do not support custom ports.`;throw s.hostname==="localhost"&&(i+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(i)}const n=s.pathname.replace(/\/$/,"")+"/",o=`${s.protocol}//${s.hostname}${n}`;await li(e,{options:{siteurl:o,home:o}}),await ci(e,{command:"wp core multisite-convert"})},Kn=async(e,{fromPath:r,toPath:s})=>{await e.writeFile(s,await e.readFileAsBuffer(r))},zn=async(e,{fromPath:r,toPath:s})=>{await e.mv(r,s)},Gn=async(e,{path:r})=>{await e.mkdir(r)},Zn=async(e,{path:r})=>{await e.rmdir(r)},di=async(e,{path:r,data:s})=>{s instanceof File&&(s=new Uint8Array(await s.arrayBuffer())),r.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(r,s)},Qt={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 Yo(e){const r=typeof e=="object"?e==null?void 0:e.errno:null;if(r in Qt)return Qt[r]}function Ve(e=""){return function(s,n,o){const i=o.value;o.value=function(...t){try{return i.apply(this,t)}catch(p){const y=typeof p=="object"?p==null?void 0:p.errno:null;if(y in Qt){const u=Qt[y],d=typeof t[1]=="string"?t[1]:null,g=d!==null?e.replaceAll("{path}",d):e;throw new Error(`${g}: ${u}`,{cause:p})}throw p}}}}var Xo=Object.defineProperty,Qo=Object.getOwnPropertyDescriptor,Ye=(e,r,s,n)=>{for(var o=n>1?void 0:n?Qo(r,s):r,i=e.length-1,t;i>=0;i--)(t=e[i])&&(o=(n?t(r,s,o):t(o))||o);return n&&o&&Xo(r,s,o),o};const Xe=class $e{static readFileAsText(r,s){return new TextDecoder().decode($e.readFileAsBuffer(r,s))}static readFileAsBuffer(r,s){return r.readFile(s)}static writeFile(r,s,n){r.writeFile(s,n)}static unlink(r,s){r.unlink(s)}static mv(r,s,n){try{const o=r.lookupPath(s).node.mount,i=$e.fileExists(r,n)?r.lookupPath(n).node.mount:r.lookupPath(gt(n)).node.mount;o.mountpoint!==i.mountpoint?($e.copyRecursive(r,s,n),$e.isDir(r,s)?$e.rmdir(r,s,{recursive:!0}):r.unlink(s)):r.rename(s,n)}catch(o){const i=Yo(o);throw i?new Error(`Could not move ${s} to ${n}: ${i}`,{cause:o}):o}}static rmdir(r,s,n={recursive:!0}){n!=null&&n.recursive&&$e.listFiles(r,s).forEach(o=>{const i=`${s}/${o}`;$e.isDir(r,i)?$e.rmdir(r,i,n):$e.unlink(r,i)}),r.rmdir(s)}static listFiles(r,s,n={prependPath:!1}){if(!$e.fileExists(r,s))return[];try{const o=r.readdir(s).filter(i=>i!=="."&&i!=="..");if(n.prependPath){const i=s.replace(/\/$/,"");return o.map(t=>`${i}/${t}`)}return o}catch(o){return xe.error(o,{path:s}),[]}}static isDir(r,s){return $e.fileExists(r,s)?r.isDir(r.lookupPath(s,{follow:!0}).node.mode):!1}static isFile(r,s){return $e.fileExists(r,s)?r.isFile(r.lookupPath(s,{follow:!0}).node.mode):!1}static symlink(r,s,n){return r.symlink(s,n)}static isSymlink(r,s){return $e.fileExists(r,s)?r.isLink(r.lookupPath(s).node.mode):!1}static readlink(r,s){return r.readlink(s)}static realpath(r,s){return r.lookupPath(s,{follow:!0}).path}static fileExists(r,s){try{return r.lookupPath(s),!0}catch{return!1}}static mkdir(r,s){r.mkdirTree(s)}static copyRecursive(r,s,n){const o=r.lookupPath(s).node;if(r.isDir(o.mode)){r.mkdirTree(n);const i=r.readdir(s).filter(t=>t!=="."&&t!=="..");for(const t of i)$e.copyRecursive(r,_e(s,t),_e(n,t))}else r.writeFile(n,r.readFile(s))}};Ye([Ve('Could not read "{path}"')],Xe,"readFileAsText",1);Ye([Ve('Could not read "{path}"')],Xe,"readFileAsBuffer",1);Ye([Ve('Could not write to "{path}"')],Xe,"writeFile",1);Ye([Ve('Could not unlink "{path}"')],Xe,"unlink",1);Ye([Ve('Could not remove directory "{path}"')],Xe,"rmdir",1);Ye([Ve('Could not list files in "{path}"')],Xe,"listFiles",1);Ye([Ve('Could not stat "{path}"')],Xe,"isDir",1);Ye([Ve('Could not stat "{path}"')],Xe,"isFile",1);Ye([Ve('Could not stat "{path}"')],Xe,"realpath",1);Ye([Ve('Could not stat "{path}"')],Xe,"fileExists",1);Ye([Ve('Could not create directory "{path}"')],Xe,"mkdir",1);Ye([Ve('Could not copy files from "{path}"')],Xe,"copyRecursive",1);const Jo={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 Jt{constructor(r,s,n,o="",i=0){this.httpStatusCode=r,this.headers=s,this.bytes=n,this.exitCode=i,this.errors=o}static forHttpCode(r,s=""){return new Jt(r,{},new TextEncoder().encode(s||Jo[r]||""))}static fromRawData(r){return new Jt(r.httpStatusCode,r.headers,r.bytes,r.errors,r.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 Ii="/internal/shared/php.ini";function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const{hasOwnProperty:vs}=Object.prototype,zs=(e,r={})=>{typeof r=="string"&&(r={section:r}),r.align=r.align===!0,r.newline=r.newline===!0,r.sort=r.sort===!0,r.whitespace=r.whitespace===!0||r.align===!0,r.platform=r.platform||typeof process<"u"&&process.platform,r.bracketedArray=r.bracketedArray!==!1;const s=r.platform==="win32"?`\r
452
448
  `:`
453
- `,n=r.whitespace?" = ":"=",o=[],i=r.sort?Object.keys(e).sort():Object.keys(e);let t=0;r.align&&(t=yr(i.filter(u=>e[u]===null||Array.isArray(e[u])||typeof e[u]!="object").map(u=>Array.isArray(e[u])?`${u}[]`:u).concat([""]).reduce((u,d)=>yr(u).length>=yr(d).length?u:d)).length);let p="";const y=r.bracketedArray?"[]":"";for(const u of i){const d=e[u];if(d&&Array.isArray(d))for(const w of d)p+=yr(`${u}${y}`).padEnd(t," ")+n+yr(w)+s;else d&&typeof d=="object"?o.push(u):p+=yr(u).padEnd(t," ")+n+yr(d)+s}r.section&&p.length&&(p="["+yr(r.section)+"]"+(r.newline?s+s:s)+p);for(const u of o){const d=Gn(u,".").join("\\."),w=(r.section?r.section+".":"")+d,_=Hs(e[u],{...r,section:w});p.length&&_.length&&(p+=s),p+=_}return p};function Gn(e,r){var s=0,n=0,o=0,i=[];do if(o=e.indexOf(r,s),o!==-1){if(s=o+r.length,o>0&&e[o-1]==="\\")continue;i.push(e.slice(n,o)),n=o+r.length}while(o!==-1);return i.push(e.slice(n)),i}const Fi=(e,r={})=>{r.bracketedArray=r.bracketedArray!==!1;const s=Object.create(null);let n=s,o=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,t=e.split(/[\r\n]+/g),p={};for(const u of t){if(!u||u.match(/^\s*[;#]/)||u.match(/^\s*$/))continue;const d=u.match(i);if(!d)continue;if(d[1]!==void 0){if(o=zt(d[1]),o==="__proto__"){n=Object.create(null);continue}n=s[o]=s[o]||Object.create(null);continue}const w=zt(d[2]);let _;r.bracketedArray?_=w.length>2&&w.slice(-2)==="[]":(p[w]=((p==null?void 0:p[w])||0)+1,_=p[w]>1);const b=_?w.slice(0,-2):w;if(b==="__proto__")continue;const B=d[3]?zt(d[4]):!0,P=B==="true"||B==="false"||B==="null"?JSON.parse(B):B;_&&(_s.call(n,b)?Array.isArray(n[b])||(n[b]=[n[b]]):n[b]=[]),Array.isArray(n[b])?n[b].push(P):n[b]=P}const y=[];for(const u of Object.keys(s)){if(!_s.call(s,u)||typeof s[u]!="object"||Array.isArray(s[u]))continue;const d=Gn(u,".");n=s;const w=d.pop(),_=w.replace(/\\\./g,".");for(const b of d)b!=="__proto__"&&((!_s.call(n,b)||typeof n[b]!="object")&&(n[b]=Object.create(null)),n=n[b]);n===s&&_===w||(n[_]=s[u],y.push(u))}for(const u of y)delete s[u];return s},Yn=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),yr=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Yn(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),zt=e=>{if(e=(e||"").trim(),Yn(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let r=!1,s="";for(let n=0,o=e.length;n<o;n++){const i=e.charAt(n);if(r)"\\;#".indexOf(i)!==-1?s+=i:s+="\\"+i,r=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?r=!0:s+=i}}return r&&(s+="\\"),s.trim()}return e};var Bi={parse:Fi,decode:Fi,stringify:Hs,encode:Hs,safe:yr,unsafe:zt};async function Jo(e,r){const s=Bi.parse(await e.readFileAsText(Ri));for(const[n,o]of Object.entries(r))o==null?delete s[n]:s[n]=o;await e.writeFile(Ri,Bi.stringify(s))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const e=this.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)return;yield s}}finally{e.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const as=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],Kn=as[0],ep=as;async function os(e,r,s,{rmRoot:n=!1}={}){n&&await e.isDir(r)&&await e.rmdir(r,{recursive:!0});for(const[o,i]of Object.entries(s)){const t=ge(r,o);await e.fileExists(gt(t))||await e.mkdir(gt(t)),i instanceof Uint8Array||typeof i=="string"?await e.writeFile(t,i):await os(e,t,i)}}const Xn=async(e,{writeToPath:r,filesTree:s})=>{await os(e,r,s.files)},hi=async(e,{siteUrl:r})=>{await ns(e,{consts:{WP_HOME:r,WP_SITEURL:r}})},Qn=async(e,{file:r},s)=>{var o;(o=s==null?void 0:s.tracker)==null||o.setCaption("Importing content"),await ci(e,{path:"/tmp/import.wxr",data:r});const n=await e.documentRoot;await e.run({code:`<?php
454
- require ${Fe(n)} . '/wp-load.php';
455
- require ${Fe(n)} . '/wp-admin/includes/admin.php';
449
+ `,n=r.whitespace?" = ":"=",o=[],i=r.sort?Object.keys(e).sort():Object.keys(e);let t=0;r.align&&(t=yr(i.filter(u=>e[u]===null||Array.isArray(e[u])||typeof e[u]!="object").map(u=>Array.isArray(e[u])?`${u}[]`:u).concat([""]).reduce((u,d)=>yr(u).length>=yr(d).length?u:d)).length);let p="";const y=r.bracketedArray?"[]":"";for(const u of i){const d=e[u];if(d&&Array.isArray(d))for(const g of d)p+=yr(`${u}${y}`).padEnd(t," ")+n+yr(g)+s;else d&&typeof d=="object"?o.push(u):p+=yr(u).padEnd(t," ")+n+yr(d)+s}r.section&&p.length&&(p="["+yr(r.section)+"]"+(r.newline?s+s:s)+p);for(const u of o){const d=Vn(u,".").join("\\."),g=(r.section?r.section+".":"")+d,b=zs(e[u],{...r,section:g});p.length&&b.length&&(p+=s),p+=b}return p};function Vn(e,r){var s=0,n=0,o=0,i=[];do if(o=e.indexOf(r,s),o!==-1){if(s=o+r.length,o>0&&e[o-1]==="\\")continue;i.push(e.slice(n,o)),n=o+r.length}while(o!==-1);return i.push(e.slice(n)),i}const Hi=(e,r={})=>{r.bracketedArray=r.bracketedArray!==!1;const s=Object.create(null);let n=s,o=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,t=e.split(/[\r\n]+/g),p={};for(const u of t){if(!u||u.match(/^\s*[;#]/)||u.match(/^\s*$/))continue;const d=u.match(i);if(!d)continue;if(d[1]!==void 0){if(o=qt(d[1]),o==="__proto__"){n=Object.create(null);continue}n=s[o]=s[o]||Object.create(null);continue}const g=qt(d[2]);let b;r.bracketedArray?b=g.length>2&&g.slice(-2)==="[]":(p[g]=((p==null?void 0:p[g])||0)+1,b=p[g]>1);const w=b?g.slice(0,-2):g;if(w==="__proto__")continue;const H=d[3]?qt(d[4]):!0,P=H==="true"||H==="false"||H==="null"?JSON.parse(H):H;b&&(vs.call(n,w)?Array.isArray(n[w])||(n[w]=[n[w]]):n[w]=[]),Array.isArray(n[w])?n[w].push(P):n[w]=P}const y=[];for(const u of Object.keys(s)){if(!vs.call(s,u)||typeof s[u]!="object"||Array.isArray(s[u]))continue;const d=Vn(u,".");n=s;const g=d.pop(),b=g.replace(/\\\./g,".");for(const w of d)w!=="__proto__"&&((!vs.call(n,w)||typeof n[w]!="object")&&(n[w]=Object.create(null)),n=n[w]);n===s&&b===g||(n[b]=s[u],y.push(u))}for(const u of y)delete s[u];return s},Yn=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),yr=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Yn(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),qt=e=>{if(e=(e||"").trim(),Yn(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let r=!1,s="";for(let n=0,o=e.length;n<o;n++){const i=e.charAt(n);if(r)"\\;#".indexOf(i)!==-1?s+=i:s+="\\"+i,r=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?r=!0:s+=i}}return r&&(s+="\\"),s.trim()}return e};var $i={parse:Hi,decode:Hi,stringify:zs,encode:zs,safe:yr,unsafe:qt};async function ep(e,r){const s=$i.parse(await e.readFileAsText(Ii));for(const[n,o]of Object.entries(r))o==null?delete s[n]:s[n]=o;await e.writeFile(Ii,$i.stringify(s))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const e=this.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)return;yield s}}finally{e.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const os=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],Xn=os[0],rp=os;async function ps(e,r,s,{rmRoot:n=!1}={}){n&&await e.isDir(r)&&await e.rmdir(r,{recursive:!0});for(const[o,i]of Object.entries(s)){const t=_e(r,o);await e.fileExists(gt(t))||await e.mkdir(gt(t)),i instanceof Uint8Array||typeof i=="string"?await e.writeFile(t,i):await ps(e,t,i)}}const Qn=async(e,{writeToPath:r,filesTree:s})=>{await ps(e,r,s.files)},yi=async(e,{siteUrl:r})=>{await as(e,{consts:{WP_HOME:r,WP_SITEURL:r}})},Jn=async(e,{file:r},s)=>{var o;(o=s==null?void 0:s.tracker)==null||o.setCaption("Importing content"),await di(e,{path:"/tmp/import.wxr",data:r});const n=await e.documentRoot;await e.run({code:`<?php
450
+ require ${Ie(n)} . '/wp-load.php';
451
+ require ${Ie(n)} . '/wp-admin/includes/admin.php';
456
452
 
457
453
  kses_remove_filters();
458
454
  $admin_id = get_users(array('role' => 'Administrator') )[0]->ID;
@@ -470,7 +466,7 @@ function skip_whitespace($tokens) {
470
466
  });
471
467
 
472
468
  $result = $importer->import( '/tmp/import.wxr' );
473
- `})},yi=async(e,{themeSlug:r=""},s)=>{var o;(o=s==null?void 0:s.tracker)==null||o.setCaption("Importing theme starter content");const n=await e.documentRoot;await e.run({code:`<?php
469
+ `})},mi=async(e,{themeSlug:r=""},s)=>{var o;(o=s==null?void 0:s.tracker)==null||o.setCaption("Importing theme starter content");const n=await e.documentRoot;await e.run({code:`<?php
474
470
 
475
471
  /**
476
472
  * Ensure that the customizer loads as an admin user.
@@ -493,7 +489,7 @@ function skip_whitespace($tokens) {
493
489
  * See _wp_customize_include()
494
490
  */
495
491
  $_REQUEST['wp_customize'] = 'on';
496
- $_REQUEST['customize_theme'] = ${Fe(r)} ?: get_stylesheet();
492
+ $_REQUEST['customize_theme'] = ${Ie(r)} ?: get_stylesheet();
497
493
 
498
494
  /*
499
495
  * Claim this is a ajax request saving settings, to avoid the preview filters being applied.
@@ -505,7 +501,7 @@ function skip_whitespace($tokens) {
505
501
  }
506
502
  playground_add_filter( 'plugins_loaded', 'importThemeStarterContent_plugins_loaded', 0 );
507
503
 
508
- require ${Fe(n)} . '/wp-load.php';
504
+ require ${Ie(n)} . '/wp-load.php';
509
505
 
510
506
  // Return early if there's no starter content.
511
507
  if ( ! get_theme_starter_content() ) {
@@ -517,7 +513,7 @@ function skip_whitespace($tokens) {
517
513
 
518
514
  // Publish the changeset, which publishes the starter content.
519
515
  wp_publish_post( $wp_customize->changeset_post_id() );
520
- `})},vs="/tmp/file.zip",Jn=async(e,r,s,n=!0)=>{if(r instanceof File){const i=r;r=vs,await e.writeFile(r,new Uint8Array(await i.arrayBuffer()))}const o=xt({zipPath:r,extractToPath:s,overwriteFiles:n});await e.run({code:`<?php
516
+ `})},Ps="/tmp/file.zip",ea=async(e,r,s,n=!0)=>{if(r instanceof File){const i=r;r=Ps,await e.writeFile(r,new Uint8Array(await i.arrayBuffer()))}const o=Tt({zipPath:r,extractToPath:s,overwriteFiles:n});await e.run({code:`<?php
521
517
  function unzip($zipPath, $extractTo, $overwriteFiles = true)
522
518
  {
523
519
  if (!is_dir($extractTo)) {
@@ -543,10 +539,10 @@ function skip_whitespace($tokens) {
543
539
  }
544
540
  }
545
541
  unzip(${o.zipPath}, ${o.extractToPath}, ${o.overwriteFiles});
546
- `}),await e.fileExists(vs)&&await e.unlink(vs)},ps=async(e,{zipFile:r,zipPath:s,extractToPath:n})=>{if(s)Se.warn('The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.');else if(!r)throw new Error("Either zipPath or zipFile must be provided");await Jn(e,r||s,n)},ea=async(e,{wordPressFilesZip:r,pathInZip:s=""})=>{const n=await e.documentRoot;let o=ge("/tmp","import");await e.mkdir(o),await ps(e,{zipFile:r,extractToPath:o}),o=ge(o,s);const i=ge(o,"wp-content"),t=ge(n,"wp-content");for(const d of ii){const w=ge(i,d);await Ii(e,w);const _=ge(t,d);await e.fileExists(_)&&(await e.mkdir(gt(w)),await e.mv(_,w))}const p=ge(o,"wp-content","database");await e.fileExists(p)||await e.mv(ge(n,"wp-content","database"),p);const y=await e.listFiles(o);for(const d of y)await Ii(e,ge(n,d)),await e.mv(ge(o,d),ge(n,d));await e.rmdir(o),await hi(e,{siteUrl:await e.absoluteUrl});const u=Fe(ge(n,"wp-admin","upgrade.php"));await e.run({code:`<?php
542
+ `}),await e.fileExists(Ps)&&await e.unlink(Ps)},fs=async(e,{zipFile:r,zipPath:s,extractToPath:n})=>{if(s)xe.warn('The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.');else if(!r)throw new Error("Either zipPath or zipFile must be provided");await ea(e,r||s,n)},ra=async(e,{wordPressFilesZip:r,pathInZip:s=""})=>{const n=await e.documentRoot;let o=_e("/tmp","import");await e.mkdir(o),await fs(e,{zipFile:r,extractToPath:o}),o=_e(o,s);const i=_e(o,"wp-content"),t=_e(n,"wp-content");for(const d of ni){const g=_e(i,d);await Ri(e,g);const b=_e(t,d);await e.fileExists(b)&&(await e.mkdir(gt(g)),await e.mv(b,g))}const p=_e(o,"wp-content","database");await e.fileExists(p)||await e.mv(_e(n,"wp-content","database"),p);const y=await e.listFiles(o);for(const d of y)await Ri(e,_e(n,d)),await e.mv(_e(o,d),_e(n,d));await e.rmdir(o),await yi(e,{siteUrl:await e.absoluteUrl});const u=Ie(_e(n,"wp-admin","upgrade.php"));await e.run({code:`<?php
547
543
  $_GET['step'] = 'upgrade_db';
548
544
  require ${u};
549
- `})};async function Ii(e,r){await e.fileExists(r)&&(await e.isDir(r)?await e.rmdir(r):await e.unlink(r))}async function ra(e){const r=await e.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([r.bytes],"export.xml")}async function ta(e,{targetPath:r,zipFile:s,ifAlreadyInstalled:n="overwrite",targetFolderName:o=""}){const t=s.name.replace(/\.zip$/,""),p=ge(await e.documentRoot,"wp-content"),y=ge(p,jn()),u=ge(y,"assets",t);await e.fileExists(u)&&await e.rmdir(y,{recursive:!0}),await e.mkdir(y);try{await ps(e,{zipFile:s,extractToPath:u});let d=await e.listFiles(u,{prependPath:!0});d=d.filter(P=>!P.endsWith("/__MACOSX"));const w=d.length===1&&await e.isDir(d[0]);let _,b="";w?(b=d[0],_=d[0].split("/").pop()):(b=u,_=t),o&&o.length&&(_=o);const B=`${r}/${_}`;if(await e.fileExists(B)){if(!await e.isDir(B))throw new Error(`Cannot install asset ${_} 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:_};throw new Error(`Cannot install asset ${_} to ${r} because it already exists and the ifAlreadyInstalled option was set to ${n}`)}}return await e.mv(b,B),{assetFolderPath:B,assetFolderName:_}}finally{await e.rmdir(y,{recursive:!0})}}function fs(e){const r=e.split(".").shift().replace(/-/g," ");return r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()}const sa=async(e,{pluginData:r,pluginZipFile:s,ifAlreadyInstalled:n,options:o={}},i)=>{s&&(r=s,Se.warn('The "pluginZipFile" option is deprecated. Use "pluginData" instead.'));const t="targetFolderName"in o?o.targetFolderName:"";let p="",y="";if(r instanceof File){const d=r.name.split("/").pop()||"plugin.zip";y=fs(d),i==null||i.tracker.setCaption(`Installing the ${y} plugin`);const w=await ta(e,{ifAlreadyInstalled:n,zipFile:r,targetPath:`${await e.documentRoot}/wp-content/plugins`,targetFolderName:t});p=w.assetFolderPath,y=w.assetFolderName}else if(r){y=r.name,i==null||i.tracker.setCaption(`Installing the ${y} plugin`);const d=ge(await e.documentRoot,"wp-content","plugins",t||r.name);await os(e,d,r.files,{rmRoot:!0}),p=d}("activate"in o?o.activate:!0)&&await ai(e,{pluginPath:p,pluginName:y},i)},ia=async(e,{themeData:r,themeZipFile:s,ifAlreadyInstalled:n,options:o={}},i)=>{s&&(r=s,Se.warn('The "themeZipFile" option is deprecated. Use "themeData" instead.'));const t="targetFolderName"in o?o.targetFolderName:"";let p="",y="";if(r instanceof File){const w=r.name.split("/").pop()||"theme.zip";y=fs(w),i==null||i.tracker.setCaption(`Installing the ${y} theme`),p=(await ta(e,{ifAlreadyInstalled:n,zipFile:r,targetPath:`${await e.documentRoot}/wp-content/themes`,targetFolderName:t})).assetFolderName}else{y=r.name,p=t||y,i==null||i.tracker.setCaption(`Installing the ${y} theme`);const w=ge(await e.documentRoot,"wp-content","themes",p);await os(e,w,r.files,{rmRoot:!0})}("activate"in o?o.activate:!0)&&await oi(e,{themeFolderName:p},i),("importStarterContent"in o?o.importStarterContent:!1)&&await yi(e,{themeSlug:p},i)},na=async(e,{username:r="admin"}={},s)=>{s==null||s.tracker.setCaption((s==null?void 0:s.initialCaption)||"Logging in"),e.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER",r)},aa=async(e,r,s)=>{var o;(o=s==null?void 0:s.tracker)==null||o.setCaption("Resetting WordPress data");const n=await e.documentRoot;await e.run({env:{DOCROOT:n},code:`<?php
545
+ `})};async function Ri(e,r){await e.fileExists(r)&&(await e.isDir(r)?await e.rmdir(r):await e.unlink(r))}async function ta(e){const r=await e.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([r.bytes],"export.xml")}async function sa(e,{targetPath:r,zipFile:s,ifAlreadyInstalled:n="overwrite",targetFolderName:o=""}){const t=s.name.replace(/\.zip$/,""),p=_e(await e.documentRoot,"wp-content"),y=_e(p,Dn()),u=_e(y,"assets",t);await e.fileExists(u)&&await e.rmdir(y,{recursive:!0}),await e.mkdir(y);try{await fs(e,{zipFile:s,extractToPath:u});let d=await e.listFiles(u,{prependPath:!0});d=d.filter(P=>!P.endsWith("/__MACOSX"));const g=d.length===1&&await e.isDir(d[0]);let b,w="";g?(w=d[0],b=d[0].split("/").pop()):(w=u,b=t),o&&o.length&&(b=o);const H=`${r}/${b}`;if(await e.fileExists(H)){if(!await e.isDir(H))throw new Error(`Cannot install asset ${b} to ${H} 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(H,{recursive:!0});else{if(n==="skip")return{assetFolderPath:H,assetFolderName:b};throw new Error(`Cannot install asset ${b} to ${r} because it already exists and the ifAlreadyInstalled option was set to ${n}`)}}return await e.mv(w,H),{assetFolderPath:H,assetFolderName:b}}finally{await e.rmdir(y,{recursive:!0})}}function ls(e){const r=e.split(".").shift().replace(/-/g," ");return r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()}const ia=async(e,{pluginData:r,pluginZipFile:s,ifAlreadyInstalled:n,options:o={}},i)=>{s&&(r=s,xe.warn('The "pluginZipFile" option is deprecated. Use "pluginData" instead.'));const t="targetFolderName"in o?o.targetFolderName:"";let p="",y="";if(r instanceof File){const d=r.name.split("/").pop()||"plugin.zip";y=ls(d),i==null||i.tracker.setCaption(`Installing the ${y} plugin`);const g=await sa(e,{ifAlreadyInstalled:n,zipFile:r,targetPath:`${await e.documentRoot}/wp-content/plugins`,targetFolderName:t});p=g.assetFolderPath,y=g.assetFolderName}else if(r){y=r.name,i==null||i.tracker.setCaption(`Installing the ${y} plugin`);const d=_e(await e.documentRoot,"wp-content","plugins",t||r.name);await ps(e,d,r.files,{rmRoot:!0}),p=d}("activate"in o?o.activate:!0)&&await oi(e,{pluginPath:p,pluginName:y},i)},na=async(e,{themeData:r,themeZipFile:s,ifAlreadyInstalled:n,options:o={}},i)=>{s&&(r=s,xe.warn('The "themeZipFile" option is deprecated. Use "themeData" instead.'));const t="targetFolderName"in o?o.targetFolderName:"";let p="",y="";if(r instanceof File){const g=r.name.split("/").pop()||"theme.zip";y=ls(g),i==null||i.tracker.setCaption(`Installing the ${y} theme`),p=(await sa(e,{ifAlreadyInstalled:n,zipFile:r,targetPath:`${await e.documentRoot}/wp-content/themes`,targetFolderName:t})).assetFolderName}else{y=r.name,p=t||y,i==null||i.tracker.setCaption(`Installing the ${y} theme`);const g=_e(await e.documentRoot,"wp-content","themes",p);await ps(e,g,r.files,{rmRoot:!0})}("activate"in o?o.activate:!0)&&await pi(e,{themeFolderName:p},i),("importStarterContent"in o?o.importStarterContent:!1)&&await mi(e,{themeSlug:p},i)},aa=async(e,{username:r="admin"}={},s)=>{s==null||s.tracker.setCaption((s==null?void 0:s.initialCaption)||"Logging in"),e.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER",r)},oa=async(e,r,s)=>{var o;(o=s==null?void 0:s.tracker)==null||o.setCaption("Resetting WordPress data");const n=await e.documentRoot;await e.run({env:{DOCROOT:n},code:`<?php
550
546
  require getenv('DOCROOT') . '/wp-load.php';
551
547
 
552
548
  $GLOBALS['@pdo']->query('DELETE FROM wp_posts WHERE id > 0');
@@ -560,11 +556,11 @@ function skip_whitespace($tokens) {
560
556
 
561
557
  $GLOBALS['@pdo']->query('DELETE FROM wp_commentmeta');
562
558
  $GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
563
- `})},oa=async(e,{options:r})=>{await e.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:r.adminPassword||"admin",admin_password:r.adminPassword||"password",admin_password2:r.adminPassword||"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})},pa=async(e,{selfContained:r=!1}={})=>{const s="/tmp/wordpress-playground.zip",n=await e.documentRoot,o=ge(n,"wp-content");let i=ii;r&&(i=i.filter(y=>!y.startsWith("themes/twenty")).filter(y=>y!=="mu-plugins/sqlite-database-integration"));const t=xt({zipPath:s,wpContentPath:o,documentRoot:n,exceptPaths:i.map(y=>ge(n,"wp-content",y)),additionalPaths:r?{[ge(n,"wp-config.php")]:"wp-config.php"}:{}});await tp(e,`zipDir(${t.wpContentPath}, ${t.zipPath}, array(
559
+ `})},pa=async(e,{options:r})=>{await e.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:r.adminPassword||"admin",admin_password:r.adminPassword||"password",admin_password2:r.adminPassword||"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})},fa=async(e,{selfContained:r=!1}={})=>{const s="/tmp/wordpress-playground.zip",n=await e.documentRoot,o=_e(n,"wp-content");let i=ni;r&&(i=i.filter(y=>!y.startsWith("themes/twenty")).filter(y=>y!=="mu-plugins/sqlite-database-integration"));const t=Tt({zipPath:s,wpContentPath:o,documentRoot:n,exceptPaths:i.map(y=>_e(n,"wp-content",y)),additionalPaths:r?{[_e(n,"wp-config.php")]:"wp-config.php"}:{}});await sp(e,`zipDir(${t.wpContentPath}, ${t.zipPath}, array(
564
560
  'exclude_paths' => ${t.exceptPaths},
565
561
  'zip_root' => ${t.documentRoot},
566
562
  'additional_paths' => ${t.additionalPaths}
567
- ));`);const p=await e.readFileAsBuffer(s);return e.unlink(s),p},rp=`<?php
563
+ ));`);const p=await e.readFileAsBuffer(s);return e.unlink(s),p},tp=`<?php
568
564
 
569
565
  function zipDir($root, $output, $options = array())
570
566
  {
@@ -623,7 +619,7 @@ function join_paths()
623
619
 
624
620
  return preg_replace('#/+#', '/', join('/', $paths));
625
621
  }
626
- `;async function tp(e,r){return await e.run({code:rp+r})}const fa=async(e,{language:r},s)=>{s==null||s.tracker.setCaption((s==null?void 0:s.initialCaption)||"Translating"),await e.defineConstant("WPLANG",r);const n=await e.documentRoot,i=[{url:`https://downloads.wordpress.org/translation/core/${(await e.run({code:`<?php
622
+ `;async function sp(e,r){return await e.run({code:tp+r})}const la=async(e,{language:r},s)=>{s==null||s.tracker.setCaption((s==null?void 0:s.initialCaption)||"Translating"),await e.defineConstant("WPLANG",r);const n=await e.documentRoot,i=[{url:`https://downloads.wordpress.org/translation/core/${(await e.run({code:`<?php
627
623
  require '${n}/wp-includes/version.php';
628
624
  echo $wp_version;
629
625
  `})).text}/${r}.zip`,type:"core"}],p=(await e.run({code:`<?php
@@ -646,7 +642,7 @@ function join_paths()
646
642
  )
647
643
  )
648
644
  )
649
- );`})).json;for(const{slug:d,version:w}of p)i.push({url:`https://downloads.wordpress.org/translation/plugin/${d}/${w}/${r}.zip`,type:"plugin"});const u=(await e.run({code:`<?php
645
+ );`})).json;for(const{slug:d,version:g}of p)i.push({url:`https://downloads.wordpress.org/translation/plugin/${d}/${g}/${r}.zip`,type:"plugin"});const u=(await e.run({code:`<?php
650
646
  require_once('${n}/wp-load.php');
651
647
  require_once('${n}/wp-admin/includes/theme.php');
652
648
  echo json_encode(
@@ -661,12 +657,12 @@ function join_paths()
661
657
  wp_get_themes()
662
658
  )
663
659
  )
664
- );`})).json;for(const{slug:d,version:w}of u)i.push({url:`https://downloads.wordpress.org/translation/theme/${d}/${w}/${r}.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:w}of i)try{const _=await fetch(d);if(!_.ok)throw new Error(`Failed to download translations for ${w}: ${_.statusText}`);let b=`${n}/wp-content/languages`;w==="plugin"?b+="/plugins":w==="theme"&&(b+="/themes"),await Jn(e,new File([await _.blob()],`${r}-${w}.zip`),b)}catch(_){if(w==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${r} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);Se.warn(`Error downloading translations for ${w}: ${_}`)}},sp=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:ai,activateTheme:oi,cp:Wn,defineSiteUrl:hi,defineWpConfigConsts:ns,enableMultisite:Mn,exportWXR:ra,importThemeStarterContent:yi,importWordPressFiles:ea,importWxr:Qn,installPlugin:sa,installTheme:ia,login:na,mkdir:Zn,mv:Hn,request:qn,resetData:aa,rm:pi,rmdir:Vn,runPHP:Nn,runPHPWithOptions:Cn,runSql:Dn,runWpInstallationWizard:oa,setSiteLanguage:fa,setSiteOptions:fi,unzip:ps,updateUserMeta:Un,wpCLI:ui,writeFile:ci,writeFiles:Xn,zipWpContent:pa},Symbol.toStringTag,{value:"Module"})),ip=5*1024*1024;function np(e,r){const s=e.headers.get("content-length")||"",n=parseInt(s,10)||ip;function o(i,t){r(new CustomEvent("progress",{detail:{loaded:i,total:t}}))}return new Response(new ReadableStream({async start(i){if(!e.body){i.close();return}const t=e.body.getReader();let p=0;for(;;)try{const{done:y,value:u}=await t.read();if(u&&(p+=u.byteLength),y){o(p,p),i.close();break}else o(p,n),i.enqueue(u)}catch(y){Se.error({e:y}),i.error(y);break}}}),{status:e.status,statusText:e.statusText,headers:e.headers})}const Ps=1e-5;class ls extends EventTarget{constructor({weight:r=1,caption:s="",fillTime:n=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=r,this._selfCaption=s,this._fillTime=n}stage(r,s=""){if(r||(r=this._selfWeight),this._selfWeight-r<-Ps)throw new Error(`Cannot add a stage with weight ${r} as the total weight of registered stages would exceed 1.`);this._selfWeight-=r;const n=new ls({caption:s,weight:r,fillTime:this._fillTime});return this._subTrackers.push(n),n.addEventListener("progress",()=>this.notifyProgress()),n.addEventListener("done",()=>{this.done&&this.notifyDone()}),n}fillSlowly({stopBeforeFinishing:r=!0}={}){if(this._isFilling)return;this._isFilling=!0;const s=100,n=this._fillTime/s;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),r&&this._selfProgress>=99&&clearInterval(this._fillInterval)},n)}set(r){this._selfProgress=Math.min(r,100),this.notifyProgress(),this._selfProgress+Ps>=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 r=this._subTrackers.length-1;r>=0;r--)if(!this._subTrackers[r].done){const s=this._subTrackers[r].caption;if(s)return s}return this._selfCaption}setCaption(r){this._selfCaption=r,this.notifyProgress()}get done(){return this.progress+Ps>=100}get progress(){if(this._selfDone)return 100;const r=this._subTrackers.reduce((s,n)=>s+n.progress*n.weight,this._selfProgress*this._selfWeight);return Math.round(r*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=r=>{this.set(r)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=r=>{this.set(r.detail.loaded/r.detail.total*100)}),this._loadingListener}pipe(r){r.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",s=>{r.setProgress({progress:s.detail.progress,caption:s.detail.caption})}),this.addEventListener("done",()=>{r.setLoaded()})}addEventListener(r,s){super.addEventListener(r,s)}removeEventListener(r,s){super.removeEventListener(r,s)}notifyProgress(){const r=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return r.progress},get caption(){return r.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}function ap(e){let r=[e];return{next(){return Promise.resolve({done:r.length===0,value:r.pop()})},return(){return r=[],{}},[Symbol.asyncIterator](){return this}}}function la(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:ap(e)}class ua{constructor(r){if(typeof Buffer>"u")throw new Error("Missing Buffer dependency");this.stream=la(r),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(r){if(!this.eof())return this.started||await this._init(),this.cursor+r>this.buffer.length&&(this._trim(),await this._accumulate(r)),this._moveCursor(r),this.buffer.slice(this.undoCursor,this.cursor)}async skip(r){this.eof()||(this.started||await this._init(),this.cursor+r>this.buffer.length&&(this._trim(),await this._accumulate(r)),this._moveCursor(r))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:r,value:s}=await this.stream.next();return r&&(this._ended=!0,!s)?Buffer.alloc(0):(s&&(s=Buffer.from(s)),s)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(r){this.undoCursor=this.cursor,this.cursor+=r,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(r){if(this._ended)return;const s=[this.buffer];for(;this.cursor+r>op(s);){const n=await this._next();if(this._ended)break;s.push(n)}this.buffer=Buffer.concat(s)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}}function op(e){return e.reduce((r,s)=>r+s.length,0)}function pp(e,r){const s=r.toString(16);return"0".repeat(e-s.length)+s}class $e{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(r){typeof r=="string"&&(r=Buffer.from(r));const s=r.length+4,n=pp(4,s);return Buffer.concat([Buffer.from(n,"utf8"),r])}static streamReader(r){const s=new ua(r);return async function(){try{let o=await s.read(4);if(o==null)return!0;if(o=parseInt(o.toString("utf8"),16),o===0||o===1)return null;const i=await s.read(o-4);return i??!0}catch(o){return r.error=o,!0}}}}class st extends Error{constructor(r){super(r),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(r){const s=new st(r.message);return s.code=r.code,s.data=r.data,s.caller=r.caller,s.stack=r.stack,s}get isIsomorphicGitError(){return!0}}class _e extends st{constructor(r){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${r}`),this.code=this.name=_e.code,this.data={message:r}}}_e.code="InternalError";class us extends st{constructor(r){super(`The filepath "${r}" contains unsafe character sequences`),this.code=this.name=us.code,this.data={filepath:r}}}us.code="UnsafeFilepathError";function ca(e,r){return-(e<r)||+(e>r)}function fp(e,r){return ca(e.path,r.path)}function lp(e,r){return ca(ji(e),ji(r))}function ji(e){return e.mode==="040000"?e.path+"/":e.path}function da(e){switch(e){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new _e(`Unexpected GitTree entry mode: ${e}`)}function up(e){const r=[];let s=0;for(;s<e.length;){const n=e.indexOf(32,s);if(n===-1)throw new _e(`GitTree: Error parsing buffer at byte location ${s}: Could not find the next space character.`);const o=e.indexOf(0,s);if(o===-1)throw new _e(`GitTree: Error parsing buffer at byte location ${s}: Could not find the next null character.`);let i=e.slice(s,n).toString("utf8");i==="40000"&&(i="040000");const t=da(i),p=e.slice(n+1,o).toString("utf8");if(p.includes("\\")||p.includes("/"))throw new us(p);const y=e.slice(o+1,o+21).toString("hex");s=o+21,r.push({mode:i,path:p,oid:y,type:t})}return r}function cp(e){if(typeof e=="number"&&(e=e.toString(8)),e.match(/^0?4.*/))return"040000";if(e.match(/^1006.*/))return"100644";if(e.match(/^1007.*/))return"100755";if(e.match(/^120.*/))return"120000";if(e.match(/^160.*/))return"160000";throw new _e(`Could not understand file mode: ${e}`)}function dp(e){return!e.oid&&e.sha&&(e.oid=e.sha),e.mode=cp(e.mode),e.type||(e.type=da(e.mode)),e}class mi{constructor(r){if(Buffer.isBuffer(r))this._entries=up(r);else if(Array.isArray(r))this._entries=r.map(dp);else throw new _e("invalid type passed to GitTree constructor");this._entries.sort(fp)}static from(r){return new mi(r)}render(){return this._entries.map(r=>`${r.mode} ${r.type} ${r.oid} ${r.path}`).join(`
665
- `)}toObject(){const r=[...this._entries];return r.sort(lp),Buffer.concat(r.map(s=>{const n=Buffer.from(s.mode.replace(/^0/,"")),o=Buffer.from(" "),i=Buffer.from(s.path,"utf8"),t=Buffer.from([0]),p=Buffer.from(s.oid,"hex");return Buffer.concat([n,o,i,t,p])}))}entries(){return this._entries}*[Symbol.iterator](){for(const r of this._entries)yield r}}function Zs({name:e,email:r,timestamp:s,timezoneOffset:n}){return n=hp(n),`${e} <${r}> ${s} ${n}`}function hp(e){const r=yp(mp(e));e=Math.abs(e);const s=Math.floor(e/60);e-=s*60;let n=String(s),o=String(e);return n.length<2&&(n="0"+n),o.length<2&&(o="0"+o),(r===-1?"-":"+")+n+o}function yp(e){return Math.sign(e)||(Object.is(e,-0)?-1:1)}function mp(e){return e===0?e:-e}function mr(e){return e=e.replace(/\r/g,""),e=e.replace(/^\n+/,""),e=e.replace(/\n+$/,"")+`
666
- `,e}function Jt(e){const[,r,s,n,o]=e.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:r,email:s,timestamp:Number(n),timezoneOffset:gp(o)}}function gp(e){let[,r,s,n]=e.match(/(\+|-)(\d\d)(\d\d)/);return n=(r==="+"?1:-1)*(Number(s)*60+Number(n)),wp(n)}function wp(e){return e===0?e:-e}class ut{constructor(r){if(typeof r=="string")this._tag=r;else if(Buffer.isBuffer(r))this._tag=r.toString("utf8");else if(typeof r=="object")this._tag=ut.render(r);else throw new _e("invalid type passed to GitAnnotatedTag constructor")}static from(r){return new ut(r)}static render(r){return`object ${r.object}
660
+ );`})).json;for(const{slug:d,version:g}of u)i.push({url:`https://downloads.wordpress.org/translation/theme/${d}/${g}/${r}.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:g}of i)try{const b=await fetch(d);if(!b.ok)throw new Error(`Failed to download translations for ${g}: ${b.statusText}`);let w=`${n}/wp-content/languages`;g==="plugin"?w+="/plugins":g==="theme"&&(w+="/themes"),await ea(e,new File([await b.blob()],`${r}-${g}.zip`),w)}catch(b){if(g==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${r} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);xe.warn(`Error downloading translations for ${g}: ${b}`)}},ip=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:oi,activateTheme:pi,cp:Kn,defineSiteUrl:yi,defineWpConfigConsts:as,enableMultisite:Mn,exportWXR:ta,importThemeStarterContent:mi,importWordPressFiles:ra,importWxr:Jn,installPlugin:ia,installTheme:na,login:aa,mkdir:Gn,mv:zn,request:Wn,resetData:oa,rm:fi,rmdir:Zn,runPHP:Fn,runPHPWithOptions:jn,runSql:Nn,runWpInstallationWizard:pa,setSiteLanguage:la,setSiteOptions:li,unzip:fs,updateUserMeta:Un,wpCLI:ci,writeFile:di,writeFiles:Qn,zipWpContent:fa},Symbol.toStringTag,{value:"Module"})),np=5*1024*1024;function ap(e,r){const s=e.headers.get("content-length")||"",n=parseInt(s,10)||np;function o(i,t){r(new CustomEvent("progress",{detail:{loaded:i,total:t}}))}return new Response(new ReadableStream({async start(i){if(!e.body){i.close();return}const t=e.body.getReader();let p=0;for(;;)try{const{done:y,value:u}=await t.read();if(u&&(p+=u.byteLength),y){o(p,p),i.close();break}else o(p,n),i.enqueue(u)}catch(y){xe.error({e:y}),i.error(y);break}}}),{status:e.status,statusText:e.statusText,headers:e.headers})}const Es=1e-5;class us extends EventTarget{constructor({weight:r=1,caption:s="",fillTime:n=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=r,this._selfCaption=s,this._fillTime=n}stage(r,s=""){if(r||(r=this._selfWeight),this._selfWeight-r<-Es)throw new Error(`Cannot add a stage with weight ${r} as the total weight of registered stages would exceed 1.`);this._selfWeight-=r;const n=new us({caption:s,weight:r,fillTime:this._fillTime});return this._subTrackers.push(n),n.addEventListener("progress",()=>this.notifyProgress()),n.addEventListener("done",()=>{this.done&&this.notifyDone()}),n}fillSlowly({stopBeforeFinishing:r=!0}={}){if(this._isFilling)return;this._isFilling=!0;const s=100,n=this._fillTime/s;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),r&&this._selfProgress>=99&&clearInterval(this._fillInterval)},n)}set(r){this._selfProgress=Math.min(r,100),this.notifyProgress(),this._selfProgress+Es>=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 r=this._subTrackers.length-1;r>=0;r--)if(!this._subTrackers[r].done){const s=this._subTrackers[r].caption;if(s)return s}return this._selfCaption}setCaption(r){this._selfCaption=r,this.notifyProgress()}get done(){return this.progress+Es>=100}get progress(){if(this._selfDone)return 100;const r=this._subTrackers.reduce((s,n)=>s+n.progress*n.weight,this._selfProgress*this._selfWeight);return Math.round(r*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=r=>{this.set(r)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=r=>{this.set(r.detail.loaded/r.detail.total*100)}),this._loadingListener}pipe(r){r.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",s=>{r.setProgress({progress:s.detail.progress,caption:s.detail.caption})}),this.addEventListener("done",()=>{r.setLoaded()})}addEventListener(r,s){super.addEventListener(r,s)}removeEventListener(r,s){super.removeEventListener(r,s)}notifyProgress(){const r=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return r.progress},get caption(){return r.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}function op(e){let r=[e];return{next(){return Promise.resolve({done:r.length===0,value:r.pop()})},return(){return r=[],{}},[Symbol.asyncIterator](){return this}}}function ua(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:op(e)}class ca{constructor(r){if(typeof Buffer>"u")throw new Error("Missing Buffer dependency");this.stream=ua(r),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(r){if(!this.eof())return this.started||await this._init(),this.cursor+r>this.buffer.length&&(this._trim(),await this._accumulate(r)),this._moveCursor(r),this.buffer.slice(this.undoCursor,this.cursor)}async skip(r){this.eof()||(this.started||await this._init(),this.cursor+r>this.buffer.length&&(this._trim(),await this._accumulate(r)),this._moveCursor(r))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:r,value:s}=await this.stream.next();return r&&(this._ended=!0,!s)?Buffer.alloc(0):(s&&(s=Buffer.from(s)),s)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(r){this.undoCursor=this.cursor,this.cursor+=r,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(r){if(this._ended)return;const s=[this.buffer];for(;this.cursor+r>pp(s);){const n=await this._next();if(this._ended)break;s.push(n)}this.buffer=Buffer.concat(s)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}}function pp(e){return e.reduce((r,s)=>r+s.length,0)}function fp(e,r){const s=r.toString(16);return"0".repeat(e-s.length)+s}class Ce{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(r){typeof r=="string"&&(r=Buffer.from(r));const s=r.length+4,n=fp(4,s);return Buffer.concat([Buffer.from(n,"utf8"),r])}static streamReader(r){const s=new ca(r);return async function(){try{let o=await s.read(4);if(o==null)return!0;if(o=parseInt(o.toString("utf8"),16),o===0||o===1)return null;const i=await s.read(o-4);return i??!0}catch(o){return r.error=o,!0}}}}class it extends Error{constructor(r){super(r),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(r){const s=new it(r.message);return s.code=r.code,s.data=r.data,s.caller=r.caller,s.stack=r.stack,s}get isIsomorphicGitError(){return!0}}class be extends it{constructor(r){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${r}`),this.code=this.name=be.code,this.data={message:r}}}be.code="InternalError";class cs extends it{constructor(r){super(`The filepath "${r}" contains unsafe character sequences`),this.code=this.name=cs.code,this.data={filepath:r}}}cs.code="UnsafeFilepathError";function da(e,r){return-(e<r)||+(e>r)}function lp(e,r){return da(e.path,r.path)}function up(e,r){return da(Di(e),Di(r))}function Di(e){return e.mode==="040000"?e.path+"/":e.path}function ha(e){switch(e){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new be(`Unexpected GitTree entry mode: ${e}`)}function cp(e){const r=[];let s=0;for(;s<e.length;){const n=e.indexOf(32,s);if(n===-1)throw new be(`GitTree: Error parsing buffer at byte location ${s}: Could not find the next space character.`);const o=e.indexOf(0,s);if(o===-1)throw new be(`GitTree: Error parsing buffer at byte location ${s}: Could not find the next null character.`);let i=e.slice(s,n).toString("utf8");i==="40000"&&(i="040000");const t=ha(i),p=e.slice(n+1,o).toString("utf8");if(p.includes("\\")||p.includes("/"))throw new cs(p);const y=e.slice(o+1,o+21).toString("hex");s=o+21,r.push({mode:i,path:p,oid:y,type:t})}return r}function dp(e){if(typeof e=="number"&&(e=e.toString(8)),e.match(/^0?4.*/))return"040000";if(e.match(/^1006.*/))return"100644";if(e.match(/^1007.*/))return"100755";if(e.match(/^120.*/))return"120000";if(e.match(/^160.*/))return"160000";throw new be(`Could not understand file mode: ${e}`)}function hp(e){return!e.oid&&e.sha&&(e.oid=e.sha),e.mode=dp(e.mode),e.type||(e.type=ha(e.mode)),e}class _i{constructor(r){if(Buffer.isBuffer(r))this._entries=cp(r);else if(Array.isArray(r))this._entries=r.map(hp);else throw new be("invalid type passed to GitTree constructor");this._entries.sort(lp)}static from(r){return new _i(r)}render(){return this._entries.map(r=>`${r.mode} ${r.type} ${r.oid} ${r.path}`).join(`
661
+ `)}toObject(){const r=[...this._entries];return r.sort(up),Buffer.concat(r.map(s=>{const n=Buffer.from(s.mode.replace(/^0/,"")),o=Buffer.from(" "),i=Buffer.from(s.path,"utf8"),t=Buffer.from([0]),p=Buffer.from(s.oid,"hex");return Buffer.concat([n,o,i,t,p])}))}entries(){return this._entries}*[Symbol.iterator](){for(const r of this._entries)yield r}}function Gs({name:e,email:r,timestamp:s,timezoneOffset:n}){return n=yp(n),`${e} <${r}> ${s} ${n}`}function yp(e){const r=mp(_p(e));e=Math.abs(e);const s=Math.floor(e/60);e-=s*60;let n=String(s),o=String(e);return n.length<2&&(n="0"+n),o.length<2&&(o="0"+o),(r===-1?"-":"+")+n+o}function mp(e){return Math.sign(e)||(Object.is(e,-0)?-1:1)}function _p(e){return e===0?e:-e}function mr(e){return e=e.replace(/\r/g,""),e=e.replace(/^\n+/,""),e=e.replace(/\n+$/,"")+`
662
+ `,e}function es(e){const[,r,s,n,o]=e.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:r,email:s,timestamp:Number(n),timezoneOffset:gp(o)}}function gp(e){let[,r,s,n]=e.match(/(\+|-)(\d\d)(\d\d)/);return n=(r==="+"?1:-1)*(Number(s)*60+Number(n)),wp(n)}function wp(e){return e===0?e:-e}class ct{constructor(r){if(typeof r=="string")this._tag=r;else if(Buffer.isBuffer(r))this._tag=r.toString("utf8");else if(typeof r=="object")this._tag=ct.render(r);else throw new be("invalid type passed to GitAnnotatedTag constructor")}static from(r){return new ct(r)}static render(r){return`object ${r.object}
667
663
  type ${r.type}
668
664
  tag ${r.tag}
669
- tagger ${Zs(r.tagger)}
665
+ tagger ${Gs(r.tagger)}
670
666
 
671
667
  ${r.message}
672
668
  ${r.gpgsig?r.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(`
@@ -675,54 +671,54 @@ ${r.gpgsig?r.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexO
675
671
 
676
672
  `)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){const r=this.justHeaders().split(`
677
673
  `),s=[];for(const o of r)o[0]===" "?s[s.length-1]+=`
678
- `+o.slice(1):s.push(o);const n={};for(const o of s){const i=o.slice(0,o.indexOf(" ")),t=o.slice(o.indexOf(" ")+1);Array.isArray(n[i])?n[i].push(t):n[i]=t}return n.tagger&&(n.tagger=Jt(n.tagger)),n.committer&&(n.committer=Jt(n.committer)),n}withoutSignature(){const r=mr(this._tag);return r.indexOf(`
674
+ `+o.slice(1):s.push(o);const n={};for(const o of s){const i=o.slice(0,o.indexOf(" ")),t=o.slice(o.indexOf(" ")+1);Array.isArray(n[i])?n[i].push(t):n[i]=t}return n.tagger&&(n.tagger=es(n.tagger)),n.committer&&(n.committer=es(n.committer)),n}withoutSignature(){const r=mr(this._tag);return r.indexOf(`
679
675
  -----BEGIN PGP SIGNATURE-----`)===-1?r:r.slice(0,r.lastIndexOf(`
680
676
  -----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(`
681
677
  -----BEGIN PGP SIGNATURE-----`)===-1)return;const r=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return mr(r)}payload(){return this.withoutSignature()+`
682
- `}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(r,s,n){const o=r.payload();let{signature:i}=await s({payload:o,secretKey:n});i=mr(i);const t=o+i;return ut.from(t)}}function ks(e){return e.trim().split(`
678
+ `}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(r,s,n){const o=r.payload();let{signature:i}=await s({payload:o,secretKey:n});i=mr(i);const t=o+i;return ct.from(t)}}function ks(e){return e.trim().split(`
683
679
  `).map(r=>" "+r).join(`
684
680
  `)+`
685
681
  `}function bp(e){return e.split(`
686
682
  `).map(r=>r.replace(/^ /,"")).join(`
687
- `)}class qe{constructor(r){if(typeof r=="string")this._commit=r;else if(Buffer.isBuffer(r))this._commit=r.toString("utf8");else if(typeof r=="object")this._commit=qe.render(r);else throw new _e("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:r,signature:s}){const n=qe.justHeaders(r),o=qe.justMessage(r),i=mr(n+`
683
+ `)}class Ne{constructor(r){if(typeof r=="string")this._commit=r;else if(Buffer.isBuffer(r))this._commit=r.toString("utf8");else if(typeof r=="object")this._commit=Ne.render(r);else throw new be("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:r,signature:s}){const n=Ne.justHeaders(r),o=Ne.justMessage(r),i=mr(n+`
688
684
  gpgsig`+ks(s)+`
689
- `+o);return new qe(i)}static from(r){return new qe(r)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return qe.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(r){return mr(r.slice(r.indexOf(`
685
+ `+o);return new Ne(i)}static from(r){return new Ne(r)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return Ne.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(r){return mr(r.slice(r.indexOf(`
690
686
 
691
687
  `)+2))}static justHeaders(r){return r.slice(0,r.indexOf(`
692
688
 
693
- `))}parseHeaders(){const r=qe.justHeaders(this._commit).split(`
689
+ `))}parseHeaders(){const r=Ne.justHeaders(this._commit).split(`
694
690
  `),s=[];for(const o of r)o[0]===" "?s[s.length-1]+=`
695
- `+o.slice(1):s.push(o);const n={parent:[]};for(const o of s){const i=o.slice(0,o.indexOf(" ")),t=o.slice(o.indexOf(" ")+1);Array.isArray(n[i])?n[i].push(t):n[i]=t}return n.author&&(n.author=Jt(n.author)),n.committer&&(n.committer=Jt(n.committer)),n}static renderHeaders(r){let s="";if(r.tree?s+=`tree ${r.tree}
691
+ `+o.slice(1):s.push(o);const n={parent:[]};for(const o of s){const i=o.slice(0,o.indexOf(" ")),t=o.slice(o.indexOf(" ")+1);Array.isArray(n[i])?n[i].push(t):n[i]=t}return n.author&&(n.author=es(n.author)),n.committer&&(n.committer=es(n.committer)),n}static renderHeaders(r){let s="";if(r.tree?s+=`tree ${r.tree}
696
692
  `:s+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
697
- `,r.parent){if(r.parent.length===void 0)throw new _e("commit 'parent' property should be an array");for(const i of r.parent)s+=`parent ${i}
698
- `}const n=r.author;s+=`author ${Zs(n)}
699
- `;const o=r.committer||r.author;return s+=`committer ${Zs(o)}
700
- `,r.gpgsig&&(s+="gpgsig"+ks(r.gpgsig)),s}static render(r){return qe.renderHeaders(r)+`
693
+ `,r.parent){if(r.parent.length===void 0)throw new be("commit 'parent' property should be an array");for(const i of r.parent)s+=`parent ${i}
694
+ `}const n=r.author;s+=`author ${Gs(n)}
695
+ `;const o=r.committer||r.author;return s+=`committer ${Gs(o)}
696
+ `,r.gpgsig&&(s+="gpgsig"+ks(r.gpgsig)),s}static render(r){return Ne.renderHeaders(r)+`
701
697
  `+mr(r.message)}render(){return this._commit}withoutSignature(){const r=mr(this._commit);if(r.indexOf(`
702
698
  gpgsig`)===-1)return r;const s=r.slice(0,r.indexOf(`
703
699
  gpgsig`)),n=r.slice(r.indexOf(`-----END PGP SIGNATURE-----
704
700
  `)+28);return mr(s+`
705
- `+n)}isolateSignature(){const r=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return bp(r)}static async sign(r,s,n){const o=r.withoutSignature(),i=qe.justMessage(r._commit);let{signature:t}=await s({payload:o,secretKey:n});t=mr(t);const y=qe.justHeaders(r._commit)+`
701
+ `+n)}isolateSignature(){const r=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return bp(r)}static async sign(r,s,n){const o=r.withoutSignature(),i=Ne.justMessage(r._commit);let{signature:t}=await s({payload:o,secretKey:n});t=mr(t);const y=Ne.justHeaders(r._commit)+`
706
702
  gpgsig`+ks(t)+`
707
- `+i;return qe.from(y)}}var ha={};/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */(function(e){(function(r){r(typeof DO_NOT_EXPORT_CRC>"u"?e:{})})(function(r){r.version="1.2.2";function s(){for(var S=0,T=new Array(256),E=0;E!=256;++E)S=E,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,S=S&1?-306674912^S>>>1:S>>>1,T[E]=S;return typeof Int32Array<"u"?new Int32Array(T):T}var n=s();function o(S){var T=0,E=0,O=0,C=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(O=0;O!=256;++O)C[O]=S[O];for(O=0;O!=256;++O)for(E=S[O],T=256+O;T<4096;T+=256)E=C[T]=E>>>8^S[E&255];var L=[];for(O=1;O!=16;++O)L[O-1]=typeof Int32Array<"u"?C.subarray(O*256,O*256+256):C.slice(O*256,O*256+256);return L}var i=o(n),t=i[0],p=i[1],y=i[2],u=i[3],d=i[4],w=i[5],_=i[6],b=i[7],B=i[8],P=i[9],q=i[10],D=i[11],M=i[12],I=i[13],U=i[14];function A(S,T){for(var E=T^-1,O=0,C=S.length;O<C;)E=E>>>8^n[(E^S.charCodeAt(O++))&255];return~E}function x(S,T){for(var E=T^-1,O=S.length-15,C=0;C<O;)E=U[S[C++]^E&255]^I[S[C++]^E>>8&255]^M[S[C++]^E>>16&255]^D[S[C++]^E>>>24]^q[S[C++]]^P[S[C++]]^B[S[C++]]^b[S[C++]]^_[S[C++]]^w[S[C++]]^d[S[C++]]^u[S[C++]]^y[S[C++]]^p[S[C++]]^t[S[C++]]^n[S[C++]];for(O+=15;C<O;)E=E>>>8^n[(E^S[C++])&255];return~E}function N(S,T){for(var E=T^-1,O=0,C=S.length,L=0,F=0;O<C;)L=S.charCodeAt(O++),L<128?E=E>>>8^n[(E^L)&255]:L<2048?(E=E>>>8^n[(E^(192|L>>6&31))&255],E=E>>>8^n[(E^(128|L&63))&255]):L>=55296&&L<57344?(L=(L&1023)+64,F=S.charCodeAt(O++)&1023,E=E>>>8^n[(E^(240|L>>8&7))&255],E=E>>>8^n[(E^(128|L>>2&63))&255],E=E>>>8^n[(E^(128|F>>6&15|(L&3)<<4))&255],E=E>>>8^n[(E^(128|F&63))&255]):(E=E>>>8^n[(E^(224|L>>12&15))&255],E=E>>>8^n[(E^(128|L>>6&63))&255],E=E>>>8^n[(E^(128|L&63))&255]);return~E}r.table=n,r.bstr=A,r.buf=x,r.str=N})})(ha);const _p=di(ha);class vp{static wrap({type:r,object:s}){return Buffer.concat([Buffer.from(`${r} ${s.byteLength.toString()}\0`),Buffer.from(s)])}static unwrap(r){const s=r.indexOf(32),n=r.indexOf(0),o=r.slice(0,s).toString("utf8"),i=r.slice(s+1,n).toString("utf8"),t=r.length-(n+1);if(parseInt(i)!==t)throw new _e(`Length mismatch: expected ${i} bytes but got ${t} instead.`);return{type:o,object:Buffer.from(r.slice(n+1))}}}class Sr{constructor(r){this.buffer=r,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(r){this._start=r}slice(r){const s=this.buffer.slice(this._start,this._start+r);return this._start+=r,s}toString(r,s){const n=this.buffer.toString(r,this._start,this._start+s);return this._start+=s,n}write(r,s,n){const o=this.buffer.write(r,this._start,s,n);return this._start+=s,o}copy(r,s,n){const o=r.copy(this.buffer,this._start,s,n);return this._start+=o,o}readUInt8(){const r=this.buffer.readUInt8(this._start);return this._start+=1,r}writeUInt8(r){const s=this.buffer.writeUInt8(r,this._start);return this._start+=1,s}readUInt16BE(){const r=this.buffer.readUInt16BE(this._start);return this._start+=2,r}writeUInt16BE(r){const s=this.buffer.writeUInt16BE(r,this._start);return this._start+=2,s}readUInt32BE(){const r=this.buffer.readUInt32BE(this._start);return this._start+=4,r}writeUInt32BE(r){const s=this.buffer.writeUInt32BE(r,this._start);return this._start+=4,s}}function Pp(e,r){const s=new Sr(e),n=Li(s);if(n!==r.byteLength)throw new _e(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${r.length} bytes`);const o=Li(s);let i;const t=Ci(s,r);if(t.byteLength===o)i=t;else{i=Buffer.alloc(o);const p=new Sr(i);for(p.copy(t);!s.eof();)p.copy(Ci(s,r));const y=p.tell();if(o!==y)throw new _e(`applyDelta expected target buffer to be ${o} bytes but the resulting buffer was ${y} bytes`)}return i}function Li(e){let r=0,s=0,n=null;do n=e.readUInt8(),r|=(n&127)<<s,s+=7;while(n&128);return r}function Ni(e,r,s){let n=0,o=0;for(;s--;)r&1&&(n|=e.readUInt8()<<o),r>>=1,o+=8;return n}function Ci(e,r){const s=e.readUInt8(),n=128,o=15,i=112;if(s&n){const t=Ni(e,s&o,4);let p=Ni(e,(s&i)>>4,3);return p===0&&(p=65536),r.slice(t,t+p)}else return e.slice(s)}var br={};(function(e){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function s(i,t){return Object.prototype.hasOwnProperty.call(i,t)}e.assign=function(i){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var p=t.shift();if(p){if(typeof p!="object")throw new TypeError(p+"must be non-object");for(var y in p)s(p,y)&&(i[y]=p[y])}}return i},e.shrinkBuf=function(i,t){return i.length===t?i:i.subarray?i.subarray(0,t):(i.length=t,i)};var n={arraySet:function(i,t,p,y,u){if(t.subarray&&i.subarray){i.set(t.subarray(p,p+y),u);return}for(var d=0;d<y;d++)i[u+d]=t[p+d]},flattenChunks:function(i){var t,p,y,u,d,w;for(y=0,t=0,p=i.length;t<p;t++)y+=i[t].length;for(w=new Uint8Array(y),u=0,t=0,p=i.length;t<p;t++)d=i[t],w.set(d,u),u+=d.length;return w}},o={arraySet:function(i,t,p,y,u){for(var d=0;d<y;d++)i[u+d]=t[p+d]},flattenChunks:function(i){return[].concat.apply([],i)}};e.setTyped=function(i){i?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(r)})(br);var Tt={},ur={},it={},kp=br,Ep=4,Di=0,qi=1,Op=2;function nt(e){for(var r=e.length;--r>=0;)e[r]=0}var xp=0,ya=1,Tp=2,$p=3,Ap=258,gi=29,$t=256,wt=$t+1+gi,et=30,wi=19,ma=2*wt+1,Fr=15,Es=16,Sp=7,bi=256,ga=16,wa=17,ba=18,Vs=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Mt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Rp=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_a=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Fp=512,gr=new Array((wt+2)*2);nt(gr);var ct=new Array(et*2);nt(ct);var bt=new Array(Fp);nt(bt);var _t=new Array(Ap-$p+1);nt(_t);var _i=new Array(gi);nt(_i);var es=new Array(et);nt(es);function Os(e,r,s,n,o){this.static_tree=e,this.extra_bits=r,this.extra_base=s,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}var va,Pa,ka;function xs(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function Ea(e){return e<256?bt[e]:bt[256+(e>>>7)]}function vt(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Ne(e,r,s){e.bi_valid>Es-s?(e.bi_buf|=r<<e.bi_valid&65535,vt(e,e.bi_buf),e.bi_buf=r>>Es-e.bi_valid,e.bi_valid+=s-Es):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=s)}function pr(e,r,s){Ne(e,s[r*2],s[r*2+1])}function Oa(e,r){var s=0;do s|=e&1,e>>>=1,s<<=1;while(--r>0);return s>>>1}function Bp(e){e.bi_valid===16?(vt(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function Ip(e,r){var s=r.dyn_tree,n=r.max_code,o=r.stat_desc.static_tree,i=r.stat_desc.has_stree,t=r.stat_desc.extra_bits,p=r.stat_desc.extra_base,y=r.stat_desc.max_length,u,d,w,_,b,B,P=0;for(_=0;_<=Fr;_++)e.bl_count[_]=0;for(s[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<ma;u++)d=e.heap[u],_=s[s[d*2+1]*2+1]+1,_>y&&(_=y,P++),s[d*2+1]=_,!(d>n)&&(e.bl_count[_]++,b=0,d>=p&&(b=t[d-p]),B=s[d*2],e.opt_len+=B*(_+b),i&&(e.static_len+=B*(o[d*2+1]+b)));if(P!==0){do{for(_=y-1;e.bl_count[_]===0;)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[y]--,P-=2}while(P>0);for(_=y;_!==0;_--)for(d=e.bl_count[_];d!==0;)w=e.heap[--u],!(w>n)&&(s[w*2+1]!==_&&(e.opt_len+=(_-s[w*2+1])*s[w*2],s[w*2+1]=_),d--)}}function xa(e,r,s){var n=new Array(Fr+1),o=0,i,t;for(i=1;i<=Fr;i++)n[i]=o=o+s[i-1]<<1;for(t=0;t<=r;t++){var p=e[t*2+1];p!==0&&(e[t*2]=Oa(n[p]++,p))}}function jp(){var e,r,s,n,o,i=new Array(Fr+1);for(s=0,n=0;n<gi-1;n++)for(_i[n]=s,e=0;e<1<<Vs[n];e++)_t[s++]=n;for(_t[s-1]=n,o=0,n=0;n<16;n++)for(es[n]=o,e=0;e<1<<Mt[n];e++)bt[o++]=n;for(o>>=7;n<et;n++)for(es[n]=o<<7,e=0;e<1<<Mt[n]-7;e++)bt[256+o++]=n;for(r=0;r<=Fr;r++)i[r]=0;for(e=0;e<=143;)gr[e*2+1]=8,e++,i[8]++;for(;e<=255;)gr[e*2+1]=9,e++,i[9]++;for(;e<=279;)gr[e*2+1]=7,e++,i[7]++;for(;e<=287;)gr[e*2+1]=8,e++,i[8]++;for(xa(gr,wt+1,i),e=0;e<et;e++)ct[e*2+1]=5,ct[e*2]=Oa(e,5);va=new Os(gr,Vs,$t+1,wt,Fr),Pa=new Os(ct,Mt,0,et,Fr),ka=new Os(new Array(0),Rp,0,wi,Sp)}function Ta(e){var r;for(r=0;r<wt;r++)e.dyn_ltree[r*2]=0;for(r=0;r<et;r++)e.dyn_dtree[r*2]=0;for(r=0;r<wi;r++)e.bl_tree[r*2]=0;e.dyn_ltree[bi*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function $a(e){e.bi_valid>8?vt(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Lp(e,r,s,n){$a(e),n&&(vt(e,s),vt(e,~s)),kp.arraySet(e.pending_buf,e.window,r,s,e.pending),e.pending+=s}function Ui(e,r,s,n){var o=r*2,i=s*2;return e[o]<e[i]||e[o]===e[i]&&n[r]<=n[s]}function Ts(e,r,s){for(var n=e.heap[s],o=s<<1;o<=e.heap_len&&(o<e.heap_len&&Ui(r,e.heap[o+1],e.heap[o],e.depth)&&o++,!Ui(r,n,e.heap[o],e.depth));)e.heap[s]=e.heap[o],s=o,o<<=1;e.heap[s]=n}function zi(e,r,s){var n,o,i=0,t,p;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+i*2]<<8|e.pending_buf[e.d_buf+i*2+1],o=e.pending_buf[e.l_buf+i],i++,n===0?pr(e,o,r):(t=_t[o],pr(e,t+$t+1,r),p=Vs[t],p!==0&&(o-=_i[t],Ne(e,o,p)),n--,t=Ea(n),pr(e,t,s),p=Mt[t],p!==0&&(n-=es[t],Ne(e,n,p)));while(i<e.last_lit);pr(e,bi,r)}function Gs(e,r){var s=r.dyn_tree,n=r.stat_desc.static_tree,o=r.stat_desc.has_stree,i=r.stat_desc.elems,t,p,y=-1,u;for(e.heap_len=0,e.heap_max=ma,t=0;t<i;t++)s[t*2]!==0?(e.heap[++e.heap_len]=y=t,e.depth[t]=0):s[t*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=y<2?++y:0,s[u*2]=1,e.depth[u]=0,e.opt_len--,o&&(e.static_len-=n[u*2+1]);for(r.max_code=y,t=e.heap_len>>1;t>=1;t--)Ts(e,s,t);u=i;do t=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ts(e,s,1),p=e.heap[1],e.heap[--e.heap_max]=t,e.heap[--e.heap_max]=p,s[u*2]=s[t*2]+s[p*2],e.depth[u]=(e.depth[t]>=e.depth[p]?e.depth[t]:e.depth[p])+1,s[t*2+1]=s[p*2+1]=u,e.heap[1]=u++,Ts(e,s,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Ip(e,r),xa(s,y,e.bl_count)}function Mi(e,r,s){var n,o=-1,i,t=r[0*2+1],p=0,y=7,u=4;for(t===0&&(y=138,u=3),r[(s+1)*2+1]=65535,n=0;n<=s;n++)i=t,t=r[(n+1)*2+1],!(++p<y&&i===t)&&(p<u?e.bl_tree[i*2]+=p:i!==0?(i!==o&&e.bl_tree[i*2]++,e.bl_tree[ga*2]++):p<=10?e.bl_tree[wa*2]++:e.bl_tree[ba*2]++,p=0,o=i,t===0?(y=138,u=3):i===t?(y=6,u=3):(y=7,u=4))}function Wi(e,r,s){var n,o=-1,i,t=r[0*2+1],p=0,y=7,u=4;for(t===0&&(y=138,u=3),n=0;n<=s;n++)if(i=t,t=r[(n+1)*2+1],!(++p<y&&i===t)){if(p<u)do pr(e,i,e.bl_tree);while(--p!==0);else i!==0?(i!==o&&(pr(e,i,e.bl_tree),p--),pr(e,ga,e.bl_tree),Ne(e,p-3,2)):p<=10?(pr(e,wa,e.bl_tree),Ne(e,p-3,3)):(pr(e,ba,e.bl_tree),Ne(e,p-11,7));p=0,o=i,t===0?(y=138,u=3):i===t?(y=6,u=3):(y=7,u=4)}}function Np(e){var r;for(Mi(e,e.dyn_ltree,e.l_desc.max_code),Mi(e,e.dyn_dtree,e.d_desc.max_code),Gs(e,e.bl_desc),r=wi-1;r>=3&&e.bl_tree[_a[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function Cp(e,r,s,n){var o;for(Ne(e,r-257,5),Ne(e,s-1,5),Ne(e,n-4,4),o=0;o<n;o++)Ne(e,e.bl_tree[_a[o]*2+1],3);Wi(e,e.dyn_ltree,r-1),Wi(e,e.dyn_dtree,s-1)}function Dp(e){var r=4093624447,s;for(s=0;s<=31;s++,r>>>=1)if(r&1&&e.dyn_ltree[s*2]!==0)return Di;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return qi;for(s=32;s<$t;s++)if(e.dyn_ltree[s*2]!==0)return qi;return Di}var Hi=!1;function qp(e){Hi||(jp(),Hi=!0),e.l_desc=new xs(e.dyn_ltree,va),e.d_desc=new xs(e.dyn_dtree,Pa),e.bl_desc=new xs(e.bl_tree,ka),e.bi_buf=0,e.bi_valid=0,Ta(e)}function Aa(e,r,s,n){Ne(e,(xp<<1)+(n?1:0),3),Lp(e,r,s,!0)}function Up(e){Ne(e,ya<<1,3),pr(e,bi,gr),Bp(e)}function zp(e,r,s,n){var o,i,t=0;e.level>0?(e.strm.data_type===Op&&(e.strm.data_type=Dp(e)),Gs(e,e.l_desc),Gs(e,e.d_desc),t=Np(e),o=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=o&&(o=i)):o=i=s+5,s+4<=o&&r!==-1?Aa(e,r,s,n):e.strategy===Ep||i===o?(Ne(e,(ya<<1)+(n?1:0),3),zi(e,gr,ct)):(Ne(e,(Tp<<1)+(n?1:0),3),Cp(e,e.l_desc.max_code+1,e.d_desc.max_code+1,t+1),zi(e,e.dyn_ltree,e.dyn_dtree)),Ta(e),n&&$a(e)}function Mp(e,r,s){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=s&255,e.last_lit++,r===0?e.dyn_ltree[s*2]++:(e.matches++,r--,e.dyn_ltree[(_t[s]+$t+1)*2]++,e.dyn_dtree[Ea(r)*2]++),e.last_lit===e.lit_bufsize-1}it._tr_init=qp;it._tr_stored_block=Aa;it._tr_flush_block=zp;it._tr_tally=Mp;it._tr_align=Up;function Wp(e,r,s,n){for(var o=e&65535|0,i=e>>>16&65535|0,t=0;s!==0;){t=s>2e3?2e3:s,s-=t;do o=o+r[n++]|0,i=i+o|0;while(--t);o%=65521,i%=65521}return o|i<<16|0}var Sa=Wp;function Hp(){for(var e,r=[],s=0;s<256;s++){e=s;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;r[s]=e}return r}var Zp=Hp();function Vp(e,r,s,n){var o=Zp,i=n+s;e^=-1;for(var t=n;t<i;t++)e=e>>>8^o[(e^r[t])&255];return e^-1}var Ra=Vp,vi={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},je=br,Ze=it,Fa=Sa,kr=Ra,Gp=vi,Ur=0,Yp=1,Kp=3,$r=4,Zi=5,fr=0,Vi=1,Ve=-2,Xp=-3,$s=-5,Qp=-1,Jp=1,Lt=2,ef=3,rf=4,tf=0,sf=2,cs=8,nf=9,af=15,of=8,pf=29,ff=256,Ys=ff+1+pf,lf=30,uf=19,cf=2*Ys+1,df=15,oe=3,xr=258,er=xr+oe+1,hf=32,ds=42,Ks=69,Wt=73,Ht=91,Zt=103,Br=113,lt=666,xe=1,At=2,Lr=3,at=4,yf=3;function Tr(e,r){return e.msg=Gp[r],r}function Gi(e){return(e<<1)-(e>4?9:0)}function Or(e){for(var r=e.length;--r>=0;)e[r]=0}function Er(e){var r=e.state,s=r.pending;s>e.avail_out&&(s=e.avail_out),s!==0&&(je.arraySet(e.output,r.pending_buf,r.pending_out,s,e.next_out),e.next_out+=s,r.pending_out+=s,e.total_out+=s,e.avail_out-=s,r.pending-=s,r.pending===0&&(r.pending_out=0))}function Re(e,r){Ze._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Er(e.strm)}function fe(e,r){e.pending_buf[e.pending++]=r}function ft(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function mf(e,r,s,n){var o=e.avail_in;return o>n&&(o=n),o===0?0:(e.avail_in-=o,je.arraySet(r,e.input,e.next_in,o,s),e.state.wrap===1?e.adler=Fa(e.adler,r,o,s):e.state.wrap===2&&(e.adler=kr(e.adler,r,o,s)),e.next_in+=o,e.total_in+=o,o)}function Ba(e,r){var s=e.max_chain_length,n=e.strstart,o,i,t=e.prev_length,p=e.nice_match,y=e.strstart>e.w_size-er?e.strstart-(e.w_size-er):0,u=e.window,d=e.w_mask,w=e.prev,_=e.strstart+xr,b=u[n+t-1],B=u[n+t];e.prev_length>=e.good_match&&(s>>=2),p>e.lookahead&&(p=e.lookahead);do if(o=r,!(u[o+t]!==B||u[o+t-1]!==b||u[o]!==u[n]||u[++o]!==u[n+1])){n+=2,o++;do;while(u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&n<_);if(i=xr-(_-n),n=_-xr,i>t){if(e.match_start=r,t=i,i>=p)break;b=u[n+t-1],B=u[n+t]}}while((r=w[r&d])>y&&--s!==0);return t<=e.lookahead?t:e.lookahead}function Nr(e){var r=e.w_size,s,n,o,i,t;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-er)){je.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,n=e.hash_size,s=n;do o=e.head[--s],e.head[s]=o>=r?o-r:0;while(--n);n=r,s=n;do o=e.prev[--s],e.prev[s]=o>=r?o-r:0;while(--n);i+=r}if(e.strm.avail_in===0)break;if(n=mf(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=oe)for(t=e.strstart-e.insert,e.ins_h=e.window[t],e.ins_h=(e.ins_h<<e.hash_shift^e.window[t+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[t+oe-1])&e.hash_mask,e.prev[t&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=t,t++,e.insert--,!(e.lookahead+e.insert<oe)););}while(e.lookahead<er&&e.strm.avail_in!==0)}function gf(e,r){var s=65535;for(s>e.pending_buf_size-5&&(s=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Nr(e),e.lookahead===0&&r===Ur)return xe;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+s;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Re(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-er&&(Re(e,!1),e.strm.avail_out===0))return xe}return e.insert=0,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):(e.strstart>e.block_start&&(Re(e,!1),e.strm.avail_out===0),xe)}function As(e,r){for(var s,n;;){if(e.lookahead<er){if(Nr(e),e.lookahead<er&&r===Ur)return xe;if(e.lookahead===0)break}if(s=0,e.lookahead>=oe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),s!==0&&e.strstart-s<=e.w_size-er&&(e.match_length=Ba(e,s)),e.match_length>=oe)if(n=Ze._tr_tally(e,e.strstart-e.match_start,e.match_length-oe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=oe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Ze._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Re(e,!1),e.strm.avail_out===0))return xe}return e.insert=e.strstart<oe-1?e.strstart:oe-1,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):e.last_lit&&(Re(e,!1),e.strm.avail_out===0)?xe:At}function Gr(e,r){for(var s,n,o;;){if(e.lookahead<er){if(Nr(e),e.lookahead<er&&r===Ur)return xe;if(e.lookahead===0)break}if(s=0,e.lookahead>=oe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=oe-1,s!==0&&e.prev_length<e.max_lazy_match&&e.strstart-s<=e.w_size-er&&(e.match_length=Ba(e,s),e.match_length<=5&&(e.strategy===Jp||e.match_length===oe&&e.strstart-e.match_start>4096)&&(e.match_length=oe-1)),e.prev_length>=oe&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-oe,n=Ze._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-oe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=oe-1,e.strstart++,n&&(Re(e,!1),e.strm.avail_out===0))return xe}else if(e.match_available){if(n=Ze._tr_tally(e,0,e.window[e.strstart-1]),n&&Re(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return xe}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Ze._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<oe-1?e.strstart:oe-1,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):e.last_lit&&(Re(e,!1),e.strm.avail_out===0)?xe:At}function wf(e,r){for(var s,n,o,i,t=e.window;;){if(e.lookahead<=xr){if(Nr(e),e.lookahead<=xr&&r===Ur)return xe;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=oe&&e.strstart>0&&(o=e.strstart-1,n=t[o],n===t[++o]&&n===t[++o]&&n===t[++o])){i=e.strstart+xr;do;while(n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&o<i);e.match_length=xr-(i-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=oe?(s=Ze._tr_tally(e,1,e.match_length-oe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(s=Ze._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),s&&(Re(e,!1),e.strm.avail_out===0))return xe}return e.insert=0,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):e.last_lit&&(Re(e,!1),e.strm.avail_out===0)?xe:At}function bf(e,r){for(var s;;){if(e.lookahead===0&&(Nr(e),e.lookahead===0)){if(r===Ur)return xe;break}if(e.match_length=0,s=Ze._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,s&&(Re(e,!1),e.strm.avail_out===0))return xe}return e.insert=0,r===$r?(Re(e,!0),e.strm.avail_out===0?Lr:at):e.last_lit&&(Re(e,!1),e.strm.avail_out===0)?xe:At}function nr(e,r,s,n,o){this.good_length=e,this.max_lazy=r,this.nice_length=s,this.max_chain=n,this.func=o}var Qr;Qr=[new nr(0,0,0,0,gf),new nr(4,4,8,4,As),new nr(4,5,16,8,As),new nr(4,6,32,32,As),new nr(4,4,16,16,Gr),new nr(8,16,32,32,Gr),new nr(8,16,128,128,Gr),new nr(8,32,128,256,Gr),new nr(32,128,258,1024,Gr),new nr(32,258,258,4096,Gr)];function _f(e){e.window_size=2*e.w_size,Or(e.head),e.max_lazy_match=Qr[e.level].max_lazy,e.good_match=Qr[e.level].good_length,e.nice_match=Qr[e.level].nice_length,e.max_chain_length=Qr[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=oe-1,e.match_available=0,e.ins_h=0}function vf(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=cs,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new je.Buf16(cf*2),this.dyn_dtree=new je.Buf16((2*lf+1)*2),this.bl_tree=new je.Buf16((2*uf+1)*2),Or(this.dyn_ltree),Or(this.dyn_dtree),Or(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new je.Buf16(df+1),this.heap=new je.Buf16(2*Ys+1),Or(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new je.Buf16(2*Ys+1),Or(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ia(e){var r;return!e||!e.state?Tr(e,Ve):(e.total_in=e.total_out=0,e.data_type=sf,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?ds:Br,e.adler=r.wrap===2?0:1,r.last_flush=Ur,Ze._tr_init(r),fr)}function ja(e){var r=Ia(e);return r===fr&&_f(e.state),r}function Pf(e,r){return!e||!e.state||e.state.wrap!==2?Ve:(e.state.gzhead=r,fr)}function La(e,r,s,n,o,i){if(!e)return Ve;var t=1;if(r===Qp&&(r=6),n<0?(t=0,n=-n):n>15&&(t=2,n-=16),o<1||o>nf||s!==cs||n<8||n>15||r<0||r>9||i<0||i>rf)return Tr(e,Ve);n===8&&(n=9);var p=new vf;return e.state=p,p.strm=e,p.wrap=t,p.gzhead=null,p.w_bits=n,p.w_size=1<<p.w_bits,p.w_mask=p.w_size-1,p.hash_bits=o+7,p.hash_size=1<<p.hash_bits,p.hash_mask=p.hash_size-1,p.hash_shift=~~((p.hash_bits+oe-1)/oe),p.window=new je.Buf8(p.w_size*2),p.head=new je.Buf16(p.hash_size),p.prev=new je.Buf16(p.w_size),p.lit_bufsize=1<<o+6,p.pending_buf_size=p.lit_bufsize*4,p.pending_buf=new je.Buf8(p.pending_buf_size),p.d_buf=1*p.lit_bufsize,p.l_buf=(1+2)*p.lit_bufsize,p.level=r,p.strategy=i,p.method=s,ja(e)}function kf(e,r){return La(e,r,cs,af,of,tf)}function Ef(e,r){var s,n,o,i;if(!e||!e.state||r>Zi||r<0)return e?Tr(e,Ve):Ve;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===lt&&r!==$r)return Tr(e,e.avail_out===0?$s:Ve);if(n.strm=e,s=n.last_flush,n.last_flush=r,n.status===ds)if(n.wrap===2)e.adler=0,fe(n,31),fe(n,139),fe(n,8),n.gzhead?(fe(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),fe(n,n.gzhead.time&255),fe(n,n.gzhead.time>>8&255),fe(n,n.gzhead.time>>16&255),fe(n,n.gzhead.time>>24&255),fe(n,n.level===9?2:n.strategy>=Lt||n.level<2?4:0),fe(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(fe(n,n.gzhead.extra.length&255),fe(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=kr(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Ks):(fe(n,0),fe(n,0),fe(n,0),fe(n,0),fe(n,0),fe(n,n.level===9?2:n.strategy>=Lt||n.level<2?4:0),fe(n,yf),n.status=Br);else{var t=cs+(n.w_bits-8<<4)<<8,p=-1;n.strategy>=Lt||n.level<2?p=0:n.level<6?p=1:n.level===6?p=2:p=3,t|=p<<6,n.strstart!==0&&(t|=hf),t+=31-t%31,n.status=Br,ft(n,t),n.strstart!==0&&(ft(n,e.adler>>>16),ft(n,e.adler&65535)),e.adler=1}if(n.status===Ks)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),Er(e),o=n.pending,n.pending===n.pending_buf_size));)fe(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Wt)}else n.status=Wt;if(n.status===Wt)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),Er(e),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}n.gzindex<n.gzhead.name.length?i=n.gzhead.name.charCodeAt(n.gzindex++)&255:i=0,fe(n,i)}while(i!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),i===0&&(n.gzindex=0,n.status=Ht)}else n.status=Ht;if(n.status===Ht)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),Er(e),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}n.gzindex<n.gzhead.comment.length?i=n.gzhead.comment.charCodeAt(n.gzindex++)&255:i=0,fe(n,i)}while(i!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),i===0&&(n.status=Zt)}else n.status=Zt;if(n.status===Zt&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Er(e),n.pending+2<=n.pending_buf_size&&(fe(n,e.adler&255),fe(n,e.adler>>8&255),e.adler=0,n.status=Br)):n.status=Br),n.pending!==0){if(Er(e),e.avail_out===0)return n.last_flush=-1,fr}else if(e.avail_in===0&&Gi(r)<=Gi(s)&&r!==$r)return Tr(e,$s);if(n.status===lt&&e.avail_in!==0)return Tr(e,$s);if(e.avail_in!==0||n.lookahead!==0||r!==Ur&&n.status!==lt){var y=n.strategy===Lt?bf(n,r):n.strategy===ef?wf(n,r):Qr[n.level].func(n,r);if((y===Lr||y===at)&&(n.status=lt),y===xe||y===Lr)return e.avail_out===0&&(n.last_flush=-1),fr;if(y===At&&(r===Yp?Ze._tr_align(n):r!==Zi&&(Ze._tr_stored_block(n,0,0,!1),r===Kp&&(Or(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Er(e),e.avail_out===0))return n.last_flush=-1,fr}return r!==$r?fr:n.wrap<=0?Vi:(n.wrap===2?(fe(n,e.adler&255),fe(n,e.adler>>8&255),fe(n,e.adler>>16&255),fe(n,e.adler>>24&255),fe(n,e.total_in&255),fe(n,e.total_in>>8&255),fe(n,e.total_in>>16&255),fe(n,e.total_in>>24&255)):(ft(n,e.adler>>>16),ft(n,e.adler&65535)),Er(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?fr:Vi)}function Of(e){var r;return!e||!e.state?Ve:(r=e.state.status,r!==ds&&r!==Ks&&r!==Wt&&r!==Ht&&r!==Zt&&r!==Br&&r!==lt?Tr(e,Ve):(e.state=null,r===Br?Tr(e,Xp):fr))}function xf(e,r){var s=r.length,n,o,i,t,p,y,u,d;if(!e||!e.state||(n=e.state,t=n.wrap,t===2||t===1&&n.status!==ds||n.lookahead))return Ve;for(t===1&&(e.adler=Fa(e.adler,r,s,0)),n.wrap=0,s>=n.w_size&&(t===0&&(Or(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new je.Buf8(n.w_size),je.arraySet(d,r,s-n.w_size,n.w_size,0),r=d,s=n.w_size),p=e.avail_in,y=e.next_in,u=e.input,e.avail_in=s,e.next_in=0,e.input=r,Nr(n);n.lookahead>=oe;){o=n.strstart,i=n.lookahead-(oe-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[o+oe-1])&n.hash_mask,n.prev[o&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=o,o++;while(--i);n.strstart=o,n.lookahead=oe-1,Nr(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=oe-1,n.match_available=0,e.next_in=y,e.input=u,e.avail_in=p,n.wrap=t,fr}ur.deflateInit=kf;ur.deflateInit2=La;ur.deflateReset=ja;ur.deflateResetKeep=Ia;ur.deflateSetHeader=Pf;ur.deflate=Ef;ur.deflateEnd=Of;ur.deflateSetDictionary=xf;ur.deflateInfo="pako deflate (from Nodeca project)";var zr={},hs=br,Na=!0,Ca=!0;try{String.fromCharCode.apply(null,[0])}catch{Na=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ca=!1}var Pt=new hs.Buf8(256);for(var Pr=0;Pr<256;Pr++)Pt[Pr]=Pr>=252?6:Pr>=248?5:Pr>=240?4:Pr>=224?3:Pr>=192?2:1;Pt[254]=Pt[254]=1;zr.string2buf=function(e){var r,s,n,o,i,t=e.length,p=0;for(o=0;o<t;o++)s=e.charCodeAt(o),(s&64512)===55296&&o+1<t&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(s=65536+(s-55296<<10)+(n-56320),o++)),p+=s<128?1:s<2048?2:s<65536?3:4;for(r=new hs.Buf8(p),i=0,o=0;i<p;o++)s=e.charCodeAt(o),(s&64512)===55296&&o+1<t&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(s=65536+(s-55296<<10)+(n-56320),o++)),s<128?r[i++]=s:s<2048?(r[i++]=192|s>>>6,r[i++]=128|s&63):s<65536?(r[i++]=224|s>>>12,r[i++]=128|s>>>6&63,r[i++]=128|s&63):(r[i++]=240|s>>>18,r[i++]=128|s>>>12&63,r[i++]=128|s>>>6&63,r[i++]=128|s&63);return r};function Da(e,r){if(r<65534&&(e.subarray&&Ca||!e.subarray&&Na))return String.fromCharCode.apply(null,hs.shrinkBuf(e,r));for(var s="",n=0;n<r;n++)s+=String.fromCharCode(e[n]);return s}zr.buf2binstring=function(e){return Da(e,e.length)};zr.binstring2buf=function(e){for(var r=new hs.Buf8(e.length),s=0,n=r.length;s<n;s++)r[s]=e.charCodeAt(s);return r};zr.buf2string=function(e,r){var s,n,o,i,t=r||e.length,p=new Array(t*2);for(n=0,s=0;s<t;){if(o=e[s++],o<128){p[n++]=o;continue}if(i=Pt[o],i>4){p[n++]=65533,s+=i-1;continue}for(o&=i===2?31:i===3?15:7;i>1&&s<t;)o=o<<6|e[s++]&63,i--;if(i>1){p[n++]=65533;continue}o<65536?p[n++]=o:(o-=65536,p[n++]=55296|o>>10&1023,p[n++]=56320|o&1023)}return Da(p,n)};zr.utf8border=function(e,r){var s;for(r=r||e.length,r>e.length&&(r=e.length),s=r-1;s>=0&&(e[s]&192)===128;)s--;return s<0||s===0?r:s+Pt[e[s]]>r?s:r};function Tf(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var qa=Tf,dt=ur,ht=br,Xs=zr,Qs=vi,$f=qa,Ua=Object.prototype.toString,Af=0,Ss=4,rt=0,Yi=1,Ki=2,Sf=-1,Rf=0,Ff=8;function Cr(e){if(!(this instanceof Cr))return new Cr(e);this.options=ht.assign({level:Sf,method:Ff,chunkSize:16384,windowBits:15,memLevel:8,strategy:Rf,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $f,this.strm.avail_out=0;var s=dt.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(s!==rt)throw new Error(Qs[s]);if(r.header&&dt.deflateSetHeader(this.strm,r.header),r.dictionary){var n;if(typeof r.dictionary=="string"?n=Xs.string2buf(r.dictionary):Ua.call(r.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(r.dictionary):n=r.dictionary,s=dt.deflateSetDictionary(this.strm,n),s!==rt)throw new Error(Qs[s]);this._dict_set=!0}}Cr.prototype.push=function(e,r){var s=this.strm,n=this.options.chunkSize,o,i;if(this.ended)return!1;i=r===~~r?r:r===!0?Ss:Af,typeof e=="string"?s.input=Xs.string2buf(e):Ua.call(e)==="[object ArrayBuffer]"?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new ht.Buf8(n),s.next_out=0,s.avail_out=n),o=dt.deflate(s,i),o!==Yi&&o!==rt)return this.onEnd(o),this.ended=!0,!1;(s.avail_out===0||s.avail_in===0&&(i===Ss||i===Ki))&&(this.options.to==="string"?this.onData(Xs.buf2binstring(ht.shrinkBuf(s.output,s.next_out))):this.onData(ht.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||s.avail_out===0)&&o!==Yi);return i===Ss?(o=dt.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===rt):(i===Ki&&(this.onEnd(rt),s.avail_out=0),!0)};Cr.prototype.onData=function(e){this.chunks.push(e)};Cr.prototype.onEnd=function(e){e===rt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ht.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Pi(e,r){var s=new Cr(r);if(s.push(e,!0),s.err)throw s.msg||Qs[s.err];return s.result}function Bf(e,r){return r=r||{},r.raw=!0,Pi(e,r)}function If(e,r){return r=r||{},r.gzip=!0,Pi(e,r)}Tt.Deflate=Cr;Tt.deflate=Pi;Tt.deflateRaw=Bf;Tt.gzip=If;var St={},rr={},Nt=30,jf=12,Lf=function(r,s){var n,o,i,t,p,y,u,d,w,_,b,B,P,q,D,M,I,U,A,x,N,S,T,E,O;n=r.state,o=r.next_in,E=r.input,i=o+(r.avail_in-5),t=r.next_out,O=r.output,p=t-(s-r.avail_out),y=t+(r.avail_out-257),u=n.dmax,d=n.wsize,w=n.whave,_=n.wnext,b=n.window,B=n.hold,P=n.bits,q=n.lencode,D=n.distcode,M=(1<<n.lenbits)-1,I=(1<<n.distbits)-1;e:do{P<15&&(B+=E[o++]<<P,P+=8,B+=E[o++]<<P,P+=8),U=q[B&M];r:for(;;){if(A=U>>>24,B>>>=A,P-=A,A=U>>>16&255,A===0)O[t++]=U&65535;else if(A&16){x=U&65535,A&=15,A&&(P<A&&(B+=E[o++]<<P,P+=8),x+=B&(1<<A)-1,B>>>=A,P-=A),P<15&&(B+=E[o++]<<P,P+=8,B+=E[o++]<<P,P+=8),U=D[B&I];t:for(;;){if(A=U>>>24,B>>>=A,P-=A,A=U>>>16&255,A&16){if(N=U&65535,A&=15,P<A&&(B+=E[o++]<<P,P+=8,P<A&&(B+=E[o++]<<P,P+=8)),N+=B&(1<<A)-1,N>u){r.msg="invalid distance too far back",n.mode=Nt;break e}if(B>>>=A,P-=A,A=t-p,N>A){if(A=N-A,A>w&&n.sane){r.msg="invalid distance too far back",n.mode=Nt;break e}if(S=0,T=b,_===0){if(S+=d-A,A<x){x-=A;do O[t++]=b[S++];while(--A);S=t-N,T=O}}else if(_<A){if(S+=d+_-A,A-=_,A<x){x-=A;do O[t++]=b[S++];while(--A);if(S=0,_<x){A=_,x-=A;do O[t++]=b[S++];while(--A);S=t-N,T=O}}}else if(S+=_-A,A<x){x-=A;do O[t++]=b[S++];while(--A);S=t-N,T=O}for(;x>2;)O[t++]=T[S++],O[t++]=T[S++],O[t++]=T[S++],x-=3;x&&(O[t++]=T[S++],x>1&&(O[t++]=T[S++]))}else{S=t-N;do O[t++]=O[S++],O[t++]=O[S++],O[t++]=O[S++],x-=3;while(x>2);x&&(O[t++]=O[S++],x>1&&(O[t++]=O[S++]))}}else if(A&64){r.msg="invalid distance code",n.mode=Nt;break e}else{U=D[(U&65535)+(B&(1<<A)-1)];continue t}break}}else if(A&64)if(A&32){n.mode=jf;break e}else{r.msg="invalid literal/length code",n.mode=Nt;break e}else{U=q[(U&65535)+(B&(1<<A)-1)];continue r}break}}while(o<i&&t<y);x=P>>3,o-=x,P-=x<<3,B&=(1<<P)-1,r.next_in=o,r.next_out=t,r.avail_in=o<i?5+(i-o):5-(o-i),r.avail_out=t<y?257+(y-t):257-(t-y),n.hold=B,n.bits=P},Xi=br,Yr=15,Qi=852,Ji=592,en=0,Rs=1,rn=2,Nf=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Cf=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Df=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],qf=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],Uf=function(r,s,n,o,i,t,p,y){var u=y.bits,d=0,w=0,_=0,b=0,B=0,P=0,q=0,D=0,M=0,I=0,U,A,x,N,S,T=null,E=0,O,C=new Xi.Buf16(Yr+1),L=new Xi.Buf16(Yr+1),F=null,Y=0,Z,H,K;for(d=0;d<=Yr;d++)C[d]=0;for(w=0;w<o;w++)C[s[n+w]]++;for(B=u,b=Yr;b>=1&&C[b]===0;b--);if(B>b&&(B=b),b===0)return i[t++]=1<<24|64<<16|0,i[t++]=1<<24|64<<16|0,y.bits=1,0;for(_=1;_<b&&C[_]===0;_++);for(B<_&&(B=_),D=1,d=1;d<=Yr;d++)if(D<<=1,D-=C[d],D<0)return-1;if(D>0&&(r===en||b!==1))return-1;for(L[1]=0,d=1;d<Yr;d++)L[d+1]=L[d]+C[d];for(w=0;w<o;w++)s[n+w]!==0&&(p[L[s[n+w]]++]=w);if(r===en?(T=F=p,O=19):r===Rs?(T=Nf,E-=257,F=Cf,Y-=257,O=256):(T=Df,F=qf,O=-1),I=0,w=0,d=_,S=t,P=B,q=0,x=-1,M=1<<B,N=M-1,r===Rs&&M>Qi||r===rn&&M>Ji)return 1;for(;;){Z=d-q,p[w]<O?(H=0,K=p[w]):p[w]>O?(H=F[Y+p[w]],K=T[E+p[w]]):(H=32+64,K=0),U=1<<d-q,A=1<<P,_=A;do A-=U,i[S+(I>>q)+A]=Z<<24|H<<16|K|0;while(A!==0);for(U=1<<d-1;I&U;)U>>=1;if(U!==0?(I&=U-1,I+=U):I=0,w++,--C[d]===0){if(d===b)break;d=s[n+p[w]]}if(d>B&&(I&N)!==x){for(q===0&&(q=B),S+=_,P=d-q,D=1<<P;P+q<b&&(D-=C[P+q],!(D<=0));)P++,D<<=1;if(M+=1<<P,r===Rs&&M>Qi||r===rn&&M>Ji)return 1;x=I&N,i[x]=B<<24|P<<16|S-t|0}}return I!==0&&(i[S+I]=d-q<<24|64<<16|0),y.bits=B,0},ze=br,Js=Sa,ar=Ra,zf=Lf,yt=Uf,Mf=0,za=1,Ma=2,tn=4,Wf=5,Ct=6,Dr=0,Hf=1,Zf=2,Ge=-2,Wa=-3,Ha=-4,Vf=-5,sn=8,Za=1,nn=2,an=3,on=4,pn=5,fn=6,ln=7,un=8,cn=9,dn=10,rs=11,hr=12,Fs=13,hn=14,Bs=15,yn=16,mn=17,gn=18,wn=19,Dt=20,qt=21,bn=22,_n=23,vn=24,Pn=25,kn=26,Is=27,En=28,On=29,be=30,Va=31,Gf=32,Yf=852,Kf=592,Xf=15,Qf=Xf;function xn(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Jf(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new ze.Buf16(320),this.work=new ze.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ga(e){var r;return!e||!e.state?Ge:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=Za,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new ze.Buf32(Yf),r.distcode=r.distdyn=new ze.Buf32(Kf),r.sane=1,r.back=-1,Dr)}function Ya(e){var r;return!e||!e.state?Ge:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,Ga(e))}function Ka(e,r){var s,n;return!e||!e.state||(n=e.state,r<0?(s=0,r=-r):(s=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?Ge:(n.window!==null&&n.wbits!==r&&(n.window=null),n.wrap=s,n.wbits=r,Ya(e))}function Xa(e,r){var s,n;return e?(n=new Jf,e.state=n,n.window=null,s=Ka(e,r),s!==Dr&&(e.state=null),s):Ge}function el(e){return Xa(e,Qf)}var Tn=!0,js,Ls;function rl(e){if(Tn){var r;for(js=new ze.Buf32(512),Ls=new ze.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(yt(za,e.lens,0,288,js,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;yt(Ma,e.lens,0,32,Ls,0,e.work,{bits:5}),Tn=!1}e.lencode=js,e.lenbits=9,e.distcode=Ls,e.distbits=5}function Qa(e,r,s,n){var o,i=e.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new ze.Buf8(i.wsize)),n>=i.wsize?(ze.arraySet(i.window,r,s-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>n&&(o=n),ze.arraySet(i.window,r,s-n,o,i.wnext),n-=o,n?(ze.arraySet(i.window,r,s-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}function tl(e,r){var s,n,o,i,t,p,y,u,d,w,_,b,B,P,q=0,D,M,I,U,A,x,N,S,T=new ze.Buf8(4),E,O,C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ge;s=e.state,s.mode===hr&&(s.mode=Fs),t=e.next_out,o=e.output,y=e.avail_out,i=e.next_in,n=e.input,p=e.avail_in,u=s.hold,d=s.bits,w=p,_=y,S=Dr;e:for(;;)switch(s.mode){case Za:if(s.wrap===0){s.mode=Fs;break}for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(s.wrap&2&&u===35615){s.check=0,T[0]=u&255,T[1]=u>>>8&255,s.check=ar(s.check,T,2,0),u=0,d=0,s.mode=nn;break}if(s.flags=0,s.head&&(s.head.done=!1),!(s.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",s.mode=be;break}if((u&15)!==sn){e.msg="unknown compression method",s.mode=be;break}if(u>>>=4,d-=4,N=(u&15)+8,s.wbits===0)s.wbits=N;else if(N>s.wbits){e.msg="invalid window size",s.mode=be;break}s.dmax=1<<N,e.adler=s.check=1,s.mode=u&512?dn:hr,u=0,d=0;break;case nn:for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(s.flags=u,(s.flags&255)!==sn){e.msg="unknown compression method",s.mode=be;break}if(s.flags&57344){e.msg="unknown header flags set",s.mode=be;break}s.head&&(s.head.text=u>>8&1),s.flags&512&&(T[0]=u&255,T[1]=u>>>8&255,s.check=ar(s.check,T,2,0)),u=0,d=0,s.mode=an;case an:for(;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.head&&(s.head.time=u),s.flags&512&&(T[0]=u&255,T[1]=u>>>8&255,T[2]=u>>>16&255,T[3]=u>>>24&255,s.check=ar(s.check,T,4,0)),u=0,d=0,s.mode=on;case on:for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.head&&(s.head.xflags=u&255,s.head.os=u>>8),s.flags&512&&(T[0]=u&255,T[1]=u>>>8&255,s.check=ar(s.check,T,2,0)),u=0,d=0,s.mode=pn;case pn:if(s.flags&1024){for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.length=u,s.head&&(s.head.extra_len=u),s.flags&512&&(T[0]=u&255,T[1]=u>>>8&255,s.check=ar(s.check,T,2,0)),u=0,d=0}else s.head&&(s.head.extra=null);s.mode=fn;case fn:if(s.flags&1024&&(b=s.length,b>p&&(b=p),b&&(s.head&&(N=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Array(s.head.extra_len)),ze.arraySet(s.head.extra,n,i,b,N)),s.flags&512&&(s.check=ar(s.check,n,b,i)),p-=b,i+=b,s.length-=b),s.length))break e;s.length=0,s.mode=ln;case ln:if(s.flags&2048){if(p===0)break e;b=0;do N=n[i+b++],s.head&&N&&s.length<65536&&(s.head.name+=String.fromCharCode(N));while(N&&b<p);if(s.flags&512&&(s.check=ar(s.check,n,b,i)),p-=b,i+=b,N)break e}else s.head&&(s.head.name=null);s.length=0,s.mode=un;case un:if(s.flags&4096){if(p===0)break e;b=0;do N=n[i+b++],s.head&&N&&s.length<65536&&(s.head.comment+=String.fromCharCode(N));while(N&&b<p);if(s.flags&512&&(s.check=ar(s.check,n,b,i)),p-=b,i+=b,N)break e}else s.head&&(s.head.comment=null);s.mode=cn;case cn:if(s.flags&512){for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(u!==(s.check&65535)){e.msg="header crc mismatch",s.mode=be;break}u=0,d=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),e.adler=s.check=0,s.mode=hr;break;case dn:for(;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}e.adler=s.check=xn(u),u=0,d=0,s.mode=rs;case rs:if(s.havedict===0)return e.next_out=t,e.avail_out=y,e.next_in=i,e.avail_in=p,s.hold=u,s.bits=d,Zf;e.adler=s.check=1,s.mode=hr;case hr:if(r===Wf||r===Ct)break e;case Fs:if(s.last){u>>>=d&7,d-=d&7,s.mode=Is;break}for(;d<3;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}switch(s.last=u&1,u>>>=1,d-=1,u&3){case 0:s.mode=hn;break;case 1:if(rl(s),s.mode=Dt,r===Ct){u>>>=2,d-=2;break e}break;case 2:s.mode=mn;break;case 3:e.msg="invalid block type",s.mode=be}u>>>=2,d-=2;break;case hn:for(u>>>=d&7,d-=d&7;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",s.mode=be;break}if(s.length=u&65535,u=0,d=0,s.mode=Bs,r===Ct)break e;case Bs:s.mode=yn;case yn:if(b=s.length,b){if(b>p&&(b=p),b>y&&(b=y),b===0)break e;ze.arraySet(o,n,i,b,t),p-=b,i+=b,y-=b,t+=b,s.length-=b;break}s.mode=hr;break;case mn:for(;d<14;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(s.nlen=(u&31)+257,u>>>=5,d-=5,s.ndist=(u&31)+1,u>>>=5,d-=5,s.ncode=(u&15)+4,u>>>=4,d-=4,s.nlen>286||s.ndist>30){e.msg="too many length or distance symbols",s.mode=be;break}s.have=0,s.mode=gn;case gn:for(;s.have<s.ncode;){for(;d<3;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.lens[C[s.have++]]=u&7,u>>>=3,d-=3}for(;s.have<19;)s.lens[C[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,E={bits:s.lenbits},S=yt(Mf,s.lens,0,19,s.lencode,0,s.work,E),s.lenbits=E.bits,S){e.msg="invalid code lengths set",s.mode=be;break}s.have=0,s.mode=wn;case wn:for(;s.have<s.nlen+s.ndist;){for(;q=s.lencode[u&(1<<s.lenbits)-1],D=q>>>24,M=q>>>16&255,I=q&65535,!(D<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(I<16)u>>>=D,d-=D,s.lens[s.have++]=I;else{if(I===16){for(O=D+2;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(u>>>=D,d-=D,s.have===0){e.msg="invalid bit length repeat",s.mode=be;break}N=s.lens[s.have-1],b=3+(u&3),u>>>=2,d-=2}else if(I===17){for(O=D+3;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=D,d-=D,N=0,b=3+(u&7),u>>>=3,d-=3}else{for(O=D+7;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=D,d-=D,N=0,b=11+(u&127),u>>>=7,d-=7}if(s.have+b>s.nlen+s.ndist){e.msg="invalid bit length repeat",s.mode=be;break}for(;b--;)s.lens[s.have++]=N}}if(s.mode===be)break;if(s.lens[256]===0){e.msg="invalid code -- missing end-of-block",s.mode=be;break}if(s.lenbits=9,E={bits:s.lenbits},S=yt(za,s.lens,0,s.nlen,s.lencode,0,s.work,E),s.lenbits=E.bits,S){e.msg="invalid literal/lengths set",s.mode=be;break}if(s.distbits=6,s.distcode=s.distdyn,E={bits:s.distbits},S=yt(Ma,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,E),s.distbits=E.bits,S){e.msg="invalid distances set",s.mode=be;break}if(s.mode=Dt,r===Ct)break e;case Dt:s.mode=qt;case qt:if(p>=6&&y>=258){e.next_out=t,e.avail_out=y,e.next_in=i,e.avail_in=p,s.hold=u,s.bits=d,zf(e,_),t=e.next_out,o=e.output,y=e.avail_out,i=e.next_in,n=e.input,p=e.avail_in,u=s.hold,d=s.bits,s.mode===hr&&(s.back=-1);break}for(s.back=0;q=s.lencode[u&(1<<s.lenbits)-1],D=q>>>24,M=q>>>16&255,I=q&65535,!(D<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(M&&!(M&240)){for(U=D,A=M,x=I;q=s.lencode[x+((u&(1<<U+A)-1)>>U)],D=q>>>24,M=q>>>16&255,I=q&65535,!(U+D<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=U,d-=U,s.back+=U}if(u>>>=D,d-=D,s.back+=D,s.length=I,M===0){s.mode=kn;break}if(M&32){s.back=-1,s.mode=hr;break}if(M&64){e.msg="invalid literal/length code",s.mode=be;break}s.extra=M&15,s.mode=bn;case bn:if(s.extra){for(O=s.extra;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.length+=u&(1<<s.extra)-1,u>>>=s.extra,d-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=_n;case _n:for(;q=s.distcode[u&(1<<s.distbits)-1],D=q>>>24,M=q>>>16&255,I=q&65535,!(D<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(!(M&240)){for(U=D,A=M,x=I;q=s.distcode[x+((u&(1<<U+A)-1)>>U)],D=q>>>24,M=q>>>16&255,I=q&65535,!(U+D<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=U,d-=U,s.back+=U}if(u>>>=D,d-=D,s.back+=D,M&64){e.msg="invalid distance code",s.mode=be;break}s.offset=I,s.extra=M&15,s.mode=vn;case vn:if(s.extra){for(O=s.extra;d<O;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.offset+=u&(1<<s.extra)-1,u>>>=s.extra,d-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){e.msg="invalid distance too far back",s.mode=be;break}s.mode=Pn;case Pn:if(y===0)break e;if(b=_-y,s.offset>b){if(b=s.offset-b,b>s.whave&&s.sane){e.msg="invalid distance too far back",s.mode=be;break}b>s.wnext?(b-=s.wnext,B=s.wsize-b):B=s.wnext-b,b>s.length&&(b=s.length),P=s.window}else P=o,B=t-s.offset,b=s.length;b>y&&(b=y),y-=b,s.length-=b;do o[t++]=P[B++];while(--b);s.length===0&&(s.mode=qt);break;case kn:if(y===0)break e;o[t++]=s.length,y--,s.mode=qt;break;case Is:if(s.wrap){for(;d<32;){if(p===0)break e;p--,u|=n[i++]<<d,d+=8}if(_-=y,e.total_out+=_,s.total+=_,_&&(e.adler=s.check=s.flags?ar(s.check,o,_,t-_):Js(s.check,o,_,t-_)),_=y,(s.flags?u:xn(u))!==s.check){e.msg="incorrect data check",s.mode=be;break}u=0,d=0}s.mode=En;case En:if(s.wrap&&s.flags){for(;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(u!==(s.total&4294967295)){e.msg="incorrect length check",s.mode=be;break}u=0,d=0}s.mode=On;case On:S=Hf;break e;case be:S=Wa;break e;case Va:return Ha;case Gf:default:return Ge}return e.next_out=t,e.avail_out=y,e.next_in=i,e.avail_in=p,s.hold=u,s.bits=d,(s.wsize||_!==e.avail_out&&s.mode<be&&(s.mode<Is||r!==tn))&&Qa(e,e.output,e.next_out,_-e.avail_out),w-=e.avail_in,_-=e.avail_out,e.total_in+=w,e.total_out+=_,s.total+=_,s.wrap&&_&&(e.adler=s.check=s.flags?ar(s.check,o,_,e.next_out-_):Js(s.check,o,_,e.next_out-_)),e.data_type=s.bits+(s.last?64:0)+(s.mode===hr?128:0)+(s.mode===Dt||s.mode===Bs?256:0),(w===0&&_===0||r===tn)&&S===Dr&&(S=Vf),S}function sl(e){if(!e||!e.state)return Ge;var r=e.state;return r.window&&(r.window=null),e.state=null,Dr}function il(e,r){var s;return!e||!e.state||(s=e.state,!(s.wrap&2))?Ge:(s.head=r,r.done=!1,Dr)}function nl(e,r){var s=r.length,n,o,i;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==rs)?Ge:n.mode===rs&&(o=1,o=Js(o,r,s,0),o!==n.check)?Wa:(i=Qa(e,r,s,s),i?(n.mode=Va,Ha):(n.havedict=1,Dr))}rr.inflateReset=Ya;rr.inflateReset2=Ka;rr.inflateResetKeep=Ga;rr.inflateInit=el;rr.inflateInit2=Xa;rr.inflate=tl;rr.inflateEnd=sl;rr.inflateGetHeader=il;rr.inflateSetDictionary=nl;rr.inflateInfo="pako inflate (from Nodeca project)";var Ja={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function al(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var ol=al,tt=rr,mt=br,Vt=zr,ke=Ja,ei=vi,pl=qa,fl=ol,eo=Object.prototype.toString;function qr(e){if(!(this instanceof qr))return new qr(e);this.options=mt.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new pl,this.strm.avail_out=0;var s=tt.inflateInit2(this.strm,r.windowBits);if(s!==ke.Z_OK)throw new Error(ei[s]);if(this.header=new fl,tt.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Vt.string2buf(r.dictionary):eo.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(s=tt.inflateSetDictionary(this.strm,r.dictionary),s!==ke.Z_OK)))throw new Error(ei[s])}qr.prototype.push=function(e,r){var s=this.strm,n=this.options.chunkSize,o=this.options.dictionary,i,t,p,y,u,d=!1;if(this.ended)return!1;t=r===~~r?r:r===!0?ke.Z_FINISH:ke.Z_NO_FLUSH,typeof e=="string"?s.input=Vt.binstring2buf(e):eo.call(e)==="[object ArrayBuffer]"?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new mt.Buf8(n),s.next_out=0,s.avail_out=n),i=tt.inflate(s,ke.Z_NO_FLUSH),i===ke.Z_NEED_DICT&&o&&(i=tt.inflateSetDictionary(this.strm,o)),i===ke.Z_BUF_ERROR&&d===!0&&(i=ke.Z_OK,d=!1),i!==ke.Z_STREAM_END&&i!==ke.Z_OK)return this.onEnd(i),this.ended=!0,!1;s.next_out&&(s.avail_out===0||i===ke.Z_STREAM_END||s.avail_in===0&&(t===ke.Z_FINISH||t===ke.Z_SYNC_FLUSH))&&(this.options.to==="string"?(p=Vt.utf8border(s.output,s.next_out),y=s.next_out-p,u=Vt.buf2string(s.output,p),s.next_out=y,s.avail_out=n-y,y&&mt.arraySet(s.output,s.output,p,y,0),this.onData(u)):this.onData(mt.shrinkBuf(s.output,s.next_out))),s.avail_in===0&&s.avail_out===0&&(d=!0)}while((s.avail_in>0||s.avail_out===0)&&i!==ke.Z_STREAM_END);return i===ke.Z_STREAM_END&&(t=ke.Z_FINISH),t===ke.Z_FINISH?(i=tt.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ke.Z_OK):(t===ke.Z_SYNC_FLUSH&&(this.onEnd(ke.Z_OK),s.avail_out=0),!0)};qr.prototype.onData=function(e){this.chunks.push(e)};qr.prototype.onEnd=function(e){e===ke.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=mt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ki(e,r){var s=new qr(r);if(s.push(e,!0),s.err)throw s.msg||ei[s.err];return s.result}function ll(e,r){return r=r||{},r.raw=!0,ki(e,r)}St.Inflate=qr;St.inflate=ki;St.inflateRaw=ll;St.ungzip=ki;var ul=br.assign,cl=Tt,dl=St,hl=Ja,ro={};ul(ro,cl,dl,hl);var yl=ro;const to=di(yl);async function ml(e,r){const s=new ua(e);let n=await s.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new _e(`Invalid PACK header '${n}'`);let o=await s.read(4);if(o=o.readUInt32BE(0),o!==2)throw new _e(`Invalid packfile version: ${o}`);let i=await s.read(4);if(i=i.readUInt32BE(0),!(i<1))for(;!s.eof()&&i--;){const t=s.tell(),{type:p,length:y,ofs:u,reference:d}=await gl(s),w=new to.Inflate;for(;!w.result;){const _=await s.chunk();if(!_)break;if(w.push(_,!1),w.err)throw new _e(`Pako error: ${w.msg}`);if(w.result){if(w.result.length!==y)throw new _e("Inflated object size is different from that stated in packfile.");await s.undo(),await s.read(_.length-w.strm.avail_in);const b=s.tell();await r({data:w.result,type:p,num:i,offset:t,end:b,reference:d,ofs:u})}}}}async function gl(e){let r=await e.byte();const s=r>>4&7;let n=r&15;if(r&128){let t=4;do r=await e.byte(),n|=(r&127)<<t,t+=7;while(r&128)}let o,i;if(s===6){let t=0;o=0;const p=[];do r=await e.byte(),o|=(r&127)<<t,t+=7,p.push(r);while(r&128);i=Buffer.from(p)}return s===7&&(i=await e.read(20)),{type:s,length:n,ofs:o,reference:i}}let wl=!1;async function bl(e){return wl?_l(e):to.inflate(e)}async function _l(e){const r=new DecompressionStream("deflate"),s=new Blob([e]).stream().pipeThrough(r);return new Uint8Array(await new Response(s).arrayBuffer())}var ri={exports:{}};typeof Object.create=="function"?ri.exports=function(r,s){s&&(r.super_=s,r.prototype=Object.create(s.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:ri.exports=function(r,s){if(s){r.super_=s;var n=function(){};n.prototype=s.prototype,r.prototype=new n,r.prototype.constructor=r}};var vl=ri.exports,ti={exports:{}},wr={},ys={};ys.byteLength=El;ys.toByteArray=xl;ys.fromByteArray=Al;var lr=[],He=[],Pl=typeof Uint8Array<"u"?Uint8Array:Array,Ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Kr=0,kl=Ns.length;Kr<kl;++Kr)lr[Kr]=Ns[Kr],He[Ns.charCodeAt(Kr)]=Kr;He["-".charCodeAt(0)]=62;He["_".charCodeAt(0)]=63;function so(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var s=e.indexOf("=");s===-1&&(s=r);var n=s===r?0:4-s%4;return[s,n]}function El(e){var r=so(e),s=r[0],n=r[1];return(s+n)*3/4-n}function Ol(e,r,s){return(r+s)*3/4-s}function xl(e){var r,s=so(e),n=s[0],o=s[1],i=new Pl(Ol(e,n,o)),t=0,p=o>0?n-4:n,y;for(y=0;y<p;y+=4)r=He[e.charCodeAt(y)]<<18|He[e.charCodeAt(y+1)]<<12|He[e.charCodeAt(y+2)]<<6|He[e.charCodeAt(y+3)],i[t++]=r>>16&255,i[t++]=r>>8&255,i[t++]=r&255;return o===2&&(r=He[e.charCodeAt(y)]<<2|He[e.charCodeAt(y+1)]>>4,i[t++]=r&255),o===1&&(r=He[e.charCodeAt(y)]<<10|He[e.charCodeAt(y+1)]<<4|He[e.charCodeAt(y+2)]>>2,i[t++]=r>>8&255,i[t++]=r&255),i}function Tl(e){return lr[e>>18&63]+lr[e>>12&63]+lr[e>>6&63]+lr[e&63]}function $l(e,r,s){for(var n,o=[],i=r;i<s;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),o.push(Tl(n));return o.join("")}function Al(e){for(var r,s=e.length,n=s%3,o=[],i=16383,t=0,p=s-n;t<p;t+=i)o.push($l(e,t,t+i>p?p:t+i));return n===1?(r=e[s-1],o.push(lr[r>>2]+lr[r<<4&63]+"==")):n===2&&(r=(e[s-2]<<8)+e[s-1],o.push(lr[r>>10]+lr[r>>4&63]+lr[r<<2&63]+"=")),o.join("")}var Ei={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ei.read=function(e,r,s,n,o){var i,t,p=o*8-n-1,y=(1<<p)-1,u=y>>1,d=-7,w=s?o-1:0,_=s?-1:1,b=e[r+w];for(w+=_,i=b&(1<<-d)-1,b>>=-d,d+=p;d>0;i=i*256+e[r+w],w+=_,d-=8);for(t=i&(1<<-d)-1,i>>=-d,d+=n;d>0;t=t*256+e[r+w],w+=_,d-=8);if(i===0)i=1-u;else{if(i===y)return t?NaN:(b?-1:1)*(1/0);t=t+Math.pow(2,n),i=i-u}return(b?-1:1)*t*Math.pow(2,i-n)};Ei.write=function(e,r,s,n,o,i){var t,p,y,u=i*8-o-1,d=(1<<u)-1,w=d>>1,_=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=n?0:i-1,B=n?1:-1,P=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,t=d):(t=Math.floor(Math.log(r)/Math.LN2),r*(y=Math.pow(2,-t))<1&&(t--,y*=2),t+w>=1?r+=_/y:r+=_*Math.pow(2,1-w),r*y>=2&&(t++,y/=2),t+w>=d?(p=0,t=d):t+w>=1?(p=(r*y-1)*Math.pow(2,o),t=t+w):(p=r*Math.pow(2,w-1)*Math.pow(2,o),t=0));o>=8;e[s+b]=p&255,b+=B,p/=256,o-=8);for(t=t<<o|p,u+=o;u>0;e[s+b]=t&255,b+=B,t/=256,u-=8);e[s+b-B]|=P*128};/*!
703
+ `+i;return Ne.from(y)}}var ya={};/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */(function(e){(function(r){r(typeof DO_NOT_EXPORT_CRC>"u"?e:{})})(function(r){r.version="1.2.2";function s(){for(var x=0,T=new Array(256),k=0;k!=256;++k)x=k,x=x&1?-306674912^x>>>1:x>>>1,x=x&1?-306674912^x>>>1:x>>>1,x=x&1?-306674912^x>>>1:x>>>1,x=x&1?-306674912^x>>>1:x>>>1,x=x&1?-306674912^x>>>1:x>>>1,x=x&1?-306674912^x>>>1:x>>>1,x=x&1?-306674912^x>>>1:x>>>1,x=x&1?-306674912^x>>>1:x>>>1,T[k]=x;return typeof Int32Array<"u"?new Int32Array(T):T}var n=s();function o(x){var T=0,k=0,S=0,F=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(S=0;S!=256;++S)F[S]=x[S];for(S=0;S!=256;++S)for(k=x[S],T=256+S;T<4096;T+=256)k=F[T]=k>>>8^x[k&255];var D=[];for(S=1;S!=16;++S)D[S-1]=typeof Int32Array<"u"?F.subarray(S*256,S*256+256):F.slice(S*256,S*256+256);return D}var i=o(n),t=i[0],p=i[1],y=i[2],u=i[3],d=i[4],g=i[5],b=i[6],w=i[7],H=i[8],P=i[9],N=i[10],j=i[11],q=i[12],$=i[13],W=i[14];function O(x,T){for(var k=T^-1,S=0,F=x.length;S<F;)k=k>>>8^n[(k^x.charCodeAt(S++))&255];return~k}function A(x,T){for(var k=T^-1,S=x.length-15,F=0;F<S;)k=W[x[F++]^k&255]^$[x[F++]^k>>8&255]^q[x[F++]^k>>16&255]^j[x[F++]^k>>>24]^N[x[F++]]^P[x[F++]]^H[x[F++]]^w[x[F++]]^b[x[F++]]^g[x[F++]]^d[x[F++]]^u[x[F++]]^y[x[F++]]^p[x[F++]]^t[x[F++]]^n[x[F++]];for(S+=15;F<S;)k=k>>>8^n[(k^x[F++])&255];return~k}function B(x,T){for(var k=T^-1,S=0,F=x.length,D=0,I=0;S<F;)D=x.charCodeAt(S++),D<128?k=k>>>8^n[(k^D)&255]:D<2048?(k=k>>>8^n[(k^(192|D>>6&31))&255],k=k>>>8^n[(k^(128|D&63))&255]):D>=55296&&D<57344?(D=(D&1023)+64,I=x.charCodeAt(S++)&1023,k=k>>>8^n[(k^(240|D>>8&7))&255],k=k>>>8^n[(k^(128|D>>2&63))&255],k=k>>>8^n[(k^(128|I>>6&15|(D&3)<<4))&255],k=k>>>8^n[(k^(128|I&63))&255]):(k=k>>>8^n[(k^(224|D>>12&15))&255],k=k>>>8^n[(k^(128|D>>6&63))&255],k=k>>>8^n[(k^(128|D&63))&255]);return~k}r.table=n,r.bstr=O,r.buf=A,r.str=B})})(ya);const vp=hi(ya);class Pp{static wrap({type:r,object:s}){return Buffer.concat([Buffer.from(`${r} ${s.byteLength.toString()}\0`),Buffer.from(s)])}static unwrap(r){const s=r.indexOf(32),n=r.indexOf(0),o=r.slice(0,s).toString("utf8"),i=r.slice(s+1,n).toString("utf8"),t=r.length-(n+1);if(parseInt(i)!==t)throw new be(`Length mismatch: expected ${i} bytes but got ${t} instead.`);return{type:o,object:Buffer.from(r.slice(n+1))}}}class Lr{constructor(r){this.buffer=r,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(r){this._start=r}slice(r){const s=this.buffer.slice(this._start,this._start+r);return this._start+=r,s}toString(r,s){const n=this.buffer.toString(r,this._start,this._start+s);return this._start+=s,n}write(r,s,n){const o=this.buffer.write(r,this._start,s,n);return this._start+=s,o}copy(r,s,n){const o=r.copy(this.buffer,this._start,s,n);return this._start+=o,o}readUInt8(){const r=this.buffer.readUInt8(this._start);return this._start+=1,r}writeUInt8(r){const s=this.buffer.writeUInt8(r,this._start);return this._start+=1,s}readUInt16BE(){const r=this.buffer.readUInt16BE(this._start);return this._start+=2,r}writeUInt16BE(r){const s=this.buffer.writeUInt16BE(r,this._start);return this._start+=2,s}readUInt32BE(){const r=this.buffer.readUInt32BE(this._start);return this._start+=4,r}writeUInt32BE(r){const s=this.buffer.writeUInt32BE(r,this._start);return this._start+=4,s}}function Ep(e,r){const s=new Lr(e),n=Bi(s);if(n!==r.byteLength)throw new be(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${r.length} bytes`);const o=Bi(s);let i;const t=ji(s,r);if(t.byteLength===o)i=t;else{i=Buffer.alloc(o);const p=new Lr(i);for(p.copy(t);!s.eof();)p.copy(ji(s,r));const y=p.tell();if(o!==y)throw new be(`applyDelta expected target buffer to be ${o} bytes but the resulting buffer was ${y} bytes`)}return i}function Bi(e){let r=0,s=0,n=null;do n=e.readUInt8(),r|=(n&127)<<s,s+=7;while(n&128);return r}function Fi(e,r,s){let n=0,o=0;for(;s--;)r&1&&(n|=e.readUInt8()<<o),r>>=1,o+=8;return n}function ji(e,r){const s=e.readUInt8(),n=128,o=15,i=112;if(s&n){const t=Fi(e,s&o,4);let p=Fi(e,(s&i)>>4,3);return p===0&&(p=65536),r.slice(t,t+p)}else return e.slice(s)}var wr={};(function(e){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function s(i,t){return Object.prototype.hasOwnProperty.call(i,t)}e.assign=function(i){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var p=t.shift();if(p){if(typeof p!="object")throw new TypeError(p+"must be non-object");for(var y in p)s(p,y)&&(i[y]=p[y])}}return i},e.shrinkBuf=function(i,t){return i.length===t?i:i.subarray?i.subarray(0,t):(i.length=t,i)};var n={arraySet:function(i,t,p,y,u){if(t.subarray&&i.subarray){i.set(t.subarray(p,p+y),u);return}for(var d=0;d<y;d++)i[u+d]=t[p+d]},flattenChunks:function(i){var t,p,y,u,d,g;for(y=0,t=0,p=i.length;t<p;t++)y+=i[t].length;for(g=new Uint8Array(y),u=0,t=0,p=i.length;t<p;t++)d=i[t],g.set(d,u),u+=d.length;return g}},o={arraySet:function(i,t,p,y,u){for(var d=0;d<y;d++)i[u+d]=t[p+d]},flattenChunks:function(i){return[].concat.apply([],i)}};e.setTyped=function(i){i?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(r)})(wr);var Ct={},ur={},nt={},kp=wr,Sp=4,Ni=0,Wi=1,Ap=2;function at(e){for(var r=e.length;--r>=0;)e[r]=0}var Tp=0,ma=1,Cp=2,Op=3,xp=258,gi=29,Ot=256,wt=Ot+1+gi,rt=30,wi=19,_a=2*wt+1,Hr=15,Ss=16,Lp=7,bi=256,ga=16,wa=17,ba=18,Zs=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Mt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ip=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],va=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Hp=512,_r=new Array((wt+2)*2);at(_r);var dt=new Array(rt*2);at(dt);var bt=new Array(Hp);at(bt);var vt=new Array(xp-Op+1);at(vt);var vi=new Array(gi);at(vi);var rs=new Array(rt);at(rs);function As(e,r,s,n,o){this.static_tree=e,this.extra_bits=r,this.extra_base=s,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}var Pa,Ea,ka;function Ts(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function Sa(e){return e<256?bt[e]:bt[256+(e>>>7)]}function Pt(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Be(e,r,s){e.bi_valid>Ss-s?(e.bi_buf|=r<<e.bi_valid&65535,Pt(e,e.bi_buf),e.bi_buf=r>>Ss-e.bi_valid,e.bi_valid+=s-Ss):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=s)}function pr(e,r,s){Be(e,s[r*2],s[r*2+1])}function Aa(e,r){var s=0;do s|=e&1,e>>>=1,s<<=1;while(--r>0);return s>>>1}function $p(e){e.bi_valid===16?(Pt(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function Rp(e,r){var s=r.dyn_tree,n=r.max_code,o=r.stat_desc.static_tree,i=r.stat_desc.has_stree,t=r.stat_desc.extra_bits,p=r.stat_desc.extra_base,y=r.stat_desc.max_length,u,d,g,b,w,H,P=0;for(b=0;b<=Hr;b++)e.bl_count[b]=0;for(s[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<_a;u++)d=e.heap[u],b=s[s[d*2+1]*2+1]+1,b>y&&(b=y,P++),s[d*2+1]=b,!(d>n)&&(e.bl_count[b]++,w=0,d>=p&&(w=t[d-p]),H=s[d*2],e.opt_len+=H*(b+w),i&&(e.static_len+=H*(o[d*2+1]+w)));if(P!==0){do{for(b=y-1;e.bl_count[b]===0;)b--;e.bl_count[b]--,e.bl_count[b+1]+=2,e.bl_count[y]--,P-=2}while(P>0);for(b=y;b!==0;b--)for(d=e.bl_count[b];d!==0;)g=e.heap[--u],!(g>n)&&(s[g*2+1]!==b&&(e.opt_len+=(b-s[g*2+1])*s[g*2],s[g*2+1]=b),d--)}}function Ta(e,r,s){var n=new Array(Hr+1),o=0,i,t;for(i=1;i<=Hr;i++)n[i]=o=o+s[i-1]<<1;for(t=0;t<=r;t++){var p=e[t*2+1];p!==0&&(e[t*2]=Aa(n[p]++,p))}}function Dp(){var e,r,s,n,o,i=new Array(Hr+1);for(s=0,n=0;n<gi-1;n++)for(vi[n]=s,e=0;e<1<<Zs[n];e++)vt[s++]=n;for(vt[s-1]=n,o=0,n=0;n<16;n++)for(rs[n]=o,e=0;e<1<<Mt[n];e++)bt[o++]=n;for(o>>=7;n<rt;n++)for(rs[n]=o<<7,e=0;e<1<<Mt[n]-7;e++)bt[256+o++]=n;for(r=0;r<=Hr;r++)i[r]=0;for(e=0;e<=143;)_r[e*2+1]=8,e++,i[8]++;for(;e<=255;)_r[e*2+1]=9,e++,i[9]++;for(;e<=279;)_r[e*2+1]=7,e++,i[7]++;for(;e<=287;)_r[e*2+1]=8,e++,i[8]++;for(Ta(_r,wt+1,i),e=0;e<rt;e++)dt[e*2+1]=5,dt[e*2]=Aa(e,5);Pa=new As(_r,Zs,Ot+1,wt,Hr),Ea=new As(dt,Mt,0,rt,Hr),ka=new As(new Array(0),Ip,0,wi,Lp)}function Ca(e){var r;for(r=0;r<wt;r++)e.dyn_ltree[r*2]=0;for(r=0;r<rt;r++)e.dyn_dtree[r*2]=0;for(r=0;r<wi;r++)e.bl_tree[r*2]=0;e.dyn_ltree[bi*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Oa(e){e.bi_valid>8?Pt(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Bp(e,r,s,n){Oa(e),n&&(Pt(e,s),Pt(e,~s)),kp.arraySet(e.pending_buf,e.window,r,s,e.pending),e.pending+=s}function Ui(e,r,s,n){var o=r*2,i=s*2;return e[o]<e[i]||e[o]===e[i]&&n[r]<=n[s]}function Cs(e,r,s){for(var n=e.heap[s],o=s<<1;o<=e.heap_len&&(o<e.heap_len&&Ui(r,e.heap[o+1],e.heap[o],e.depth)&&o++,!Ui(r,n,e.heap[o],e.depth));)e.heap[s]=e.heap[o],s=o,o<<=1;e.heap[s]=n}function qi(e,r,s){var n,o,i=0,t,p;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+i*2]<<8|e.pending_buf[e.d_buf+i*2+1],o=e.pending_buf[e.l_buf+i],i++,n===0?pr(e,o,r):(t=vt[o],pr(e,t+Ot+1,r),p=Zs[t],p!==0&&(o-=vi[t],Be(e,o,p)),n--,t=Sa(n),pr(e,t,s),p=Mt[t],p!==0&&(n-=rs[t],Be(e,n,p)));while(i<e.last_lit);pr(e,bi,r)}function Vs(e,r){var s=r.dyn_tree,n=r.stat_desc.static_tree,o=r.stat_desc.has_stree,i=r.stat_desc.elems,t,p,y=-1,u;for(e.heap_len=0,e.heap_max=_a,t=0;t<i;t++)s[t*2]!==0?(e.heap[++e.heap_len]=y=t,e.depth[t]=0):s[t*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=y<2?++y:0,s[u*2]=1,e.depth[u]=0,e.opt_len--,o&&(e.static_len-=n[u*2+1]);for(r.max_code=y,t=e.heap_len>>1;t>=1;t--)Cs(e,s,t);u=i;do t=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Cs(e,s,1),p=e.heap[1],e.heap[--e.heap_max]=t,e.heap[--e.heap_max]=p,s[u*2]=s[t*2]+s[p*2],e.depth[u]=(e.depth[t]>=e.depth[p]?e.depth[t]:e.depth[p])+1,s[t*2+1]=s[p*2+1]=u,e.heap[1]=u++,Cs(e,s,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Rp(e,r),Ta(s,y,e.bl_count)}function Mi(e,r,s){var n,o=-1,i,t=r[0*2+1],p=0,y=7,u=4;for(t===0&&(y=138,u=3),r[(s+1)*2+1]=65535,n=0;n<=s;n++)i=t,t=r[(n+1)*2+1],!(++p<y&&i===t)&&(p<u?e.bl_tree[i*2]+=p:i!==0?(i!==o&&e.bl_tree[i*2]++,e.bl_tree[ga*2]++):p<=10?e.bl_tree[wa*2]++:e.bl_tree[ba*2]++,p=0,o=i,t===0?(y=138,u=3):i===t?(y=6,u=3):(y=7,u=4))}function Ki(e,r,s){var n,o=-1,i,t=r[0*2+1],p=0,y=7,u=4;for(t===0&&(y=138,u=3),n=0;n<=s;n++)if(i=t,t=r[(n+1)*2+1],!(++p<y&&i===t)){if(p<u)do pr(e,i,e.bl_tree);while(--p!==0);else i!==0?(i!==o&&(pr(e,i,e.bl_tree),p--),pr(e,ga,e.bl_tree),Be(e,p-3,2)):p<=10?(pr(e,wa,e.bl_tree),Be(e,p-3,3)):(pr(e,ba,e.bl_tree),Be(e,p-11,7));p=0,o=i,t===0?(y=138,u=3):i===t?(y=6,u=3):(y=7,u=4)}}function Fp(e){var r;for(Mi(e,e.dyn_ltree,e.l_desc.max_code),Mi(e,e.dyn_dtree,e.d_desc.max_code),Vs(e,e.bl_desc),r=wi-1;r>=3&&e.bl_tree[va[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function jp(e,r,s,n){var o;for(Be(e,r-257,5),Be(e,s-1,5),Be(e,n-4,4),o=0;o<n;o++)Be(e,e.bl_tree[va[o]*2+1],3);Ki(e,e.dyn_ltree,r-1),Ki(e,e.dyn_dtree,s-1)}function Np(e){var r=4093624447,s;for(s=0;s<=31;s++,r>>>=1)if(r&1&&e.dyn_ltree[s*2]!==0)return Ni;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Wi;for(s=32;s<Ot;s++)if(e.dyn_ltree[s*2]!==0)return Wi;return Ni}var zi=!1;function Wp(e){zi||(Dp(),zi=!0),e.l_desc=new Ts(e.dyn_ltree,Pa),e.d_desc=new Ts(e.dyn_dtree,Ea),e.bl_desc=new Ts(e.bl_tree,ka),e.bi_buf=0,e.bi_valid=0,Ca(e)}function xa(e,r,s,n){Be(e,(Tp<<1)+(n?1:0),3),Bp(e,r,s,!0)}function Up(e){Be(e,ma<<1,3),pr(e,bi,_r),$p(e)}function qp(e,r,s,n){var o,i,t=0;e.level>0?(e.strm.data_type===Ap&&(e.strm.data_type=Np(e)),Vs(e,e.l_desc),Vs(e,e.d_desc),t=Fp(e),o=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=o&&(o=i)):o=i=s+5,s+4<=o&&r!==-1?xa(e,r,s,n):e.strategy===Sp||i===o?(Be(e,(ma<<1)+(n?1:0),3),qi(e,_r,dt)):(Be(e,(Cp<<1)+(n?1:0),3),jp(e,e.l_desc.max_code+1,e.d_desc.max_code+1,t+1),qi(e,e.dyn_ltree,e.dyn_dtree)),Ca(e),n&&Oa(e)}function Mp(e,r,s){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=s&255,e.last_lit++,r===0?e.dyn_ltree[s*2]++:(e.matches++,r--,e.dyn_ltree[(vt[s]+Ot+1)*2]++,e.dyn_dtree[Sa(r)*2]++),e.last_lit===e.lit_bufsize-1}nt._tr_init=Wp;nt._tr_stored_block=xa;nt._tr_flush_block=qp;nt._tr_tally=Mp;nt._tr_align=Up;function Kp(e,r,s,n){for(var o=e&65535|0,i=e>>>16&65535|0,t=0;s!==0;){t=s>2e3?2e3:s,s-=t;do o=o+r[n++]|0,i=i+o|0;while(--t);o%=65521,i%=65521}return o|i<<16|0}var La=Kp;function zp(){for(var e,r=[],s=0;s<256;s++){e=s;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;r[s]=e}return r}var Gp=zp();function Zp(e,r,s,n){var o=Gp,i=n+s;e^=-1;for(var t=n;t<i;t++)e=e>>>8^o[(e^r[t])&255];return e^-1}var Ia=Zp,Pi={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Re=wr,ze=nt,Ha=La,kr=Ia,Vp=Pi,Ur=0,Yp=1,Xp=3,Or=4,Gi=5,fr=0,Zi=1,Ge=-2,Qp=-3,Os=-5,Jp=-1,ef=1,Bt=2,rf=3,tf=4,sf=0,nf=2,ds=8,af=9,of=15,pf=8,ff=29,lf=256,Ys=lf+1+ff,uf=30,cf=19,df=2*Ys+1,hf=15,oe=3,Tr=258,er=Tr+oe+1,yf=32,hs=42,Xs=69,Kt=73,zt=91,Gt=103,$r=113,ut=666,Ae=1,xt=2,Br=3,ot=4,mf=3;function Cr(e,r){return e.msg=Vp[r],r}function Vi(e){return(e<<1)-(e>4?9:0)}function Ar(e){for(var r=e.length;--r>=0;)e[r]=0}function Sr(e){var r=e.state,s=r.pending;s>e.avail_out&&(s=e.avail_out),s!==0&&(Re.arraySet(e.output,r.pending_buf,r.pending_out,s,e.next_out),e.next_out+=s,r.pending_out+=s,e.total_out+=s,e.avail_out-=s,r.pending-=s,r.pending===0&&(r.pending_out=0))}function Le(e,r){ze._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Sr(e.strm)}function fe(e,r){e.pending_buf[e.pending++]=r}function lt(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function _f(e,r,s,n){var o=e.avail_in;return o>n&&(o=n),o===0?0:(e.avail_in-=o,Re.arraySet(r,e.input,e.next_in,o,s),e.state.wrap===1?e.adler=Ha(e.adler,r,o,s):e.state.wrap===2&&(e.adler=kr(e.adler,r,o,s)),e.next_in+=o,e.total_in+=o,o)}function $a(e,r){var s=e.max_chain_length,n=e.strstart,o,i,t=e.prev_length,p=e.nice_match,y=e.strstart>e.w_size-er?e.strstart-(e.w_size-er):0,u=e.window,d=e.w_mask,g=e.prev,b=e.strstart+Tr,w=u[n+t-1],H=u[n+t];e.prev_length>=e.good_match&&(s>>=2),p>e.lookahead&&(p=e.lookahead);do if(o=r,!(u[o+t]!==H||u[o+t-1]!==w||u[o]!==u[n]||u[++o]!==u[n+1])){n+=2,o++;do;while(u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&u[++n]===u[++o]&&n<b);if(i=Tr-(b-n),n=b-Tr,i>t){if(e.match_start=r,t=i,i>=p)break;w=u[n+t-1],H=u[n+t]}}while((r=g[r&d])>y&&--s!==0);return t<=e.lookahead?t:e.lookahead}function Fr(e){var r=e.w_size,s,n,o,i,t;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-er)){Re.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,n=e.hash_size,s=n;do o=e.head[--s],e.head[s]=o>=r?o-r:0;while(--n);n=r,s=n;do o=e.prev[--s],e.prev[s]=o>=r?o-r:0;while(--n);i+=r}if(e.strm.avail_in===0)break;if(n=_f(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=oe)for(t=e.strstart-e.insert,e.ins_h=e.window[t],e.ins_h=(e.ins_h<<e.hash_shift^e.window[t+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[t+oe-1])&e.hash_mask,e.prev[t&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=t,t++,e.insert--,!(e.lookahead+e.insert<oe)););}while(e.lookahead<er&&e.strm.avail_in!==0)}function gf(e,r){var s=65535;for(s>e.pending_buf_size-5&&(s=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Fr(e),e.lookahead===0&&r===Ur)return Ae;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+s;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Le(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-er&&(Le(e,!1),e.strm.avail_out===0))return Ae}return e.insert=0,r===Or?(Le(e,!0),e.strm.avail_out===0?Br:ot):(e.strstart>e.block_start&&(Le(e,!1),e.strm.avail_out===0),Ae)}function xs(e,r){for(var s,n;;){if(e.lookahead<er){if(Fr(e),e.lookahead<er&&r===Ur)return Ae;if(e.lookahead===0)break}if(s=0,e.lookahead>=oe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),s!==0&&e.strstart-s<=e.w_size-er&&(e.match_length=$a(e,s)),e.match_length>=oe)if(n=ze._tr_tally(e,e.strstart-e.match_start,e.match_length-oe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=oe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=ze._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Le(e,!1),e.strm.avail_out===0))return Ae}return e.insert=e.strstart<oe-1?e.strstart:oe-1,r===Or?(Le(e,!0),e.strm.avail_out===0?Br:ot):e.last_lit&&(Le(e,!1),e.strm.avail_out===0)?Ae:xt}function Vr(e,r){for(var s,n,o;;){if(e.lookahead<er){if(Fr(e),e.lookahead<er&&r===Ur)return Ae;if(e.lookahead===0)break}if(s=0,e.lookahead>=oe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=oe-1,s!==0&&e.prev_length<e.max_lazy_match&&e.strstart-s<=e.w_size-er&&(e.match_length=$a(e,s),e.match_length<=5&&(e.strategy===ef||e.match_length===oe&&e.strstart-e.match_start>4096)&&(e.match_length=oe-1)),e.prev_length>=oe&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-oe,n=ze._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-oe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+oe-1])&e.hash_mask,s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=oe-1,e.strstart++,n&&(Le(e,!1),e.strm.avail_out===0))return Ae}else if(e.match_available){if(n=ze._tr_tally(e,0,e.window[e.strstart-1]),n&&Le(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ae}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=ze._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<oe-1?e.strstart:oe-1,r===Or?(Le(e,!0),e.strm.avail_out===0?Br:ot):e.last_lit&&(Le(e,!1),e.strm.avail_out===0)?Ae:xt}function wf(e,r){for(var s,n,o,i,t=e.window;;){if(e.lookahead<=Tr){if(Fr(e),e.lookahead<=Tr&&r===Ur)return Ae;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=oe&&e.strstart>0&&(o=e.strstart-1,n=t[o],n===t[++o]&&n===t[++o]&&n===t[++o])){i=e.strstart+Tr;do;while(n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&n===t[++o]&&o<i);e.match_length=Tr-(i-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=oe?(s=ze._tr_tally(e,1,e.match_length-oe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(s=ze._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),s&&(Le(e,!1),e.strm.avail_out===0))return Ae}return e.insert=0,r===Or?(Le(e,!0),e.strm.avail_out===0?Br:ot):e.last_lit&&(Le(e,!1),e.strm.avail_out===0)?Ae:xt}function bf(e,r){for(var s;;){if(e.lookahead===0&&(Fr(e),e.lookahead===0)){if(r===Ur)return Ae;break}if(e.match_length=0,s=ze._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,s&&(Le(e,!1),e.strm.avail_out===0))return Ae}return e.insert=0,r===Or?(Le(e,!0),e.strm.avail_out===0?Br:ot):e.last_lit&&(Le(e,!1),e.strm.avail_out===0)?Ae:xt}function nr(e,r,s,n,o){this.good_length=e,this.max_lazy=r,this.nice_length=s,this.max_chain=n,this.func=o}var Jr;Jr=[new nr(0,0,0,0,gf),new nr(4,4,8,4,xs),new nr(4,5,16,8,xs),new nr(4,6,32,32,xs),new nr(4,4,16,16,Vr),new nr(8,16,32,32,Vr),new nr(8,16,128,128,Vr),new nr(8,32,128,256,Vr),new nr(32,128,258,1024,Vr),new nr(32,258,258,4096,Vr)];function vf(e){e.window_size=2*e.w_size,Ar(e.head),e.max_lazy_match=Jr[e.level].max_lazy,e.good_match=Jr[e.level].good_length,e.nice_match=Jr[e.level].nice_length,e.max_chain_length=Jr[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=oe-1,e.match_available=0,e.ins_h=0}function Pf(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ds,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Re.Buf16(df*2),this.dyn_dtree=new Re.Buf16((2*uf+1)*2),this.bl_tree=new Re.Buf16((2*cf+1)*2),Ar(this.dyn_ltree),Ar(this.dyn_dtree),Ar(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Re.Buf16(hf+1),this.heap=new Re.Buf16(2*Ys+1),Ar(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Re.Buf16(2*Ys+1),Ar(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ra(e){var r;return!e||!e.state?Cr(e,Ge):(e.total_in=e.total_out=0,e.data_type=nf,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?hs:$r,e.adler=r.wrap===2?0:1,r.last_flush=Ur,ze._tr_init(r),fr)}function Da(e){var r=Ra(e);return r===fr&&vf(e.state),r}function Ef(e,r){return!e||!e.state||e.state.wrap!==2?Ge:(e.state.gzhead=r,fr)}function Ba(e,r,s,n,o,i){if(!e)return Ge;var t=1;if(r===Jp&&(r=6),n<0?(t=0,n=-n):n>15&&(t=2,n-=16),o<1||o>af||s!==ds||n<8||n>15||r<0||r>9||i<0||i>tf)return Cr(e,Ge);n===8&&(n=9);var p=new Pf;return e.state=p,p.strm=e,p.wrap=t,p.gzhead=null,p.w_bits=n,p.w_size=1<<p.w_bits,p.w_mask=p.w_size-1,p.hash_bits=o+7,p.hash_size=1<<p.hash_bits,p.hash_mask=p.hash_size-1,p.hash_shift=~~((p.hash_bits+oe-1)/oe),p.window=new Re.Buf8(p.w_size*2),p.head=new Re.Buf16(p.hash_size),p.prev=new Re.Buf16(p.w_size),p.lit_bufsize=1<<o+6,p.pending_buf_size=p.lit_bufsize*4,p.pending_buf=new Re.Buf8(p.pending_buf_size),p.d_buf=1*p.lit_bufsize,p.l_buf=(1+2)*p.lit_bufsize,p.level=r,p.strategy=i,p.method=s,Da(e)}function kf(e,r){return Ba(e,r,ds,of,pf,sf)}function Sf(e,r){var s,n,o,i;if(!e||!e.state||r>Gi||r<0)return e?Cr(e,Ge):Ge;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===ut&&r!==Or)return Cr(e,e.avail_out===0?Os:Ge);if(n.strm=e,s=n.last_flush,n.last_flush=r,n.status===hs)if(n.wrap===2)e.adler=0,fe(n,31),fe(n,139),fe(n,8),n.gzhead?(fe(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),fe(n,n.gzhead.time&255),fe(n,n.gzhead.time>>8&255),fe(n,n.gzhead.time>>16&255),fe(n,n.gzhead.time>>24&255),fe(n,n.level===9?2:n.strategy>=Bt||n.level<2?4:0),fe(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(fe(n,n.gzhead.extra.length&255),fe(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=kr(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Xs):(fe(n,0),fe(n,0),fe(n,0),fe(n,0),fe(n,0),fe(n,n.level===9?2:n.strategy>=Bt||n.level<2?4:0),fe(n,mf),n.status=$r);else{var t=ds+(n.w_bits-8<<4)<<8,p=-1;n.strategy>=Bt||n.level<2?p=0:n.level<6?p=1:n.level===6?p=2:p=3,t|=p<<6,n.strstart!==0&&(t|=yf),t+=31-t%31,n.status=$r,lt(n,t),n.strstart!==0&&(lt(n,e.adler>>>16),lt(n,e.adler&65535)),e.adler=1}if(n.status===Xs)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),Sr(e),o=n.pending,n.pending===n.pending_buf_size));)fe(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Kt)}else n.status=Kt;if(n.status===Kt)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),Sr(e),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}n.gzindex<n.gzhead.name.length?i=n.gzhead.name.charCodeAt(n.gzindex++)&255:i=0,fe(n,i)}while(i!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),i===0&&(n.gzindex=0,n.status=zt)}else n.status=zt;if(n.status===zt)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),Sr(e),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}n.gzindex<n.gzhead.comment.length?i=n.gzhead.comment.charCodeAt(n.gzindex++)&255:i=0,fe(n,i)}while(i!==0);n.gzhead.hcrc&&n.pending>o&&(e.adler=kr(e.adler,n.pending_buf,n.pending-o,o)),i===0&&(n.status=Gt)}else n.status=Gt;if(n.status===Gt&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Sr(e),n.pending+2<=n.pending_buf_size&&(fe(n,e.adler&255),fe(n,e.adler>>8&255),e.adler=0,n.status=$r)):n.status=$r),n.pending!==0){if(Sr(e),e.avail_out===0)return n.last_flush=-1,fr}else if(e.avail_in===0&&Vi(r)<=Vi(s)&&r!==Or)return Cr(e,Os);if(n.status===ut&&e.avail_in!==0)return Cr(e,Os);if(e.avail_in!==0||n.lookahead!==0||r!==Ur&&n.status!==ut){var y=n.strategy===Bt?bf(n,r):n.strategy===rf?wf(n,r):Jr[n.level].func(n,r);if((y===Br||y===ot)&&(n.status=ut),y===Ae||y===Br)return e.avail_out===0&&(n.last_flush=-1),fr;if(y===xt&&(r===Yp?ze._tr_align(n):r!==Gi&&(ze._tr_stored_block(n,0,0,!1),r===Xp&&(Ar(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Sr(e),e.avail_out===0))return n.last_flush=-1,fr}return r!==Or?fr:n.wrap<=0?Zi:(n.wrap===2?(fe(n,e.adler&255),fe(n,e.adler>>8&255),fe(n,e.adler>>16&255),fe(n,e.adler>>24&255),fe(n,e.total_in&255),fe(n,e.total_in>>8&255),fe(n,e.total_in>>16&255),fe(n,e.total_in>>24&255)):(lt(n,e.adler>>>16),lt(n,e.adler&65535)),Sr(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?fr:Zi)}function Af(e){var r;return!e||!e.state?Ge:(r=e.state.status,r!==hs&&r!==Xs&&r!==Kt&&r!==zt&&r!==Gt&&r!==$r&&r!==ut?Cr(e,Ge):(e.state=null,r===$r?Cr(e,Qp):fr))}function Tf(e,r){var s=r.length,n,o,i,t,p,y,u,d;if(!e||!e.state||(n=e.state,t=n.wrap,t===2||t===1&&n.status!==hs||n.lookahead))return Ge;for(t===1&&(e.adler=Ha(e.adler,r,s,0)),n.wrap=0,s>=n.w_size&&(t===0&&(Ar(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new Re.Buf8(n.w_size),Re.arraySet(d,r,s-n.w_size,n.w_size,0),r=d,s=n.w_size),p=e.avail_in,y=e.next_in,u=e.input,e.avail_in=s,e.next_in=0,e.input=r,Fr(n);n.lookahead>=oe;){o=n.strstart,i=n.lookahead-(oe-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[o+oe-1])&n.hash_mask,n.prev[o&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=o,o++;while(--i);n.strstart=o,n.lookahead=oe-1,Fr(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=oe-1,n.match_available=0,e.next_in=y,e.input=u,e.avail_in=p,n.wrap=t,fr}ur.deflateInit=kf;ur.deflateInit2=Ba;ur.deflateReset=Da;ur.deflateResetKeep=Ra;ur.deflateSetHeader=Ef;ur.deflate=Sf;ur.deflateEnd=Af;ur.deflateSetDictionary=Tf;ur.deflateInfo="pako deflate (from Nodeca project)";var qr={},ys=wr,Fa=!0,ja=!0;try{String.fromCharCode.apply(null,[0])}catch{Fa=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{ja=!1}var Et=new ys.Buf8(256);for(var Er=0;Er<256;Er++)Et[Er]=Er>=252?6:Er>=248?5:Er>=240?4:Er>=224?3:Er>=192?2:1;Et[254]=Et[254]=1;qr.string2buf=function(e){var r,s,n,o,i,t=e.length,p=0;for(o=0;o<t;o++)s=e.charCodeAt(o),(s&64512)===55296&&o+1<t&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(s=65536+(s-55296<<10)+(n-56320),o++)),p+=s<128?1:s<2048?2:s<65536?3:4;for(r=new ys.Buf8(p),i=0,o=0;i<p;o++)s=e.charCodeAt(o),(s&64512)===55296&&o+1<t&&(n=e.charCodeAt(o+1),(n&64512)===56320&&(s=65536+(s-55296<<10)+(n-56320),o++)),s<128?r[i++]=s:s<2048?(r[i++]=192|s>>>6,r[i++]=128|s&63):s<65536?(r[i++]=224|s>>>12,r[i++]=128|s>>>6&63,r[i++]=128|s&63):(r[i++]=240|s>>>18,r[i++]=128|s>>>12&63,r[i++]=128|s>>>6&63,r[i++]=128|s&63);return r};function Na(e,r){if(r<65534&&(e.subarray&&ja||!e.subarray&&Fa))return String.fromCharCode.apply(null,ys.shrinkBuf(e,r));for(var s="",n=0;n<r;n++)s+=String.fromCharCode(e[n]);return s}qr.buf2binstring=function(e){return Na(e,e.length)};qr.binstring2buf=function(e){for(var r=new ys.Buf8(e.length),s=0,n=r.length;s<n;s++)r[s]=e.charCodeAt(s);return r};qr.buf2string=function(e,r){var s,n,o,i,t=r||e.length,p=new Array(t*2);for(n=0,s=0;s<t;){if(o=e[s++],o<128){p[n++]=o;continue}if(i=Et[o],i>4){p[n++]=65533,s+=i-1;continue}for(o&=i===2?31:i===3?15:7;i>1&&s<t;)o=o<<6|e[s++]&63,i--;if(i>1){p[n++]=65533;continue}o<65536?p[n++]=o:(o-=65536,p[n++]=55296|o>>10&1023,p[n++]=56320|o&1023)}return Na(p,n)};qr.utf8border=function(e,r){var s;for(r=r||e.length,r>e.length&&(r=e.length),s=r-1;s>=0&&(e[s]&192)===128;)s--;return s<0||s===0?r:s+Et[e[s]]>r?s:r};function Cf(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Wa=Cf,ht=ur,yt=wr,Qs=qr,Js=Pi,Of=Wa,Ua=Object.prototype.toString,xf=0,Ls=4,tt=0,Yi=1,Xi=2,Lf=-1,If=0,Hf=8;function jr(e){if(!(this instanceof jr))return new jr(e);this.options=yt.assign({level:Lf,method:Hf,chunkSize:16384,windowBits:15,memLevel:8,strategy:If,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Of,this.strm.avail_out=0;var s=ht.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(s!==tt)throw new Error(Js[s]);if(r.header&&ht.deflateSetHeader(this.strm,r.header),r.dictionary){var n;if(typeof r.dictionary=="string"?n=Qs.string2buf(r.dictionary):Ua.call(r.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(r.dictionary):n=r.dictionary,s=ht.deflateSetDictionary(this.strm,n),s!==tt)throw new Error(Js[s]);this._dict_set=!0}}jr.prototype.push=function(e,r){var s=this.strm,n=this.options.chunkSize,o,i;if(this.ended)return!1;i=r===~~r?r:r===!0?Ls:xf,typeof e=="string"?s.input=Qs.string2buf(e):Ua.call(e)==="[object ArrayBuffer]"?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new yt.Buf8(n),s.next_out=0,s.avail_out=n),o=ht.deflate(s,i),o!==Yi&&o!==tt)return this.onEnd(o),this.ended=!0,!1;(s.avail_out===0||s.avail_in===0&&(i===Ls||i===Xi))&&(this.options.to==="string"?this.onData(Qs.buf2binstring(yt.shrinkBuf(s.output,s.next_out))):this.onData(yt.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||s.avail_out===0)&&o!==Yi);return i===Ls?(o=ht.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===tt):(i===Xi&&(this.onEnd(tt),s.avail_out=0),!0)};jr.prototype.onData=function(e){this.chunks.push(e)};jr.prototype.onEnd=function(e){e===tt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=yt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ei(e,r){var s=new jr(r);if(s.push(e,!0),s.err)throw s.msg||Js[s.err];return s.result}function $f(e,r){return r=r||{},r.raw=!0,Ei(e,r)}function Rf(e,r){return r=r||{},r.gzip=!0,Ei(e,r)}Ct.Deflate=jr;Ct.deflate=Ei;Ct.deflateRaw=$f;Ct.gzip=Rf;var Lt={},rr={},Ft=30,Df=12,Bf=function(r,s){var n,o,i,t,p,y,u,d,g,b,w,H,P,N,j,q,$,W,O,A,B,x,T,k,S;n=r.state,o=r.next_in,k=r.input,i=o+(r.avail_in-5),t=r.next_out,S=r.output,p=t-(s-r.avail_out),y=t+(r.avail_out-257),u=n.dmax,d=n.wsize,g=n.whave,b=n.wnext,w=n.window,H=n.hold,P=n.bits,N=n.lencode,j=n.distcode,q=(1<<n.lenbits)-1,$=(1<<n.distbits)-1;e:do{P<15&&(H+=k[o++]<<P,P+=8,H+=k[o++]<<P,P+=8),W=N[H&q];r:for(;;){if(O=W>>>24,H>>>=O,P-=O,O=W>>>16&255,O===0)S[t++]=W&65535;else if(O&16){A=W&65535,O&=15,O&&(P<O&&(H+=k[o++]<<P,P+=8),A+=H&(1<<O)-1,H>>>=O,P-=O),P<15&&(H+=k[o++]<<P,P+=8,H+=k[o++]<<P,P+=8),W=j[H&$];t:for(;;){if(O=W>>>24,H>>>=O,P-=O,O=W>>>16&255,O&16){if(B=W&65535,O&=15,P<O&&(H+=k[o++]<<P,P+=8,P<O&&(H+=k[o++]<<P,P+=8)),B+=H&(1<<O)-1,B>u){r.msg="invalid distance too far back",n.mode=Ft;break e}if(H>>>=O,P-=O,O=t-p,B>O){if(O=B-O,O>g&&n.sane){r.msg="invalid distance too far back",n.mode=Ft;break e}if(x=0,T=w,b===0){if(x+=d-O,O<A){A-=O;do S[t++]=w[x++];while(--O);x=t-B,T=S}}else if(b<O){if(x+=d+b-O,O-=b,O<A){A-=O;do S[t++]=w[x++];while(--O);if(x=0,b<A){O=b,A-=O;do S[t++]=w[x++];while(--O);x=t-B,T=S}}}else if(x+=b-O,O<A){A-=O;do S[t++]=w[x++];while(--O);x=t-B,T=S}for(;A>2;)S[t++]=T[x++],S[t++]=T[x++],S[t++]=T[x++],A-=3;A&&(S[t++]=T[x++],A>1&&(S[t++]=T[x++]))}else{x=t-B;do S[t++]=S[x++],S[t++]=S[x++],S[t++]=S[x++],A-=3;while(A>2);A&&(S[t++]=S[x++],A>1&&(S[t++]=S[x++]))}}else if(O&64){r.msg="invalid distance code",n.mode=Ft;break e}else{W=j[(W&65535)+(H&(1<<O)-1)];continue t}break}}else if(O&64)if(O&32){n.mode=Df;break e}else{r.msg="invalid literal/length code",n.mode=Ft;break e}else{W=N[(W&65535)+(H&(1<<O)-1)];continue r}break}}while(o<i&&t<y);A=P>>3,o-=A,P-=A<<3,H&=(1<<P)-1,r.next_in=o,r.next_out=t,r.avail_in=o<i?5+(i-o):5-(o-i),r.avail_out=t<y?257+(y-t):257-(t-y),n.hold=H,n.bits=P},Qi=wr,Yr=15,Ji=852,en=592,rn=0,Is=1,tn=2,Ff=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],jf=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Nf=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Wf=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],Uf=function(r,s,n,o,i,t,p,y){var u=y.bits,d=0,g=0,b=0,w=0,H=0,P=0,N=0,j=0,q=0,$=0,W,O,A,B,x,T=null,k=0,S,F=new Qi.Buf16(Yr+1),D=new Qi.Buf16(Yr+1),I=null,V=0,z,K,Y;for(d=0;d<=Yr;d++)F[d]=0;for(g=0;g<o;g++)F[s[n+g]]++;for(H=u,w=Yr;w>=1&&F[w]===0;w--);if(H>w&&(H=w),w===0)return i[t++]=1<<24|64<<16|0,i[t++]=1<<24|64<<16|0,y.bits=1,0;for(b=1;b<w&&F[b]===0;b++);for(H<b&&(H=b),j=1,d=1;d<=Yr;d++)if(j<<=1,j-=F[d],j<0)return-1;if(j>0&&(r===rn||w!==1))return-1;for(D[1]=0,d=1;d<Yr;d++)D[d+1]=D[d]+F[d];for(g=0;g<o;g++)s[n+g]!==0&&(p[D[s[n+g]]++]=g);if(r===rn?(T=I=p,S=19):r===Is?(T=Ff,k-=257,I=jf,V-=257,S=256):(T=Nf,I=Wf,S=-1),$=0,g=0,d=b,x=t,P=H,N=0,A=-1,q=1<<H,B=q-1,r===Is&&q>Ji||r===tn&&q>en)return 1;for(;;){z=d-N,p[g]<S?(K=0,Y=p[g]):p[g]>S?(K=I[V+p[g]],Y=T[k+p[g]]):(K=32+64,Y=0),W=1<<d-N,O=1<<P,b=O;do O-=W,i[x+($>>N)+O]=z<<24|K<<16|Y|0;while(O!==0);for(W=1<<d-1;$&W;)W>>=1;if(W!==0?($&=W-1,$+=W):$=0,g++,--F[d]===0){if(d===w)break;d=s[n+p[g]]}if(d>H&&($&B)!==A){for(N===0&&(N=H),x+=b,P=d-N,j=1<<P;P+N<w&&(j-=F[P+N],!(j<=0));)P++,j<<=1;if(q+=1<<P,r===Is&&q>Ji||r===tn&&q>en)return 1;A=$&B,i[A]=H<<24|P<<16|x-t|0}}return $!==0&&(i[x+$]=d-N<<24|64<<16|0),y.bits=H,0},Ue=wr,ei=La,ar=Ia,qf=Bf,mt=Uf,Mf=0,qa=1,Ma=2,sn=4,Kf=5,jt=6,Nr=0,zf=1,Gf=2,Ze=-2,Ka=-3,za=-4,Zf=-5,nn=8,Ga=1,an=2,on=3,pn=4,fn=5,ln=6,un=7,cn=8,dn=9,hn=10,ts=11,hr=12,Hs=13,yn=14,$s=15,mn=16,_n=17,gn=18,wn=19,Nt=20,Wt=21,bn=22,vn=23,Pn=24,En=25,kn=26,Rs=27,Sn=28,An=29,we=30,Za=31,Vf=32,Yf=852,Xf=592,Qf=15,Jf=Qf;function Tn(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function el(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ue.Buf16(320),this.work=new Ue.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Va(e){var r;return!e||!e.state?Ze:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=Ga,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Ue.Buf32(Yf),r.distcode=r.distdyn=new Ue.Buf32(Xf),r.sane=1,r.back=-1,Nr)}function Ya(e){var r;return!e||!e.state?Ze:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,Va(e))}function Xa(e,r){var s,n;return!e||!e.state||(n=e.state,r<0?(s=0,r=-r):(s=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?Ze:(n.window!==null&&n.wbits!==r&&(n.window=null),n.wrap=s,n.wbits=r,Ya(e))}function Qa(e,r){var s,n;return e?(n=new el,e.state=n,n.window=null,s=Xa(e,r),s!==Nr&&(e.state=null),s):Ze}function rl(e){return Qa(e,Jf)}var Cn=!0,Ds,Bs;function tl(e){if(Cn){var r;for(Ds=new Ue.Buf32(512),Bs=new Ue.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(mt(qa,e.lens,0,288,Ds,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;mt(Ma,e.lens,0,32,Bs,0,e.work,{bits:5}),Cn=!1}e.lencode=Ds,e.lenbits=9,e.distcode=Bs,e.distbits=5}function Ja(e,r,s,n){var o,i=e.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Ue.Buf8(i.wsize)),n>=i.wsize?(Ue.arraySet(i.window,r,s-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>n&&(o=n),Ue.arraySet(i.window,r,s-n,o,i.wnext),n-=o,n?(Ue.arraySet(i.window,r,s-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}function sl(e,r){var s,n,o,i,t,p,y,u,d,g,b,w,H,P,N=0,j,q,$,W,O,A,B,x,T=new Ue.Buf8(4),k,S,F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ze;s=e.state,s.mode===hr&&(s.mode=Hs),t=e.next_out,o=e.output,y=e.avail_out,i=e.next_in,n=e.input,p=e.avail_in,u=s.hold,d=s.bits,g=p,b=y,x=Nr;e:for(;;)switch(s.mode){case Ga:if(s.wrap===0){s.mode=Hs;break}for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(s.wrap&2&&u===35615){s.check=0,T[0]=u&255,T[1]=u>>>8&255,s.check=ar(s.check,T,2,0),u=0,d=0,s.mode=an;break}if(s.flags=0,s.head&&(s.head.done=!1),!(s.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",s.mode=we;break}if((u&15)!==nn){e.msg="unknown compression method",s.mode=we;break}if(u>>>=4,d-=4,B=(u&15)+8,s.wbits===0)s.wbits=B;else if(B>s.wbits){e.msg="invalid window size",s.mode=we;break}s.dmax=1<<B,e.adler=s.check=1,s.mode=u&512?hn:hr,u=0,d=0;break;case an:for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(s.flags=u,(s.flags&255)!==nn){e.msg="unknown compression method",s.mode=we;break}if(s.flags&57344){e.msg="unknown header flags set",s.mode=we;break}s.head&&(s.head.text=u>>8&1),s.flags&512&&(T[0]=u&255,T[1]=u>>>8&255,s.check=ar(s.check,T,2,0)),u=0,d=0,s.mode=on;case on:for(;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.head&&(s.head.time=u),s.flags&512&&(T[0]=u&255,T[1]=u>>>8&255,T[2]=u>>>16&255,T[3]=u>>>24&255,s.check=ar(s.check,T,4,0)),u=0,d=0,s.mode=pn;case pn:for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.head&&(s.head.xflags=u&255,s.head.os=u>>8),s.flags&512&&(T[0]=u&255,T[1]=u>>>8&255,s.check=ar(s.check,T,2,0)),u=0,d=0,s.mode=fn;case fn:if(s.flags&1024){for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.length=u,s.head&&(s.head.extra_len=u),s.flags&512&&(T[0]=u&255,T[1]=u>>>8&255,s.check=ar(s.check,T,2,0)),u=0,d=0}else s.head&&(s.head.extra=null);s.mode=ln;case ln:if(s.flags&1024&&(w=s.length,w>p&&(w=p),w&&(s.head&&(B=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Array(s.head.extra_len)),Ue.arraySet(s.head.extra,n,i,w,B)),s.flags&512&&(s.check=ar(s.check,n,w,i)),p-=w,i+=w,s.length-=w),s.length))break e;s.length=0,s.mode=un;case un:if(s.flags&2048){if(p===0)break e;w=0;do B=n[i+w++],s.head&&B&&s.length<65536&&(s.head.name+=String.fromCharCode(B));while(B&&w<p);if(s.flags&512&&(s.check=ar(s.check,n,w,i)),p-=w,i+=w,B)break e}else s.head&&(s.head.name=null);s.length=0,s.mode=cn;case cn:if(s.flags&4096){if(p===0)break e;w=0;do B=n[i+w++],s.head&&B&&s.length<65536&&(s.head.comment+=String.fromCharCode(B));while(B&&w<p);if(s.flags&512&&(s.check=ar(s.check,n,w,i)),p-=w,i+=w,B)break e}else s.head&&(s.head.comment=null);s.mode=dn;case dn:if(s.flags&512){for(;d<16;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(u!==(s.check&65535)){e.msg="header crc mismatch",s.mode=we;break}u=0,d=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),e.adler=s.check=0,s.mode=hr;break;case hn:for(;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}e.adler=s.check=Tn(u),u=0,d=0,s.mode=ts;case ts:if(s.havedict===0)return e.next_out=t,e.avail_out=y,e.next_in=i,e.avail_in=p,s.hold=u,s.bits=d,Gf;e.adler=s.check=1,s.mode=hr;case hr:if(r===Kf||r===jt)break e;case Hs:if(s.last){u>>>=d&7,d-=d&7,s.mode=Rs;break}for(;d<3;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}switch(s.last=u&1,u>>>=1,d-=1,u&3){case 0:s.mode=yn;break;case 1:if(tl(s),s.mode=Nt,r===jt){u>>>=2,d-=2;break e}break;case 2:s.mode=_n;break;case 3:e.msg="invalid block type",s.mode=we}u>>>=2,d-=2;break;case yn:for(u>>>=d&7,d-=d&7;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",s.mode=we;break}if(s.length=u&65535,u=0,d=0,s.mode=$s,r===jt)break e;case $s:s.mode=mn;case mn:if(w=s.length,w){if(w>p&&(w=p),w>y&&(w=y),w===0)break e;Ue.arraySet(o,n,i,w,t),p-=w,i+=w,y-=w,t+=w,s.length-=w;break}s.mode=hr;break;case _n:for(;d<14;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(s.nlen=(u&31)+257,u>>>=5,d-=5,s.ndist=(u&31)+1,u>>>=5,d-=5,s.ncode=(u&15)+4,u>>>=4,d-=4,s.nlen>286||s.ndist>30){e.msg="too many length or distance symbols",s.mode=we;break}s.have=0,s.mode=gn;case gn:for(;s.have<s.ncode;){for(;d<3;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.lens[F[s.have++]]=u&7,u>>>=3,d-=3}for(;s.have<19;)s.lens[F[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,k={bits:s.lenbits},x=mt(Mf,s.lens,0,19,s.lencode,0,s.work,k),s.lenbits=k.bits,x){e.msg="invalid code lengths set",s.mode=we;break}s.have=0,s.mode=wn;case wn:for(;s.have<s.nlen+s.ndist;){for(;N=s.lencode[u&(1<<s.lenbits)-1],j=N>>>24,q=N>>>16&255,$=N&65535,!(j<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if($<16)u>>>=j,d-=j,s.lens[s.have++]=$;else{if($===16){for(S=j+2;d<S;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(u>>>=j,d-=j,s.have===0){e.msg="invalid bit length repeat",s.mode=we;break}B=s.lens[s.have-1],w=3+(u&3),u>>>=2,d-=2}else if($===17){for(S=j+3;d<S;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=j,d-=j,B=0,w=3+(u&7),u>>>=3,d-=3}else{for(S=j+7;d<S;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=j,d-=j,B=0,w=11+(u&127),u>>>=7,d-=7}if(s.have+w>s.nlen+s.ndist){e.msg="invalid bit length repeat",s.mode=we;break}for(;w--;)s.lens[s.have++]=B}}if(s.mode===we)break;if(s.lens[256]===0){e.msg="invalid code -- missing end-of-block",s.mode=we;break}if(s.lenbits=9,k={bits:s.lenbits},x=mt(qa,s.lens,0,s.nlen,s.lencode,0,s.work,k),s.lenbits=k.bits,x){e.msg="invalid literal/lengths set",s.mode=we;break}if(s.distbits=6,s.distcode=s.distdyn,k={bits:s.distbits},x=mt(Ma,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,k),s.distbits=k.bits,x){e.msg="invalid distances set",s.mode=we;break}if(s.mode=Nt,r===jt)break e;case Nt:s.mode=Wt;case Wt:if(p>=6&&y>=258){e.next_out=t,e.avail_out=y,e.next_in=i,e.avail_in=p,s.hold=u,s.bits=d,qf(e,b),t=e.next_out,o=e.output,y=e.avail_out,i=e.next_in,n=e.input,p=e.avail_in,u=s.hold,d=s.bits,s.mode===hr&&(s.back=-1);break}for(s.back=0;N=s.lencode[u&(1<<s.lenbits)-1],j=N>>>24,q=N>>>16&255,$=N&65535,!(j<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(q&&!(q&240)){for(W=j,O=q,A=$;N=s.lencode[A+((u&(1<<W+O)-1)>>W)],j=N>>>24,q=N>>>16&255,$=N&65535,!(W+j<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=W,d-=W,s.back+=W}if(u>>>=j,d-=j,s.back+=j,s.length=$,q===0){s.mode=kn;break}if(q&32){s.back=-1,s.mode=hr;break}if(q&64){e.msg="invalid literal/length code",s.mode=we;break}s.extra=q&15,s.mode=bn;case bn:if(s.extra){for(S=s.extra;d<S;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.length+=u&(1<<s.extra)-1,u>>>=s.extra,d-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=vn;case vn:for(;N=s.distcode[u&(1<<s.distbits)-1],j=N>>>24,q=N>>>16&255,$=N&65535,!(j<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(!(q&240)){for(W=j,O=q,A=$;N=s.distcode[A+((u&(1<<W+O)-1)>>W)],j=N>>>24,q=N>>>16&255,$=N&65535,!(W+j<=d);){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}u>>>=W,d-=W,s.back+=W}if(u>>>=j,d-=j,s.back+=j,q&64){e.msg="invalid distance code",s.mode=we;break}s.offset=$,s.extra=q&15,s.mode=Pn;case Pn:if(s.extra){for(S=s.extra;d<S;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}s.offset+=u&(1<<s.extra)-1,u>>>=s.extra,d-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){e.msg="invalid distance too far back",s.mode=we;break}s.mode=En;case En:if(y===0)break e;if(w=b-y,s.offset>w){if(w=s.offset-w,w>s.whave&&s.sane){e.msg="invalid distance too far back",s.mode=we;break}w>s.wnext?(w-=s.wnext,H=s.wsize-w):H=s.wnext-w,w>s.length&&(w=s.length),P=s.window}else P=o,H=t-s.offset,w=s.length;w>y&&(w=y),y-=w,s.length-=w;do o[t++]=P[H++];while(--w);s.length===0&&(s.mode=Wt);break;case kn:if(y===0)break e;o[t++]=s.length,y--,s.mode=Wt;break;case Rs:if(s.wrap){for(;d<32;){if(p===0)break e;p--,u|=n[i++]<<d,d+=8}if(b-=y,e.total_out+=b,s.total+=b,b&&(e.adler=s.check=s.flags?ar(s.check,o,b,t-b):ei(s.check,o,b,t-b)),b=y,(s.flags?u:Tn(u))!==s.check){e.msg="incorrect data check",s.mode=we;break}u=0,d=0}s.mode=Sn;case Sn:if(s.wrap&&s.flags){for(;d<32;){if(p===0)break e;p--,u+=n[i++]<<d,d+=8}if(u!==(s.total&4294967295)){e.msg="incorrect length check",s.mode=we;break}u=0,d=0}s.mode=An;case An:x=zf;break e;case we:x=Ka;break e;case Za:return za;case Vf:default:return Ze}return e.next_out=t,e.avail_out=y,e.next_in=i,e.avail_in=p,s.hold=u,s.bits=d,(s.wsize||b!==e.avail_out&&s.mode<we&&(s.mode<Rs||r!==sn))&&Ja(e,e.output,e.next_out,b-e.avail_out),g-=e.avail_in,b-=e.avail_out,e.total_in+=g,e.total_out+=b,s.total+=b,s.wrap&&b&&(e.adler=s.check=s.flags?ar(s.check,o,b,e.next_out-b):ei(s.check,o,b,e.next_out-b)),e.data_type=s.bits+(s.last?64:0)+(s.mode===hr?128:0)+(s.mode===Nt||s.mode===$s?256:0),(g===0&&b===0||r===sn)&&x===Nr&&(x=Zf),x}function il(e){if(!e||!e.state)return Ze;var r=e.state;return r.window&&(r.window=null),e.state=null,Nr}function nl(e,r){var s;return!e||!e.state||(s=e.state,!(s.wrap&2))?Ze:(s.head=r,r.done=!1,Nr)}function al(e,r){var s=r.length,n,o,i;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==ts)?Ze:n.mode===ts&&(o=1,o=ei(o,r,s,0),o!==n.check)?Ka:(i=Ja(e,r,s,s),i?(n.mode=Za,za):(n.havedict=1,Nr))}rr.inflateReset=Ya;rr.inflateReset2=Xa;rr.inflateResetKeep=Va;rr.inflateInit=rl;rr.inflateInit2=Qa;rr.inflate=sl;rr.inflateEnd=il;rr.inflateGetHeader=nl;rr.inflateSetDictionary=al;rr.inflateInfo="pako inflate (from Nodeca project)";var eo={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function ol(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var pl=ol,st=rr,_t=wr,Zt=qr,Ee=eo,ri=Pi,fl=Wa,ll=pl,ro=Object.prototype.toString;function Wr(e){if(!(this instanceof Wr))return new Wr(e);this.options=_t.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new fl,this.strm.avail_out=0;var s=st.inflateInit2(this.strm,r.windowBits);if(s!==Ee.Z_OK)throw new Error(ri[s]);if(this.header=new ll,st.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Zt.string2buf(r.dictionary):ro.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(s=st.inflateSetDictionary(this.strm,r.dictionary),s!==Ee.Z_OK)))throw new Error(ri[s])}Wr.prototype.push=function(e,r){var s=this.strm,n=this.options.chunkSize,o=this.options.dictionary,i,t,p,y,u,d=!1;if(this.ended)return!1;t=r===~~r?r:r===!0?Ee.Z_FINISH:Ee.Z_NO_FLUSH,typeof e=="string"?s.input=Zt.binstring2buf(e):ro.call(e)==="[object ArrayBuffer]"?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new _t.Buf8(n),s.next_out=0,s.avail_out=n),i=st.inflate(s,Ee.Z_NO_FLUSH),i===Ee.Z_NEED_DICT&&o&&(i=st.inflateSetDictionary(this.strm,o)),i===Ee.Z_BUF_ERROR&&d===!0&&(i=Ee.Z_OK,d=!1),i!==Ee.Z_STREAM_END&&i!==Ee.Z_OK)return this.onEnd(i),this.ended=!0,!1;s.next_out&&(s.avail_out===0||i===Ee.Z_STREAM_END||s.avail_in===0&&(t===Ee.Z_FINISH||t===Ee.Z_SYNC_FLUSH))&&(this.options.to==="string"?(p=Zt.utf8border(s.output,s.next_out),y=s.next_out-p,u=Zt.buf2string(s.output,p),s.next_out=y,s.avail_out=n-y,y&&_t.arraySet(s.output,s.output,p,y,0),this.onData(u)):this.onData(_t.shrinkBuf(s.output,s.next_out))),s.avail_in===0&&s.avail_out===0&&(d=!0)}while((s.avail_in>0||s.avail_out===0)&&i!==Ee.Z_STREAM_END);return i===Ee.Z_STREAM_END&&(t=Ee.Z_FINISH),t===Ee.Z_FINISH?(i=st.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Ee.Z_OK):(t===Ee.Z_SYNC_FLUSH&&(this.onEnd(Ee.Z_OK),s.avail_out=0),!0)};Wr.prototype.onData=function(e){this.chunks.push(e)};Wr.prototype.onEnd=function(e){e===Ee.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=_t.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ki(e,r){var s=new Wr(r);if(s.push(e,!0),s.err)throw s.msg||ri[s.err];return s.result}function ul(e,r){return r=r||{},r.raw=!0,ki(e,r)}Lt.Inflate=Wr;Lt.inflate=ki;Lt.inflateRaw=ul;Lt.ungzip=ki;var cl=wr.assign,dl=Ct,hl=Lt,yl=eo,to={};cl(to,dl,hl,yl);var ml=to;const so=hi(ml);async function _l(e,r){const s=new ca(e);let n=await s.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new be(`Invalid PACK header '${n}'`);let o=await s.read(4);if(o=o.readUInt32BE(0),o!==2)throw new be(`Invalid packfile version: ${o}`);let i=await s.read(4);if(i=i.readUInt32BE(0),!(i<1))for(;!s.eof()&&i--;){const t=s.tell(),{type:p,length:y,ofs:u,reference:d}=await gl(s),g=new so.Inflate;for(;!g.result;){const b=await s.chunk();if(!b)break;if(g.push(b,!1),g.err)throw new be(`Pako error: ${g.msg}`);if(g.result){if(g.result.length!==y)throw new be("Inflated object size is different from that stated in packfile.");await s.undo(),await s.read(b.length-g.strm.avail_in);const w=s.tell();await r({data:g.result,type:p,num:i,offset:t,end:w,reference:d,ofs:u})}}}}async function gl(e){let r=await e.byte();const s=r>>4&7;let n=r&15;if(r&128){let t=4;do r=await e.byte(),n|=(r&127)<<t,t+=7;while(r&128)}let o,i;if(s===6){let t=0;o=0;const p=[];do r=await e.byte(),o|=(r&127)<<t,t+=7,p.push(r);while(r&128);i=Buffer.from(p)}return s===7&&(i=await e.read(20)),{type:s,length:n,ofs:o,reference:i}}let wl=!1;async function bl(e){return wl?vl(e):so.inflate(e)}async function vl(e){const r=new DecompressionStream("deflate"),s=new Blob([e]).stream().pipeThrough(r);return new Uint8Array(await new Response(s).arrayBuffer())}var ti={exports:{}};typeof Object.create=="function"?ti.exports=function(r,s){s&&(r.super_=s,r.prototype=Object.create(s.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:ti.exports=function(r,s){if(s){r.super_=s;var n=function(){};n.prototype=s.prototype,r.prototype=new n,r.prototype.constructor=r}};var Pl=ti.exports,si={exports:{}},gr={},ms={};ms.byteLength=Sl;ms.toByteArray=Tl;ms.fromByteArray=xl;var lr=[],Ke=[],El=typeof Uint8Array<"u"?Uint8Array:Array,Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Xr=0,kl=Fs.length;Xr<kl;++Xr)lr[Xr]=Fs[Xr],Ke[Fs.charCodeAt(Xr)]=Xr;Ke["-".charCodeAt(0)]=62;Ke["_".charCodeAt(0)]=63;function io(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var s=e.indexOf("=");s===-1&&(s=r);var n=s===r?0:4-s%4;return[s,n]}function Sl(e){var r=io(e),s=r[0],n=r[1];return(s+n)*3/4-n}function Al(e,r,s){return(r+s)*3/4-s}function Tl(e){var r,s=io(e),n=s[0],o=s[1],i=new El(Al(e,n,o)),t=0,p=o>0?n-4:n,y;for(y=0;y<p;y+=4)r=Ke[e.charCodeAt(y)]<<18|Ke[e.charCodeAt(y+1)]<<12|Ke[e.charCodeAt(y+2)]<<6|Ke[e.charCodeAt(y+3)],i[t++]=r>>16&255,i[t++]=r>>8&255,i[t++]=r&255;return o===2&&(r=Ke[e.charCodeAt(y)]<<2|Ke[e.charCodeAt(y+1)]>>4,i[t++]=r&255),o===1&&(r=Ke[e.charCodeAt(y)]<<10|Ke[e.charCodeAt(y+1)]<<4|Ke[e.charCodeAt(y+2)]>>2,i[t++]=r>>8&255,i[t++]=r&255),i}function Cl(e){return lr[e>>18&63]+lr[e>>12&63]+lr[e>>6&63]+lr[e&63]}function Ol(e,r,s){for(var n,o=[],i=r;i<s;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),o.push(Cl(n));return o.join("")}function xl(e){for(var r,s=e.length,n=s%3,o=[],i=16383,t=0,p=s-n;t<p;t+=i)o.push(Ol(e,t,t+i>p?p:t+i));return n===1?(r=e[s-1],o.push(lr[r>>2]+lr[r<<4&63]+"==")):n===2&&(r=(e[s-2]<<8)+e[s-1],o.push(lr[r>>10]+lr[r>>4&63]+lr[r<<2&63]+"=")),o.join("")}var Si={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Si.read=function(e,r,s,n,o){var i,t,p=o*8-n-1,y=(1<<p)-1,u=y>>1,d=-7,g=s?o-1:0,b=s?-1:1,w=e[r+g];for(g+=b,i=w&(1<<-d)-1,w>>=-d,d+=p;d>0;i=i*256+e[r+g],g+=b,d-=8);for(t=i&(1<<-d)-1,i>>=-d,d+=n;d>0;t=t*256+e[r+g],g+=b,d-=8);if(i===0)i=1-u;else{if(i===y)return t?NaN:(w?-1:1)*(1/0);t=t+Math.pow(2,n),i=i-u}return(w?-1:1)*t*Math.pow(2,i-n)};Si.write=function(e,r,s,n,o,i){var t,p,y,u=i*8-o-1,d=(1<<u)-1,g=d>>1,b=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:i-1,H=n?1:-1,P=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,t=d):(t=Math.floor(Math.log(r)/Math.LN2),r*(y=Math.pow(2,-t))<1&&(t--,y*=2),t+g>=1?r+=b/y:r+=b*Math.pow(2,1-g),r*y>=2&&(t++,y/=2),t+g>=d?(p=0,t=d):t+g>=1?(p=(r*y-1)*Math.pow(2,o),t=t+g):(p=r*Math.pow(2,g-1)*Math.pow(2,o),t=0));o>=8;e[s+w]=p&255,w+=H,p/=256,o-=8);for(t=t<<o|p,u+=o;u>0;e[s+w]=t&255,w+=H,t/=256,u-=8);e[s+w-H]|=P*128};/*!
708
704
  * The buffer module from node.js, for the browser.
709
705
  *
710
706
  * @author Feross Aboukhadijeh <https://feross.org>
711
707
  * @license MIT
712
- */(function(e){const r=ys,s=Ei,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=p,e.SlowBuffer=M,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,p.TYPED_ARRAY_SUPPORT=i(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const c=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(c,f),c.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function t(c){if(c>o)throw new RangeError('The value "'+c+'" is invalid for option "size"');const f=new Uint8Array(c);return Object.setPrototypeOf(f,p.prototype),f}function p(c,f,l){if(typeof c=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(c)}return y(c,f,l)}p.poolSize=8192;function y(c,f,l){if(typeof c=="string")return _(c,f);if(ArrayBuffer.isView(c))return B(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(Be(c,ArrayBuffer)||c&&Be(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Be(c,SharedArrayBuffer)||c&&Be(c.buffer,SharedArrayBuffer)))return P(c,f,l);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=c.valueOf&&c.valueOf();if(g!=null&&g!==c)return p.from(g,f,l);const v=q(c);if(v)return v;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return p.from(c[Symbol.toPrimitive]("string"),f,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}p.from=function(c,f,l){return y(c,f,l)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function u(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function d(c,f,l){return u(c),c<=0?t(c):f!==void 0?typeof l=="string"?t(c).fill(f,l):t(c).fill(f):t(c)}p.alloc=function(c,f,l){return d(c,f,l)};function w(c){return u(c),t(c<0?0:D(c)|0)}p.allocUnsafe=function(c){return w(c)},p.allocUnsafeSlow=function(c){return w(c)};function _(c,f){if((typeof f!="string"||f==="")&&(f="utf8"),!p.isEncoding(f))throw new TypeError("Unknown encoding: "+f);const l=I(c,f)|0;let g=t(l);const v=g.write(c,f);return v!==l&&(g=g.slice(0,v)),g}function b(c){const f=c.length<0?0:D(c.length)|0,l=t(f);for(let g=0;g<f;g+=1)l[g]=c[g]&255;return l}function B(c){if(Be(c,Uint8Array)){const f=new Uint8Array(c);return P(f.buffer,f.byteOffset,f.byteLength)}return b(c)}function P(c,f,l){if(f<0||c.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<f+(l||0))throw new RangeError('"length" is outside of buffer bounds');let g;return f===void 0&&l===void 0?g=new Uint8Array(c):l===void 0?g=new Uint8Array(c,f):g=new Uint8Array(c,f,l),Object.setPrototypeOf(g,p.prototype),g}function q(c){if(p.isBuffer(c)){const f=D(c.length)|0,l=t(f);return l.length===0||c.copy(l,0,0,f),l}if(c.length!==void 0)return typeof c.length!="number"||Ae(c.length)?t(0):b(c);if(c.type==="Buffer"&&Array.isArray(c.data))return b(c.data)}function D(c){if(c>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return c|0}function M(c){return+c!=c&&(c=0),p.alloc(+c)}p.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==p.prototype},p.compare=function(f,l){if(Be(f,Uint8Array)&&(f=p.from(f,f.offset,f.byteLength)),Be(l,Uint8Array)&&(l=p.from(l,l.offset,l.byteLength)),!p.isBuffer(f)||!p.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===l)return 0;let g=f.length,v=l.length;for(let $=0,j=Math.min(g,v);$<j;++$)if(f[$]!==l[$]){g=f[$],v=l[$];break}return g<v?-1:v<g?1:0},p.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(f,l){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return p.alloc(0);let g;if(l===void 0)for(l=0,g=0;g<f.length;++g)l+=f[g].length;const v=p.allocUnsafe(l);let $=0;for(g=0;g<f.length;++g){let j=f[g];if(Be(j,Uint8Array))$+j.length>v.length?(p.isBuffer(j)||(j=p.from(j)),j.copy(v,$)):Uint8Array.prototype.set.call(v,j,$);else if(p.isBuffer(j))j.copy(v,$);else throw new TypeError('"list" argument must be an Array of Buffers');$+=j.length}return v};function I(c,f){if(p.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||Be(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);const l=c.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&l===0)return 0;let v=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return vr(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return Ar(c).length;default:if(v)return g?-1:vr(c).length;f=(""+f).toLowerCase(),v=!0}}p.byteLength=I;function U(c,f,l){let g=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,f>>>=0,l<=f))return"";for(c||(c="utf8");;)switch(c){case"hex":return V(this,f,l);case"utf8":case"utf-8":return F(this,f,l);case"ascii":return H(this,f,l);case"latin1":case"binary":return K(this,f,l);case"base64":return L(this,f,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,f,l);default:if(g)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),g=!0}}p.prototype._isBuffer=!0;function A(c,f,l){const g=c[f];c[f]=c[l],c[l]=g}p.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let l=0;l<f;l+=2)A(this,l,l+1);return this},p.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let l=0;l<f;l+=4)A(this,l,l+3),A(this,l+1,l+2);return this},p.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let l=0;l<f;l+=8)A(this,l,l+7),A(this,l+1,l+6),A(this,l+2,l+5),A(this,l+3,l+4);return this},p.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?F(this,0,f):U.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(f){if(!p.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:p.compare(this,f)===0},p.prototype.inspect=function(){let f="";const l=e.INSPECT_MAX_BYTES;return f=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(f+=" ... "),"<Buffer "+f+">"},n&&(p.prototype[n]=p.prototype.inspect),p.prototype.compare=function(f,l,g,v,$){if(Be(f,Uint8Array)&&(f=p.from(f,f.offset,f.byteLength)),!p.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(l===void 0&&(l=0),g===void 0&&(g=f?f.length:0),v===void 0&&(v=0),$===void 0&&($=this.length),l<0||g>f.length||v<0||$>this.length)throw new RangeError("out of range index");if(v>=$&&l>=g)return 0;if(v>=$)return-1;if(l>=g)return 1;if(l>>>=0,g>>>=0,v>>>=0,$>>>=0,this===f)return 0;let j=$-v,J=g-l;const ye=Math.min(j,J),de=this.slice(v,$),he=f.slice(l,g);for(let ae=0;ae<ye;++ae)if(de[ae]!==he[ae]){j=de[ae],J=he[ae];break}return j<J?-1:J<j?1:0};function x(c,f,l,g,v){if(c.length===0)return-1;if(typeof l=="string"?(g=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,Ae(l)&&(l=v?0:c.length-1),l<0&&(l=c.length+l),l>=c.length){if(v)return-1;l=c.length-1}else if(l<0)if(v)l=0;else return-1;if(typeof f=="string"&&(f=p.from(f,g)),p.isBuffer(f))return f.length===0?-1:N(c,f,l,g,v);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?v?Uint8Array.prototype.indexOf.call(c,f,l):Uint8Array.prototype.lastIndexOf.call(c,f,l):N(c,[f],l,g,v);throw new TypeError("val must be string, number or Buffer")}function N(c,f,l,g,v){let $=1,j=c.length,J=f.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(c.length<2||f.length<2)return-1;$=2,j/=2,J/=2,l/=2}function ye(he,ae){return $===1?he[ae]:he.readUInt16BE(ae*$)}let de;if(v){let he=-1;for(de=l;de<j;de++)if(ye(c,de)===ye(f,he===-1?0:de-he)){if(he===-1&&(he=de),de-he+1===J)return he*$}else he!==-1&&(de-=de-he),he=-1}else for(l+J>j&&(l=j-J),de=l;de>=0;de--){let he=!0;for(let ae=0;ae<J;ae++)if(ye(c,de+ae)!==ye(f,ae)){he=!1;break}if(he)return de}return-1}p.prototype.includes=function(f,l,g){return this.indexOf(f,l,g)!==-1},p.prototype.indexOf=function(f,l,g){return x(this,f,l,g,!0)},p.prototype.lastIndexOf=function(f,l,g){return x(this,f,l,g,!1)};function S(c,f,l,g){l=Number(l)||0;const v=c.length-l;g?(g=Number(g),g>v&&(g=v)):g=v;const $=f.length;g>$/2&&(g=$/2);let j;for(j=0;j<g;++j){const J=parseInt(f.substr(j*2,2),16);if(Ae(J))return j;c[l+j]=J}return j}function T(c,f,l,g){return Me(vr(f,c.length-l),c,l,g)}function E(c,f,l,g){return Me(Hr(f),c,l,g)}function O(c,f,l,g){return Me(Ar(f),c,l,g)}function C(c,f,l,g){return Me(dr(f,c.length-l),c,l,g)}p.prototype.write=function(f,l,g,v){if(l===void 0)v="utf8",g=this.length,l=0;else if(g===void 0&&typeof l=="string")v=l,g=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(g)?(g=g>>>0,v===void 0&&(v="utf8")):(v=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const $=this.length-l;if((g===void 0||g>$)&&(g=$),f.length>0&&(g<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let j=!1;for(;;)switch(v){case"hex":return S(this,f,l,g);case"utf8":case"utf-8":return T(this,f,l,g);case"ascii":case"latin1":case"binary":return E(this,f,l,g);case"base64":return O(this,f,l,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,f,l,g);default:if(j)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),j=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function L(c,f,l){return f===0&&l===c.length?r.fromByteArray(c):r.fromByteArray(c.slice(f,l))}function F(c,f,l){l=Math.min(c.length,l);const g=[];let v=f;for(;v<l;){const $=c[v];let j=null,J=$>239?4:$>223?3:$>191?2:1;if(v+J<=l){let ye,de,he,ae;switch(J){case 1:$<128&&(j=$);break;case 2:ye=c[v+1],(ye&192)===128&&(ae=($&31)<<6|ye&63,ae>127&&(j=ae));break;case 3:ye=c[v+1],de=c[v+2],(ye&192)===128&&(de&192)===128&&(ae=($&15)<<12|(ye&63)<<6|de&63,ae>2047&&(ae<55296||ae>57343)&&(j=ae));break;case 4:ye=c[v+1],de=c[v+2],he=c[v+3],(ye&192)===128&&(de&192)===128&&(he&192)===128&&(ae=($&15)<<18|(ye&63)<<12|(de&63)<<6|he&63,ae>65535&&ae<1114112&&(j=ae))}}j===null?(j=65533,J=1):j>65535&&(j-=65536,g.push(j>>>10&1023|55296),j=56320|j&1023),g.push(j),v+=J}return Z(g)}const Y=4096;function Z(c){const f=c.length;if(f<=Y)return String.fromCharCode.apply(String,c);let l="",g=0;for(;g<f;)l+=String.fromCharCode.apply(String,c.slice(g,g+=Y));return l}function H(c,f,l){let g="";l=Math.min(c.length,l);for(let v=f;v<l;++v)g+=String.fromCharCode(c[v]&127);return g}function K(c,f,l){let g="";l=Math.min(c.length,l);for(let v=f;v<l;++v)g+=String.fromCharCode(c[v]);return g}function V(c,f,l){const g=c.length;(!f||f<0)&&(f=0),(!l||l<0||l>g)&&(l=g);let v="";for(let $=f;$<l;++$)v+=Zr[c[$]];return v}function se(c,f,l){const g=c.slice(f,l);let v="";for(let $=0;$<g.length-1;$+=2)v+=String.fromCharCode(g[$]+g[$+1]*256);return v}p.prototype.slice=function(f,l){const g=this.length;f=~~f,l=l===void 0?g:~~l,f<0?(f+=g,f<0&&(f=0)):f>g&&(f=g),l<0?(l+=g,l<0&&(l=0)):l>g&&(l=g),l<f&&(l=f);const v=this.subarray(f,l);return Object.setPrototypeOf(v,p.prototype),v};function ee(c,f,l){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+f>l)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(f,l,g){f=f>>>0,l=l>>>0,g||ee(f,l,this.length);let v=this[f],$=1,j=0;for(;++j<l&&($*=256);)v+=this[f+j]*$;return v},p.prototype.readUintBE=p.prototype.readUIntBE=function(f,l,g){f=f>>>0,l=l>>>0,g||ee(f,l,this.length);let v=this[f+--l],$=1;for(;l>0&&($*=256);)v+=this[f+--l]*$;return v},p.prototype.readUint8=p.prototype.readUInt8=function(f,l){return f=f>>>0,l||ee(f,1,this.length),this[f]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(f,l){return f=f>>>0,l||ee(f,2,this.length),this[f]|this[f+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(f,l){return f=f>>>0,l||ee(f,2,this.length),this[f]<<8|this[f+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},p.prototype.readBigUInt64LE=Ee(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],g=this[f+7];(l===void 0||g===void 0)&&Ce(f,this.length-8);const v=l+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,$=this[++f]+this[++f]*2**8+this[++f]*2**16+g*2**24;return BigInt(v)+(BigInt($)<<BigInt(32))}),p.prototype.readBigUInt64BE=Ee(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],g=this[f+7];(l===void 0||g===void 0)&&Ce(f,this.length-8);const v=l*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],$=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+g;return(BigInt(v)<<BigInt(32))+BigInt($)}),p.prototype.readIntLE=function(f,l,g){f=f>>>0,l=l>>>0,g||ee(f,l,this.length);let v=this[f],$=1,j=0;for(;++j<l&&($*=256);)v+=this[f+j]*$;return $*=128,v>=$&&(v-=Math.pow(2,8*l)),v},p.prototype.readIntBE=function(f,l,g){f=f>>>0,l=l>>>0,g||ee(f,l,this.length);let v=l,$=1,j=this[f+--v];for(;v>0&&($*=256);)j+=this[f+--v]*$;return $*=128,j>=$&&(j-=Math.pow(2,8*l)),j},p.prototype.readInt8=function(f,l){return f=f>>>0,l||ee(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},p.prototype.readInt16LE=function(f,l){f=f>>>0,l||ee(f,2,this.length);const g=this[f]|this[f+1]<<8;return g&32768?g|4294901760:g},p.prototype.readInt16BE=function(f,l){f=f>>>0,l||ee(f,2,this.length);const g=this[f+1]|this[f]<<8;return g&32768?g|4294901760:g},p.prototype.readInt32LE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},p.prototype.readInt32BE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},p.prototype.readBigInt64LE=Ee(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],g=this[f+7];(l===void 0||g===void 0)&&Ce(f,this.length-8);const v=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(g<<24);return(BigInt(v)<<BigInt(32))+BigInt(l+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),p.prototype.readBigInt64BE=Ee(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],g=this[f+7];(l===void 0||g===void 0)&&Ce(f,this.length-8);const v=(l<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(v)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+g)}),p.prototype.readFloatLE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),s.read(this,f,!0,23,4)},p.prototype.readFloatBE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),s.read(this,f,!1,23,4)},p.prototype.readDoubleLE=function(f,l){return f=f>>>0,l||ee(f,8,this.length),s.read(this,f,!0,52,8)},p.prototype.readDoubleBE=function(f,l){return f=f>>>0,l||ee(f,8,this.length),s.read(this,f,!1,52,8)};function X(c,f,l,g,v,$){if(!p.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>v||f<$)throw new RangeError('"value" argument is out of bounds');if(l+g>c.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(f,l,g,v){if(f=+f,l=l>>>0,g=g>>>0,!v){const J=Math.pow(2,8*g)-1;X(this,f,l,g,J,0)}let $=1,j=0;for(this[l]=f&255;++j<g&&($*=256);)this[l+j]=f/$&255;return l+g},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(f,l,g,v){if(f=+f,l=l>>>0,g=g>>>0,!v){const J=Math.pow(2,8*g)-1;X(this,f,l,g,J,0)}let $=g-1,j=1;for(this[l+$]=f&255;--$>=0&&(j*=256);)this[l+$]=f/j&255;return l+g},p.prototype.writeUint8=p.prototype.writeUInt8=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,1,255,0),this[l]=f&255,l+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,2,65535,0),this[l]=f&255,this[l+1]=f>>>8,l+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,2,65535,0),this[l]=f>>>8,this[l+1]=f&255,l+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,4,4294967295,0),this[l+3]=f>>>24,this[l+2]=f>>>16,this[l+1]=f>>>8,this[l]=f&255,l+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,4,4294967295,0),this[l]=f>>>24,this[l+1]=f>>>16,this[l+2]=f>>>8,this[l+3]=f&255,l+4};function Q(c,f,l,g,v){sr(f,g,v,c,l,7);let $=Number(f&BigInt(4294967295));c[l++]=$,$=$>>8,c[l++]=$,$=$>>8,c[l++]=$,$=$>>8,c[l++]=$;let j=Number(f>>BigInt(32)&BigInt(4294967295));return c[l++]=j,j=j>>8,c[l++]=j,j=j>>8,c[l++]=j,j=j>>8,c[l++]=j,l}function re(c,f,l,g,v){sr(f,g,v,c,l,7);let $=Number(f&BigInt(4294967295));c[l+7]=$,$=$>>8,c[l+6]=$,$=$>>8,c[l+5]=$,$=$>>8,c[l+4]=$;let j=Number(f>>BigInt(32)&BigInt(4294967295));return c[l+3]=j,j=j>>8,c[l+2]=j,j=j>>8,c[l+1]=j,j=j>>8,c[l]=j,l+8}p.prototype.writeBigUInt64LE=Ee(function(f,l=0){return Q(this,f,l,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=Ee(function(f,l=0){return re(this,f,l,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(f,l,g,v){if(f=+f,l=l>>>0,!v){const ye=Math.pow(2,8*g-1);X(this,f,l,g,ye-1,-ye)}let $=0,j=1,J=0;for(this[l]=f&255;++$<g&&(j*=256);)f<0&&J===0&&this[l+$-1]!==0&&(J=1),this[l+$]=(f/j>>0)-J&255;return l+g},p.prototype.writeIntBE=function(f,l,g,v){if(f=+f,l=l>>>0,!v){const ye=Math.pow(2,8*g-1);X(this,f,l,g,ye-1,-ye)}let $=g-1,j=1,J=0;for(this[l+$]=f&255;--$>=0&&(j*=256);)f<0&&J===0&&this[l+$+1]!==0&&(J=1),this[l+$]=(f/j>>0)-J&255;return l+g},p.prototype.writeInt8=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,1,127,-128),f<0&&(f=255+f+1),this[l]=f&255,l+1},p.prototype.writeInt16LE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,2,32767,-32768),this[l]=f&255,this[l+1]=f>>>8,l+2},p.prototype.writeInt16BE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,2,32767,-32768),this[l]=f>>>8,this[l+1]=f&255,l+2},p.prototype.writeInt32LE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,4,2147483647,-2147483648),this[l]=f&255,this[l+1]=f>>>8,this[l+2]=f>>>16,this[l+3]=f>>>24,l+4},p.prototype.writeInt32BE=function(f,l,g){return f=+f,l=l>>>0,g||X(this,f,l,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[l]=f>>>24,this[l+1]=f>>>16,this[l+2]=f>>>8,this[l+3]=f&255,l+4},p.prototype.writeBigInt64LE=Ee(function(f,l=0){return Q(this,f,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=Ee(function(f,l=0){return re(this,f,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ne(c,f,l,g,v,$){if(l+g>c.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function te(c,f,l,g,v){return f=+f,l=l>>>0,v||ne(c,f,l,4),s.write(c,f,l,g,23,4),l+4}p.prototype.writeFloatLE=function(f,l,g){return te(this,f,l,!0,g)},p.prototype.writeFloatBE=function(f,l,g){return te(this,f,l,!1,g)};function we(c,f,l,g,v){return f=+f,l=l>>>0,v||ne(c,f,l,8),s.write(c,f,l,g,52,8),l+8}p.prototype.writeDoubleLE=function(f,l,g){return we(this,f,l,!0,g)},p.prototype.writeDoubleBE=function(f,l,g){return we(this,f,l,!1,g)},p.prototype.copy=function(f,l,g,v){if(!p.isBuffer(f))throw new TypeError("argument should be a Buffer");if(g||(g=0),!v&&v!==0&&(v=this.length),l>=f.length&&(l=f.length),l||(l=0),v>0&&v<g&&(v=g),v===g||f.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),f.length-l<v-g&&(v=f.length-l+g);const $=v-g;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,g,v):Uint8Array.prototype.set.call(f,this.subarray(g,v),l),$},p.prototype.fill=function(f,l,g,v){if(typeof f=="string"){if(typeof l=="string"?(v=l,l=0,g=this.length):typeof g=="string"&&(v=g,g=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!p.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(f.length===1){const j=f.charCodeAt(0);(v==="utf8"&&j<128||v==="latin1")&&(f=j)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(l<0||this.length<l||this.length<g)throw new RangeError("Out of range index");if(g<=l)return this;l=l>>>0,g=g===void 0?this.length:g>>>0,f||(f=0);let $;if(typeof f=="number")for($=l;$<g;++$)this[$]=f;else{const j=p.isBuffer(f)?f:p.from(f,v),J=j.length;if(J===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for($=0;$<g-l;++$)this[$+l]=j[$%J]}return this};const ve={};function Le(c,f,l){ve[c]=class extends l{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(v){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:v,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}Le("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Le("ERR_INVALID_ARG_TYPE",function(c,f){return`The "${c}" argument must be of type number. Received type ${typeof f}`},TypeError),Le("ERR_OUT_OF_RANGE",function(c,f,l){let g=`The value of "${c}" is out of range.`,v=l;return Number.isInteger(l)&&Math.abs(l)>2**32?v=tr(String(l)):typeof l=="bigint"&&(v=String(l),(l>BigInt(2)**BigInt(32)||l<-(BigInt(2)**BigInt(32)))&&(v=tr(v)),v+="n"),g+=` It must be ${f}. Received ${v}`,g},RangeError);function tr(c){let f="",l=c.length;const g=c[0]==="-"?1:0;for(;l>=g+4;l-=3)f=`_${c.slice(l-3,l)}${f}`;return`${c.slice(0,l)}${f}`}function Mr(c,f,l){Qe(f,"offset"),(c[f]===void 0||c[f+l]===void 0)&&Ce(f,c.length-(l+1))}function sr(c,f,l,g,v,$){if(c>l||c<f){const j=typeof f=="bigint"?"n":"";let J;throw $>3?f===0||f===BigInt(0)?J=`>= 0${j} and < 2${j} ** ${($+1)*8}${j}`:J=`>= -(2${j} ** ${($+1)*8-1}${j}) and < 2 ** ${($+1)*8-1}${j}`:J=`>= ${f}${j} and <= ${l}${j}`,new ve.ERR_OUT_OF_RANGE("value",J,c)}Mr(g,v,$)}function Qe(c,f){if(typeof c!="number")throw new ve.ERR_INVALID_ARG_TYPE(f,"number",c)}function Ce(c,f,l){throw Math.floor(c)!==c?(Qe(c,l),new ve.ERR_OUT_OF_RANGE(l||"offset","an integer",c)):f<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE(l||"offset",`>= ${l?1:0} and <= ${f}`,c)}const Wr=/[^+/0-9A-Za-z-_]/g;function cr(c){if(c=c.split("=")[0],c=c.trim().replace(Wr,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function vr(c,f){f=f||1/0;let l;const g=c.length;let v=null;const $=[];for(let j=0;j<g;++j){if(l=c.charCodeAt(j),l>55295&&l<57344){if(!v){if(l>56319){(f-=3)>-1&&$.push(239,191,189);continue}else if(j+1===g){(f-=3)>-1&&$.push(239,191,189);continue}v=l;continue}if(l<56320){(f-=3)>-1&&$.push(239,191,189),v=l;continue}l=(v-55296<<10|l-56320)+65536}else v&&(f-=3)>-1&&$.push(239,191,189);if(v=null,l<128){if((f-=1)<0)break;$.push(l)}else if(l<2048){if((f-=2)<0)break;$.push(l>>6|192,l&63|128)}else if(l<65536){if((f-=3)<0)break;$.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((f-=4)<0)break;$.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return $}function Hr(c){const f=[];for(let l=0;l<c.length;++l)f.push(c.charCodeAt(l)&255);return f}function dr(c,f){let l,g,v;const $=[];for(let j=0;j<c.length&&!((f-=2)<0);++j)l=c.charCodeAt(j),g=l>>8,v=l%256,$.push(v),$.push(g);return $}function Ar(c){return r.toByteArray(cr(c))}function Me(c,f,l,g){let v;for(v=0;v<g&&!(v+l>=f.length||v>=c.length);++v)f[v+l]=c[v];return v}function Be(c,f){return c instanceof f||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===f.name}function Ae(c){return c!==c}const Zr=function(){const c="0123456789abcdef",f=new Array(256);for(let l=0;l<16;++l){const g=l*16;for(let v=0;v<16;++v)f[g+v]=c[l]+c[v]}return f}();function Ee(c){return typeof BigInt>"u"?Vr:c}function Vr(){throw new Error("BigInt not supported")}})(wr);/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,r){var s=wr,n=s.Buffer;function o(t,p){for(var y in t)p[y]=t[y]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=s:(o(s,r),r.Buffer=i);function i(t,p,y){return n(t,p,y)}i.prototype=Object.create(n.prototype),o(n,i),i.from=function(t,p,y){if(typeof t=="number")throw new TypeError("Argument must not be a number");return n(t,p,y)},i.alloc=function(t,p,y){if(typeof t!="number")throw new TypeError("Argument must be a number");var u=n(t);return p!==void 0?typeof y=="string"?u.fill(p,y):u.fill(p):u.fill(0),u},i.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return n(t)},i.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return s.SlowBuffer(t)}})(ti,ti.exports);var io=ti.exports,no=io.Buffer;function ms(e,r){this._block=no.alloc(e),this._finalSize=r,this._blockSize=e,this._len=0}ms.prototype.update=function(e,r){typeof e=="string"&&(r=r||"utf8",e=no.from(e,r));for(var s=this._block,n=this._blockSize,o=e.length,i=this._len,t=0;t<o;){for(var p=i%n,y=Math.min(o-t,n-p),u=0;u<y;u++)s[p+u]=e[t+u];i+=y,t+=y,i%n===0&&this._update(s)}return this._len+=o,this};ms.prototype.digest=function(e){var r=this._len%this._blockSize;this._block[r]=128,this._block.fill(0,r+1),r>=this._finalSize&&(this._update(this._block),this._block.fill(0));var s=this._len*8;if(s<=4294967295)this._block.writeUInt32BE(s,this._blockSize-4);else{var n=(s&4294967295)>>>0,o=(s-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i};ms.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Sl=ms,Rl=vl,ao=Sl,Fl=io.Buffer,Bl=[1518500249,1859775393,-1894007588,-899497514],Il=new Array(80);function Rt(){this.init(),this._w=Il,ao.call(this,64,56)}Rl(Rt,ao);Rt.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function jl(e){return e<<1|e>>>31}function Ll(e){return e<<5|e>>>27}function Nl(e){return e<<30|e>>>2}function Cl(e,r,s,n){return e===0?r&s|~r&n:e===2?r&s|r&n|s&n:r^s^n}Rt.prototype._update=function(e){for(var r=this._w,s=this._a|0,n=this._b|0,o=this._c|0,i=this._d|0,t=this._e|0,p=0;p<16;++p)r[p]=e.readInt32BE(p*4);for(;p<80;++p)r[p]=jl(r[p-3]^r[p-8]^r[p-14]^r[p-16]);for(var y=0;y<80;++y){var u=~~(y/20),d=Ll(s)+Cl(u,n,o,i)+t+r[y]+Bl[u]|0;t=i,i=o,o=Nl(n),n=s,s=d}this._a=s+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=t+this._e|0};Rt.prototype._hash=function(){var e=Fl.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Dl=Rt;const ql=di(Dl);function Ul(e){let r="";for(const s of new Uint8Array(e))s<16&&(r+="0"),r+=s.toString(16);return r}let Cs=null;async function $n(e){return Cs===null&&(Cs=await Ml()),Cs?oo(e):zl(e)}function zl(e){return new ql().update(e).digest("hex")}async function oo(e){const r=await crypto.subtle.digest("SHA-1",e);return Ul(r)}async function Ml(){try{if(await oo(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709")return!0}catch{}return!1}function Wl(e){const r=[];let s=0,n=0;do{s=e.readUInt8();const o=s&127;r.push(o),n=s&128}while(n);return r.reduce((o,i)=>o+1<<7|i,-1)}function Hl(e,r){let s=r,n=4,o=null;do o=e.readUInt8(),s|=(o&127)<<n,n+=7;while(o&128);return s}class kt{constructor(r){Object.assign(this,r),this.offsetCache={}}static async fromIdx({idx:r,getExternalRefDelta:s}){const n=new Sr(r);if(n.slice(4).toString("hex")!=="ff744f63")return;const i=n.readUInt32BE();if(i!==2)throw new _e(`Unable to read version ${i} packfile IDX. (Only version 2 supported)`);if(r.byteLength>2048*1024*1024)throw new _e("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");n.seek(n.tell()+4*255);const t=n.readUInt32BE(),p=[];for(let d=0;d<t;d++){const w=n.slice(20).toString("hex");p[d]=w}n.seek(n.tell()+4*t);const y=new Map;for(let d=0;d<t;d++)y.set(p[d],n.readUInt32BE());const u=n.slice(20).toString("hex");return new kt({hashes:p,crcs:{},offsets:y,packfileSha:u,getExternalRefDelta:s})}static async fromPack({pack:r,getExternalRefDelta:s,onProgress:n}){const o={1:"commit",2:"tree",3:"blob",4:"tag",6:"ofs-delta",7:"ref-delta"},i={},t=r.slice(-20).toString("hex"),p=[],y={},u=new Map;let d=null,w=null;await ml([r],async({data:q,type:D,reference:M,offset:I,num:U})=>{d===null&&(d=U);const A=Math.floor((d-U)*100/d);A!==w&&n&&await n({phase:"Receiving objects",loaded:d-U,total:d}),w=A,D=o[D],["commit","tree","blob","tag"].includes(D)?i[I]={type:D,offset:I}:D==="ofs-delta"?i[I]={type:D,offset:I}:D==="ref-delta"&&(i[I]={type:D,offset:I})});const _=Object.keys(i).map(Number);for(const[q,D]of _.entries()){const M=q+1===_.length?r.byteLength-20:_[q+1],I=i[D],U=_p.buf(r.slice(D,M))>>>0;I.end=M,I.crc=U}const b=new kt({pack:Promise.resolve(r),packfileSha:t,crcs:y,hashes:p,offsets:u,getExternalRefDelta:s});w=null;let B=0;const P=[0,0,0,0,0,0,0,0,0,0,0,0];for(let q in i){q=Number(q);const D=Math.floor(B*100/d);D!==w&&n&&await n({phase:"Resolving deltas",loaded:B,total:d}),B++,w=D;const M=i[q];if(!M.oid)try{b.readDepth=0,b.externalReadDepth=0;const{type:I,object:U}=await b.readSlice({start:q});P[b.readDepth]+=1;const A=await $n(vp.wrap({type:I,object:U}));M.oid=A,p.push(A),u.set(A,q),y[A]=M.crc}catch{continue}}return p.sort(),b}async toBuffer(){const r=[],s=(u,d)=>{r.push(Buffer.from(u,d))};s("ff744f63","hex"),s("00000002","hex");const n=new Sr(Buffer.alloc(256*4));for(let u=0;u<256;u++){let d=0;for(const w of this.hashes)parseInt(w.slice(0,2),16)<=u&&d++;n.writeUInt32BE(d)}r.push(n.buffer);for(const u of this.hashes)s(u,"hex");const o=new Sr(Buffer.alloc(this.hashes.length*4));for(const u of this.hashes)o.writeUInt32BE(this.crcs[u]);r.push(o.buffer);const i=new Sr(Buffer.alloc(this.hashes.length*4));for(const u of this.hashes)i.writeUInt32BE(this.offsets.get(u));r.push(i.buffer),s(this.packfileSha,"hex");const t=Buffer.concat(r),p=await $n(t),y=Buffer.alloc(20);return y.write(p,"hex"),Buffer.concat([t,y])}async load({pack:r}){this.pack=r}async unload(){this.pack=null}async read({oid:r}){if(!this.offsets.get(r)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(r);throw new _e(`Could not read object ${r} from packfile`)}const s=this.offsets.get(r);return this.readSlice({start:s})}async readSlice({start:r}){if(this.offsetCache[r])return Object.assign({},this.offsetCache[r]);this.readDepth++;const s={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"};if(!this.pack)throw new _e("Tried to read from a GitPackIndex with no packfile loaded into memory");const n=(await this.pack).slice(r),o=new Sr(n),i=o.readUInt8(),t=i&112;let p=s[t];if(p===void 0)throw new _e("Unrecognized type: 0b"+t.toString(2));const y=i&15;let u=y;i&128&&(u=Hl(o,y));let w=null,_=null;if(p==="ofs_delta"){const B=Wl(o),P=r-B;({object:w,type:p}=await this.readSlice({start:P}))}if(p==="ref_delta"){const B=o.slice(20).toString("hex");({object:w,type:p}=await this.read({oid:B}))}const b=n.slice(o.tell());if(_=Buffer.from(await bl(b)),_.byteLength!==u)throw new _e(`Packfile told us object would have length ${u} but it had length ${_.byteLength}`);return w&&(_=Buffer.from(Pp(_,w))),this.readDepth>3&&(this.offsetCache[r]={type:p,object:_}),{type:p,format:"content",object:_}}}class Et extends st{constructor(r){super(`Expected a 40-char hex object id but saw "${r}".`),this.code=this.name=Et.code,this.data={value:r}}}Et.code="InvalidOidError";class gs extends st{constructor(r,s,n,o){super(`Object ${r} ${o?`at ${o}`:""}was anticipated to be a ${n} but it is a ${s}.`),this.code=this.name=gs.code,this.data={oid:r,actual:s,expected:n,filepath:o}}}gs.code="ObjectTypeError";async function po(e,r){const s=la(e);for(;;){const{value:n,done:o}=await s.next();if(n&&await r(n),o)break}s.return&&s.return()}async function Ot(e){let r=0;const s=[];await po(e,i=>{s.push(i),r+=i.byteLength});const n=new Uint8Array(r);let o=0;for(const i of s)n.set(i,o),o+=i.byteLength;return n}class Ds{constructor(){this._queue=[]}write(r){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){const s=this._waiting;this._waiting=null,s({value:r})}else this._queue.push(r)}end(){if(this._ended=!0,this._waiting){const r=this._waiting;this._waiting=null,r({done:!0})}}destroy(r){this.error=r,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(r=>{this._waiting=r})}}class Zl{static demux(r){const s=$e.streamReader(r),n=new Ds,o=new Ds,i=new Ds,t=async function(){const p=await s();if(p===null)return t();if(p===!0){n.end(),i.end(),r.error?o.destroy(r.error):o.end();return}switch(p[0]){case 1:{o.write(p.slice(1));break}case 2:{i.write(p.slice(1));break}case 3:{const y=p.slice(1);i.write(y),n.end(),i.end(),o.destroy(new Error(y.toString("utf8")));return}default:n.write(p)}t()};return t(),{packetlines:n,packfile:o,progress:i}}}async function fo(e){const{packetlines:r,packfile:s,progress:n}=Zl.demux(e),o=[],i=[],t=[];let p=!1,y=!1;return new Promise((u,d)=>{po(r,w=>{const _=w.toString("utf8").trim();if(_.startsWith("shallow")){const b=_.slice(-41).trim();b.length!==40&&d(new Et(b)),o.push(b)}else if(_.startsWith("unshallow")){const b=_.slice(-41).trim();b.length!==40&&d(new Et(b)),i.push(b)}else if(_.startsWith("ACK")){const[,b,B]=_.split(" ");t.push({oid:b,status:B}),B||(y=!0)}else _.startsWith("NAK")?(p=!0,y=!0):(y=!0,p=!0);y&&(e.error?d(e.error):u({shallows:o,unshallows:i,acks:t,nak:p,packfile:s,progress:n}))}).finally(()=>{y||(e.error?d(e.error):u({shallows:o,unshallows:i,acks:t,nak:p,packfile:s,progress:n}))})})}typeof window<"u"&&(window.Buffer=wr.Buffer);async function Vl(e,r,s){const o=(await uo(e,r))[r],i=await co(e,o),t=await Kl(i,o,s),p=await Xl(e,s.map(u=>t[u].oid)),y={};return await Promise.all(s.map(async u=>{y[u]=await ho(p,t[u].oid)})),y}async function Gl(e,r){const s=await uo(e,r);if(!(r in s))throw new Error(`Branch ${r} not found`);const n=s[r],o=await co(e,n),i=await Yl(o,n);return i!=null&&i.object?lo(i):[]}function lo(e){return e.object.map(r=>{if(r.type==="blob")return{name:r.path,type:"file"};if(r.type==="tree"&&r.object)return{name:r.path,type:"folder",children:lo(r)}}).filter(r=>!!(r!=null&&r.name))}async function uo(e,r){const s=wr.Buffer.from(await Ot([$e.encode(`command=ls-refs
713
- `),$e.encode(`agent=git/2.37.3
714
- `),$e.encode(`object-format=sha1
715
- `),$e.delim(),$e.encode(`peel
716
- `),$e.encode(`ref-prefix ${r}
717
- `),$e.flush()])),n=await fetch(e+"/git-upload-pack",{method:"POST",headers:{Accept:"application/x-git-upload-pack-advertisement","content-type":"application/x-git-upload-pack-request","Content-Length":`${s.length}`,"Git-Protocol":"version=2"},body:s}),o={};for await(const i of Ql(n)){const t=i.indexOf(" "),p=i.slice(0,t),y=i.slice(t+1,i.length-1);o[y]=p}return o}async function co(e,r){const s=wr.Buffer.from(await Ot([$e.encode(`want ${r} multi_ack_detailed no-done side-band-64k thin-pack ofs-delta agent=git/2.37.3 filter
718
- `),$e.encode(`filter blob:none
719
- `),$e.encode(`shallow ${r}
720
- `),$e.encode(`deepen 1
721
- `),$e.flush(),$e.encode(`done
722
- `),$e.encode(`done
723
- `)])),n=await fetch(e+"/git-upload-pack",{method:"POST",headers:{Accept:"application/x-git-upload-pack-advertisement","content-type":"application/x-git-upload-pack-request","Content-Length":`${s.length}`},body:s}),o=yo(n.body),i=await fo(o),t=wr.Buffer.from(await Ot(i.packfile)),p=await kt.fromPack({pack:t}),y=p.read;return p.read=async function({oid:u,...d}){const w=await y.call(this,{oid:u,...d});return w.oid=u,w},p}async function Yl(e,r){const s=await e.read({oid:r});Ir(s);const n=await e.read({oid:s.object.tree}),o=[n];for(;o.length>0;){const i=o.pop(),t=await e.read({oid:i.oid});if(Ir(t),i.object=t.object,t.type==="tree")for(const p of t.object)p.type==="tree"&&o.push(p)}return n}async function Kl(e,r,s){const n=await e.read({oid:r});Ir(n);const o=await e.read({oid:n.object.tree});Ir(o);const i={};for(const t of s){let p=o;const y=t.split("/");for(const u of y){if(p.type!=="tree")throw new Error(`Path not found in the repo: ${t}`);let d=!1;for(const w of p.object)if(w.path===u){try{p=await e.read({oid:w.oid}),Ir(p)}catch{p=w}d=!0;break}if(!d)throw new Error(`Path not found in the repo: ${t}`)}i[t]=p}return i}async function Xl(e,r){const s=wr.Buffer.from(await Ot([...r.map(p=>$e.encode(`want ${p} multi_ack_detailed no-done side-band-64k thin-pack ofs-delta agent=git/2.37.3
724
- `)),$e.flush(),$e.encode(`done
725
- `)])),n=await fetch(e+"/git-upload-pack",{method:"POST",headers:{Accept:"application/x-git-upload-pack-advertisement","content-type":"application/x-git-upload-pack-request","Content-Length":`${s.length}`},body:s}),o=yo(n.body),i=await fo(o),t=wr.Buffer.from(await Ot(i.packfile));return await kt.fromPack({pack:t})}async function ho(e,r){const s=await e.read({oid:r});if(Ir(s),s.type==="blob")return s.object;const n={};for(const{path:o,oid:i,type:t}of s.object)if(t==="blob"){const p=await e.read({oid:i});Ir(p),n[o]=p.object}else t==="tree"&&(n[o]=await ho(e,i));return n}function Ir(e){if(e.object instanceof wr.Buffer)switch(e.type){case"commit":e.object=qe.from(e.object).parse();break;case"tree":e.object=mi.from(e.object).entries();break;case"blob":e.object=new Uint8Array(e.object),e.format="content";break;case"tag":e.object=ut.from(e.object).parse();break;default:throw new gs(e.oid,e.type,"blob|commit|tag|tree")}}async function*Ql(e){const r=await e.text();let s=0;for(;s<=r.length;){const n=parseInt(r.substring(s,s+4),16);if(n===0)break;yield r.substring(s+4,s+n),s+=n}}function yo(e){if(e[Symbol.asyncIterator])return e;const r=e.getReader();return{next(){return r.read()},return(){return r.releaseLock(),{}},[Symbol.asyncIterator](){return this}}}function Jl(e,r){r=ni(r);const s=["",".","/"].includes(r);let n=e;if(s)r="";else{const t=r.split("/");for(const p of t){const y=n==null?void 0:n.find(u=>u.name===p);if((y==null?void 0:y.type)==="folder")n=y.children;else return y?[y.name]:[]}}const o=[],i=[{tree:n,path:r}];for(;i.length>0;){const{tree:t,path:p}=i.pop();for(const y of t){const u=`${p}${p?"/":""}${y.name}`;y.type==="folder"?i.push({tree:y.children,path:u}):o.push(u)}}return o}const eu=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url","git:directory"];function ru(e){return e&&typeof e=="object"&&typeof e.resource=="string"&&eu.includes(e.resource)}class _r{get progress(){return this._progress}set progress(r){this._progress=r}setPlayground(r){this.playground=r}get isAsync(){return!1}static create(r,{semaphore:s,progress:n,corsProxy:o}){let i;switch(r.resource){case"vfs":i=new tu(r,n);break;case"literal":i=new su(r,n);break;case"wordpress.org/themes":i=new pu(r,n);break;case"wordpress.org/plugins":i=new fu(r,n);break;case"url":i=new nu(r,n);break;case"git:directory":i=new au(r,n,{corsProxy:o});break;case"literal:directory":i=new ou(r,n);break;default:throw new Error(`Invalid resource: ${r}`)}return i=new lu(i),s&&(i=new uu(i,s)),i}}class mo extends _r{constructor(r){super(),this.resource=r}get progress(){return this.resource.progress}set progress(r){this.resource.progress=r}get name(){return this.resource.name}get isAsync(){return this.resource.isAsync}setPlayground(r){this.resource.setPlayground(r)}}class tu extends _r{constructor(r,s){super(),this.resource=r,this._progress=s}async resolve(){var s;const r=await this.playground.readFileAsBuffer(this.resource.path);return(s=this.progress)==null||s.set(100),new File([r],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class su extends _r{constructor(r,s){super(),this.resource=r,this._progress=s}async resolve(){var r;return(r=this.progress)==null||r.set(100),new File([this.resource.contents],this.resource.name)}get name(){return this.resource.name}}class Oi extends _r{constructor(r){super(),this._progress=r}async resolve(){var s,n;(s=this.progress)==null||s.setCaption(this.caption);const r=this.getURL();try{let o=await fetch(r);if(!o.ok)throw new Error(`Could not download "${r}"`);if(o=await np(o,((n=this.progress)==null?void 0:n.loadingListener)??iu),o.status!==200)throw new Error(`Could not download "${r}"`);return new File([await o.blob()],this.name)}catch(o){throw new Error(`Could not download "${r}".
708
+ */(function(e){const r=ms,s=Si,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=p,e.SlowBuffer=q,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,p.TYPED_ARRAY_SUPPORT=i(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const c=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(c,f),c.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function t(c){if(c>o)throw new RangeError('The value "'+c+'" is invalid for option "size"');const f=new Uint8Array(c);return Object.setPrototypeOf(f,p.prototype),f}function p(c,f,l){if(typeof c=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(c)}return y(c,f,l)}p.poolSize=8192;function y(c,f,l){if(typeof c=="string")return b(c,f);if(ArrayBuffer.isView(c))return H(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(He(c,ArrayBuffer)||c&&He(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(He(c,SharedArrayBuffer)||c&&He(c.buffer,SharedArrayBuffer)))return P(c,f,l);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const _=c.valueOf&&c.valueOf();if(_!=null&&_!==c)return p.from(_,f,l);const v=N(c);if(v)return v;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return p.from(c[Symbol.toPrimitive]("string"),f,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}p.from=function(c,f,l){return y(c,f,l)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function u(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function d(c,f,l){return u(c),c<=0?t(c):f!==void 0?typeof l=="string"?t(c).fill(f,l):t(c).fill(f):t(c)}p.alloc=function(c,f,l){return d(c,f,l)};function g(c){return u(c),t(c<0?0:j(c)|0)}p.allocUnsafe=function(c){return g(c)},p.allocUnsafeSlow=function(c){return g(c)};function b(c,f){if((typeof f!="string"||f==="")&&(f="utf8"),!p.isEncoding(f))throw new TypeError("Unknown encoding: "+f);const l=$(c,f)|0;let _=t(l);const v=_.write(c,f);return v!==l&&(_=_.slice(0,v)),_}function w(c){const f=c.length<0?0:j(c.length)|0,l=t(f);for(let _=0;_<f;_+=1)l[_]=c[_]&255;return l}function H(c){if(He(c,Uint8Array)){const f=new Uint8Array(c);return P(f.buffer,f.byteOffset,f.byteLength)}return w(c)}function P(c,f,l){if(f<0||c.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<f+(l||0))throw new RangeError('"length" is outside of buffer bounds');let _;return f===void 0&&l===void 0?_=new Uint8Array(c):l===void 0?_=new Uint8Array(c,f):_=new Uint8Array(c,f,l),Object.setPrototypeOf(_,p.prototype),_}function N(c){if(p.isBuffer(c)){const f=j(c.length)|0,l=t(f);return l.length===0||c.copy(l,0,0,f),l}if(c.length!==void 0)return typeof c.length!="number"||Oe(c.length)?t(0):w(c);if(c.type==="Buffer"&&Array.isArray(c.data))return w(c.data)}function j(c){if(c>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return c|0}function q(c){return+c!=c&&(c=0),p.alloc(+c)}p.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==p.prototype},p.compare=function(f,l){if(He(f,Uint8Array)&&(f=p.from(f,f.offset,f.byteLength)),He(l,Uint8Array)&&(l=p.from(l,l.offset,l.byteLength)),!p.isBuffer(f)||!p.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===l)return 0;let _=f.length,v=l.length;for(let C=0,R=Math.min(_,v);C<R;++C)if(f[C]!==l[C]){_=f[C],v=l[C];break}return _<v?-1:v<_?1:0},p.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(f,l){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return p.alloc(0);let _;if(l===void 0)for(l=0,_=0;_<f.length;++_)l+=f[_].length;const v=p.allocUnsafe(l);let C=0;for(_=0;_<f.length;++_){let R=f[_];if(He(R,Uint8Array))C+R.length>v.length?(p.isBuffer(R)||(R=p.from(R)),R.copy(v,C)):Uint8Array.prototype.set.call(v,R,C);else if(p.isBuffer(R))R.copy(v,C);else throw new TypeError('"list" argument must be an Array of Buffers');C+=R.length}return v};function $(c,f){if(p.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||He(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);const l=c.length,_=arguments.length>2&&arguments[2]===!0;if(!_&&l===0)return 0;let v=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return Pr(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return xr(c).length;default:if(v)return _?-1:Pr(c).length;f=(""+f).toLowerCase(),v=!0}}p.byteLength=$;function W(c,f,l){let _=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,f>>>=0,l<=f))return"";for(c||(c="utf8");;)switch(c){case"hex":return G(this,f,l);case"utf8":case"utf-8":return I(this,f,l);case"ascii":return K(this,f,l);case"latin1":case"binary":return Y(this,f,l);case"base64":return D(this,f,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,f,l);default:if(_)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),_=!0}}p.prototype._isBuffer=!0;function O(c,f,l){const _=c[f];c[f]=c[l],c[l]=_}p.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let l=0;l<f;l+=2)O(this,l,l+1);return this},p.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let l=0;l<f;l+=4)O(this,l,l+3),O(this,l+1,l+2);return this},p.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let l=0;l<f;l+=8)O(this,l,l+7),O(this,l+1,l+6),O(this,l+2,l+5),O(this,l+3,l+4);return this},p.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?I(this,0,f):W.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(f){if(!p.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:p.compare(this,f)===0},p.prototype.inspect=function(){let f="";const l=e.INSPECT_MAX_BYTES;return f=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(f+=" ... "),"<Buffer "+f+">"},n&&(p.prototype[n]=p.prototype.inspect),p.prototype.compare=function(f,l,_,v,C){if(He(f,Uint8Array)&&(f=p.from(f,f.offset,f.byteLength)),!p.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(l===void 0&&(l=0),_===void 0&&(_=f?f.length:0),v===void 0&&(v=0),C===void 0&&(C=this.length),l<0||_>f.length||v<0||C>this.length)throw new RangeError("out of range index");if(v>=C&&l>=_)return 0;if(v>=C)return-1;if(l>=_)return 1;if(l>>>=0,_>>>=0,v>>>=0,C>>>=0,this===f)return 0;let R=C-v,J=_-l;const ye=Math.min(R,J),de=this.slice(v,C),he=f.slice(l,_);for(let ae=0;ae<ye;++ae)if(de[ae]!==he[ae]){R=de[ae],J=he[ae];break}return R<J?-1:J<R?1:0};function A(c,f,l,_,v){if(c.length===0)return-1;if(typeof l=="string"?(_=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,Oe(l)&&(l=v?0:c.length-1),l<0&&(l=c.length+l),l>=c.length){if(v)return-1;l=c.length-1}else if(l<0)if(v)l=0;else return-1;if(typeof f=="string"&&(f=p.from(f,_)),p.isBuffer(f))return f.length===0?-1:B(c,f,l,_,v);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?v?Uint8Array.prototype.indexOf.call(c,f,l):Uint8Array.prototype.lastIndexOf.call(c,f,l):B(c,[f],l,_,v);throw new TypeError("val must be string, number or Buffer")}function B(c,f,l,_,v){let C=1,R=c.length,J=f.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(c.length<2||f.length<2)return-1;C=2,R/=2,J/=2,l/=2}function ye(he,ae){return C===1?he[ae]:he.readUInt16BE(ae*C)}let de;if(v){let he=-1;for(de=l;de<R;de++)if(ye(c,de)===ye(f,he===-1?0:de-he)){if(he===-1&&(he=de),de-he+1===J)return he*C}else he!==-1&&(de-=de-he),he=-1}else for(l+J>R&&(l=R-J),de=l;de>=0;de--){let he=!0;for(let ae=0;ae<J;ae++)if(ye(c,de+ae)!==ye(f,ae)){he=!1;break}if(he)return de}return-1}p.prototype.includes=function(f,l,_){return this.indexOf(f,l,_)!==-1},p.prototype.indexOf=function(f,l,_){return A(this,f,l,_,!0)},p.prototype.lastIndexOf=function(f,l,_){return A(this,f,l,_,!1)};function x(c,f,l,_){l=Number(l)||0;const v=c.length-l;_?(_=Number(_),_>v&&(_=v)):_=v;const C=f.length;_>C/2&&(_=C/2);let R;for(R=0;R<_;++R){const J=parseInt(f.substr(R*2,2),16);if(Oe(J))return R;c[l+R]=J}return R}function T(c,f,l,_){return qe(Pr(f,c.length-l),c,l,_)}function k(c,f,l,_){return qe(zr(f),c,l,_)}function S(c,f,l,_){return qe(xr(f),c,l,_)}function F(c,f,l,_){return qe(dr(f,c.length-l),c,l,_)}p.prototype.write=function(f,l,_,v){if(l===void 0)v="utf8",_=this.length,l=0;else if(_===void 0&&typeof l=="string")v=l,_=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(_)?(_=_>>>0,v===void 0&&(v="utf8")):(v=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const C=this.length-l;if((_===void 0||_>C)&&(_=C),f.length>0&&(_<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");let R=!1;for(;;)switch(v){case"hex":return x(this,f,l,_);case"utf8":case"utf-8":return T(this,f,l,_);case"ascii":case"latin1":case"binary":return k(this,f,l,_);case"base64":return S(this,f,l,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,f,l,_);default:if(R)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),R=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function D(c,f,l){return f===0&&l===c.length?r.fromByteArray(c):r.fromByteArray(c.slice(f,l))}function I(c,f,l){l=Math.min(c.length,l);const _=[];let v=f;for(;v<l;){const C=c[v];let R=null,J=C>239?4:C>223?3:C>191?2:1;if(v+J<=l){let ye,de,he,ae;switch(J){case 1:C<128&&(R=C);break;case 2:ye=c[v+1],(ye&192)===128&&(ae=(C&31)<<6|ye&63,ae>127&&(R=ae));break;case 3:ye=c[v+1],de=c[v+2],(ye&192)===128&&(de&192)===128&&(ae=(C&15)<<12|(ye&63)<<6|de&63,ae>2047&&(ae<55296||ae>57343)&&(R=ae));break;case 4:ye=c[v+1],de=c[v+2],he=c[v+3],(ye&192)===128&&(de&192)===128&&(he&192)===128&&(ae=(C&15)<<18|(ye&63)<<12|(de&63)<<6|he&63,ae>65535&&ae<1114112&&(R=ae))}}R===null?(R=65533,J=1):R>65535&&(R-=65536,_.push(R>>>10&1023|55296),R=56320|R&1023),_.push(R),v+=J}return z(_)}const V=4096;function z(c){const f=c.length;if(f<=V)return String.fromCharCode.apply(String,c);let l="",_=0;for(;_<f;)l+=String.fromCharCode.apply(String,c.slice(_,_+=V));return l}function K(c,f,l){let _="";l=Math.min(c.length,l);for(let v=f;v<l;++v)_+=String.fromCharCode(c[v]&127);return _}function Y(c,f,l){let _="";l=Math.min(c.length,l);for(let v=f;v<l;++v)_+=String.fromCharCode(c[v]);return _}function G(c,f,l){const _=c.length;(!f||f<0)&&(f=0),(!l||l<0||l>_)&&(l=_);let v="";for(let C=f;C<l;++C)v+=Gr[c[C]];return v}function se(c,f,l){const _=c.slice(f,l);let v="";for(let C=0;C<_.length-1;C+=2)v+=String.fromCharCode(_[C]+_[C+1]*256);return v}p.prototype.slice=function(f,l){const _=this.length;f=~~f,l=l===void 0?_:~~l,f<0?(f+=_,f<0&&(f=0)):f>_&&(f=_),l<0?(l+=_,l<0&&(l=0)):l>_&&(l=_),l<f&&(l=f);const v=this.subarray(f,l);return Object.setPrototypeOf(v,p.prototype),v};function ee(c,f,l){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+f>l)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(f,l,_){f=f>>>0,l=l>>>0,_||ee(f,l,this.length);let v=this[f],C=1,R=0;for(;++R<l&&(C*=256);)v+=this[f+R]*C;return v},p.prototype.readUintBE=p.prototype.readUIntBE=function(f,l,_){f=f>>>0,l=l>>>0,_||ee(f,l,this.length);let v=this[f+--l],C=1;for(;l>0&&(C*=256);)v+=this[f+--l]*C;return v},p.prototype.readUint8=p.prototype.readUInt8=function(f,l){return f=f>>>0,l||ee(f,1,this.length),this[f]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(f,l){return f=f>>>0,l||ee(f,2,this.length),this[f]|this[f+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(f,l){return f=f>>>0,l||ee(f,2,this.length),this[f]<<8|this[f+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},p.prototype.readBigUInt64LE=ke(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],_=this[f+7];(l===void 0||_===void 0)&&Fe(f,this.length-8);const v=l+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,C=this[++f]+this[++f]*2**8+this[++f]*2**16+_*2**24;return BigInt(v)+(BigInt(C)<<BigInt(32))}),p.prototype.readBigUInt64BE=ke(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],_=this[f+7];(l===void 0||_===void 0)&&Fe(f,this.length-8);const v=l*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],C=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+_;return(BigInt(v)<<BigInt(32))+BigInt(C)}),p.prototype.readIntLE=function(f,l,_){f=f>>>0,l=l>>>0,_||ee(f,l,this.length);let v=this[f],C=1,R=0;for(;++R<l&&(C*=256);)v+=this[f+R]*C;return C*=128,v>=C&&(v-=Math.pow(2,8*l)),v},p.prototype.readIntBE=function(f,l,_){f=f>>>0,l=l>>>0,_||ee(f,l,this.length);let v=l,C=1,R=this[f+--v];for(;v>0&&(C*=256);)R+=this[f+--v]*C;return C*=128,R>=C&&(R-=Math.pow(2,8*l)),R},p.prototype.readInt8=function(f,l){return f=f>>>0,l||ee(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},p.prototype.readInt16LE=function(f,l){f=f>>>0,l||ee(f,2,this.length);const _=this[f]|this[f+1]<<8;return _&32768?_|4294901760:_},p.prototype.readInt16BE=function(f,l){f=f>>>0,l||ee(f,2,this.length);const _=this[f+1]|this[f]<<8;return _&32768?_|4294901760:_},p.prototype.readInt32LE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},p.prototype.readInt32BE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},p.prototype.readBigInt64LE=ke(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],_=this[f+7];(l===void 0||_===void 0)&&Fe(f,this.length-8);const v=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(_<<24);return(BigInt(v)<<BigInt(32))+BigInt(l+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),p.prototype.readBigInt64BE=ke(function(f){f=f>>>0,Qe(f,"offset");const l=this[f],_=this[f+7];(l===void 0||_===void 0)&&Fe(f,this.length-8);const v=(l<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(v)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+_)}),p.prototype.readFloatLE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),s.read(this,f,!0,23,4)},p.prototype.readFloatBE=function(f,l){return f=f>>>0,l||ee(f,4,this.length),s.read(this,f,!1,23,4)},p.prototype.readDoubleLE=function(f,l){return f=f>>>0,l||ee(f,8,this.length),s.read(this,f,!0,52,8)},p.prototype.readDoubleBE=function(f,l){return f=f>>>0,l||ee(f,8,this.length),s.read(this,f,!1,52,8)};function X(c,f,l,_,v,C){if(!p.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>v||f<C)throw new RangeError('"value" argument is out of bounds');if(l+_>c.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(f,l,_,v){if(f=+f,l=l>>>0,_=_>>>0,!v){const J=Math.pow(2,8*_)-1;X(this,f,l,_,J,0)}let C=1,R=0;for(this[l]=f&255;++R<_&&(C*=256);)this[l+R]=f/C&255;return l+_},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(f,l,_,v){if(f=+f,l=l>>>0,_=_>>>0,!v){const J=Math.pow(2,8*_)-1;X(this,f,l,_,J,0)}let C=_-1,R=1;for(this[l+C]=f&255;--C>=0&&(R*=256);)this[l+C]=f/R&255;return l+_},p.prototype.writeUint8=p.prototype.writeUInt8=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,1,255,0),this[l]=f&255,l+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,2,65535,0),this[l]=f&255,this[l+1]=f>>>8,l+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,2,65535,0),this[l]=f>>>8,this[l+1]=f&255,l+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,4,4294967295,0),this[l+3]=f>>>24,this[l+2]=f>>>16,this[l+1]=f>>>8,this[l]=f&255,l+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,4,4294967295,0),this[l]=f>>>24,this[l+1]=f>>>16,this[l+2]=f>>>8,this[l+3]=f&255,l+4};function Q(c,f,l,_,v){sr(f,_,v,c,l,7);let C=Number(f&BigInt(4294967295));c[l++]=C,C=C>>8,c[l++]=C,C=C>>8,c[l++]=C,C=C>>8,c[l++]=C;let R=Number(f>>BigInt(32)&BigInt(4294967295));return c[l++]=R,R=R>>8,c[l++]=R,R=R>>8,c[l++]=R,R=R>>8,c[l++]=R,l}function re(c,f,l,_,v){sr(f,_,v,c,l,7);let C=Number(f&BigInt(4294967295));c[l+7]=C,C=C>>8,c[l+6]=C,C=C>>8,c[l+5]=C,C=C>>8,c[l+4]=C;let R=Number(f>>BigInt(32)&BigInt(4294967295));return c[l+3]=R,R=R>>8,c[l+2]=R,R=R>>8,c[l+1]=R,R=R>>8,c[l]=R,l+8}p.prototype.writeBigUInt64LE=ke(function(f,l=0){return Q(this,f,l,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=ke(function(f,l=0){return re(this,f,l,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(f,l,_,v){if(f=+f,l=l>>>0,!v){const ye=Math.pow(2,8*_-1);X(this,f,l,_,ye-1,-ye)}let C=0,R=1,J=0;for(this[l]=f&255;++C<_&&(R*=256);)f<0&&J===0&&this[l+C-1]!==0&&(J=1),this[l+C]=(f/R>>0)-J&255;return l+_},p.prototype.writeIntBE=function(f,l,_,v){if(f=+f,l=l>>>0,!v){const ye=Math.pow(2,8*_-1);X(this,f,l,_,ye-1,-ye)}let C=_-1,R=1,J=0;for(this[l+C]=f&255;--C>=0&&(R*=256);)f<0&&J===0&&this[l+C+1]!==0&&(J=1),this[l+C]=(f/R>>0)-J&255;return l+_},p.prototype.writeInt8=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,1,127,-128),f<0&&(f=255+f+1),this[l]=f&255,l+1},p.prototype.writeInt16LE=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,2,32767,-32768),this[l]=f&255,this[l+1]=f>>>8,l+2},p.prototype.writeInt16BE=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,2,32767,-32768),this[l]=f>>>8,this[l+1]=f&255,l+2},p.prototype.writeInt32LE=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,4,2147483647,-2147483648),this[l]=f&255,this[l+1]=f>>>8,this[l+2]=f>>>16,this[l+3]=f>>>24,l+4},p.prototype.writeInt32BE=function(f,l,_){return f=+f,l=l>>>0,_||X(this,f,l,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[l]=f>>>24,this[l+1]=f>>>16,this[l+2]=f>>>8,this[l+3]=f&255,l+4},p.prototype.writeBigInt64LE=ke(function(f,l=0){return Q(this,f,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=ke(function(f,l=0){return re(this,f,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ne(c,f,l,_,v,C){if(l+_>c.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function te(c,f,l,_,v){return f=+f,l=l>>>0,v||ne(c,f,l,4),s.write(c,f,l,_,23,4),l+4}p.prototype.writeFloatLE=function(f,l,_){return te(this,f,l,!0,_)},p.prototype.writeFloatBE=function(f,l,_){return te(this,f,l,!1,_)};function ge(c,f,l,_,v){return f=+f,l=l>>>0,v||ne(c,f,l,8),s.write(c,f,l,_,52,8),l+8}p.prototype.writeDoubleLE=function(f,l,_){return ge(this,f,l,!0,_)},p.prototype.writeDoubleBE=function(f,l,_){return ge(this,f,l,!1,_)},p.prototype.copy=function(f,l,_,v){if(!p.isBuffer(f))throw new TypeError("argument should be a Buffer");if(_||(_=0),!v&&v!==0&&(v=this.length),l>=f.length&&(l=f.length),l||(l=0),v>0&&v<_&&(v=_),v===_||f.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),f.length-l<v-_&&(v=f.length-l+_);const C=v-_;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,_,v):Uint8Array.prototype.set.call(f,this.subarray(_,v),l),C},p.prototype.fill=function(f,l,_,v){if(typeof f=="string"){if(typeof l=="string"?(v=l,l=0,_=this.length):typeof _=="string"&&(v=_,_=this.length),v!==void 0&&typeof v!="string")throw new TypeError("encoding must be a string");if(typeof v=="string"&&!p.isEncoding(v))throw new TypeError("Unknown encoding: "+v);if(f.length===1){const R=f.charCodeAt(0);(v==="utf8"&&R<128||v==="latin1")&&(f=R)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(l<0||this.length<l||this.length<_)throw new RangeError("Out of range index");if(_<=l)return this;l=l>>>0,_=_===void 0?this.length:_>>>0,f||(f=0);let C;if(typeof f=="number")for(C=l;C<_;++C)this[C]=f;else{const R=p.isBuffer(f)?f:p.from(f,v),J=R.length;if(J===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(C=0;C<_-l;++C)this[C+l]=R[C%J]}return this};const ve={};function De(c,f,l){ve[c]=class extends l{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(v){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:v,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}De("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),De("ERR_INVALID_ARG_TYPE",function(c,f){return`The "${c}" argument must be of type number. Received type ${typeof f}`},TypeError),De("ERR_OUT_OF_RANGE",function(c,f,l){let _=`The value of "${c}" is out of range.`,v=l;return Number.isInteger(l)&&Math.abs(l)>2**32?v=tr(String(l)):typeof l=="bigint"&&(v=String(l),(l>BigInt(2)**BigInt(32)||l<-(BigInt(2)**BigInt(32)))&&(v=tr(v)),v+="n"),_+=` It must be ${f}. Received ${v}`,_},RangeError);function tr(c){let f="",l=c.length;const _=c[0]==="-"?1:0;for(;l>=_+4;l-=3)f=`_${c.slice(l-3,l)}${f}`;return`${c.slice(0,l)}${f}`}function Mr(c,f,l){Qe(f,"offset"),(c[f]===void 0||c[f+l]===void 0)&&Fe(f,c.length-(l+1))}function sr(c,f,l,_,v,C){if(c>l||c<f){const R=typeof f=="bigint"?"n":"";let J;throw C>3?f===0||f===BigInt(0)?J=`>= 0${R} and < 2${R} ** ${(C+1)*8}${R}`:J=`>= -(2${R} ** ${(C+1)*8-1}${R}) and < 2 ** ${(C+1)*8-1}${R}`:J=`>= ${f}${R} and <= ${l}${R}`,new ve.ERR_OUT_OF_RANGE("value",J,c)}Mr(_,v,C)}function Qe(c,f){if(typeof c!="number")throw new ve.ERR_INVALID_ARG_TYPE(f,"number",c)}function Fe(c,f,l){throw Math.floor(c)!==c?(Qe(c,l),new ve.ERR_OUT_OF_RANGE(l||"offset","an integer",c)):f<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE(l||"offset",`>= ${l?1:0} and <= ${f}`,c)}const Kr=/[^+/0-9A-Za-z-_]/g;function cr(c){if(c=c.split("=")[0],c=c.trim().replace(Kr,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function Pr(c,f){f=f||1/0;let l;const _=c.length;let v=null;const C=[];for(let R=0;R<_;++R){if(l=c.charCodeAt(R),l>55295&&l<57344){if(!v){if(l>56319){(f-=3)>-1&&C.push(239,191,189);continue}else if(R+1===_){(f-=3)>-1&&C.push(239,191,189);continue}v=l;continue}if(l<56320){(f-=3)>-1&&C.push(239,191,189),v=l;continue}l=(v-55296<<10|l-56320)+65536}else v&&(f-=3)>-1&&C.push(239,191,189);if(v=null,l<128){if((f-=1)<0)break;C.push(l)}else if(l<2048){if((f-=2)<0)break;C.push(l>>6|192,l&63|128)}else if(l<65536){if((f-=3)<0)break;C.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((f-=4)<0)break;C.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return C}function zr(c){const f=[];for(let l=0;l<c.length;++l)f.push(c.charCodeAt(l)&255);return f}function dr(c,f){let l,_,v;const C=[];for(let R=0;R<c.length&&!((f-=2)<0);++R)l=c.charCodeAt(R),_=l>>8,v=l%256,C.push(v),C.push(_);return C}function xr(c){return r.toByteArray(cr(c))}function qe(c,f,l,_){let v;for(v=0;v<_&&!(v+l>=f.length||v>=c.length);++v)f[v+l]=c[v];return v}function He(c,f){return c instanceof f||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===f.name}function Oe(c){return c!==c}const Gr=function(){const c="0123456789abcdef",f=new Array(256);for(let l=0;l<16;++l){const _=l*16;for(let v=0;v<16;++v)f[_+v]=c[l]+c[v]}return f}();function ke(c){return typeof BigInt>"u"?Zr:c}function Zr(){throw new Error("BigInt not supported")}})(gr);/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,r){var s=gr,n=s.Buffer;function o(t,p){for(var y in t)p[y]=t[y]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=s:(o(s,r),r.Buffer=i);function i(t,p,y){return n(t,p,y)}i.prototype=Object.create(n.prototype),o(n,i),i.from=function(t,p,y){if(typeof t=="number")throw new TypeError("Argument must not be a number");return n(t,p,y)},i.alloc=function(t,p,y){if(typeof t!="number")throw new TypeError("Argument must be a number");var u=n(t);return p!==void 0?typeof y=="string"?u.fill(p,y):u.fill(p):u.fill(0),u},i.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return n(t)},i.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return s.SlowBuffer(t)}})(si,si.exports);var no=si.exports,ao=no.Buffer;function _s(e,r){this._block=ao.alloc(e),this._finalSize=r,this._blockSize=e,this._len=0}_s.prototype.update=function(e,r){typeof e=="string"&&(r=r||"utf8",e=ao.from(e,r));for(var s=this._block,n=this._blockSize,o=e.length,i=this._len,t=0;t<o;){for(var p=i%n,y=Math.min(o-t,n-p),u=0;u<y;u++)s[p+u]=e[t+u];i+=y,t+=y,i%n===0&&this._update(s)}return this._len+=o,this};_s.prototype.digest=function(e){var r=this._len%this._blockSize;this._block[r]=128,this._block.fill(0,r+1),r>=this._finalSize&&(this._update(this._block),this._block.fill(0));var s=this._len*8;if(s<=4294967295)this._block.writeUInt32BE(s,this._blockSize-4);else{var n=(s&4294967295)>>>0,o=(s-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i};_s.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Ll=_s,Il=Pl,oo=Ll,Hl=no.Buffer,$l=[1518500249,1859775393,-1894007588,-899497514],Rl=new Array(80);function It(){this.init(),this._w=Rl,oo.call(this,64,56)}Il(It,oo);It.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Dl(e){return e<<1|e>>>31}function Bl(e){return e<<5|e>>>27}function Fl(e){return e<<30|e>>>2}function jl(e,r,s,n){return e===0?r&s|~r&n:e===2?r&s|r&n|s&n:r^s^n}It.prototype._update=function(e){for(var r=this._w,s=this._a|0,n=this._b|0,o=this._c|0,i=this._d|0,t=this._e|0,p=0;p<16;++p)r[p]=e.readInt32BE(p*4);for(;p<80;++p)r[p]=Dl(r[p-3]^r[p-8]^r[p-14]^r[p-16]);for(var y=0;y<80;++y){var u=~~(y/20),d=Bl(s)+jl(u,n,o,i)+t+r[y]+$l[u]|0;t=i,i=o,o=Fl(n),n=s,s=d}this._a=s+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=t+this._e|0};It.prototype._hash=function(){var e=Hl.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Nl=It;const Wl=hi(Nl);function Ul(e){let r="";for(const s of new Uint8Array(e))s<16&&(r+="0"),r+=s.toString(16);return r}let js=null;async function On(e){return js===null&&(js=await Ml()),js?po(e):ql(e)}function ql(e){return new Wl().update(e).digest("hex")}async function po(e){const r=await crypto.subtle.digest("SHA-1",e);return Ul(r)}async function Ml(){try{if(await po(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709")return!0}catch{}return!1}function Kl(e){const r=[];let s=0,n=0;do{s=e.readUInt8();const o=s&127;r.push(o),n=s&128}while(n);return r.reduce((o,i)=>o+1<<7|i,-1)}function zl(e,r){let s=r,n=4,o=null;do o=e.readUInt8(),s|=(o&127)<<n,n+=7;while(o&128);return s}class kt{constructor(r){Object.assign(this,r),this.offsetCache={}}static async fromIdx({idx:r,getExternalRefDelta:s}){const n=new Lr(r);if(n.slice(4).toString("hex")!=="ff744f63")return;const i=n.readUInt32BE();if(i!==2)throw new be(`Unable to read version ${i} packfile IDX. (Only version 2 supported)`);if(r.byteLength>2048*1024*1024)throw new be("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");n.seek(n.tell()+4*255);const t=n.readUInt32BE(),p=[];for(let d=0;d<t;d++){const g=n.slice(20).toString("hex");p[d]=g}n.seek(n.tell()+4*t);const y=new Map;for(let d=0;d<t;d++)y.set(p[d],n.readUInt32BE());const u=n.slice(20).toString("hex");return new kt({hashes:p,crcs:{},offsets:y,packfileSha:u,getExternalRefDelta:s})}static async fromPack({pack:r,getExternalRefDelta:s,onProgress:n}){const o={1:"commit",2:"tree",3:"blob",4:"tag",6:"ofs-delta",7:"ref-delta"},i={},t=r.slice(-20).toString("hex"),p=[],y={},u=new Map;let d=null,g=null;await _l([r],async({data:N,type:j,reference:q,offset:$,num:W})=>{d===null&&(d=W);const O=Math.floor((d-W)*100/d);O!==g&&n&&await n({phase:"Receiving objects",loaded:d-W,total:d}),g=O,j=o[j],["commit","tree","blob","tag"].includes(j)?i[$]={type:j,offset:$}:j==="ofs-delta"?i[$]={type:j,offset:$}:j==="ref-delta"&&(i[$]={type:j,offset:$})});const b=Object.keys(i).map(Number);for(const[N,j]of b.entries()){const q=N+1===b.length?r.byteLength-20:b[N+1],$=i[j],W=vp.buf(r.slice(j,q))>>>0;$.end=q,$.crc=W}const w=new kt({pack:Promise.resolve(r),packfileSha:t,crcs:y,hashes:p,offsets:u,getExternalRefDelta:s});g=null;let H=0;const P=[0,0,0,0,0,0,0,0,0,0,0,0];for(let N in i){N=Number(N);const j=Math.floor(H*100/d);j!==g&&n&&await n({phase:"Resolving deltas",loaded:H,total:d}),H++,g=j;const q=i[N];if(!q.oid)try{w.readDepth=0,w.externalReadDepth=0;const{type:$,object:W}=await w.readSlice({start:N});P[w.readDepth]+=1;const O=await On(Pp.wrap({type:$,object:W}));q.oid=O,p.push(O),u.set(O,N),y[O]=q.crc}catch{continue}}return p.sort(),w}async toBuffer(){const r=[],s=(u,d)=>{r.push(Buffer.from(u,d))};s("ff744f63","hex"),s("00000002","hex");const n=new Lr(Buffer.alloc(256*4));for(let u=0;u<256;u++){let d=0;for(const g of this.hashes)parseInt(g.slice(0,2),16)<=u&&d++;n.writeUInt32BE(d)}r.push(n.buffer);for(const u of this.hashes)s(u,"hex");const o=new Lr(Buffer.alloc(this.hashes.length*4));for(const u of this.hashes)o.writeUInt32BE(this.crcs[u]);r.push(o.buffer);const i=new Lr(Buffer.alloc(this.hashes.length*4));for(const u of this.hashes)i.writeUInt32BE(this.offsets.get(u));r.push(i.buffer),s(this.packfileSha,"hex");const t=Buffer.concat(r),p=await On(t),y=Buffer.alloc(20);return y.write(p,"hex"),Buffer.concat([t,y])}async load({pack:r}){this.pack=r}async unload(){this.pack=null}async read({oid:r}){if(!this.offsets.get(r)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(r);throw new be(`Could not read object ${r} from packfile`)}const s=this.offsets.get(r);return this.readSlice({start:s})}async readSlice({start:r}){if(this.offsetCache[r])return Object.assign({},this.offsetCache[r]);this.readDepth++;const s={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"};if(!this.pack)throw new be("Tried to read from a GitPackIndex with no packfile loaded into memory");const n=(await this.pack).slice(r),o=new Lr(n),i=o.readUInt8(),t=i&112;let p=s[t];if(p===void 0)throw new be("Unrecognized type: 0b"+t.toString(2));const y=i&15;let u=y;i&128&&(u=zl(o,y));let g=null,b=null;if(p==="ofs_delta"){const H=Kl(o),P=r-H;({object:g,type:p}=await this.readSlice({start:P}))}if(p==="ref_delta"){const H=o.slice(20).toString("hex");({object:g,type:p}=await this.read({oid:H}))}const w=n.slice(o.tell());if(b=Buffer.from(await bl(w)),b.byteLength!==u)throw new be(`Packfile told us object would have length ${u} but it had length ${b.byteLength}`);return g&&(b=Buffer.from(Ep(b,g))),this.readDepth>3&&(this.offsetCache[r]={type:p,object:b}),{type:p,format:"content",object:b}}}class St extends it{constructor(r){super(`Expected a 40-char hex object id but saw "${r}".`),this.code=this.name=St.code,this.data={value:r}}}St.code="InvalidOidError";class gs extends it{constructor(r,s,n,o){super(`Object ${r} ${o?`at ${o}`:""}was anticipated to be a ${n} but it is a ${s}.`),this.code=this.name=gs.code,this.data={oid:r,actual:s,expected:n,filepath:o}}}gs.code="ObjectTypeError";async function fo(e,r){const s=ua(e);for(;;){const{value:n,done:o}=await s.next();if(n&&await r(n),o)break}s.return&&s.return()}async function At(e){let r=0;const s=[];await fo(e,i=>{s.push(i),r+=i.byteLength});const n=new Uint8Array(r);let o=0;for(const i of s)n.set(i,o),o+=i.byteLength;return n}class Ns{constructor(){this._queue=[]}write(r){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){const s=this._waiting;this._waiting=null,s({value:r})}else this._queue.push(r)}end(){if(this._ended=!0,this._waiting){const r=this._waiting;this._waiting=null,r({done:!0})}}destroy(r){this.error=r,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(r=>{this._waiting=r})}}class Gl{static demux(r){const s=Ce.streamReader(r),n=new Ns,o=new Ns,i=new Ns,t=async function(){const p=await s();if(p===null)return t();if(p===!0){n.end(),i.end(),r.error?o.destroy(r.error):o.end();return}switch(p[0]){case 1:{o.write(p.slice(1));break}case 2:{i.write(p.slice(1));break}case 3:{const y=p.slice(1);i.write(y),n.end(),i.end(),o.destroy(new Error(y.toString("utf8")));return}default:n.write(p)}t()};return t(),{packetlines:n,packfile:o,progress:i}}}async function lo(e){const{packetlines:r,packfile:s,progress:n}=Gl.demux(e),o=[],i=[],t=[];let p=!1,y=!1;return new Promise((u,d)=>{fo(r,g=>{const b=g.toString("utf8").trim();if(b.startsWith("shallow")){const w=b.slice(-41).trim();w.length!==40&&d(new St(w)),o.push(w)}else if(b.startsWith("unshallow")){const w=b.slice(-41).trim();w.length!==40&&d(new St(w)),i.push(w)}else if(b.startsWith("ACK")){const[,w,H]=b.split(" ");t.push({oid:w,status:H}),H||(y=!0)}else b.startsWith("NAK")?(p=!0,y=!0):(y=!0,p=!0);y&&(e.error?d(e.error):u({shallows:o,unshallows:i,acks:t,nak:p,packfile:s,progress:n}))}).finally(()=>{y||(e.error?d(e.error):u({shallows:o,unshallows:i,acks:t,nak:p,packfile:s,progress:n}))})})}typeof window<"u"&&(window.Buffer=gr.Buffer);async function Zl(e,r,s){const o=(await co(e,r))[r],i=await ho(e,o),t=await Xl(i,o,s),p=await Ql(e,s.map(u=>t[u].oid)),y={};return await Promise.all(s.map(async u=>{y[u]=await yo(p,t[u].oid)})),y}async function Vl(e,r){const s=await co(e,r);if(!(r in s))throw new Error(`Branch ${r} not found`);const n=s[r],o=await ho(e,n),i=await Yl(o,n);return i!=null&&i.object?uo(i):[]}function uo(e){return e.object.map(r=>{if(r.type==="blob")return{name:r.path,type:"file"};if(r.type==="tree"&&r.object)return{name:r.path,type:"folder",children:uo(r)}}).filter(r=>!!(r!=null&&r.name))}async function co(e,r){const s=gr.Buffer.from(await At([Ce.encode(`command=ls-refs
709
+ `),Ce.encode(`agent=git/2.37.3
710
+ `),Ce.encode(`object-format=sha1
711
+ `),Ce.delim(),Ce.encode(`peel
712
+ `),Ce.encode(`ref-prefix ${r}
713
+ `),Ce.flush()])),n=await fetch(e+"/git-upload-pack",{method:"POST",headers:{Accept:"application/x-git-upload-pack-advertisement","content-type":"application/x-git-upload-pack-request","Content-Length":`${s.length}`,"Git-Protocol":"version=2"},body:s}),o={};for await(const i of Jl(n)){const t=i.indexOf(" "),p=i.slice(0,t),y=i.slice(t+1,i.length-1);o[y]=p}return o}async function ho(e,r){const s=gr.Buffer.from(await At([Ce.encode(`want ${r} multi_ack_detailed no-done side-band-64k thin-pack ofs-delta agent=git/2.37.3 filter
714
+ `),Ce.encode(`filter blob:none
715
+ `),Ce.encode(`shallow ${r}
716
+ `),Ce.encode(`deepen 1
717
+ `),Ce.flush(),Ce.encode(`done
718
+ `),Ce.encode(`done
719
+ `)])),n=await fetch(e+"/git-upload-pack",{method:"POST",headers:{Accept:"application/x-git-upload-pack-advertisement","content-type":"application/x-git-upload-pack-request","Content-Length":`${s.length}`},body:s}),o=mo(n.body),i=await lo(o),t=gr.Buffer.from(await At(i.packfile)),p=await kt.fromPack({pack:t}),y=p.read;return p.read=async function({oid:u,...d}){const g=await y.call(this,{oid:u,...d});return g.oid=u,g},p}async function Yl(e,r){const s=await e.read({oid:r});Rr(s);const n=await e.read({oid:s.object.tree}),o=[n];for(;o.length>0;){const i=o.pop(),t=await e.read({oid:i.oid});if(Rr(t),i.object=t.object,t.type==="tree")for(const p of t.object)p.type==="tree"&&o.push(p)}return n}async function Xl(e,r,s){const n=await e.read({oid:r});Rr(n);const o=await e.read({oid:n.object.tree});Rr(o);const i={};for(const t of s){let p=o;const y=t.split("/");for(const u of y){if(p.type!=="tree")throw new Error(`Path not found in the repo: ${t}`);let d=!1;for(const g of p.object)if(g.path===u){try{p=await e.read({oid:g.oid}),Rr(p)}catch{p=g}d=!0;break}if(!d)throw new Error(`Path not found in the repo: ${t}`)}i[t]=p}return i}async function Ql(e,r){const s=gr.Buffer.from(await At([...r.map(p=>Ce.encode(`want ${p} multi_ack_detailed no-done side-band-64k thin-pack ofs-delta agent=git/2.37.3
720
+ `)),Ce.flush(),Ce.encode(`done
721
+ `)])),n=await fetch(e+"/git-upload-pack",{method:"POST",headers:{Accept:"application/x-git-upload-pack-advertisement","content-type":"application/x-git-upload-pack-request","Content-Length":`${s.length}`},body:s}),o=mo(n.body),i=await lo(o),t=gr.Buffer.from(await At(i.packfile));return await kt.fromPack({pack:t})}async function yo(e,r){const s=await e.read({oid:r});if(Rr(s),s.type==="blob")return s.object;const n={};for(const{path:o,oid:i,type:t}of s.object)if(t==="blob"){const p=await e.read({oid:i});Rr(p),n[o]=p.object}else t==="tree"&&(n[o]=await yo(e,i));return n}function Rr(e){if(e.object instanceof gr.Buffer)switch(e.type){case"commit":e.object=Ne.from(e.object).parse();break;case"tree":e.object=_i.from(e.object).entries();break;case"blob":e.object=new Uint8Array(e.object),e.format="content";break;case"tag":e.object=ct.from(e.object).parse();break;default:throw new gs(e.oid,e.type,"blob|commit|tag|tree")}}async function*Jl(e){const r=await e.text();let s=0;for(;s<=r.length;){const n=parseInt(r.substring(s,s+4),16);if(n===0)break;yield r.substring(s+4,s+n),s+=n}}function mo(e){if(e[Symbol.asyncIterator])return e;const r=e.getReader();return{next(){return r.read()},return(){return r.releaseLock(),{}},[Symbol.asyncIterator](){return this}}}function eu(e,r){r=ai(r);const s=["",".","/"].includes(r);let n=e;if(s)r="";else{const t=r.split("/");for(const p of t){const y=n==null?void 0:n.find(u=>u.name===p);if((y==null?void 0:y.type)==="folder")n=y.children;else return y?[y.name]:[]}}const o=[],i=[{tree:n,path:r}];for(;i.length>0;){const{tree:t,path:p}=i.pop();for(const y of t){const u=`${p}${p?"/":""}${y.name}`;y.type==="folder"?i.push({tree:y.children,path:u}):o.push(u)}}return o}const ru=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url","git:directory"];function tu(e){return e&&typeof e=="object"&&typeof e.resource=="string"&&ru.includes(e.resource)}class br{get progress(){return this._progress}set progress(r){this._progress=r}setPlayground(r){this.playground=r}get isAsync(){return!1}static create(r,{semaphore:s,progress:n,corsProxy:o}){let i;switch(r.resource){case"vfs":i=new su(r,n);break;case"literal":i=new iu(r,n);break;case"wordpress.org/themes":i=new fu(r,n);break;case"wordpress.org/plugins":i=new lu(r,n);break;case"url":i=new au(r,n);break;case"git:directory":i=new ou(r,n,{corsProxy:o});break;case"literal:directory":i=new pu(r,n);break;default:throw new Error(`Invalid resource: ${r}`)}return i=new uu(i),s&&(i=new cu(i,s)),i}}class _o extends br{constructor(r){super(),this.resource=r}get progress(){return this.resource.progress}set progress(r){this.resource.progress=r}get name(){return this.resource.name}get isAsync(){return this.resource.isAsync}setPlayground(r){this.resource.setPlayground(r)}}class su extends br{constructor(r,s){super(),this.resource=r,this._progress=s}async resolve(){var s;const r=await this.playground.readFileAsBuffer(this.resource.path);return(s=this.progress)==null||s.set(100),new File([r],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class iu extends br{constructor(r,s){super(),this.resource=r,this._progress=s}async resolve(){var r;return(r=this.progress)==null||r.set(100),new File([this.resource.contents],this.resource.name)}get name(){return this.resource.name}}class Ai extends br{constructor(r){super(),this._progress=r}async resolve(){var s,n;(s=this.progress)==null||s.setCaption(this.caption);const r=this.getURL();try{let o=await fetch(r);if(!o.ok)throw new Error(`Could not download "${r}"`);if(o=await ap(o,((n=this.progress)==null?void 0:n.loadingListener)??nu),o.status!==200)throw new Error(`Could not download "${r}"`);return new File([await o.blob()],this.name)}catch(o){throw new Error(`Could not download "${r}".
726
722
  Check if the URL is correct and the server is reachable.
727
723
  If it is reachable, the server might be blocking the request.
728
724
  Check the browser console and network tabs for more information.
@@ -746,15 +742,15 @@ gpgsig`+ks(t)+`
746
742
  https://raw.githubusercontent.com/username/repository/branch/filename
747
743
 
748
744
  Error:
749
- ${o}`)}}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 iu=()=>{};class nu extends Oi{constructor(r,s){if(super(s),this.resource=r,this.resource.url.startsWith("https://github.com/")){const n=this.resource.url.match(/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/blob\/(?<branch>[^/]+)\/(?<path>.+[^/])$/);n!=null&&n.groups&&(this.resource={...this.resource,url:`https://raw.githubusercontent.com/${n.groups.owner}/${n.groups.repo}/${n.groups.branch}/${n.groups.path}`})}}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class au extends _r{constructor(r,s,n){super(),this.reference=r,this._progress=s,this.options=n}async resolve(){var p;const r=(p=this.options)!=null&&p.corsProxy?`${this.options.corsProxy}?${this.reference.url}`:this.reference.url,s=["","HEAD"].includes(this.reference.ref)?"HEAD":`refs/heads/${this.reference.ref}`,n=await Gl(r,s),o=this.reference.path.replace(/^\/+/,""),i=Jl(n,o);let t=await Vl(r,s,i);return t=Object.fromEntries(Object.entries(t).map(([y,u])=>(y=y.substring(this.reference.path.length),y=y.replace(/^\/+/,""),[y,u]))),{name:gt(this.reference.path)||this.reference.url.replaceAll(/[^a-zA-Z0-9-.]/g,"-").replaceAll(/-+/g,"-"),files:t}}get name(){return this.reference.path.split("/").pop()}}class ou extends _r{constructor(r,s){super(),this.reference=r,this._progress=s}async resolve(){return this.reference}get name(){return this.reference.name}}class pu extends Oi{constructor(r,s){super(s),this.resource=r}get name(){return fs(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${go(this.resource.slug)}`}}class fu extends Oi{constructor(r,s){super(s),this.resource=r}get name(){return fs(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${go(this.resource.slug)}`}}function go(e){return!e||e.endsWith(".zip")?e:e+".latest-stable.zip"}class lu extends mo{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class uu extends mo{constructor(r,s){super(r),this.semaphore=s}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}const cu={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},extraLibraries:{type:"array",items:{$ref:"#/definitions/ExtraLibrary"},description:"Extra libraries to preload into the Playground instance."},constants:{$ref:"#/definitions/PHPConstants",description:"PHP Constants to define on every request"},plugins:{type:"array",items:{anyOf:[{type:"string"},{$ref:"#/definitions/FileReference"}]},description:"WordPress plugins to install and activate"},siteOptions:{type:"object",additionalProperties:{type:"string"},properties:{blogname:{type:"string",description:"The site title"}},description:"WordPress site options to define"},login:{anyOf:[{type:"boolean"},{type:"object",properties:{username:{type:"string"},password:{type:"string"}},required:["username","password"],additionalProperties:!1}],description:"User to log in as. If true, logs the user in as admin/password."},phpExtensionBundles:{deprecated:"No longer used. Feel free to remove it from your Blueprint."},steps:{type:"array",items:{anyOf:[{$ref:"#/definitions/StepDefinition"},{type:"string"},{not:{}},{type:"boolean",const:!1},{type:"null"}]},description:"The steps to run after every other operation in this Blueprint was executed."},$schema:{type:"string"}},additionalProperties:!1},du={type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},hu={type:"object",additionalProperties:{type:["string","boolean","number"]}},wo=Object.prototype.hasOwnProperty;function le(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;const p=t;let y=!1;const u=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let U;if(e.resource===void 0&&(U="resource")||e.path===void 0&&(U="path")){const A={instancePath:r,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:U},message:"must have required property '"+U+"'"};i===null?i=[A]:i.push(A),t++}else{const A=t;for(const x in e)if(!(x==="resource"||x==="path")){const N={instancePath:r,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:x},message:"must NOT have additional properties"};i===null?i=[N]:i.push(N),t++;break}if(A===t){if(e.resource!==void 0){let x=e.resource;const N=t;if(typeof x!="string"){const S={instancePath:r+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[S]:i.push(S),t++}if(x!=="vfs"){const S={instancePath:r+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};i===null?i=[S]:i.push(S),t++}var w=N===t}else var w=!0;if(w)if(e.path!==void 0){const x=t;if(typeof e.path!="string"){const S={instancePath:r+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[S]:i.push(S),t++}var w=x===t}else var w=!0}}}else{const U={instancePath:r,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[U]:i.push(U),t++}var _=u===t;if(y=y||_,!y){const U=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let N;if(e.resource===void 0&&(N="resource")||e.name===void 0&&(N="name")||e.contents===void 0&&(N="contents")){const S={instancePath:r,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};i===null?i=[S]:i.push(S),t++}else{const S=t;for(const T in e)if(!(T==="resource"||T==="name"||T==="contents")){const E={instancePath:r,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:T},message:"must NOT have additional properties"};i===null?i=[E]:i.push(E),t++;break}if(S===t){if(e.resource!==void 0){let T=e.resource;const E=t;if(typeof T!="string"){const O={instancePath:r+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[O]:i.push(O),t++}if(T!=="literal"){const O={instancePath:r+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};i===null?i=[O]:i.push(O),t++}var b=E===t}else var b=!0;if(b){if(e.name!==void 0){const T=t;if(typeof e.name!="string"){const O={instancePath:r+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[O]:i.push(O),t++}var b=T===t}else var b=!0;if(b)if(e.contents!==void 0){let T=e.contents;const E=t,O=t;let C=!1;const L=t;if(typeof T!="string"){const Y={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Y]:i.push(Y),t++}var B=L===t;if(C=C||B,!C){const Y=t;if(t===Y)if(T&&typeof T=="object"&&!Array.isArray(T)){let H;if(T.BYTES_PER_ELEMENT===void 0&&(H="BYTES_PER_ELEMENT")||T.buffer===void 0&&(H="buffer")||T.byteLength===void 0&&(H="byteLength")||T.byteOffset===void 0&&(H="byteOffset")||T.length===void 0&&(H="length")){const K={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:H},message:"must have required property '"+H+"'"};i===null?i=[K]:i.push(K),t++}else{const K=t;for(const V in T)if(!(V==="BYTES_PER_ELEMENT"||V==="buffer"||V==="byteLength"||V==="byteOffset"||V==="length")){let se=T[V];const ee=t;if(!(typeof se=="number"&&isFinite(se))){const X={instancePath:r+"/contents/"+V.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=[X]:i.push(X),t++}var P=ee===t;if(!P)break}if(K===t){if(T.BYTES_PER_ELEMENT!==void 0){let V=T.BYTES_PER_ELEMENT;const se=t;if(!(typeof V=="number"&&isFinite(V))){const ee={instancePath:r+"/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=[ee]:i.push(ee),t++}var q=se===t}else var q=!0;if(q){if(T.buffer!==void 0){let V=T.buffer;const se=t;if(t===se)if(V&&typeof V=="object"&&!Array.isArray(V)){let X;if(V.byteLength===void 0&&(X="byteLength")){const Q={instancePath:r+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:X},message:"must have required property '"+X+"'"};i===null?i=[Q]:i.push(Q),t++}else{const Q=t;for(const re in V)if(re!=="byteLength"){const ne={instancePath:r+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:re},message:"must NOT have additional properties"};i===null?i=[ne]:i.push(ne),t++;break}if(Q===t&&V.byteLength!==void 0){let re=V.byteLength;if(!(typeof re=="number"&&isFinite(re))){const ne={instancePath:r+"/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=[ne]:i.push(ne),t++}}}}else{const X={instancePath:r+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[X]:i.push(X),t++}var q=se===t}else var q=!0;if(q){if(T.byteLength!==void 0){let V=T.byteLength;const se=t;if(!(typeof V=="number"&&isFinite(V))){const X={instancePath:r+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var q=se===t}else var q=!0;if(q){if(T.byteOffset!==void 0){let V=T.byteOffset;const se=t;if(!(typeof V=="number"&&isFinite(V))){const X={instancePath:r+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var q=se===t}else var q=!0;if(q)if(T.length!==void 0){let V=T.length;const se=t;if(!(typeof V=="number"&&isFinite(V))){const X={instancePath:r+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var q=se===t}else var q=!0}}}}}}else{const H={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[H]:i.push(H),t++}var B=Y===t;C=C||B}if(C)t=O,i!==null&&(O?i.length=O:i=null);else{const Y={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[Y]:i.push(Y),t++}var b=E===t}else var b=!0}}}}else{const N={instancePath:r,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[N]:i.push(N),t++}var _=U===t;if(y=y||_,!y){const N=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let E;if(e.resource===void 0&&(E="resource")||e.slug===void 0&&(E="slug")){const O={instancePath:r,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:E},message:"must have required property '"+E+"'"};i===null?i=[O]:i.push(O),t++}else{const O=t;for(const C in e)if(!(C==="resource"||C==="slug")){const L={instancePath:r,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:C},message:"must NOT have additional properties"};i===null?i=[L]:i.push(L),t++;break}if(O===t){if(e.resource!==void 0){let C=e.resource;const L=t;if(typeof C!="string"){const F={instancePath:r+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[F]:i.push(F),t++}if(C!=="wordpress.org/themes"){const F={instancePath:r+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};i===null?i=[F]:i.push(F),t++}var D=L===t}else var D=!0;if(D)if(e.slug!==void 0){const C=t;if(typeof e.slug!="string"){const F={instancePath:r+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[F]:i.push(F),t++}var D=C===t}else var D=!0}}}else{const E={instancePath:r,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[E]:i.push(E),t++}var _=N===t;if(y=y||_,!y){const E=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.resource===void 0&&(L="resource")||e.slug===void 0&&(L="slug")){const F={instancePath:r,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};i===null?i=[F]:i.push(F),t++}else{const F=t;for(const Y in e)if(!(Y==="resource"||Y==="slug")){const Z={instancePath:r,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Y},message:"must NOT have additional properties"};i===null?i=[Z]:i.push(Z),t++;break}if(F===t){if(e.resource!==void 0){let Y=e.resource;const Z=t;if(typeof Y!="string"){const H={instancePath:r+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),t++}if(Y!=="wordpress.org/plugins"){const H={instancePath:r+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};i===null?i=[H]:i.push(H),t++}var M=Z===t}else var M=!0;if(M)if(e.slug!==void 0){const Y=t;if(typeof e.slug!="string"){const H={instancePath:r+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),t++}var M=Y===t}else var M=!0}}}else{const L={instancePath:r,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[L]:i.push(L),t++}var _=E===t;if(y=y||_,!y){const L=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let Z;if(e.resource===void 0&&(Z="resource")||e.url===void 0&&(Z="url")){const H={instancePath:r,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:Z},message:"must have required property '"+Z+"'"};i===null?i=[H]:i.push(H),t++}else{const H=t;for(const K in e)if(!(K==="resource"||K==="url"||K==="caption")){const V={instancePath:r,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:K},message:"must NOT have additional properties"};i===null?i=[V]:i.push(V),t++;break}if(H===t){if(e.resource!==void 0){let K=e.resource;const V=t;if(typeof K!="string"){const se={instancePath:r+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[se]:i.push(se),t++}if(K!=="url"){const se={instancePath:r+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};i===null?i=[se]:i.push(se),t++}var I=V===t}else var I=!0;if(I){if(e.url!==void 0){const K=t;if(typeof e.url!="string"){const se={instancePath:r+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[se]:i.push(se),t++}var I=K===t}else var I=!0;if(I)if(e.caption!==void 0){const K=t;if(typeof e.caption!="string"){const se={instancePath:r+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[se]:i.push(se),t++}var I=K===t}else var I=!0}}}}else{const Z={instancePath:r,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Z]:i.push(Z),t++}var _=L===t;y=y||_}}}}if(y)t=p,i!==null&&(p?i.length=p:i=null);else{const U={instancePath:r,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[U]:i.push(U),t++,le.errors=i,!1}return le.errors=i,t===0}const qs={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:
745
+ ${o}`)}}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 nu=()=>{};class au extends Ai{constructor(r,s){if(super(s),this.resource=r,this.resource.url.startsWith("https://github.com/")){const n=this.resource.url.match(/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/blob\/(?<branch>[^/]+)\/(?<path>.+[^/])$/);n!=null&&n.groups&&(this.resource={...this.resource,url:`https://raw.githubusercontent.com/${n.groups.owner}/${n.groups.repo}/${n.groups.branch}/${n.groups.path}`})}}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class ou extends br{constructor(r,s,n){super(),this.reference=r,this._progress=s,this.options=n}async resolve(){var p;const r=(p=this.options)!=null&&p.corsProxy?`${this.options.corsProxy}?${this.reference.url}`:this.reference.url,s=["","HEAD"].includes(this.reference.ref)?"HEAD":`refs/heads/${this.reference.ref}`,n=await Vl(r,s),o=this.reference.path.replace(/^\/+/,""),i=eu(n,o);let t=await Zl(r,s,i);return t=Object.fromEntries(Object.entries(t).map(([y,u])=>(y=y.substring(this.reference.path.length),y=y.replace(/^\/+/,""),[y,u]))),{name:gt(this.reference.path)||this.reference.url.replaceAll(/[^a-zA-Z0-9-.]/g,"-").replaceAll(/-+/g,"-"),files:t}}get name(){return this.reference.path.split("/").pop()}}class pu extends br{constructor(r,s){super(),this.reference=r,this._progress=s}async resolve(){return this.reference}get name(){return this.reference.name}}class fu extends Ai{constructor(r,s){super(s),this.resource=r}get name(){return ls(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${go(this.resource.slug)}`}}class lu extends Ai{constructor(r,s){super(s),this.resource=r}get name(){return ls(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${go(this.resource.slug)}`}}function go(e){return!e||e.endsWith(".zip")?e:e+".latest-stable.zip"}class uu extends _o{async resolve(){return this.promise||(this.promise=this.resource.resolve()),this.promise}}class cu extends _o{constructor(r,s){super(r),this.semaphore=s}async resolve(){return this.isAsync?this.semaphore.run(()=>this.resource.resolve()):this.resource.resolve()}}const du={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},extraLibraries:{type:"array",items:{$ref:"#/definitions/ExtraLibrary"},description:"Extra libraries to preload into the Playground instance."},constants:{$ref:"#/definitions/PHPConstants",description:"PHP Constants to define on every request"},plugins:{type:"array",items:{anyOf:[{type:"string"},{$ref:"#/definitions/FileReference"}]},description:"WordPress plugins to install and activate"},siteOptions:{type:"object",additionalProperties:{type:"string"},properties:{blogname:{type:"string",description:"The site title"}},description:"WordPress site options to define"},login:{anyOf:[{type:"boolean"},{type:"object",properties:{username:{type:"string"},password:{type:"string"}},required:["username","password"],additionalProperties:!1}],description:"User to log in as. If true, logs the user in as admin/password."},phpExtensionBundles:{deprecated:"No longer used. Feel free to remove it from your Blueprint."},steps:{type:"array",items:{anyOf:[{$ref:"#/definitions/StepDefinition"},{type:"string"},{not:{}},{type:"boolean",const:!1},{type:"null"}]},description:"The steps to run after every other operation in this Blueprint was executed."},$schema:{type:"string"}},additionalProperties:!1},hu={type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},yu={type:"object",additionalProperties:{type:["string","boolean","number"]}},wo=Object.prototype.hasOwnProperty;function le(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;const p=t;let y=!1;const u=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let W;if(e.resource===void 0&&(W="resource")||e.path===void 0&&(W="path")){const O={instancePath:r,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:W},message:"must have required property '"+W+"'"};i===null?i=[O]:i.push(O),t++}else{const O=t;for(const A in e)if(!(A==="resource"||A==="path")){const B={instancePath:r,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:A},message:"must NOT have additional properties"};i===null?i=[B]:i.push(B),t++;break}if(O===t){if(e.resource!==void 0){let A=e.resource;const B=t;if(typeof A!="string"){const x={instancePath:r+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[x]:i.push(x),t++}if(A!=="vfs"){const x={instancePath:r+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};i===null?i=[x]:i.push(x),t++}var g=B===t}else var g=!0;if(g)if(e.path!==void 0){const A=t;if(typeof e.path!="string"){const x={instancePath:r+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[x]:i.push(x),t++}var g=A===t}else var g=!0}}}else{const W={instancePath:r,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[W]:i.push(W),t++}var b=u===t;if(y=y||b,!y){const W=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let B;if(e.resource===void 0&&(B="resource")||e.name===void 0&&(B="name")||e.contents===void 0&&(B="contents")){const x={instancePath:r,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:B},message:"must have required property '"+B+"'"};i===null?i=[x]:i.push(x),t++}else{const x=t;for(const T in e)if(!(T==="resource"||T==="name"||T==="contents")){const k={instancePath:r,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:T},message:"must NOT have additional properties"};i===null?i=[k]:i.push(k),t++;break}if(x===t){if(e.resource!==void 0){let T=e.resource;const k=t;if(typeof T!="string"){const S={instancePath:r+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[S]:i.push(S),t++}if(T!=="literal"){const S={instancePath:r+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};i===null?i=[S]:i.push(S),t++}var w=k===t}else var w=!0;if(w){if(e.name!==void 0){const T=t;if(typeof e.name!="string"){const S={instancePath:r+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[S]:i.push(S),t++}var w=T===t}else var w=!0;if(w)if(e.contents!==void 0){let T=e.contents;const k=t,S=t;let F=!1;const D=t;if(typeof T!="string"){const V={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),t++}var H=D===t;if(F=F||H,!F){const V=t;if(t===V)if(T&&typeof T=="object"&&!Array.isArray(T)){let K;if(T.BYTES_PER_ELEMENT===void 0&&(K="BYTES_PER_ELEMENT")||T.buffer===void 0&&(K="buffer")||T.byteLength===void 0&&(K="byteLength")||T.byteOffset===void 0&&(K="byteOffset")||T.length===void 0&&(K="length")){const Y={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:K},message:"must have required property '"+K+"'"};i===null?i=[Y]:i.push(Y),t++}else{const Y=t;for(const G in T)if(!(G==="BYTES_PER_ELEMENT"||G==="buffer"||G==="byteLength"||G==="byteOffset"||G==="length")){let se=T[G];const ee=t;if(!(typeof se=="number"&&isFinite(se))){const X={instancePath:r+"/contents/"+G.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=[X]:i.push(X),t++}var P=ee===t;if(!P)break}if(Y===t){if(T.BYTES_PER_ELEMENT!==void 0){let G=T.BYTES_PER_ELEMENT;const se=t;if(!(typeof G=="number"&&isFinite(G))){const ee={instancePath:r+"/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=[ee]:i.push(ee),t++}var N=se===t}else var N=!0;if(N){if(T.buffer!==void 0){let G=T.buffer;const se=t;if(t===se)if(G&&typeof G=="object"&&!Array.isArray(G)){let X;if(G.byteLength===void 0&&(X="byteLength")){const Q={instancePath:r+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:X},message:"must have required property '"+X+"'"};i===null?i=[Q]:i.push(Q),t++}else{const Q=t;for(const re in G)if(re!=="byteLength"){const ne={instancePath:r+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:re},message:"must NOT have additional properties"};i===null?i=[ne]:i.push(ne),t++;break}if(Q===t&&G.byteLength!==void 0){let re=G.byteLength;if(!(typeof re=="number"&&isFinite(re))){const ne={instancePath:r+"/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=[ne]:i.push(ne),t++}}}}else{const X={instancePath:r+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[X]:i.push(X),t++}var N=se===t}else var N=!0;if(N){if(T.byteLength!==void 0){let G=T.byteLength;const se=t;if(!(typeof G=="number"&&isFinite(G))){const X={instancePath:r+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var N=se===t}else var N=!0;if(N){if(T.byteOffset!==void 0){let G=T.byteOffset;const se=t;if(!(typeof G=="number"&&isFinite(G))){const X={instancePath:r+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var N=se===t}else var N=!0;if(N)if(T.length!==void 0){let G=T.length;const se=t;if(!(typeof G=="number"&&isFinite(G))){const X={instancePath:r+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[X]:i.push(X),t++}var N=se===t}else var N=!0}}}}}}else{const K={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[K]:i.push(K),t++}var H=V===t;F=F||H}if(F)t=S,i!==null&&(S?i.length=S:i=null);else{const V={instancePath:r+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[V]:i.push(V),t++}var w=k===t}else var w=!0}}}}else{const B={instancePath:r,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[B]:i.push(B),t++}var b=W===t;if(y=y||b,!y){const B=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let k;if(e.resource===void 0&&(k="resource")||e.slug===void 0&&(k="slug")){const S={instancePath:r,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:k},message:"must have required property '"+k+"'"};i===null?i=[S]:i.push(S),t++}else{const S=t;for(const F in e)if(!(F==="resource"||F==="slug")){const D={instancePath:r,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:F},message:"must NOT have additional properties"};i===null?i=[D]:i.push(D),t++;break}if(S===t){if(e.resource!==void 0){let F=e.resource;const D=t;if(typeof F!="string"){const I={instancePath:r+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[I]:i.push(I),t++}if(F!=="wordpress.org/themes"){const I={instancePath:r+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};i===null?i=[I]:i.push(I),t++}var j=D===t}else var j=!0;if(j)if(e.slug!==void 0){const F=t;if(typeof e.slug!="string"){const I={instancePath:r+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[I]:i.push(I),t++}var j=F===t}else var j=!0}}}else{const k={instancePath:r,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[k]:i.push(k),t++}var b=B===t;if(y=y||b,!y){const k=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let D;if(e.resource===void 0&&(D="resource")||e.slug===void 0&&(D="slug")){const I={instancePath:r,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:D},message:"must have required property '"+D+"'"};i===null?i=[I]:i.push(I),t++}else{const I=t;for(const V in e)if(!(V==="resource"||V==="slug")){const z={instancePath:r,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:V},message:"must NOT have additional properties"};i===null?i=[z]:i.push(z),t++;break}if(I===t){if(e.resource!==void 0){let V=e.resource;const z=t;if(typeof V!="string"){const K={instancePath:r+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),t++}if(V!=="wordpress.org/plugins"){const K={instancePath:r+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};i===null?i=[K]:i.push(K),t++}var q=z===t}else var q=!0;if(q)if(e.slug!==void 0){const V=t;if(typeof e.slug!="string"){const K={instancePath:r+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),t++}var q=V===t}else var q=!0}}}else{const D={instancePath:r,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[D]:i.push(D),t++}var b=k===t;if(y=y||b,!y){const D=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let z;if(e.resource===void 0&&(z="resource")||e.url===void 0&&(z="url")){const K={instancePath:r,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:z},message:"must have required property '"+z+"'"};i===null?i=[K]:i.push(K),t++}else{const K=t;for(const Y in e)if(!(Y==="resource"||Y==="url"||Y==="caption")){const G={instancePath:r,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Y},message:"must NOT have additional properties"};i===null?i=[G]:i.push(G),t++;break}if(K===t){if(e.resource!==void 0){let Y=e.resource;const G=t;if(typeof Y!="string"){const se={instancePath:r+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[se]:i.push(se),t++}if(Y!=="url"){const se={instancePath:r+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};i===null?i=[se]:i.push(se),t++}var $=G===t}else var $=!0;if($){if(e.url!==void 0){const Y=t;if(typeof e.url!="string"){const se={instancePath:r+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[se]:i.push(se),t++}var $=Y===t}else var $=!0;if($)if(e.caption!==void 0){const Y=t;if(typeof e.caption!="string"){const se={instancePath:r+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[se]:i.push(se),t++}var $=Y===t}else var $=!0}}}}else{const z={instancePath:r,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[z]:i.push(z),t++}var b=D===t;y=y||b}}}}if(y)t=p,i!==null&&(p?i.length=p:i=null);else{const W={instancePath:r,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[W]:i.push(W),t++,le.errors=i,!1}return le.errors=i,t===0}const Ws={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:
750
746
 
751
747
  - 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.
752
748
 
753
749
  - 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.
754
750
  This option is only kept in here to avoid breaking Blueprint schema validation
755
751
  for existing apps using this option.`}},required:["consts","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineSiteUrl"},siteUrl:{type:"string",description:"The URL"}},required:["siteUrl","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"enableMultisite"},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWxr"},file:{$ref:"#/definitions/FileReference",description:"The file to import"}},required:["file","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importThemeStarterContent",description:"The step identifier."},themeSlug:{type:"string",description:"The name of the theme to import content from."}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWordPressFiles"},wordPressFilesZip:{$ref:"#/definitions/FileReference",description:"The zip file containing the top-level WordPress files and directories."},pathInZip:{type:"string",description:"The path inside the zip file where the WordPress files are."}},required:["step","wordPressFilesZip"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installPlugin",description:"The step identifier."},pluginData:{anyOf:[{$ref:"#/definitions/FileReference"},{$ref:"#/definitions/DirectoryReference"}],description:"The plugin files to install. It can be either a plugin zip file, or a directory containing all the plugin files at its root."},pluginZipFile:{$ref:"#/definitions/FileReference",deprecated:". Use `pluginData` instead."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginData","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installTheme",description:"The step identifier."},themeData:{anyOf:[{$ref:"#/definitions/FileReference"},{$ref:"#/definitions/DirectoryReference"}],description:"The theme files to install. It can be either a theme zip file, or a directory containing all the theme files at its root."},themeZipFile:{$ref:"#/definitions/FileReference",deprecated:". Use `themeData` instead."},options:{$ref:"#/definitions/InstallThemeOptions",description:"Optional installation options."}},required:["step","themeData"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"login"},username:{type:"string",description:"The user to log in as. Defaults to 'admin'."},password:{type:"string",deprecated:`The password field is deprecated and will be removed in a future version.
756
- Only the username field is required for user authentication.`}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mkdir"},path:{type:"string",description:"The path of the directory you want to create"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mv"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"resetData"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"request"},request:{$ref:"#/definitions/PHPRequest",description:"Request details (See /wordpress-playground/api/universal/interface/PHPRequest)"}},required:["request","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rm"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rmdir"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHP",description:"The step identifier."},code:{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:"writeFiles"},writeToPath:{type:"string",description:"The path of the file to write to"},filesTree:{$ref:"#/definitions/DirectoryReference",description:"The data to write"}},required:["filesTree","step","writeToPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"wp-cli",description:"The step identifier."},command:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"The WP CLI command to run."},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["command","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteLanguage"},language:{type:"string",description:"The language to set, e.g. 'en_US'"}},required:["language","step"]}]},yu={type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]},properties:{}},Us={validate:jr};function jr(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e))for(const u in e){let d=e[u];const w=t,_=t;let b=!1;const B=t;Us.validate(d,{instancePath:r+"/"+u.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:u,rootData:o})||(i=i===null?Us.validate.errors:i.concat(Us.validate.errors),t=i.length);var p=B===t;if(b=b||p,!b){const P=t;if(!(d&&typeof d=="object"&&!Array.isArray(d))&&typeof d!="string"){const D={instancePath:r+"/"+u.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:yu.additionalProperties.anyOf[1].type},message:"must be object,string"};i===null?i=[D]:i.push(D),t++}var p=P===t;b=b||p}if(b)t=_,i!==null&&(_?i.length=_:i=null);else{const P={instancePath:r+"/"+u.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[P]:i.push(P),t++,jr.errors=i,!1}var y=w===t;if(!y)break}else return jr.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return jr.errors=i,t===0}function or(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){let y;if(e.files===void 0&&(y="files")||e.name===void 0&&(y="name")||e.resource===void 0&&(y="resource"))return or.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:y},message:"must have required property '"+y+"'"}],!1;{const u=t;for(const d in e)if(!(d==="resource"||d==="files"||d==="name"))return or.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:d},message:"must NOT have additional properties"}],!1;if(u===t){if(e.resource!==void 0){let d=e.resource;const w=t;if(typeof d!="string")return or.errors=[{instancePath:r+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(d!=="literal:directory")return or.errors=[{instancePath:r+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var p=w===t}else var p=!0;if(p){if(e.files!==void 0){const d=t;jr(e.files,{instancePath:r+"/files",parentData:e,parentDataProperty:"files",rootData:o})||(i=i===null?jr.errors:i.concat(jr.errors),t=i.length);var p=d===t}else var p=!0;if(p)if(e.name!==void 0){const d=t;if(typeof e.name!="string")return or.errors=[{instancePath:r+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=d===t}else var p=!0}}}}else return or.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return or.errors=i,t===0}function Je(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;const p=t;let y=!1;const u=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let b;if(e.resource===void 0&&(b="resource")||e.url===void 0&&(b="url")||e.ref===void 0&&(b="ref")||e.path===void 0&&(b="path")){const B={instancePath:r,schemaPath:"#/definitions/GitDirectoryReference/required",keyword:"required",params:{missingProperty:b},message:"must have required property '"+b+"'"};i===null?i=[B]:i.push(B),t++}else{const B=t;for(const P in e)if(!(P==="resource"||P==="url"||P==="ref"||P==="path")){const q={instancePath:r,schemaPath:"#/definitions/GitDirectoryReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};i===null?i=[q]:i.push(q),t++;break}if(B===t){if(e.resource!==void 0){let P=e.resource;const q=t;if(typeof P!="string"){const D={instancePath:r+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[D]:i.push(D),t++}if(P!=="git:directory"){const D={instancePath:r+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/const",keyword:"const",params:{allowedValue:"git:directory"},message:"must be equal to constant"};i===null?i=[D]:i.push(D),t++}var w=q===t}else var w=!0;if(w){if(e.url!==void 0){const P=t;if(typeof e.url!="string"){const D={instancePath:r+"/url",schemaPath:"#/definitions/GitDirectoryReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[D]:i.push(D),t++}var w=P===t}else var w=!0;if(w){if(e.ref!==void 0){const P=t;if(typeof e.ref!="string"){const D={instancePath:r+"/ref",schemaPath:"#/definitions/GitDirectoryReference/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[D]:i.push(D),t++}var w=P===t}else var w=!0;if(w)if(e.path!==void 0){const P=t;if(typeof e.path!="string"){const D={instancePath:r+"/path",schemaPath:"#/definitions/GitDirectoryReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[D]:i.push(D),t++}var w=P===t}else var w=!0}}}}}else{const b={instancePath:r,schemaPath:"#/definitions/GitDirectoryReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[b]:i.push(b),t++}var _=u===t;if(y=y||_,!y){const b=t;or(e,{instancePath:r,parentData:s,parentDataProperty:n,rootData:o})||(i=i===null?or.errors:i.concat(or.errors),t=i.length);var _=b===t;y=y||_}if(y)t=p,i!==null&&(p?i.length=p:i=null);else{const b={instancePath:r,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[b]:i.push(b),t++,Je.errors=i,!1}return Je.errors=i,t===0}const bo={type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function Ue(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){let D;if(e.url===void 0&&(D="url"))return Ue.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:D},message:"must have required property '"+D+"'"}],!1;{const M=t;for(const I in e)if(!(I==="method"||I==="url"||I==="headers"||I==="body"))return Ue.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:I},message:"must NOT have additional properties"}],!1;if(M===t){if(e.method!==void 0){let I=e.method;const U=t;if(typeof I!="string")return Ue.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(I==="GET"||I==="POST"||I==="HEAD"||I==="OPTIONS"||I==="PATCH"||I==="PUT"||I==="DELETE"))return Ue.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:bo.enum},message:"must be equal to one of the allowed values"}],!1;var p=U===t}else var p=!0;if(p){if(e.url!==void 0){const I=t;if(typeof e.url!="string")return Ue.errors=[{instancePath:r+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=I===t}else var p=!0;if(p){if(e.headers!==void 0){let I=e.headers;const U=t;if(t===t)if(I&&typeof I=="object"&&!Array.isArray(I))for(const N in I){const S=t;if(typeof I[N]!="string")return Ue.errors=[{instancePath:r+"/headers/"+N.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=S===t;if(!y)break}else return Ue.errors=[{instancePath:r+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=U===t}else var p=!0;if(p)if(e.body!==void 0){let I=e.body;const U=t,A=t;let x=!1;const N=t;if(typeof I!="string"){const T={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[T]:i.push(T),t++}var u=N===t;if(x=x||u,!x){const T=t;if(t===T)if(I&&typeof I=="object"&&!Array.isArray(I)){let O;if(I.BYTES_PER_ELEMENT===void 0&&(O="BYTES_PER_ELEMENT")||I.buffer===void 0&&(O="buffer")||I.byteLength===void 0&&(O="byteLength")||I.byteOffset===void 0&&(O="byteOffset")||I.length===void 0&&(O="length")){const C={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};i===null?i=[C]:i.push(C),t++}else{const C=t;for(const L in I)if(!(L==="BYTES_PER_ELEMENT"||L==="buffer"||L==="byteLength"||L==="byteOffset"||L==="length")){let F=I[L];const Y=t;if(!(typeof F=="number"&&isFinite(F))){const Z={instancePath:r+"/body/"+L.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=[Z]:i.push(Z),t++}var d=Y===t;if(!d)break}if(C===t){if(I.BYTES_PER_ELEMENT!==void 0){let L=I.BYTES_PER_ELEMENT;const F=t;if(!(typeof L=="number"&&isFinite(L))){const Y={instancePath:r+"/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=[Y]:i.push(Y),t++}var w=F===t}else var w=!0;if(w){if(I.buffer!==void 0){let L=I.buffer;const F=t;if(t===F)if(L&&typeof L=="object"&&!Array.isArray(L)){let Z;if(L.byteLength===void 0&&(Z="byteLength")){const H={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:Z},message:"must have required property '"+Z+"'"};i===null?i=[H]:i.push(H),t++}else{const H=t;for(const K in L)if(K!=="byteLength"){const V={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:K},message:"must NOT have additional properties"};i===null?i=[V]:i.push(V),t++;break}if(H===t&&L.byteLength!==void 0){let K=L.byteLength;if(!(typeof K=="number"&&isFinite(K))){const V={instancePath:r+"/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=[V]:i.push(V),t++}}}}else{const Z={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Z]:i.push(Z),t++}var w=F===t}else var w=!0;if(w){if(I.byteLength!==void 0){let L=I.byteLength;const F=t;if(!(typeof L=="number"&&isFinite(L))){const Z={instancePath:r+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),t++}var w=F===t}else var w=!0;if(w){if(I.byteOffset!==void 0){let L=I.byteOffset;const F=t;if(!(typeof L=="number"&&isFinite(L))){const Z={instancePath:r+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),t++}var w=F===t}else var w=!0;if(w)if(I.length!==void 0){let L=I.length;const F=t;if(!(typeof L=="number"&&isFinite(L))){const Z={instancePath:r+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),t++}var w=F===t}else var w=!0}}}}}}else{const O={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[O]:i.push(O),t++}var u=T===t;if(x=x||u,!x){const O=t;if(t===O)if(I&&typeof I=="object"&&!Array.isArray(I))for(const L in I){let F=I[L];const Y=t,Z=t;let H=!1;const K=t;if(typeof F!="string"){const V={instancePath:r+"/body/"+L.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=[V]:i.push(V),t++}var _=K===t;if(H=H||_,!H){const V=t;if(t===V)if(F&&typeof F=="object"&&!Array.isArray(F)){let ee;if(F.BYTES_PER_ELEMENT===void 0&&(ee="BYTES_PER_ELEMENT")||F.buffer===void 0&&(ee="buffer")||F.byteLength===void 0&&(ee="byteLength")||F.byteOffset===void 0&&(ee="byteOffset")||F.length===void 0&&(ee="length")){const X={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:ee},message:"must have required property '"+ee+"'"};i===null?i=[X]:i.push(X),t++}else{const X=t;for(const Q in F)if(!(Q==="BYTES_PER_ELEMENT"||Q==="buffer"||Q==="byteLength"||Q==="byteOffset"||Q==="length")){let re=F[Q];const ne=t;if(!(typeof re=="number"&&isFinite(re))){const te={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+Q.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=[te]:i.push(te),t++}var b=ne===t;if(!b)break}if(X===t){if(F.BYTES_PER_ELEMENT!==void 0){let Q=F.BYTES_PER_ELEMENT;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const ne={instancePath:r+"/body/"+L.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=[ne]:i.push(ne),t++}var B=re===t}else var B=!0;if(B){if(F.buffer!==void 0){let Q=F.buffer;const re=t;if(t===re)if(Q&&typeof Q=="object"&&!Array.isArray(Q)){let te;if(Q.byteLength===void 0&&(te="byteLength")){const we={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:te},message:"must have required property '"+te+"'"};i===null?i=[we]:i.push(we),t++}else{const we=t;for(const ve in Q)if(ve!=="byteLength"){const Le={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ve},message:"must NOT have additional properties"};i===null?i=[Le]:i.push(Le),t++;break}if(we===t&&Q.byteLength!==void 0){let ve=Q.byteLength;if(!(typeof ve=="number"&&isFinite(ve))){const Le={instancePath:r+"/body/"+L.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),t++}}}}else{const te={instancePath:r+"/body/"+L.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=[te]:i.push(te),t++}var B=re===t}else var B=!0;if(B){if(F.byteLength!==void 0){let Q=F.byteLength;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const te={instancePath:r+"/body/"+L.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=[te]:i.push(te),t++}var B=re===t}else var B=!0;if(B){if(F.byteOffset!==void 0){let Q=F.byteOffset;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const te={instancePath:r+"/body/"+L.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=[te]:i.push(te),t++}var B=re===t}else var B=!0;if(B)if(F.length!==void 0){let Q=F.length;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const te={instancePath:r+"/body/"+L.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=[te]:i.push(te),t++}var B=re===t}else var B=!0}}}}}}else{const ee={instancePath:r+"/body/"+L.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=[ee]:i.push(ee),t++}var _=V===t;if(H=H||_,!H){const ee=t;if(t===ee)if(F&&typeof F=="object"&&!Array.isArray(F)){let Q;if(F.lastModified===void 0&&(Q="lastModified")||F.name===void 0&&(Q="name")||F.size===void 0&&(Q="size")||F.type===void 0&&(Q="type")||F.webkitRelativePath===void 0&&(Q="webkitRelativePath")){const re={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:Q},message:"must have required property '"+Q+"'"};i===null?i=[re]:i.push(re),t++}else{const re=t;for(const ne in F)if(!(ne==="size"||ne==="type"||ne==="lastModified"||ne==="name"||ne==="webkitRelativePath")){const te={instancePath:r+"/body/"+L.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ne},message:"must NOT have additional properties"};i===null?i=[te]:i.push(te),t++;break}if(re===t){if(F.size!==void 0){let ne=F.size;const te=t;if(!(typeof ne=="number"&&isFinite(ne))){const we={instancePath:r+"/body/"+L.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=[we]:i.push(we),t++}var P=te===t}else var P=!0;if(P){if(F.type!==void 0){const ne=t;if(typeof F.type!="string"){const we={instancePath:r+"/body/"+L.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=[we]:i.push(we),t++}var P=ne===t}else var P=!0;if(P){if(F.lastModified!==void 0){let ne=F.lastModified;const te=t;if(!(typeof ne=="number"&&isFinite(ne))){const ve={instancePath:r+"/body/"+L.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=[ve]:i.push(ve),t++}var P=te===t}else var P=!0;if(P){if(F.name!==void 0){const ne=t;if(typeof F.name!="string"){const we={instancePath:r+"/body/"+L.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=[we]:i.push(we),t++}var P=ne===t}else var P=!0;if(P)if(F.webkitRelativePath!==void 0){const ne=t;if(typeof F.webkitRelativePath!="string"){const we={instancePath:r+"/body/"+L.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=[we]:i.push(we),t++}var P=ne===t}else var P=!0}}}}}}else{const Q={instancePath:r+"/body/"+L.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=[Q]:i.push(Q),t++}var _=ee===t;H=H||_}}if(H)t=Z,i!==null&&(Z?i.length=Z:i=null);else{const V={instancePath:r+"/body/"+L.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=[V]:i.push(V),t++}var q=Y===t;if(!q)break}else{const L={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[L]:i.push(L),t++}var u=O===t;x=x||u}}if(x)t=A,i!==null&&(A?i.length=A:i=null);else{const T={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[T]:i.push(T),t++,Ue.errors=i,!1}var p=U===t}else var p=!0}}}}}else return Ue.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Ue.errors=i,t===0}const mu={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 Oe(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){const B=t;for(const P in e)if(!wo.call(mu.properties,P))return Oe.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(B===t){if(e.relativeUri!==void 0){const P=t;if(typeof e.relativeUri!="string")return Oe.errors=[{instancePath:r+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0;if(p){if(e.scriptPath!==void 0){const P=t;if(typeof e.scriptPath!="string")return Oe.errors=[{instancePath:r+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0;if(p){if(e.protocol!==void 0){const P=t;if(typeof e.protocol!="string")return Oe.errors=[{instancePath:r+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0;if(p){if(e.method!==void 0){let P=e.method;const q=t;if(typeof P!="string")return Oe.errors=[{instancePath:r+"/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 Oe.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:bo.enum},message:"must be equal to one of the allowed values"}],!1;var p=q===t}else var p=!0;if(p){if(e.headers!==void 0){let P=e.headers;const q=t;if(t===t)if(P&&typeof P=="object"&&!Array.isArray(P))for(const I in P){const U=t;if(typeof P[I]!="string")return Oe.errors=[{instancePath:r+"/headers/"+I.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=U===t;if(!y)break}else return Oe.errors=[{instancePath:r+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=q===t}else var p=!0;if(p){if(e.body!==void 0){let P=e.body;const q=t,D=t;let M=!1;const I=t;if(typeof P!="string"){const A={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[A]:i.push(A),t++}var u=I===t;if(M=M||u,!M){const A=t;if(t===A)if(P&&typeof P=="object"&&!Array.isArray(P)){let N;if(P.BYTES_PER_ELEMENT===void 0&&(N="BYTES_PER_ELEMENT")||P.buffer===void 0&&(N="buffer")||P.byteLength===void 0&&(N="byteLength")||P.byteOffset===void 0&&(N="byteOffset")||P.length===void 0&&(N="length")){const S={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};i===null?i=[S]:i.push(S),t++}else{const S=t;for(const T in P)if(!(T==="BYTES_PER_ELEMENT"||T==="buffer"||T==="byteLength"||T==="byteOffset"||T==="length")){let E=P[T];const O=t;if(!(typeof E=="number"&&isFinite(E))){const C={instancePath:r+"/body/"+T.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=[C]:i.push(C),t++}var d=O===t;if(!d)break}if(S===t){if(P.BYTES_PER_ELEMENT!==void 0){let T=P.BYTES_PER_ELEMENT;const E=t;if(!(typeof T=="number"&&isFinite(T))){const O={instancePath:r+"/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=[O]:i.push(O),t++}var w=E===t}else var w=!0;if(w){if(P.buffer!==void 0){let T=P.buffer;const E=t;if(t===E)if(T&&typeof T=="object"&&!Array.isArray(T)){let C;if(T.byteLength===void 0&&(C="byteLength")){const L={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};i===null?i=[L]:i.push(L),t++}else{const L=t;for(const F in T)if(F!=="byteLength"){const Y={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:F},message:"must NOT have additional properties"};i===null?i=[Y]:i.push(Y),t++;break}if(L===t&&T.byteLength!==void 0){let F=T.byteLength;if(!(typeof F=="number"&&isFinite(F))){const Y={instancePath:r+"/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=[Y]:i.push(Y),t++}}}}else{const C={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[C]:i.push(C),t++}var w=E===t}else var w=!0;if(w){if(P.byteLength!==void 0){let T=P.byteLength;const E=t;if(!(typeof T=="number"&&isFinite(T))){const C={instancePath:r+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[C]:i.push(C),t++}var w=E===t}else var w=!0;if(w){if(P.byteOffset!==void 0){let T=P.byteOffset;const E=t;if(!(typeof T=="number"&&isFinite(T))){const C={instancePath:r+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[C]:i.push(C),t++}var w=E===t}else var w=!0;if(w)if(P.length!==void 0){let T=P.length;const E=t;if(!(typeof T=="number"&&isFinite(T))){const C={instancePath:r+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[C]:i.push(C),t++}var w=E===t}else var w=!0}}}}}}else{const N={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[N]:i.push(N),t++}var u=A===t;M=M||u}if(M)t=D,i!==null&&(D?i.length=D:i=null);else{const A={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[A]:i.push(A),t++,Oe.errors=i,!1}var p=q===t}else var p=!0;if(p){if(e.env!==void 0){let P=e.env;const q=t;if(t===q)if(P&&typeof P=="object"&&!Array.isArray(P))for(const M in P){const I=t;if(typeof P[M]!="string")return Oe.errors=[{instancePath:r+"/env/"+M.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=I===t;if(!_)break}else return Oe.errors=[{instancePath:r+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=q===t}else var p=!0;if(p){if(e.$_SERVER!==void 0){let P=e.$_SERVER;const q=t;if(t===q)if(P&&typeof P=="object"&&!Array.isArray(P))for(const M in P){const I=t;if(typeof P[M]!="string")return Oe.errors=[{instancePath:r+"/$_SERVER/"+M.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=I===t;if(!b)break}else return Oe.errors=[{instancePath:r+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=q===t}else var p=!0;if(p)if(e.code!==void 0){const P=t;if(typeof e.code!="string")return Oe.errors=[{instancePath:r+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0}}}}}}}}}else return Oe.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Oe.errors=i,t===0}function h(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){let ws;if(e.step===void 0&&(ws="step"))return h.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:ws},message:"must have required property '"+ws+"'"}],!1;{const pe=e.step;if(typeof pe=="string")if(pe==="activatePlugin"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.pluginPath===void 0&&(R="pluginPath")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="pluginPath"||a==="pluginName"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/0/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var p=W===t}else var p=!0;if(p)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/0/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===t}else var p=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var y=k===t}else var y=!0;if(y){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="activatePlugin")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var y=k===t}else var y=!0;if(y){if(e.pluginPath!==void 0){const a=t;if(typeof e.pluginPath!="string")return h.errors=[{instancePath:r+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===t}else var y=!0;if(y)if(e.pluginName!==void 0){const a=t;if(typeof e.pluginName!="string")return h.errors=[{instancePath:r+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===t}else var y=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="activateTheme"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step")||e.themeFolderName===void 0&&(R="themeFolderName"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="themeFolderName"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var u=W===t}else var u=!0;if(u)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=m===t}else var u=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=k===t}else var d=!0;if(d){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="activateTheme")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var d=k===t}else var d=!0;if(d)if(e.themeFolderName!==void 0){const a=t;if(typeof e.themeFolderName!="string")return h.errors=[{instancePath:r+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=a===t}else var d=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="cp"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.fromPath===void 0&&(R="fromPath")||e.step===void 0&&(R="step")||e.toPath===void 0&&(R="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="fromPath"||a==="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var w=W===t}else var w=!0;if(w)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=m===t}else var w=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/2/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _=k===t}else var _=!0;if(_){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="cp")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var _=k===t}else var _=!0;if(_){if(e.fromPath!==void 0){const a=t;if(typeof e.fromPath!="string")return h.errors=[{instancePath:r+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=a===t}else var _=!0;if(_)if(e.toPath!==void 0){const a=t;if(typeof e.toPath!="string")return h.errors=[{instancePath:r+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=a===t}else var _=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="defineWpConfigConsts"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.consts===void 0&&(R="consts")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="consts"||a==="method"||a==="virtualize"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var b=W===t}else var b=!0;if(b)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=m===t}else var b=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var B=k===t}else var B=!0;if(B){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="defineWpConfigConsts")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var B=k===t}else var B=!0;if(B){if(e.consts!==void 0){let a=e.consts;const k=t;if(t===k&&!(a&&typeof a=="object"&&!Array.isArray(a)))return h.errors=[{instancePath:r+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var B=k===t}else var B=!0;if(B){if(e.method!==void 0){let a=e.method;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="rewrite-wp-config"||a==="define-before-run"))return h.errors=[{instancePath:r+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:qs.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var B=k===t}else var B=!0;if(B)if(e.virtualize!==void 0){const a=t;if(typeof e.virtualize!="boolean")return h.errors=[{instancePath:r+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var B=a===t}else var B=!0}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="defineSiteUrl"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.siteUrl===void 0&&(R="siteUrl")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="siteUrl"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var P=W===t}else var P=!0;if(P)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var P=m===t}else var P=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var q=k===t}else var q=!0;if(q){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="defineSiteUrl")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var q=k===t}else var q=!0;if(q)if(e.siteUrl!==void 0){const a=t;if(typeof e.siteUrl!="string")return h.errors=[{instancePath:r+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=a===t}else var q=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="enableMultisite"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="wpCliPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var D=W===t}else var D=!0;if(D)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var D=m===t}else var D=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var M=k===t}else var M=!0;if(M){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="enableMultisite")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var M=k===t}else var M=!0;if(M)if(e.wpCliPath!==void 0){const a=t;if(typeof e.wpCliPath!="string")return h.errors=[{instancePath:r+"/wpCliPath",schemaPath:"#/oneOf/5/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var M=a===t}else var M=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="importWxr"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.file===void 0&&(R="file")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="file"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var I=W===t}else var I=!0;if(I)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var I=m===t}else var I=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/6/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var U=k===t}else var U=!0;if(U){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="importWxr")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var U=k===t}else var U=!0;if(U)if(e.file!==void 0){const a=t;le(e.file,{instancePath:r+"/file",parentData:e,parentDataProperty:"file",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var U=a===t}else var U=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="importThemeStarterContent"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="themeSlug"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var A=W===t}else var A=!0;if(A)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var A=m===t}else var A=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var x=k===t}else var x=!0;if(x){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="importThemeStarterContent")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var x=k===t}else var x=!0;if(x)if(e.themeSlug!==void 0){const a=t;if(typeof e.themeSlug!="string")return h.errors=[{instancePath:r+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var x=a===t}else var x=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="importWordPressFiles"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step")||e.wordPressFilesZip===void 0&&(R="wordPressFilesZip"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="wordPressFilesZip"||a==="pathInZip"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var N=W===t}else var N=!0;if(N)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=m===t}else var N=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var S=k===t}else var S=!0;if(S){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="importWordPressFiles")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var S=k===t}else var S=!0;if(S){if(e.wordPressFilesZip!==void 0){const a=t;le(e.wordPressFilesZip,{instancePath:r+"/wordPressFilesZip",parentData:e,parentDataProperty:"wordPressFilesZip",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var S=a===t}else var S=!0;if(S)if(e.pathInZip!==void 0){const a=t;if(typeof e.pathInZip!="string")return h.errors=[{instancePath:r+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=a===t}else var S=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="installPlugin"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.pluginData===void 0&&(R="pluginData")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="ifAlreadyInstalled"||a==="step"||a==="pluginData"||a==="pluginZipFile"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/9/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var T=W===t}else var T=!0;if(T)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=m===t}else var T=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/9/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var E=k===t}else var E=!0;if(E){if(e.ifAlreadyInstalled!==void 0){let a=e.ifAlreadyInstalled;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="overwrite"||a==="skip"||a==="error"))return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:qs.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var E=k===t}else var E=!0;if(E){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="installPlugin")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var E=k===t}else var E=!0;if(E){if(e.pluginData!==void 0){let a=e.pluginData;const k=t,z=t;let m=!1;const W=t;le(a,{instancePath:r+"/pluginData",parentData:e,parentDataProperty:"pluginData",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var O=W===t;if(m=m||O,!m){const Pe=t;Je(a,{instancePath:r+"/pluginData",parentData:e,parentDataProperty:"pluginData",rootData:o})||(i=i===null?Je.errors:i.concat(Je.errors),t=i.length);var O=Pe===t;m=m||O}if(m)t=z,i!==null&&(z?i.length=z:i=null);else{const Pe={instancePath:r+"/pluginData",schemaPath:"#/oneOf/9/properties/pluginData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var E=k===t}else var E=!0;if(E){if(e.pluginZipFile!==void 0){const a=t;le(e.pluginZipFile,{instancePath:r+"/pluginZipFile",parentData:e,parentDataProperty:"pluginZipFile",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var E=a===t}else var E=!0;if(E)if(e.options!==void 0){let a=e.options;const k=t;if(t===t)if(a&&typeof a=="object"&&!Array.isArray(a)){const W=t;for(const me in a)if(!(me==="activate"||me==="targetFolderName"))return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:me},message:"must NOT have additional properties"}],!1;if(W===t){if(a.activate!==void 0){const me=t;if(typeof a.activate!="boolean")return h.errors=[{instancePath:r+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var C=me===t}else var C=!0;if(C)if(a.targetFolderName!==void 0){const me=t;if(typeof a.targetFolderName!="string")return h.errors=[{instancePath:r+"/options/targetFolderName",schemaPath:"#/definitions/InstallPluginOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var C=me===t}else var C=!0}}else return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var E=k===t}else var E=!0}}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="installTheme"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step")||e.themeData===void 0&&(R="themeData"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="ifAlreadyInstalled"||a==="step"||a==="themeData"||a==="themeZipFile"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var L=W===t}else var L=!0;if(L)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var L=m===t}else var L=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=k===t}else var F=!0;if(F){if(e.ifAlreadyInstalled!==void 0){let a=e.ifAlreadyInstalled;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="overwrite"||a==="skip"||a==="error"))return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:qs.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var F=k===t}else var F=!0;if(F){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="installTheme")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var F=k===t}else var F=!0;if(F){if(e.themeData!==void 0){let a=e.themeData;const k=t,z=t;let m=!1;const W=t;le(a,{instancePath:r+"/themeData",parentData:e,parentDataProperty:"themeData",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var Y=W===t;if(m=m||Y,!m){const Pe=t;Je(a,{instancePath:r+"/themeData",parentData:e,parentDataProperty:"themeData",rootData:o})||(i=i===null?Je.errors:i.concat(Je.errors),t=i.length);var Y=Pe===t;m=m||Y}if(m)t=z,i!==null&&(z?i.length=z:i=null);else{const Pe={instancePath:r+"/themeData",schemaPath:"#/oneOf/10/properties/themeData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var F=k===t}else var F=!0;if(F){if(e.themeZipFile!==void 0){const a=t;le(e.themeZipFile,{instancePath:r+"/themeZipFile",parentData:e,parentDataProperty:"themeZipFile",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var F=a===t}else var F=!0;if(F)if(e.options!==void 0){let a=e.options;const k=t;if(t===t)if(a&&typeof a=="object"&&!Array.isArray(a)){const W=t;for(const me in a)if(!(me==="activate"||me==="importStarterContent"||me==="targetFolderName"))return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallThemeOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:me},message:"must NOT have additional properties"}],!1;if(W===t){if(a.activate!==void 0){const me=t;if(typeof a.activate!="boolean")return h.errors=[{instancePath:r+"/options/activate",schemaPath:"#/definitions/InstallThemeOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var Z=me===t}else var Z=!0;if(Z){if(a.importStarterContent!==void 0){const me=t;if(typeof a.importStarterContent!="boolean")return h.errors=[{instancePath:r+"/options/importStarterContent",schemaPath:"#/definitions/InstallThemeOptions/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var Z=me===t}else var Z=!0;if(Z)if(a.targetFolderName!==void 0){const me=t;if(typeof a.targetFolderName!="string")return h.errors=[{instancePath:r+"/options/targetFolderName",schemaPath:"#/definitions/InstallThemeOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Z=me===t}else var Z=!0}}}else return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallThemeOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var F=k===t}else var F=!0}}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="login"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="username"||a==="password"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var H=W===t}else var H=!0;if(H)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var H=m===t}else var H=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var K=k===t}else var K=!0;if(K){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="login")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var K=k===t}else var K=!0;if(K){if(e.username!==void 0){const a=t;if(typeof e.username!="string")return h.errors=[{instancePath:r+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=a===t}else var K=!0;if(K)if(e.password!==void 0){const a=t;if(typeof e.password!="string")return h.errors=[{instancePath:r+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=a===t}else var K=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="mkdir"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.path===void 0&&(R="path")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var V=W===t}else var V=!0;if(V)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var V=m===t}else var V=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/12/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var se=k===t}else var se=!0;if(se){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="mkdir")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var se=k===t}else var se=!0;if(se)if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var se=a===t}else var se=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="mv"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.fromPath===void 0&&(R="fromPath")||e.step===void 0&&(R="step")||e.toPath===void 0&&(R="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="fromPath"||a==="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ee=W===t}else var ee=!0;if(ee)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ee=m===t}else var ee=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var X=k===t}else var X=!0;if(X){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="mv")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var X=k===t}else var X=!0;if(X){if(e.fromPath!==void 0){const a=t;if(typeof e.fromPath!="string")return h.errors=[{instancePath:r+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var X=a===t}else var X=!0;if(X)if(e.toPath!==void 0){const a=t;if(typeof e.toPath!="string")return h.errors=[{instancePath:r+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var X=a===t}else var X=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="resetData"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Q=W===t}else var Q=!0;if(Q)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Q=m===t}else var Q=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/14/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var re=k===t}else var re=!0;if(re)if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="resetData")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var re=k===t}else var re=!0}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="request"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.request===void 0&&(R="request")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="request"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/15/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ne=W===t}else var ne=!0;if(ne)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/15/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ne=m===t}else var ne=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var te=k===t}else var te=!0;if(te){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="request")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var te=k===t}else var te=!0;if(te)if(e.request!==void 0){const a=t;Ue(e.request,{instancePath:r+"/request",parentData:e,parentDataProperty:"request",rootData:o})||(i=i===null?Ue.errors:i.concat(Ue.errors),t=i.length);var te=a===t}else var te=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="rm"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.path===void 0&&(R="path")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var we=W===t}else var we=!0;if(we)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var we=m===t}else var we=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/16/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ve=k===t}else var ve=!0;if(ve){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="rm")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var ve=k===t}else var ve=!0;if(ve)if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ve=a===t}else var ve=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="rmdir"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.path===void 0&&(R="path")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Le=W===t}else var Le=!0;if(Le)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Le=m===t}else var Le=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var tr=k===t}else var tr=!0;if(tr){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="rmdir")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var tr=k===t}else var tr=!0;if(tr)if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var tr=a===t}else var tr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runPHP"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.code===void 0&&(R="code")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="code"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Mr=W===t}else var Mr=!0;if(Mr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Mr=m===t}else var Mr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var sr=k===t}else var sr=!0;if(sr){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runPHP")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var sr=k===t}else var sr=!0;if(sr)if(e.code!==void 0){const a=t;if(typeof e.code!="string")return h.errors=[{instancePath:r+"/code",schemaPath:"#/oneOf/18/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var sr=a===t}else var sr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runPHPWithOptions"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.options===void 0&&(R="options")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Qe=W===t}else var Qe=!0;if(Qe)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Qe=m===t}else var Qe=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ce=k===t}else var Ce=!0;if(Ce){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runPHPWithOptions")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var Ce=k===t}else var Ce=!0;if(Ce)if(e.options!==void 0){const a=t;Oe(e.options,{instancePath:r+"/options",parentData:e,parentDataProperty:"options",rootData:o})||(i=i===null?Oe.errors:i.concat(Oe.errors),t=i.length);var Ce=a===t}else var Ce=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runWpInstallationWizard"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.options===void 0&&(R="options")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Wr=W===t}else var Wr=!0;if(Wr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Wr=m===t}else var Wr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var cr=k===t}else var cr=!0;if(cr){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runWpInstallationWizard")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var cr=k===t}else var cr=!0;if(cr)if(e.options!==void 0){let a=e.options;const k=t;if(t===t)if(a&&typeof a=="object"&&!Array.isArray(a)){const W=t;for(const me in a)if(!(me==="adminUsername"||me==="adminPassword"))return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:me},message:"must NOT have additional properties"}],!1;if(W===t){if(a.adminUsername!==void 0){const me=t;if(typeof a.adminUsername!="string")return h.errors=[{instancePath:r+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var vr=me===t}else var vr=!0;if(vr)if(a.adminPassword!==void 0){const me=t;if(typeof a.adminPassword!="string")return h.errors=[{instancePath:r+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var vr=me===t}else var vr=!0}}else return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var cr=k===t}else var cr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runSql"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.sql===void 0&&(R="sql")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="sql"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Hr=W===t}else var Hr=!0;if(Hr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Hr=m===t}else var Hr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var dr=k===t}else var dr=!0;if(dr){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runSql")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var dr=k===t}else var dr=!0;if(dr)if(e.sql!==void 0){const a=t;le(e.sql,{instancePath:r+"/sql",parentData:e,parentDataProperty:"sql",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var dr=a===t}else var dr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="setSiteOptions"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.options===void 0&&(R="options")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ar=W===t}else var Ar=!0;if(Ar)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ar=m===t}else var Ar=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Me=k===t}else var Me=!0;if(Me){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="setSiteOptions")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var Me=k===t}else var Me=!0;if(Me)if(e.options!==void 0){let a=e.options;const k=t;if(t===k&&!(a&&typeof a=="object"&&!Array.isArray(a)))return h.errors=[{instancePath:r+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Me=k===t}else var Me=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="unzip"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.extractToPath===void 0&&(R="extractToPath")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="zipFile"||a==="zipPath"||a==="extractToPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Be=W===t}else var Be=!0;if(Be)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Be=m===t}else var Be=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=k===t}else var Ae=!0;if(Ae){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="unzip")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var Ae=k===t}else var Ae=!0;if(Ae){if(e.zipFile!==void 0){const a=t;le(e.zipFile,{instancePath:r+"/zipFile",parentData:e,parentDataProperty:"zipFile",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var Ae=a===t}else var Ae=!0;if(Ae){if(e.zipPath!==void 0){const a=t;if(typeof e.zipPath!="string")return h.errors=[{instancePath:r+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ae=a===t}else var Ae=!0;if(Ae)if(e.extractToPath!==void 0){const a=t;if(typeof e.extractToPath!="string")return h.errors=[{instancePath:r+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ae=a===t}else var Ae=!0}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="updateUserMeta"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.meta===void 0&&(R="meta")||e.step===void 0&&(R="step")||e.userId===void 0&&(R="userId"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="meta"||a==="userId"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Zr=W===t}else var Zr=!0;if(Zr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Zr=m===t}else var Zr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ee=k===t}else var Ee=!0;if(Ee){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="updateUserMeta")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var Ee=k===t}else var Ee=!0;if(Ee){if(e.meta!==void 0){let a=e.meta;const k=t;if(t===k&&!(a&&typeof a=="object"&&!Array.isArray(a)))return h.errors=[{instancePath:r+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ee=k===t}else var Ee=!0;if(Ee)if(e.userId!==void 0){let a=e.userId;const k=t;if(!(typeof a=="number"&&isFinite(a)))return h.errors=[{instancePath:r+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ee=k===t}else var Ee=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="writeFile"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.data===void 0&&(R="data")||e.path===void 0&&(R="path")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"||a==="data"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Vr=W===t}else var Vr=!0;if(Vr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Vr=m===t}else var Vr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var c=k===t}else var c=!0;if(c){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="writeFile")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var c=k===t}else var c=!0;if(c){if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=a===t}else var c=!0;if(c)if(e.data!==void 0){let a=e.data;const k=t,z=t;let m=!1;const W=t;le(a,{instancePath:r+"/data",parentData:e,parentDataProperty:"data",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var f=W===t;if(m=m||f,!m){const Pe=t;if(typeof a!="string"){const ir={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[ir]:i.push(ir),t++}var f=Pe===t;if(m=m||f,!m){const ir=t;if(t===ir)if(a&&typeof a=="object"&&!Array.isArray(a)){let We;if(a.BYTES_PER_ELEMENT===void 0&&(We="BYTES_PER_ELEMENT")||a.buffer===void 0&&(We="buffer")||a.byteLength===void 0&&(We="byteLength")||a.byteOffset===void 0&&(We="byteOffset")||a.length===void 0&&(We="length")){const Bt={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:We},message:"must have required property '"+We+"'"};i===null?i=[Bt]:i.push(Bt),t++}else{const Bt=t;for(const ue in a)if(!(ue==="BYTES_PER_ELEMENT"||ue==="buffer"||ue==="byteLength"||ue==="byteOffset"||ue==="length")){let De=a[ue];const It=t;if(!(typeof De=="number"&&isFinite(De))){const Te={instancePath:r+"/data/"+ue.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=[Te]:i.push(Te),t++}var l=It===t;if(!l)break}if(Bt===t){if(a.BYTES_PER_ELEMENT!==void 0){let ue=a.BYTES_PER_ELEMENT;const De=t;if(!(typeof ue=="number"&&isFinite(ue))){const It={instancePath:r+"/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=[It]:i.push(It),t++}var g=De===t}else var g=!0;if(g){if(a.buffer!==void 0){let ue=a.buffer;const De=t;if(t===De)if(ue&&typeof ue=="object"&&!Array.isArray(ue)){let Te;if(ue.byteLength===void 0&&(Te="byteLength")){const jt={instancePath:r+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:Te},message:"must have required property '"+Te+"'"};i===null?i=[jt]:i.push(jt),t++}else{const jt=t;for(const ot in ue)if(ot!=="byteLength"){const pt={instancePath:r+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ot},message:"must NOT have additional properties"};i===null?i=[pt]:i.push(pt),t++;break}if(jt===t&&ue.byteLength!==void 0){let ot=ue.byteLength;if(!(typeof ot=="number"&&isFinite(ot))){const pt={instancePath:r+"/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=[pt]:i.push(pt),t++}}}}else{const Te={instancePath:r+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Te]:i.push(Te),t++}var g=De===t}else var g=!0;if(g){if(a.byteLength!==void 0){let ue=a.byteLength;const De=t;if(!(typeof ue=="number"&&isFinite(ue))){const Te={instancePath:r+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var g=De===t}else var g=!0;if(g){if(a.byteOffset!==void 0){let ue=a.byteOffset;const De=t;if(!(typeof ue=="number"&&isFinite(ue))){const Te={instancePath:r+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var g=De===t}else var g=!0;if(g)if(a.length!==void 0){let ue=a.length;const De=t;if(!(typeof ue=="number"&&isFinite(ue))){const Te={instancePath:r+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var g=De===t}else var g=!0}}}}}}else{const We={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[We]:i.push(We),t++}var f=ir===t;m=m||f}}if(m)t=z,i!==null&&(z?i.length=z:i=null);else{const Pe={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var c=k===t}else var c=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="writeFiles"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.filesTree===void 0&&(R="filesTree")||e.step===void 0&&(R="step")||e.writeToPath===void 0&&(R="writeToPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="writeToPath"||a==="filesTree"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var v=W===t}else var v=!0;if(v)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var v=m===t}else var v=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=k===t}else var $=!0;if($){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="writeFiles")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"writeFiles"},message:"must be equal to constant"}],!1;var $=k===t}else var $=!0;if($){if(e.writeToPath!==void 0){const a=t;if(typeof e.writeToPath!="string")return h.errors=[{instancePath:r+"/writeToPath",schemaPath:"#/oneOf/26/properties/writeToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var $=a===t}else var $=!0;if($)if(e.filesTree!==void 0){const a=t;Je(e.filesTree,{instancePath:r+"/filesTree",parentData:e,parentDataProperty:"filesTree",rootData:o})||(i=i===null?Je.errors:i.concat(Je.errors),t=i.length);var $=a===t}else var $=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="wp-cli"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.command===void 0&&(R="command")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="command"||a==="wpCliPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var j=W===t}else var j=!0;if(j)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var j=m===t}else var j=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var J=k===t}else var J=!0;if(J){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="wp-cli")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var J=k===t}else var J=!0;if(J){if(e.command!==void 0){let a=e.command;const k=t,z=t;let m=!1;const W=t;if(typeof a!="string"){const Pe={instancePath:r+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Pe]:i.push(Pe),t++}var ye=W===t;if(m=m||ye,!m){const Pe=t;if(t===Pe)if(Array.isArray(a)){var de=!0;const ir=a.length;for(let Ft=0;Ft<ir;Ft++){const We=t;if(typeof a[Ft]!="string"){const ue={instancePath:r+"/command/"+Ft,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[ue]:i.push(ue),t++}var de=We===t;if(!de)break}}else{const ir={instancePath:r+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};i===null?i=[ir]:i.push(ir),t++}var ye=Pe===t;m=m||ye}if(m)t=z,i!==null&&(z?i.length=z:i=null);else{const Pe={instancePath:r+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var J=k===t}else var J=!0;if(J)if(e.wpCliPath!==void 0){const a=t;if(typeof e.wpCliPath!="string")return h.errors=[{instancePath:r+"/wpCliPath",schemaPath:"#/oneOf/27/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var J=a===t}else var J=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="setSiteLanguage"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let R;if(e.language===void 0&&(R="language")||e.step===void 0&&(R="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/28/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"}],!1;{const G=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="language"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/28/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(G===t){if(e.progress!==void 0){let a=e.progress;const k=t;if(t===k)if(a&&typeof a=="object"&&!Array.isArray(a)){const z=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/28/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(z===t){if(a.weight!==void 0){let m=a.weight;const W=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/28/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var he=W===t}else var he=!0;if(he)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/28/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var he=m===t}else var he=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/28/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ae=k===t}else var ae=!0;if(ae){if(e.step!==void 0){let a=e.step;const k=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/28/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="setSiteLanguage")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/28/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var ae=k===t}else var ae=!0;if(ae)if(e.language!==void 0){const a=t;if(typeof e.language!="string")return h.errors=[{instancePath:r+"/language",schemaPath:"#/oneOf/28/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ae=a===t}else var ae=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/28/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return h.errors=[{instancePath:r,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:pe},message:'value of tag "step" must be in oneOf'}],!1;else return h.errors=[{instancePath:r,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:pe},message:'tag "step" must be string'}],!1}}else return h.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return h.errors=i,t===0}function ie(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){const A=t;for(const x in e)if(!wo.call(cu.properties,x))return ie.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:x},message:"must NOT have additional properties"}],!1;if(A===t){if(e.landingPage!==void 0){const x=t;if(typeof e.landingPage!="string")return ie.errors=[{instancePath:r+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=x===t}else var p=!0;if(p){if(e.description!==void 0){const x=t;if(typeof e.description!="string")return ie.errors=[{instancePath:r+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=x===t}else var p=!0;if(p){if(e.meta!==void 0){let x=e.meta;const N=t;if(t===N)if(x&&typeof x=="object"&&!Array.isArray(x)){let T;if(x.title===void 0&&(T="title")||x.author===void 0&&(T="author"))return ie.errors=[{instancePath:r+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"}],!1;{const E=t;for(const O in x)if(!(O==="title"||O==="description"||O==="author"||O==="categories"))return ie.errors=[{instancePath:r+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"}],!1;if(E===t){if(x.title!==void 0){const O=t;if(typeof x.title!="string")return ie.errors=[{instancePath:r+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=O===t}else var y=!0;if(y){if(x.description!==void 0){const O=t;if(typeof x.description!="string")return ie.errors=[{instancePath:r+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=O===t}else var y=!0;if(y){if(x.author!==void 0){const O=t;if(typeof x.author!="string")return ie.errors=[{instancePath:r+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=O===t}else var y=!0;if(y)if(x.categories!==void 0){let O=x.categories;const C=t;if(t===C)if(Array.isArray(O)){var u=!0;const F=O.length;for(let Y=0;Y<F;Y++){const Z=t;if(typeof O[Y]!="string")return ie.errors=[{instancePath:r+"/meta/categories/"+Y,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=Z===t;if(!u)break}}else return ie.errors=[{instancePath:r+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var y=C===t}else var y=!0}}}}}else return ie.errors=[{instancePath:r+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.preferredVersions!==void 0){let x=e.preferredVersions;const N=t;if(t===N)if(x&&typeof x=="object"&&!Array.isArray(x)){let T;if(x.php===void 0&&(T="php")||x.wp===void 0&&(T="wp"))return ie.errors=[{instancePath:r+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"}],!1;{const E=t;for(const O in x)if(!(O==="php"||O==="wp"))return ie.errors=[{instancePath:r+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"}],!1;if(E===t){if(x.php!==void 0){let O=x.php;const C=t,L=t;let F=!1;const Y=t;if(typeof O!="string"){const Z={instancePath:r+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Z]:i.push(Z),t++}if(!(O==="8.3"||O==="8.2"||O==="8.1"||O==="8.0"||O==="7.4"||O==="7.3"||O==="7.2"||O==="7.1"||O==="7.0")){const Z={instancePath:r+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:du.enum},message:"must be equal to one of the allowed values"};i===null?i=[Z]:i.push(Z),t++}var d=Y===t;if(F=F||d,!F){const Z=t;if(typeof O!="string"){const K={instancePath:r+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),t++}if(O!=="latest"){const K={instancePath:r+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};i===null?i=[K]:i.push(K),t++}var d=Z===t;F=F||d}if(F)t=L,i!==null&&(L?i.length=L:i=null);else{const Z={instancePath:r+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Z]:i.push(Z),t++,ie.errors=i,!1}var w=C===t}else var w=!0;if(w)if(x.wp!==void 0){const O=t;if(typeof x.wp!="string")return ie.errors=[{instancePath:r+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=O===t}else var w=!0}}}else return ie.errors=[{instancePath:r+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.features!==void 0){let x=e.features;const N=t;if(t===N)if(x&&typeof x=="object"&&!Array.isArray(x)){const T=t;for(const E in x)if(E!=="networking")return ie.errors=[{instancePath:r+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"}],!1;if(T===t&&x.networking!==void 0&&typeof x.networking!="boolean")return ie.errors=[{instancePath:r+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return ie.errors=[{instancePath:r+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.extraLibraries!==void 0){let x=e.extraLibraries;const N=t;if(t===N)if(Array.isArray(x)){var _=!0;const T=x.length;for(let E=0;E<T;E++){let O=x[E];const C=t;if(typeof O!="string")return ie.errors=[{instancePath:r+"/extraLibraries/"+E,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(O!=="wp-cli")return ie.errors=[{instancePath:r+"/extraLibraries/"+E,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var _=C===t;if(!_)break}}else return ie.errors=[{instancePath:r+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===t}else var p=!0;if(p){if(e.constants!==void 0){let x=e.constants;const N=t;if(t===t)if(x&&typeof x=="object"&&!Array.isArray(x))for(const E in x){let O=x[E];const C=t;if(typeof O!="string"&&typeof O!="boolean"&&!(typeof O=="number"&&isFinite(O)))return ie.errors=[{instancePath:r+"/constants/"+E.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:hu.additionalProperties.type},message:"must be string,boolean,number"}],!1;var b=C===t;if(!b)break}else return ie.errors=[{instancePath:r+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.plugins!==void 0){let x=e.plugins;const N=t;if(t===N)if(Array.isArray(x)){var B=!0;const T=x.length;for(let E=0;E<T;E++){let O=x[E];const C=t,L=t;let F=!1;const Y=t;if(typeof O!="string"){const H={instancePath:r+"/plugins/"+E,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),t++}var P=Y===t;if(F=F||P,!F){const H=t;le(O,{instancePath:r+"/plugins/"+E,parentData:x,parentDataProperty:E,rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var P=H===t;F=F||P}if(F)t=L,i!==null&&(L?i.length=L:i=null);else{const H={instancePath:r+"/plugins/"+E,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[H]:i.push(H),t++,ie.errors=i,!1}var B=C===t;if(!B)break}}else return ie.errors=[{instancePath:r+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===t}else var p=!0;if(p){if(e.siteOptions!==void 0){let x=e.siteOptions;const N=t;if(t===N)if(x&&typeof x=="object"&&!Array.isArray(x)){const T=t;for(const E in x)if(E!=="blogname"){const O=t;if(typeof x[E]!="string")return ie.errors=[{instancePath:r+"/siteOptions/"+E.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=O===t;if(!q)break}if(T===t&&x.blogname!==void 0&&typeof x.blogname!="string")return ie.errors=[{instancePath:r+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return ie.errors=[{instancePath:r+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.login!==void 0){let x=e.login;const N=t,S=t;let T=!1;const E=t;if(typeof x!="boolean"){const C={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[C]:i.push(C),t++}var D=E===t;if(T=T||D,!T){const C=t;if(t===C)if(x&&typeof x=="object"&&!Array.isArray(x)){let F;if(x.username===void 0&&(F="username")||x.password===void 0&&(F="password")){const Y={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:F},message:"must have required property '"+F+"'"};i===null?i=[Y]:i.push(Y),t++}else{const Y=t;for(const Z in x)if(!(Z==="username"||Z==="password")){const H={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Z},message:"must NOT have additional properties"};i===null?i=[H]:i.push(H),t++;break}if(Y===t){if(x.username!==void 0){const Z=t;if(typeof x.username!="string"){const H={instancePath:r+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),t++}var M=Z===t}else var M=!0;if(M)if(x.password!==void 0){const Z=t;if(typeof x.password!="string"){const K={instancePath:r+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),t++}var M=Z===t}else var M=!0}}}else{const F={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[F]:i.push(F),t++}var D=C===t;T=T||D}if(T)t=S,i!==null&&(S?i.length=S:i=null);else{const C={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[C]:i.push(C),t++,ie.errors=i,!1}var p=N===t}else var p=!0;if(p){if(e.steps!==void 0){let x=e.steps;const N=t;if(t===N)if(Array.isArray(x)){var I=!0;const T=x.length;for(let E=0;E<T;E++){let O=x[E];const C=t,L=t;let F=!1;const Y=t;h(O,{instancePath:r+"/steps/"+E,parentData:x,parentDataProperty:E,rootData:o})||(i=i===null?h.errors:i.concat(h.errors),t=i.length);var U=Y===t;if(F=F||U,!F){const H=t;if(typeof O!="string"){const V={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),t++}var U=H===t;if(F=F||U,!F){const V=t,se={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};i===null?i=[se]:i.push(se),t++;var U=V===t;if(F=F||U,!F){const X=t;if(typeof O!="boolean"){const re={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[re]:i.push(re),t++}if(O!==!1){const re={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};i===null?i=[re]:i.push(re),t++}var U=X===t;if(F=F||U,!F){const re=t;if(O!==null){const te={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};i===null?i=[te]:i.push(te),t++}var U=re===t;F=F||U}}}}if(F)t=L,i!==null&&(L?i.length=L:i=null);else{const H={instancePath:r+"/steps/"+E,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[H]:i.push(H),t++,ie.errors=i,!1}var I=C===t;if(!I)break}}else return ie.errors=[{instancePath:r+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===t}else var p=!0;if(p)if(e.$schema!==void 0){const x=t;if(typeof e.$schema!="string")return ie.errors=[{instancePath:r+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=x===t}else var p=!0}}}}}}}}}}}}else return ie.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ie.errors=i,t===0}function Gt(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;return ie(e,{instancePath:r,parentData:s,parentDataProperty:n,rootData:o})||(i=i===null?ie.errors:i.concat(ie.errors),t=i.length),Gt.errors=i,t===0}const{wpCLI:gu,...An}=sp,wu={...An,"wp-cli":gu,importFile:An.importWxr};function _o(e,{progress:r=new ls,semaphore:s=new Ro({concurrency:3}),onStepCompleted:n=()=>{},corsProxy:o}={}){var _,b,B,P,q,D,M,I,U;e=structuredClone(e),e={...e,steps:(e.steps||[]).filter(vu).filter(Pu)};for(const A of e.steps)!A||typeof A!="object"||(A.step==="importFile"?(A.step="importWxr",Se.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(A==null?void 0:A.step)==="installPlugin"&&"pluginZipFile"in A?(A.pluginData=A.pluginZipFile,Se.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(A==null?void 0:A.step)==="installTheme"&&"themeZipFile"in A&&(A.themeData=A.themeZipFile,Se.warn('The "themeZipFile" option of the "installTheme" step is deprecated. Use "themeData" 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 A=e.plugins.map(x=>typeof x=="string"?x.startsWith("https://")?{resource:"url",url:x}:{resource:"wordpress.org/plugins",slug:x}:x).map(x=>({step:"installPlugin",pluginData:x}));e.steps.unshift(...A)}e.login&&e.steps.push({step:"login",...e.login===!0?{username:"admin"}:e.login});const i=((_=e.steps)==null?void 0:_.findIndex(A=>typeof A=="object"&&(A==null?void 0:A.step)&&["wp-cli","enableMultisite"].includes(A.step)))??-1;if((b=e==null?void 0:e.extraLibraries)!=null&&b.includes("wp-cli")||i!==-1){const A={step:"writeFile",data:Vo,path:li};i===-1?(B=e.steps)==null||B.push(A):(P=e.steps)==null||P.splice(i,0,A)}const t=(q=e.steps)==null?void 0:q.findIndex(A=>typeof A=="object"&&(A==null?void 0:A.step)==="importWxr");t!==void 0&&t>-1&&((D=e.steps)==null||D.splice(t,0,{step:"installPlugin",pluginData:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:p,errors:y}=bu(e);if(!p){const A=new Error(`Invalid blueprint: ${y[0].message} at ${y[0].instancePath}`);throw A.errors=y,A}const u=e.steps||[],d=u.reduce((A,x)=>{var N;return A+(((N=x.progress)==null?void 0:N.weight)||1)},0),w=u.map(A=>ku(A,{semaphore:s,rootProgressTracker:r,totalProgressWeight:d,corsProxy:o}));return{versions:{php:_u((M=e.preferredVersions)==null?void 0:M.php,as,Kn),wp:((I=e.preferredVersions)==null?void 0:I.wp)||"latest"},features:{networking:((U=e.features)==null?void 0:U.networking)??!1},extraLibraries:e.extraLibraries||[],run:async A=>{try{for(const{resources:x}of w)for(const N of x)N.setPlayground(A),N.isAsync&&N.resolve();for(const[x,{run:N,step:S}]of Object.entries(w))try{const T=await N(A);n(T,S)}catch(T){throw Se.error(T),new Error(`Error when executing the blueprint step #${x} (${JSON.stringify(S)}) ${T instanceof Error?`: ${T.message}`:T}`,{cause:T})}}finally{try{await A.goTo(e.landingPage||"/")}catch{}r.finish()}}}}function bu(e){var o;const r=Gt(e);if(r)return{valid:r};const s=new Set;for(const i of Gt.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||s.add(i.instancePath);const n=(o=Gt.errors)==null?void 0:o.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&s.has(i.instancePath)));return{valid:r,errors:n}}function _u(e,r,s){return e&&r.includes(e)?e:s}function vu(e){return!!(typeof e=="object"&&e)}function Pu(e){return["setPhpIniEntry","request"].includes(e.step)?(Se.warn(`The "${e.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function ku(e,{semaphore:r,rootProgressTracker:s,totalProgressWeight:n,corsProxy:o}){var w;const i=s.stage((((w=e.progress)==null?void 0:w.weight)||1)/n),t={};for(const _ of Object.keys(e)){let b=e[_];ru(b)&&(b=_r.create(b,{semaphore:r,corsProxy:o})),t[_]=b}const p=async _=>{var b;try{return i.fillSlowly(),await wu[e.step](_,await Eu(t),{tracker:i,initialCaption:(b=e.progress)==null?void 0:b.caption})}finally{i.finish()}},y=Sn(t),u=Sn(t).filter(_=>_.isAsync),d=1/(u.length+1);for(const _ of u)_.progress=i.stage(d);return{run:p,step:e,resources:y}}function Sn(e){const r=[];for(const s in e){const n=e[s];n instanceof _r&&r.push(n)}return r}async function Eu(e){const r={};for(const s in e){const n=e[s];n instanceof _r?r[s]=await n.resolve():r[s]=n}return r}async function vo(e,r){await e.run(r)}function Ou(){}/**
752
+ Only the username field is required for user authentication.`}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mkdir"},path:{type:"string",description:"The path of the directory you want to create"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mv"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"resetData"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"request"},request:{$ref:"#/definitions/PHPRequest",description:"Request details (See /wordpress-playground/api/universal/interface/PHPRequest)"}},required:["request","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rm"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rmdir"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHP",description:"The step identifier."},code:{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:"writeFiles"},writeToPath:{type:"string",description:"The path of the file to write to"},filesTree:{$ref:"#/definitions/DirectoryReference",description:"The data to write"}},required:["filesTree","step","writeToPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"wp-cli",description:"The step identifier."},command:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"The WP CLI command to run."},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["command","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteLanguage"},language:{type:"string",description:"The language to set, e.g. 'en_US'"}},required:["language","step"]}]},mu={type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/FileTree"},{type:["object","string"]}]},properties:{}},Us={validate:Dr};function Dr(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e))for(const u in e){let d=e[u];const g=t,b=t;let w=!1;const H=t;Us.validate(d,{instancePath:r+"/"+u.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:u,rootData:o})||(i=i===null?Us.validate.errors:i.concat(Us.validate.errors),t=i.length);var p=H===t;if(w=w||p,!w){const P=t;if(!(d&&typeof d=="object"&&!Array.isArray(d))&&typeof d!="string"){const j={instancePath:r+"/"+u.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf/1/type",keyword:"type",params:{type:mu.additionalProperties.anyOf[1].type},message:"must be object,string"};i===null?i=[j]:i.push(j),t++}var p=P===t;w=w||p}if(w)t=b,i!==null&&(b?i.length=b:i=null);else{const P={instancePath:r+"/"+u.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[P]:i.push(P),t++,Dr.errors=i,!1}var y=g===t;if(!y)break}else return Dr.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Dr.errors=i,t===0}function or(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){let y;if(e.files===void 0&&(y="files")||e.name===void 0&&(y="name")||e.resource===void 0&&(y="resource"))return or.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:y},message:"must have required property '"+y+"'"}],!1;{const u=t;for(const d in e)if(!(d==="resource"||d==="files"||d==="name"))return or.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:d},message:"must NOT have additional properties"}],!1;if(u===t){if(e.resource!==void 0){let d=e.resource;const g=t;if(typeof d!="string")return or.errors=[{instancePath:r+"/resource",schemaPath:"#/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(d!=="literal:directory")return or.errors=[{instancePath:r+"/resource",schemaPath:"#/properties/resource/const",keyword:"const",params:{allowedValue:"literal:directory"},message:"must be equal to constant"}],!1;var p=g===t}else var p=!0;if(p){if(e.files!==void 0){const d=t;Dr(e.files,{instancePath:r+"/files",parentData:e,parentDataProperty:"files",rootData:o})||(i=i===null?Dr.errors:i.concat(Dr.errors),t=i.length);var p=d===t}else var p=!0;if(p)if(e.name!==void 0){const d=t;if(typeof e.name!="string")return or.errors=[{instancePath:r+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=d===t}else var p=!0}}}}else return or.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return or.errors=i,t===0}function Je(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;const p=t;let y=!1;const u=t;if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let w;if(e.resource===void 0&&(w="resource")||e.url===void 0&&(w="url")||e.ref===void 0&&(w="ref")||e.path===void 0&&(w="path")){const H={instancePath:r,schemaPath:"#/definitions/GitDirectoryReference/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"};i===null?i=[H]:i.push(H),t++}else{const H=t;for(const P in e)if(!(P==="resource"||P==="url"||P==="ref"||P==="path")){const N={instancePath:r,schemaPath:"#/definitions/GitDirectoryReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};i===null?i=[N]:i.push(N),t++;break}if(H===t){if(e.resource!==void 0){let P=e.resource;const N=t;if(typeof P!="string"){const j={instancePath:r+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),t++}if(P!=="git:directory"){const j={instancePath:r+"/resource",schemaPath:"#/definitions/GitDirectoryReference/properties/resource/const",keyword:"const",params:{allowedValue:"git:directory"},message:"must be equal to constant"};i===null?i=[j]:i.push(j),t++}var g=N===t}else var g=!0;if(g){if(e.url!==void 0){const P=t;if(typeof e.url!="string"){const j={instancePath:r+"/url",schemaPath:"#/definitions/GitDirectoryReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),t++}var g=P===t}else var g=!0;if(g){if(e.ref!==void 0){const P=t;if(typeof e.ref!="string"){const j={instancePath:r+"/ref",schemaPath:"#/definitions/GitDirectoryReference/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),t++}var g=P===t}else var g=!0;if(g)if(e.path!==void 0){const P=t;if(typeof e.path!="string"){const j={instancePath:r+"/path",schemaPath:"#/definitions/GitDirectoryReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),t++}var g=P===t}else var g=!0}}}}}else{const w={instancePath:r,schemaPath:"#/definitions/GitDirectoryReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[w]:i.push(w),t++}var b=u===t;if(y=y||b,!y){const w=t;or(e,{instancePath:r,parentData:s,parentDataProperty:n,rootData:o})||(i=i===null?or.errors:i.concat(or.errors),t=i.length);var b=w===t;y=y||b}if(y)t=p,i!==null&&(p?i.length=p:i=null);else{const w={instancePath:r,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[w]:i.push(w),t++,Je.errors=i,!1}return Je.errors=i,t===0}const bo={type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function We(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){let j;if(e.url===void 0&&(j="url"))return We.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:j},message:"must have required property '"+j+"'"}],!1;{const q=t;for(const $ in e)if(!($==="method"||$==="url"||$==="headers"||$==="body"))return We.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"}],!1;if(q===t){if(e.method!==void 0){let $=e.method;const W=t;if(typeof $!="string")return We.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!($==="GET"||$==="POST"||$==="HEAD"||$==="OPTIONS"||$==="PATCH"||$==="PUT"||$==="DELETE"))return We.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:bo.enum},message:"must be equal to one of the allowed values"}],!1;var p=W===t}else var p=!0;if(p){if(e.url!==void 0){const $=t;if(typeof e.url!="string")return We.errors=[{instancePath:r+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=$===t}else var p=!0;if(p){if(e.headers!==void 0){let $=e.headers;const W=t;if(t===t)if($&&typeof $=="object"&&!Array.isArray($))for(const B in $){const x=t;if(typeof $[B]!="string")return We.errors=[{instancePath:r+"/headers/"+B.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=x===t;if(!y)break}else return We.errors=[{instancePath:r+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=W===t}else var p=!0;if(p)if(e.body!==void 0){let $=e.body;const W=t,O=t;let A=!1;const B=t;if(typeof $!="string"){const T={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[T]:i.push(T),t++}var u=B===t;if(A=A||u,!A){const T=t;if(t===T)if($&&typeof $=="object"&&!Array.isArray($)){let S;if($.BYTES_PER_ELEMENT===void 0&&(S="BYTES_PER_ELEMENT")||$.buffer===void 0&&(S="buffer")||$.byteLength===void 0&&(S="byteLength")||$.byteOffset===void 0&&(S="byteOffset")||$.length===void 0&&(S="length")){const F={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:S},message:"must have required property '"+S+"'"};i===null?i=[F]:i.push(F),t++}else{const F=t;for(const D in $)if(!(D==="BYTES_PER_ELEMENT"||D==="buffer"||D==="byteLength"||D==="byteOffset"||D==="length")){let I=$[D];const V=t;if(!(typeof I=="number"&&isFinite(I))){const z={instancePath:r+"/body/"+D.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=[z]:i.push(z),t++}var d=V===t;if(!d)break}if(F===t){if($.BYTES_PER_ELEMENT!==void 0){let D=$.BYTES_PER_ELEMENT;const I=t;if(!(typeof D=="number"&&isFinite(D))){const V={instancePath:r+"/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=[V]:i.push(V),t++}var g=I===t}else var g=!0;if(g){if($.buffer!==void 0){let D=$.buffer;const I=t;if(t===I)if(D&&typeof D=="object"&&!Array.isArray(D)){let z;if(D.byteLength===void 0&&(z="byteLength")){const K={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:z},message:"must have required property '"+z+"'"};i===null?i=[K]:i.push(K),t++}else{const K=t;for(const Y in D)if(Y!=="byteLength"){const G={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Y},message:"must NOT have additional properties"};i===null?i=[G]:i.push(G),t++;break}if(K===t&&D.byteLength!==void 0){let Y=D.byteLength;if(!(typeof Y=="number"&&isFinite(Y))){const G={instancePath:r+"/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=[G]:i.push(G),t++}}}}else{const z={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[z]:i.push(z),t++}var g=I===t}else var g=!0;if(g){if($.byteLength!==void 0){let D=$.byteLength;const I=t;if(!(typeof D=="number"&&isFinite(D))){const z={instancePath:r+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[z]:i.push(z),t++}var g=I===t}else var g=!0;if(g){if($.byteOffset!==void 0){let D=$.byteOffset;const I=t;if(!(typeof D=="number"&&isFinite(D))){const z={instancePath:r+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[z]:i.push(z),t++}var g=I===t}else var g=!0;if(g)if($.length!==void 0){let D=$.length;const I=t;if(!(typeof D=="number"&&isFinite(D))){const z={instancePath:r+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[z]:i.push(z),t++}var g=I===t}else var g=!0}}}}}}else{const S={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[S]:i.push(S),t++}var u=T===t;if(A=A||u,!A){const S=t;if(t===S)if($&&typeof $=="object"&&!Array.isArray($))for(const D in $){let I=$[D];const V=t,z=t;let K=!1;const Y=t;if(typeof I!="string"){const G={instancePath:r+"/body/"+D.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=[G]:i.push(G),t++}var b=Y===t;if(K=K||b,!K){const G=t;if(t===G)if(I&&typeof I=="object"&&!Array.isArray(I)){let ee;if(I.BYTES_PER_ELEMENT===void 0&&(ee="BYTES_PER_ELEMENT")||I.buffer===void 0&&(ee="buffer")||I.byteLength===void 0&&(ee="byteLength")||I.byteOffset===void 0&&(ee="byteOffset")||I.length===void 0&&(ee="length")){const X={instancePath:r+"/body/"+D.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:ee},message:"must have required property '"+ee+"'"};i===null?i=[X]:i.push(X),t++}else{const X=t;for(const Q in I)if(!(Q==="BYTES_PER_ELEMENT"||Q==="buffer"||Q==="byteLength"||Q==="byteOffset"||Q==="length")){let re=I[Q];const ne=t;if(!(typeof re=="number"&&isFinite(re))){const te={instancePath:r+"/body/"+D.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+Q.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=[te]:i.push(te),t++}var w=ne===t;if(!w)break}if(X===t){if(I.BYTES_PER_ELEMENT!==void 0){let Q=I.BYTES_PER_ELEMENT;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const ne={instancePath:r+"/body/"+D.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=[ne]:i.push(ne),t++}var H=re===t}else var H=!0;if(H){if(I.buffer!==void 0){let Q=I.buffer;const re=t;if(t===re)if(Q&&typeof Q=="object"&&!Array.isArray(Q)){let te;if(Q.byteLength===void 0&&(te="byteLength")){const ge={instancePath:r+"/body/"+D.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:te},message:"must have required property '"+te+"'"};i===null?i=[ge]:i.push(ge),t++}else{const ge=t;for(const ve in Q)if(ve!=="byteLength"){const De={instancePath:r+"/body/"+D.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ve},message:"must NOT have additional properties"};i===null?i=[De]:i.push(De),t++;break}if(ge===t&&Q.byteLength!==void 0){let ve=Q.byteLength;if(!(typeof ve=="number"&&isFinite(ve))){const De={instancePath:r+"/body/"+D.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=[De]:i.push(De),t++}}}}else{const te={instancePath:r+"/body/"+D.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=[te]:i.push(te),t++}var H=re===t}else var H=!0;if(H){if(I.byteLength!==void 0){let Q=I.byteLength;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const te={instancePath:r+"/body/"+D.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=[te]:i.push(te),t++}var H=re===t}else var H=!0;if(H){if(I.byteOffset!==void 0){let Q=I.byteOffset;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const te={instancePath:r+"/body/"+D.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=[te]:i.push(te),t++}var H=re===t}else var H=!0;if(H)if(I.length!==void 0){let Q=I.length;const re=t;if(!(typeof Q=="number"&&isFinite(Q))){const te={instancePath:r+"/body/"+D.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=[te]:i.push(te),t++}var H=re===t}else var H=!0}}}}}}else{const ee={instancePath:r+"/body/"+D.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=[ee]:i.push(ee),t++}var b=G===t;if(K=K||b,!K){const ee=t;if(t===ee)if(I&&typeof I=="object"&&!Array.isArray(I)){let Q;if(I.lastModified===void 0&&(Q="lastModified")||I.name===void 0&&(Q="name")||I.size===void 0&&(Q="size")||I.type===void 0&&(Q="type")||I.webkitRelativePath===void 0&&(Q="webkitRelativePath")){const re={instancePath:r+"/body/"+D.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:Q},message:"must have required property '"+Q+"'"};i===null?i=[re]:i.push(re),t++}else{const re=t;for(const ne in I)if(!(ne==="size"||ne==="type"||ne==="lastModified"||ne==="name"||ne==="webkitRelativePath")){const te={instancePath:r+"/body/"+D.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ne},message:"must NOT have additional properties"};i===null?i=[te]:i.push(te),t++;break}if(re===t){if(I.size!==void 0){let ne=I.size;const te=t;if(!(typeof ne=="number"&&isFinite(ne))){const ge={instancePath:r+"/body/"+D.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=[ge]:i.push(ge),t++}var P=te===t}else var P=!0;if(P){if(I.type!==void 0){const ne=t;if(typeof I.type!="string"){const ge={instancePath:r+"/body/"+D.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=[ge]:i.push(ge),t++}var P=ne===t}else var P=!0;if(P){if(I.lastModified!==void 0){let ne=I.lastModified;const te=t;if(!(typeof ne=="number"&&isFinite(ne))){const ve={instancePath:r+"/body/"+D.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=[ve]:i.push(ve),t++}var P=te===t}else var P=!0;if(P){if(I.name!==void 0){const ne=t;if(typeof I.name!="string"){const ge={instancePath:r+"/body/"+D.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=[ge]:i.push(ge),t++}var P=ne===t}else var P=!0;if(P)if(I.webkitRelativePath!==void 0){const ne=t;if(typeof I.webkitRelativePath!="string"){const ge={instancePath:r+"/body/"+D.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=[ge]:i.push(ge),t++}var P=ne===t}else var P=!0}}}}}}else{const Q={instancePath:r+"/body/"+D.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=[Q]:i.push(Q),t++}var b=ee===t;K=K||b}}if(K)t=z,i!==null&&(z?i.length=z:i=null);else{const G={instancePath:r+"/body/"+D.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=[G]:i.push(G),t++}var N=V===t;if(!N)break}else{const D={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[D]:i.push(D),t++}var u=S===t;A=A||u}}if(A)t=O,i!==null&&(O?i.length=O:i=null);else{const T={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[T]:i.push(T),t++,We.errors=i,!1}var p=W===t}else var p=!0}}}}}else return We.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return We.errors=i,t===0}const _u={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 Se(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){const H=t;for(const P in e)if(!wo.call(_u.properties,P))return Se.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(H===t){if(e.relativeUri!==void 0){const P=t;if(typeof e.relativeUri!="string")return Se.errors=[{instancePath:r+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0;if(p){if(e.scriptPath!==void 0){const P=t;if(typeof e.scriptPath!="string")return Se.errors=[{instancePath:r+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0;if(p){if(e.protocol!==void 0){const P=t;if(typeof e.protocol!="string")return Se.errors=[{instancePath:r+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0;if(p){if(e.method!==void 0){let P=e.method;const N=t;if(typeof P!="string")return Se.errors=[{instancePath:r+"/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 Se.errors=[{instancePath:r+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:bo.enum},message:"must be equal to one of the allowed values"}],!1;var p=N===t}else var p=!0;if(p){if(e.headers!==void 0){let P=e.headers;const N=t;if(t===t)if(P&&typeof P=="object"&&!Array.isArray(P))for(const $ in P){const W=t;if(typeof P[$]!="string")return Se.errors=[{instancePath:r+"/headers/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=W===t;if(!y)break}else return Se.errors=[{instancePath:r+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.body!==void 0){let P=e.body;const N=t,j=t;let q=!1;const $=t;if(typeof P!="string"){const O={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[O]:i.push(O),t++}var u=$===t;if(q=q||u,!q){const O=t;if(t===O)if(P&&typeof P=="object"&&!Array.isArray(P)){let B;if(P.BYTES_PER_ELEMENT===void 0&&(B="BYTES_PER_ELEMENT")||P.buffer===void 0&&(B="buffer")||P.byteLength===void 0&&(B="byteLength")||P.byteOffset===void 0&&(B="byteOffset")||P.length===void 0&&(B="length")){const x={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:B},message:"must have required property '"+B+"'"};i===null?i=[x]:i.push(x),t++}else{const x=t;for(const T in P)if(!(T==="BYTES_PER_ELEMENT"||T==="buffer"||T==="byteLength"||T==="byteOffset"||T==="length")){let k=P[T];const S=t;if(!(typeof k=="number"&&isFinite(k))){const F={instancePath:r+"/body/"+T.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=[F]:i.push(F),t++}var d=S===t;if(!d)break}if(x===t){if(P.BYTES_PER_ELEMENT!==void 0){let T=P.BYTES_PER_ELEMENT;const k=t;if(!(typeof T=="number"&&isFinite(T))){const S={instancePath:r+"/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=[S]:i.push(S),t++}var g=k===t}else var g=!0;if(g){if(P.buffer!==void 0){let T=P.buffer;const k=t;if(t===k)if(T&&typeof T=="object"&&!Array.isArray(T)){let F;if(T.byteLength===void 0&&(F="byteLength")){const D={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:F},message:"must have required property '"+F+"'"};i===null?i=[D]:i.push(D),t++}else{const D=t;for(const I in T)if(I!=="byteLength"){const V={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:I},message:"must NOT have additional properties"};i===null?i=[V]:i.push(V),t++;break}if(D===t&&T.byteLength!==void 0){let I=T.byteLength;if(!(typeof I=="number"&&isFinite(I))){const V={instancePath:r+"/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=[V]:i.push(V),t++}}}}else{const F={instancePath:r+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[F]:i.push(F),t++}var g=k===t}else var g=!0;if(g){if(P.byteLength!==void 0){let T=P.byteLength;const k=t;if(!(typeof T=="number"&&isFinite(T))){const F={instancePath:r+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[F]:i.push(F),t++}var g=k===t}else var g=!0;if(g){if(P.byteOffset!==void 0){let T=P.byteOffset;const k=t;if(!(typeof T=="number"&&isFinite(T))){const F={instancePath:r+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[F]:i.push(F),t++}var g=k===t}else var g=!0;if(g)if(P.length!==void 0){let T=P.length;const k=t;if(!(typeof T=="number"&&isFinite(T))){const F={instancePath:r+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[F]:i.push(F),t++}var g=k===t}else var g=!0}}}}}}else{const B={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[B]:i.push(B),t++}var u=O===t;q=q||u}if(q)t=j,i!==null&&(j?i.length=j:i=null);else{const O={instancePath:r+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[O]:i.push(O),t++,Se.errors=i,!1}var p=N===t}else var p=!0;if(p){if(e.env!==void 0){let P=e.env;const N=t;if(t===N)if(P&&typeof P=="object"&&!Array.isArray(P))for(const q in P){const $=t;if(typeof P[q]!="string")return Se.errors=[{instancePath:r+"/env/"+q.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=$===t;if(!b)break}else return Se.errors=[{instancePath:r+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p){if(e.$_SERVER!==void 0){let P=e.$_SERVER;const N=t;if(t===N)if(P&&typeof P=="object"&&!Array.isArray(P))for(const q in P){const $=t;if(typeof P[q]!="string")return Se.errors=[{instancePath:r+"/$_SERVER/"+q.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=$===t;if(!w)break}else return Se.errors=[{instancePath:r+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=N===t}else var p=!0;if(p)if(e.code!==void 0){const P=t;if(typeof e.code!="string")return Se.errors=[{instancePath:r+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=P===t}else var p=!0}}}}}}}}}else return Se.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Se.errors=i,t===0}function h(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){let ws;if(e.step===void 0&&(ws="step"))return h.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:ws},message:"must have required property '"+ws+"'"}],!1;{const pe=e.step;if(typeof pe=="string")if(pe==="activatePlugin"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.pluginPath===void 0&&(L="pluginPath")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="pluginPath"||a==="pluginName"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/0/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var p=M===t}else var p=!0;if(p)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/0/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=m===t}else var p=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var y=E===t}else var y=!0;if(y){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="activatePlugin")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var y=E===t}else var y=!0;if(y){if(e.pluginPath!==void 0){const a=t;if(typeof e.pluginPath!="string")return h.errors=[{instancePath:r+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===t}else var y=!0;if(y)if(e.pluginName!==void 0){const a=t;if(typeof e.pluginName!="string")return h.errors=[{instancePath:r+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===t}else var y=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="activateTheme"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.step===void 0&&(L="step")||e.themeFolderName===void 0&&(L="themeFolderName"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="themeFolderName"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var u=M===t}else var u=!0;if(u)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=m===t}else var u=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var d=E===t}else var d=!0;if(d){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="activateTheme")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var d=E===t}else var d=!0;if(d)if(e.themeFolderName!==void 0){const a=t;if(typeof e.themeFolderName!="string")return h.errors=[{instancePath:r+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var d=a===t}else var d=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="cp"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.fromPath===void 0&&(L="fromPath")||e.step===void 0&&(L="step")||e.toPath===void 0&&(L="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="fromPath"||a==="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var g=M===t}else var g=!0;if(g)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var g=m===t}else var g=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/2/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var b=E===t}else var b=!0;if(b){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="cp")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var b=E===t}else var b=!0;if(b){if(e.fromPath!==void 0){const a=t;if(typeof e.fromPath!="string")return h.errors=[{instancePath:r+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=a===t}else var b=!0;if(b)if(e.toPath!==void 0){const a=t;if(typeof e.toPath!="string")return h.errors=[{instancePath:r+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=a===t}else var b=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="defineWpConfigConsts"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.consts===void 0&&(L="consts")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="consts"||a==="method"||a==="virtualize"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var w=M===t}else var w=!0;if(w)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=m===t}else var w=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var H=E===t}else var H=!0;if(H){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="defineWpConfigConsts")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var H=E===t}else var H=!0;if(H){if(e.consts!==void 0){let a=e.consts;const E=t;if(t===E&&!(a&&typeof a=="object"&&!Array.isArray(a)))return h.errors=[{instancePath:r+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var H=E===t}else var H=!0;if(H){if(e.method!==void 0){let a=e.method;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="rewrite-wp-config"||a==="define-before-run"))return h.errors=[{instancePath:r+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:Ws.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var H=E===t}else var H=!0;if(H)if(e.virtualize!==void 0){const a=t;if(typeof e.virtualize!="boolean")return h.errors=[{instancePath:r+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var H=a===t}else var H=!0}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="defineSiteUrl"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.siteUrl===void 0&&(L="siteUrl")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="siteUrl"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var P=M===t}else var P=!0;if(P)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var P=m===t}else var P=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var N=E===t}else var N=!0;if(N){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="defineSiteUrl")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var N=E===t}else var N=!0;if(N)if(e.siteUrl!==void 0){const a=t;if(typeof e.siteUrl!="string")return h.errors=[{instancePath:r+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=a===t}else var N=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="enableMultisite"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="wpCliPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var j=M===t}else var j=!0;if(j)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var j=m===t}else var j=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var q=E===t}else var q=!0;if(q){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="enableMultisite")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var q=E===t}else var q=!0;if(q)if(e.wpCliPath!==void 0){const a=t;if(typeof e.wpCliPath!="string")return h.errors=[{instancePath:r+"/wpCliPath",schemaPath:"#/oneOf/5/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=a===t}else var q=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="importWxr"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.file===void 0&&(L="file")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="file"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var $=M===t}else var $=!0;if($)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var $=m===t}else var $=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/6/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var W=E===t}else var W=!0;if(W){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="importWxr")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var W=E===t}else var W=!0;if(W)if(e.file!==void 0){const a=t;le(e.file,{instancePath:r+"/file",parentData:e,parentDataProperty:"file",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var W=a===t}else var W=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="importThemeStarterContent"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="themeSlug"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var O=M===t}else var O=!0;if(O)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var O=m===t}else var O=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var A=E===t}else var A=!0;if(A){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="importThemeStarterContent")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var A=E===t}else var A=!0;if(A)if(e.themeSlug!==void 0){const a=t;if(typeof e.themeSlug!="string")return h.errors=[{instancePath:r+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var A=a===t}else var A=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="importWordPressFiles"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.step===void 0&&(L="step")||e.wordPressFilesZip===void 0&&(L="wordPressFilesZip"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="wordPressFilesZip"||a==="pathInZip"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var B=M===t}else var B=!0;if(B)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var B=m===t}else var B=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var x=E===t}else var x=!0;if(x){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="importWordPressFiles")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var x=E===t}else var x=!0;if(x){if(e.wordPressFilesZip!==void 0){const a=t;le(e.wordPressFilesZip,{instancePath:r+"/wordPressFilesZip",parentData:e,parentDataProperty:"wordPressFilesZip",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var x=a===t}else var x=!0;if(x)if(e.pathInZip!==void 0){const a=t;if(typeof e.pathInZip!="string")return h.errors=[{instancePath:r+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var x=a===t}else var x=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="installPlugin"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.pluginData===void 0&&(L="pluginData")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="ifAlreadyInstalled"||a==="step"||a==="pluginData"||a==="pluginZipFile"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/9/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var T=M===t}else var T=!0;if(T)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var T=m===t}else var T=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/9/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var k=E===t}else var k=!0;if(k){if(e.ifAlreadyInstalled!==void 0){let a=e.ifAlreadyInstalled;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="overwrite"||a==="skip"||a==="error"))return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:Ws.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var k=E===t}else var k=!0;if(k){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="installPlugin")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var k=E===t}else var k=!0;if(k){if(e.pluginData!==void 0){let a=e.pluginData;const E=t,U=t;let m=!1;const M=t;le(a,{instancePath:r+"/pluginData",parentData:e,parentDataProperty:"pluginData",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var S=M===t;if(m=m||S,!m){const Pe=t;Je(a,{instancePath:r+"/pluginData",parentData:e,parentDataProperty:"pluginData",rootData:o})||(i=i===null?Je.errors:i.concat(Je.errors),t=i.length);var S=Pe===t;m=m||S}if(m)t=U,i!==null&&(U?i.length=U:i=null);else{const Pe={instancePath:r+"/pluginData",schemaPath:"#/oneOf/9/properties/pluginData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var k=E===t}else var k=!0;if(k){if(e.pluginZipFile!==void 0){const a=t;le(e.pluginZipFile,{instancePath:r+"/pluginZipFile",parentData:e,parentDataProperty:"pluginZipFile",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var k=a===t}else var k=!0;if(k)if(e.options!==void 0){let a=e.options;const E=t;if(t===t)if(a&&typeof a=="object"&&!Array.isArray(a)){const M=t;for(const me in a)if(!(me==="activate"||me==="targetFolderName"))return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:me},message:"must NOT have additional properties"}],!1;if(M===t){if(a.activate!==void 0){const me=t;if(typeof a.activate!="boolean")return h.errors=[{instancePath:r+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var F=me===t}else var F=!0;if(F)if(a.targetFolderName!==void 0){const me=t;if(typeof a.targetFolderName!="string")return h.errors=[{instancePath:r+"/options/targetFolderName",schemaPath:"#/definitions/InstallPluginOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var F=me===t}else var F=!0}}else return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var k=E===t}else var k=!0}}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="installTheme"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.step===void 0&&(L="step")||e.themeData===void 0&&(L="themeData"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="ifAlreadyInstalled"||a==="step"||a==="themeData"||a==="themeZipFile"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var D=M===t}else var D=!0;if(D)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var D=m===t}else var D=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var I=E===t}else var I=!0;if(I){if(e.ifAlreadyInstalled!==void 0){let a=e.ifAlreadyInstalled;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="overwrite"||a==="skip"||a==="error"))return h.errors=[{instancePath:r+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:Ws.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var I=E===t}else var I=!0;if(I){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="installTheme")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var I=E===t}else var I=!0;if(I){if(e.themeData!==void 0){let a=e.themeData;const E=t,U=t;let m=!1;const M=t;le(a,{instancePath:r+"/themeData",parentData:e,parentDataProperty:"themeData",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var V=M===t;if(m=m||V,!m){const Pe=t;Je(a,{instancePath:r+"/themeData",parentData:e,parentDataProperty:"themeData",rootData:o})||(i=i===null?Je.errors:i.concat(Je.errors),t=i.length);var V=Pe===t;m=m||V}if(m)t=U,i!==null&&(U?i.length=U:i=null);else{const Pe={instancePath:r+"/themeData",schemaPath:"#/oneOf/10/properties/themeData/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var I=E===t}else var I=!0;if(I){if(e.themeZipFile!==void 0){const a=t;le(e.themeZipFile,{instancePath:r+"/themeZipFile",parentData:e,parentDataProperty:"themeZipFile",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var I=a===t}else var I=!0;if(I)if(e.options!==void 0){let a=e.options;const E=t;if(t===t)if(a&&typeof a=="object"&&!Array.isArray(a)){const M=t;for(const me in a)if(!(me==="activate"||me==="importStarterContent"||me==="targetFolderName"))return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallThemeOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:me},message:"must NOT have additional properties"}],!1;if(M===t){if(a.activate!==void 0){const me=t;if(typeof a.activate!="boolean")return h.errors=[{instancePath:r+"/options/activate",schemaPath:"#/definitions/InstallThemeOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var z=me===t}else var z=!0;if(z){if(a.importStarterContent!==void 0){const me=t;if(typeof a.importStarterContent!="boolean")return h.errors=[{instancePath:r+"/options/importStarterContent",schemaPath:"#/definitions/InstallThemeOptions/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var z=me===t}else var z=!0;if(z)if(a.targetFolderName!==void 0){const me=t;if(typeof a.targetFolderName!="string")return h.errors=[{instancePath:r+"/options/targetFolderName",schemaPath:"#/definitions/InstallThemeOptions/properties/targetFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var z=me===t}else var z=!0}}}else return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/InstallThemeOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var I=E===t}else var I=!0}}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="login"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="username"||a==="password"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var K=M===t}else var K=!0;if(K)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=m===t}else var K=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Y=E===t}else var Y=!0;if(Y){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="login")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var Y=E===t}else var Y=!0;if(Y){if(e.username!==void 0){const a=t;if(typeof e.username!="string")return h.errors=[{instancePath:r+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Y=a===t}else var Y=!0;if(Y)if(e.password!==void 0){const a=t;if(typeof e.password!="string")return h.errors=[{instancePath:r+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Y=a===t}else var Y=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="mkdir"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.path===void 0&&(L="path")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var G=M===t}else var G=!0;if(G)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var G=m===t}else var G=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/12/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var se=E===t}else var se=!0;if(se){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="mkdir")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var se=E===t}else var se=!0;if(se)if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var se=a===t}else var se=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="mv"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.fromPath===void 0&&(L="fromPath")||e.step===void 0&&(L="step")||e.toPath===void 0&&(L="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="fromPath"||a==="toPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ee=M===t}else var ee=!0;if(ee)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ee=m===t}else var ee=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var X=E===t}else var X=!0;if(X){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="mv")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var X=E===t}else var X=!0;if(X){if(e.fromPath!==void 0){const a=t;if(typeof e.fromPath!="string")return h.errors=[{instancePath:r+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var X=a===t}else var X=!0;if(X)if(e.toPath!==void 0){const a=t;if(typeof e.toPath!="string")return h.errors=[{instancePath:r+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var X=a===t}else var X=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="resetData"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Q=M===t}else var Q=!0;if(Q)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Q=m===t}else var Q=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/14/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var re=E===t}else var re=!0;if(re)if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="resetData")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var re=E===t}else var re=!0}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="request"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.request===void 0&&(L="request")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="request"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/15/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ne=M===t}else var ne=!0;if(ne)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/15/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ne=m===t}else var ne=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var te=E===t}else var te=!0;if(te){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="request")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var te=E===t}else var te=!0;if(te)if(e.request!==void 0){const a=t;We(e.request,{instancePath:r+"/request",parentData:e,parentDataProperty:"request",rootData:o})||(i=i===null?We.errors:i.concat(We.errors),t=i.length);var te=a===t}else var te=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="rm"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.path===void 0&&(L="path")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ge=M===t}else var ge=!0;if(ge)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ge=m===t}else var ge=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/16/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ve=E===t}else var ve=!0;if(ve){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="rm")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var ve=E===t}else var ve=!0;if(ve)if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ve=a===t}else var ve=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="rmdir"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.path===void 0&&(L="path")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var De=M===t}else var De=!0;if(De)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var De=m===t}else var De=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var tr=E===t}else var tr=!0;if(tr){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="rmdir")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var tr=E===t}else var tr=!0;if(tr)if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var tr=a===t}else var tr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runPHP"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.code===void 0&&(L="code")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="code"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Mr=M===t}else var Mr=!0;if(Mr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Mr=m===t}else var Mr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var sr=E===t}else var sr=!0;if(sr){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runPHP")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var sr=E===t}else var sr=!0;if(sr)if(e.code!==void 0){const a=t;if(typeof e.code!="string")return h.errors=[{instancePath:r+"/code",schemaPath:"#/oneOf/18/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var sr=a===t}else var sr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runPHPWithOptions"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.options===void 0&&(L="options")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Qe=M===t}else var Qe=!0;if(Qe)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Qe=m===t}else var Qe=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Fe=E===t}else var Fe=!0;if(Fe){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runPHPWithOptions")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var Fe=E===t}else var Fe=!0;if(Fe)if(e.options!==void 0){const a=t;Se(e.options,{instancePath:r+"/options",parentData:e,parentDataProperty:"options",rootData:o})||(i=i===null?Se.errors:i.concat(Se.errors),t=i.length);var Fe=a===t}else var Fe=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runWpInstallationWizard"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.options===void 0&&(L="options")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Kr=M===t}else var Kr=!0;if(Kr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Kr=m===t}else var Kr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var cr=E===t}else var cr=!0;if(cr){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runWpInstallationWizard")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var cr=E===t}else var cr=!0;if(cr)if(e.options!==void 0){let a=e.options;const E=t;if(t===t)if(a&&typeof a=="object"&&!Array.isArray(a)){const M=t;for(const me in a)if(!(me==="adminUsername"||me==="adminPassword"))return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:me},message:"must NOT have additional properties"}],!1;if(M===t){if(a.adminUsername!==void 0){const me=t;if(typeof a.adminUsername!="string")return h.errors=[{instancePath:r+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Pr=me===t}else var Pr=!0;if(Pr)if(a.adminPassword!==void 0){const me=t;if(typeof a.adminPassword!="string")return h.errors=[{instancePath:r+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Pr=me===t}else var Pr=!0}}else return h.errors=[{instancePath:r+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var cr=E===t}else var cr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="runSql"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.sql===void 0&&(L="sql")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="sql"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var zr=M===t}else var zr=!0;if(zr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var zr=m===t}else var zr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var dr=E===t}else var dr=!0;if(dr){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="runSql")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var dr=E===t}else var dr=!0;if(dr)if(e.sql!==void 0){const a=t;le(e.sql,{instancePath:r+"/sql",parentData:e,parentDataProperty:"sql",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var dr=a===t}else var dr=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="setSiteOptions"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.options===void 0&&(L="options")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="options"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var xr=M===t}else var xr=!0;if(xr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var xr=m===t}else var xr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var qe=E===t}else var qe=!0;if(qe){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="setSiteOptions")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var qe=E===t}else var qe=!0;if(qe)if(e.options!==void 0){let a=e.options;const E=t;if(t===E&&!(a&&typeof a=="object"&&!Array.isArray(a)))return h.errors=[{instancePath:r+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var qe=E===t}else var qe=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="unzip"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.extractToPath===void 0&&(L="extractToPath")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="zipFile"||a==="zipPath"||a==="extractToPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var He=M===t}else var He=!0;if(He)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var He=m===t}else var He=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Oe=E===t}else var Oe=!0;if(Oe){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="unzip")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var Oe=E===t}else var Oe=!0;if(Oe){if(e.zipFile!==void 0){const a=t;le(e.zipFile,{instancePath:r+"/zipFile",parentData:e,parentDataProperty:"zipFile",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var Oe=a===t}else var Oe=!0;if(Oe){if(e.zipPath!==void 0){const a=t;if(typeof e.zipPath!="string")return h.errors=[{instancePath:r+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Oe=a===t}else var Oe=!0;if(Oe)if(e.extractToPath!==void 0){const a=t;if(typeof e.extractToPath!="string")return h.errors=[{instancePath:r+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Oe=a===t}else var Oe=!0}}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="updateUserMeta"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.meta===void 0&&(L="meta")||e.step===void 0&&(L="step")||e.userId===void 0&&(L="userId"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="meta"||a==="userId"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Gr=M===t}else var Gr=!0;if(Gr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Gr=m===t}else var Gr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ke=E===t}else var ke=!0;if(ke){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="updateUserMeta")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var ke=E===t}else var ke=!0;if(ke){if(e.meta!==void 0){let a=e.meta;const E=t;if(t===E&&!(a&&typeof a=="object"&&!Array.isArray(a)))return h.errors=[{instancePath:r+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ke=E===t}else var ke=!0;if(ke)if(e.userId!==void 0){let a=e.userId;const E=t;if(!(typeof a=="number"&&isFinite(a)))return h.errors=[{instancePath:r+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ke=E===t}else var ke=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="writeFile"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.data===void 0&&(L="data")||e.path===void 0&&(L="path")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="path"||a==="data"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Zr=M===t}else var Zr=!0;if(Zr)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Zr=m===t}else var Zr=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var c=E===t}else var c=!0;if(c){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="writeFile")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var c=E===t}else var c=!0;if(c){if(e.path!==void 0){const a=t;if(typeof e.path!="string")return h.errors=[{instancePath:r+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=a===t}else var c=!0;if(c)if(e.data!==void 0){let a=e.data;const E=t,U=t;let m=!1;const M=t;le(a,{instancePath:r+"/data",parentData:e,parentDataProperty:"data",rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var f=M===t;if(m=m||f,!m){const Pe=t;if(typeof a!="string"){const ir={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[ir]:i.push(ir),t++}var f=Pe===t;if(m=m||f,!m){const ir=t;if(t===ir)if(a&&typeof a=="object"&&!Array.isArray(a)){let Me;if(a.BYTES_PER_ELEMENT===void 0&&(Me="BYTES_PER_ELEMENT")||a.buffer===void 0&&(Me="buffer")||a.byteLength===void 0&&(Me="byteLength")||a.byteOffset===void 0&&(Me="byteOffset")||a.length===void 0&&(Me="length")){const $t={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:Me},message:"must have required property '"+Me+"'"};i===null?i=[$t]:i.push($t),t++}else{const $t=t;for(const ue in a)if(!(ue==="BYTES_PER_ELEMENT"||ue==="buffer"||ue==="byteLength"||ue==="byteOffset"||ue==="length")){let je=a[ue];const Rt=t;if(!(typeof je=="number"&&isFinite(je))){const Te={instancePath:r+"/data/"+ue.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=[Te]:i.push(Te),t++}var l=Rt===t;if(!l)break}if($t===t){if(a.BYTES_PER_ELEMENT!==void 0){let ue=a.BYTES_PER_ELEMENT;const je=t;if(!(typeof ue=="number"&&isFinite(ue))){const Rt={instancePath:r+"/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=[Rt]:i.push(Rt),t++}var _=je===t}else var _=!0;if(_){if(a.buffer!==void 0){let ue=a.buffer;const je=t;if(t===je)if(ue&&typeof ue=="object"&&!Array.isArray(ue)){let Te;if(ue.byteLength===void 0&&(Te="byteLength")){const Dt={instancePath:r+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:Te},message:"must have required property '"+Te+"'"};i===null?i=[Dt]:i.push(Dt),t++}else{const Dt=t;for(const pt in ue)if(pt!=="byteLength"){const ft={instancePath:r+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:pt},message:"must NOT have additional properties"};i===null?i=[ft]:i.push(ft),t++;break}if(Dt===t&&ue.byteLength!==void 0){let pt=ue.byteLength;if(!(typeof pt=="number"&&isFinite(pt))){const ft={instancePath:r+"/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=[ft]:i.push(ft),t++}}}}else{const Te={instancePath:r+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Te]:i.push(Te),t++}var _=je===t}else var _=!0;if(_){if(a.byteLength!==void 0){let ue=a.byteLength;const je=t;if(!(typeof ue=="number"&&isFinite(ue))){const Te={instancePath:r+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var _=je===t}else var _=!0;if(_){if(a.byteOffset!==void 0){let ue=a.byteOffset;const je=t;if(!(typeof ue=="number"&&isFinite(ue))){const Te={instancePath:r+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var _=je===t}else var _=!0;if(_)if(a.length!==void 0){let ue=a.length;const je=t;if(!(typeof ue=="number"&&isFinite(ue))){const Te={instancePath:r+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Te]:i.push(Te),t++}var _=je===t}else var _=!0}}}}}}else{const Me={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Me]:i.push(Me),t++}var f=ir===t;m=m||f}}if(m)t=U,i!==null&&(U?i.length=U:i=null);else{const Pe={instancePath:r+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var c=E===t}else var c=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="writeFiles"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.filesTree===void 0&&(L="filesTree")||e.step===void 0&&(L="step")||e.writeToPath===void 0&&(L="writeToPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="writeToPath"||a==="filesTree"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var v=M===t}else var v=!0;if(v)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var v=m===t}else var v=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var C=E===t}else var C=!0;if(C){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="writeFiles")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"writeFiles"},message:"must be equal to constant"}],!1;var C=E===t}else var C=!0;if(C){if(e.writeToPath!==void 0){const a=t;if(typeof e.writeToPath!="string")return h.errors=[{instancePath:r+"/writeToPath",schemaPath:"#/oneOf/26/properties/writeToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var C=a===t}else var C=!0;if(C)if(e.filesTree!==void 0){const a=t;Je(e.filesTree,{instancePath:r+"/filesTree",parentData:e,parentDataProperty:"filesTree",rootData:o})||(i=i===null?Je.errors:i.concat(Je.errors),t=i.length);var C=a===t}else var C=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="wp-cli"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.command===void 0&&(L="command")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="command"||a==="wpCliPath"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var R=M===t}else var R=!0;if(R)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=m===t}else var R=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var J=E===t}else var J=!0;if(J){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="wp-cli")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var J=E===t}else var J=!0;if(J){if(e.command!==void 0){let a=e.command;const E=t,U=t;let m=!1;const M=t;if(typeof a!="string"){const Pe={instancePath:r+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Pe]:i.push(Pe),t++}var ye=M===t;if(m=m||ye,!m){const Pe=t;if(t===Pe)if(Array.isArray(a)){var de=!0;const ir=a.length;for(let Ht=0;Ht<ir;Ht++){const Me=t;if(typeof a[Ht]!="string"){const ue={instancePath:r+"/command/"+Ht,schemaPath:"#/oneOf/27/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[ue]:i.push(ue),t++}var de=Me===t;if(!de)break}}else{const ir={instancePath:r+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};i===null?i=[ir]:i.push(ir),t++}var ye=Pe===t;m=m||ye}if(m)t=U,i!==null&&(U?i.length=U:i=null);else{const Pe={instancePath:r+"/command",schemaPath:"#/oneOf/27/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[Pe]:i.push(Pe),t++,h.errors=i,!1}var J=E===t}else var J=!0;if(J)if(e.wpCliPath!==void 0){const a=t;if(typeof e.wpCliPath!="string")return h.errors=[{instancePath:r+"/wpCliPath",schemaPath:"#/oneOf/27/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var J=a===t}else var J=!0}}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(pe==="setSiteLanguage"){if(t===t)if(e&&typeof e=="object"&&!Array.isArray(e)){let L;if(e.language===void 0&&(L="language")||e.step===void 0&&(L="step"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/28/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"}],!1;{const Z=t;for(const a in e)if(!(a==="progress"||a==="step"||a==="language"))return h.errors=[{instancePath:r,schemaPath:"#/oneOf/28/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(Z===t){if(e.progress!==void 0){let a=e.progress;const E=t;if(t===E)if(a&&typeof a=="object"&&!Array.isArray(a)){const U=t;for(const m in a)if(!(m==="weight"||m==="caption"))return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/28/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(U===t){if(a.weight!==void 0){let m=a.weight;const M=t;if(!(typeof m=="number"&&isFinite(m)))return h.errors=[{instancePath:r+"/progress/weight",schemaPath:"#/oneOf/28/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var he=M===t}else var he=!0;if(he)if(a.caption!==void 0){const m=t;if(typeof a.caption!="string")return h.errors=[{instancePath:r+"/progress/caption",schemaPath:"#/oneOf/28/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var he=m===t}else var he=!0}}else return h.errors=[{instancePath:r+"/progress",schemaPath:"#/oneOf/28/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ae=E===t}else var ae=!0;if(ae){if(e.step!==void 0){let a=e.step;const E=t;if(typeof a!="string")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/28/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(a!=="setSiteLanguage")return h.errors=[{instancePath:r+"/step",schemaPath:"#/oneOf/28/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var ae=E===t}else var ae=!0;if(ae)if(e.language!==void 0){const a=t;if(typeof e.language!="string")return h.errors=[{instancePath:r+"/language",schemaPath:"#/oneOf/28/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ae=a===t}else var ae=!0}}}}else return h.errors=[{instancePath:r,schemaPath:"#/oneOf/28/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return h.errors=[{instancePath:r,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:pe},message:'value of tag "step" must be in oneOf'}],!1;else return h.errors=[{instancePath:r,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:pe},message:'tag "step" must be string'}],!1}}else return h.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return h.errors=i,t===0}function ie(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;if(t===0)if(e&&typeof e=="object"&&!Array.isArray(e)){const O=t;for(const A in e)if(!wo.call(du.properties,A))return ie.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:A},message:"must NOT have additional properties"}],!1;if(O===t){if(e.landingPage!==void 0){const A=t;if(typeof e.landingPage!="string")return ie.errors=[{instancePath:r+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=A===t}else var p=!0;if(p){if(e.description!==void 0){const A=t;if(typeof e.description!="string")return ie.errors=[{instancePath:r+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=A===t}else var p=!0;if(p){if(e.meta!==void 0){let A=e.meta;const B=t;if(t===B)if(A&&typeof A=="object"&&!Array.isArray(A)){let T;if(A.title===void 0&&(T="title")||A.author===void 0&&(T="author"))return ie.errors=[{instancePath:r+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"}],!1;{const k=t;for(const S in A)if(!(S==="title"||S==="description"||S==="author"||S==="categories"))return ie.errors=[{instancePath:r+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:S},message:"must NOT have additional properties"}],!1;if(k===t){if(A.title!==void 0){const S=t;if(typeof A.title!="string")return ie.errors=[{instancePath:r+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=S===t}else var y=!0;if(y){if(A.description!==void 0){const S=t;if(typeof A.description!="string")return ie.errors=[{instancePath:r+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=S===t}else var y=!0;if(y){if(A.author!==void 0){const S=t;if(typeof A.author!="string")return ie.errors=[{instancePath:r+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=S===t}else var y=!0;if(y)if(A.categories!==void 0){let S=A.categories;const F=t;if(t===F)if(Array.isArray(S)){var u=!0;const I=S.length;for(let V=0;V<I;V++){const z=t;if(typeof S[V]!="string")return ie.errors=[{instancePath:r+"/meta/categories/"+V,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=z===t;if(!u)break}}else return ie.errors=[{instancePath:r+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var y=F===t}else var y=!0}}}}}else return ie.errors=[{instancePath:r+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=B===t}else var p=!0;if(p){if(e.preferredVersions!==void 0){let A=e.preferredVersions;const B=t;if(t===B)if(A&&typeof A=="object"&&!Array.isArray(A)){let T;if(A.php===void 0&&(T="php")||A.wp===void 0&&(T="wp"))return ie.errors=[{instancePath:r+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"}],!1;{const k=t;for(const S in A)if(!(S==="php"||S==="wp"))return ie.errors=[{instancePath:r+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:S},message:"must NOT have additional properties"}],!1;if(k===t){if(A.php!==void 0){let S=A.php;const F=t,D=t;let I=!1;const V=t;if(typeof S!="string"){const z={instancePath:r+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[z]:i.push(z),t++}if(!(S==="8.3"||S==="8.2"||S==="8.1"||S==="8.0"||S==="7.4"||S==="7.3"||S==="7.2"||S==="7.1"||S==="7.0")){const z={instancePath:r+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:hu.enum},message:"must be equal to one of the allowed values"};i===null?i=[z]:i.push(z),t++}var d=V===t;if(I=I||d,!I){const z=t;if(typeof S!="string"){const Y={instancePath:r+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Y]:i.push(Y),t++}if(S!=="latest"){const Y={instancePath:r+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};i===null?i=[Y]:i.push(Y),t++}var d=z===t;I=I||d}if(I)t=D,i!==null&&(D?i.length=D:i=null);else{const z={instancePath:r+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[z]:i.push(z),t++,ie.errors=i,!1}var g=F===t}else var g=!0;if(g)if(A.wp!==void 0){const S=t;if(typeof A.wp!="string")return ie.errors=[{instancePath:r+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var g=S===t}else var g=!0}}}else return ie.errors=[{instancePath:r+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=B===t}else var p=!0;if(p){if(e.features!==void 0){let A=e.features;const B=t;if(t===B)if(A&&typeof A=="object"&&!Array.isArray(A)){const T=t;for(const k in A)if(k!=="networking")return ie.errors=[{instancePath:r+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:k},message:"must NOT have additional properties"}],!1;if(T===t&&A.networking!==void 0&&typeof A.networking!="boolean")return ie.errors=[{instancePath:r+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return ie.errors=[{instancePath:r+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=B===t}else var p=!0;if(p){if(e.extraLibraries!==void 0){let A=e.extraLibraries;const B=t;if(t===B)if(Array.isArray(A)){var b=!0;const T=A.length;for(let k=0;k<T;k++){let S=A[k];const F=t;if(typeof S!="string")return ie.errors=[{instancePath:r+"/extraLibraries/"+k,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(S!=="wp-cli")return ie.errors=[{instancePath:r+"/extraLibraries/"+k,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var b=F===t;if(!b)break}}else return ie.errors=[{instancePath:r+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=B===t}else var p=!0;if(p){if(e.constants!==void 0){let A=e.constants;const B=t;if(t===t)if(A&&typeof A=="object"&&!Array.isArray(A))for(const k in A){let S=A[k];const F=t;if(typeof S!="string"&&typeof S!="boolean"&&!(typeof S=="number"&&isFinite(S)))return ie.errors=[{instancePath:r+"/constants/"+k.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPConstants/additionalProperties/type",keyword:"type",params:{type:yu.additionalProperties.type},message:"must be string,boolean,number"}],!1;var w=F===t;if(!w)break}else return ie.errors=[{instancePath:r+"/constants",schemaPath:"#/definitions/PHPConstants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=B===t}else var p=!0;if(p){if(e.plugins!==void 0){let A=e.plugins;const B=t;if(t===B)if(Array.isArray(A)){var H=!0;const T=A.length;for(let k=0;k<T;k++){let S=A[k];const F=t,D=t;let I=!1;const V=t;if(typeof S!="string"){const K={instancePath:r+"/plugins/"+k,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),t++}var P=V===t;if(I=I||P,!I){const K=t;le(S,{instancePath:r+"/plugins/"+k,parentData:A,parentDataProperty:k,rootData:o})||(i=i===null?le.errors:i.concat(le.errors),t=i.length);var P=K===t;I=I||P}if(I)t=D,i!==null&&(D?i.length=D:i=null);else{const K={instancePath:r+"/plugins/"+k,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[K]:i.push(K),t++,ie.errors=i,!1}var H=F===t;if(!H)break}}else return ie.errors=[{instancePath:r+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=B===t}else var p=!0;if(p){if(e.siteOptions!==void 0){let A=e.siteOptions;const B=t;if(t===B)if(A&&typeof A=="object"&&!Array.isArray(A)){const T=t;for(const k in A)if(k!=="blogname"){const S=t;if(typeof A[k]!="string")return ie.errors=[{instancePath:r+"/siteOptions/"+k.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=S===t;if(!N)break}if(T===t&&A.blogname!==void 0&&typeof A.blogname!="string")return ie.errors=[{instancePath:r+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return ie.errors=[{instancePath:r+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var p=B===t}else var p=!0;if(p){if(e.login!==void 0){let A=e.login;const B=t,x=t;let T=!1;const k=t;if(typeof A!="boolean"){const F={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[F]:i.push(F),t++}var j=k===t;if(T=T||j,!T){const F=t;if(t===F)if(A&&typeof A=="object"&&!Array.isArray(A)){let I;if(A.username===void 0&&(I="username")||A.password===void 0&&(I="password")){const V={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:I},message:"must have required property '"+I+"'"};i===null?i=[V]:i.push(V),t++}else{const V=t;for(const z in A)if(!(z==="username"||z==="password")){const K={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:z},message:"must NOT have additional properties"};i===null?i=[K]:i.push(K),t++;break}if(V===t){if(A.username!==void 0){const z=t;if(typeof A.username!="string"){const K={instancePath:r+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),t++}var q=z===t}else var q=!0;if(q)if(A.password!==void 0){const z=t;if(typeof A.password!="string"){const Y={instancePath:r+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Y]:i.push(Y),t++}var q=z===t}else var q=!0}}}else{const I={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[I]:i.push(I),t++}var j=F===t;T=T||j}if(T)t=x,i!==null&&(x?i.length=x:i=null);else{const F={instancePath:r+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[F]:i.push(F),t++,ie.errors=i,!1}var p=B===t}else var p=!0;if(p){if(e.steps!==void 0){let A=e.steps;const B=t;if(t===B)if(Array.isArray(A)){var $=!0;const T=A.length;for(let k=0;k<T;k++){let S=A[k];const F=t,D=t;let I=!1;const V=t;h(S,{instancePath:r+"/steps/"+k,parentData:A,parentDataProperty:k,rootData:o})||(i=i===null?h.errors:i.concat(h.errors),t=i.length);var W=V===t;if(I=I||W,!I){const K=t;if(typeof S!="string"){const G={instancePath:r+"/steps/"+k,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[G]:i.push(G),t++}var W=K===t;if(I=I||W,!I){const G=t,se={instancePath:r+"/steps/"+k,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};i===null?i=[se]:i.push(se),t++;var W=G===t;if(I=I||W,!I){const X=t;if(typeof S!="boolean"){const re={instancePath:r+"/steps/"+k,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[re]:i.push(re),t++}if(S!==!1){const re={instancePath:r+"/steps/"+k,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};i===null?i=[re]:i.push(re),t++}var W=X===t;if(I=I||W,!I){const re=t;if(S!==null){const te={instancePath:r+"/steps/"+k,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};i===null?i=[te]:i.push(te),t++}var W=re===t;I=I||W}}}}if(I)t=D,i!==null&&(D?i.length=D:i=null);else{const K={instancePath:r+"/steps/"+k,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[K]:i.push(K),t++,ie.errors=i,!1}var $=F===t;if(!$)break}}else return ie.errors=[{instancePath:r+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=B===t}else var p=!0;if(p)if(e.$schema!==void 0){const A=t;if(typeof e.$schema!="string")return ie.errors=[{instancePath:r+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var p=A===t}else var p=!0}}}}}}}}}}}}else return ie.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ie.errors=i,t===0}function Vt(e,{instancePath:r="",parentData:s,parentDataProperty:n,rootData:o=e}={}){let i=null,t=0;return ie(e,{instancePath:r,parentData:s,parentDataProperty:n,rootData:o})||(i=i===null?ie.errors:i.concat(ie.errors),t=i.length),Vt.errors=i,t===0}const{wpCLI:gu,...xn}=ip,wu={...xn,"wp-cli":gu,importFile:xn.importWxr};function vo(e,{progress:r=new us,semaphore:s=new Io({concurrency:3}),onStepCompleted:n=()=>{},corsProxy:o}={}){var b,w,H,P,N,j,q,$,W;e=structuredClone(e),e={...e,steps:(e.steps||[]).filter(Pu).filter(Eu)};for(const O of e.steps)!O||typeof O!="object"||(O.step==="importFile"?(O.step="importWxr",xe.warn('The "importFile" step is deprecated. Use "importWxr" instead.')):(O==null?void 0:O.step)==="installPlugin"&&"pluginZipFile"in O?(O.pluginData=O.pluginZipFile,xe.warn('The "pluginZipFile" option of the "installPlugin" step is deprecated. Use "pluginData" instead.')):(O==null?void 0:O.step)==="installTheme"&&"themeZipFile"in O&&(O.themeData=O.themeZipFile,xe.warn('The "themeZipFile" option of the "installTheme" step is deprecated. Use "themeData" 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 O=e.plugins.map(A=>typeof A=="string"?A.startsWith("https://")?{resource:"url",url:A}:{resource:"wordpress.org/plugins",slug:A}:A).map(A=>({step:"installPlugin",pluginData:A}));e.steps.unshift(...O)}e.login&&e.steps.push({step:"login",...e.login===!0?{username:"admin"}:e.login});const i=((b=e.steps)==null?void 0:b.findIndex(O=>typeof O=="object"&&(O==null?void 0:O.step)&&["wp-cli","enableMultisite"].includes(O.step)))??-1;if((w=e==null?void 0:e.extraLibraries)!=null&&w.includes("wp-cli")||i!==-1){const O={step:"writeFile",data:Zo,path:ui};i===-1?(H=e.steps)==null||H.push(O):(P=e.steps)==null||P.splice(i,0,O)}const t=(N=e.steps)==null?void 0:N.findIndex(O=>typeof O=="object"&&(O==null?void 0:O.step)==="importWxr");t!==void 0&&t>-1&&((j=e.steps)==null||j.splice(t,0,{step:"installPlugin",pluginData:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:p,errors:y}=bu(e);if(!p){const O=new Error(`Invalid blueprint: ${y[0].message} at ${y[0].instancePath}`);throw O.errors=y,O}const u=e.steps||[],d=u.reduce((O,A)=>{var B;return O+(((B=A.progress)==null?void 0:B.weight)||1)},0),g=u.map(O=>ku(O,{semaphore:s,rootProgressTracker:r,totalProgressWeight:d,corsProxy:o}));return{versions:{php:vu((q=e.preferredVersions)==null?void 0:q.php,os,Xn),wp:(($=e.preferredVersions)==null?void 0:$.wp)||"latest"},features:{networking:((W=e.features)==null?void 0:W.networking)??!1},extraLibraries:e.extraLibraries||[],run:async O=>{try{for(const{resources:A}of g)for(const B of A)B.setPlayground(O),B.isAsync&&B.resolve();for(const[A,{run:B,step:x}]of Object.entries(g))try{const T=await B(O);n(T,x)}catch(T){throw xe.error(T),new Error(`Error when executing the blueprint step #${A} (${JSON.stringify(x)}) ${T instanceof Error?`: ${T.message}`:T}`,{cause:T})}}finally{try{await O.goTo(e.landingPage||"/")}catch{}r.finish()}}}}function bu(e){var o;const r=Vt(e);if(r)return{valid:r};const s=new Set;for(const i of Vt.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||s.add(i.instancePath);const n=(o=Vt.errors)==null?void 0:o.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&s.has(i.instancePath)));return{valid:r,errors:n}}function vu(e,r,s){return e&&r.includes(e)?e:s}function Pu(e){return!!(typeof e=="object"&&e)}function Eu(e){return["setPhpIniEntry","request"].includes(e.step)?(xe.warn(`The "${e.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function ku(e,{semaphore:r,rootProgressTracker:s,totalProgressWeight:n,corsProxy:o}){var g;const i=s.stage((((g=e.progress)==null?void 0:g.weight)||1)/n),t={};for(const b of Object.keys(e)){let w=e[b];tu(w)&&(w=br.create(w,{semaphore:r,corsProxy:o})),t[b]=w}const p=async b=>{var w;try{return i.fillSlowly(),await wu[e.step](b,await Su(t),{tracker:i,initialCaption:(w=e.progress)==null?void 0:w.caption})}finally{i.finish()}},y=Ln(t),u=Ln(t).filter(b=>b.isAsync),d=1/(u.length+1);for(const b of u)b.progress=i.stage(d);return{run:p,step:e,resources:y}}function Ln(e){const r=[];for(const s in e){const n=e[s];n instanceof br&&r.push(n)}return r}async function Su(e){const r={};for(const s in e){const n=e[s];n instanceof br?r[s]=await n.resolve():r[s]=n}return r}async function Po(e,r){await e.run(r)}function Au(){}/**
757
753
  * @license
758
754
  * Copyright 2019 Google LLC
759
755
  * SPDX-License-Identifier: Apache-2.0
760
- */const Po=Symbol("Comlink.proxy"),xu=Symbol("Comlink.endpoint"),Tu=Symbol("Comlink.releaseProxy"),zs=Symbol("Comlink.finalizer"),Yt=Symbol("Comlink.thrown"),ko=e=>typeof e=="object"&&e!==null||typeof e=="function",$u={canHandle:e=>ko(e)&&e[Po],serialize(e){const{port1:r,port2:s}=new MessageChannel;return xi(e,r),[s,[s]]},deserialize(e){return e.start(),Ti(e)}},Au={canHandle:e=>ko(e)&&Yt in e,serialize({value:e}){let r;return e instanceof Error?r={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:r={isError:!1,value:e},[r,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},Jr=new Map([["proxy",$u],["throw",Au]]);function Su(e,r){for(const s of e)if(r===s||s==="*"||s instanceof RegExp&&s.test(r))return!0;return!1}function xi(e,r=globalThis,s=["*"]){r.addEventListener("message",function n(o){if(!o||!o.data)return;if(!Su(s,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:i,type:t,path:p}=Object.assign({path:[]},o.data),y=(o.data.argumentList||[]).map(Rr);let u;try{const d=p.slice(0,-1).reduce((_,b)=>_[b],e),w=p.reduce((_,b)=>_[b],e);switch(t){case"GET":u=w;break;case"SET":d[p.slice(-1)[0]]=Rr(o.data.value),u=!0;break;case"APPLY":u=w.apply(d,y);break;case"CONSTRUCT":{const _=new w(...y);u=To(_)}break;case"ENDPOINT":{const{port1:_,port2:b}=new MessageChannel;xi(e,b),u=ju(_,[_])}break;case"RELEASE":u=void 0;break;default:return}}catch(d){u={value:d,[Yt]:0}}Promise.resolve(u).catch(d=>({value:d,[Yt]:0})).then(d=>{const[w,_]=is(d);r.postMessage(Object.assign(Object.assign({},w),{id:i}),_),t==="RELEASE"&&(r.removeEventListener("message",n),Eo(r),zs in e&&typeof e[zs]=="function"&&e[zs]())}).catch(d=>{const[w,_]=is({value:new TypeError("Unserializable return value"),[Yt]:0});r.postMessage(Object.assign(Object.assign({},w),{id:i}),_)})}),r.start&&r.start()}function Ru(e){return e.constructor.name==="MessagePort"}function Eo(e){Ru(e)&&e.close()}function Ti(e,r){return si(e,[],r)}function Ut(e){if(e)throw new Error("Proxy has been released and is not useable")}function Oo(e){return Xr(e,{type:"RELEASE"}).then(()=>{Eo(e)})}const ts=new WeakMap,ss="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const r=(ts.get(e)||0)-1;ts.set(e,r),r===0&&Oo(e)});function Fu(e,r){const s=(ts.get(r)||0)+1;ts.set(r,s),ss&&ss.register(e,r,e)}function Bu(e){ss&&ss.unregister(e)}function si(e,r=[],s=function(){}){let n=!1;const o=new Proxy(s,{get(i,t){if(Ut(n),t===Tu)return()=>{Bu(o),Oo(e),n=!0};if(t==="then"){if(r.length===0)return{then:()=>o};const p=Xr(e,{type:"GET",path:r.map(y=>y.toString())}).then(Rr);return p.then.bind(p)}return si(e,[...r,t])},set(i,t,p){Ut(n);const[y,u]=is(p);return Xr(e,{type:"SET",path:[...r,t].map(d=>d.toString()),value:y},u).then(Rr)},apply(i,t,p){Ut(n);const y=r[r.length-1];if(y===xu)return Xr(e,{type:"ENDPOINT"}).then(Rr);if(y==="bind")return si(e,r.slice(0,-1));const[u,d]=Rn(p);return Xr(e,{type:"APPLY",path:r.map(w=>w.toString()),argumentList:u},d).then(Rr)},construct(i,t){Ut(n);const[p,y]=Rn(t);return Xr(e,{type:"CONSTRUCT",path:r.map(u=>u.toString()),argumentList:p},y).then(Rr)}});return Fu(o,e),o}function Iu(e){return Array.prototype.concat.apply([],e)}function Rn(e){const r=e.map(is);return[r.map(s=>s[0]),Iu(r.map(s=>s[1]))]}const xo=new WeakMap;function ju(e,r){return xo.set(e,r),e}function To(e){return Object.assign(e,{[Po]:!0})}function Lu(e,r=globalThis,s="*"){return{postMessage:(n,o)=>e.postMessage(n,s,o),addEventListener:r.addEventListener.bind(r),removeEventListener:r.removeEventListener.bind(r)}}function is(e){for(const[r,s]of Jr)if(s.canHandle(e)){const[n,o]=s.serialize(e);return[{type:"HANDLER",name:r,value:n},o]}return[{type:"RAW",value:e},xo.get(e)||[]]}function Rr(e){switch(e.type){case"HANDLER":return Jr.get(e.name).deserialize(e.value);case"RAW":return e.value}}function Xr(e,r,s){return new Promise(n=>{const o=Nu();e.addEventListener("message",function i(t){!t.data||!t.data.id||t.data.id!==o||(e.removeEventListener("message",i),n(t.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:o},r),s)})}function Nu(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function Cu(e,r=void 0){qu();const s=e instanceof Worker?e:Lu(e,r),n=Ti(s),o=$o(n);return new Proxy(o,{get:(i,t)=>t==="isConnected"?async()=>{for(;;)try{await Du(n.isConnected(),200);break}catch{}}:n[t]})}async function Du(e,r){return new Promise((s,n)=>{setTimeout(n,r),e.then(s)})}let Fn=!1;function qu(){if(Fn)return;Fn=!0,Jr.set("EVENT",{canHandle:s=>s instanceof CustomEvent,serialize:s=>[{detail:s.detail},[]],deserialize:s=>s}),Jr.set("FUNCTION",{canHandle:s=>typeof s=="function",serialize(s){const{port1:n,port2:o}=new MessageChannel;return xi(s,n),[o,[o]]},deserialize(s){return s.start(),Ti(s)}}),Jr.set("PHPResponse",{canHandle:s=>typeof s=="object"&&s!==null&&"headers"in s&&"bytes"in s&&"errors"in s&&"exitCode"in s&&"httpStatusCode"in s,serialize(s){return[s.toRawData(),[]]},deserialize(s){return Qt.fromRawData(s)}});const e=Jr.get("throw"),r=e==null?void 0:e.serialize;e.serialize=({value:s})=>{const n=r({value:s});return s.response&&(n[0].value.response=s.response),s.source&&(n[0].value.source=s.source),n}}function $o(e){return new Proxy(e,{get(r,s){switch(typeof r[s]){case"function":return(...n)=>r[s](...n);case"object":return r[s]===null?r[s]:$o(r[s]);case"undefined":case"number":case"string":return r[s];default:return To(r[s])}}})}async function Uu({iframe:e,blueprint:r,remoteUrl:s,progressTracker:n=new ls,disableProgressBar:o,onBlueprintStepCompleted:i,onClientConnected:t=()=>{},sapiName:p,onBeforeBlueprint:y,mounts:u,scope:d,corsProxy:w,shouldInstallWordPress:_}){Mu(s),zu(e),s=Wu(s,{progressbar:!o}),n.setCaption("Preparing WordPress"),r||(r={});const b=_o(r,{progress:n.stage(.5),onStepCompleted:i,corsProxy:w});await new Promise(q=>{e.src=s,e.addEventListener("load",q,!1)});const B=Cu(e.contentWindow,e.ownerDocument.defaultView);await B.isConnected(),n.pipe(B);const P=n.stage();return await B.onDownloadProgress(P.loadingListener),await B.boot({mounts:u,sapiName:p,scope:d??Math.random().toFixed(16),shouldInstallWordPress:_,phpVersion:b.versions.php,wpVersion:b.versions.wp,withNetworking:b.features.networking}),await B.isReady(),P.finish(),qo(Se,B),t(B),y&&await y(),await vo(b,B),n.finish(),B}function zu(e){var r,s;(r=e.sandbox)!=null&&r.length&&!((s=e.sandbox)!=null&&s.contains("allow-storage-access-by-user-activation"))&&e.sandbox.add("allow-storage-access-by-user-activation")}const Kt="https://playground.wordpress.net";function Mu(e){const r=new URL(e,Kt);if((r.origin===Kt||r.hostname==="localhost")&&r.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${r}. Expected origin to be ${Kt}/remote.html.`)}function Wu(e,r){const s=new URL(e,Kt),n=new URLSearchParams(s.search);for(const[o,i]of Object.entries(r))if(i!=null&&i!==!1)if(Array.isArray(i))for(const t of i)n.append(o,t.toString());else n.set(o,i.toString());return s.search=n.toString(),s.toString()}exports.LatestSupportedPHPVersion=Kn;exports.SupportedPHPVersions=as;exports.SupportedPHPVersionsList=ep;exports.activatePlugin=ai;exports.activateTheme=oi;exports.compileBlueprint=_o;exports.cp=Wn;exports.defineSiteUrl=hi;exports.defineWpConfigConsts=ns;exports.enableMultisite=Mn;exports.exportWXR=ra;exports.importThemeStarterContent=yi;exports.importWordPressFiles=ea;exports.importWxr=Qn;exports.installPlugin=sa;exports.installTheme=ia;exports.login=na;exports.mkdir=Zn;exports.mv=Hn;exports.phpVar=Fe;exports.phpVars=xt;exports.request=qn;exports.resetData=aa;exports.rm=pi;exports.rmdir=Vn;exports.runBlueprintSteps=vo;exports.runPHP=Nn;exports.runPHPWithOptions=Cn;exports.runSql=Dn;exports.runWpInstallationWizard=oa;exports.setPhpIniEntries=Jo;exports.setPluginProxyURL=Ou;exports.setSiteLanguage=fa;exports.setSiteOptions=fi;exports.startPlaygroundWeb=Uu;exports.unzip=ps;exports.updateUserMeta=Un;exports.wpCLI=ui;exports.wpContentFilesExcludedFromExport=ii;exports.writeFile=ci;exports.writeFiles=Xn;exports.zipWpContent=pa;
756
+ */const Eo=Symbol("Comlink.proxy"),Tu=Symbol("Comlink.endpoint"),Cu=Symbol("Comlink.releaseProxy"),qs=Symbol("Comlink.finalizer"),Yt=Symbol("Comlink.thrown"),ko=e=>typeof e=="object"&&e!==null||typeof e=="function",Ou={canHandle:e=>ko(e)&&e[Eo],serialize(e){const{port1:r,port2:s}=new MessageChannel;return Ti(e,r),[s,[s]]},deserialize(e){return e.start(),Ci(e)}},xu={canHandle:e=>ko(e)&&Yt in e,serialize({value:e}){let r;return e instanceof Error?r={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:r={isError:!1,value:e},[r,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},et=new Map([["proxy",Ou],["throw",xu]]);function Lu(e,r){for(const s of e)if(r===s||s==="*"||s instanceof RegExp&&s.test(r))return!0;return!1}function Ti(e,r=globalThis,s=["*"]){r.addEventListener("message",function n(o){if(!o||!o.data)return;if(!Lu(s,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:i,type:t,path:p}=Object.assign({path:[]},o.data),y=(o.data.argumentList||[]).map(Ir);let u;try{const d=p.slice(0,-1).reduce((b,w)=>b[w],e),g=p.reduce((b,w)=>b[w],e);switch(t){case"GET":u=g;break;case"SET":d[p.slice(-1)[0]]=Ir(o.data.value),u=!0;break;case"APPLY":u=g.apply(d,y);break;case"CONSTRUCT":{const b=new g(...y);u=Co(b)}break;case"ENDPOINT":{const{port1:b,port2:w}=new MessageChannel;Ti(e,w),u=Du(b,[b])}break;case"RELEASE":u=void 0;break;default:return}}catch(d){u={value:d,[Yt]:0}}Promise.resolve(u).catch(d=>({value:d,[Yt]:0})).then(d=>{const[g,b]=ns(d);r.postMessage(Object.assign(Object.assign({},g),{id:i}),b),t==="RELEASE"&&(r.removeEventListener("message",n),So(r),qs in e&&typeof e[qs]=="function"&&e[qs]())}).catch(d=>{const[g,b]=ns({value:new TypeError("Unserializable return value"),[Yt]:0});r.postMessage(Object.assign(Object.assign({},g),{id:i}),b)})}),r.start&&r.start()}function Iu(e){return e.constructor.name==="MessagePort"}function So(e){Iu(e)&&e.close()}function Ci(e,r){return ii(e,[],r)}function Ut(e){if(e)throw new Error("Proxy has been released and is not useable")}function Ao(e){return Qr(e,{type:"RELEASE"}).then(()=>{So(e)})}const ss=new WeakMap,is="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const r=(ss.get(e)||0)-1;ss.set(e,r),r===0&&Ao(e)});function Hu(e,r){const s=(ss.get(r)||0)+1;ss.set(r,s),is&&is.register(e,r,e)}function $u(e){is&&is.unregister(e)}function ii(e,r=[],s=function(){}){let n=!1;const o=new Proxy(s,{get(i,t){if(Ut(n),t===Cu)return()=>{$u(o),Ao(e),n=!0};if(t==="then"){if(r.length===0)return{then:()=>o};const p=Qr(e,{type:"GET",path:r.map(y=>y.toString())}).then(Ir);return p.then.bind(p)}return ii(e,[...r,t])},set(i,t,p){Ut(n);const[y,u]=ns(p);return Qr(e,{type:"SET",path:[...r,t].map(d=>d.toString()),value:y},u).then(Ir)},apply(i,t,p){Ut(n);const y=r[r.length-1];if(y===Tu)return Qr(e,{type:"ENDPOINT"}).then(Ir);if(y==="bind")return ii(e,r.slice(0,-1));const[u,d]=In(p);return Qr(e,{type:"APPLY",path:r.map(g=>g.toString()),argumentList:u},d).then(Ir)},construct(i,t){Ut(n);const[p,y]=In(t);return Qr(e,{type:"CONSTRUCT",path:r.map(u=>u.toString()),argumentList:p},y).then(Ir)}});return Hu(o,e),o}function Ru(e){return Array.prototype.concat.apply([],e)}function In(e){const r=e.map(ns);return[r.map(s=>s[0]),Ru(r.map(s=>s[1]))]}const To=new WeakMap;function Du(e,r){return To.set(e,r),e}function Co(e){return Object.assign(e,{[Eo]:!0})}function Bu(e,r=globalThis,s="*"){return{postMessage:(n,o)=>e.postMessage(n,s,o),addEventListener:r.addEventListener.bind(r),removeEventListener:r.removeEventListener.bind(r)}}function ns(e){for(const[r,s]of et)if(s.canHandle(e)){const[n,o]=s.serialize(e);return[{type:"HANDLER",name:r,value:n},o]}return[{type:"RAW",value:e},To.get(e)||[]]}function Ir(e){switch(e.type){case"HANDLER":return et.get(e.name).deserialize(e.value);case"RAW":return e.value}}function Qr(e,r,s){return new Promise(n=>{const o=Fu();e.addEventListener("message",function i(t){!t.data||!t.data.id||t.data.id!==o||(e.removeEventListener("message",i),n(t.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:o},r),s)})}function Fu(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function ju(e,r=void 0){Wu();const s=e instanceof Worker?e:Bu(e,r),n=Ci(s),o=Oo(n);return new Proxy(o,{get:(i,t)=>t==="isConnected"?async()=>{for(;;)try{await Nu(n.isConnected(),200);break}catch{}}:n[t]})}async function Nu(e,r){return new Promise((s,n)=>{setTimeout(n,r),e.then(s)})}let Hn=!1;function Wu(){if(Hn)return;Hn=!0,et.set("EVENT",{canHandle:s=>s instanceof CustomEvent,serialize:s=>[{detail:s.detail},[]],deserialize:s=>s}),et.set("FUNCTION",{canHandle:s=>typeof s=="function",serialize(s){const{port1:n,port2:o}=new MessageChannel;return Ti(s,n),[o,[o]]},deserialize(s){return s.start(),Ci(s)}}),et.set("PHPResponse",{canHandle:s=>typeof s=="object"&&s!==null&&"headers"in s&&"bytes"in s&&"errors"in s&&"exitCode"in s&&"httpStatusCode"in s,serialize(s){return[s.toRawData(),[]]},deserialize(s){return Jt.fromRawData(s)}});const e=et.get("throw"),r=e==null?void 0:e.serialize;e.serialize=({value:s})=>{const n=r({value:s});return s.response&&(n[0].value.response=s.response),s.source&&(n[0].value.source=s.source),n}}function Oo(e){return new Proxy(e,{get(r,s){switch(typeof r[s]){case"function":return(...n)=>r[s](...n);case"object":return r[s]===null?r[s]:Oo(r[s]);case"undefined":case"number":case"string":return r[s];default:return Co(r[s])}}})}function vr(e){return Object.fromEntries(Object.entries(e).map(([r,s])=>[s,r]))}const Uu={server_name:0,max_fragment_length:1,client_certificate_url:2,trusted_ca_keys:3,truncated_hmac:4,status_request:5,user_mapping:6,client_authz:7,server_authz:8,cert_type:9,supported_groups:10,ec_point_formats:11,srp:12,signature_algorithms:13,use_srtp:14,heartbeat:15,application_layer_protocol_negotiation:16,status_request_v2:17,signed_certificate_timestamp:18,client_certificate_type:19,server_certificate_type:20,padding:21,encrypt_then_mac:22,extended_master_secret:23,token_binding:24,cached_info:25,tls_its:26,compress_certificate:27,record_size_limit:28,pwd_protect:29,pwo_clear:30,password_salt:31,ticket_pinning:32,tls_cert_with_extern_psk:33,delegated_credential:34,session_ticket:35,TLMSP:36,TLMSP_proxying:37,TLMSP_delegate:38,supported_ekt_ciphers:39,pre_shared_key:41,early_data:42,supported_versions:43,cookie:44,psk_key_exchange_modes:45,reserved:46,certificate_authorities:47,oid_filters:48,post_handshake_auth:49,signature_algorithms_cert:50,key_share:51,transparency_info:52,connection_id:54};vr(Uu);const qu={host_name:0};vr(qu);const Mu={TLS1_CK_PSK_WITH_RC4_128_SHA:138,TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA:139,TLS1_CK_PSK_WITH_AES_128_CBC_SHA:140,TLS1_CK_PSK_WITH_AES_256_CBC_SHA:141,TLS1_CK_DHE_PSK_WITH_RC4_128_SHA:142,TLS1_CK_DHE_PSK_WITH_3DES_EDE_CBC_SHA:143,TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA:144,TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA:145,TLS1_CK_RSA_PSK_WITH_RC4_128_SHA:146,TLS1_CK_RSA_PSK_WITH_3DES_EDE_CBC_SHA:147,TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA:148,TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA:149,TLS1_CK_PSK_WITH_AES_128_GCM_SHA256:168,TLS1_CK_PSK_WITH_AES_256_GCM_SHA384:169,TLS1_CK_DHE_PSK_WITH_AES_128_GCM_SHA256:170,TLS1_CK_DHE_PSK_WITH_AES_256_GCM_SHA384:171,TLS1_CK_RSA_PSK_WITH_AES_128_GCM_SHA256:172,TLS1_CK_RSA_PSK_WITH_AES_256_GCM_SHA384:173,TLS1_CK_PSK_WITH_AES_128_CBC_SHA256:174,TLS1_CK_PSK_WITH_AES_256_CBC_SHA384:175,TLS1_CK_PSK_WITH_NULL_SHA256:176,TLS1_CK_PSK_WITH_NULL_SHA384:177,TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA256:178,TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA384:179,TLS1_CK_DHE_PSK_WITH_NULL_SHA256:180,TLS1_CK_DHE_PSK_WITH_NULL_SHA384:181,TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA256:182,TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA384:183,TLS1_CK_RSA_PSK_WITH_NULL_SHA256:184,TLS1_CK_RSA_PSK_WITH_NULL_SHA384:185,TLS1_CK_PSK_WITH_NULL_SHA:44,TLS1_CK_DHE_PSK_WITH_NULL_SHA:45,TLS1_CK_RSA_PSK_WITH_NULL_SHA:46,TLS1_CK_RSA_WITH_AES_128_SHA:47,TLS1_CK_DH_DSS_WITH_AES_128_SHA:48,TLS1_CK_DH_RSA_WITH_AES_128_SHA:49,TLS1_CK_DHE_DSS_WITH_AES_128_SHA:50,TLS1_CK_DHE_RSA_WITH_AES_128_SHA:51,TLS1_CK_ADH_WITH_AES_128_SHA:52,TLS1_CK_RSA_WITH_AES_256_SHA:53,TLS1_CK_DH_DSS_WITH_AES_256_SHA:54,TLS1_CK_DH_RSA_WITH_AES_256_SHA:55,TLS1_CK_DHE_DSS_WITH_AES_256_SHA:56,TLS1_CK_DHE_RSA_WITH_AES_256_SHA:57,TLS1_CK_ADH_WITH_AES_256_SHA:58,TLS1_CK_RSA_WITH_NULL_SHA256:59,TLS1_CK_RSA_WITH_AES_128_SHA256:60,TLS1_CK_RSA_WITH_AES_256_SHA256:61,TLS1_CK_DH_DSS_WITH_AES_128_SHA256:62,TLS1_CK_DH_RSA_WITH_AES_128_SHA256:63,TLS1_CK_DHE_DSS_WITH_AES_128_SHA256:64,TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA:65,TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA:66,TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA:67,TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA:68,TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA:69,TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA:70,TLS1_CK_DHE_RSA_WITH_AES_128_SHA256:103,TLS1_CK_DH_DSS_WITH_AES_256_SHA256:104,TLS1_CK_DH_RSA_WITH_AES_256_SHA256:105,TLS1_CK_DHE_DSS_WITH_AES_256_SHA256:106,TLS1_CK_DHE_RSA_WITH_AES_256_SHA256:107,TLS1_CK_ADH_WITH_AES_128_SHA256:108,TLS1_CK_ADH_WITH_AES_256_SHA256:109,TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA:132,TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA:133,TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA:134,TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA:135,TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA:136,TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA:137,TLS1_CK_RSA_WITH_SEED_SHA:150,TLS1_CK_DH_DSS_WITH_SEED_SHA:151,TLS1_CK_DH_RSA_WITH_SEED_SHA:152,TLS1_CK_DHE_DSS_WITH_SEED_SHA:153,TLS1_CK_DHE_RSA_WITH_SEED_SHA:154,TLS1_CK_ADH_WITH_SEED_SHA:155,TLS1_CK_RSA_WITH_AES_128_GCM_SHA256:156,TLS1_CK_RSA_WITH_AES_256_GCM_SHA384:157,TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256:158,TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384:159,TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256:160,TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384:161,TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256:162,TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384:163,TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256:164,TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384:165,TLS1_CK_ADH_WITH_AES_128_GCM_SHA256:166,TLS1_CK_ADH_WITH_AES_256_GCM_SHA384:167,TLS1_CK_RSA_WITH_AES_128_CCM:49308,TLS1_CK_RSA_WITH_AES_256_CCM:49309,TLS1_CK_DHE_RSA_WITH_AES_128_CCM:49310,TLS1_CK_DHE_RSA_WITH_AES_256_CCM:49311,TLS1_CK_RSA_WITH_AES_128_CCM_8:49312,TLS1_CK_RSA_WITH_AES_256_CCM_8:49313,TLS1_CK_DHE_RSA_WITH_AES_128_CCM_8:49314,TLS1_CK_DHE_RSA_WITH_AES_256_CCM_8:49315,TLS1_CK_PSK_WITH_AES_128_CCM:49316,TLS1_CK_PSK_WITH_AES_256_CCM:49317,TLS1_CK_DHE_PSK_WITH_AES_128_CCM:49318,TLS1_CK_DHE_PSK_WITH_AES_256_CCM:49319,TLS1_CK_PSK_WITH_AES_128_CCM_8:49320,TLS1_CK_PSK_WITH_AES_256_CCM_8:49321,TLS1_CK_DHE_PSK_WITH_AES_128_CCM_8:49322,TLS1_CK_DHE_PSK_WITH_AES_256_CCM_8:49323,TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM:49324,TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM:49325,TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM_8:49326,TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM_8:49327,TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA256:186,TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256:187,TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256:188,TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256:189,TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256:190,TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256:191,TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA256:192,TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256:193,TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256:194,TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256:195,TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256:196,TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256:197,TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA:49153,TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA:49154,TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA:49155,TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA:49156,TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA:49157,TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA:49158,TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA:49159,TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA:49160,TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:49161,TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:49162,TLS1_CK_ECDH_RSA_WITH_NULL_SHA:49163,TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA:49164,TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA:49165,TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA:49166,TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA:49167,TLS1_CK_ECDHE_RSA_WITH_NULL_SHA:49168,TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA:49169,TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA:49170,TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA:49171,TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA:49172,TLS1_CK_ECDH_anon_WITH_NULL_SHA:49173,TLS1_CK_ECDH_anon_WITH_RC4_128_SHA:49174,TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA:49175,TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA:49176,TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA:49177,TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA:49178,TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA:49179,TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA:49180,TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA:49181,TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA:49182,TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA:49183,TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA:49184,TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA:49185,TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA:49186,TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256:49187,TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384:49188,TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256:49189,TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384:49190,TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256:49191,TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384:49192,TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256:49193,TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384:49194,TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:49195,TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:49196,TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256:49197,TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384:49198,TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256:49199,TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384:49200,TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256:49201,TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384:49202,TLS1_CK_ECDHE_PSK_WITH_RC4_128_SHA:49203,TLS1_CK_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA:49204,TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA:49205,TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA:49206,TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256:49207,TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384:49208,TLS1_CK_ECDHE_PSK_WITH_NULL_SHA:49209,TLS1_CK_ECDHE_PSK_WITH_NULL_SHA256:49210,TLS1_CK_ECDHE_PSK_WITH_NULL_SHA384:49211,TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256:49266,TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384:49267,TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256:49268,TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384:49269,TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256:49270,TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384:49271,TLS1_CK_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256:49272,TLS1_CK_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384:49273,TLS1_CK_PSK_WITH_CAMELLIA_128_CBC_SHA256:49300,TLS1_CK_PSK_WITH_CAMELLIA_256_CBC_SHA384:49301,TLS1_CK_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256:49302,TLS1_CK_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384:49303,TLS1_CK_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256:49304,TLS1_CK_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384:49305,TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256:49306,TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384:49307,TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305:52392,TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305:52393,TLS1_CK_DHE_RSA_WITH_CHACHA20_POLY1305:52394,TLS1_CK_PSK_WITH_CHACHA20_POLY1305:52395,TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305:52396,TLS1_CK_DHE_PSK_WITH_CHACHA20_POLY1305:52397,TLS1_CK_RSA_PSK_WITH_CHACHA20_POLY1305:52398};vr(Mu);const Ku={secp256r1:23,secp384r1:24,secp521r1:25,x25519:29,x448:30};vr(Ku);const zu={uncompressed:0,ansiX962_compressed_prime:1,ansiX962_compressed_char2:2};vr(zu);const Gu={anonymous:0,rsa:1,dsa:2,ecdsa:3};vr(Gu);const Zu={none:0,md5:1,sha1:2,sha224:3,sha256:4,sha384:5,sha512:6};vr(Zu);const Vu={Warning:1,Fatal:2};vr(Vu);const Yu={CloseNotify:0,UnexpectedMessage:10,BadRecordMac:20,DecryptionFailed:21,RecordOverflow:22,DecompressionFailure:30,HandshakeFailure:40,NoCertificate:41,BadCertificate:42,UnsupportedCertificate:43,CertificateRevoked:44,CertificateExpired:45,CertificateUnknown:46,IllegalParameter:47,UnknownCa:48,AccessDenied:49,DecodeError:50,DecryptError:51,ExportRestriction:60,ProtocolVersion:70,InsufficientSecurity:71,InternalError:80,UserCanceled:90,NoRenegotiation:100,UnsupportedExtension:110};vr(Yu);crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey","deriveBits"]);async function Xu({iframe:e,blueprint:r,remoteUrl:s,progressTracker:n=new us,disableProgressBar:o,onBlueprintStepCompleted:i,onClientConnected:t=()=>{},sapiName:p,onBeforeBlueprint:y,mounts:u,scope:d,corsProxy:g,shouldInstallWordPress:b}){Ju(s),Qu(e),s=ec(s,{progressbar:!o}),n.setCaption("Preparing WordPress"),r||(r={});const w=vo(r,{progress:n.stage(.5),onStepCompleted:i,corsProxy:g});await new Promise(N=>{e.src=s,e.addEventListener("load",N,!1)});const H=ju(e.contentWindow,e.ownerDocument.defaultView);await H.isConnected(),n.pipe(H);const P=n.stage();return await H.onDownloadProgress(P.loadingListener),await H.boot({mounts:u,sapiName:p,scope:d??Math.random().toFixed(16),shouldInstallWordPress:b,phpVersion:w.versions.php,wpVersion:w.versions.wp,withNetworking:w.features.networking}),await H.isReady(),P.finish(),Wo(xe,H),t(H),y&&await y(),await Po(w,H),n.finish(),H}function Qu(e){var r,s;(r=e.sandbox)!=null&&r.length&&!((s=e.sandbox)!=null&&s.contains("allow-storage-access-by-user-activation"))&&e.sandbox.add("allow-storage-access-by-user-activation")}const Xt="https://playground.wordpress.net";function Ju(e){const r=new URL(e,Xt);if((r.origin===Xt||r.hostname==="localhost")&&r.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${r}. Expected origin to be ${Xt}/remote.html.`)}function ec(e,r){const s=new URL(e,Xt),n=new URLSearchParams(s.search);for(const[o,i]of Object.entries(r))if(i!=null&&i!==!1)if(Array.isArray(i))for(const t of i)n.append(o,t.toString());else n.set(o,i.toString());return s.search=n.toString(),s.toString()}exports.LatestSupportedPHPVersion=Xn;exports.SupportedPHPVersions=os;exports.SupportedPHPVersionsList=rp;exports.activatePlugin=oi;exports.activateTheme=pi;exports.compileBlueprint=vo;exports.cp=Kn;exports.defineSiteUrl=yi;exports.defineWpConfigConsts=as;exports.enableMultisite=Mn;exports.exportWXR=ta;exports.importThemeStarterContent=mi;exports.importWordPressFiles=ra;exports.importWxr=Jn;exports.installPlugin=ia;exports.installTheme=na;exports.login=aa;exports.mkdir=Gn;exports.mv=zn;exports.phpVar=Ie;exports.phpVars=Tt;exports.request=Wn;exports.resetData=oa;exports.rm=fi;exports.rmdir=Zn;exports.runBlueprintSteps=Po;exports.runPHP=Fn;exports.runPHPWithOptions=jn;exports.runSql=Nn;exports.runWpInstallationWizard=pa;exports.setPhpIniEntries=ep;exports.setPluginProxyURL=Au;exports.setSiteLanguage=la;exports.setSiteOptions=li;exports.startPlaygroundWeb=Xu;exports.unzip=fs;exports.updateUserMeta=Un;exports.wpCLI=ci;exports.wpContentFilesExcludedFromExport=ni;exports.writeFile=di;exports.writeFiles=Qn;exports.zipWpContent=fa;