209 lines
447 KiB
JavaScript
209 lines
447 KiB
JavaScript
|
"use strict";var Fb=Object.create;var ds=Object.defineProperty;var qb=Object.getOwnPropertyDescriptor;var Db=Object.getOwnPropertyNames;var jb=Object.getPrototypeOf,Ub=Object.prototype.hasOwnProperty;var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Sf=(t,e)=>{for(var i in e)ds(t,i,{get:e[i],enumerable:!0})},Ef=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Db(e))!Ub.call(t,n)&&n!==i&&ds(t,n,{get:()=>e[n],enumerable:!(r=qb(e,n))||r.enumerable});return t};var Ue=(t,e,i)=>(i=t!=null?Fb(jb(t)):{},Ef(e||!t||!t.__esModule?ds(i,"default",{value:t,enumerable:!0}):i,t)),$b=t=>Ef(ds({},"__esModule",{value:!0}),t);var Tf=_((gI,Cf)=>{var Of={};Cf.exports=Of;var kf={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(kf).forEach(function(t){var e=kf[t],i=Of[t]=[];i.open="\x1B["+e[0]+"m",i.close="\x1B["+e[1]+"m"})});var If=_((vI,Af)=>{"use strict";Af.exports=function(t,e){e=e||process.argv;var i=e.indexOf("--"),r=/^-{1,2}/.test(t)?"":"--",n=e.indexOf(r+t);return n!==-1&&(i===-1?!0:n<i)}});var Lf=_((yI,Nf)=>{"use strict";var Vb=require("os"),Mt=If(),ot=process.env,dr=void 0;Mt("no-color")||Mt("no-colors")||Mt("color=false")?dr=!1:(Mt("color")||Mt("colors")||Mt("color=true")||Mt("color=always"))&&(dr=!0);"FORCE_COLOR"in ot&&(dr=ot.FORCE_COLOR.length===0||parseInt(ot.FORCE_COLOR,10)!==0);function Hb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Gb(t){if(dr===!1)return 0;if(Mt("color=16m")||Mt("color=full")||Mt("color=truecolor"))return 3;if(Mt("color=256"))return 2;if(t&&!t.isTTY&&dr!==!0)return 0;var e=dr?1:0;if(process.platform==="win32"){var i=Vb.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in ot)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in ot})||ot.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in ot)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ot.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in ot){var r=parseInt((ot.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ot.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ot.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(ot.TERM)||"COLORTERM"in ot?1:(ot.TERM==="dumb",e)}function wa(t){var e=Gb(t);return Hb(e)}Nf.exports={supportsColor:wa,stdout:wa(process.stdout),stderr:wa(process.stderr)}});var Rf=_((bI,Bf)=>{Bf.exports=function(e,i){var r="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7
|
|||
|
`)!=-1,r=this._styles,n=r.length;n--;){var s=Di[r[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,i&&(e=e.replace(Wb,function(o){return s.close+o+s.open}))}return e}ye.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(i){ye[i]=function(r){if(typeof t[i]=="object"){var n=r;for(var s in t[i])n=ye[t[i][s]](n);return n}return ye[t[i]](r)}})(e)};function Qb(){var t={};return Object.keys(Kf).forEach(function(e){t[e]={get:function(){return Wf([e])}}}),t}var Xb=function(e,i){var r=i.split("");return r=r.map(e),r.join("")};ye.trap=Rf();ye.zalgo=Mf();ye.maps={};ye.maps.america=qf()(ye);ye.maps.zebra=jf()(ye);ye.maps.rainbow=$f()(ye);ye.maps.random=Hf()(ye);for(Gf in ye.maps)(function(t){ye[t]=function(e){return Xb(ye.maps[t],e)}})(Gf);var Gf;Yf(ye,Qb())});var Qf=_((CI,Zf)=>{var e_=Jf();Zf.exports=e_});var eh=_((TI,Xf)=>{var mr=1e3,gr=mr*60,vr=gr*60,ji=vr*24,t_=ji*7,i_=ji*365.25;Xf.exports=function(t,e){e=e||{};var i=typeof t;if(i==="string"&&t.length>0)return r_(t);if(i==="number"&&isFinite(t))return e.long?s_(t):n_(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function r_(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var i=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return i*i_;case"weeks":case"week":case"w":return i*t_;case"days":case"day":case"d":return i*ji;case"hours":case"hour":case"hrs":case"hr":case"h":return i*vr;case"minutes":case"minute":case"mins":case"min":case"m":return i*gr;case"seconds":case"second":case"secs":case"sec":case"s":return i*mr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function n_(t){var e=Math.abs(t);return e>=ji?Math.round(t/ji)+"d":e>=vr?Math.round(t/vr)+"h":e>=gr?Math.round(t/gr)+"m":e>=mr?Math.round(t/mr)+"s":t+"ms"}function s_(t){var e=Math.abs(t);return e>=ji?ms(t,e,ji,"day"):e>=vr?ms(t,e,vr,"hour"):e>=gr?ms(t,e,gr,"minute"):e>=mr?ms(t,e,mr,"second"):t+" ms"}function ms(t,e,i,r){var n=e>=i*1.5;return Math.round(t/i)+" "+r+(n?"s":"")}});var xa=_((AI,th)=>{function o_(t){i.debug=i,i.default=i,i.coerce=l,i.disable=s,i.enable=n,i.enabled=o,i.humanize=eh(),i.destroy=c,Object.keys(t).forEach(u=>{i[u]=t[u]}),i.names=[],i.skips=[],i.formatters={};function e(u){let f=0;for(let d=0;d<u.length;d++)f=(f<<5)-f+u.charCodeAt(d),f|=0;return i.colors[Math.abs(f)%i.colors.length]}i.selectColor=e;function i(u){let f,d=null,g,m;function y(...b){if(!y.enabled)return;let x=y,E=Number(new Date),O=E-(f||E);x.diff=O,x.prev=f,x.curr=E,f=E,b[0]=i.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let k=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(R,T)=>{if(R==="%%")return"%";k++;let A=i.formatters[T];if(typeof A=="function"){let C=b[k];R=A.call(x,C),b.splice(k,1),k--}return R}),i.formatArgs.call(x,b),(x.log||i.log).apply(x,b)}return y.namespace=u,y.useColors=i.useColors(),y.color=i.selectColor(u),y.extend=r,y.destroy=i.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(g!==i.namespaces&&(g=i.namespaces,m=i.enabled(u)),m),set:b=>{d=b}}),typeof i.init=="function"&&i.init(y),y}function r(u,f){let d=i(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function n(u){i.save(u),i.namespaces=u,i.names=[],i.skips=[];let f,d=(typeof u=="string"?u:"").split(/[\s,]+/),g=d.length;for(f=0;f<g;f++)d[f]&&(u=d[f].replace(/\*/g,".*?"),u[0]==="-"?i.skips.push(new RegExp("^"+u.slice(1)+"$")):i.names.push(new RegExp("^"+u+"$")))}function s(){let u=[...i.names.map(a),...i.skips.map(a).map(f=>"-"+f
|
|||
|
`).join(`
|
|||
|
`+s),t.push(n+"m+"+bs.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=__()+e+" "+t[0]}function __(){return Qe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function w_(...t){return process.stderr.write(ys.format(...t)+`
|
|||
|
`)}function x_(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function S_(){return process.env.DEBUG}function E_(t){t.inspectOpts={};let e=Object.keys(Qe.inspectOpts);for(let i=0;i<e.length;i++)t.inspectOpts[e[i]]=Qe.inspectOpts[e[i]]}bs.exports=xa()(Qe);var{formatters:lh}=bs.exports;lh.o=function(t){return this.inspectOpts.colors=this.useColors,ys.inspect(t,this.inspectOpts).split(`
|
|||
|
`).map(e=>e.trim()).join(" ")};lh.O=function(t){return this.inspectOpts.colors=this.useColors,ys.inspect(t,this.inspectOpts)}});var yr=_((LI,Ea)=>{typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ea.exports=ih():Ea.exports=ch()});var Rh=_((BI,ow)=>{ow.exports={name:"dotenv",version:"16.4.5",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var qh=_((RI,ii)=>{var Ra=require("fs"),Pa=require("path"),aw=require("os"),lw=require("crypto"),cw=Rh(),Ma=cw.version,uw=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function fw(t){let e={},i=t.toString();i=i.replace(/\r\n?/mg,`
|
|||
|
`);let r;for(;(r=uw.exec(i))!=null;){let n=r[1],s=r[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
|
|||
|
`),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function hw(t){let e=Fh(t),i=$e.configDotenv({path:e});if(!i.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw o.code="MISSING_DATA",o}let r=Mh(t).split(","),n=r.length,s;for(let o=0;o<n;o++)try{let a=r[o].trim(),l=mw(i,a);s=$e.decrypt(l.ciphertext,l.key);break}catch(a){if(o+1>=n)throw a}return $e.parse(s)}function pw(t){console.log(`[dotenv@${Ma}][INFO] ${t}`)}function dw(t){console.log(`[dotenv@${Ma}][WARN] ${t}`)}function Ts(t){console.log(`[dotenv@${Ma}][DEBUG] ${t}`)}function Mh(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function mw(t,e){let i;try{i=new URL(e)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let r=i.password;if(!r){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let n=i.searchParams.get("environment");if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let s=`DOTENV_VAULT_${n.toUpperCase()}`,o=t.parsed[s];if(!o){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:o,key:r}}function Fh(t){let e=null;if(t&&t.path&&t.path.length>0)if(Array.isArray(t.path))for(let i of t.path)Ra.existsSync(i)&&(e=i.endsWith(".vault")?i:`${i}.vault`);else e=t.path.endsWith(".vault")?t.path:`${t.path}.vault`;else e=Pa.resolve(process.cwd(),".env.vault");return Ra.existsSync(e)?e:null}function Ph(t){return t[0]==="~"?Pa.join(aw.homedir(),t.slice(1)):t}function gw(t){pw("Loading env from encrypted .env.vault");let e=$e._parseVault(t),i=process.env;return t&&t.processEnv!=null&&(i=t.processEnv),$e.populate(i,e,t),{parsed:e}}function vw(t){let e=Pa.resolve(process.cwd(),".env"),i="utf8",r=!!(t&&t.debug);t&&t.encoding?i=t.encoding:r&&Ts("No encoding is specified. UTF-8 is used by default");let n=[e];if(t&&t.path)if(!Array.isArray(t.path))n=[Ph(t.path)];else{n=[];for(let l of t.path)n.push(Ph(l))}let s,o={};for(let l of n)try{let c=$e.parse(Ra.readFileSync(l,{encoding:i}));$e.populate(o,c,t)}catch(c){r&&Ts(`Failed to load ${l} ${c.message}`),s=c}let a=process.env;return t&&t.processEnv!=null&&(a=t.processEnv),$e.populate(a,o,t),s?{parsed:o,error:s}:{parsed:o}}function yw(t){if(Mh(t).length===0)return $e.configDotenv(t);let e=Fh(t);return e?$e._configVault(t):(dw(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),$e.configDotenv(t))}function bw(t,e){let i=Buffer.from(e.slice(-64),"hex"),r=Buffer.from(t,"base64"),n=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{let o=lw.createDecipheriv("aes-256-gcm",i,n);return o.setAuthTag(s),`${o.update(r)}${o.final()}`}catch(o){let a=o instanceof RangeError,l=o.message==="Invalid key length",c=o.message==="Unsupported state or unable to authenticate data";if(a||l){let u=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw u.code="INVALID_DOTENV_KEY",u}else if(c){let u=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw u.code="DECRYPTION_FAILED",u}else throw o}}function _w(t,e,i={}){let r=!!(i&&i.debug),n=!!(i&&i.override);if(typeof e!="object"){let s=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw s.code="OBJECT_REQUIRED",s}for(let s of Object.keys(e))Object.prototype.hasOwnProperty.call(t,s)?(n===!0&&(t[s]=e[s]),r&&Ts(n===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):t[s]=e[s]}var $e={configDotenv:vw,_configVault:gw,_parseVault:hw,config:yw,decrypt:bw,parse:fw,populate:_w};ii.exports.configDotenv=$e.configDotenv;ii.exports._configVault=$e._configVault;ii.exports._parseVault=$e._parseVault;ii.exports.confi
|
|||
|
`).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function As(t,e){return new As.Agent(t,e)}(function(t){class e extends Cw.EventEmitter{constructor(r,n){super();let s=n;typeof r=="function"?this.callback=r:r&&(s=r),this.timeout=null,s&&typeof s.timeout=="number"&&(this.timeout=s.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:qa()?443:80}set defaultPort(r){this.explicitDefaultPort=r}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:qa()?"https:":"http:"}set protocol(r){this.explicitProtocol=r}callback(r,n,s){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(r,n){let s=Object.assign({},n);typeof s.secureEndpoint!="boolean"&&(s.secureEndpoint=qa()),s.host==null&&(s.host="localhost"),s.port==null&&(s.port=s.secureEndpoint?443:80),s.protocol==null&&(s.protocol=s.secureEndpoint?"https:":"http:"),s.host&&s.path&&delete s.path,delete s.agent,delete s.hostname,delete s._defaultAgent,delete s.defaultPort,delete s.createConnection,r._last=!0,r.shouldKeepAlive=!1;let o=!1,a=null,l=s.timeout||this.timeout,c=g=>{r._hadError||(r.emit("error",g),r._hadError=!0)},u=()=>{a=null,o=!0;let g=new Error(`A "socket" was not created for HTTP request before ${l}ms`);g.code="ETIMEOUT",c(g)},f=g=>{o||(a!==null&&(clearTimeout(a),a=null),c(g))},d=g=>{if(o)return;if(a!=null&&(clearTimeout(a),a=null),Iw(g)){rn("Callback returned another Agent instance %o",g.constructor.name),g.addRequest(r,s);return}if(g){g.once("free",()=>{this.freeSocket(g,s)}),r.onSocket(g);return}let m=new Error(`no Duplex stream was returned to agent-base for \`${r.method} ${r.path}\``);c(m)};if(typeof this.callback!="function"){c(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(rn("Converting legacy callback function to promise"),this.promisifiedCallback=Aw.default(this.callback)):this.promisifiedCallback=this.callback),typeof l=="number"&&l>0&&(a=setTimeout(u,l)),"port"in s&&typeof s.port!="number"&&(s.port=Number(s.port));try{rn("Resolving socket for %o request: %o",s.protocol,`${r.method} ${r.path}`),Promise.resolve(this.promisifiedCallback(r,s)).then(d,f)}catch(g){Promise.reject(g).catch(f)}}freeSocket(r,n){rn("Freeing socket %o %o",r.constructor.name,n),r.destroy()}destroy(){rn("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(As||(As={}));Vh.exports=As});var Hh=_(sn=>{"use strict";var Nw=sn&&sn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sn,"__esModule",{value:!0});var Lw=Nw(yr()),nn=Lw.default("https-proxy-agent:parse-proxy-response");function Bw(t){return new Promise((e,i)=>{let r=0,n=[];function s(){let f=t.read();f?u(f):t.once("readable",s)}function o(){t.removeListener("end",l),t.removeListener("error",c),t.removeListener("close",a),t.removeListener("readable",s)}function a(f){nn("onclose had error %o",f)}function l(){nn("onend")}function c(f){o(),nn("onerror %o",f),i(f)}function u(f){n.push(f),r+=f.length;let d=Buffer.concat(n,r);if(d.indexOf(`\r
|
|||
|
\r
|
|||
|
`)===-1){nn("have not received end of HTTP headers yet..."),s();return}let m=d.toString("ascii",0,d.indexOf(`\r
|
|||
|
`)),y=+m.split(" ")[1];nn("got proxy server response: %o",m),e({statusCode:y,buffered:d})}t.on("error",c),t.on("close",a),t.on("end",l),s()})}sn.default=Bw});var Wh=_($i=>{"use strict";var Rw=$i&&$i.__awaiter||function(t,e,i,r){function n(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):n(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})},wr=$i&&$i.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($i,"__esModule",{value:!0});var Gh=wr(require("net")),Yh=wr(require("tls")),Pw=wr(require("url")),Mw=wr(require("assert")),Fw=wr(yr()),qw=ja(),Dw=wr(Hh()),on=Fw.default("https-proxy-agent:agent"),Ua=class extends qw.Agent{constructor(e){let i;if(typeof e=="string"?i=Pw.default.parse(e):i=e,!i)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");on("creating new HttpsProxyAgent instance: %o",i),super(i);let r=Object.assign({},i);this.secureProxy=i.secureProxy||$w(r.protocol),r.host=r.hostname||r.host,typeof r.port=="string"&&(r.port=parseInt(r.port,10)),!r.port&&r.host&&(r.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in r)&&(r.ALPNProtocols=["http 1.1"]),r.host&&r.path&&(delete r.path,delete r.pathname),this.proxy=r}callback(e,i){return Rw(this,void 0,void 0,function*(){let{proxy:r,secureProxy:n}=this,s;n?(on("Creating `tls.Socket`: %o",r),s=Yh.default.connect(r)):(on("Creating `net.Socket`: %o",r),s=Gh.default.connect(r));let o=Object.assign({},r.headers),l=`CONNECT ${`${i.host}:${i.port}`} HTTP/1.1\r
|
|||
|
`;r.auth&&(o["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`);let{host:c,port:u,secureEndpoint:f}=i;Uw(u,f)||(c+=`:${u}`),o.Host=c,o.Connection="close";for(let b of Object.keys(o))l+=`${b}: ${o[b]}\r
|
|||
|
`;let d=Dw.default(s);s.write(`${l}\r
|
|||
|
`);let{statusCode:g,buffered:m}=yield d;if(g===200){if(e.once("socket",jw),i.secureEndpoint){on("Upgrading socket connection to TLS");let b=i.servername||i.host;return Yh.default.connect(Object.assign(Object.assign({},Vw(i,"host","hostname","path","port")),{socket:s,servername:b}))}return s}s.destroy();let y=new Gh.default.Socket({writable:!1});return y.readable=!0,e.once("socket",b=>{on("replaying proxy buffer for failed request"),Mw.default(b.listenerCount("data")>0),b.push(m),b.push(null)}),y})}};$i.default=Ua;function jw(t){t.resume()}function Uw(t,e){return!!(!e&&t===80||e&&t===443)}function $w(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function Vw(t,...e){let i={},r;for(r in t)e.includes(r)||(i[r]=t[r]);return i}});var zh=_((Ha,Kh)=>{"use strict";var Hw=Ha&&Ha.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},$a=Hw(Wh());function Va(t){return new $a.default(t)}(function(t){t.HttpsProxyAgent=$a.default,t.prototype=$a.default.prototype})(Va||(Va={}));Kh.exports=Va});var Qh=_((DI,Is)=>{var Zh=Zh||function(t){return Buffer.from(t).toString("base64")};function Gw(t){var e=this,i=Math.round,r=Math.floor,n=new Array(64),s=new Array(64),o=new Array(64),a=new Array(64),l,c,u,f,d=new Array(65535),g=new Array(65535),m=new Array(64),y=new Array(64),b=[],x=0,E=7,O=new Array(64),k=new Array(64),S=new Array(64),R=new Array(256),T=new Array(2048),A,C=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],L=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],q=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],H=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],V=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function Q(I){for(var Z=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],te=0;te<64;te++){var ee=r((Z[te]*I+50)/100);ee<1?ee=1:ee>255&&(ee=255),n[C[te]]=ee}for(var le=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],ce=0;ce<64;ce++){var _e=r((le[ce]*I+50)/100);_e<1?_e=1:_e>255&&(_e=255),s[C[ce]]=_e}for(var we=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Be=0,Te=0;Te<8;Te++)for(var D=0;D<8;D++)o[Be]=1/(n[C[Be]]*we[Te]*we[D]*8),a[Be]=1/(s[C[Be]]*we[Te]*we[D]*8),Be++}function Y(I,Z){for(var te=0,ee=0,le=new Array,ce=1;ce<=16;ce++){for(var _e=1;_e<=I[ce];_e++)le[Z[ee]]=[],le[Z[ee]][0]=te,le[Z[ee]][1]=ce,ee++,te++;te*=2}return le}function de(){l=Y(L,P),c=Y(H,j),u=Y(U,q),f=Y(V,W)}function ae(){for(var I=1,Z=2,te=1;te<=15;te++){for(var ee=I;ee<Z;ee++)g[32767+ee]=te,d[32767+ee]=[],d[32767+ee][1]=te,d[32767+ee][0]=ee;
|
|||
|
%s`,S,S,E,r);var R=E.type==="*"?Ja:E.type==="?"?za:"\\"+E.type;n=!0,r=r.slice(0,E.reStart)+R+"\\("+S}m(),s&&(r+="\\\\");var T=!1;switch(r.charAt(0)){case"[":case".":case"(":T=!0}for(var A=a.length-1;A>-1;A--){var C=a[A],L=r.slice(0,C.reStart),P=r.slice(C.reStart,C.reEnd-8),U=r.slice(C.reEnd-8,C.reEnd),q=r.slice(C.reEnd);U+=q;var H=L.split("(").length-1,j=q;for(y=0;y<H;y++)j=j.replace(/\)[+*?]?/,"");q=j;var V="";q===""&&e!==Ls&&(V="$");var W=L+P+q+V+U;r=W}if(r!==""&&n&&(r="(?=.)"+r),T&&(r=d+r),e===Ls)return[r,n];if(!n)return d1(t);var Q=i.nocase?"i":"";try{var Y=new RegExp("^"+r+"$",Q)}catch{return new RegExp("$.")}return Y._glob=t,Y._src=r,Y}wt.makeRe=function(t,e){return new Xe(t,e||{}).makeRe()};Xe.prototype.makeRe=p1;function p1(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,i=e.noglobstar?Ja:e.dot?s1:o1,r=e.nocase?"i":"",n=t.map(function(s){return s.map(function(o){return o===Za?i:typeof o=="string"?m1(o):o._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,r)}catch{this.regexp=!1}return this.regexp}wt.match=function(t,e,i){i=i||{};var r=new Xe(e,i);return t=t.filter(function(n){return r.match(n)}),r.options.nonull&&!t.length&&t.push(e),t};Xe.prototype.match=function(e,i){if(typeof i=="undefined"&&(i=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&i)return!0;var r=this.options;an.sep!=="/"&&(e=e.split(an.sep).join("/")),e=e.split(Tp),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<n.length;o++){var a=n[o],l=e;r.matchBase&&a.length===1&&(l=[s]);var c=this.matchOne(l,a,i);if(c)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate};Xe.prototype.matchOne=function(t,e,i){var r=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,s=0,o=t.length,a=e.length;n<o&&s<a;n++,s++){this.debug("matchOne loop");var l=e[s],c=t[n];if(this.debug(e,l,c),l===!1)return!1;if(l===Za){this.debug("GLOBSTAR",[e,l,c]);var u=n,f=s+1;if(f===a){for(this.debug("** at the end");n<o;n++)if(t[n]==="."||t[n]===".."||!r.dot&&t[n].charAt(0)===".")return!1;return!0}for(;u<o;){var d=t[u];if(this.debug(`
|
|||
|
globstar while`,t,u,e,f,d),this.matchOne(t.slice(u),e.slice(f),i))return this.debug("globstar found match!",u,o,d),!0;if(d==="."||d===".."||!r.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,u,e,f);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(i&&(this.debug(`
|
|||
|
>>> no match, partial?`,t,u,e,f),u===o))}var g;if(typeof l=="string"?(g=c===l,this.debug("string match",l,c,g)):(g=c.match(l),this.debug("pattern match",l,c,g)),!g)return!1}if(n===o&&s===a)return!0;if(n===o)return i;if(s===a)return n===o-1&&t[n]==="";throw new Error("wtf?")};function d1(t){return t.replace(/\\(.)/g,"$1")}function m1(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var Xa=_((JI,Bp)=>{"use strict";var Lp=require("fs"),Qa;function g1(){try{return Lp.statSync("/.dockerenv"),!0}catch{return!1}}function v1(){try{return Lp.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Bp.exports=()=>(Qa===void 0&&(Qa=g1()||v1()),Qa)});var Mp=_((ZI,el)=>{"use strict";var y1=require("os"),b1=require("fs"),Rp=Xa(),Pp=()=>{if(process.platform!=="linux")return!1;if(y1.release().toLowerCase().includes("microsoft"))return!Rp();try{return b1.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Rp():!1}catch{return!1}};process.env.__IS_WSL_TEST__?el.exports=Pp:el.exports=Pp()});var qp=_((QI,Fp)=>{"use strict";Fp.exports=(t,e,i)=>{let r=n=>Object.defineProperty(t,e,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){let n=i();return r(n),n},set(n){r(n)}}),t}});var Gp=_((XI,Hp)=>{var _1=require("path"),w1=require("child_process"),{promises:tl,constants:Vp}=require("fs"),Rs=Mp(),x1=Xa(),il=qp(),Dp=_1.join(__dirname,"xdg-open"),{platform:Sr,arch:jp}=process,S1=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let i="/etc/wsl.conf",r=!1;try{await tl.access(i,Vp.F_OK),r=!0}catch{}if(!r)return t;let n=await tl.readFile(i,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),Up=async(t,e)=>{let i;for(let r of t)try{return await e(r)}catch(n){i=n}throw i},Ps=async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return Up(t.app,a=>Ps({...t,app:a}));let{name:e,arguments:i=[]}=t.app||{};if(i=[...i],Array.isArray(e))return Up(e,a=>Ps({...t,app:{name:a,arguments:i}}));let r,n=[],s={};if(Sr==="darwin")r="open",t.wait&&n.push("--wait-apps"),t.background&&n.push("--background"),t.newInstance&&n.push("--new"),e&&n.push("-a",e);else if(Sr==="win32"||Rs&&!x1()){let a=await S1();r=Rs?`${a}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Rs||(s.windowsVerbatimArguments=!0);let l=["Start"];t.wait&&l.push("-Wait"),e?(l.push(`"\`"${e}\`""`,"-ArgumentList"),t.target&&i.unshift(t.target)):t.target&&l.push(`"${t.target}"`),i.length>0&&(i=i.map(c=>`"\`"${c}\`""`),l.push(i.join(","))),t.target=Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(e)r=e;else{let a=!__dirname||__dirname==="/",l=!1;try{await tl.access(Dp,Vp.X_OK),l=!0}catch{}r=process.versions.electron||Sr==="android"||a||!l?"xdg-open":Dp}i.length>0&&n.push(...i),t.wait||(s.stdio="ignore",s.detached=!0)}t.target&&n.push(t.target),Sr==="darwin"&&i.length>0&&n.push("--args",...i);let o=w1.spawn(r,n,s);return t.wait?new Promise((a,l)=>{o.once("error",l),o.once("close",c=>{if(t.allowNonzeroExitCode&&c>0){l(new Error(`Exited with code ${c}`));return}a(o)})}):(o.unref(),o)},rl=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return Ps({...e,target:t})},E1=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `name`");let{arguments:i=[]}=e||{};if(i!=null&&!Array.isArray(i))throw new TypeError("Expected `appArguments` as Array type");return Ps({...e,app:{name:t,arguments:i}})};function $p(t){if(typeof t=="string"||Array.isArray(t))return t;let{[jp]:e}=t;if(!e)throw new Error(`${jp} is not supported`);return e}function nl({[Sr]:t},{wsl:e}){if(e&&Rs)return $p(e);if(!t)throw new Error(`${Sr} is not supported`);return $p(t)}var Ms={};il(Ms,"chrome",()=>nl({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","c
|
|||
|
`).replace(/^/gm," ".repeat(s))}let c=[`Usage: ${i.commandUsage(e)}`,""],u=i.commandDescription(e);u.length>0&&(c=c.concat([u,""]));let f=i.visibleArguments(e).map(m=>a(i.argumentTerm(m),i.argumentDescription(m)));f.length>0&&(c=c.concat(["Arguments:",l(f),""]));let d=i.visibleOptions(e).map(m=>a(i.optionTerm(m),i.optionDescription(m)));d.length>0&&(c=c.concat(["Options:",l(d),""]));let g=i.visibleCommands(e).map(m=>a(i.subcommandTerm(m),i.subcommandDescription(m)));return g.length>0&&(c=c.concat(["Commands:",l(g),""])),c.join(`
|
|||
|
`)}padWidth(e,i){return Math.max(i.longestOptionTermLength(e,i),i.longestSubcommandTermLength(e,i),i.longestArgumentTermLength(e,i))}wrap(e,i,r,n=40){if(e.match(/[\n]\s+/))return e;let s=i-r;if(s<n)return e;let o=e.substr(0,r),a=e.substr(r),l=" ".repeat(r),c=new RegExp(".{1,"+(s-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g"),u=a.match(c)||[];return o+u.map((f,d)=>(f.slice(-1)===`
|
|||
|
`&&(f=f.slice(0,f.length-1)),(d>0?l:"")+f.trimRight())).join(`
|
|||
|
`)}};Ud.Help=El});var Tl=_(Cl=>{var{InvalidArgumentError:Lx}=cn(),Ol=class{constructor(e,i){this.flags=e,this.description=i||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=$d(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0}default(e,i){return this.defaultValue=e,this.defaultValueDescription=i,this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,i){return i===this.defaultValue||!Array.isArray(i)?[e]:i.concat(e)}choices(e){return this.argChoices=e,this.parseArg=(i,r)=>{if(!e.includes(i))throw new Lx(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(i,r):i},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Bx(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}};function Bx(t){return t.split("-").reduce((e,i)=>e+i[0].toUpperCase()+i.slice(1))}function $d(t){let e,i,r=t.split(/[ |,]+/);return r.length>1&&!/^[[<]/.test(r[1])&&(e=r.shift()),i=r.shift(),!e&&/^-[^-]$/.test(i)&&(e=i,i=void 0),{shortFlag:e,longFlag:i}}Cl.Option=Ol;Cl.splitOptionFlags=$d});var Hd=_(Vd=>{function Rx(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let i=[];for(let r=0;r<=t.length;r++)i[r]=[r];for(let r=0;r<=e.length;r++)i[0][r]=r;for(let r=1;r<=e.length;r++)for(let n=1;n<=t.length;n++){let s=1;t[n-1]===e[r-1]?s=0:s=1,i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+s),n>1&&r>1&&t[n-1]===e[r-2]&&t[n-2]===e[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+1))}return i[t.length][e.length]}function Px(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let i=t.startsWith("--");i&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let r=[],n=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Rx(t,o),l=Math.max(t.length,o.length);(l-a)/l>s&&(a<n?(n=a,r=[o]):a===n&&r.push(o))}),r.sort((o,a)=>o.localeCompare(a)),i&&(r=r.map(o=>`--${o}`)),r.length>1?`
|
|||
|
(Did you mean one of ${r.join(", ")}?)`:r.length===1?`
|
|||
|
(Did you mean ${r[0]}?)`:""}Vd.suggestSimilar=Px});var zd=_(Kd=>{var Mx=require("events").EventEmitter,Al=require("child_process"),Hi=require("path"),Il=require("fs"),{Argument:Fx,humanReadableArgName:qx}=qs(),{CommanderError:Nl}=cn(),{Help:Dx}=kl(),{Option:jx,splitOptionFlags:Ux}=Tl(),{suggestSimilar:Gd}=Hd(),Bl=class t extends Mx{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!1,this._outputConfiguration={writeOut:i=>process.stdout.write(i),writeErr:i=>process.stderr.write(i),getOutHelpWidth:()=>process.stdout.isTTY?process.stdout.columns:void 0,getErrHelpWidth:()=>process.stderr.isTTY?process.stderr.columns:void 0,outputError:(i,r)=>r(i)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,i,r){let n=i,s=r;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return n&&(l.description(n),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this.commands.push(l),l.parent=this,l.copyInheritedSettings(this),n?this:l}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Dx,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,i){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function r(n){n.forEach(s=>{if(s._executableHandler&&!s._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${s.name()}`);r(s.commands)})}return r(e.commands),i=i||{},i.isDefault&&(this._defaultCommandName=e._name),(i.noHelp||i.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,i){return new Fx(e,i)}argument(e,i,r,n){let s=this.createArgument(e,i);return typeof r=="function"?s.default(n).argParser(r):s.default(r),this.addArgument(s),this}arguments(e){return e.split(/ +/).forEach(i=>{this.argument(i)}),this}addArgument(e){let i=this._args.slice(-1)
|
|||
|
Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(i):this._lifeCycleHooks[e]=[i],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=i=>{if(i.code!=="commander.executeSubCommandAsync")throw i},this}_exit(e,i,r){this._exitCallback&&this._exitCallback(new Nl(e,i,r)),process.exit(e)}action(e){let i=r=>{let n=this._args.length,s=r.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=i,this}createOption(e,i){return new jx(e,i)}addOption(e){let i=e.name(),r=e.attributeName(),n=e.defaultValue;if(e.negate||e.optional||e.required||typeof n=="boolean"){if(e.negate){let o=e.long.replace(/^--no-/,"--");n=this._findOption(o)?this.getOptionValue(r):!0}n!==void 0&&this.setOptionValueWithSource(r,n,"default")}this.options.push(e);let s=(o,a,l)=>{let c=this.getOptionValue(r);if(o!==null&&e.parseArg)try{o=e.parseArg(o,c===void 0?n:c)}catch(u){if(u.code==="commander.invalidArgument"){let f=`${a} ${u.message}`;this._displayError(u.exitCode,u.code,f)}throw u}else o!==null&&e.variadic&&(o=e._concatValue(o,c));typeof c=="boolean"||typeof c=="undefined"?o==null?this.setOptionValueWithSource(r,e.negate?!1:n||!0,l):this.setOptionValueWithSource(r,o,l):o!==null&&this.setOptionValueWithSource(r,e.negate?!1:o,l)};return this.on("option:"+i,o=>{let a=`error: option '${e.flags}' argument '${o}' is invalid.`;s(o,a,"cli")}),e.envVar&&this.on("optionEnv:"+i,o=>{let a=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;s(o,a,"env")}),this}_optionEx(e,i,r,n,s){let o=this.createOption(i,r);if(o.makeOptionMandatory(!!e.mandatory),typeof n=="function")o.default(s).argParser(n);else if(n instanceof RegExp){let a=n;n=(l,c)=>{let u=a.exec(l);return u?u[0]:c},o.default(s).argParser(n)}else o.default(n);return this.addOption(o)}option(e,i,r,n){return this._optionEx({},e,i,r,n)}requiredOption(e,i,r,n){return this._optionEx({mandatory:!0},e,i,r,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,i){return this._storeOptionsAsProperties?this[e]=i:this._optionValues[e]=i,this}setOptionValueWithSource(e,i,r){return this.setOptionValue(e,i),this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,i){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");i=i||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(i.from="electron")),this.rawArgs=e.slice();let r;switch(i.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${i.from}' }`)}return!this._scriptPath&&require.main&&(this._scriptPath=require.main.filename),this._name=this._name||this._scriptPath&&Hi.basename(this._scriptPath,Hi.extname(this._scriptPath)),r}parse(e,i){let r=this._prepareUserArgs(e,i);return this._parseCommand([],r),this}async parseAsync(e,i){let r=this._prepareUserArgs(e,i);return await this._parseCommand([],r),this}_executeSubCommand(e,i){i=i.slice();let r=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];this._checkForMissingMandatoryOptions();let s=this._scriptPath;
|
|||
|
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|||
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(g)}else if(d.code==="EACCES")throw new Error(`'${a}' not executable`);if(!f)process.exit(1);else{let g=new Nl(1,"commander.executeSubCommandAsync","(error)");g.nestedError=d,f(g)}}),this.runningCommand=c}_dispatchSubcommand(e,i,r){let n=this._findCommand(e);if(n||this.help({error:!0}),n._executableHandler)this._executeSubCommand(n,i.concat(r));else return n._parseCommand(i,r)}_checkNumberOfArguments(){this._args.forEach((e,i)=>{e.required&&this.args[i]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,n,s)=>{let o=n;if(n!==null&&r.parseArg)try{o=r.parseArg(n,s)}catch(a){if(a.code==="commander.invalidArgument"){let l=`error: command-argument value '${n}' is invalid for argument '${r.name()}'. ${a.message}`;this._displayError(a.exitCode,a.code,l)}throw a}return o};this._checkNumberOfArguments();let i=[];this._args.forEach((r,n)=>{let s=r.defaultValue;r.variadic?n<this.args.length?(s=this.args.slice(n),r.parseArg&&(s=s.reduce((o,a)=>e(r,a,o),r.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],r.parseArg&&(s=e(r,s,r.defaultValue))),i[n]=s}),this.processedArgs=i}_chainOrCall(e,i){return e&&e.then&&typeof e.then=="function"?e.then(()=>i()):i()}_chainOrCallHooks(e,i){let r=e,n=[];return Ll(this).reverse().filter(s=>s._lifeCycleHooks[i]!==void 0).forEach(s=>{s._lifeCycleHooks[i].forEach(o=>{n.push({hookedCommand:s,callback:o})})}),i==="postAction"&&n.reverse(),n.forEach(s=>{r=this._chainOrCall(r,()=>s.callback(s.hookedCommand,this))}),r}_parseCommand(e,i){let r=this.parseOptions(i);if(this._parseOptionsEnv(),e=e.concat(r.operands),i=r.unknown,this.args=e.concat(i),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),i);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return Yd(this,i),this._dispatchSubcommand(this._defaultCommandName,e,i);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),Yd(this,r.unknown),this._checkForMissingMandatoryOptions();let n=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&this.parent.emit(s,e,i),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,e,i);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,i);this.listenerCount("command:*")?this.emit("command:*",e,i):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(i=>i._name===e||i._aliases.includes(e))}_findOption(e){return this.options.find(i=>i.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(i=>{i.mandatory&&e.getOptionValue(i.attributeName())===void 0&&e.missingMandatoryOptionValue(i)})}parseOptions(e){let i=[],r=[],n=i,s=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;s.length;){let l=s.shift();if(l==="--"){n===r&&n.push(l),n.push(...s);break}if(a&&!o(l)){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let c=this._findOption(l);if(c){if(c.required){let u=s.shift();u===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,u)}else if(c.optional){let u=null;s.length>0&&!o(s[0])&&(u=s.shift()),this.emit(`option:${c.name()}`,u)}else this.emit(`option:${c.name()}`);a=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.req
|
|||
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|||
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|||
|
`),this.outputHelp({error:!0})),this._exit(e,i,r)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in process.env){let i=e.attributeName();(this.getOptionValue(i)===void 0||["default","config","env"].includes(this.getOptionValueSource(i)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,process.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}missingArgument(e){let i=`error: missing required argument '${e}'`;this._displayError(1,"commander.missingArgument",i)}optionMissingArgument(e){let i=`error: option '${e.flags}' argument missing`;this._displayError(1,"commander.optionMissingArgument",i)}missingMandatoryOptionValue(e){let i=`error: required option '${e.flags}' not specified`;this._displayError(1,"commander.missingMandatoryOptionValue",i)}unknownOption(e){if(this._allowUnknownOption)return;let i="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);n=n.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);i=Gd(e,n)}let r=`error: unknown option '${e}'${i}`;this._displayError(1,"commander.unknownOption",r)}_excessArguments(e){if(this._allowExcessArguments)return;let i=this._args.length,r=i===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${i} argument${r} but got ${e.length}.`;this._displayError(1,"commander.excessArguments",s)}unknownCommand(){let e=this.args[0],i="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),i=Gd(e,n)}let r=`error: unknown command '${e}'${i}`;this._displayError(1,"commander.unknownCommand",r)}version(e,i,r){if(e===void 0)return this._version;this._version=e,i=i||"-V, --version",r=r||"output the version number";let n=this.createOption(i,r);return this._versionOptionName=n.attributeName(),this.options.push(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|||
|
`),this._exit(0,"commander.version",e)}),this}description(e,i){return e===void 0&&i===void 0?this._description:(this._description=e,i&&(this._argsDescription=i),this)}alias(e){if(e===void 0)return this._aliases[0];let i=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(i=this.commands[this.commands.length-1]),e===i._name)throw new Error("Command alias can't be the same as its name");return i._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(i=>this.alias(i)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let i=this._args.map(r=>qx(r));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?i:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpInformation(e){let i=this.createHelp();return i.helpWidth===void 0&&(i.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),i.formatHelp(this,i)}_getHelpContext(e){e=e||{};let i={error:!!e.error},r;return i.error?r=n=>this._outputConfiguration.writeErr(n):r=n=>this._outputConfiguration.writeOut(n),i.write=e.write||r,i.command=this,i}outputHelp(e){let i;typeof e=="function"&&(i=e,e=void 0);let r=this._getHelpContext(e);Ll(this).reverse().forEach(s=>s.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let n=this.helpInformation(r);if(i&&(n=i(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(n),this.emit(this._helpLongFlag),this.emit("afterHelp",r),Ll(this).forEach(s=>s.emit("afterAllHelp",r))}helpOption(e,i){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=i||this._helpDescription;let r=Ux(this._helpFlags);return this._helpShortFlag=r.shortFlag,this._helpLongFlag=r.longFlag,this}help(e){this.outputHelp(e);let i=process.exitCode||0;i===0&&e&&typeof e!="function"&&e.error&&(i=1),this._exit(i,"commander.help","(outputHelp)")}addHelpText(e,i){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|||
|
Expecting one of '${r.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let o;typeof i=="function"?o=i({error:s.error,command:s.command}):o=i,o&&s.write(`${o}
|
|||
|
`)}),this}};function Yd(t,e){t._hasHelpOption&&e.find(r=>r===t._helpLongFlag||r===t._helpShortFlag)&&(t.outputHelp(),t._exit(0,"commander.helpDisplayed","(outputHelp)"))}function Wd(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let i,r="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?i=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(i=s[1],/^\d+$/.test(s[3])?n=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(i=s[1],r=s[3],n=s[4]),i&&n!=="0"?`${i}=${r}:${parseInt(n)+1}`:e})}function Ll(t){let e=[];for(let i=t;i;i=i.parent)e.push(i);return e}Kd.Command=Bl});var Xd=_((qt,Qd)=>{var{Argument:$x}=qs(),{Command:Jd}=zd(),{CommanderError:Vx,InvalidArgumentError:Zd}=cn(),{Help:Hx}=kl(),{Option:Gx}=Tl();qt=Qd.exports=new Jd;qt.program=qt;qt.Argument=$x;qt.Command=Jd;qt.CommanderError=Vx;qt.Help=Hx;qt.InvalidArgumentError=Zd;qt.InvalidOptionArgumentError=Zd;qt.Option=Gx});var im=_((em,tm)=>{em=tm.exports=Cr;function Cr(t,e){if(this.stream=e.stream||process.stderr,typeof e=="number"){var i=e;e={},e.total=i}else{if(e=e||{},typeof t!="string")throw new Error("format required");if(typeof e.total!="number")throw new Error("total required")}this.fmt=t,this.curr=e.curr||0,this.total=e.total,this.width=e.width||this.total,this.clear=e.clear,this.chars={complete:e.complete||"=",incomplete:e.incomplete||"-",head:e.head||e.complete||"="},this.renderThrottle=e.renderThrottle!==0?e.renderThrottle||16:0,this.lastRender=-1/0,this.callback=e.callback||function(){},this.tokens={},this.lastDraw=""}Cr.prototype.tick=function(t,e){if(t!==0&&(t=t||1),typeof t=="object"&&(e=t,t=1),e&&(this.tokens=e),this.curr==0&&(this.start=new Date),this.curr+=t,this.render(),this.curr>=this.total){this.render(void 0,!0),this.complete=!0,this.terminate(),this.callback(this);return}};Cr.prototype.render=function(t,e){if(e=e!==void 0?e:!1,t&&(this.tokens=t),!!this.stream.isTTY){var i=Date.now(),r=i-this.lastRender;if(!(!e&&r<this.renderThrottle)){this.lastRender=i;var n=this.curr/this.total;n=Math.min(Math.max(n,0),1);var s=Math.floor(n*100),o,a,l,c=new Date-this.start,u=s==100?0:c*(this.total/this.curr-1),f=this.curr/(c/1e3),d=this.fmt.replace(":current",this.curr).replace(":total",this.total).replace(":elapsed",isNaN(c)?"0.0":(c/1e3).toFixed(1)).replace(":eta",isNaN(u)||!isFinite(u)?"0.0":(u/1e3).toFixed(1)).replace(":percent",s.toFixed(0)+"%").replace(":rate",Math.round(f)),g=Math.max(0,this.stream.columns-d.replace(":bar","").length);g&&process.platform==="win32"&&(g=g-1);var m=Math.min(this.width,g);if(l=Math.round(m*n),a=Array(Math.max(0,l+1)).join(this.chars.complete),o=Array(Math.max(0,m-l+1)).join(this.chars.incomplete),l>0&&(a=a.slice(0,-1)+this.chars.head),d=d.replace(":bar",a+o),this.tokens)for(var y in this.tokens)d=d.replace(":"+y,this.tokens[y]);this.lastDraw!==d&&(this.stream.cursorTo(0),this.stream.write(d),this.stream.clearLine(1),this.lastDraw=d)}}};Cr.prototype.update=function(t,e){var i=Math.floor(t*this.total),r=i-this.curr;this.tick(r,e)};Cr.prototype.interrupt=function(t){this.stream.clearLine(),this.stream.cursorTo(0),this.stream.write(t),this.stream.write(`
|
|||
|
`),this.stream.write(this.lastDraw)};Cr.prototype.terminate=function(){this.clear?this.stream.clearLine&&(this.stream.clearLine(),this.stream.cursorTo(0)):this.stream.write(`
|
|||
|
`)}});var nm=_((C2,rm)=>{rm.exports=im()});var lm=_(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});var sm=require("buffer"),Gi={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};ri.ERRORS=Gi;function Yx(t){if(!sm.Buffer.isEncoding(t))throw new Error(Gi.INVALID_ENCODING)}ri.checkEncoding=Yx;function om(t){return typeof t=="number"&&isFinite(t)&&Jx(t)}ri.isFiniteInteger=om;function am(t,e){if(typeof t=="number"){if(!om(t)||t<0)throw new Error(e?Gi.INVALID_OFFSET:Gi.INVALID_LENGTH)}else throw new Error(e?Gi.INVALID_OFFSET_NON_NUMBER:Gi.INVALID_LENGTH_NON_NUMBER)}function Wx(t){am(t,!1)}ri.checkLengthValue=Wx;function Kx(t){am(t,!0)}ri.checkOffsetValue=Kx;function zx(t,e){if(t<0||t>e.length)throw new Error(Gi.INVALID_TARGET_OFFSET)}ri.checkTargetOffset=zx;function Jx(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function Zx(t){if(typeof BigInt=="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof sm.Buffer.prototype[t]=="undefined")throw new Error(`Platform does not support Buffer.prototype.${t}.`)}ri.bigIntAndBufferInt64Check=Zx});var um=_(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var pe=lm(),cm=4096,Qx="utf8",Rl=class t{constructor(e){if(this.length=0,this._encoding=Qx,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(pe.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(pe.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(pe.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(pe.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(cm);else{if(typeof e!="undefined")throw new Error(pe.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(cm)}}static fromSize(e,i){return new this({size:e,encoding:i})}static fromBuffer(e,i){return new this({buff:e,encoding:i})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let i=e;return i&&(i.encoding!==void 0||i.size!==void 0||i.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return pe.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return pe.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,i){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,i),this}insertInt8(e,i){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,i)}writeInt16BE(e,i){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,i)}insertInt16BE(e,i){return this._inse
|
|||
|
`)}};pn.defaultYaml={explicit:!1,version:"1.2"};pn.defaultTags={"!!":"tag:yaml.org,2002:"};Jm.Directives=pn});var Xs=_(dn=>{"use strict";var Zm=Se(),lE=hn();function cE(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(i)}return!0}function Qm(t){let e=new Set;return lE.visit(t,{Value(i,r){r.anchor&&e.add(r.anchor)}}),e}function Xm(t,e){for(let i=1;;++i){let r=`${t}${i}`;if(!e.has(r))return r}}function uE(t,e){let i=[],r=new Map,n=null;return{onAnchor:s=>{i.push(s),n||(n=Qm(t));let o=Xm(e,n);return n.add(o),o},setAnchors:()=>{for(let s of i){let o=r.get(s);if(typeof o=="object"&&o.anchor&&(Zm.isScalar(o.node)||Zm.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}dn.anchorIsValid=cE;dn.anchorNames=Qm;dn.createNodeAnchors=uE;dn.findNewAnchor=Xm});var fc=_(eg=>{"use strict";function mn(t,e,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let n=0,s=r.length;n<s;++n){let o=r[n],a=mn(t,r,String(n),o);a===void 0?delete r[n]:a!==o&&(r[n]=a)}else if(r instanceof Map)for(let n of Array.from(r.keys())){let s=r.get(n),o=mn(t,r,n,s);o===void 0?r.delete(n):o!==s&&r.set(n,o)}else if(r instanceof Set)for(let n of Array.from(r)){let s=mn(t,r,n,n);s===void 0?r.delete(n):s!==n&&(r.delete(n),r.add(s))}else for(let[n,s]of Object.entries(r)){let o=mn(t,r,n,s);o===void 0?delete r[n]:o!==s&&(r[n]=o)}return t.call(e,i,r)}eg.applyReviver=mn});var vi=_(ig=>{"use strict";var fE=Se();function tg(t,e,i){if(Array.isArray(t))return t.map((r,n)=>tg(r,String(n),i));if(t&&typeof t.toJSON=="function"){if(!i||!fE.hasAnchor(t))return t.toJSON(e,i);let r={aliasCount:0,count:1,res:void 0};i.anchors.set(t,r),i.onCreate=s=>{r.res=s,delete i.onCreate};let n=t.toJSON(e,i);return i.onCreate&&i.onCreate(n),n}return typeof t=="bigint"&&!(i!=null&&i.keep)?Number(t):t}ig.toJS=tg});var eo=_(ng=>{"use strict";var hE=fc(),rg=Se(),pE=vi(),hc=class{constructor(e){Object.defineProperty(this,rg.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:r,onAnchor:n,reviver:s}={}){if(!rg.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=pE.toJS(this,"",o);if(typeof n=="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof s=="function"?hE.applyReviver(s,{"":a},"",a):a}};ng.NodeBase=hc});var gn=_(og=>{"use strict";var dE=Xs(),sg=hn(),to=Se(),mE=eo(),gE=vi(),pc=class extends mE.NodeBase{constructor(e){super(to.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return sg.visit(e,{Node:(r,n)=>{if(n===this)return sg.visit.BREAK;n.anchor===this.source&&(i=n)}}),i}toJSON(e,i){if(!i)return{source:this.source};let{anchors:r,doc:n,maxAliasCount:s}=i,o=this.resolve(n);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(gE.toJS(o,null,i),a=r.get(o)),!a||a.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=io(n,o,r)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,i,r){let n=`*${this.source}`;if(e){if(dE.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function io(t,e,i){if(to.isAlias(e)){let r=e.resolve(t),n=i&&r&&i.get(r);return n?n.count*n.aliasCount:0}else if(to.isCollection(e)){let r=0;for(let n of e.items){let s=io(t,n,i);s>r&&(r=s)}return r}else if(
|
|||
|
`)?vc(i,e):i.includes(`
|
|||
|
`)?`
|
|||
|
`+vc(i,e):(t.endsWith(" ")?"":" ")+i;so.indentComment=vc;so.lineComment=TE;so.stringifyComment=CE});var fg=_(bn=>{"use strict";var AE="flow",yc="block",oo="quoted";function IE(t,e,i="flow",{indentAtStart:r,lineWidth:n=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return t;n<s&&(s=0);let l=Math.max(1+s,1+n-e.length);if(t.length<=l)return t;let c=[],u={},f=n-e.length;typeof r=="number"&&(r>n-Math.max(2,s)?c.push(0):f=n-r);let d,g,m=!1,y=-1,b=-1,x=-1;i===yc&&(y=ug(t,y,e.length),y!==-1&&(f=y+l));for(let O;O=t[y+=1];){if(i===oo&&O==="\\"){switch(b=y,t[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}x=y}if(O===`
|
|||
|
`)i===yc&&(y=ug(t,y,e.length)),f=y+e.length+l,d=void 0;else{if(O===" "&&g&&g!==" "&&g!==`
|
|||
|
`&&g!==" "){let k=t[y+1];k&&k!==" "&&k!==`
|
|||
|
`&&k!==" "&&(d=y)}if(y>=f)if(d)c.push(d),f=d+l,d=void 0;else if(i===oo){for(;g===" "||g===" ";)g=O,O=t[y+=1],m=!0;let k=y>x+1?y-2:b-1;if(u[k])return t;c.push(k),u[k]=!0,f=k+l,d=void 0}else m=!0}g=O}if(m&&a&&a(),c.length===0)return t;o&&o();let E=t.slice(0,c[0]);for(let O=0;O<c.length;++O){let k=c[O],S=c[O+1]||t.length;k===0?E=`
|
|||
|
${e}${t.slice(0,S)}`:(i===oo&&u[k]&&(E+=`${t[k]}\\`),E+=`
|
|||
|
${e}${t.slice(k+1,S)}`)}return E}function ug(t,e,i){let r=e,n=e+1,s=t[n];for(;s===" "||s===" ";)if(e<n+i)s=t[++e];else{do s=t[++e];while(s&&s!==`
|
|||
|
`);r=e,n=e+1,s=t[n]}return r}bn.FOLD_BLOCK=yc;bn.FOLD_FLOW=AE;bn.FOLD_QUOTED=oo;bn.foldFlowLines=IE});var wn=_(hg=>{"use strict";var Jt=De(),bi=fg(),lo=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),co=t=>/^(%|---|\.\.\.)/m.test(t);function NE(t,e,i){if(!e||e<0)return!1;let r=e-i,n=t.length;if(n<=r)return!1;for(let s=0,o=0;s<n;++s)if(t[s]===`
|
|||
|
`){if(s-o>r)return!0;if(o=s+1,n-o<=r)return!1}return!0}function _n(t,e){let i=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return i;let{implicitKey:r}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(co(t)?" ":""),o="",a=0;for(let l=0,c=i[l];c;c=i[++l])if(c===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(o+=i.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(i[l+1]){case"u":{o+=i.slice(a,l);let u=i.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=i.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||i[l+2]==='"'||i.length<n)l+=1;else{for(o+=i.slice(a,l)+`
|
|||
|
|
|||
|
`;i[l+2]==="\\"&&i[l+3]==="n"&&i[l+4]!=='"';)o+=`
|
|||
|
`,l+=2;o+=s,i[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+i.slice(a):i,r?o:bi.foldFlowLines(o,s,bi.FOLD_QUOTED,lo(e,!1))}function bc(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|||
|
`)||/[ \t]\n|\n[ \t]/.test(t))return _n(t,e);let i=e.indent||(co(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|||
|
${i}`)+"'";return e.implicitKey?r:bi.foldFlowLines(r,i,bi.FOLD_FLOW,lo(e,!1))}function Mr(t,e){let{singleQuote:i}=e.options,r;if(i===!1)r=_n;else{let n=t.includes('"'),s=t.includes("'");n&&!s?r=bc:s&&!n?r=_n:r=i?bc:_n}return r(t,e)}var _c;try{_c=new RegExp(`(^|(?<!
|
|||
|
))
|
|||
|
+(?!
|
|||
|
|$)`,"g")}catch{_c=/\n+(?!\n|$)/g}function ao({comment:t,type:e,value:i},r,n,s){let{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return Mr(i,r);let c=r.indent||(r.forceBlockIndent||co(i)?" ":""),u=o==="literal"?!0:o==="folded"||e===Jt.Scalar.BLOCK_FOLDED?!1:e===Jt.Scalar.BLOCK_LITERAL?!0:!NE(i,l,c.length);if(!i)return u?`|
|
|||
|
`:`>
|
|||
|
`;let f,d;for(d=i.length;d>0;--d){let R=i[d-1];if(R!==`
|
|||
|
`&&R!==" "&&R!==" ")break}let g=i.substring(d),m=g.indexOf(`
|
|||
|
`);m===-1?f="-":i===g||m!==g.length-1?(f="+",s&&s()):f="",g&&(i=i.slice(0,-g.length),g[g.length-1]===`
|
|||
|
`&&(g=g.slice(0,-1)),g=g.replace(_c,`$&${c}`));let y=!1,b,x=-1;for(b=0;b<i.length;++b){let R=i[b];if(R===" ")y=!0;else if(R===`
|
|||
|
`)x=b;else break}let E=i.substring(0,x<b?x+1:b);E&&(i=i.substring(E.length),E=E.replace(/\n+/g,`$&${c}`));let k=(u?"|":">")+(y?c?"2":"1":"")+f;if(t&&(k+=" "+a(t.replace(/ ?[\r\n]+/g," ")),n&&n()),u)return i=i.replace(/\n+/g,`$&${c}`),`${k}
|
|||
|
${c}${E}${i}${g}`;i=i.replace(/\n+/g,`
|
|||
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let S=bi.foldFlowLines(`${E}${i}${g}`,c,bi.FOLD_BLOCK,lo(r,!0));return`${k}
|
|||
|
${c}${S}`}function LE(t,e,i,r){let{type:n,value:s}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(`
|
|||
|
`)||u&&/[[\]{},]/.test(s))return Mr(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
|
|||
|
`)?Mr(s,e):ao(t,e,i,r);if(!a&&!u&&n!==Jt.Scalar.PLAIN&&s.includes(`
|
|||
|
`))return ao(t,e,i,r);if(co(s)){if(l==="")return e.forceBlockIndent=!0,ao(t,e,i,r);if(a&&l===c)return Mr(s,e)}let f=s.replace(/\n+/g,`$&
|
|||
|
${l}`);if(o){let d=y=>{var b;return y.default&&y.tag!=="tag:yaml.org,2002:str"&&((b=y.test)==null?void 0:b.test(f))},{compat:g,tags:m}=e.doc.schema;if(m.some(d)||g!=null&&g.some(d))return Mr(s,e)}return a?f:bi.foldFlowLines(f,l,bi.FOLD_FLOW,lo(e,!1))}function BE(t,e,i,r){let{implicitKey:n,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==Jt.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=Jt.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case Jt.Scalar.BLOCK_FOLDED:case Jt.Scalar.BLOCK_LITERAL:return n||s?Mr(o.value,e):ao(o,e,i,r);case Jt.Scalar.QUOTE_DOUBLE:return _n(o.value,e);case Jt.Scalar.QUOTE_SINGLE:return bc(o.value,e);case Jt.Scalar.PLAIN:return LE(o,e,i,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=n&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}hg.stringifyString=BE});var xn=_(wc=>{"use strict";var RE=Xs(),_i=Se(),PE=yn(),ME=wn();function FE(t,e){let i=Object.assign({blockQuote:!0,commentString:PE.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function qE(t,e){var n,s,o,a;if(e.tag){let l=t.filter(c=>c.tag===e.tag);if(l.length>0)return(n=l.find(c=>c.format===e.format))!=null?n:l[0]}let i,r;if(_i.isScalar(e)){r=e.value;let l=t.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){let c=l.filter(u=>u.test);c.length>0&&(l=c)}i=(s=l.find(c=>c.format===e.format))!=null?s:l.find(c=>!c.format)}else r=e,i=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!i){let l=(a=(o=r==null?void 0:r.constructor)==null?void 0:o.name)!=null?a:typeof r;throw new Error(`Tag not resolved for ${l} value`)}return i}function DE(t,e,{anchors:i,doc:r}){if(!r.directives)return"";let n=[],s=(_i.isScalar(t)||_i.isCollection(t))&&t.anchor;s&&RE.anchorIsValid(s)&&(i.add(s),n.push(`&${s}`));let o=t.tag?t.tag:e.default?null:e.tag;return o&&n.push(r.directives.tagString(o)),n.join(" ")}function jE(t,e,i,r){var l,c;if(_i.isPair(t))return t.toString(e,i,r);if(_i.isAlias(t)){if(e.doc.directives)return t.toString(e);if((l=e.resolvedAliases)!=null&&l.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,s=_i.isNode(t)?t:e.doc.createNode(t,{onTagObj:u=>n=u});n||(n=qE(e.doc.schema.tags,s));let o=DE(s,n,e);o.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+o.length+1);let a=typeof n.stringify=="function"?n.stringify(s,e,i,r):_i.isScalar(s)?ME.stringifyString(s,e,i,r):s.toString(e,i,r);return o?_i.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|||
|
${e.indent}${a}`:a}wc.createStringifyContext=FE;wc.stringify=jE});var gg=_(mg=>{"use strict";var oi=Se(),pg=De(),dg=xn(),Sn=yn();function UE({key:t,value:e},i,r,n){var T,A;let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=i,d=oi.isNode(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(oi.isCollection(t)||!oi.isNode(t)&&typeof t=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let g=!f&&(!t||d&&e==null&&!i.inFlow||oi.isCollection(t)||(oi.isScalar(t)?t.type===pg.Scalar.BLOCK_FOLDED||t.type===pg.Scalar.BLOCK_LITERAL:typeof t=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!g&&(f||!s),indent:a+l});let m=!1,y=!1,b=dg.stringify(t,i,()=>m=!0,()=>y=!0);if(!g&&!i.inFlow&&b.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(i.inFlow){if(s||e==null)return m&&r&&r(),b===""?"?":g?`? ${b}`:b}else if(s&&!f||e==null&&g)return b=`? ${b}`,d&&!m?b+=Sn.lineComment(b,i.indent,c(d)):y&&n&&n(),b;m&&(d=null),g?(d&&(b+=Sn.lineComment(b,i.indent,c(d))),b=`? ${b}
|
|||
|
${a}:`):(b=`${b}:`,d&&(b+=Sn.lineComment(b,i.indent,c(d))));let x,E,O;oi.isNode(e)?(x=!!e.spaceBefore,E=e.commentBefore,O=e.comment):(x=!1,E=null,O=null,e&&typeof e=="object"&&(e=o.createNode(e))),i.implicitKey=!1,!g&&!d&&oi.isScalar(e)&&(i.indentAtStart=b.length+1),y=!1,!u&&l.length>=2&&!i.inFlow&&!g&&oi.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let k=!1,S=dg.stringify(e,i,()=>k=!0,()=>y=!0),R=" ";if(d||x||E){if(R=x?`
|
|||
|
`:"",E){let C=c(E);R+=`
|
|||
|
${Sn.indentComment(C,i.indent)}`}S===""&&!i.inFlow?R===`
|
|||
|
`&&(R=`
|
|||
|
|
|||
|
`):R+=`
|
|||
|
${i.indent}`}else if(!g&&oi.isCollection(e)){let C=S[0],L=S.indexOf(`
|
|||
|
`),P=L!==-1,U=(A=(T=i.inFlow)!=null?T:e.flow)!=null?A:e.items.length===0;if(P||!U){let q=!1;if(P&&(C==="&"||C==="!")){let H=S.indexOf(" ");C==="&"&&H!==-1&&H<L&&S[H+1]==="!"&&(H=S.indexOf(" ",H+1)),(H===-1||L<H)&&(q=!0)}q||(R=`
|
|||
|
${i.indent}`)}}else(S===""||S[0]===`
|
|||
|
`)&&(R="");return b+=R+S,i.inFlow?k&&r&&r():O&&!k?b+=Sn.lineComment(b,i.indent,c(O)):y&&n&&n(),b}mg.stringifyPair=UE});var Sc=_(xc=>{"use strict";function $E(t,...e){t==="debug"&&console.log(...e)}function VE(t,e){(t==="debug"||t==="warn")&&(typeof process!="undefined"&&process.emitWarning?process.emitWarning(e):console.warn(e))}xc.debug=$E;xc.warn=VE});var po=_(ho=>{"use strict";var En=Se(),vg=De(),uo="<<",fo={identify:t=>t===uo||typeof t=="symbol"&&t.description===uo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new vg.Scalar(Symbol(uo)),{addToJSMap:yg}),stringify:()=>uo},HE=(t,e)=>(fo.identify(e)||En.isScalar(e)&&(!e.type||e.type===vg.Scalar.PLAIN)&&fo.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(i=>i.tag===fo.tag&&i.default));function yg(t,e,i){if(i=t&&En.isAlias(i)?i.resolve(t.doc):i,En.isSeq(i))for(let r of i.items)Ec(t,e,r);else if(Array.isArray(i))for(let r of i)Ec(t,e,r);else Ec(t,e,i)}function Ec(t,e,i){let r=t&&En.isAlias(i)?i.resolve(t.doc):i;if(!En.isMap(r))throw new Error("Merge sources must be maps or map aliases");let n=r.toJSON(null,t,Map);for(let[s,o]of n)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}ho.addMergeToJSMap=yg;ho.isMergeKey=HE;ho.merge=fo});var Oc=_(wg=>{"use strict";var GE=Sc(),bg=po(),YE=xn(),_g=Se(),kc=vi();function WE(t,e,{key:i,value:r}){if(_g.isNode(i)&&i.addToJSMap)i.addToJSMap(t,e,r);else if(bg.isMergeKey(t,i))bg.addMergeToJSMap(t,e,r);else{let n=kc.toJS(i,"",t);if(e instanceof Map)e.set(n,kc.toJS(r,n,t));else if(e instanceof Set)e.add(n);else{let s=KE(i,n,t),o=kc.toJS(r,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function KE(t,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(_g.isNode(t)&&(i!=null&&i.doc)){let r=YE.createStringifyContext(i.doc,{});r.anchors=new Set;for(let s of i.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let n=t.toString(r);if(!i.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),GE.warn(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return n}return JSON.stringify(e)}wg.addPairToJSMap=WE});var wi=_(Cc=>{"use strict";var xg=vn(),zE=gg(),JE=Oc(),mo=Se();function ZE(t,e,i){let r=xg.createNode(t,void 0,i),n=xg.createNode(e,void 0,i);return new go(r,n)}var go=class t{constructor(e,i=null){Object.defineProperty(this,mo.NODE_TYPE,{value:mo.PAIR}),this.key=e,this.value=i}clone(e){let{key:i,value:r}=this;return mo.isNode(i)&&(i=i.clone(e)),mo.isNode(r)&&(r=r.clone(e)),new t(i,r)}toJSON(e,i){let r=i!=null&&i.mapAsMap?new Map:{};return JE.addPairToJSMap(i,r,this)}toString(e,i,r){return e!=null&&e.doc?zE.stringifyPair(this,e,i,r):JSON.stringify(this)}};Cc.Pair=go;Cc.createPair=ZE});var Tc=_(Eg=>{"use strict";var Zi=Se(),Sg=xn(),vo=yn();function QE(t,e,i){var s;return(((s=e.inFlow)!=null?s:t.flow)?ek:XE)(t,e,i)}function XE({comment:t,items:e},i,{blockItemPrefix:r,flowChars:n,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=i,u=Object.assign({},i,{indent:s,type:null}),f=!1,d=[];for(let m=0;m<e.length;++m){let y=e[m],b=null;if(Zi.isNode(y))!f&&y.spaceBefore&&d.push(""),yo(i,d,y.commentBefore,f),y.comment&&(b=y.comment);else if(Zi.isPair(y)){let E=Zi.isNode(y.key)?y.key:null;E&&(!f&&E.spaceBefore&&d.push(""),yo(i,d,E.commentBefore,f))}f=!1;let x=Sg.stringify(y,u,()=>b=null,()=>f=!0);b&&(x+=vo.lineComment(x,s,c(b))),f&&b&&(f=!1),d.push(r+x)}let g;if(d.length===0)g=n.start+n.end;else{g=d[0];for(let m=1;m<d.length;++m){let y=d[m];g+=y?`
|
|||
|
${l}${y}`:`
|
|||
|
`}}return t?(g+=`
|
|||
|
`+vo.indentComment(c(t),l),a&&a()):f&&o&&o(),g}function ek({items:t},e,{flowChars:i,itemIndent:r}){let{indent:n,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let m=0;m<t.length;++m){let y=t[m],b=null;if(Zi.isNode(y))y.spaceBefore&&f.push(""),yo(e,f,y.commentBefore,!1),y.comment&&(b=y.comment);else if(Zi.isPair(y)){let E=Zi.isNode(y.key)?y.key:null;E&&(E.spaceBefore&&f.push(""),yo(e,f,E.commentBefore,!1),E.comment&&(c=!0));let O=Zi.isNode(y.value)?y.value:null;O?(O.comment&&(b=O.comment),O.commentBefore&&(c=!0)):y.value==null&&(E!=null&&E.comment)&&(b=E.comment)}b&&(c=!0);let x=Sg.stringify(y,l,()=>b=null);m<t.length-1&&(x+=","),b&&(x+=vo.lineComment(x,r,a(b))),!c&&(f.length>u||x.includes(`
|
|||
|
`))&&(c=!0),f.push(x),u=f.length}let{start:d,end:g}=i;if(f.length===0)return d+g;if(!c){let m=f.reduce((y,b)=>y+b.length+2,2);c=e.options.lineWidth>0&&m>e.options.lineWidth}if(c){let m=d;for(let y of f)m+=y?`
|
|||
|
${s}${n}${y}`:`
|
|||
|
`;return`${m}
|
|||
|
${n}${g}`}else return`${d}${o}${f.join(" ")}${o}${g}`}function yo({indent:t,options:{commentString:e}},i,r,n){if(r&&n&&(r=r.replace(/^\n+/,"")),r){let s=vo.indentComment(e(r),t);i.push(s.trimStart())}}Eg.stringifyCollection=QE});var Si=_(Ic=>{"use strict";var tk=Tc(),ik=Oc(),rk=no(),xi=Se(),bo=wi(),nk=De();function kn(t,e){let i=xi.isScalar(e)?e.value:e;for(let r of t)if(xi.isPair(r)&&(r.key===e||r.key===i||xi.isScalar(r.key)&&r.key.value===i))return r}var Ac=class extends rk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(xi.MAP,e),this.items=[]}static from(e,i,r){let{keepUndefined:n,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(i,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||n)&&o.items.push(bo.createPair(l,c,r))};if(i instanceof Map)for(let[l,c]of i)a(l,c);else if(i&&typeof i=="object")for(let l of Object.keys(i))a(l,i[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,i){var o;let r;xi.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new bo.Pair(e,e==null?void 0:e.value):r=new bo.Pair(e.key,e.value);let n=kn(this.items,r.key),s=(o=this.schema)==null?void 0:o.sortMapEntries;if(n){if(!i)throw new Error(`Key ${r.key} already set`);xi.isScalar(n.value)&&nk.isScalarValue(r.value)?n.value.value=r.value:n.value=r.value}else if(s){let a=this.items.findIndex(l=>s(r,l)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(e){let i=kn(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){var s;let r=kn(this.items,e),n=r==null?void 0:r.value;return(s=!i&&xi.isScalar(n)?n.value:n)!=null?s:void 0}has(e){return!!kn(this.items,e)}set(e,i){this.add(new bo.Pair(e,i),!0)}toJSON(e,i,r){let n=r?new r:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(n);for(let s of this.items)ik.addPairToJSMap(i,n,s);return n}toString(e,i,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!xi.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),tk.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:i})}};Ic.YAMLMap=Ac;Ic.findPair=kn});var Fr=_(Og=>{"use strict";var sk=Se(),kg=Si(),ok={collection:"map",default:!0,nodeClass:kg.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return sk.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,i)=>kg.YAMLMap.from(t,e,i)};Og.map=ok});var Ei=_(Cg=>{"use strict";var ak=vn(),lk=Tc(),ck=no(),wo=Se(),uk=De(),fk=vi(),Nc=class extends ck.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(wo.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let i=_o(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){let r=_o(e);if(typeof r!="number")return;let n=this.items[r];return!i&&wo.isScalar(n)?n.value:n}has(e){let i=_o(e);return typeof i=="number"&&i<this.items.length}set(e,i){let r=_o(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[r];wo.isScalar(n)&&uk.isScalarValue(i)?n.value=i:this.items[r]=i}toJSON(e,i){let r=[];i!=null&&i.onCreate&&i.onCreate(r);let n=0;for(let s of this.items)r.push(fk.toJS(s,String(n++),i));return r}toString(e,i,r){return e?lk.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(e,i,r){let{replacer:n}=r,s=new this(e);if(i&&Symbol.iterator in Object(i)){let o=0;for(let a of i){if(typeof n=="function"){let l=i instanceof Set?a:String(o++);a=n.call(i,l,a)}s.items.push(ak.createNode(a,void 0,r))}}return s}};function _o(t){let e=wo.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}Cg.YAMLSeq=Nc});var qr=_(Ag=>{"use strict";var hk=Se(),Tg=Ei(),pk={collection:"seq",default:!0,nodeClass:Tg.YAMLSeq,tag:"
|
|||
|
`:" ")}return Fk.stringifyString({comment:t,type:e,value:a},r,n,s)}};Hg.binary=qk});var Ao=_(To=>{"use strict";var Co=Se(),Uc=wi(),Dk=De(),jk=Ei();function Gg(t,e){var i;if(Co.isSeq(t))for(let r=0;r<t.items.length;++r){let n=t.items[r];if(!Co.isPair(n)){if(Co.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let s=n.items[0]||new Uc.Pair(new Dk.Scalar(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore}
|
|||
|
${s.key.commentBefore}`:n.commentBefore),n.comment){let o=(i=s.value)!=null?i:s.key;o.comment=o.comment?`${n.comment}
|
|||
|
${o.comment}`:n.comment}n=s}t.items[r]=Co.isPair(n)?n:new Uc.Pair(n)}}else e("Expected a sequence for this tag");return t}function Yg(t,e,i){let{replacer:r}=i,n=new jk.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(Uc.createPair(a,l,i))}return n}var Uk={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Gg,createNode:Yg};To.createPairs=Yg;To.pairs=Uk;To.resolvePairs=Gg});var Hc=_(Vc=>{"use strict";var Wg=Se(),$c=vi(),Cn=Si(),$k=Ei(),Kg=Ao(),Qi=class t extends $k.YAMLSeq{constructor(){super(),this.add=Cn.YAMLMap.prototype.add.bind(this),this.delete=Cn.YAMLMap.prototype.delete.bind(this),this.get=Cn.YAMLMap.prototype.get.bind(this),this.has=Cn.YAMLMap.prototype.has.bind(this),this.set=Cn.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,i){if(!i)return super.toJSON(e);let r=new Map;i!=null&&i.onCreate&&i.onCreate(r);for(let n of this.items){let s,o;if(Wg.isPair(n)?(s=$c.toJS(n.key,"",i),o=$c.toJS(n.value,s,i)):s=$c.toJS(n,"",i),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,i,r){let n=Kg.createPairs(e,i,r),s=new this;return s.items=n.items,s}};Qi.tag="tag:yaml.org,2002:omap";var Vk={collection:"seq",identify:t=>t instanceof Map,nodeClass:Qi,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let i=Kg.resolvePairs(t,e),r=[];for(let{key:n}of i.items)Wg.isScalar(n)&&(r.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):r.push(n.value));return Object.assign(new Qi,i)},createNode:(t,e,i)=>Qi.from(t,e,i)};Vc.YAMLOMap=Qi;Vc.omap=Vk});var Xg=_(Gc=>{"use strict";var zg=De();function Jg({value:t,source:e},i){return e&&(t?Zg:Qg).test.test(e)?e:t?i.options.trueStr:i.options.falseStr}var Zg={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new zg.Scalar(!0),stringify:Jg},Qg={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new zg.Scalar(!1),stringify:Jg};Gc.falseTag=Qg;Gc.trueTag=Zg});var e0=_(Io=>{"use strict";var Hk=De(),Yc=Dr(),Gk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Yc.stringifyNumber},Yk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Yc.stringifyNumber(t)}},Wk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new Hk.Scalar(parseFloat(t.replace(/_/g,""))),i=t.indexOf(".");if(i!==-1){let r=t.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Yc.stringifyNumber};Io.float=Wk;Io.floatExp=Yk;Io.floatNaN=Gk});var i0=_(An=>{"use strict";var t0=Dr(),Tn=t=>typeof t=="bigint"||Number.isInteger(t);function No(t,e,i,{intAsBigInt:r}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(i){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return n==="-"?BigInt(-1)*o:o}let s=parseInt(t,i);return n==="-"?-1*s:s}function Wc(t,e,i){let{value:r}=t;if(Tn(r)){let n=r.toString(e);return r<0?"-"+i+n.substr(1):i+n}return t0.stringifyNumber(t)}var Kk={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,i)=>No(t,2,2,i),stringify:t=>Wc(t,2
|
|||
|
`)?(i.push("..."),i.push(Nn.indentComment(c,""))):i.push(`... ${c}`)}else i.push("...");else{let c=t.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&i[i.length-1]!==""&&i.push(""),i.push(Nn.indentComment(s(c),"")))}return i.join(`
|
|||
|
`)+`
|
|||
|
`}b0.stringifyDocument=EO});var Ln=_(w0=>{"use strict";var kO=gn(),jr=no(),It=Se(),OO=wi(),CO=vi(),TO=su(),AO=_0(),au=Xs(),IO=fc(),NO=vn(),lu=uc(),cu=class t{constructor(e,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,It.NODE_TYPE,{value:It.DOC});let n=null;typeof i=="function"||Array.isArray(i)?n=i:r===void 0&&i&&(r=i,i=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new lu.Directives({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(t.prototype,{[It.NODE_TYPE]:{value:It.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=It.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Ur(this.contents)&&this.contents.add(e)}addIn(e,i){Ur(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){let r=au.anchorNames(this);e.anchor=!i||r.has(i)?au.findNewAnchor(i||"a",r):i}return new kO.Alias(e.anchor)}createNode(e,i,r){let n;if(typeof i=="function")e=i.call({"":e},"",e),n=i;else if(Array.isArray(i)){let b=E=>typeof E=="number"||E instanceof String||E instanceof Number,x=i.filter(b).map(String);x.length>0&&(i=i.concat(x)),n=i}else r===void 0&&i&&(r=i,i=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r!=null?r:{},{onAnchor:f,setAnchors:d,sourceObjects:g}=au.createNodeAnchors(this,o||"a"),m={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:g},y=NO.createNode(e,u,m);return a&&It.isCollection(y)&&(y.flow=!0),d(),y}createPair(e,i,r={}){let n=this.createNode(e,null,r),s=this.createNode(i,null,r);return new OO.Pair(n,s)}delete(e){return Ur(this.contents)?this.contents.delete(e):!1}deleteIn(e){return jr.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Ur(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return It.isCollection(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return jr.isEmptyPath(e)?!i&&It.isScalar(this.contents)?this.contents.value:this.contents:It.isCollection(this.contents)?this.contents.getIn(e,i):void 0}has(e){return It.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return jr.isEmptyPath(e)?this.contents!==void 0:It.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=jr.collectionFromPath(this.schema,[e],i):Ur(this.contents)&&this.contents.set(e,i)}setIn(e,i){jr.isEmptyPath(e)?this.contents=i:this.contents==null?this.contents=jr.collectionFromPath(this.schema,Array.from(e),i):Ur(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new lu.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new lu.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new TO.Schema(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAlias
|
|||
|
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=i.linePos[1];l&&l.line===r&&l.col>n&&(a=Math.max(1,Math.min(l.col-n,80-s)));let c=" ".repeat(s)+"^".repeat(a);i.message+=`:
|
|||
|
|
|||
|
${o}
|
|||
|
${c}
|
|||
|
`}};Rn.YAMLError=Bn;Rn.YAMLParseError=uu;Rn.YAMLWarning=fu;Rn.prettifyError=LO});var Mn=_(x0=>{"use strict";function BO(t,{flow:e,indicator:i,next:r,offset:n,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",g=!1,m=!1,y=null,b=null,x=null,E=null,O=null,k=null,S=null;for(let A of t)switch(m&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&s(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),y&&(c&&A.type!=="comment"&&A.type!=="newline"&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),A.type){case"space":!e&&(i!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&A.source.includes(" ")&&(y=A),u=!0;break;case"comment":{u||s(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=A.source.substring(1)||" ";f?f+=d+C:f=C,d="",c=!1;break}case"newline":c?f?f+=A.source:l=!0:d+=A.source,c=!0,g=!0,(b||x)&&(E=A),u=!0;break;case"anchor":b&&s(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&s(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=A,S===null&&(S=A.offset),c=!1,u=!1,m=!0;break;case"tag":{x&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),x=A,S===null&&(S=A.offset),c=!1,u=!1,m=!0;break}case i:(b||x)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),k&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e!=null?e:"collection"}`),k=A,c=i==="seq-item-ind"||i==="explicit-key-ind",u=!1;break;case"comma":if(e){O&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),O=A,c=!1,u=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}let R=t[t.length-1],T=R?R.offset+R.source.length:n;return m&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(c&&y.indent<=o||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:O,found:k,spaceBefore:l,comment:f,hasNewline:g,anchor:b,tag:x,newlineAfterProp:E,end:T,start:S!=null?S:T}}x0.resolveProps=BO});var Do=_(S0=>{"use strict";function hu(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|||
|
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let i of e.start)if(i.type==="newline")return!0;if(e.sep){for(let i of e.sep)if(i.type==="newline")return!0}if(hu(e.key)||hu(e.value))return!0}return!1;default:return!0}}S0.containsNewline=hu});var pu=_(E0=>{"use strict";var RO=Do();function PO(t,e,i){if((e==null?void 0:e.type)==="flow-collection"){let r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&RO.containsNewline(e)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}E0.flowIndentCheck=PO});var du=_(O0=>{"use strict";var k0=Se();function MO(t,e,i){let{uniqueKeys:r}=t.options;if(r===!1)return!1;let n=typeof r=="function"?r:(s,o)=>s===o||k0.isScalar(s)&&k0.isScalar(o)&&s.value===o.value;return e.some(s=>n(s.key,i))}O0.mapIncludes=MO});var L0=_(N0=>{"use strict";var C0=wi(),FO=Si(),T0=Mn(),qO=Do(),A0=pu(),DO=du(),I0="All mapping items must start at the same column";function jO({composeNode:t,composeEmptyNode:e},i,r,n,s){var u,f;let o=(u=s==null?void 0:s.nodeClass)!=null?u:FO.YAMLMap,a=new o(i.schema);i.atRoot&&(i.atRoot=!1);let l=r.offset,c=null;for(let d of r.items){let{start:g,key:m,sep:y,value:b}=d,x=T0.resolveProps(g,{indicator:"explicit-key-ind",next:m!=null?m:y==null?void 0:y[0],offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0}),E=!x.found;if(E){if(m&&(m.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==r.indent&&n(l,"BAD_INDENT",I0)),!x.anchor&&!x.tag&&!y){c=x.end,x.comment&&(a.comment?a.comment+=`
|
|||
|
`+x.comment:a.comment=x.comment);continue}(x.newlineAfterProp||qO.containsNewline(m))&&n(m!=null?m:g[g.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=x.found)==null?void 0:f.indent)!==r.indent&&n(l,"BAD_INDENT",I0);i.atKey=!0;let O=x.end,k=m?t(i,m,x,n):e(i,O,g,null,x,n);i.schema.compat&&A0.flowIndentCheck(r.indent,m,n),i.atKey=!1,DO.mapIncludes(i,a.items,k)&&n(O,"DUPLICATE_KEY","Map keys must be unique");let S=T0.resolveProps(y!=null?y:[],{indicator:"map-value-ind",next:b,offset:k.range[2],onError:n,parentIndent:r.indent,startOnNewline:!m||m.type==="block-scalar"});if(l=S.end,S.found){E&&((b==null?void 0:b.type)==="block-map"&&!S.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&x.start<S.found.offset-1024&&n(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let R=b?t(i,b,S,n):e(i,l,y,null,S,n);i.schema.compat&&A0.flowIndentCheck(r.indent,b,n),l=R.range[2];let T=new C0.Pair(k,R);i.options.keepSourceTokens&&(T.srcToken=d),a.items.push(T)}else{E&&n(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(k.comment?k.comment+=`
|
|||
|
`+S.comment:k.comment=S.comment);let R=new C0.Pair(k);i.options.keepSourceTokens&&(R.srcToken=d),a.items.push(R)}}return c&&c<l&&n(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c!=null?c:l],a}N0.resolveBlockMap=jO});var R0=_(B0=>{"use strict";var UO=Ei(),$O=Mn(),VO=pu();function HO({composeNode:t,composeEmptyNode:e},i,r,n,s){var u;let o=(u=s==null?void 0:s.nodeClass)!=null?u:UO.YAMLSeq,a=new o(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=r.offset,c=null;for(let{start:f,value:d}of r.items){let g=$O.resolveProps(f,{indicator:"seq-item-ind",next:d,offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0});if(!g.found)if(g.anchor||g.tag||d)d&&d.type==="block-seq"?n(g.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=g.end,g.comment&&(a.comment=g.comment);continue}let m=d?t(i,d,g,n):e(i,g.end,f,null,g,n);i.schema.compat&&VO.flowIndentCheck(r.indent,d,n),l=m.range[2],a.items.push(m)}return a.range=[r.offset,l,c!=null?c:l],a}B0.resolveBlockSeq=HO});var $r=_(P0=>{"use strict";function GO(t,e,i,r){let n="";if(t){let s=!1,o="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{i&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";n?n+=o+u:n=u,o="";break}case"newline":n&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}P0.resolveEnd=GO});var D0=_(q0=>{"use strict";var YO=Se(),WO=wi(),M0=Si(),KO=Ei(),zO=$r(),F0=Mn(),JO=Do(),ZO=du(),mu="Block collections are not allowed within flow collections",gu=t=>t&&(t.type==="block-map"||t.type==="block-seq");function QO({composeNode:t,composeEmptyNode:e},i,r,n,s){var b,x;let o=r.start.source==="{",a=o?"flow map":"flow sequence",l=(b=s==null?void 0:s.nodeClass)!=null?b:o?M0.YAMLMap:KO.YAMLSeq,c=new l(i.schema);c.flow=!0;let u=i.atRoot;u&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let f=r.offset+r.start.source.length;for(let E=0;E<r.items.length;++E){let O=r.items[E],{start:k,key:S,sep:R,value:T}=O,A=F0.resolveProps(k,{flow:a,indicator:"explicit-key-ind",next:S!=null?S:R==null?void 0:R[0],offset:f,onError:n,parentIndent:r.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!R&&!T){E===0&&A.comma?n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):E<r.items.length-1&&n(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),A.comment&&(c.comment?c.comment+=`
|
|||
|
`+A.comment:c.comment=A.comment),f=A.end;continue}!o&&i.options.strict&&JO.containsNewline(S)&&n(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)A.comma&&n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(A.comma||n(A.start,"MISSING_CHAR",`Missing , between ${a} items`),A.comment){let C="";e:for(let L of k)switch(L.type){case"comma":case"space":break;case"comment":C=L.source.substring(1);break e;default:break e}if(C){let L=c.items[c.items.length-1];YO.isPair(L)&&(L=(x=L.value)!=null?x:L.key),L.comment?L.comment+=`
|
|||
|
`+C:L.comment=C,A.comment=A.comment.substring(C.length+1)}}if(!o&&!R&&!A.found){let C=T?t(i,T,A,n):e(i,A.end,R,null,A,n);c.items.push(C),f=C.range[2],gu(T)&&n(C.range,"BLOCK_IN_FLOW",mu)}else{i.atKey=!0;let C=A.end,L=S?t(i,S,A,n):e(i,C,k,null,A,n);gu(S)&&n(L.range,"BLOCK_IN_FLOW",mu),i.atKey=!1;let P=F0.resolveProps(R!=null?R:[],{flow:a,indicator:"map-value-ind",next:T,offset:L.range[2],onError:n,parentIndent:r.indent,startOnNewline:!1});if(P.found){if(!o&&!A.found&&i.options.strict){if(R)for(let H of R){if(H===P.found)break;if(H.type==="newline"){n(H,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<P.found.offset-1024&&n(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else T&&("source"in T&&T.source&&T.source[0]===":"?n(T,"MISSING_CHAR",`Missing space after : in ${a}`):n(P.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let U=T?t(i,T,P,n):P.found?e(i,P.end,R,null,P,n):null;U?gu(T)&&n(U.range,"BLOCK_IN_FLOW",mu):P.comment&&(L.comment?L.comment+=`
|
|||
|
`+P.comment:L.comment=P.comment);let q=new WO.Pair(L,U);if(i.options.keepSourceTokens&&(q.srcToken=O),o){let H=c;ZO.mapIncludes(i,H.items,L)&&n(C,"DUPLICATE_KEY","Map keys must be unique"),H.items.push(q)}else{let H=new M0.YAMLMap(i.schema);H.flow=!0,H.items.push(q);let j=(U!=null?U:L).range;H.range=[L.range[0],j[1],j[2]],c.items.push(H)}f=U?U.range[2]:P.end}}let d=o?"}":"]",[g,...m]=r.end,y=f;if(g&&g.source===d)y=g.offset+g.source.length;else{let E=a[0].toUpperCase()+a.substring(1),O=u?`${E} must end with a ${d}`:`${E} in block collection must be sufficiently indented and end with a ${d}`;n(f,u?"MISSING_CHAR":"BAD_INDENT",O),g&&g.source.length!==1&&m.unshift(g)}if(m.length>0){let E=zO.resolveEnd(m,y,i.options.strict,n);E.comment&&(c.comment?c.comment+=`
|
|||
|
`+E.comment:c.comment=E.comment),c.range=[r.offset,y,E.offset]}else c.range=[r.offset,y,y];return c}q0.resolveFlowCollection=QO});var U0=_(j0=>{"use strict";var XO=Se(),eC=De(),tC=Si(),iC=Ei(),rC=L0(),nC=R0(),sC=D0();function vu(t,e,i,r,n,s){let o=i.type==="block-map"?rC.resolveBlockMap(t,e,i,r,s):i.type==="block-seq"?nC.resolveBlockSeq(t,e,i,r,s):sC.resolveFlowCollection(t,e,i,r,s),a=o.constructor;return n==="!"||n===a.tagName?(o.tag=a.tagName,o):(n&&(o.tag=n),o)}function oC(t,e,i,r,n){var d,g;let s=r.tag,o=s?e.directives.tagName(s.source,m=>n(s,"TAG_RESOLVE_FAILED",m)):null;if(i.type==="block-seq"){let{anchor:m,newlineAfterProp:y}=r,b=m&&s?m.offset>s.offset?m:s:m!=null?m:s;b&&(!y||y.offset<b.offset)&&n(b,"MISSING_CHAR","Missing newline after block sequence props")}let a=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===tC.YAMLMap.tagName&&a==="map"||o===iC.YAMLSeq.tagName&&a==="seq")return vu(t,e,i,n,o);let l=e.schema.tags.find(m=>m.tag===o&&m.collection===a);if(!l){let m=e.schema.knownTags[o];if(m&&m.collection===a)e.schema.tags.push(Object.assign({},m,{default:!1})),l=m;else return m!=null&&m.collection?n(s,"BAD_COLLECTION_TYPE",`${m.tag} used for ${a} collection, but expects ${m.collection}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),vu(t,e,i,n,o)}let c=vu(t,e,i,n,o,l),u=(g=(d=l.resolve)==null?void 0:d.call(l,c,m=>n(s,"TAG_RESOLVE_FAILED",m),e.options))!=null?g:c,f=XO.isNode(u)?u:new eC.Scalar(u);return f.range=c.range,f.tag=o,l!=null&&l.format&&(f.format=l.format),f}j0.composeCollection=oC});var bu=_($0=>{"use strict";var yu=De();function aC(t,e,i){let r=e.offset,n=lC(e,t.options.strict,i);if(!n)return{value:"",type:null,comment:"",range:[r,r,r]};let s=n.mode===">"?yu.Scalar.BLOCK_FOLDED:yu.Scalar.BLOCK_LITERAL,o=e.source?cC(e.source):[],a=o.length;for(let y=o.length-1;y>=0;--y){let b=o[y][1];if(b===""||b==="\r")a=y;else break}if(a===0){let y=n.chomp==="+"&&o.length>0?`
|
|||
|
`.repeat(Math.max(1,o.length-1)):"",b=r+n.length;return e.source&&(b+=e.source.length),{value:y,type:s,comment:n.comment,range:[r,b,b]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let y=0;y<a;++y){let[b,x]=o[y];if(x===""||x==="\r")n.indent===0&&b.length>l&&(l=b.length);else{b.length<l&&i(c+b.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=b.length),u=y,l===0&&!t.atRoot&&i(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=b.length+x.length+1}for(let y=o.length-1;y>=a;--y)o[y][0].length>l&&(a=y+1);let f="",d="",g=!1;for(let y=0;y<u;++y)f+=o[y][0].slice(l)+`
|
|||
|
`;for(let y=u;y<a;++y){let[b,x]=o[y];c+=b.length+x.length+1;let E=x[x.length-1]==="\r";if(E&&(x=x.slice(0,-1)),x&&b.length<l){let k=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;i(c-x.length-(E?2:1),"BAD_INDENT",k),b=""}s===yu.Scalar.BLOCK_LITERAL?(f+=d+b.slice(l)+x,d=`
|
|||
|
`):b.length>l||x[0]===" "?(d===" "?d=`
|
|||
|
`:!g&&d===`
|
|||
|
`&&(d=`
|
|||
|
|
|||
|
`),f+=d+b.slice(l)+x,d=`
|
|||
|
`,g=!0):x===""?d===`
|
|||
|
`?f+=`
|
|||
|
`:d=`
|
|||
|
`:(f+=d+x,d=" ",g=!1)}switch(n.chomp){case"-":break;case"+":for(let y=a;y<o.length;++y)f+=`
|
|||
|
`+o[y][0].slice(l);f[f.length-1]!==`
|
|||
|
`&&(f+=`
|
|||
|
`);break;default:f+=`
|
|||
|
`}let m=r+n.length+e.source.length;return{value:f,type:s,comment:n.comment,range:[r,m,m]}}function lC({offset:t,props:e},i,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],s=n[0],o=0,a="",l=-1;for(let d=1;d<n.length;++d){let g=n[d];if(!a&&(g==="-"||g==="+"))a=g;else{let m=Number(g);!o&&m?o=m:l===-1&&(l=t+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,u="",f=n.length;for(let d=1;d<e.length;++d){let g=e[d];switch(g.type){case"space":c=!0;case"newline":f+=g.source.length;break;case"comment":i&&!c&&r(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=g.source.length,u=g.source.substring(1);break;case"error":r(g,"UNEXPECTED_TOKEN",g.message),f+=g.source.length;break;default:{let m=`Unexpected token in block scalar header: ${g.type}`;r(g,"UNEXPECTED_TOKEN",m);let y=g.source;y&&typeof y=="string"&&(f+=y.length)}}}return{mode:s,indent:o,chomp:a,comment:u,length:f}}function cC(t){let e=t.split(/\n( *)/),i=e[0],r=i.match(/^( *)/),s=[r!=null&&r[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}$0.resolveBlockScalar=aC});var wu=_(H0=>{"use strict";var _u=De(),uC=$r();function fC(t,e,i){let{offset:r,type:n,source:s,end:o}=t,a,l,c=(d,g,m)=>i(r+d,g,m);switch(n){case"scalar":a=_u.Scalar.PLAIN,l=hC(s,c);break;case"single-quoted-scalar":a=_u.Scalar.QUOTE_SINGLE,l=pC(s,c);break;case"double-quoted-scalar":a=_u.Scalar.QUOTE_DOUBLE,l=dC(s,c);break;default:return i(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let u=r+s.length,f=uC.resolveEnd(o,u,e,i);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function hC(t,e){let i="";switch(t[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${t[0]}`;break}case"@":case"`":{i=`reserved character ${t[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),V0(t)}function pC(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),V0(t.slice(1,-1)).replace(/''/g,"'")}function V0(t){var l;let e,i;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|||
|
`,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|||
|
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let n=r[1],s=" ",o=e.lastIndex;for(i.lastIndex=o;r=i.exec(t);)r[1]===""?s===`
|
|||
|
`?n+=s:s=`
|
|||
|
`:(n+=s+r[1],s=" "),o=i.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(t),n+s+((l=r==null?void 0:r[1])!=null?l:"")}function dC(t,e){let i="";for(let r=1;r<t.length-1;++r){let n=t[r];if(!(n==="\r"&&t[r+1]===`
|
|||
|
`))if(n===`
|
|||
|
`){let{fold:s,offset:o}=mC(t,r);i+=s,r=o}else if(n==="\\"){let s=t[++r],o=gC[s];if(o)i+=o;else if(s===`
|
|||
|
`)for(s=t[r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="\r"&&t[r+1]===`
|
|||
|
`)for(s=t[++r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];i+=vC(t,r+1,a,e),r+=a}else{let a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),i+=a}}else if(n===" "||n===" "){let s=r,o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
|
|||
|
`&&!(o==="\r"&&t[r+2]===`
|
|||
|
`)&&(i+=r>s?t.slice(s,r+1):n)}else i+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),i}function mC(t,e){let i="",r=t[e+1];for(;(r===" "||r===" "||r===`
|
|||
|
`||r==="\r")&&!(r==="\r"&&t[e+2]!==`
|
|||
|
`);)r===`
|
|||
|
`&&(i+=`
|
|||
|
`),e+=1,r=t[e+1];return i||(i=" "),{fold:i,offset:e}}var gC={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|||
|
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function vC(t,e,i,r){let n=t.substr(e,i),o=n.length===i&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(o)){let a=t.substr(e-2,i+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}H0.resolveFlowScalar=fC});var W0=_(Y0=>{"use strict";var er=Se(),G0=De(),yC=bu(),bC=wu();function _C(t,e,i,r){let{value:n,type:s,comment:o,range:a}=e.type==="block-scalar"?yC.resolveBlockScalar(t,e,r):bC.resolveFlowScalar(e,t.options.strict,r),l=i?t.directives.tagName(i.source,f=>r(i,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[er.SCALAR]:l?c=wC(t.schema,n,l,i,r):e.type==="scalar"?c=xC(t,n,e,r):c=t.schema[er.SCALAR];let u;try{let f=c.resolve(n,d=>r(i!=null?i:e,"TAG_RESOLVE_FAILED",d),t.options);u=er.isScalar(f)?f:new G0.Scalar(f)}catch(f){let d=f instanceof Error?f.message:String(f);r(i!=null?i:e,"TAG_RESOLVE_FAILED",d),u=new G0.Scalar(n)}return u.range=a,u.source=n,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function wC(t,e,i,r,n){var a;if(i==="!")return t[er.SCALAR];let s=[];for(let l of t.tags)if(!l.collection&&l.tag===i)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if((a=l.test)!=null&&a.test(e))return l;let o=t.knownTags[i];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),t[er.SCALAR])}function xC({atKey:t,directives:e,schema:i},r,n,s){var a;let o=i.tags.find(l=>{var c;return(l.default===!0||t&&l.default==="key")&&((c=l.test)==null?void 0:c.test(r))})||i[er.SCALAR];if(i.compat){let l=(a=i.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(r))}))!=null?a:i[er.SCALAR];if(o.tag!==l.tag){let c=e.tagString(o.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return o}Y0.composeScalar=_C});var z0=_(K0=>{"use strict";function SC(t,e,i){if(e){i===null&&(i=e.length);for(let r=i-1;r>=0;--r){let n=e[r];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++r];(n==null?void 0:n.type)==="space";)t+=n.source.length,n=e[++r];break}}return t}K0.emptyScalarPosition=SC});var Q0=_(Su=>{"use strict";var EC=gn(),kC=Se(),OC=U0(),J0=W0(),CC=$r(),TC=z0(),AC={composeNode:Z0,composeEmptyNode:xu};function Z0(t,e,i,r){let n=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=i,c,u=!0;switch(e.type){case"alias":c=IC(t,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=J0.composeScalar(t,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=OC.composeCollection(AC,t,e,i,r),a&&(c.anchor=a.source.substring(1));break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),c=xu(t,e.offset,void 0,null,i,r),u=!1}}return a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!kC.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l!=null?l:e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function xu(t,e,i,r,{spaceBefore:n,comment:s,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:TC.emptyScalarPosition(e,i,r),indent:-1,source:""},f=J0.composeScalar(t,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function IC({options:t},{offset:e,source:i,end:r},n){let s=new EC.Alias(i.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+i.length,a=CC.resolve
|
|||
|
|
|||
|
`:`
|
|||
|
`)+(o.substring(1)||" "),i=!0,r=!1;break;case"%":((n=t[s+1])==null?void 0:n[0])!=="#"&&(s+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:e,afterEmptyLine:r}}var Eu=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,n,s)=>{let o=qn(i);s?this.warnings.push(new Fn.YAMLWarning(o,r,n)):this.errors.push(new Fn.YAMLParseError(o,r,n))},this.directives=new PC.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,i){let{comment:r,afterEmptyLine:n}=rv(this.prelude);if(r){let s=e.contents;if(i)e.comment=e.comment?`${e.comment}
|
|||
|
${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(iv.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];iv.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${r}
|
|||
|
${a}`:r}else{let o=s.commentBefore;s.commentBefore=o?`${r}
|
|||
|
${o}`:r}}i?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:rv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(i,r)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(i,r,n)=>{let s=qn(e);s[0]+=i,this.onError(s,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let i=FC.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Fn.YAMLParseError(qn(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Fn.YAMLParseError(qn(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let i=qC.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|||
|
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new Fn.YAMLParseError(qn(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),n=new MC.Document(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,i,i],this.decorate(n,!1),yield n}}};nv.Composer=Eu});var av=_(jo=>{"use strict";var DC=bu(),jC=wu(),UC=Pn(),sv=wn();function $C(t,e=!0,i){if(t){let r=(n,s,o)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(i)i(a,s,o);else throw new UC.YAMLParseError([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return jC.resolveFlowScalar(t,e,r);case"block-scalar":return DC.resolveBlockScalar({options:{strict:e}},t,r)}}return null}function VC(t,e){var c;let{implicitKey:i=!1,indent:r,inFlow:n=!1,offset:s=-1,type:o="PLAIN"}=e,a=sv.stringifyString({type:o,value:t},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:r,source:`
|
|||
|
`}];switch(a[0]){case"|":case">":{let u=a.indexOf(`
|
|||
|
`),f=a.substring(0,u),d=a.substring(u+1)+`
|
|||
|
`,g=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return ov(g,l)||g.push({type:"newline",offset:-1,indent:r,source:`
|
|||
|
`}),{type:"block-scalar",offset:s,indent:r,props:g,source:d}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function HC(t,e,i={}){let{afterKey:r=!1,implicitKey:n=!1,inFlow:s=!1,type:o}=i,a="indent"in t?t.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=sv.stringifyString({type:o,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":GC(t,l);break;case'"':Ou(t,l,"double-quoted-scalar");break;case"'":Ou(t,l,"single-quoted-scalar");break;default:Ou(t,l,"scalar")}}function GC(t,e){let i=e.indexOf(`
|
|||
|
`),r=e.substring(0,i),n=e.substring(i+1)+`
|
|||
|
`;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,t.source=n}else{let{offset:s}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];ov(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|||
|
`});for(let l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:n})}}function ov(t,e){if(e)for(let i of e)switch(i.type){case"space":case"comment":t.push(i);break;case"newline":return t.push(i),!0}return!1}function Ou(t,e,i){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=i,t.source=e;break;case"block-scalar":{let r=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let s of r)s.offset+=n;delete t.props,Object.assign(t,{type:i,source:e,end:r});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
|||
|
`};delete t.items,Object.assign(t,{type:i,source:e,end:[n]});break}default:{let r="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:i,indent:r,source:e,end:n})}}}jo.createScalarToken=VC;jo.resolveAsScalar=$C;jo.setScalarValue=HC});var cv=_(lv=>{"use strict";var YC=t=>"type"in t?$o(t):Uo(t);function $o(t){switch(t.type){case"block-scalar":{let e="";for(let i of t.props)e+=$o(i);return e+t.source}case"block-map":case"block-seq":{let e="";for(let i of t.items)e+=Uo(i);return e}case"flow-collection":{let e=t.start.source;for(let i of t.items)e+=Uo(i);for(let i of t.end)e+=i.source;return e}case"document":{let e=Uo(t);if(t.end)for(let i of t.end)e+=i.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let i of t.end)e+=i.source;return e}}}function Uo({start:t,key:e,sep:i,value:r}){let n="";for(let s of t)n+=s.source;if(e&&(n+=$o(e)),i)for(let s of i)n+=s.source;return r&&(n+=$o(r)),n}lv.stringify=YC});var pv=_(hv=>{"use strict";var Cu=Symbol("break visit"),WC=Symbol("skip children"),uv=Symbol("remove item");function tr(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),fv(Object.freeze([]),t,e)}tr.BREAK=Cu;tr.SKIP=WC;tr.REMOVE=uv;tr.itemAtPath=(t,e)=>{let i=t;for(let[r,n]of e){let s=i==null?void 0:i[r];if(s&&"items"in s)i=s.items[n];else return}return i};tr.parentCollection=(t,e)=>{let i=tr.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],n=i==null?void 0:i[r];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function fv(t,e,i){let r=i(e,t);if(typeof r=="symbol")return r;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=fv(Object.freeze(t.concat([[n,o]])),s.items[o],i);if(typeof a=="number")o=a-1;else{if(a===Cu)return Cu;a===uv&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&n==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}hv.visit=tr});var Vo=_(gt=>{"use strict";var Tu=av(),KC=cv(),zC=pv(),Au="\uFEFF",Iu="",Nu="",Lu="",JC=t=>!!t&&"items"in t,ZC=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function QC(t){switch(t){case Au:return"<BOM>";case Iu:return"<DOC>";case Nu:return"<FLOW_END>";case Lu:return"<SCALAR>";default:return JSON.stringify(t)}}function XC(t){switch(t){case Au:return"byte-order-mark";case Iu:return"doc-mode";case Nu:return"flow-error-end";case Lu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|||
|
`:case`\r
|
|||
|
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}gt.createScalarToken=Tu.createScalarToken;gt.resolveAsScalar=Tu.resolveAsScalar;gt.setScalarValue=Tu.setScalarValue;gt.stringify=KC.stringify;gt.visit=zC.visit;gt.BOM=Au;gt.DOCUMENT=Iu;gt.FLOW_END=Nu;gt.SCALAR=Lu;gt.isCollection=JC;gt.isScalar=ZC;gt.prettyToken=QC;gt.tokenType=XC});var Pu=_(mv=>{"use strict";var Dn=Vo();function jt(t){switch(t){case void 0:case" ":case`
|
|||
|
`:case"\r":case" ":return!0;default:return!1}}var dv=new Set("0123456789ABCDEFabcdef"),eT=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ho=new Set(",[]{}"),tT=new Set(` ,[]{}
|
|||
|
\r `),Bu=t=>!t||tT.has(t),Ru=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,i=!1){var n;if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!i;let r=(n=this.next)!=null?n:"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i===" ";)i=this.buffer[++e];return!i||i==="#"||i===`
|
|||
|
`?!0:i==="\r"?this.buffer[e+1]===`
|
|||
|
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let r=0;for(;i===" ";)i=this.buffer[++r+e];if(i==="\r"){let n=this.buffer[r+e+1];if(n===`
|
|||
|
`||!n&&!this.atEnd)return e+r+1}return i===`
|
|||
|
`||r>=this.indentNext||!i&&!this.atEnd?e+r:-1}if(i==="-"||i==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&jt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|||
|
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Dn.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,r=e.indexOf("#");for(;r!==-1;){let s=e[r-1];if(s===" "||s===" "){i=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let s=e[i-1];if(s===" "||s===" ")i-=1;else break}let n=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let i=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-i),yield*this.pushNewline(),"stream"}return yield Dn.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let i=this.peek(3);if((i==="---"||i==="...")&&jt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!jt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&jt(i)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(e[i]){case"#":yield*this.pushCount(e.length-i);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Bu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,i,r=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&jt(n[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Dn.FLOW_END,yield*this.parseLineStart();let s=0;for(;n[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),n[s]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Bu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||jt(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*th
|
|||
|
`,this.pos);if(n!==-1){for(;n!==-1;){let s=this.continueScalar(n+1);if(s===-1)break;n=r.indexOf(`
|
|||
|
`,s)}n!==-1&&(i=n-(r[n-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let i=this.buffer[++e];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>jt(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":i+=1;break;case`
|
|||
|
`:e=s,i=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|||
|
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
|
|||
|
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(r=this.buffer[n];r===" ";)r=this.buffer[++n];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|||
|
`;)r=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
|
|||
|
`&&s>=this.pos&&s+1+i>a)e=s;else break}while(!0);return yield Dn.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,i=this.pos-1,r=this.pos-1,n;for(;n=this.buffer[++r];)if(n===":"){let s=this.buffer[r+1];if(jt(s)||e&&Ho.has(s))break;i=r}else if(jt(n)){let s=this.buffer[r+1];if(n==="\r"&&(s===`
|
|||
|
`?(r+=1,n=`
|
|||
|
`,s=this.buffer[r+1]):i=r),s==="#"||e&&Ho.has(s))break;if(n===`
|
|||
|
`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&Ho.has(n))break;i=r}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Dn.SCALAR,yield*this.pushToIndex(i+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,i){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Bu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,i=this.charAt(1);if(jt(i)||e&&Ho.has(i))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,i=this.buffer[e];for(;!jt(i)&&i!==">";)i=this.buffer[++e];return yield*this.pushToIndex(i===">"?e+1:e,!1)}else{let e=this.pos+1,i=this.buffer[e];for(;i;)if(eT.has(i))i=this.buffer[++e];else if(i==="%"&&dv.has(this.buffer[e+1])&&dv.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|||
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|||
|
`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||e&&r===" ");let n=i-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=i),n}*pushUntil(e){let i=this.pos,r=this.buffer[i];for(;!e(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}};mv.Lexer=Ru});var Fu=_(gv=>{"use strict";var Mu=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,r=this.lineStarts.length;for(;i<r;){let s=i+r>>1;this.lineStarts[s]<e?i=s+1:r=s}if(this.lineStarts[i]===e)return{line:i+1,col:1};if(i===0)return{line:0,col:e};let n=this.lineStarts[i-1];return{line:i,col:e-n+1}}}};gv.LineCounter=Mu});var Du=_(wv=>{"use strict";var vv=Vo(),iT=Pu();function ir(t,e){for(let i=0;i<t.length;++i)if(t[i].type===e)return!0;return!1}function yv(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function _v(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Go(t){var e;switch(t.type){case"document":return t.start;case"block-map":{let i=t.items[t.items.length-1];return(e=i.sep)!=null?e:i.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function Vr(t){var i;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=t[++e])==null?void 0:i.type)==="space";);return t.splice(e,t.length)}function bv(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!ir(e.start,"explicit-key-ind")&&!ir(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,_v(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var qu=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new iT.Lexer,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,i))yield*this.next(r);i||(yield*this.end())}*next(e){if(this.source=e,process.env.LOG_TOKENS&&console.log("|",vv.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let i=vv.tokenType(e);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let i=e!=null?e:this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else
|
|||
|
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|||
|
`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;let i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){let n="end"in i.value?i.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,i.start),s.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,s=n&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&i.sep&&!i.value){let a=[];for(let l=0;l<i.sep.length;++l){let c=i.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=i.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||i.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):s||i.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(i.explicitKey)if(i.sep)if(i.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ir(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(_v(i.key)&&!ir(i.sep,"newline")){let a=Vr(i.start),l=i.key,c=i.sep;c.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else o.length>0?i.sep=i.sep.concat(o,this.sourceToken):i.sep.push(this.sourceToken);else if(ir(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{let a=Vr(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):ir(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);s||i.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(a):(Object.assign(i,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){n&&a.type!=="block-seq"&&e.items.push({start:o}),this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;let i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){let n="end"in i.value?i.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,i.start),s.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=e.indent)break;i.start.push(this.sourc
|
|||
|
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|||
|
`,i)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let i=Go(e),r=Vr(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let i=Go(e),r=Vr(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};wv.Parser=qu});var Ov=_(Un=>{"use strict";var xv=ku(),rT=Ln(),jn=Pn(),nT=Sc(),sT=Se(),oT=Fu(),Sv=Du();function Ev(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new oT.LineCounter||null,prettyErrors:e}}function aT(t,e={}){let{lineCounter:i,prettyErrors:r}=Ev(e),n=new Sv.Parser(i==null?void 0:i.addNewLine),s=new xv.Composer(e),o=Array.from(s.compose(n.parse(t)));if(r&&i)for(let a of o)a.errors.forEach(jn.prettifyError(t,i)),a.warnings.forEach(jn.prettifyError(t,i));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function kv(t,e={}){let{lineCounter:i,prettyErrors:r}=Ev(e),n=new Sv.Parser(i==null?void 0:i.addNewLine),s=new xv.Composer(e),o=null;for(let a of s.compose(n.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new jn.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&i&&(o.errors.forEach(jn.prettifyError(t,i)),o.warnings.forEach(jn.prettifyError(t,i))),o}function lT(t,e,i){let r;typeof e=="function"?r=e:i===void 0&&e&&typeof e=="object"&&(i=e);let n=kv(t,i);if(!n)return null;if(n.warnings.forEach(s=>nT.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:r},i))}function cT(t,e,i){var n;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){let s=Math.round(i);i=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){let{keepUndefined:s}=(n=i!=null?i:e)!=null?n:{};if(!s)return}return sT.isDocument(t)&&!r?t.toString(i):new rT.Document(t,r,i).toString(i)}Un.parse=lT;Un.parseAllDocuments=aT;Un.parseDocument=kv;Un.stringify=cT});var Tv=_(Oe=>{"use strict";var uT=ku(),fT=Ln(),hT=su(),ju=Pn(),pT=gn(),ki=Se(),dT=wi(),mT=De(),gT=Si(),vT=Ei(),yT=Vo(),bT=Pu(),_T=Fu(),wT=Du(),Yo=Ov(),Cv=hn();Oe.Composer=uT.Composer;Oe.Document=fT.Document;Oe.Schema=hT.Schema;Oe.YAMLError=ju.YAMLError;Oe.YAMLParseError=ju.YAMLParseError;Oe.YAMLWarning=ju.YAMLWarning;Oe.Alias=pT.Alias;Oe.isAlias=ki.isAlias;Oe.isCollection=ki.isCollection;Oe.isDocument=ki.isDocument;Oe.isMap=ki.isMap;Oe.isNode=ki.isNode;Oe.isPair=ki.isPair;Oe.isScalar=ki.isScalar;Oe.isSeq=ki.isSeq;Oe.Pair=dT.Pair;Oe.Scalar=mT.Scalar;Oe.YAMLMap=gT.YAMLMap;Oe.YAMLSeq=vT.YAMLSeq;Oe.CST=yT;Oe.Lexer=bT.Lexer;Oe.LineCounter=_T.LineCounter;Oe.Parser=wT.Parser;Oe.parse=Yo.parse;Oe.parseAllDocuments=Y
|
|||
|
`).join(`\r
|
|||
|
`)),s.removeListener("error",Oy),u.setSocket(s,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Jn,this)})),a(u,n)}};Ty.exports=lf;function IA(t,e){for(let i of Object.keys(e))t.on(i,e[i]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function Jn(t){t._state=Cy,t.emit("close")}function Oy(){this.destroy()}function Zn(t,e,i,r){i=i||sa.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(i),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${sa.STATUS_CODES[e]}\r
|
|||
|
`+Object.keys(r).map(n=>`${n}: ${r[n]}`).join(`\r
|
|||
|
`)+`\r
|
|||
|
\r
|
|||
|
`+i)}function or(t,e,i,r,n){if(t.listenerCount("wsClientError")){let s=new Error(n);Error.captureStackTrace(s,or),t.emit("wsClientError",s,i,e)}else Zn(i,r,n)}});var By=_((AL,Ly)=>{var Ai=require("constants"),LA=process.cwd,oa=null,BA=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return oa||(oa=LA.call(process)),oa};try{process.cwd()}catch{}typeof process.chdir=="function"&&(hf=process.chdir,process.chdir=function(t){oa=null,hf.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,hf));var hf;Ly.exports=RA;function RA(t){Ai.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||i(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=r(t.chmod),t.fchmod=r(t.fchmod),t.lchmod=r(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=n(t.chmodSync),t.fchmodSync=n(t.fchmodSync),t.lchmodSync=n(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(u,f,d){d&&process.nextTick(d)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(u,f,d,g){g&&process.nextTick(g)},t.lchownSync=function(){}),BA==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function f(d,g,m){var y=Date.now(),b=0;u(d,g,function x(E){if(E&&(E.code==="EACCES"||E.code==="EPERM")&&Date.now()-y<6e4){setTimeout(function(){t.stat(g,function(O,k){O&&O.code==="ENOENT"?u(d,g,x):m(E)})},b),b<100&&(b+=10);return}m&&m(E)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f}(t.rename)),t.read=typeof t.read!="function"?t.read:function(u){function f(d,g,m,y,b,x){var E;if(x&&typeof x=="function"){var O=0;E=function(k,S,R){if(k&&k.code==="EAGAIN"&&O<10)return O++,u.call(t,d,g,m,y,b,E);x.apply(this,arguments)}}return u.call(t,d,g,m,y,b,E)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(u){return function(f,d,g,m,y){for(var b=0;;)try{return u.call(t,f,d,g,m,y)}catch(x){if(x.code==="EAGAIN"&&b<10){b++;continue}throw x}}}(t.readSync);function e(u){u.lchmod=function(f,d,g){u.open(f,Ai.O_WRONLY|Ai.O_SYMLINK,d,function(m,y){if(m){g&&g(m);return}u.fchmod(y,d,function(b){u.close(y,function(x){g&&g(b||x)})})})},u.lchmodSync=function(f,d){var g=u.openSync(f,Ai.O_WRONLY|Ai.O_SYMLINK,d),m=!0,y;try{y=u.fchmodSync(g,d),m=!1}finally{if(m)try{u.closeSync(g)}catch{}else u.closeSync(g)}return y}}function i(u){Ai.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(f,d,g,m){u.open(f,Ai.O_SYMLINK,function(y,b){if(y){m&&m(y);return}u.futimes(b,d,g,function(x){u.close(b,function(E){m&&m(x||E)})})})},u.lutimesSync=function(f,d,g){var m=u.openSync(f,Ai.O_SYMLINK),y,b=!0;try{y=u.futimesSync(m,d,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return y}):u.futimes&&(u.lutimes=function(f,d,g,m){m&&process.nextTick(m)},u.lutimesSync=function(){})}function r(u){return u&&function(f,d,g){return u.call(t,f,d,function(m){c(m)&&(m=null),g&&g.apply(this,arguments)})}}function n(u){return u&&function(f,d){try{return u.call(t,f,d)}catch(g){if(!c(g))throw g}}}function s(u){return u&&function(f,d,g,m){return u.call(t,f,d,g,function(y){c(y)&&(y=null),m&&m.apply(this,arguments)})}}function o(u){return u&&function(f,d,g){try{return u.call(t,f,d,g)}catch(m){if(!c(m))throw m}}}function a(u){return u&&function(f,d,g){typeof d=="function"&&(g=d,d=null);function m(y,b){b&&(b.uid<0&&(b.uid+=4294967296),b.gid<0&&(b.gid+=4294967296)),g&&g.apply(this,arguments)}return d?u.call(t,f,d,m):u.call(t,f,m)}}function l(u){return u&&function(f,d){var g=d?u.call(t,f,d):u.call(t,f);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function c(u){if(!u||u.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var My=_((IL,Py)=>{var Ry=require("stream").Stream;Py.exports=PA;function PA(t){return{ReadStream:e,WriteStream:i};
|
|||
|
GFS4: `),console.error(t)});Me[tt]||(Dy=global[tt]||[],Uy(Me,Dy),Me.close=function(t){function e(i,r){return t.call(Me,i,function(n){n||jy(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(e,ca,{value:t}),e}(Me.close),Me.closeSync=function(t){function e(i){t.apply(Me,arguments),jy()}return Object.defineProperty(e,ca,{value:t}),e}(Me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){ar(Me[tt]),require("assert").equal(Me[tt].length,0)}));var Dy;global[tt]||Uy(global,Me[tt]);mf.exports=pf(jA(Me));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Me.__patched&&(mf.exports=pf(Me),Me.__patched=!0);function pf(t){qA(t),t.gracefulify=pf,t.createReadStream=S,t.createWriteStream=R;var e=t.readFile;t.readFile=i;function i(C,L,P){return typeof L=="function"&&(P=L,L=null),U(C,L,P);function U(q,H,j,V){return e(q,H,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Kr([U,[q,H,j],W,V||Date.now(),Date.now()]):typeof j=="function"&&j.apply(this,arguments)})}}var r=t.writeFile;t.writeFile=n;function n(C,L,P,U){return typeof P=="function"&&(U=P,P=null),q(C,L,P,U);function q(H,j,V,W,Q){return r(H,j,V,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(C,L,P,U){return typeof P=="function"&&(U=P,P=null),q(C,L,P,U);function q(H,j,V,W,Q){return s(H,j,V,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=l);function l(C,L,P,U){return typeof P=="function"&&(U=P,P=0),q(C,L,P,U);function q(H,j,V,W,Q){return a(H,j,V,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var c=t.readdir;t.readdir=f;var u=/^v[0-5]\./;function f(C,L,P){typeof L=="function"&&(P=L,L=null);var U=u.test(process.version)?function(j,V,W,Q){return c(j,q(j,V,W,Q))}:function(j,V,W,Q){return c(j,V,q(j,V,W,Q))};return U(C,L,P);function q(H,j,V,W){return function(Q,Y){Q&&(Q.code==="EMFILE"||Q.code==="ENFILE")?Kr([U,[H,j,V],Q,W||Date.now(),Date.now()]):(Y&&Y.sort&&Y.sort(),typeof V=="function"&&V.call(this,Q,Y))}}}if(process.version.substr(0,4)==="v0.8"){var d=DA(t);x=d.ReadStream,O=d.WriteStream}var g=t.ReadStream;g&&(x.prototype=Object.create(g.prototype),x.prototype.open=E);var m=t.WriteStream;m&&(O.prototype=Object.create(m.prototype),O.prototype.open=k),Object.defineProperty(t,"ReadStream",{get:function(){return x},set:function(C){x=C},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return O},set:function(C){O=C},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(t,"FileReadStream",{get:function(){return y},set:function(C){y=C},enumerable:!0,configurable:!0});var b=O;Object.defineProperty(t,"FileWriteStream",{get:function(){return b},set:function(C){b=C},enumerable:!0,configurable:!0});function x(C,L){return this instanceof x?(g.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function E(){var C=this;A(C.path,C.flags,C.mode,function(L,P){L?(C.autoClose&&C.destroy(),C.emit("error",L)):(C.fd=P,C.emit("open",P),C.read())})}function O(C,L){return this instanceof O?(m.apply(this,arguments),this):O.apply(Object.create(O.prototype),arguments)}function k(){var C=this;A(C.path,C.flags,C.mode,function(L,P){L?(C.destroy(),C.emit("error",L)):(C.fd=P,C.emit("open",P))})}function S(C,L){return new t.ReadStream(C,L)}function R(C,L){return new t.WriteStream(C,L)}var T=t.open;t.open=A;function A(C,L,P,U){return typeof P=="function"&&(U=P,P=null),q(C,L,P,U);function q(H,j,V,W,Q){return T(H,j,V,function(Y,de){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}return t}function Kr(t){ar("ENQUEUE",t[0].name,t[1]),Me[tt].push(t),df()}var la;function jy(){for(var t=Date.now(),e=0;e<Me[tt].length;++e)Me[tt][e].length>2&&(Me
|
|||
|
`)&&!t.startsWith(`
|
|||
|
`)&&!t.match(/[^\r]\n/)}function A_(t){return!t.includes(`\r
|
|||
|
`)&&t.includes(`
|
|||
|
`)}var xs="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",I_=new RegExp("[".concat(xs,"]+|\\s+|[^").concat(xs,"]"),"ug"),en=new Ct;en.equals=function(t,e,i){return i.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t.trim()===e.trim()};en.tokenize=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i;if(e.intlSegmenter){if(e.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=Array.from(e.intlSegmenter.segment(t),function(s){return s.segment})}else i=t.match(I_)||[];var r=[],n=null;return i.forEach(function(s){/\s/.test(s)?n==null?r.push(s):r.push(r.pop()+s):/\s/.test(n)?r[r.length-1]==n?r.push(r.pop()+s):r.push(n+s):r.push(s),n=s}),r};en.join=function(t){return t.map(function(e,i){return i==0?e:e.replace(/^\s+/,"")}).join("")};en.postProcess=function(t,e){if(!t||e.oneChangePerToken)return t;var i=null,r=null,n=null;return t.forEach(function(s){s.added?r=s:s.removed?n=s:((r||n)&&dh(i,n,r,s),i=s,r=null,n=null)}),(r||n)&&dh(i,n,r,null),t};function N_(t,e,i){return(i==null?void 0:i.ignoreWhitespace)!=null&&!i.ignoreWhitespace?Oh(t,e,i):en.diff(t,e,i)}function dh(t,e,i,r){if(e&&i){var n=e.value.match(/^\s*/)[0],s=e.value.match(/\s*$/)[0],o=i.value.match(/^\s*/)[0],a=i.value.match(/\s*$/)[0];if(t){var l=fh(n,o);t.value=Oa(t.value,o,l),e.value=Xr(e.value,l),i.value=Xr(i.value,l)}if(r){var c=hh(s,a);r.value=ka(r.value,a,c),e.value=_s(e.value,c),i.value=_s(i.value,c)}}else if(i)t&&(i.value=i.value.replace(/^\s*/,"")),r&&(r.value=r.value.replace(/^\s*/,""));else if(t&&r){var u=r.value.match(/^\s*/)[0],f=e.value.match(/^\s*/)[0],d=e.value.match(/\s*$/)[0],g=fh(u,f);e.value=Xr(e.value,g);var m=hh(Xr(u,g),d);e.value=_s(e.value,m),r.value=ka(r.value,u,m),t.value=Oa(t.value,u,u.slice(0,u.length-m.length))}else if(r){var y=r.value.match(/^\s*/)[0],b=e.value.match(/\s*$/)[0],x=ph(b,y);e.value=_s(e.value,x)}else if(t){var E=t.value.match(/\s*$/)[0],O=e.value.match(/^\s*/)[0],k=ph(E,O);e.value=Xr(e.value,k)}}var kh=new Ct;kh.tokenize=function(t){var e=new RegExp("(\\r?\\n)|[".concat(xs,"]+|[^\\S\\n\\r]+|[^").concat(xs,"]"),"ug");return t.match(e)||[]};function Oh(t,e,i){return kh.diff(t,e,i)}function L_(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}var tn=new Ct;tn.tokenize=function(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,`
|
|||
|
`));var i=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var s=r[n];n%2&&!e.newlineIsToken?i[i.length-1]+=s:i.push(s)}return i};tn.equals=function(t,e,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
|
|||
|
`))&&(t=t.trim()),(!i.newlineIsToken||!e.includes(`
|
|||
|
`))&&(e=e.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
|
|||
|
`)&&(t=t.slice(0,-1)),e.endsWith(`
|
|||
|
`)&&(e=e.slice(0,-1))),Ct.prototype.equals.call(this,t,e,i)};function Ca(t,e,i){return tn.diff(t,e,i)}function B_(t,e,i){var r=L_(i,{ignoreWhitespace:!0});return tn.diff(t,e,r)}var Ch=new Ct;Ch.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};function R_(t,e,i){return Ch.diff(t,e,i)}var Th=new Ct;Th.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function P_(t,e,i){return Th.diff(t,e,i)}function mh(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,r)}return i}function pt(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?mh(Object(i),!0).forEach(function(r){q_(t,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):mh(Object(i)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))})}return t}function M_(t,e){if(typeof t!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var r=i.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function F_(t){var e=M_(t,"string");return typeof e=="symbol"?e:e+""}function Ta(t){"@babel/helpers - typeof";return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ta(t)}function q_(t,e,i){return e=F_(e),e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ti(t){return D_(t)||j_(t)||U_(t)||$_()}function D_(t){if(Array.isArray(t))return Aa(t)}function j_(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function U_(t,e){if(t){if(typeof t=="string")return Aa(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Aa(t,e)}}function Aa(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}function $_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var br=new Ct;br.useLongestToken=!0;br.tokenize=tn.tokenize;br.castInput=function(t,e){var i=e.undefinedReplacement,r=e.stringifyReplacer,n=r===void 0?function(s,o){return typeof o=="undefined"?i:o}:r;return typeof t=="string"?t:JSON.stringify(Ss(t,null,null,n),n," ")};br.equals=function(t,e,i){return Ct.prototype.equals.call(br,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"),i)};function V_(t,e,i){return br.diff(t,e,i)}function Ss(t,e,i,r,n){e=e||[],i=i||[],r&&(t=r(n,t));var s;for(s=0;s<e.length;s+=1)if(e[s]===t)return i[s];var o;if(Object.prototype.toString.call(t)==="[object Array]"){for(e.push(t),o=new Array(t.length),i.push(o),s=0;s<t.length;s+=1)o[s]=Ss(t[s],e,i,r,n);return e.pop(),i.pop(),o}if(t&&t.toJSON&&(t=t.toJSON()),Ta(t)==="object"&&t!==null){e.push(t),o={},i.push(o);var a=[],l;for(l in t)Object.prototype.hasOwnProperty.call(t,l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],o[l]=Ss(t[l],e,i,r,l);e.pop(),i.pop()}else o=t;return o}var Es=new Ct;Es.tokenize=function(t){return t.slice()};Es.join=Es.removeEmpty=function(t){return t};function H_(t,e,i){return Es.diff(t,e,i)}function Ah(t){return Array.isArray(t)?t.map(Ah):pt(pt({},t),{},{hunks:t.hunks.map(function(e){return pt(pt({},e),{},{lines:e.lines.map(function(i,r){var n;return i.startsWith("\\")||i.endsWith("\r")||(n=e.lines[r+1])!==null&&n!==void 0&&n.startsWith("\\")?i:i+"\r"})})})})}function Ih(t){return Array.isArray(t)?t.map(Ih):pt(pt({},t),{},{hunks:t.hunks.map(function(e){return pt(pt({},e),{},{lines:e.lines.map(function(i){return i.endsWith("\r")?i.substring(0,i.length-1):i})})})})}function G_(t){return Array.isArray(t)||(t=[t]),!t.some(function(e){return e.hunks.some(function(i){return i.lines.some(function(r){return!r.startsWith("\\")&&r.endsWith("\r")})})})}function Y_(t){return Array.isArray(t)||(t=[t]),t.some(function(e){return e.hunks.some(function(i){return i.lines.some(function(r){return r.endsWith("\r")})})})&&t.every(function(e){return e.hunks.every(function(i){return i.lines.every(function(r,n){var s;return r.startsWith("\\")||r.endsWith("\r")||((s=i.lines[n+1])===null||s===void 0?void 0:s.startsWith("\\"))})})})}function Cs(t){var e=t.split(/\n/),i=[],r=0;function n(){var a={};for(i.push(a);r<e.length;){var l=e[r];if(/^(\-\-\-|\+\+\+|@@)\s/.test(l))break;var c=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(l);c&&(a.index=c[1]),r++}for(s(a),s(a),a.hunks=[];r<e.length;){var u=e[r];if(/^(Index:\s|diff\s|\-\-\-\s|\+\+\+\s|===================================================================)/.test(u))break;if(/^@@/.test(u))a.hunks.push(o());else{if(u)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(u));r++}}}function s(a){var l=/^(---|\+\+\+)\s+(.*)\r?$/.exec(e[r]);if(l){var c=l[1]==="---"?"old":"new",u=l[2].split(" ",2),f=u[0].replace(/\\\\/g,"\\");/^".*"$/.test(f)&&(f=f.substr(1,f.length-2)),a[c+"FileName"]=f,a[c+"Header"]=(u[1]||"").trim(),r++}}function o(){var a=r,l=e[r++],c=l.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),u={oldStart:+c[1],oldLines:typeof c[2]=="undefined"?1:+c[2],newStart:+c[3],newLines:typeof c[4]=="undefined"?1:+c[4],lines:[]};u.oldLines===0&&(u.oldStart+=1),u.newLines===0&&(u.newStart+=1);for(var f=0,d=0;r<e.length&&(d<u.oldLines||f<u.newLines||(g=e[r])!==null&&g!==void 0&&g.startsWith("\\"));r++){var g,m=e[r].length==0&&r!=e.length-1?" ":e[r][0];if(m==="+"||m==="-"||m===" "||m==="\\")u.lines.push(e[r]),m==="+"?f++:m==="-"?d++:m===" "&&(f++,d++);else throw new Error("Hunk at line ".concat(a+1," contained invalid line ").concat(e[r]))}if(!f&&u.newLines===1&&(u.newLines=0),!d&&u.oldLines===1&&(u.oldLines=0),f!==u.newLines)throw new Error("Added line count did not match for hunk at line "+(a+1));if(d!==u.oldLines)throw new Error("Removed line count did not match for hunk at line "+(a+1));return u}for(;r<e.length;)n();return i}function W_(t,e,i){var r=!0,n=!1,s=!1,o=1;return function a(){if(r&&!s){if(n?o++:r=!1,t+o<=i)return t+o;s=!0}if(!n)return s||(r=!0),e<=t-o?t-o++:(n=!0,a())}}function Nh(t,e){var i=arg
|
|||
|
`),n=e.hunks,s=i.compareLine||function(P,U,q,H){return U===H},o=i.fuzzFactor||0,a=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!n.length)return t;for(var l="",c=!1,u=!1,f=0;f<n[n.length-1].lines.length;f++){var d=n[n.length-1].lines[f];d[0]=="\\"&&(l[0]=="+"?c=!0:l[0]=="-"&&(u=!0)),l=d}if(c){if(u){if(!o&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!o)return!1}else if(u){if(r[r.length-1]!="")r.push("");else if(!o)return!1}function g(P,U,q){for(var H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,V=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],W=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,Q=0,Y=!1;H<P.length;H++){var de=P[H],ae=de.length>0?de[0]:" ",ne=de.length>0?de.substr(1):de;if(ae==="-")if(s(U+1,r[U],ae,ne))U++,Q=0;else return!q||r[U]==null?null:(V[W]=r[U],g(P,U+1,q-1,H,!1,V,W+1));if(ae==="+"){if(!j)return null;V[W]=ne,W++,Q=0,Y=!0}if(ae===" ")if(Q++,V[W]=r[U],s(U+1,r[U],ae,ne))W++,j=!0,Y=!1,U++;else return Y||!q?null:r[U]&&(g(P,U+1,q-1,H+1,!1,V,W+1)||g(P,U+1,q-1,H,!1,V,W+1))||g(P,U,q-1,H+1,!1,V,W)}return W-=Q,U-=Q,V.length=W,{patchedLines:V,oldLineLastI:U-1}}for(var m=[],y=0,b=0;b<n.length;b++){for(var x=n[b],E=void 0,O=r.length-x.oldLines+o,k=void 0,S=0;S<=o;S++){k=x.oldStart+y-1;for(var R=W_(k,a,O);k!==void 0&&(E=g(x.lines,k,S),!E);k=R());if(E)break}if(!E)return!1;for(var T=a;T<k;T++)m.push(r[T]);for(var A=0;A<E.patchedLines.length;A++){var C=E.patchedLines[A];m.push(C)}a=E.oldLineLastI+1,y=k+1-x.oldStart}for(var L=a;L<r.length;L++)m.push(r[L]);return m.join(`
|
|||
|
`)}function K_(t,e){typeof t=="string"&&(t=Cs(t));var i=0;function r(){var n=t[i++];if(!n)return e.complete();e.loadFile(n,function(s,o){if(s)return e.complete(s);var a=Nh(o,n,e);e.patched(n,a,function(l){if(l)return e.complete(l);r()})})}r()}function ks(t,e,i,r,n,s,o){if(o||(o={}),typeof o=="function"&&(o={callback:o}),typeof o.context=="undefined"&&(o.context=4),o.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(o.callback){var a=o,l=a.callback;Ca(i,r,pt(pt({},o),{},{callback:function(f){var d=c(f);l(d)}}))}else return c(Ca(i,r,o));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(A){return A.map(function(C){return" "+C})}for(var d=[],g=0,m=0,y=[],b=1,x=1,E=function(){var C=u[O],L=C.lines||J_(C.value);if(C.lines=L,C.added||C.removed){var P;if(!g){var U=u[O-1];g=b,m=x,U&&(y=o.context>0?f(U.lines.slice(-o.context)):[],g-=y.length,m-=y.length)}(P=y).push.apply(P,ti(L.map(function(W){return(C.added?"+":"-")+W}))),C.added?x+=L.length:b+=L.length}else{if(g)if(L.length<=o.context*2&&O<u.length-2){var q;(q=y).push.apply(q,ti(f(L)))}else{var H,j=Math.min(L.length,o.context);(H=y).push.apply(H,ti(f(L.slice(0,j))));var V={oldStart:g,oldLines:b-g+j,newStart:m,newLines:x-m+j,lines:y};d.push(V),g=0,m=0,y=[]}b+=L.length,x+=L.length}},O=0;O<u.length;O++)E();for(var k=0,S=d;k<S.length;k++)for(var R=S[k],T=0;T<R.lines.length;T++)R.lines[T].endsWith(`
|
|||
|
`)?R.lines[T]=R.lines[T].slice(0,-1):(R.lines.splice(T+1,0,"\\ No newline at end of file"),T++);return{oldFileName:t,newFileName:e,oldHeader:n,newHeader:s,hunks:d}}}function Os(t){if(Array.isArray(t))return t.map(Os).join(`
|
|||
|
`);var e=[];t.oldFileName==t.newFileName&&e.push("Index: "+t.oldFileName),e.push("==================================================================="),e.push("--- "+t.oldFileName+(typeof t.oldHeader=="undefined"?"":" "+t.oldHeader)),e.push("+++ "+t.newFileName+(typeof t.newHeader=="undefined"?"":" "+t.newHeader));for(var i=0;i<t.hunks.length;i++){var r=t.hunks[i];r.oldLines===0&&(r.oldStart-=1),r.newLines===0&&(r.newStart-=1),e.push("@@ -"+r.oldStart+","+r.oldLines+" +"+r.newStart+","+r.newLines+" @@"),e.push.apply(e,r.lines)}return e.join(`
|
|||
|
`)+`
|
|||
|
`}function Lh(t,e,i,r,n,s,o){var a;if(typeof o=="function"&&(o={callback:o}),(a=o)!==null&&a!==void 0&&a.callback){var c=o,u=c.callback;ks(t,e,i,r,n,s,pt(pt({},o),{},{callback:function(d){d?u(Os(d)):u()}}))}else{var l=ks(t,e,i,r,n,s,o);return l?Os(l):void 0}}function z_(t,e,i,r,n,s){return Lh(t,t,e,i,r,n,s)}function J_(t){var e=t.endsWith(`
|
|||
|
`),i=t.split(`
|
|||
|
`).map(function(r){return r+`
|
|||
|
`});return e?i.pop():i.push(i.pop().slice(0,-1)),i}function Z_(t,e){return t.length!==e.length?!1:Ia(t,e)}function Ia(t,e){if(e.length>t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function Q_(t){var e=Na(t.lines),i=e.oldLines,r=e.newLines;i!==void 0?t.oldLines=i:delete t.oldLines,r!==void 0?t.newLines=r:delete t.newLines}function X_(t,e,i){t=gh(t,i),e=gh(e,i);var r={};(t.index||e.index)&&(r.index=t.index||e.index),(t.newFileName||e.newFileName)&&(vh(t)?vh(e)?(r.oldFileName=ws(r,t.oldFileName,e.oldFileName),r.newFileName=ws(r,t.newFileName,e.newFileName),r.oldHeader=ws(r,t.oldHeader,e.oldHeader),r.newHeader=ws(r,t.newHeader,e.newHeader)):(r.oldFileName=t.oldFileName,r.newFileName=t.newFileName,r.oldHeader=t.oldHeader,r.newHeader=t.newHeader):(r.oldFileName=e.oldFileName||t.oldFileName,r.newFileName=e.newFileName||t.newFileName,r.oldHeader=e.oldHeader||t.oldHeader,r.newHeader=e.newHeader||t.newHeader)),r.hunks=[];for(var n=0,s=0,o=0,a=0;n<t.hunks.length||s<e.hunks.length;){var l=t.hunks[n]||{oldStart:1/0},c=e.hunks[s]||{oldStart:1/0};if(yh(l,c))r.hunks.push(bh(l,o)),n++,a+=l.newLines-l.oldLines;else if(yh(c,l))r.hunks.push(bh(c,a)),s++,o+=c.newLines-c.oldLines;else{var u={oldStart:Math.min(l.oldStart,c.oldStart),oldLines:0,newStart:Math.min(l.newStart+o,c.oldStart+a),newLines:0,lines:[]};ew(u,l.oldStart,l.lines,c.oldStart,c.lines),s++,n++,r.hunks.push(u)}}return r}function gh(t,e){if(typeof t=="string"){if(/^@@/m.test(t)||/^Index:/m.test(t))return Cs(t)[0];if(!e)throw new Error("Must provide a base reference or pass in a patch");return ks(void 0,void 0,e,t)}return t}function vh(t){return t.newFileName&&t.newFileName!==t.oldFileName}function ws(t,e,i){return e===i?e:(t.conflict=!0,{mine:e,theirs:i})}function yh(t,e){return t.oldStart<e.oldStart&&t.oldStart+t.oldLines<e.oldStart}function bh(t,e){return{oldStart:t.oldStart,oldLines:t.oldLines,newStart:t.newStart+e,newLines:t.newLines,lines:t.lines}}function ew(t,e,i,r,n){var s={offset:e,lines:i,index:0},o={offset:r,lines:n,index:0};for(wh(t,s,o),wh(t,o,s);s.index<s.lines.length&&o.index<o.lines.length;){var a=s.lines[s.index],l=o.lines[o.index];if((a[0]==="-"||a[0]==="+")&&(l[0]==="-"||l[0]==="+"))tw(t,s,o);else if(a[0]==="+"&&l[0]===" "){var c;(c=t.lines).push.apply(c,ti(Ui(s)))}else if(l[0]==="+"&&a[0]===" "){var u;(u=t.lines).push.apply(u,ti(Ui(o)))}else a[0]==="-"&&l[0]===" "?_h(t,s,o):l[0]==="-"&&a[0]===" "?_h(t,o,s,!0):a===l?(t.lines.push(a),s.index++,o.index++):La(t,Ui(s),Ui(o))}xh(t,s),xh(t,o),Q_(t)}function tw(t,e,i){var r=Ui(e),n=Ui(i);if(Sh(r)&&Sh(n)){if(Ia(r,n)&&Eh(i,r,r.length-n.length)){var s;(s=t.lines).push.apply(s,ti(r));return}else if(Ia(n,r)&&Eh(e,n,n.length-r.length)){var o;(o=t.lines).push.apply(o,ti(n));return}}else if(Z_(r,n)){var a;(a=t.lines).push.apply(a,ti(r));return}La(t,r,n)}function _h(t,e,i,r){var n=Ui(e),s=iw(i,n);if(s.merged){var o;(o=t.lines).push.apply(o,ti(s.merged))}else La(t,r?s:n,r?n:s)}function La(t,e,i){t.conflict=!0,t.lines.push({conflict:!0,mine:e,theirs:i})}function wh(t,e,i){for(;e.offset<i.offset&&e.index<e.lines.length;){var r=e.lines[e.index++];t.lines.push(r),e.offset++}}function xh(t,e){for(;e.index<e.lines.length;){var i=e.lines[e.index++];t.lines.push(i)}}function Ui(t){for(var e=[],i=t.lines[t.index][0];t.index<t.lines.length;){var r=t.lines[t.index];if(i==="-"&&r[0]==="+"&&(i="+"),i===r[0])e.push(r),t.index++;else break}return e}function iw(t,e){for(var i=[],r=[],n=0,s=!1,o=!1;n<e.length&&t.index<t.lines.length;){var a=t.lines[t.index],l=e[n];if(l[0]==="+")break;if(s=s||a[0]!==" ",r.push(l),n++,a[0]==="+")for(o=!0;a[0]==="+";)i.push(a),a=t.lines[++t.index];l.substr(1)===a.substr(1)?(i.push(a),t.index++):o=!0}if((e[n]||"")[0]==="+"&&s&&(o=!0),o)return i;for(;n<e.length;)r.push(e[n++]);return{merged:r,changes:i}}function Sh(t){return t.reduce(function(e,i){return e&&i[0]==="-"},!0)}function Eh(t,e,i){for(var r=0;r<i;r++){var n=e[e.length-i+r].substr(1);if(t.lines[t.index+r]!==" "+n)return!1}return t.index+=i,!0}function Na(t){var e=0,i=0;return t.forEach(function(r){if(typeof r!="string"){va
|
|||
|
/*! Bundled license information:
|
|||
|
|
|||
|
progress/lib/node-progress.js:
|
|||
|
(*!
|
|||
|
* node-progress
|
|||
|
* Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
|||
|
* MIT Licensed
|
|||
|
*)
|
|||
|
*/
|