@lntvow/dev 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -32,7 +32,7 @@ Expecting one of '${s.join("', '")}'`);let i=`${t}Help`;return this.on(i,n=>{let
32
32
  `){return e.split(r).reduce((s,i)=>{let n=t?i.trim():i;return n&&s.push(n),s},[])}function ei(e,t){return Wt(e,!0).map(r=>t(r))}function ti(e){return(0,Tr.exists)(e,Tr.FOLDER)}function B(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function da(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function Or(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Ue(e){return Array.isArray(e)?e:[e]}function ma(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function ga(e){return Ue(e).map(String)}function z(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function jt(e,t){let r=[];for(let s=0,i=e.length;s<i;s++)r.push(t,e[s]);return r}function Bt(e){return(Array.isArray(e)?ua.Buffer.concat(e):e).toString("utf-8")}function xa(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function Ms(e=0){return new Promise(t=>setTimeout(t,e))}function Vs(e){if(e!==!1)return e}var St,gt,Ht,Rr=g({"src/lib/utils/util.ts"(){"use strict";St="\0",gt=()=>{},Ht=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ge(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function js(e,t){let r=wr(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function Pr(e){return!!e&&Ht(e)==="[object Object]"}function _a(e){return typeof e=="function"}var qt,pe,ya,Cr,ri,va=g({"src/lib/utils/argument-filters.ts"(){"use strict";Rr(),Ut(),qt=e=>Array.isArray(e),pe=e=>typeof e=="string",ya=e=>Array.isArray(e)&&e.every(pe),Cr=e=>pe(e)||Array.isArray(e)&&e.every(pe),ri=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),Bs,Yl=g({"src/lib/utils/exit-codes.ts"(){"use strict";Bs=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(Bs||{})}}),kr,Ql=g({"src/lib/utils/git-output-streams.ts"(){"use strict";kr=class ba{constructor(t,r){this.stdOut=t,this.stdErr=r}asStrings(){return new ba(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),N,it,Xl=g({"src/lib/utils/line-parser.ts"(){"use strict";N=class{constructor(e,t){this.matches=[],this.parse=(r,s)=>(this.resetMatches(),this._regExp.every((i,n)=>this.addMatch(i,n,r(n)))?this.useMatches(s,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let s=r&&e.exec(r);return s&&this.pushMatch(t,s),!!s}pushMatch(e,t){this.matches.push(...t.slice(1))}},it=class extends N{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function wa(...e){let t=process.cwd(),r=Object.assign({baseDir:t,...Ca},...e.filter(s=>typeof s=="object"&&s));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Ca,Zl=g({"src/lib/utils/simple-git-options.ts"(){"use strict";Ca={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function si(e,t=[]){return Pr(e)?Object.keys(e).reduce((r,s)=>{let i=e[s];if(wr(i))r.push(i);else if(js(i,["boolean"]))r.push(s+"="+i);else if(Array.isArray(i))for(let n of i)js(n,["string","number"])||r.push(s+"="+n);else r.push(s);return r},t):t}function Ce(e,t=0,r=!1){let s=[];for(let i=0,n=t<0?e.length:t;i<n;i++)"string|number".includes(typeof e[i])&&s.push(String(e[i]));return si(ii(e),s),r||s.push(...Jl(e)),s}function Jl(e){let t=typeof mt(e)=="function";return Ge(mt(e,t?1:0),qt,[])}function ii(e){let t=_a(mt(e));return Ge(mt(e,t?1:0),Pr)}function X(e,t=!0){let r=ca(mt(e));return t||la(r)?r:void 0}var eh=g({"src/lib/utils/task-options.ts"(){"use strict";va(),Rr(),Ut()}});function Us(e,t){return e(t.stdOut,t.stdErr)}function Ee(e,t,r,s=!0){return Ue(r).forEach(i=>{for(let n=Wt(i,s),a=0,u=n.length;a<u;a++){let c=(f=0)=>{if(!(a+f>=u))return n[a+f]};t.some(({parse:f})=>f(c,e))}}),e}var th=g({"src/lib/utils/task-parser.ts"(){"use strict";Rr()}}),ka={};ee(ka,{ExitCodes:()=>Bs,GitOutputStreams:()=>kr,LineParser:()=>N,NOOP:()=>gt,NULL:()=>St,RemoteLineParser:()=>it,append:()=>B,appendTaskOptions:()=>si,asArray:()=>Ue,asCamelCase:()=>ma,asFunction:()=>ca,asNumber:()=>z,asStringArray:()=>ga,bufferToString:()=>Bt,callTaskParser:()=>Us,createInstanceConfig:()=>wa,delay:()=>Ms,filterArray:()=>qt,filterFunction:()=>_a,filterHasLength:()=>ri,filterPlainObject:()=>Pr,filterPrimitives:()=>js,filterString:()=>pe,filterStringArray:()=>ya,filterStringOrStringArray:()=>Cr,filterType:()=>Ge,first:()=>fa,folderExists:()=>ti,forEachLineWithContent:()=>ei,getTrailingOptions:()=>Ce,including:()=>da,isUserFunction:()=>la,last:()=>mt,objectToString:()=>Ht,orVoid:()=>Vs,parseStringResponse:()=>Ee,pick:()=>xa,prefixedArray:()=>jt,remove:()=>Or,splitOn:()=>ha,toLinesWithContent:()=>Wt,trailingFunctionArgument:()=>X,trailingOptionsArgument:()=>ii});var T=g({"src/lib/utils/index.ts"(){"use strict";va(),Yl(),Ql(),Xl(),Zl(),eh(),th(),Rr()}}),Ea={};ee(Ea,{CheckRepoActions:()=>Gs,checkIsBareRepoTask:()=>Aa,checkIsRepoRootTask:()=>Sa,checkIsRepoTask:()=>rh});function rh(e){switch(e){case"bare":return Aa();case"root":return Sa()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:Ir,parser:ni}}function Sa(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:Ir,parser(t){return/^\.(git)?$/.test(t.trim())}}}function Aa(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:Ir,parser:ni}}function sh(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var Gs,Ir,ni,Ta=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";T(),Gs=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(Gs||{}),Ir=({exitCode:e},t,r,s)=>{if(e===128&&sh(t))return r(Buffer.from("false"));s(t)},ni=e=>e.trim()==="true"}});function ih(e,t){let r=new Oa(e),s=e?Pa:Ra;return Wt(t).forEach(i=>{let n=i.replace(s,"");r.paths.push(n),(Ia.test(n)?r.folders:r.files).push(n)}),r}var Oa,Ra,Pa,Ia,nh=g({"src/lib/responses/CleanSummary.ts"(){"use strict";T(),Oa=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Ra=/^[a-z]+\s*/i,Pa=/^[a-z]+\s+[a-z]+\s*/i,Ia=/\/$/}}),Ws={};ee(Ws,{EMPTY_COMMANDS:()=>Nr,adhocExecTask:()=>Na,configurationErrorTask:()=>ke,isBufferTask:()=>Da,isEmptyTask:()=>$a,straightThroughBufferTask:()=>La,straightThroughStringTask:()=>_e});function Na(e){return{commands:Nr,format:"empty",parser:e}}function ke(e){return{commands:Nr,format:"empty",parser(){throw typeof e=="string"?new aa(e):e}}}function _e(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function La(e){return{commands:e,format:"buffer",parser(t){return t}}}function Da(e){return e.format==="buffer"}function $a(e){return e.format==="empty"||!e.commands.length}var Nr,J=g({"src/lib/tasks/task.ts"(){"use strict";oa(),Nr=[]}}),Fa={};ee(Fa,{CONFIG_ERROR_INTERACTIVE_MODE:()=>ai,CONFIG_ERROR_MODE_REQUIRED:()=>oi,CONFIG_ERROR_UNKNOWN_OPTION:()=>ui,CleanOptions:()=>_r,cleanTask:()=>Ma,cleanWithOptionsTask:()=>ah,isCleanOptionsArray:()=>oh});function ah(e,t){let{cleanMode:r,options:s,valid:i}=uh(e);return r?i.options?(s.push(...t),s.some(hh)?ke(ai):Ma(r,s)):ke(ui+JSON.stringify(e)):ke(oi)}function Ma(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(s){return ih(e==="n",s)}}}function oh(e){return Array.isArray(e)&&e.every(t=>ci.has(t))}function uh(e){let t,r=[],s={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{ch(i)?(t=i,s.cleanMode=!0):s.options=s.options&&lh(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:s}}function ch(e){return e==="f"||e==="n"}function lh(e){return/^-[a-z]$/i.test(e)&&ci.has(e.charAt(1))}function hh(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var ai,oi,ui,_r,ci,Va=g({"src/lib/tasks/clean.ts"(){"use strict";nh(),T(),J(),ai="Git clean interactive mode is not supported",oi='Git clean mode parameter ("n" or "f") is required',ui="Git clean unknown option found in: ",_r=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(_r||{}),ci=new Set(["i",...ga(Object.values(_r))])}});function fh(e){let t=new Ba;for(let r of ja(e))t.addValue(r.file,String(r.key),r.value);return t}function ph(e,t){let r=null,s=[],i=new Map;for(let n of ja(e,t))n.key===t&&(s.push(r=n.value),i.has(n.file)||i.set(n.file,[]),i.get(n.file).push(r));return{key:t,paths:Array.from(i.keys()),scopes:i,value:r,values:s}}function dh(e){return e.replace(/^(file):/,"")}function*ja(e,t=null){let r=e.split("\0");for(let s=0,i=r.length-1;s<i;){let n=dh(r[s++]),a=r[s++],u=t;if(a.includes(`
33
33
  `)){let c=ha(a,`
34
34
  `);u=c[0],a=c[1]}yield{file:n,key:u,value:a}}}var Ba,mh=g({"src/lib/responses/ConfigList.ts"(){"use strict";T(),Ba=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=mt(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let s=this.addFile(e);s.hasOwnProperty(t)?Array.isArray(s[t])?s[t].push(r):s[t]=[s[t],r]:s[t]=r,this._all=void 0}}}});function Is(e,t){return typeof e=="string"&&Hs.hasOwnProperty(e)?e:t}function gh(e,t,r,s){let i=["config",`--${s}`];return r&&i.push("--add"),i.push(e,t),{commands:i,format:"utf-8",parser(n){return n}}}function xh(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(s){return ph(s,e)}}}function _h(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return fh(r)}}}function yh(){return{addConfig(e,t,...r){return this._runTask(gh(e,t,r[0]===!0,Is(r[1],"local")),X(arguments))},getConfig(e,t){return this._runTask(xh(e,Is(t,void 0)),X(arguments))},listConfig(...e){return this._runTask(_h(Is(e[0],void 0)),X(arguments))}}}var Hs,Ua=g({"src/lib/tasks/config.ts"(){"use strict";mh(),T(),Hs=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(Hs||{})}});function vh(e){return Ga.has(e)}var Ns,Ga,Wa=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ns=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Ns||{}),Ga=new Set(Object.values(Ns))}});function bh(...e){return new qa().param(...e)}function wh(e){let t=new Set,r={};return ei(e,s=>{let[i,n,a]=s.split(St);t.add(i),(r[i]=r[i]||[]).push({line:z(n),path:i,preview:a})}),{paths:t,results:r}}function Ch(){return{grep(e){let t=X(arguments),r=Ce(arguments);for(let i of Ha)if(r.includes(i))return this._runTask(ke(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=bh().param(e));let s=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:s,format:"utf-8",parser(i){return wh(i)}},t)}}}var Ha,Vt,Rn,qa,za=g({"src/lib/tasks/grep.ts"(){"use strict";T(),J(),Ha=["-h"],Vt=Symbol("grepQuery"),qa=class{constructor(){this[Rn]=[]}*[(Rn=Vt,Symbol.iterator)](){for(let e of this[Vt])yield e}and(...e){return e.length&&this[Vt].push("--and","(",...jt(e,"-e"),")"),this}param(...e){return this[Vt].push(...jt(e,"-e")),this}}}}),Ka={};ee(Ka,{ResetMode:()=>yr,getResetMode:()=>Eh,resetTask:()=>kh});function kh(e,t){let r=["reset"];return Ya(e)&&r.push(`--${e}`),r.push(...t),_e(r)}function Eh(e){if(Ya(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Ya(e){return Qa.includes(e)}var yr,Qa,Xa=g({"src/lib/tasks/reset.ts"(){"use strict";J(),yr=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(yr||{}),Qa=Array.from(Object.values(yr))}});function Sh(){return(0,Er.default)("simple-git")}function Pn(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(s,...i)=>{e(s,...i),r(s,...i)}:e:(s,...i)=>{e(`%s ${s}`,t,...i),r&&r(s,...i)}}function Ah(e,t,{namespace:r}){if(typeof e=="string")return e;let s=t&&t.namespace||"";return s.startsWith(r)?s.substr(r.length+1):s||r}function li(e,t,r,s=Sh()){let i=e&&`[${e}]`||"",n=[],a=typeof t=="string"?s.extend(t):t,u=Ah(Ge(t,pe),a,s);return f(r);function c(l,h){return B(n,li(e,u.replace(/^[^:]+/,l),h,s))}function f(l){let h=l&&`[${l}]`||"",p=a&&Pn(a,h)||gt,d=Pn(s,`${i} ${h}`,p);return Object.assign(a?p:d,{label:e,sibling:c,info:d,step:f})}}var Za=g({"src/lib/git-logger.ts"(){"use strict";T(),Er.default.formatters.L=e=>String(ri(e)?e.length:"-"),Er.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):Ht(e)}}),Ja,Th=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";nt(),Za(),Ja=class qs{constructor(t="GitExecutor"){this.logLabel=t,this._queue=new Map}withProgress(t){return this._queue.get(t)}createProgress(t){let r=qs.getName(t.commands[0]),s=li(this.logLabel,r);return{task:t,logger:s,name:r}}push(t){let r=this.createProgress(t);return r.logger("Adding task to the queue, commands = %o",t.commands),this._queue.set(t,r),r}fatal(t){for(let[r,{logger:s}]of Array.from(this._queue.entries()))r===t.task?(s.info("Failed %o",t),s("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):s.info("A fatal exception occurred in a previous task, the queue has been purged: %o",t.message),this.complete(r);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(t){this.withProgress(t)&&this._queue.delete(t)}attempt(t){let r=this.withProgress(t);if(!r)throw new Xe(void 0,"TasksPendingQueue: attempt called for an unknown task");return r.logger("Starting task"),r}static getName(t="empty"){return`task:${t}:${++qs.counter}`}static{this.counter=0}}}});function dt(e,t){return{method:fa(e.commands)||"",commands:t}}function Oh(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function In(e,t,r,s){return i=>{r("%s received %L bytes",t,i),s("%B",i),e.push(i)}}var zs,Rh=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";nt(),J(),T(),Th(),zs=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Ja}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}async attemptTask(e){let t=await this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:s}=this._queue.attempt(e);return await($a(e)?this.attemptEmptyTask(e,s):this.attemptRemoteTask(e,s))}catch(s){throw this.onFatalException(e,s)}finally{r(),t()}}onFatalException(e,t){let r=t instanceof Xe?Object.assign(t,{task:e}):new Xe(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}async attemptRemoteTask(e,t){let r=this._plugins.exec("spawn.binary","",dt(e,e.commands)),s=this._plugins.exec("spawn.args",[...e.commands],dt(e,e.commands)),i=await this.gitResponse(e,r,s,this.outputHandler,t.step("SPAWN")),n=await this.handleTaskData(e,s,i,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),Da(e)?Us(e.parser,n):Us(e.parser,n.asStrings())}async attemptEmptyTask(e,t){return t("empty task bypassing child process to call to task's parser"),e.parser(this)}handleTaskData(e,t,r,s){let{exitCode:i,rejection:n,stdOut:a,stdErr:u}=r;return new Promise((c,f)=>{s("Preparing to handle process response exitCode=%d stdOut=",i);let{error:l}=this._plugins.exec("task.error",{error:n},{...dt(e,t),...r});if(l&&e.onError)return s.info("exitCode=%s handling with custom error handler"),e.onError(r,l,h=>{s.info("custom error handler treated as success"),s("custom error returned a %s",Ht(h)),c(new kr(Array.isArray(h)?Buffer.concat(h):h,Buffer.concat(u)))},f);if(l)return s.info("handling as error: exitCode=%s stdErr=%s rejection=%o",i,u.length,n),f(l);s.info("retrieving task output complete"),c(new kr(Buffer.concat(a),Buffer.concat(u)))})}async gitResponse(e,t,r,s,i){let n=i.sibling("output"),a=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},dt(e,e.commands));return new Promise(u=>{let c=[],f=[];i.info("%s %o",t,r),i("%O",a);let l=this._beforeSpawn(e,r);if(l)return u({stdOut:c,stdErr:f,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,{...dt(e,r),kill(p){l=p||l}});let h=(0,eo.spawn)(t,r,a);h.stdout.on("data",In(c,"stdOut",i,n.step("stdOut"))),h.stderr.on("data",In(f,"stdErr",i,n.step("stdErr"))),h.on("error",Oh(f,i)),s&&(i("Passing child process stdOut/stdErr to custom outputHandler"),s(t,h.stdout,h.stderr,[...r])),this._plugins.exec("spawn.after",void 0,{...dt(e,r),spawned:h,close(p,d){u({stdOut:c,stdErr:f,exitCode:p,rejection:l||d})},kill(p){h.killed||(l=p,h.kill("SIGINT"))}})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,{...dt(e,t),kill(s){r=s||r}}),r}}}}),to={};ee(to,{GitExecutor:()=>ro});var ro,Ph=g({"src/lib/runners/git-executor.ts"(){"use strict";Rh(),ro=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new zs(this,this._scheduler,this._plugins)}chain(){return new zs(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function Ih(e,t,r=gt){let s=n=>{r(null,n)},i=n=>{n?.task===e&&r(n instanceof Gt?Nh(n):n,void 0)};t.then(s,i)}function Nh(e){let t=s=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${s} should be GitResponseError.git.${s}, this will no longer be available in version 3`),t=gt};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(s,i){return i in e||(s[i]={enumerable:!1,configurable:!1,get(){return t(i),e.git[i]}}),s}}var Lh=g({"src/lib/task-callback.ts"(){"use strict";At(),T()}});function Nn(e,t){return Na(r=>{if(!ti(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var Dh=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";T(),J()}});function Ls(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=Or(t,"-B")),_e(t)}function $h(){return{checkout(){return this._runTask(Ls(Ce(arguments,1)),X(arguments))},checkoutBranch(e,t){return this._runTask(Ls(["-b",e,t,...Ce(arguments)]),X(arguments))},checkoutLocalBranch(e){return this._runTask(Ls(["-b",e,...Ce(arguments)]),X(arguments))}}}var Fh=g({"src/lib/tasks/checkout.ts"(){"use strict";T(),J()}});function Mh(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function Vh(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return Ee(Mh(),[so],e)}})}}}var so,jh=g({"src/lib/tasks/count-objects.ts"(){"use strict";T(),so=new N(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let s=ma(t);e.hasOwnProperty(s)&&(e[s]=z(r))})}});function Bh(e){return Ee({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},io,e)}var io,Uh=g({"src/lib/parsers/parse-commit.ts"(){"use strict";T(),io=[new N(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,s])=>{e.branch=t,e.commit=s,e.root=!!r}),new N(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),s=r.pop();!s||!s.includes("@")||(e.author={email:s.substr(0,s.length-1),name:r.join("<").trim()})}),new N(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,s])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(s,10)||0}),new N(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,s])=>{e.summary.changes=parseInt(t,10)||0;let i=parseInt(r,10)||0;s==="-"?e.summary.deletions=i:s==="+"&&(e.summary.insertions=i)})]}});function Gh(e,t,r){return{commands:["-c","core.abbrev=40","commit",...jt(e,"-m"),...t,...r],format:"utf-8",parser:Bh}}function Wh(){return{commit(t,...r){let s=X(arguments),i=e(t)||Gh(Ue(t),Ue(Ge(r[0],Cr,[])),[...Ge(r[1],qt,[]),...Ce(arguments,0,!0)]);return this._runTask(i,s)}};function e(t){return!Cr(t)&&ke("git.commit: requires the commit message to be supplied as a string/string[]")}}var Hh=g({"src/lib/tasks/commit.ts"(){"use strict";Uh(),T(),J()}});function qh(){return{firstCommit(){return this._runTask(_e(["rev-list","--max-parents=0","HEAD"],!0),X(arguments))}}}var zh=g({"src/lib/tasks/first-commit.ts"(){"use strict";T(),J()}});function Kh(e,t){let r=["hash-object",e];return t&&r.push("-w"),_e(r,!0)}var Yh=g({"src/lib/tasks/hash-object.ts"(){"use strict";J()}});function Qh(e,t,r){let s=String(r).trim(),i;if(i=no.exec(s))return new vr(e,t,!1,i[1]);if(i=ao.exec(s))return new vr(e,t,!0,i[1]);let n="",a=s.split(" ");for(;a.length;)if(a.shift()==="in"){n=a.join(" ");break}return new vr(e,t,/^re/i.test(s),n)}var vr,no,ao,Xh=g({"src/lib/responses/InitSummary.ts"(){"use strict";vr=class{constructor(e,t,r,s){this.bare=e,this.path=t,this.existing=r,this.gitDir=s}},no=/^Init.+ repository in (.+)$/,ao=/^Rein.+ in (.+)$/}});function Zh(e){return e.includes(hi)}function Jh(e=!1,t,r){let s=["init",...r];return e&&!Zh(s)&&s.splice(1,0,hi),{commands:s,format:"utf-8",parser(i){return Qh(s.includes("--bare"),t,i)}}}var hi,ef=g({"src/lib/tasks/init.ts"(){"use strict";Xh(),hi="--bare"}});function fi(e){for(let t=0;t<e.length;t++){let r=pi.exec(e[t]);if(r)return`--${r[1]}`}return""}function tf(e){return pi.test(e)}var pi,zt=g({"src/lib/args/log-format.ts"(){"use strict";pi=/^--(stat|numstat|name-only|name-status)(=|$)/}}),oo,rf=g({"src/lib/responses/DiffSummary.ts"(){"use strict";oo=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function uo(e=""){let t=co[e];return r=>Ee(new oo,t,r,!1)}var Ds,Ln,Dn,$n,co,lo=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";zt(),rf(),Wa(),T(),Ds=[new N(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,s=""])=>{e.files.push({file:t.trim(),changes:z(r),insertions:s.replace(/[^+]/g,"").length,deletions:s.replace(/[^-]/g,"").length,binary:!1})}),new N(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,s])=>{e.files.push({file:t.trim(),before:z(r),after:z(s),binary:!0})}),new N(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let s=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);e.changed=z(t),e.insertions=z(s?.[1]),e.deletions=z(i?.[1])})],Ln=[new N(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,s])=>{let i=z(t),n=z(r);e.changed++,e.insertions+=i,e.deletions+=n,e.files.push({file:s,changes:i+n,insertions:i,deletions:n,binary:!1})}),new N(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],Dn=[new N(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],$n=[new N(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,s,i,n])=>{e.changed++,e.files.push({file:n??s,changes:0,insertions:0,deletions:0,binary:!1,status:Vs(vh(t)&&t),from:Vs(!!n&&s!==n&&s),similarity:z(r)})})],co={"":Ds,"--stat":Ds,"--numstat":Ln,"--name-status":$n,"--name-only":Dn}}});function sf(e,t){return t.reduce((r,s,i)=>(r[s]=e[i]||"",r),Object.create({diff:null}))}function ho(e=gi,t=fo,r=""){let s=uo(r);return function(i){let n=Wt(i.trim(),!1,di).map(function(a){let u=a.split(mi),c=sf(u[0].split(e),t);return u.length>1&&u[1].trim()&&(c.diff=s(u[1])),c});return{all:n,latest:n.length&&n[0]||null,total:n.length}}}var di,mi,gi,fo,po=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";T(),lo(),zt(),di="\xF2\xF2\xF2\xF2\xF2\xF2 ",mi=" \xF2\xF2",gi=" \xF2 ",fo=["hash","date","message","refs","author_name","author_email"]}}),mo={};ee(mo,{diffSummaryTask:()=>nf,validateLogFormatConfig:()=>Lr});function nf(e){let t=fi(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Lr(r)||{commands:r,format:"utf-8",parser:uo(t)}}function Lr(e){let t=e.filter(tf);if(t.length>1)return ke(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return ke(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var xi=g({"src/lib/tasks/diff.ts"(){"use strict";zt(),lo(),J()}});function af(e,t){let r=[],s=[];return Object.keys(e).forEach(i=>{r.push(i),s.push(String(e[i]))}),[r,s.join(t)]}function of(e){return Object.keys(e).reduce((t,r)=>(r in Ks||(t[r]=e[r]),t),{})}function go(e={},t=[]){let r=Ge(e.splitter,pe,gi),s=Pr(e.format)?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[i,n]=af(s,r),a=[],u=[`--pretty=format:${di}${n}${mi}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&u.push(`--max-count=${c}`),e.from||e.to){let f=e.symmetric!==!1?"...":"..";a.push(`${e.from||""}${f}${e.to||""}`)}return pe(e.file)&&u.push("--follow",Kl(e.file)),si(of(e),u),{fields:i,splitter:r,commands:[...u,...a]}}function uf(e,t,r){let s=ho(e,t,fi(r));return{commands:["log",...r],format:"utf-8",parser:s}}function cf(){return{log(...r){let s=X(arguments),i=go(ii(arguments),Ge(arguments[0],qt)),n=t(...r)||Lr(i.commands)||e(i);return this._runTask(n,s)}};function e(r){return uf(r.splitter,r.fields,r.commands)}function t(r,s){return pe(r)&&pe(s)&&ke("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var Ks,xo=g({"src/lib/tasks/log.ts"(){"use strict";zt(),Ut(),po(),T(),J(),xi(),Ks=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(Ks||{})}}),br,_o,lf=g({"src/lib/responses/MergeSummary.ts"(){"use strict";br=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},_o=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Ys,yo,hf=g({"src/lib/responses/PullSummary.ts"(){"use strict";Ys=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},yo=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function $s(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Fn(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:z(t&&t[1]||"0"),delta:z(r&&r[1]||"0")}}var vo,ff=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";T(),vo=[new it(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let s=t.toLowerCase(),i=$s(e.remoteMessages);Object.assign(i,{[s]:z(r)})}),new it(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let s=t.toLowerCase(),i=$s(e.remoteMessages);Object.assign(i,{[s]:z(r)})}),new it(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,s])=>{let i=$s(e.remoteMessages);i.total=Fn(t),i.reused=Fn(r),i.packReused=z(s)})]}});function bo(e,t){return Ee({remoteMessages:new Co},wo,t)}var wo,Co,ko=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";T(),ff(),wo=[new it(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...vo,new it([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new it([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,s])=>{e.remoteMessages.vulnerabilities={count:z(t),summary:r,url:s}})],Co=class{constructor(){this.all=[]}}}});function pf(e,t){let r=Ee(new yo,Eo,[e,t]);return r.message&&r}var Mn,Vn,jn,Bn,Eo,Un,_i,So=g({"src/lib/parsers/parse-pull.ts"(){"use strict";hf(),T(),ko(),Mn=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Vn=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,jn=/^(create|delete) mode \d+ (.+)/,Bn=[new N(Mn,(e,[t,r,s])=>{e.files.push(t),r&&(e.insertions[t]=r.length),s&&(e.deletions[t]=s.length)}),new N(Vn,(e,[t,,r,,s])=>r!==void 0||s!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+s||0,!0):!1),new N(jn,(e,[t,r])=>{B(e.files,r),B(t==="create"?e.created:e.deleted,r)})],Eo=[new N(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new N(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new N(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,s,i])=>{e.branch.local=s,e.hash.local=t,e.branch.remote=i,e.hash.remote=r})],Un=(e,t)=>Ee(new Ys,Bn,[e,t]),_i=(e,t)=>Object.assign(new Ys,Un(e,t),bo(e,t))}}),Gn,Ao,Wn,df=g({"src/lib/parsers/parse-merge.ts"(){"use strict";lf(),T(),So(),Gn=[new N(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new N(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new br(t,r))}),new N(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,s])=>{e.conflicts.push(new br(t,r,{deleteRef:s}))}),new N(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new br(t,null))}),new N(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Ao=(e,t)=>Object.assign(Wn(e,t),_i(e,t)),Wn=e=>Ee(new _o,Gn,e)}});function Hn(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let s=Ao(t,r);if(s.failed)throw new Gt(s);return s}}:ke("Git.merge requires at least one option")}var mf=g({"src/lib/tasks/merge.ts"(){"use strict";At(),df(),J()}});function gf(e,t,r){let s=r.includes("deleted"),i=r.includes("tag")||/^refs\/tags/.test(e),n=!r.includes("new");return{deleted:s,tag:i,branch:!i,new:!n,alreadyUpdated:n,local:e,remote:t}}var qn,To,zn,xf=g({"src/lib/parsers/parse-push.ts"(){"use strict";T(),ko(),qn=[new N(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new N(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new N(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,s])=>{e.pushed.push(gf(t,r,s))}),new N(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,s])=>{e.branch={...e.branch||{},local:t,remote:r,remoteName:s}}),new N(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,s,i])=>{e.update={head:{local:t,remote:r},hash:{from:s,to:i}}})],To=(e,t)=>{let r=zn(e,t),s=bo(e,t);return{...r,...s}},zn=(e,t)=>Ee({pushed:[]},qn,[e,t])}}),Oo={};ee(Oo,{pushTagsTask:()=>_f,pushTask:()=>yi});function _f(e={},t){return B(t,"--tags"),yi(e,t)}function yi(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),Or(r,"-v"),B(r,"--verbose"),B(r,"--porcelain"),{commands:r,format:"utf-8",parser:To}}var Ro=g({"src/lib/tasks/push.ts"(){"use strict";xf(),T()}});function yf(){return{showBuffer(){let e=["show",...Ce(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(La(e),X(arguments))},show(){let e=["show",...Ce(arguments,1)];return this._runTask(_e(e),X(arguments))}}}var vf=g({"src/lib/tasks/show.ts"(){"use strict";T(),J()}}),Kn,Po,bf=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Kn=/^(.+)\0(.+)$/,Po=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let s=Kn.exec(e)||[null,e,e];this.from=s[2]||"",this.path=s[1]||""}}}}});function Yn(e){let[t,r]=e.split(St);return{from:r||t,to:t}}function Re(e,t,r){return[`${e}${t}`,r]}function Fs(e,...t){return t.map(r=>Re(e,r,(s,i)=>B(s.conflicted,i)))}function wf(e,t){let r=t.trim();switch(" "){case r.charAt(2):return s(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return s(" ",r.charAt(0),r.substr(2));default:return}function s(i,n,a){let u=`${i}${n}`,c=Io.get(u);c&&c(e,a),u!=="##"&&u!=="!!"&&e.files.push(new Po(a,i,n))}}var Qn,Io,No,Cf=g({"src/lib/responses/StatusSummary.ts"(){"use strict";T(),bf(),Qn=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},Io=new Map([Re(" ","A",(e,t)=>B(e.created,t)),Re(" ","D",(e,t)=>B(e.deleted,t)),Re(" ","M",(e,t)=>B(e.modified,t)),Re("A"," ",(e,t)=>B(e.created,t)&&B(e.staged,t)),Re("A","M",(e,t)=>B(e.created,t)&&B(e.staged,t)&&B(e.modified,t)),Re("D"," ",(e,t)=>B(e.deleted,t)&&B(e.staged,t)),Re("M"," ",(e,t)=>B(e.modified,t)&&B(e.staged,t)),Re("M","M",(e,t)=>B(e.modified,t)&&B(e.staged,t)),Re("R"," ",(e,t)=>{B(e.renamed,Yn(t))}),Re("R","M",(e,t)=>{let r=Yn(t);B(e.renamed,r),B(e.modified,r.to)}),Re("!","!",(e,t)=>{B(e.ignored=e.ignored||[],t)}),Re("?","?",(e,t)=>B(e.not_added,t)),...Fs("A","A","U"),...Fs("D","D","U"),...Fs("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,s=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,n=/\.{3}(\S*)/,a=/\son\s([\S]+)$/,u;u=r.exec(t),e.ahead=u&&+u[1]||0,u=s.exec(t),e.behind=u&&+u[1]||0,u=i.exec(t),e.current=u&&u[1],u=n.exec(t),e.tracking=u&&u[1],u=a.exec(t),e.current=u&&u[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),No=function(e){let t=e.split(St),r=new Qn;for(let s=0,i=t.length;s<i;){let n=t[s++].trim();n&&(n.charAt(0)==="R"&&(n+=St+(t[s++]||"")),wf(r,n))}return r}}});function kf(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!Lo.includes(r))],parser(r){return No(r)}}}var Lo,Ef=g({"src/lib/tasks/status.ts"(){"use strict";Cf(),Lo=["--null","-z"]}});function Sr(e=0,t=0,r=0,s="",i=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:s,installed:i},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function Sf(){return Sr(0,0,0,"",!1)}function Af(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:Tf,onError(e,t,r,s){if(e.exitCode===-2)return r(Buffer.from(vi));s(t)}})}}}function Tf(e){return e===vi?Sf():Ee(Sr(0,0,0,e),Do,e)}var vi,Do,Of=g({"src/lib/tasks/version.ts"(){"use strict";T(),vi="installed=false",Do=[new N(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,s,i=""])=>{Object.assign(e,Sr(z(t),z(r),z(s),i))}),new N(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,s,i=""])=>{Object.assign(e,Sr(z(t),z(r),s,i))})]}}),$o={};ee($o,{SimpleGitApi:()=>Qs});var Qs,Rf=g({"src/lib/simple-git-api.ts"(){"use strict";Lh(),Dh(),Fh(),jh(),Hh(),Ua(),zh(),za(),Yh(),ef(),xo(),mf(),Ro(),vf(),Ef(),J(),Of(),T(),Qs=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),s=r.push(e);return t&&Ih(e,s,t),Object.create(this,{then:{value:s.then.bind(s)},catch:{value:s.catch.bind(s)},_executor:{value:r}})}add(e){return this._runTask(_e(["add",...Ue(e)]),X(arguments))}cwd(e){let t=X(arguments);return typeof e=="string"?this._runTask(Nn(e,this._executor),t):typeof e?.path=="string"?this._runTask(Nn(e.path,e.root&&this._executor||void 0),t):this._runTask(ke("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(Kh(e,t===!0),X(arguments))}init(e){return this._runTask(Jh(e===!0,this._executor.cwd,Ce(arguments)),X(arguments))}merge(){return this._runTask(Hn(Ce(arguments)),X(arguments))}mergeFromTo(e,t){return pe(e)&&pe(t)?this._runTask(Hn([e,t,...Ce(arguments)]),X(arguments,!1)):this._runTask(ke("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=yi({remote:Ge(arguments[0],pe),branch:Ge(arguments[1],pe)},Ce(arguments));return this._runTask(e,X(arguments))}stash(){return this._runTask(_e(["stash",...Ce(arguments)]),X(arguments))}status(){return this._runTask(kf(Ce(arguments)),X(arguments))}},Object.assign(Qs.prototype,$h(),Wh(),yh(),Vh(),qh(),Ch(),cf(),yf(),Af())}}),Fo={};ee(Fo,{Scheduler:()=>Vo});var Xn,Vo,Pf=g({"src/lib/runners/scheduler.ts"(){"use strict";T(),Za(),Xn=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,Mo.createDeferred)();return{promise:t,done:r,id:e}}})(),Vo=class{constructor(e=2){this.concurrency=e,this.logger=li("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=B(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),Or(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=B(this.pending,Xn());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),jo={};ee(jo,{applyPatchTask:()=>If});function If(e,t){return _e(["apply",...t,...e])}var Nf=g({"src/lib/tasks/apply-patch.ts"(){"use strict";J()}});function Lf(e,t){return{branch:e,hash:t,success:!0}}function Df(e){return{branch:e,hash:null,success:!1}}var Bo,$f=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";Bo=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Uo(e,t){return t===1&&Xs.test(e)}var Zn,Xs,Jn,Dr,Ff=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";$f(),T(),Zn=/(\S+)\s+\(\S+\s([^)]+)\)/,Xs=/^error[^']+'([^']+)'/m,Jn=[new N(Zn,(e,[t,r])=>{let s=Lf(t,r);e.all.push(s),e.branches[t]=s}),new N(Xs,(e,[t])=>{let r=Df(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],Dr=(e,t)=>Ee(new Bo,Jn,[e,t])}}),Go,Mf=g({"src/lib/responses/BranchSummary.ts"(){"use strict";Go=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,s,i){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:s,label:i}}}}});function ea(e){return e?e.charAt(0):""}function Wo(e){return Ee(new Go,Ho,e)}var Ho,Vf=g({"src/lib/parsers/parse-branch.ts"(){"use strict";Mf(),T(),Ho=[new N(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,s,i])=>{e.push(ea(t),!0,r,s,i)}),new N(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,r,s,i])=>{e.push(ea(t),!1,r,s,i)})]}}),qo={};ee(qo,{branchLocalTask:()=>Bf,branchTask:()=>jf,containsDeleteBranchCommand:()=>zo,deleteBranchTask:()=>Gf,deleteBranchesTask:()=>Uf});function zo(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function jf(e){let t=zo(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(s,i){return t?Dr(s,i).all[0]:Wo(s)}}}function Bf(){return{format:"utf-8",commands:["branch","-v"],parser:Wo}}function Uf(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,s){return Dr(r,s)},onError({exitCode:r,stdOut:s},i,n,a){if(!Uo(String(i),r))return a(i);n(s)}}}function Gf(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(s,i){return Dr(s,i).branches[e]},onError({exitCode:s,stdErr:i,stdOut:n},a,u,c){if(!Uo(String(a),s))return c(a);throw new Gt(r.parser(Bt(n),Bt(i)),String(a))}};return r}var Wf=g({"src/lib/tasks/branch.ts"(){"use strict";At(),Ff(),Vf(),T()}}),Ko,Hf=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";Ko=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),Yo={};ee(Yo,{checkIgnoreTask:()=>qf});function qf(e){return{commands:["check-ignore",...e],format:"utf-8",parser:Ko}}var zf=g({"src/lib/tasks/check-ignore.ts"(){"use strict";Hf()}}),Qo={};ee(Qo,{cloneMirrorTask:()=>Yf,cloneTask:()=>Xo});function Kf(e){return/^--upload-pack(=|$)/.test(e)}function Xo(e,t,r){let s=["clone",...r];return pe(e)&&s.push(e),pe(t)&&s.push(t),s.find(Kf)?ke("git.fetch: potential exploit argument blocked."):_e(s)}function Yf(e,t,r){return B(r,"--mirror"),Xo(e,t,r)}var Qf=g({"src/lib/tasks/clone.ts"(){"use strict";J(),T()}});function Xf(e,t){return Ee({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},Zo,[e,t])}var Zo,Zf=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";T(),Zo=[new N(/From (.+)$/,(e,[t])=>{e.remote=t}),new N(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new N(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new N(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new N(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,s,i])=>{e.updated.push({name:s,tracking:i,to:r,from:t})})]}}),Jo={};ee(Jo,{fetchTask:()=>ep});function Jf(e){return/^--upload-pack(=|$)/.test(e)}function ep(e,t,r){let s=["fetch",...r];return e&&t&&s.push(e,t),s.find(Jf)?ke("git.fetch: potential exploit argument blocked."):{commands:s,format:"utf-8",parser:Xf}}var tp=g({"src/lib/tasks/fetch.ts"(){"use strict";Zf(),J()}});function rp(e){return Ee({moves:[]},eu,e)}var eu,sp=g({"src/lib/parsers/parse-move.ts"(){"use strict";T(),eu=[new N(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),tu={};ee(tu,{moveTask:()=>ip});function ip(e,t){return{commands:["mv","-v",...Ue(e),t],format:"utf-8",parser:rp}}var np=g({"src/lib/tasks/move.ts"(){"use strict";sp(),T()}}),ru={};ee(ru,{pullTask:()=>ap});function ap(e,t,r){let s=["pull",...r];return e&&t&&s.splice(1,0,e,t),{commands:s,format:"utf-8",parser(i,n){return _i(i,n)},onError(i,n,a,u){let c=pf(Bt(i.stdOut),Bt(i.stdErr));if(c)return u(new Gt(c));u(n)}}}var op=g({"src/lib/tasks/pull.ts"(){"use strict";At(),So(),T()}});function up(e){let t={};return su(e,([r])=>t[r]={name:r}),Object.values(t)}function cp(e){let t={};return su(e,([r,s,i])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),i&&s&&(t[r].refs[i.replace(/[^a-z]/g,"")]=s)}),Object.values(t)}function su(e,t){ei(e,r=>t(r.split(/\s+/)))}var lp=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";T()}}),iu={};ee(iu,{addRemoteTask:()=>hp,getRemotesTask:()=>fp,listRemotesTask:()=>pp,remoteTask:()=>dp,removeRemoteTask:()=>mp});function hp(e,t,r){return _e(["remote","add",...r,e,t])}function fp(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?cp:up}}function pp(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),_e(t)}function dp(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),_e(t)}function mp(e){return _e(["remote","remove",e])}var gp=g({"src/lib/tasks/remote.ts"(){"use strict";lp(),J()}}),nu={};ee(nu,{stashListTask:()=>xp});function xp(e={},t){let r=go(e),s=["stash","list",...r.commands,...t],i=ho(r.splitter,r.fields,fi(s));return Lr(s)||{commands:s,format:"utf-8",parser:i}}var _p=g({"src/lib/tasks/stash-list.ts"(){"use strict";zt(),po(),xi(),xo()}}),au={};ee(au,{addSubModuleTask:()=>yp,initSubModuleTask:()=>vp,subModuleTask:()=>$r,updateSubModuleTask:()=>bp});function yp(e,t){return $r(["add",e,t])}function vp(e){return $r(["init",...e])}function $r(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),_e(t)}function bp(e){return $r(["update",...e])}var wp=g({"src/lib/tasks/sub-module.ts"(){"use strict";J()}});function Cp(e,t){let r=isNaN(e),s=isNaN(t);return r!==s?r?1:-1:r?ou(e,t):0}function ou(e,t){return e===t?0:e>t?1:-1}function kp(e){return e.trim()}function xr(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var ta,uu,Ep=g({"src/lib/responses/TagList.ts"(){"use strict";ta=class{constructor(e,t){this.all=e,this.latest=t}},uu=function(e,t=!1){let r=e.split(`
35
- `).map(kp).filter(Boolean);t||r.sort(function(i,n){let a=i.split("."),u=n.split(".");if(a.length===1||u.length===1)return Cp(xr(a[0]),xr(u[0]));for(let c=0,f=Math.max(a.length,u.length);c<f;c++){let l=ou(xr(a[c]),xr(u[c]));if(l)return l}return 0});let s=t?r[0]:[...r].reverse().find(i=>i.indexOf(".")>=0);return new ta(r,s)}}}),cu={};ee(cu,{addAnnotatedTagTask:()=>Tp,addTagTask:()=>Ap,tagListTask:()=>Sp});function Sp(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return uu(r,t)}}}function Ap(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function Tp(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var Op=g({"src/lib/tasks/tag.ts"(){"use strict";Ep()}}),Rp=ql({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(Ph(),Q(to)),{SimpleGitApi:s}=(Rf(),Q($o)),{Scheduler:i}=(Pf(),Q(Fo)),{configurationErrorTask:n}=(J(),Q(Ws)),{asArray:a,filterArray:u,filterPrimitives:c,filterString:f,filterStringOrStringArray:l,filterType:h,getTrailingOptions:p,trailingFunctionArgument:d,trailingOptionsArgument:R}=(T(),Q(ka)),{applyPatchTask:L}=(Nf(),Q(jo)),{branchTask:V,branchLocalTask:G,deleteBranchesTask:oe,deleteBranchTask:te}=(Wf(),Q(qo)),{checkIgnoreTask:ae}=(zf(),Q(Yo)),{checkIsRepoTask:Pe}=(Ta(),Q(Ea)),{cloneTask:me,cloneMirrorTask:Te}=(Qf(),Q(Qo)),{cleanWithOptionsTask:W,isCleanOptionsArray:D}=(Va(),Q(Fa)),{diffSummaryTask:yt}=(xi(),Q(mo)),{fetchTask:ar}=(tp(),Q(Jo)),{moveTask:A}=(np(),Q(tu)),{pullTask:v}=(op(),Q(ru)),{pushTagsTask:x}=(Ro(),Q(Oo)),{addRemoteTask:E,getRemotesTask:y,listRemotesTask:P,remoteTask:I,removeRemoteTask:H}=(gp(),Q(iu)),{getResetMode:Y,resetTask:re}=(Xa(),Q(Ka)),{stashListTask:ue}=(_p(),Q(nu)),{addSubModuleTask:be,initSubModuleTask:st,subModuleTask:ze,updateSubModuleTask:lt}=(wp(),Q(au)),{addAnnotatedTagTask:Ke,addTagTask:he,tagListTask:Be}=(Op(),Q(cu)),{straightThroughBufferTask:ht,straightThroughStringTask:ge}=(J(),Q(Ws));function S(m,k){this._plugins=k,this._executor=new r(m.baseDir,new i(m.maxConcurrentProcesses),k),this._trimmed=m.trimmed}(S.prototype=Object.create(s.prototype)).constructor=S,S.prototype.customBinary=function(m){return this._plugins.reconfigure("binary",m),this},S.prototype.env=function(m,k){return arguments.length===1&&typeof m=="object"?this._executor.env=m:(this._executor.env=this._executor.env||{})[m]=k,this},S.prototype.stashList=function(m){return this._runTask(ue(R(arguments)||{},u(m)&&m||[]),d(arguments))};function Xi(m,k,q,xe){return typeof q!="string"?n(`git.${m}() requires a string 'repoPath'`):k(q,h(xe,f),p(arguments))}S.prototype.clone=function(){return this._runTask(Xi("clone",me,...arguments),d(arguments))},S.prototype.mirror=function(){return this._runTask(Xi("mirror",Te,...arguments),d(arguments))},S.prototype.mv=function(m,k){return this._runTask(A(m,k),d(arguments))},S.prototype.checkoutLatestTag=function(m){var k=this;return this.pull(function(){k.tags(function(q,xe){k.checkout(xe.latest,m)})})},S.prototype.pull=function(m,k,q,xe){return this._runTask(v(h(m,f),h(k,f),p(arguments)),d(arguments))},S.prototype.fetch=function(m,k){return this._runTask(ar(h(m,f),h(k,f),p(arguments)),d(arguments))},S.prototype.silent=function(m){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},S.prototype.tags=function(m,k){return this._runTask(Be(p(arguments)),d(arguments))},S.prototype.rebase=function(){return this._runTask(ge(["rebase",...p(arguments)]),d(arguments))},S.prototype.reset=function(m){return this._runTask(re(Y(m),p(arguments)),d(arguments))},S.prototype.revert=function(m){let k=d(arguments);return typeof m!="string"?this._runTask(n("Commit must be a string"),k):this._runTask(ge(["revert",...p(arguments,0,!0),m]),k)},S.prototype.addTag=function(m){let k=typeof m=="string"?he(m):n("Git.addTag requires a tag name");return this._runTask(k,d(arguments))},S.prototype.addAnnotatedTag=function(m,k){return this._runTask(Ke(m,k),d(arguments))},S.prototype.deleteLocalBranch=function(m,k,q){return this._runTask(te(m,typeof k=="boolean"?k:!1),d(arguments))},S.prototype.deleteLocalBranches=function(m,k,q){return this._runTask(oe(m,typeof k=="boolean"?k:!1),d(arguments))},S.prototype.branch=function(m,k){return this._runTask(V(p(arguments)),d(arguments))},S.prototype.branchLocal=function(m){return this._runTask(G(),d(arguments))},S.prototype.raw=function(m){let k=!Array.isArray(m),q=[].slice.call(k?arguments:m,0);for(let Me=0;Me<q.length&&k;Me++)if(!c(q[Me])){q.splice(Me,q.length-Me);break}q.push(...p(arguments,0,!0));var xe=d(arguments);return q.length?this._runTask(ge(q,this._trimmed),xe):this._runTask(n("Raw: must supply one or more command to execute"),xe)},S.prototype.submoduleAdd=function(m,k,q){return this._runTask(be(m,k),d(arguments))},S.prototype.submoduleUpdate=function(m,k){return this._runTask(lt(p(arguments,!0)),d(arguments))},S.prototype.submoduleInit=function(m,k){return this._runTask(st(p(arguments,!0)),d(arguments))},S.prototype.subModule=function(m,k){return this._runTask(ze(p(arguments)),d(arguments))},S.prototype.listRemote=function(){return this._runTask(P(p(arguments)),d(arguments))},S.prototype.addRemote=function(m,k,q){return this._runTask(E(m,k,p(arguments)),d(arguments))},S.prototype.removeRemote=function(m,k){return this._runTask(H(m),d(arguments))},S.prototype.getRemotes=function(m,k){return this._runTask(y(m===!0),d(arguments))},S.prototype.remote=function(m,k){return this._runTask(I(p(arguments)),d(arguments))},S.prototype.tag=function(m,k){let q=p(arguments);return q[0]!=="tag"&&q.unshift("tag"),this._runTask(ge(q),d(arguments))},S.prototype.updateServerInfo=function(m){return this._runTask(ge(["update-server-info"]),d(arguments))},S.prototype.pushTags=function(m,k){let q=x({remote:h(m,f)},p(arguments));return this._runTask(q,d(arguments))},S.prototype.rm=function(m){return this._runTask(ge(["rm","-f",...a(m)]),d(arguments))},S.prototype.rmKeepLocal=function(m){return this._runTask(ge(["rm","--cached",...a(m)]),d(arguments))},S.prototype.catFile=function(m,k){return this._catFile("utf-8",arguments)},S.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},S.prototype._catFile=function(m,k){var q=d(k),xe=["cat-file"],Me=k[0];if(typeof Me=="string")return this._runTask(n("Git.catFile: options must be supplied as an array of strings"),q);Array.isArray(Me)&&xe.push.apply(xe,Me);let rs=m==="buffer"?ht(xe):ge(xe);return this._runTask(rs,q)},S.prototype.diff=function(m,k){let q=f(m)?n("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):ge(["diff",...p(arguments)]);return this._runTask(q,d(arguments))},S.prototype.diffSummary=function(){return this._runTask(yt(p(arguments,1)),d(arguments))},S.prototype.applyPatch=function(m){let k=l(m)?L(a(m),p([].slice.call(arguments,1))):n("git.applyPatch requires one or more string patches as the first argument");return this._runTask(k,d(arguments))},S.prototype.revparse=function(){let m=["rev-parse",...p(arguments,!0)];return this._runTask(ge(m,!0),d(arguments))},S.prototype.clean=function(m,k,q){let xe=D(m),Me=xe&&m.join("")||h(m,f)||"",rs=p([].slice.call(arguments,xe?1:0));return this._runTask(W(Me,rs),d(arguments))},S.prototype.exec=function(m){let k={commands:[],format:"utf-8",parser(){typeof m=="function"&&m()}};return this._runTask(k)},S.prototype.clearQueue=function(){return this},S.prototype.checkIgnore=function(m,k){return this._runTask(ae(a(h(m,l,[]))),d(arguments))},S.prototype.checkIsRepo=function(m,k){return this._runTask(Pe(h(m,f)),d(arguments))},t.exports=S}});Ut();nt();var Pp=class extends Xe{constructor(e,t){super(void 0,t),this.config=e}};nt();nt();var Qe=class extends Xe{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};At();oa();Ta();Va();Ua();Wa();za();Xa();function Ip(e){return e?[{type:"spawn.before",action(s,i){e.aborted&&i.kill(new Qe(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(s,i){function n(){i.kill(new Qe(void 0,"abort","Abort signal received"))}e.addEventListener("abort",n),i.spawned.on("close",()=>e.removeEventListener("abort",n))}}]:void 0}function Np(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function Lp(e,t){if(Np(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new Qe(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function Dp(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new Qe(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new Qe(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new Qe(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function $p({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,s){return r.forEach((i,n)=>{let a=n<r.length?r[n+1]:"";e||Lp(i,a),t||Dp(i,s.method)}),r}}}T();function Fp(e){let t=jt(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}T();var ra=(0,Et.deferred)().promise;function Mp({onClose:e=!0,onExit:t=50}={}){function r(){let i=-1,n={close:(0,Et.deferred)(),closeTimeout:(0,Et.deferred)(),exit:(0,Et.deferred)(),exitTimeout:(0,Et.deferred)()},a=Promise.race([e===!1?ra:n.closeTimeout.promise,t===!1?ra:n.exitTimeout.promise]);return s(e,n.close,n.closeTimeout),s(t,n.exit,n.exitTimeout),{close(u){i=u,n.close.done()},exit(u){i=u,n.exit.done()},get exitCode(){return i},result:a}}function s(i,n,a){i!==!1&&(i===!0?n.promise:n.promise.then(()=>Ms(i))).then(a.done)}return{type:"spawn.after",async action(i,{spawned:n,close:a}){let u=r(),c=!0,f=()=>void(c=!1);n.stdout?.on("data",f),n.stderr?.on("data",f),n.on("error",f),n.on("close",l=>u.close(l)),n.on("exit",l=>u.exit(l));try{await u.result,c&&await Ms(50),a(u.exitCode)}catch(l){a(u.exitCode,l)}}}}T();var Vp="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",sa="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function jp(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function ia(e,t){if(e.length<1||e.length>2)throw new Qe(void 0,"binary",Vp);if(e.some(jp))if(t)console.warn(sa);else throw new Qe(void 0,"binary",sa);let[s,i]=e;return{binary:s,prefix:i}}function Bp(e,t=["git"],r=!1){let s=ia(Ue(t),r);e.on("binary",i=>{s=ia(Ue(i),r)}),e.append("spawn.binary",()=>s.binary),e.append("spawn.args",i=>s.prefix?[s.prefix,...i]:i)}nt();function Up(e){return!!(e.exitCode&&e.stdErr.length)}function Gp(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Wp(e=!1,t=Up,r=Gp){return(s,i)=>!e&&s||!t(i)?s:r(i)}function na(e){return{type:"task.error",action(t,r){let s=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(s)?{error:new Xe(void 0,s.toString("utf-8"))}:{error:s}}}}T();var Hp=class{constructor(){this.plugins=new Set,this.events=new lu.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=B(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Ue(e).forEach(r=>r&&this.plugins.add(B(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let s=t,i=Object.freeze(Object.create(r));for(let n of this.plugins)n.type===e&&(s=n.action(s,i));return s}};T();function qp(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(n,a){return r.includes(a.method)?da(n,t):n}},{type:"spawn.after",action(n,a){a.commands.includes(t)&&a.spawned.stderr?.on("data",u=>{let c=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(u.toString("utf8"));c&&e({method:a.method,stage:zp(c[1]),progress:z(c[2]),processed:z(c[3]),total:z(c[4])})})}}]}function zp(e){return String(e.toLowerCase().split(" ",1))||"unknown"}T();function Kp(e){let t=xa(e,["uid","gid"]);return{type:"spawn.options",action(r){return{...t,...r}}}}function Yp({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(s,i){let n;function a(){n&&clearTimeout(n),n=setTimeout(c,e)}function u(){i.spawned.stdout?.off("data",a),i.spawned.stderr?.off("data",a),i.spawned.off("exit",u),i.spawned.off("close",u),n&&clearTimeout(n)}function c(){u(),i.kill(new Qe(void 0,"timeout","block timeout reached"))}r&&i.spawned.stdout?.on("data",a),t&&i.spawned.stderr?.on("data",a),i.spawned.on("exit",u),i.spawned.on("close",u),a()}}}Ut();function Qp(){return{type:"spawn.args",action(e){let t=[],r;function s(i){(r=r||[]).push(...i)}for(let i=0;i<e.length;i++){let n=e[i];if(wr(n)){s(On(n));continue}if(n==="--"){s(e.slice(i+1).flatMap(a=>wr(a)&&On(a)||a));break}t.push(n)}return r?[...t,"--",...r.map(String)]:t}}}T();var Xp=Rp();function Zp(e,t){let r=new Hp,s=wa(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!ti(s.baseDir))throw new Pp(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&r.add(Fp(s.config)),r.add($p(s.unsafe)),r.add(Qp()),r.add(Mp(s.completion)),s.abort&&r.add(Ip(s.abort)),s.progress&&r.add(qp(s.progress)),s.timeout&&r.add(Yp(s.timeout)),s.spawnOptions&&r.add(Kp(s.spawnOptions)),r.add(na(Wp(!0))),s.errors&&r.add(na(s.errors)),Bp(r,s.binary,s.unsafe?.allowUnsafeCustomBinary),new Xp(s,r)}At();var hu=Zp;var pu="@lntvow/dev",du="5.0.0";_();var Dt=ie(require("fs"),1),Oc=require("module"),ne=ie(require("path"),1),_t=ie(require("process"),1),Rc=ie(require("fs/promises"),1),Pc=require("url");_();_();var Jp=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],vu=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ed="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",bu="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",bi={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},wi="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",td={5:wi,"5module":wi+" export import",6:wi+" const class extends export import super"},rd=/^in(stanceof)?$/,sd=new RegExp("["+bu+"]"),id=new RegExp("["+bu+ed+"]");function ki(e,t){for(var r=65536,s=0;s<t.length;s+=2){if(r+=t[s],r>e)return!1;if(r+=t[s+1],r>=e)return!0}return!1}function We(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&sd.test(String.fromCharCode(e)):t===!1?!1:ki(e,vu)}function ot(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&id.test(String.fromCharCode(e)):t===!1?!1:ki(e,vu)||ki(e,Jp)}var j=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function Ne(e,t){return new j(e,{beforeExpr:!0,binop:t})}var Le={beforeExpr:!0},Se={startsExpr:!0},Ti={};function M(e,t){return t===void 0&&(t={}),t.keyword=e,Ti[e]=new j(e,t)}var o={num:new j("num",Se),regexp:new j("regexp",Se),string:new j("string",Se),name:new j("name",Se),privateId:new j("privateId",Se),eof:new j("eof"),bracketL:new j("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new j("]"),braceL:new j("{",{beforeExpr:!0,startsExpr:!0}),braceR:new j("}"),parenL:new j("(",{beforeExpr:!0,startsExpr:!0}),parenR:new j(")"),comma:new j(",",Le),semi:new j(";",Le),colon:new j(":",Le),dot:new j("."),question:new j("?",Le),questionDot:new j("?."),arrow:new j("=>",Le),template:new j("template"),invalidTemplate:new j("invalidTemplate"),ellipsis:new j("...",Le),backQuote:new j("`",Se),dollarBraceL:new j("${",{beforeExpr:!0,startsExpr:!0}),eq:new j("=",{beforeExpr:!0,isAssign:!0}),assign:new j("_=",{beforeExpr:!0,isAssign:!0}),incDec:new j("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new j("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Ne("||",1),logicalAND:Ne("&&",2),bitwiseOR:Ne("|",3),bitwiseXOR:Ne("^",4),bitwiseAND:Ne("&",5),equality:Ne("==/!=/===/!==",6),relational:Ne("</>/<=/>=",7),bitShift:Ne("<</>>/>>>",8),plusMin:new j("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Ne("%",10),star:Ne("*",10),slash:Ne("/",10),starstar:new j("**",{beforeExpr:!0}),coalesce:Ne("??",1),_break:M("break"),_case:M("case",Le),_catch:M("catch"),_continue:M("continue"),_debugger:M("debugger"),_default:M("default",Le),_do:M("do",{isLoop:!0,beforeExpr:!0}),_else:M("else",Le),_finally:M("finally"),_for:M("for",{isLoop:!0}),_function:M("function",Se),_if:M("if"),_return:M("return",Le),_switch:M("switch"),_throw:M("throw",Le),_try:M("try"),_var:M("var"),_const:M("const"),_while:M("while",{isLoop:!0}),_with:M("with"),_new:M("new",{beforeExpr:!0,startsExpr:!0}),_this:M("this",Se),_super:M("super",Se),_class:M("class",Se),_extends:M("extends",Le),_export:M("export"),_import:M("import",Se),_null:M("null",Se),_true:M("true",Se),_false:M("false",Se),_in:M("in",{beforeExpr:!0,binop:7}),_instanceof:M("instanceof",{beforeExpr:!0,binop:7}),_typeof:M("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:M("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:M("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ae=/\r\n?|\n|\u2028|\u2029/,nd=new RegExp(Ae.source,"g");function Tt(e){return e===10||e===13||e===8232||e===8233}function wu(e,t,r){r===void 0&&(r=e.length);for(var s=t;s<r;s++){var i=e.charCodeAt(s);if(Tt(i))return s<r-1&&i===13&&e.charCodeAt(s+1)===10?s+2:s+1}return-1}var Cu=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,de=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ku=Object.prototype,ad=ku.hasOwnProperty,od=ku.toString,Ot=Object.hasOwn||function(e,t){return ad.call(e,t)},mu=Array.isArray||function(e){return od.call(e)==="[object Array]"},gu=Object.create(null);function at(e){return gu[e]||(gu[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Ze(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var ud=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Yt=function(t,r){this.line=t,this.column=r};Yt.prototype.offset=function(t){return new Yt(this.line,this.column+t)};var Ur=function(t,r,s){this.start=r,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function Eu(e,t){for(var r=1,s=0;;){var i=wu(e,s,t);if(i<0)return new Yt(r,t-s);++r,s=i}}var Ei={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},xu=!1;function cd(e){var t={};for(var r in Ei)t[r]=e&&Ot(e,r)?e[r]:Ei[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!xu&&typeof console=="object"&&console.warn&&(xu=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
35
+ `).map(kp).filter(Boolean);t||r.sort(function(i,n){let a=i.split("."),u=n.split(".");if(a.length===1||u.length===1)return Cp(xr(a[0]),xr(u[0]));for(let c=0,f=Math.max(a.length,u.length);c<f;c++){let l=ou(xr(a[c]),xr(u[c]));if(l)return l}return 0});let s=t?r[0]:[...r].reverse().find(i=>i.indexOf(".")>=0);return new ta(r,s)}}}),cu={};ee(cu,{addAnnotatedTagTask:()=>Tp,addTagTask:()=>Ap,tagListTask:()=>Sp});function Sp(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return uu(r,t)}}}function Ap(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function Tp(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var Op=g({"src/lib/tasks/tag.ts"(){"use strict";Ep()}}),Rp=ql({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(Ph(),Q(to)),{SimpleGitApi:s}=(Rf(),Q($o)),{Scheduler:i}=(Pf(),Q(Fo)),{configurationErrorTask:n}=(J(),Q(Ws)),{asArray:a,filterArray:u,filterPrimitives:c,filterString:f,filterStringOrStringArray:l,filterType:h,getTrailingOptions:p,trailingFunctionArgument:d,trailingOptionsArgument:R}=(T(),Q(ka)),{applyPatchTask:L}=(Nf(),Q(jo)),{branchTask:V,branchLocalTask:G,deleteBranchesTask:oe,deleteBranchTask:te}=(Wf(),Q(qo)),{checkIgnoreTask:ae}=(zf(),Q(Yo)),{checkIsRepoTask:Pe}=(Ta(),Q(Ea)),{cloneTask:me,cloneMirrorTask:Te}=(Qf(),Q(Qo)),{cleanWithOptionsTask:W,isCleanOptionsArray:D}=(Va(),Q(Fa)),{diffSummaryTask:yt}=(xi(),Q(mo)),{fetchTask:ar}=(tp(),Q(Jo)),{moveTask:A}=(np(),Q(tu)),{pullTask:v}=(op(),Q(ru)),{pushTagsTask:x}=(Ro(),Q(Oo)),{addRemoteTask:E,getRemotesTask:y,listRemotesTask:P,remoteTask:I,removeRemoteTask:H}=(gp(),Q(iu)),{getResetMode:Y,resetTask:re}=(Xa(),Q(Ka)),{stashListTask:ue}=(_p(),Q(nu)),{addSubModuleTask:be,initSubModuleTask:st,subModuleTask:ze,updateSubModuleTask:lt}=(wp(),Q(au)),{addAnnotatedTagTask:Ke,addTagTask:he,tagListTask:Be}=(Op(),Q(cu)),{straightThroughBufferTask:ht,straightThroughStringTask:ge}=(J(),Q(Ws));function S(m,k){this._plugins=k,this._executor=new r(m.baseDir,new i(m.maxConcurrentProcesses),k),this._trimmed=m.trimmed}(S.prototype=Object.create(s.prototype)).constructor=S,S.prototype.customBinary=function(m){return this._plugins.reconfigure("binary",m),this},S.prototype.env=function(m,k){return arguments.length===1&&typeof m=="object"?this._executor.env=m:(this._executor.env=this._executor.env||{})[m]=k,this},S.prototype.stashList=function(m){return this._runTask(ue(R(arguments)||{},u(m)&&m||[]),d(arguments))};function Xi(m,k,q,xe){return typeof q!="string"?n(`git.${m}() requires a string 'repoPath'`):k(q,h(xe,f),p(arguments))}S.prototype.clone=function(){return this._runTask(Xi("clone",me,...arguments),d(arguments))},S.prototype.mirror=function(){return this._runTask(Xi("mirror",Te,...arguments),d(arguments))},S.prototype.mv=function(m,k){return this._runTask(A(m,k),d(arguments))},S.prototype.checkoutLatestTag=function(m){var k=this;return this.pull(function(){k.tags(function(q,xe){k.checkout(xe.latest,m)})})},S.prototype.pull=function(m,k,q,xe){return this._runTask(v(h(m,f),h(k,f),p(arguments)),d(arguments))},S.prototype.fetch=function(m,k){return this._runTask(ar(h(m,f),h(k,f),p(arguments)),d(arguments))},S.prototype.silent=function(m){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},S.prototype.tags=function(m,k){return this._runTask(Be(p(arguments)),d(arguments))},S.prototype.rebase=function(){return this._runTask(ge(["rebase",...p(arguments)]),d(arguments))},S.prototype.reset=function(m){return this._runTask(re(Y(m),p(arguments)),d(arguments))},S.prototype.revert=function(m){let k=d(arguments);return typeof m!="string"?this._runTask(n("Commit must be a string"),k):this._runTask(ge(["revert",...p(arguments,0,!0),m]),k)},S.prototype.addTag=function(m){let k=typeof m=="string"?he(m):n("Git.addTag requires a tag name");return this._runTask(k,d(arguments))},S.prototype.addAnnotatedTag=function(m,k){return this._runTask(Ke(m,k),d(arguments))},S.prototype.deleteLocalBranch=function(m,k,q){return this._runTask(te(m,typeof k=="boolean"?k:!1),d(arguments))},S.prototype.deleteLocalBranches=function(m,k,q){return this._runTask(oe(m,typeof k=="boolean"?k:!1),d(arguments))},S.prototype.branch=function(m,k){return this._runTask(V(p(arguments)),d(arguments))},S.prototype.branchLocal=function(m){return this._runTask(G(),d(arguments))},S.prototype.raw=function(m){let k=!Array.isArray(m),q=[].slice.call(k?arguments:m,0);for(let Me=0;Me<q.length&&k;Me++)if(!c(q[Me])){q.splice(Me,q.length-Me);break}q.push(...p(arguments,0,!0));var xe=d(arguments);return q.length?this._runTask(ge(q,this._trimmed),xe):this._runTask(n("Raw: must supply one or more command to execute"),xe)},S.prototype.submoduleAdd=function(m,k,q){return this._runTask(be(m,k),d(arguments))},S.prototype.submoduleUpdate=function(m,k){return this._runTask(lt(p(arguments,!0)),d(arguments))},S.prototype.submoduleInit=function(m,k){return this._runTask(st(p(arguments,!0)),d(arguments))},S.prototype.subModule=function(m,k){return this._runTask(ze(p(arguments)),d(arguments))},S.prototype.listRemote=function(){return this._runTask(P(p(arguments)),d(arguments))},S.prototype.addRemote=function(m,k,q){return this._runTask(E(m,k,p(arguments)),d(arguments))},S.prototype.removeRemote=function(m,k){return this._runTask(H(m),d(arguments))},S.prototype.getRemotes=function(m,k){return this._runTask(y(m===!0),d(arguments))},S.prototype.remote=function(m,k){return this._runTask(I(p(arguments)),d(arguments))},S.prototype.tag=function(m,k){let q=p(arguments);return q[0]!=="tag"&&q.unshift("tag"),this._runTask(ge(q),d(arguments))},S.prototype.updateServerInfo=function(m){return this._runTask(ge(["update-server-info"]),d(arguments))},S.prototype.pushTags=function(m,k){let q=x({remote:h(m,f)},p(arguments));return this._runTask(q,d(arguments))},S.prototype.rm=function(m){return this._runTask(ge(["rm","-f",...a(m)]),d(arguments))},S.prototype.rmKeepLocal=function(m){return this._runTask(ge(["rm","--cached",...a(m)]),d(arguments))},S.prototype.catFile=function(m,k){return this._catFile("utf-8",arguments)},S.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},S.prototype._catFile=function(m,k){var q=d(k),xe=["cat-file"],Me=k[0];if(typeof Me=="string")return this._runTask(n("Git.catFile: options must be supplied as an array of strings"),q);Array.isArray(Me)&&xe.push.apply(xe,Me);let rs=m==="buffer"?ht(xe):ge(xe);return this._runTask(rs,q)},S.prototype.diff=function(m,k){let q=f(m)?n("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):ge(["diff",...p(arguments)]);return this._runTask(q,d(arguments))},S.prototype.diffSummary=function(){return this._runTask(yt(p(arguments,1)),d(arguments))},S.prototype.applyPatch=function(m){let k=l(m)?L(a(m),p([].slice.call(arguments,1))):n("git.applyPatch requires one or more string patches as the first argument");return this._runTask(k,d(arguments))},S.prototype.revparse=function(){let m=["rev-parse",...p(arguments,!0)];return this._runTask(ge(m,!0),d(arguments))},S.prototype.clean=function(m,k,q){let xe=D(m),Me=xe&&m.join("")||h(m,f)||"",rs=p([].slice.call(arguments,xe?1:0));return this._runTask(W(Me,rs),d(arguments))},S.prototype.exec=function(m){let k={commands:[],format:"utf-8",parser(){typeof m=="function"&&m()}};return this._runTask(k)},S.prototype.clearQueue=function(){return this},S.prototype.checkIgnore=function(m,k){return this._runTask(ae(a(h(m,l,[]))),d(arguments))},S.prototype.checkIsRepo=function(m,k){return this._runTask(Pe(h(m,f)),d(arguments))},t.exports=S}});Ut();nt();var Pp=class extends Xe{constructor(e,t){super(void 0,t),this.config=e}};nt();nt();var Qe=class extends Xe{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};At();oa();Ta();Va();Ua();Wa();za();Xa();function Ip(e){return e?[{type:"spawn.before",action(s,i){e.aborted&&i.kill(new Qe(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(s,i){function n(){i.kill(new Qe(void 0,"abort","Abort signal received"))}e.addEventListener("abort",n),i.spawned.on("close",()=>e.removeEventListener("abort",n))}}]:void 0}function Np(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function Lp(e,t){if(Np(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new Qe(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function Dp(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new Qe(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new Qe(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new Qe(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function $p({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,s){return r.forEach((i,n)=>{let a=n<r.length?r[n+1]:"";e||Lp(i,a),t||Dp(i,s.method)}),r}}}T();function Fp(e){let t=jt(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}T();var ra=(0,Et.deferred)().promise;function Mp({onClose:e=!0,onExit:t=50}={}){function r(){let i=-1,n={close:(0,Et.deferred)(),closeTimeout:(0,Et.deferred)(),exit:(0,Et.deferred)(),exitTimeout:(0,Et.deferred)()},a=Promise.race([e===!1?ra:n.closeTimeout.promise,t===!1?ra:n.exitTimeout.promise]);return s(e,n.close,n.closeTimeout),s(t,n.exit,n.exitTimeout),{close(u){i=u,n.close.done()},exit(u){i=u,n.exit.done()},get exitCode(){return i},result:a}}function s(i,n,a){i!==!1&&(i===!0?n.promise:n.promise.then(()=>Ms(i))).then(a.done)}return{type:"spawn.after",async action(i,{spawned:n,close:a}){let u=r(),c=!0,f=()=>void(c=!1);n.stdout?.on("data",f),n.stderr?.on("data",f),n.on("error",f),n.on("close",l=>u.close(l)),n.on("exit",l=>u.exit(l));try{await u.result,c&&await Ms(50),a(u.exitCode)}catch(l){a(u.exitCode,l)}}}}T();var Vp="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",sa="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function jp(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function ia(e,t){if(e.length<1||e.length>2)throw new Qe(void 0,"binary",Vp);if(e.some(jp))if(t)console.warn(sa);else throw new Qe(void 0,"binary",sa);let[s,i]=e;return{binary:s,prefix:i}}function Bp(e,t=["git"],r=!1){let s=ia(Ue(t),r);e.on("binary",i=>{s=ia(Ue(i),r)}),e.append("spawn.binary",()=>s.binary),e.append("spawn.args",i=>s.prefix?[s.prefix,...i]:i)}nt();function Up(e){return!!(e.exitCode&&e.stdErr.length)}function Gp(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Wp(e=!1,t=Up,r=Gp){return(s,i)=>!e&&s||!t(i)?s:r(i)}function na(e){return{type:"task.error",action(t,r){let s=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(s)?{error:new Xe(void 0,s.toString("utf-8"))}:{error:s}}}}T();var Hp=class{constructor(){this.plugins=new Set,this.events=new lu.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=B(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Ue(e).forEach(r=>r&&this.plugins.add(B(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let s=t,i=Object.freeze(Object.create(r));for(let n of this.plugins)n.type===e&&(s=n.action(s,i));return s}};T();function qp(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(n,a){return r.includes(a.method)?da(n,t):n}},{type:"spawn.after",action(n,a){a.commands.includes(t)&&a.spawned.stderr?.on("data",u=>{let c=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(u.toString("utf8"));c&&e({method:a.method,stage:zp(c[1]),progress:z(c[2]),processed:z(c[3]),total:z(c[4])})})}}]}function zp(e){return String(e.toLowerCase().split(" ",1))||"unknown"}T();function Kp(e){let t=xa(e,["uid","gid"]);return{type:"spawn.options",action(r){return{...t,...r}}}}function Yp({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(s,i){let n;function a(){n&&clearTimeout(n),n=setTimeout(c,e)}function u(){i.spawned.stdout?.off("data",a),i.spawned.stderr?.off("data",a),i.spawned.off("exit",u),i.spawned.off("close",u),n&&clearTimeout(n)}function c(){u(),i.kill(new Qe(void 0,"timeout","block timeout reached"))}r&&i.spawned.stdout?.on("data",a),t&&i.spawned.stderr?.on("data",a),i.spawned.on("exit",u),i.spawned.on("close",u),a()}}}Ut();function Qp(){return{type:"spawn.args",action(e){let t=[],r;function s(i){(r=r||[]).push(...i)}for(let i=0;i<e.length;i++){let n=e[i];if(wr(n)){s(On(n));continue}if(n==="--"){s(e.slice(i+1).flatMap(a=>wr(a)&&On(a)||a));break}t.push(n)}return r?[...t,"--",...r.map(String)]:t}}}T();var Xp=Rp();function Zp(e,t){let r=new Hp,s=wa(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!ti(s.baseDir))throw new Pp(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&r.add(Fp(s.config)),r.add($p(s.unsafe)),r.add(Qp()),r.add(Mp(s.completion)),s.abort&&r.add(Ip(s.abort)),s.progress&&r.add(qp(s.progress)),s.timeout&&r.add(Yp(s.timeout)),s.spawnOptions&&r.add(Kp(s.spawnOptions)),r.add(na(Wp(!0))),s.errors&&r.add(na(s.errors)),Bp(r,s.binary,s.unsafe?.allowUnsafeCustomBinary),new Xp(s,r)}At();var hu=Zp;var pu="@lntvow/dev",du="5.0.1";_();var Dt=ie(require("fs"),1),Oc=require("module"),ne=ie(require("path"),1),_t=ie(require("process"),1),Rc=ie(require("fs/promises"),1),Pc=require("url");_();_();var Jp=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],vu=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ed="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",bu="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",bi={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},wi="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",td={5:wi,"5module":wi+" export import",6:wi+" const class extends export import super"},rd=/^in(stanceof)?$/,sd=new RegExp("["+bu+"]"),id=new RegExp("["+bu+ed+"]");function ki(e,t){for(var r=65536,s=0;s<t.length;s+=2){if(r+=t[s],r>e)return!1;if(r+=t[s+1],r>=e)return!0}return!1}function We(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&sd.test(String.fromCharCode(e)):t===!1?!1:ki(e,vu)}function ot(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&id.test(String.fromCharCode(e)):t===!1?!1:ki(e,vu)||ki(e,Jp)}var j=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function Ne(e,t){return new j(e,{beforeExpr:!0,binop:t})}var Le={beforeExpr:!0},Se={startsExpr:!0},Ti={};function M(e,t){return t===void 0&&(t={}),t.keyword=e,Ti[e]=new j(e,t)}var o={num:new j("num",Se),regexp:new j("regexp",Se),string:new j("string",Se),name:new j("name",Se),privateId:new j("privateId",Se),eof:new j("eof"),bracketL:new j("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new j("]"),braceL:new j("{",{beforeExpr:!0,startsExpr:!0}),braceR:new j("}"),parenL:new j("(",{beforeExpr:!0,startsExpr:!0}),parenR:new j(")"),comma:new j(",",Le),semi:new j(";",Le),colon:new j(":",Le),dot:new j("."),question:new j("?",Le),questionDot:new j("?."),arrow:new j("=>",Le),template:new j("template"),invalidTemplate:new j("invalidTemplate"),ellipsis:new j("...",Le),backQuote:new j("`",Se),dollarBraceL:new j("${",{beforeExpr:!0,startsExpr:!0}),eq:new j("=",{beforeExpr:!0,isAssign:!0}),assign:new j("_=",{beforeExpr:!0,isAssign:!0}),incDec:new j("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new j("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Ne("||",1),logicalAND:Ne("&&",2),bitwiseOR:Ne("|",3),bitwiseXOR:Ne("^",4),bitwiseAND:Ne("&",5),equality:Ne("==/!=/===/!==",6),relational:Ne("</>/<=/>=",7),bitShift:Ne("<</>>/>>>",8),plusMin:new j("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Ne("%",10),star:Ne("*",10),slash:Ne("/",10),starstar:new j("**",{beforeExpr:!0}),coalesce:Ne("??",1),_break:M("break"),_case:M("case",Le),_catch:M("catch"),_continue:M("continue"),_debugger:M("debugger"),_default:M("default",Le),_do:M("do",{isLoop:!0,beforeExpr:!0}),_else:M("else",Le),_finally:M("finally"),_for:M("for",{isLoop:!0}),_function:M("function",Se),_if:M("if"),_return:M("return",Le),_switch:M("switch"),_throw:M("throw",Le),_try:M("try"),_var:M("var"),_const:M("const"),_while:M("while",{isLoop:!0}),_with:M("with"),_new:M("new",{beforeExpr:!0,startsExpr:!0}),_this:M("this",Se),_super:M("super",Se),_class:M("class",Se),_extends:M("extends",Le),_export:M("export"),_import:M("import",Se),_null:M("null",Se),_true:M("true",Se),_false:M("false",Se),_in:M("in",{beforeExpr:!0,binop:7}),_instanceof:M("instanceof",{beforeExpr:!0,binop:7}),_typeof:M("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:M("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:M("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Ae=/\r\n?|\n|\u2028|\u2029/,nd=new RegExp(Ae.source,"g");function Tt(e){return e===10||e===13||e===8232||e===8233}function wu(e,t,r){r===void 0&&(r=e.length);for(var s=t;s<r;s++){var i=e.charCodeAt(s);if(Tt(i))return s<r-1&&i===13&&e.charCodeAt(s+1)===10?s+2:s+1}return-1}var Cu=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,de=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ku=Object.prototype,ad=ku.hasOwnProperty,od=ku.toString,Ot=Object.hasOwn||function(e,t){return ad.call(e,t)},mu=Array.isArray||function(e){return od.call(e)==="[object Array]"},gu=Object.create(null);function at(e){return gu[e]||(gu[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Ze(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var ud=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Yt=function(t,r){this.line=t,this.column=r};Yt.prototype.offset=function(t){return new Yt(this.line,this.column+t)};var Ur=function(t,r,s){this.start=r,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function Eu(e,t){for(var r=1,s=0;;){var i=wu(e,s,t);if(i<0)return new Yt(r,t-s);++r,s=i}}var Ei={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},xu=!1;function cd(e){var t={};for(var r in Ei)t[r]=e&&Ot(e,r)?e[r]:Ei[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!xu&&typeof console=="object"&&console.warn&&(xu=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
36
36
  Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),mu(t.onToken)){var s=t.onToken;t.onToken=function(i){return s.push(i)}}return mu(t.onComment)&&(t.onComment=ld(t,t.onComment)),t}function ld(e,t){return function(r,s,i,n,a,u){var c={type:r?"Block":"Line",value:s,start:i,end:n};e.locations&&(c.loc=new Ur(this,a,u)),e.ranges&&(c.range=[i,n]),t.push(c)}}var Qt=1,Rt=2,Oi=4,Su=8,Ri=16,Au=32,Gr=64,Tu=128,xt=256,Xt=512,Wr=Qt|Rt|xt;function Pi(e,t){return Rt|(e?Oi:0)|(t?Su:0)}var Mr=0,Ii=1,et=2,Ou=3,Ru=4,Pu=5,le=function(t,r,s){this.options=t=cd(t),this.sourceFile=t.sourceFile,this.keywords=at(td[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=bi[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=at(i);var n=(i?i+" ":"")+bi.strict;this.reservedWordsStrict=at(n),this.reservedWordsStrictBind=at(n+" "+bi.strictBind),this.input=String(r),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
37
37
  `,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Ae).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Qt),this.regexpState=null,this.privateNameStack=[]},He={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};le.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};He.inFunction.get=function(){return(this.currentVarScope().flags&Rt)>0};He.inGenerator.get=function(){return(this.currentVarScope().flags&Su)>0};He.inAsync.get=function(){return(this.currentVarScope().flags&Oi)>0};He.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(xt|Xt))return!1;if(r&Rt)return(r&Oi)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};He.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Gr)>0||this.options.allowSuperOutsideMethod};He.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Tu)>0};He.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};He.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(xt|Xt)||r&Rt&&!(r&Ri))return!0}return!1};He.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&xt)>0};le.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var s=this,i=0;i<t.length;i++)s=t[i](s);return s};le.parse=function(t,r){return new this(r,t).parse()};le.parseExpressionAt=function(t,r,s){var i=new this(s,t,r);return i.nextToken(),i.parseExpression()};le.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(le.prototype,He);var ye=le.prototype,hd=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ye.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){de.lastIndex=e,e+=de.exec(this.input)[0].length;var t=hd.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){de.lastIndex=e+t[0].length;var r=de.exec(this.input),s=r.index+r[0].length,i=this.input.charAt(s);return i===";"||i==="}"||Ae.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,de.lastIndex=e,e+=de.exec(this.input)[0].length,this.input[e]===";"&&e++}};ye.eat=function(e){return this.type===e?(this.next(),!0):!1};ye.isContextual=function(e){return this.type===o.name&&this.value===e&&!this.containsEsc};ye.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};ye.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};ye.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||Ae.test(this.input.slice(this.lastTokEnd,this.start))};ye.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};ye.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()};ye.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};ye.expect=function(e){this.eat(e)||this.unexpected()};ye.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Hr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ye.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};ye.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,s=e.doubleProto;if(!t)return r>=0||s>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};ye.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};ye.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var w=le.prototype;w.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==o.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var s=0,i=Object.keys(this.undefinedExports);s<i.length;s+=1){var n=i[s];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Ni={kind:"loop"},fd={kind:"switch"};w.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;de.lastIndex=this.pos;var t=de.exec(this.input),r=this.pos+t[0].length,s=this.input.charCodeAt(r);if(s===91||s===92)return!0;if(e)return!1;if(s===123||s>55295&&s<56320)return!0;if(We(s,!0)){for(var i=r+1;ot(s=this.input.charCodeAt(i),!0);)++i;if(s===92||s>55295&&s<56320)return!0;var n=this.input.slice(r,i);if(!rd.test(n))return!0}return!1};w.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;de.lastIndex=this.pos;var e=de.exec(this.input),t=this.pos+e[0].length,r;return!Ae.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(ot(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};w.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;de.lastIndex=this.pos;var r=de.exec(this.input),s=this.pos+r[0].length;if(Ae.test(this.input.slice(this.pos,s)))return!1;if(e){var i=s+5,n;if(this.input.slice(s,i)!=="using"||i===this.input.length||ot(n=this.input.charCodeAt(i))||n>55295&&n<56320)return!1;de.lastIndex=i;var a=de.exec(this.input);if(a&&Ae.test(this.input.slice(i,i+a[0].length)))return!1}if(t){var u=s+2,c;if(this.input.slice(s,u)==="of"&&(u===this.input.length||!ot(c=this.input.charCodeAt(u))&&!(c>55295&&c<56320)))return!1}var f=this.input.charCodeAt(s);return We(f,!0)||f===92};w.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};w.isUsing=function(e){return this.isUsingKeyword(!1,e)};w.parseStatement=function(e,t,r){var s=this.type,i=this.startNode(),n;switch(this.isLet(e)&&(s=o._var,n="let"),s){case o._break:case o._continue:return this.parseBreakContinueStatement(i,s.keyword);case o._debugger:return this.parseDebuggerStatement(i);case o._do:return this.parseDoStatement(i);case o._for:return this.parseForStatement(i);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(i,!0);case o._if:return this.parseIfStatement(i);case o._return:return this.parseReturnStatement(i);case o._switch:return this.parseSwitchStatement(i);case o._throw:return this.parseThrowStatement(i);case o._try:return this.parseTryStatement(i);case o._const:case o._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(i,n);case o._while:return this.parseWhileStatement(i);case o._with:return this.parseWithStatement(i);case o.braceL:return this.parseBlock(!0,i);case o.semi:return this.parseEmptyStatement(i);case o._export:case o._import:if(this.options.ecmaVersion>10&&s===o._import){de.lastIndex=this.pos;var a=de.exec(this.input),u=this.pos+a[0].length,c=this.input.charCodeAt(u);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===o._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var f=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(f)return t&&this.options.sourceType==="script"&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),f==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,f),this.semicolon(),this.finishNode(i,"VariableDeclaration");var l=this.value,h=this.parseExpression();return s===o.name&&h.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(i,l,h,e):this.parseExpressionStatement(i,h)}};w.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var i=this.labels[s];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind==="loop")||e.label&&r))break}return s===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")};w.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};w.parseDoStatement=function(e){return this.next(),this.labels.push(Ni),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};w.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ni),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===o._var||this.type===o._const||r){var s=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(s,!0,i),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(e,s,t)}var n=this.isContextual("let"),a=!1,u=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(u){var c=this.startNode();return this.next(),u==="await using"&&this.next(),this.parseVar(c,!0,u),this.finishNode(c,"VariableDeclaration"),this.parseForAfterInit(e,c,t)}var f=this.containsEsc,l=new Hr,h=this.start,p=t>-1?this.parseExprSubscripts(l,"await"):this.parseExpression(!0,l);return this.type===o._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===o._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(p.start===h&&!f&&p.type==="Identifier"&&p.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),n&&a&&this.raise(p.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(p,!1,l),this.checkLValPattern(p),this.parseForIn(e,p)):(this.checkExpressionErrors(l,!0),t>-1&&this.unexpected(t),this.parseFor(e,p))};w.parseForAfterInit=function(e,t,r){return(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===o._in?r>-1&&this.unexpected(r):e.await=r>-1),this.parseForIn(e,t)):(r>-1&&this.unexpected(r),this.parseFor(e,t))};w.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,Kt|(r?0:Si),!1,t)};w.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};w.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};w.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push(fd),this.enterScope(0);for(var t,r=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var s=this.type===o._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(o.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};w.parseThrowStatement=function(e){return this.next(),Ae.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var pd=[];w.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Au:0),this.checkLValPattern(e,t?Ru:et),this.expect(o.parenR),e};w.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};w.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};w.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ni),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};w.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};w.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};w.parseLabeledStatement=function(e,t,r,s){for(var i=0,n=this.labels;i<n.length;i+=1){var a=n[i];a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===o._switch?"switch":null,c=this.labels.length-1;c>=0;c--){var f=this.labels[c];if(f.statementStart===e.start)f.statementStart=this.start,f.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};w.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};w.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(o.braceL),e&&this.enterScope(0);this.type!==o.braceR;){var s=this.parseStatement(null);t.body.push(s)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};w.parseFor=function(e,t){return e.init=t,this.expect(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};w.parseForIn=function(e,t){var r=this.type===o._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};w.parseVar=function(e,t,r,s){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(o.eq)?i.init=this.parseMaybeAssign(t):!s&&r==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&(r==="using"||r==="await using")&&this.options.ecmaVersion>=17&&this.type!==o._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+r+" declaration"):!s&&i.id.type!=="Identifier"&&!(t&&(this.type===o._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(o.comma))break}return e};w.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ii:et,!1)};var Kt=1,Si=2,Iu=4;w.parseFunction=function(e,t,r,s,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===o.star&&t&Si&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&Kt&&(e.id=t&Iu&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&Si)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ii:et:Ou));var n=this.yieldPos,a=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Pi(e.async,e.generator)),t&Kt||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=u,this.finishNode(e,t&Kt?"FunctionDeclaration":"FunctionExpression")};w.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};w.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),i=this.startNode(),n=!1;for(i.body=[],this.expect(o.braceL);this.type!==o.braceR;){var a=this.parseClassElement(e.superClass!==null);a&&(i.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"?(n&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),n=!0):a.key&&a.key.type==="PrivateIdentifier"&&dd(s,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};w.parseClassElement=function(e){if(this.eat(o.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),s="",i=!1,n=!1,a="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===o.star?u=!0:s="static"}if(r.static=u,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?n=!0:s="async"),!s&&(t>=9||!n)&&this.eat(o.star)&&(i=!0),!s&&!n&&!i){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=c:s=c)}if(s?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=s,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===o.parenL||a!=="method"||i||n){var f=!r.static&&Vr(r,"constructor"),l=f&&e;f&&a!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=f?"constructor":a,this.parseClassMethod(r,i,n,l)}else this.parseClassField(r);return r};w.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword};w.parseClassElementName=function(e){this.type===o.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};w.parseClassMethod=function(e,t,r,s){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),r&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Vr(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,r,s);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};w.parseClassField=function(e){return Vr(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Vr(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)?(this.enterScope(Xt|Gr),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};w.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(xt|Gr);this.type!==o.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};w.parseClassId=function(e,t){this.type===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,et,!1)):(t===!0&&this.unexpected(),e.id=null)};w.parseClassSuper=function(e){e.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null};w.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};w.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,i=s===0?null:this.privateNameStack[s-1],n=0;n<r.length;++n){var a=r[n];Ot(t,a.name)||(i?i.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}};function dd(e,t){var r=t.key.name,s=e[r],i="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(i=(t.static?"s":"i")+t.kind),s==="iget"&&i==="iset"||s==="iset"&&i==="iget"||s==="sget"&&i==="sset"||s==="sset"&&i==="sget"?(e[r]="true",!1):s?!0:(e[r]=i,!1)}function Vr(e,t){var r=e.computed,s=e.key;return!r&&(s.type==="Identifier"&&s.name===t||s.type==="Literal"&&s.value===t)}w.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};w.parseExport=function(e,t){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var r=0,s=e.specifiers;r<s.length;r+=1){var i=s[r];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal"&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};w.parseExportDeclaration=function(e){return this.parseStatement(null)};w.parseExportDefaultDeclaration=function(){var e;if(this.type===o._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,Kt|Iu,!1,e)}else if(this.type===o._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var s=this.parseMaybeAssign();return this.semicolon(),s}};w.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Ot(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};w.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var s=0,i=t.properties;s<i.length;s+=1){var n=i[s];this.checkPatternExport(e,n)}else if(r==="ArrayPattern")for(var a=0,u=t.elements;a<u.length;a+=1){var c=u[a];c&&this.checkPatternExport(e,c)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"&&this.checkPatternExport(e,t.argument)};w.checkVariableExport=function(e,t){if(e)for(var r=0,s=t;r<s.length;r+=1){var i=s[r];this.checkPatternExport(e,i.id)}};w.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};w.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};w.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseExportSpecifier(e))}return t};w.parseImport=function(e){return this.next(),this.type===o.string?(e.specifiers=pd,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===o.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};w.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,et),this.finishNode(e,"ImportSpecifier")};w.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,et),this.finishNode(e,"ImportDefaultSpecifier")};w.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,et),this.finishNode(e,"ImportNamespaceSpecifier")};w.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===o.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return e;if(this.type===o.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(o.braceL);!this.eat(o.braceR);){if(t)t=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseImportSpecifier())}return e};w.parseWithClause=function(){var e=[];if(!this.eat(o._with))return e;this.expect(o.braceL);for(var t={},r=!0;!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;var s=this.parseImportAttribute(),i=s.key.type==="Identifier"?s.key.name:s.key.value;Ot(t,i)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(s)}return e};w.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(o.colon),this.type!==o.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};w.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var e=this.parseLiteral(this.value);return ud.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};w.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};w.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var $e=le.prototype;$e.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var s=0,i=e.properties;s<i.length;s+=1){var n=i[s];this.toAssignable(n,t),n.type==="RestElement"&&(n.argument.type==="ArrayPattern"||n.argument.type==="ObjectPattern")&&this.raise(n.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e};$e.toAssignableList=function(e,t){for(var r=e.length,s=0;s<r;s++){var i=e[s];i&&this.toAssignable(i,t)}if(r){var n=e[r-1];this.options.ecmaVersion===6&&t&&n&&n.type==="RestElement"&&n.argument.type!=="Identifier"&&this.unexpected(n.argument.start)}return e};$e.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};$e.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==o.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};$e.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()};$e.parseBindingList=function(e,t,r,s){for(var i=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(o.comma),t&&this.type===o.comma)i.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===o.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),i.push(a),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else i.push(this.parseAssignableListItem(s))}return i};$e.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};$e.parseBindingListItem=function(e){return e};$e.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return r;var s=this.startNodeAt(e,t);return s.left=r,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")};$e.checkLValSimple=function(e,t,r){t===void 0&&(t=Mr);var s=t!==Mr;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode"),s&&(t===et&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(Ot(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==Pu&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}};$e.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=Mr),e.type){case"ObjectPattern":for(var s=0,i=e.properties;s<i.length;s+=1){var n=i[s];this.checkLValInnerPattern(n,t,r)}break;case"ArrayPattern":for(var a=0,u=e.elements;a<u.length;a+=1){var c=u[a];c&&this.checkLValInnerPattern(c,t,r)}break;default:this.checkLValSimple(e,t,r)}};$e.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=Mr),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var je=function(t,r,s,i,n){this.token=t,this.isExpr=!!r,this.preserveSpace=!!s,this.override=i,this.generator=!!n},K={b_stat:new je("{",!1),b_expr:new je("{",!0),b_tmpl:new je("${",!1),p_stat:new je("(",!1),p_expr:new je("(",!0),q_tmpl:new je("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new je("function",!1),f_expr:new je("function",!0),f_expr_gen:new je("function",!0,!1,null,!0),f_gen:new je("function",!1,!1,null,!0)},Pt=le.prototype;Pt.initialContext=function(){return[K.b_stat]};Pt.curContext=function(){return this.context[this.context.length-1]};Pt.braceIsBlock=function(e){var t=this.curContext();return t===K.f_expr||t===K.f_stat?!0:e===o.colon&&(t===K.b_stat||t===K.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?Ae.test(this.input.slice(this.lastTokEnd,this.start)):e===o._else||e===o.semi||e===o.eof||e===o.parenR||e===o.arrow?!0:e===o.braceL?t===K.b_stat:e===o._var||e===o._const||e===o.name?!1:!this.exprAllowed};Pt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Pt.updateContext=function(e){var t,r=this.type;r.keyword&&e===o.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr};Pt.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};o.parenR.updateContext=o.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===K.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};o.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?K.b_stat:K.b_expr),this.exprAllowed=!0};o.dollarBraceL.updateContext=function(){this.context.push(K.b_tmpl),this.exprAllowed=!0};o.parenL.updateContext=function(e){var t=e===o._if||e===o._for||e===o._with||e===o._while;this.context.push(t?K.p_stat:K.p_expr),this.exprAllowed=!0};o.incDec.updateContext=function(){};o._function.updateContext=o._class.updateContext=function(e){e.beforeExpr&&e!==o._else&&!(e===o.semi&&this.curContext()!==K.p_stat)&&!(e===o._return&&Ae.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===K.b_stat)?this.context.push(K.f_expr):this.context.push(K.f_stat),this.exprAllowed=!1};o.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};o.backQuote.updateContext=function(){this.curContext()===K.q_tmpl?this.context.pop():this.context.push(K.q_tmpl),this.exprAllowed=!1};o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===K.f_expr?this.context[t]=K.f_expr_gen:this.context[t]=K.f_gen}this.exprAllowed=!0};o.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==o.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var O=le.prototype;O.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var s=e.key,i;switch(s.type){case"Identifier":i=s.name;break;case"Literal":i=String(s.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6){i==="__proto__"&&n==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),t.proto=!0);return}i="$"+i;var a=t[i];if(a){var u;n==="init"?u=this.strict&&a.init||a.get||a.set:u=a.init||a[n],u&&this.raiseRecoverable(s.start,"Redefinition of property")}else a=t[i]={init:!1,get:!1,set:!1};a[n]=!0}};O.parseExpression=function(e,t){var r=this.start,s=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===o.comma){var n=this.startNodeAt(r,s);for(n.expressions=[i];this.eat(o.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return i};O.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var s=!1,i=-1,n=-1,a=-1;t?(i=t.parenthesizedAssign,n=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Hr,s=!0);var u=this.start,c=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var f=this.parseMaybeConditional(e,t);if(r&&(f=r.call(this,f,u,c)),this.type.isAssign){var l=this.startNodeAt(u,c);return l.operator=this.value,this.type===o.eq&&(f=this.toAssignable(f,!1,t)),s||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=f.start&&(t.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(f):this.checkLValSimple(f),l.left=f,this.next(),l.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(l,"AssignmentExpression")}else s&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),n>-1&&(t.trailingComma=n),f};O.parseMaybeConditional=function(e,t){var r=this.start,s=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(o.question)){var n=this.startNodeAt(r,s);return n.test=i,n.consequent=this.parseMaybeAssign(),this.expect(o.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return i};O.parseExprOps=function(e,t){var r=this.start,s=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===r&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,r,s,-1,e)};O.parseExprOp=function(e,t,r,s,i){var n=this.type.binop;if(n!=null&&(!i||this.type!==o._in)&&n>s){var a=this.type===o.logicalOR||this.type===o.logicalAND,u=this.type===o.coalesce;u&&(n=o.logicalAND.binop);var c=this.value;this.next();var f=this.start,l=this.startLoc,h=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),f,l,n,i),p=this.buildBinary(t,r,e,h,c,a||u);return(a&&this.type===o.coalesce||u&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(p,t,r,s,i)}return e};O.buildBinary=function(e,t,r,s,i,n){s.type==="PrivateIdentifier"&&this.raise(s.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=r,a.operator=i,a.right=s,this.finishNode(a,n?"LogicalExpression":"BinaryExpression")};O.parseMaybeUnary=function(e,t,r,s){var i=this.start,n=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(s),t=!0;else if(this.type.prefix){var u=this.startNode(),c=this.type===o.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,c,s),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&Nu(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&Ai(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,a=this.finishNode(u,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===o.privateId)(s||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),a=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();else{if(a=this.parseExprSubscripts(e,s),this.checkExpressionErrors(e))return a;for(;this.type.postfix&&!this.canInsertSemicolon();){var f=this.startNodeAt(i,n);f.operator=this.value,f.prefix=!1,f.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(f,"UpdateExpression")}}if(!r&&this.eat(o.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,n,a,this.parseMaybeUnary(null,!1,!1,s),"**",!1);else return a};function Nu(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Nu(e.expression)}function Ai(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Ai(e.expression)||e.type==="ParenthesizedExpression"&&Ai(e.expression)}O.parseExprSubscripts=function(e,t){var r=this.start,s=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var n=this.parseSubscripts(i,r,s,!1,t);return e&&n.type==="MemberExpression"&&(e.parenthesizedAssign>=n.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=n.start&&(e.parenthesizedBind=-1),e.trailingComma>=n.start&&(e.trailingComma=-1)),n};O.parseSubscripts=function(e,t,r,s,i){for(var n=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;;){var u=this.parseSubscript(e,t,r,s,n,a,i);if(u.optional&&(a=!0),u===e||u.type==="ArrowFunctionExpression"){if(a){var c=this.startNodeAt(t,r);c.expression=u,u=this.finishNode(c,"ChainExpression")}return u}e=u}};O.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)};O.parseSubscriptAsyncArrow=function(e,t,r,s){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,s)};O.parseSubscript=function(e,t,r,s,i,n,a){var u=this.options.ecmaVersion>=11,c=u&&this.eat(o.questionDot);s&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var f=this.eat(o.bracketL);if(f||c&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var l=this.startNodeAt(t,r);l.object=e,f?(l.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&e.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!f,u&&(l.optional=c),e=this.finishNode(l,"MemberExpression")}else if(!s&&this.eat(o.parenL)){var h=new Hr,p=this.yieldPos,d=this.awaitPos,R=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var L=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,h);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=p,this.awaitPos=d,this.awaitIdentPos=R,this.parseSubscriptAsyncArrow(t,r,L,a);this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=R||this.awaitIdentPos;var V=this.startNodeAt(t,r);V.callee=e,V.arguments=L,u&&(V.optional=c),e=this.finishNode(V,"CallExpression")}else if(this.type===o.backQuote){(c||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var G=this.startNodeAt(t,r);G.tag=e,G.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(G,"TaggedTemplateExpression")}return e};O.parseExprAtom=function(e,t,r){this.type===o.slash&&this.readRegexp();var s,i=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(s,"Super");case o._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case o.name:var n=this.start,a=this.startLoc,u=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(K.f_expr),this.parseFunction(this.startNodeAt(n,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(n,a),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===o.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,a),[c],!0,t)}return c;case o.regexp:var f=this.value;return s=this.parseLiteral(f.value),s.regex={pattern:f.pattern,flags:f.flags},s;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return s=this.startNode(),s.value=this.type===o._null?null:this.type===o._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case o.parenL:var l=this.start,h=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),h;case o.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case o.braceL:return this.overrideContext(K.b_expr),this.parseObj(!1,e);case o._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};O.parseExprAtomDefault=function(){this.unexpected()};O.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};O.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(o.parenR)?e.options=null:(this.expect(o.comma),this.afterTrailingComma(o.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(o.parenR)||(this.expect(o.comma),this.afterTrailingComma(o.parenR)||this.unexpected())));else if(!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};O.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};O.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};O.parseParenExpression=function(){this.expect(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e};O.shouldParseArrow=function(e){return!this.canInsertSemicolon()};O.parseParenAndDistinguishExpression=function(e,t){var r=this.start,s=this.startLoc,i,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,u=this.startLoc,c=[],f=!0,l=!1,h=new Hr,p=this.yieldPos,d=this.awaitPos,R;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(f?f=!1:this.expect(o.comma),n&&this.afterTrailingComma(o.parenR,!0)){l=!0;break}else if(this.type===o.ellipsis){R=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,h,this.parseParenItem));var L=this.lastTokEnd,V=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(c)&&this.eat(o.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=d,this.parseParenArrowList(r,s,c,t);(!c.length||l)&&this.unexpected(this.lastTokStart),R&&this.unexpected(R),this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,c.length>1?(i=this.startNodeAt(a,u),i.expressions=c,this.finishNodeAt(i,"SequenceExpression",L,V)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var G=this.startNodeAt(r,s);return G.expression=i,this.finishNode(G,"ParenthesizedExpression")}else return i};O.parseParenItem=function(e){return e};O.parseParenArrowList=function(e,t,r,s){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,s)};var md=[];O.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,i,!0,!1),this.eat(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=md,this.finishNode(e,"NewExpression")};O.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,`
38
38
  `),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
@@ -42,4 +42,4 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
42
42
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};F.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
43
43
  `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ze(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(s,8);return i>255&&(s=s.slice(0,-1),i=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Tt(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};F.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};F.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(ot(i,s))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?We:ot)(a,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Ze(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};F.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=Ti[e]),this.finishToken(t,e)};var $d="8.15.0";le.acorn={Parser:le,version:$d,defaultOptions:Ei,Position:Yt,SourceLocation:Ur,getLineInfo:Eu,Node:qr,TokenType:j,tokTypes:o,keywordTypes:Ti,TokContext:je,tokContexts:K,isIdentifierChar:ot,isIdentifierStart:We,Token:Li,isNewLine:Tt,lineBreak:Ae,lineBreakG:nd,nonASCIIwhitespace:Cu};var tr=require("module"),rt=ie(require("fs"),1);_();var S0=String.fromCharCode;var Fd=/\/$|\/\?|\/#/,Md=/^\.?\//;function Vd(e="",t){return t?Fd.test(e):e.endsWith("/")}function jd(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(Vd(e,!0))return e||"/";let r=e,s="",i=e.indexOf("#");if(i!==-1&&(r=e.slice(0,i),s=e.slice(i),!r))return s;let[n,...a]=r.split("?");return n+"/"+(a.length>0?`?${a.join("?")}`:"")+s}function Bd(e){return e&&e!=="/"}function Di(e,...t){let r=e||"";for(let s of t.filter(i=>Bd(i)))if(r){let i=s.replace(Md,"");r=jd(r)+i}else r=s;return r}var A0=Symbol.for("ufo:protocolRelative");_();_();var Ud=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;var $i=function(e){return Ud.test(e)};var C=require("url"),tt=ie(require("assert"),1),ct=ie(require("process"),1),rr=ie(require("path"),1),dc=ie(require("v8"),1),It=require("util"),mc=new Set(tr.builtinModules);function Bi(e){return e.replace(/\\/g,"/")}var Hd={}.hasOwnProperty,qd=/^([A-Z][a-z\d]*)+$/,zd=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),ve={};function Fi(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}var gc=new Map,Kd="__node_internal_",tc;ve.ERR_INVALID_ARG_TYPE=Fe("ERR_INVALID_ARG_TYPE",(e,t,r)=>{(0,tt.default)(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let s="The ";if(e.endsWith(" argument"))s+=`${e} `;else{let u=e.includes(".")?"property":"argument";s+=`"${e}" ${u} `}s+="must be ";let i=[],n=[],a=[];for(let u of t)(0,tt.default)(typeof u=="string","All expected entries have to be of type string"),zd.has(u)?i.push(u.toLowerCase()):qd.exec(u)===null?((0,tt.default)(u!=="object",'The value "object" should be written as "Object"'),a.push(u)):n.push(u);if(n.length>0){let u=i.indexOf("object");u!==-1&&(i.slice(u,1),n.push("Object"))}return i.length>0&&(s+=`${i.length>1?"one of type":"of type"} ${Fi(i,"or")}`,(n.length>0||a.length>0)&&(s+=" or ")),n.length>0&&(s+=`an instance of ${Fi(n,"or")}`,a.length>0&&(s+=" or ")),a.length>0&&(a.length>1?s+=`one of ${Fi(a,"or")}`:(a[0].toLowerCase()!==a[0]&&(s+="an "),s+=`${a[0]}`)),s+=`. Received ${Jd(r)}`,s},TypeError);ve.ERR_INVALID_MODULE_SPECIFIER=Fe("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError);ve.ERR_INVALID_PACKAGE_CONFIG=Fe("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error);ve.ERR_INVALID_PACKAGE_TARGET=Fe("ERR_INVALID_PACKAGE_TARGET",(e,t,r,s=!1,i=void 0)=>{let n=typeof r=="string"&&!s&&r.length>0&&!r.startsWith("./");return t==="."?((0,tt.default)(s===!1),`Invalid "exports" main target ${JSON.stringify(r)} defined in the package config ${e}package.json${i?` imported from ${i}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${JSON.stringify(r)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:""}${n?'; targets must start with "./"':""}`},Error);ve.ERR_MODULE_NOT_FOUND=Fe("ERR_MODULE_NOT_FOUND",(e,t,r=!1)=>`Cannot find ${r?"module":"package"} '${e}' imported from ${t}`,Error);ve.ERR_NETWORK_IMPORT_DISALLOWED=Fe("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);ve.ERR_PACKAGE_IMPORT_NOT_DEFINED=Fe("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${r}`,TypeError);ve.ERR_PACKAGE_PATH_NOT_EXPORTED=Fe("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error);ve.ERR_UNSUPPORTED_DIR_IMPORT=Fe("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);ve.ERR_UNSUPPORTED_RESOLVE_REQUEST=Fe("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);ve.ERR_UNKNOWN_FILE_EXTENSION=Fe("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);ve.ERR_INVALID_ARG_VALUE=Fe("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let s=(0,It.inspect)(t);return s.length>128&&(s=`${s.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${s}`},TypeError);function Fe(e,t,r){return gc.set(e,t),Yd(r,e)}function Yd(e,t){return r;function r(...s){let i=Error.stackTraceLimit;Ui()&&(Error.stackTraceLimit=0);let n=new e;Ui()&&(Error.stackTraceLimit=i);let a=Zd(t,s,n);return Object.defineProperties(n,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Xd(n),n.code=t,n}}function Ui(){try{if(dc.default.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):Hd.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function Qd(e){let t=Kd+e.name;return Object.defineProperty(e,"name",{value:t}),e}var Xd=Qd(function(e){let t=Ui();return t&&(tc=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=tc),e});function Zd(e,t,r){let s=gc.get(e);if((0,tt.default)(s!==void 0,"expected `message` to be found"),typeof s=="function")return(0,tt.default)(s.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${s.length}).`),Reflect.apply(s,r,t);let i=/%[dfijoOs]/g,n=0;for(;i.exec(s)!==null;)n++;return(0,tt.default)(n===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${n}).`),t.length===0?s:(t.unshift(s),Reflect.apply(It.format,null,t))}function Jd(e){if(e==null)return String(e);if(typeof e=="function"&&e.name)return`function ${e.name}`;if(typeof e=="object")return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${(0,It.inspect)(e,{depth:-1})}`;let t=(0,It.inspect)(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}var Jt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:em}=ve,rc=new Map;function xc(e,{base:t,specifier:r}){let s=rc.get(e);if(s)return s;let i;try{i=rt.default.readFileSync(rr.default.toNamespacedPath(e),"utf8")}catch(a){let u=a;if(u.code!=="ENOENT")throw u}let n={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(i!==void 0){let a;try{a=JSON.parse(i)}catch(u){let c=u,f=new em(e,(t?`"${r}" from `:"")+(0,C.fileURLToPath)(t||r),c.message);throw f.cause=c,f}n.exists=!0,Jt.call(a,"name")&&typeof a.name=="string"&&(n.name=a.name),Jt.call(a,"main")&&typeof a.main=="string"&&(n.main=a.main),Jt.call(a,"exports")&&(n.exports=a.exports),Jt.call(a,"imports")&&(n.imports=a.imports),Jt.call(a,"type")&&(a.type==="commonjs"||a.type==="module")&&(n.type=a.type)}return rc.set(e,n),n}function Gi(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let i=xc((0,C.fileURLToPath)(t),{specifier:e});if(i.exists)return i;let n=t;if(t=new URL("../package.json",t),t.pathname===n.pathname)break}return{pjsonPath:(0,C.fileURLToPath)(t),exists:!1,type:"none"}}function sc(e){return Gi(e).type}var{ERR_UNKNOWN_FILE_EXTENSION:tm}=ve,rm={}.hasOwnProperty,sm={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function im(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}var ic={__proto__:null,"data:":nm,"file:":om,"http:":nc,"https:":nc,"node:"(){return"builtin"}};function nm(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return im(t)}function am(e){let t=e.pathname,r=t.length;for(;r--;){let s=t.codePointAt(r);if(s===47)return"";if(s===46)return t.codePointAt(r-1)===47?"":t.slice(r)}return""}function om(e,t,r){let s=am(e);if(s===".js"){let a=sc(e);return a!=="none"?a:"commonjs"}if(s===""){let a=sc(e);return a==="none"||a==="commonjs"?"commonjs":"module"}let i=sm[s];if(i)return i;if(r)return;let n=(0,C.fileURLToPath)(e);throw new tm(s,n)}function nc(){}function um(e,t){let r=e.protocol;return rm.call(ic,r)&&ic[r](e,t,!0)||null}var Kr=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:Q0,ERR_INVALID_MODULE_SPECIFIER:Xr,ERR_INVALID_PACKAGE_CONFIG:_c,ERR_INVALID_PACKAGE_TARGET:cm,ERR_MODULE_NOT_FOUND:Wi,ERR_PACKAGE_IMPORT_NOT_DEFINED:lm,ERR_PACKAGE_PATH_NOT_EXPORTED:hm,ERR_UNSUPPORTED_DIR_IMPORT:fm,ERR_UNSUPPORTED_RESOLVE_REQUEST:ac}=ve,yc={}.hasOwnProperty,oc=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,uc=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,pm=/^\.|%|\\/,Yr=/\*/g,dm=/%2f|%5c/i,cc=new Set,mm=/[/\\]{2}/;function lc(e,t,r,s,i,n,a){if(ct.default.noDeprecation)return;let u=(0,C.fileURLToPath)(s),c=mm.exec(a?e:t)!==null;ct.default.emitWarning(`Use of deprecated ${c?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===r?"":`matched to "${r}" `}in the "${i?"imports":"exports"}" field module resolution of the package at ${u}${n?` imported from ${(0,C.fileURLToPath)(n)}`:""}.`,"DeprecationWarning","DEP0166")}function hc(e,t,r,s){if(ct.default.noDeprecation||um(e,{parentURL:r.href})!=="module")return;let n=(0,C.fileURLToPath)(e.href),a=(0,C.fileURLToPath)(new C.URL(".",t)),u=(0,C.fileURLToPath)(r);s?rr.default.resolve(a,s)!==n&&ct.default.emitWarning(`Package ${a} has a "main" field set to "${s}", excluding the full filename and extension to the resolved file at "${n.slice(a.length)}", imported from ${u}.
44
44
  Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):ct.default.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${n.slice(a.length)}", imported from ${u}.
45
- Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function vc(e){try{return(0,rt.statSync)(e)}catch{}}function Mi(e){let t=(0,rt.statSync)(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function gm(e,t,r){let s;if(t.main!==void 0){if(s=new C.URL(t.main,e),Mi(s))return s;let a=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<a.length&&(s=new C.URL(a[u],e),!Mi(s));)s=void 0;if(s)return hc(s,e,r,t.main),s}let i=["./index.js","./index.json","./index.node"],n=-1;for(;++n<i.length&&(s=new C.URL(i[n],e),!Mi(s));)s=void 0;if(s)return hc(s,e,r,t.main),s;throw new Wi((0,C.fileURLToPath)(new C.URL(".",e)),(0,C.fileURLToPath)(r))}function xm(e,t,r){if(dm.exec(e.pathname)!==null)throw new Xr(e.pathname,'must not include encoded "/" or "\\" characters',(0,C.fileURLToPath)(t));let s;try{s=(0,C.fileURLToPath)(e)}catch(n){let a=n;throw Object.defineProperty(a,"input",{value:String(e)}),Object.defineProperty(a,"module",{value:String(t)}),a}let i=vc(s.endsWith("/")?s.slice(-1):s);if(i&&i.isDirectory()){let n=new fm(s,(0,C.fileURLToPath)(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Wi(s||e.pathname,t&&(0,C.fileURLToPath)(t),!0);throw n.url=String(e),n}{let n=(0,rt.realpathSync)(s),{search:a,hash:u}=e;e=(0,C.pathToFileURL)(n+(s.endsWith(rr.default.sep)?"/":"")),e.search=a,e.hash=u}return e}function _m(e,t,r){return new lm(e,t&&(0,C.fileURLToPath)(new C.URL(".",t)),(0,C.fileURLToPath)(r))}function Vi(e,t,r){return new hm((0,C.fileURLToPath)(new C.URL(".",t)),e,r&&(0,C.fileURLToPath)(r))}function ym(e,t,r,s,i){let n=`request is not a valid match in pattern "${t}" for the "${s?"imports":"exports"}" resolution of ${(0,C.fileURLToPath)(r)}`;throw new Xr(e,n,i&&(0,C.fileURLToPath)(i))}function er(e,t,r,s,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new cm((0,C.fileURLToPath)(new C.URL(".",r)),e,t,s,i&&(0,C.fileURLToPath)(i))}function vm(e,t,r,s,i,n,a,u,c){if(t!==""&&!n&&e[e.length-1]!=="/")throw er(r,e,s,a,i);if(!e.startsWith("./")){if(a&&!e.startsWith("../")&&!e.startsWith("/")){let p=!1;try{new C.URL(e),p=!0}catch{}if(!p){let d=n?Kr.call(Yr,e,()=>t):e+t;return wc(d,s,c)}}throw er(r,e,s,a,i)}if(oc.exec(e.slice(2))!==null)if(uc.exec(e.slice(2))===null){if(!u){let p=n?r.replace("*",()=>t):r+t,d=n?Kr.call(Yr,e,()=>t):e;lc(d,p,r,s,a,i,!0)}}else throw er(r,e,s,a,i);let f=new C.URL(e,s),l=f.pathname,h=new C.URL(".",s).pathname;if(!l.startsWith(h))throw er(r,e,s,a,i);if(t==="")return f;if(oc.exec(t)!==null){let p=n?r.replace("*",()=>t):r+t;if(uc.exec(t)===null){if(!u){let d=n?Kr.call(Yr,e,()=>t):e;lc(d,p,r,s,a,i,!1)}}else ym(p,r,s,a,i)}return n?new C.URL(Kr.call(Yr,f.href,()=>t)):new C.URL(t,f)}function bm(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Nt(e,t,r,s,i,n,a,u,c){if(typeof t=="string")return vm(t,r,s,e,i,n,a,u,c);if(Array.isArray(t)){let f=t;if(f.length===0)return null;let l,h=-1;for(;++h<f.length;){let p=f[h],d;try{d=Nt(e,p,r,s,i,n,a,u,c)}catch(R){let L=R;if(l=L,L.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw R}if(d!==void 0){if(d===null){l=null;continue}return d}}if(l==null)return null;throw l}if(typeof t=="object"&&t!==null){let f=Object.getOwnPropertyNames(t),l=-1;for(;++l<f.length;){let h=f[l];if(bm(h))throw new _c((0,C.fileURLToPath)(e),i,'"exports" cannot contain numeric property keys.')}for(l=-1;++l<f.length;){let h=f[l];if(h==="default"||c&&c.has(h)){let p=t[h],d=Nt(e,p,r,s,i,n,a,u,c);if(d===void 0)continue;return d}}return null}if(t===null)return null;throw er(s,t,e,a,i)}function wm(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let s=Object.getOwnPropertyNames(e),i=!1,n=0,a=-1;for(;++a<s.length;){let u=s[a],c=u===""||u[0]!==".";if(n++===0)i=c;else if(i!==c)throw new _c((0,C.fileURLToPath)(t),r,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}function Cm(e,t,r){if(ct.default.noDeprecation)return;let s=(0,C.fileURLToPath)(t);cc.has(s+"|"+e)||(cc.add(s+"|"+e),ct.default.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${r?` imported from ${(0,C.fileURLToPath)(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function fc(e,t,r,s,i){let n=r.exports;if(wm(n,e,s)&&(n={".":n}),yc.call(n,t)&&!t.includes("*")&&!t.endsWith("/")){let l=n[t],h=Nt(e,l,"",t,s,!1,!1,!1,i);if(h==null)throw Vi(t,e,s);return h}let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&t.startsWith(l.slice(0,h))){t.endsWith("/")&&Cm(t,e,s);let p=l.slice(h+1);t.length>=l.length&&t.endsWith(p)&&bc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=t.slice(h,t.length-p.length))}}if(a){let l=n[a],h=Nt(e,l,u,a,s,!0,!1,t.endsWith("/"),i);if(h==null)throw Vi(t,e,s);return h}throw Vi(t,e,s)}function bc(e,t){let r=e.indexOf("*"),s=t.indexOf("*"),i=r===-1?e.length:r+1,n=s===-1?t.length:s+1;return i>n?-1:n>i||r===-1?1:s===-1||e.length>t.length?-1:t.length>e.length?1:0}function km(e,t,r){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new Xr(e,n,(0,C.fileURLToPath)(t))}let s,i=Gi(t);if(i.exists){s=(0,C.pathToFileURL)(i.pjsonPath);let n=i.imports;if(n)if(yc.call(n,e)&&!e.includes("*")){let a=Nt(s,n[e],"",e,t,!1,!0,!1,r);if(a!=null)return a}else{let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&e.startsWith(l.slice(0,-1))){let p=l.slice(h+1);e.length>=l.length&&e.endsWith(p)&&bc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=e.slice(h,e.length-p.length))}}if(a){let l=n[a],h=Nt(s,l,u,a,t,!0,!0,!1,r);if(h!=null)return h}}}throw _m(e,s,t)}function Em(e,t){let r=e.indexOf("/"),s=!0,i=!1;e[0]==="@"&&(i=!0,r===-1||e.length===0?s=!1:r=e.indexOf("/",r+1));let n=r===-1?e:e.slice(0,r);if(pm.exec(n)!==null&&(s=!1),!s)throw new Xr(e,"is not a valid package name",(0,C.fileURLToPath)(t));let a="."+(r===-1?"":e.slice(r));return{packageName:n,packageSubpath:a,isScoped:i}}function wc(e,t,r){if(tr.builtinModules.includes(e))return new C.URL("node:"+e);let{packageName:s,packageSubpath:i,isScoped:n}=Em(e,t),a=Gi(t);if(a.exists){let l=(0,C.pathToFileURL)(a.pjsonPath);if(a.name===s&&a.exports!==void 0&&a.exports!==null)return fc(l,i,a,t,r)}let u=new C.URL("./node_modules/"+s+"/package.json",t),c=(0,C.fileURLToPath)(u),f;do{let l=vc(c.slice(0,-13));if(!l||!l.isDirectory()){f=c,u=new C.URL((n?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",u),c=(0,C.fileURLToPath)(u);continue}let h=xc(c,{base:t,specifier:e});return h.exports!==void 0&&h.exports!==null?fc(u,i,h,t,r):i==="."?gm(u,h,t):new C.URL(i,u)}while(c.length!==f.length);throw new Wi(s,(0,C.fileURLToPath)(t),!1)}function Sm(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Am(e){return e===""?!1:e[0]==="/"?!0:Sm(e)}function Tm(e,t,r,s){let i=t.protocol,a=i==="data:"||i==="http:"||i==="https:",u;if(Am(e))try{u=new C.URL(e,t)}catch(c){let f=new ac(e,t);throw f.cause=c,f}else if(i==="file:"&&e[0]==="#")u=km(e,t,r);else try{u=new C.URL(e)}catch(c){if(a&&!tr.builtinModules.includes(e)){let f=new ac(e,t);throw f.cause=c,f}u=wc(e,t,r)}return(0,tt.default)(u!==void 0,"expected to be defined"),u.protocol!=="file:"?u:xm(u,t)}function Qr(e){return typeof e=="string"&&!e.startsWith("file://")?Bi(e):Bi((0,C.fileURLToPath)(e))}function ji(e){return(0,C.pathToFileURL)(Qr(e)).toString()}function Om(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:mc.has(e)?"node:"+e:"file://"+encodeURI(Bi(e))}var Rm=new Set(["node","import"]),Pm=[".mjs",".cjs",".js",".json"],Im=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function pc(e,t,r){try{return Tm(e,t,r)}catch(s){if(!Im.has(s?.code))throw s}}function Nm(e,t={}){if(typeof e!="string")if(e instanceof URL)e=Qr(e);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(e))return e;if(mc.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=Qr(e)),$i(e))try{if((0,rt.statSync)(e).isFile())return ji(e)}catch(a){if(a?.code!=="ENOENT")throw a}let r=t.conditions?new Set(t.conditions):Rm,s=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(a=>new URL(Om(a.toString())));s.length===0&&s.push(new URL(ji(process.cwd())));let i=[...s];for(let a of s)a.protocol==="file:"&&i.push(new URL("./",a),new URL(Di(a.pathname,"_index.js"),a),new URL("node_modules",a));let n;for(let a of i){if(n=pc(e,a,r),n)break;for(let u of["","/index"]){for(let c of t.extensions||Pm)if(n=pc(Di(e,u)+c,a,r),n)break;if(n)break}if(n)break}if(!n){let a=new Error(`Cannot find module ${e} imported from ${i.join(", ")}`);throw a.code="ERR_MODULE_NOT_FOUND",a}return ji(n)}function Lm(e,t){return Nm(e,t)}function Cc(e,t){return Qr(Lm(e,t))}_();_();var kc=Symbol.for("quansync.getIsAsync"),Zr=class extends Error{constructor(t="Unexpected promise in sync context"){super(t),this.name="QuansyncError"}};function qi(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Dm(e){return e&&typeof e=="object"&&typeof e[Symbol.iterator]=="function"&&"__quansync"in e}function zi(e){let t=function*(...s){return(yield kc)?yield e.async.apply(this,s):e.sync.apply(this,s)};function r(...s){let i=t.apply(this,s);return i.then=(...n)=>e.async.apply(this,s).then(...n),i.__quansync=!0,i}return r.sync=e.sync,r.async=e.async,r}function $m(e){return zi({async:()=>Promise.resolve(e),sync:()=>{if(qi(e))throw new Zr;return e}})}function Hi(e,t){if(e===kc)return t;if(Dm(e))return t?Ac(e):Sc(e);if(!t&&qi(e))throw new Zr;return e}var Ec=e=>e;function Sc(e,t=Ec){let r=e.next();for(;!r.done;)try{r=e.next(Hi(t(r.value,!1)))}catch(s){r=e.throw(s)}return Hi(r.value)}async function Ac(e,t=Ec){let r=e.next();for(;!r.done;)try{r=e.next(await Hi(t(r.value,!0),!0))}catch(s){r=e.throw(s)}return r.value}function Fm(e,t){return zi({name:e.name,async(...r){return Ac(e.apply(this,r),t?.onYield)},sync(...r){return Sc(e.apply(this,r),t?.onYield)}})}function Ki(e,t){return qi(e)?$m(e):typeof e=="function"?Fm(e,t):zi(e)}var J0=Ki({async:()=>Promise.resolve(!0),sync:()=>!1});var Lt=Ki;var Jr=e=>e instanceof URL?(0,Pc.fileURLToPath)(e):e;async function Mm(e,{cwd:t=_t.default.cwd(),type:r="file",stopAt:s}={}){let i=ne.default.resolve(Jr(t)??""),{root:n}=ne.default.parse(i);s=ne.default.resolve(i,Jr(s??n));let a=ne.default.isAbsolute(e);for(;i;){let u=a?e:ne.default.join(i,e);try{let c=await Rc.default.stat(u);if(r==="file"&&c.isFile()||r==="directory"&&c.isDirectory())return u}catch{}if(i===s||i===n)break;i=ne.default.dirname(i)}}function Vm(e,{cwd:t=_t.default.cwd(),type:r="file",stopAt:s}={}){let i=ne.default.resolve(Jr(t)??""),{root:n}=ne.default.parse(i);s=ne.default.resolve(i,Jr(s)??n);let a=ne.default.isAbsolute(e);for(;i;){let u=a?e:ne.default.join(i,e);try{let c=Dt.default.statSync(u,{throwIfNoEntry:!1});if(r==="file"&&c?.isFile()||r==="directory"&&c?.isDirectory())return u}catch{}if(i===s||i===n)break;i=ne.default.dirname(i)}}function Tc(e,t={}){if((t.platform==="auto"||!t.platform)&&(t.platform=_t.default.platform==="win32"?"win32":"posix"),_t.default.versions.pnp){let s=t.paths||[];s.length===0&&s.push(_t.default.cwd());let i=(0,Oc.createRequire)($);try{return i.resolve(e,{paths:s})}catch{}}let r=Cc(e,{url:t.paths});return t.platform==="win32"?ne.win32.normalize(r):r}function Ic(e,t={}){return!!Lc(e,t)}function jm(e,t={}){let r=Lc(e,t);if(r)return Um(r)}var Nc=Lt({async:e=>Dt.default.promises.readFile(e,"utf8"),sync:e=>Dt.default.readFileSync(e,"utf8")}),Bm=Lt(function*(e,t={}){let r=jm(e,t);if(!r)return;let s=JSON.parse(yield Nc(r));return{name:e,version:s.version,rootPath:(0,ne.dirname)(r),packageJsonPath:r,packageJson:s}}),ux=Bm.sync;function Lc(e,t={}){try{return Tc(`${e}/package.json`,t)}catch{}try{return Tc(e,t)}catch(r){return r.code!=="MODULE_NOT_FOUND"&&r.code!=="ERR_MODULE_NOT_FOUND"&&console.error(r),!1}}function Um(e){let t;for(;;){if(!e)return;let r=(0,ne.dirname)(e);if(r===e)return;if(e=r,t=(0,ne.join)(e,"package.json"),Dt.default.existsSync(t))break}return t}var Gm=Lt({sync:Vm,async:Mm}),Dc=Lt(function*(e=_t.default.cwd()){let t=yield Gm("package.json",{cwd:e});return!t||!Dt.default.existsSync(t)?null:JSON.parse(yield Nc(t))}),cx=Dc.sync,Wm=Lt(function*(e,t){let r=(yield Dc(t))||{};return e in(r.dependencies||{})||e in(r.devDependencies||{})}),lx=Wm.sync;_();var $c=require("child_process"),sr=ie(bs(),1),Z={info:e=>console.log(sr.default.blue(`\u25CF ${e}`)),success:e=>console.log(sr.default.green(`\u2713 ${e}`)),warn:e=>console.log(sr.default.yellow(`\u25B2 ${e}`)),error:e=>console.log(sr.default.red(`\u2717 ${e}`))};function Yi(e,t={}){try{return(0,$c.execSync)(e,{stdio:"inherit",...t})}catch(r){throw Z.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${e}`),r}}function Fc(){let e=process.env.npm_config_user_agent||"";return e.startsWith("pnpm")?"pnpm":e.startsWith("yarn")?"yarn":"npm"}_();var Mc={postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"},Vc=["simple-git-hooks","commitizen","cz-conventional-changelog","lint-staged","@commitlint/cli","@commitlint/config-conventional","@lntvow/eslint-config","eslint","prettier","npm-run-all","bumpp"];_();var $t=ie(require("fs"),1),es=ie(require("path"),1);function Qi(e,t){if($t.default.statSync(e).isDirectory()){if(es.default.basename(e)==="node_modules")return;$t.default.mkdirSync(t,{recursive:!0}),$t.default.readdirSync(e).forEach(s=>{Qi(es.default.resolve(e,s),es.default.resolve(t,s))})}else{if($t.default.existsSync(t))return;$t.default.copyFileSync(e,t)}}var Uc=require("url");ts.default.extend(Bc.default);ts.default.tz.setDefault("Asia/Shanghai");var Hm=(0,Uc.fileURLToPath)($),qm=(0,nr.dirname)(Hm);Mt.name(pu).version(du,"-v, --version","output the version number");Mt.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(async e=>{Z.success("Init project by @lntvow/dev"),Z.info(`Cwd is ${process.cwd()}`);let{temp:t,git:r,scripts:s}=e;try{Qm(),t&&zm(),s&&Ym(),r&&Km(),Z.success("Project initialization completed successfully!")}catch(i){Z.error(`Initialization failed: ${i.message}`),process.exit(1)}});function zm(){Z.info("Copying template files..."),Qi((0,nr.resolve)(qm,"./configs"),process.cwd()),Z.success("Template files copied successfully")}function Km(){if(!Ic("simple-git-hooks")){Z.warn("simple-git-hooks not installed, skipping initialization");return}try{Z.info("Initializing Git hooks..."),Yi("npx simple-git-hooks"),Z.success("Git hooks initialized successfully")}catch(e){Z.error(`Failed to initialize Git hooks: ${e.message}`)}}function Ym(){Z.info("Updating package.json scripts...");let e=(0,nr.resolve)(process.cwd(),"package.json"),t;try{t=(0,ir.readFileSync)(e,"utf-8");let r=JSON.parse(t),s={...r,scripts:{...Mc,...r.scripts}};(0,ir.writeFileSync)(e,JSON.stringify(s,null,2)),Z.success("Package.json scripts updated successfully")}catch(r){t&&(0,ir.writeFileSync)(e,t),Z.error(`Failed to update package.json: ${r.message}`),process.exit(1)}}function Qm(){try{let e=Vc.map(s=>`${s}@latest`).join(" "),t=Fc(),r="";t==="pnpm"?r=`pnpm add -D ${e}`:t==="yarn"?r=`yarn add -D ${e}`:r=`npm install -D ${e}`,Z.info(`Installing dependencies: ${r}`),Yi(r),Z.success("Dependencies installed successfully")}catch(e){Z.error(`Dependency installation failed: ${e.message}`),process.exit(1)}}Mt.command("release").description("git release").action(async()=>{console.log(jc.default.green("Release project..."));try{await Xm(),Z.success("Release completed successfully!")}catch(e){Z.error(`Release failed: ${e.message}`),process.exit(1)}});async function Xm(){let e=hu(process.cwd());try{let t=(0,ts.default)().format("YYYYMMDD HH:mm");await e.pull(),await e.add("."),await e.commit(t,["--no-verify"]),await e.push("origin"),Z.success(`\u63D0\u4EA4\u6210\u529F: ${t}`)}catch(t){Z.error(`Git\u64CD\u4F5C\u5931\u8D25: ${t.message}`),process.exit(1)}}Mt.parse();
45
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function vc(e){try{return(0,rt.statSync)(e)}catch{}}function Mi(e){let t=(0,rt.statSync)(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function gm(e,t,r){let s;if(t.main!==void 0){if(s=new C.URL(t.main,e),Mi(s))return s;let a=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<a.length&&(s=new C.URL(a[u],e),!Mi(s));)s=void 0;if(s)return hc(s,e,r,t.main),s}let i=["./index.js","./index.json","./index.node"],n=-1;for(;++n<i.length&&(s=new C.URL(i[n],e),!Mi(s));)s=void 0;if(s)return hc(s,e,r,t.main),s;throw new Wi((0,C.fileURLToPath)(new C.URL(".",e)),(0,C.fileURLToPath)(r))}function xm(e,t,r){if(dm.exec(e.pathname)!==null)throw new Xr(e.pathname,'must not include encoded "/" or "\\" characters',(0,C.fileURLToPath)(t));let s;try{s=(0,C.fileURLToPath)(e)}catch(n){let a=n;throw Object.defineProperty(a,"input",{value:String(e)}),Object.defineProperty(a,"module",{value:String(t)}),a}let i=vc(s.endsWith("/")?s.slice(-1):s);if(i&&i.isDirectory()){let n=new fm(s,(0,C.fileURLToPath)(t));throw n.url=String(e),n}if(!i||!i.isFile()){let n=new Wi(s||e.pathname,t&&(0,C.fileURLToPath)(t),!0);throw n.url=String(e),n}{let n=(0,rt.realpathSync)(s),{search:a,hash:u}=e;e=(0,C.pathToFileURL)(n+(s.endsWith(rr.default.sep)?"/":"")),e.search=a,e.hash=u}return e}function _m(e,t,r){return new lm(e,t&&(0,C.fileURLToPath)(new C.URL(".",t)),(0,C.fileURLToPath)(r))}function Vi(e,t,r){return new hm((0,C.fileURLToPath)(new C.URL(".",t)),e,r&&(0,C.fileURLToPath)(r))}function ym(e,t,r,s,i){let n=`request is not a valid match in pattern "${t}" for the "${s?"imports":"exports"}" resolution of ${(0,C.fileURLToPath)(r)}`;throw new Xr(e,n,i&&(0,C.fileURLToPath)(i))}function er(e,t,r,s,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new cm((0,C.fileURLToPath)(new C.URL(".",r)),e,t,s,i&&(0,C.fileURLToPath)(i))}function vm(e,t,r,s,i,n,a,u,c){if(t!==""&&!n&&e[e.length-1]!=="/")throw er(r,e,s,a,i);if(!e.startsWith("./")){if(a&&!e.startsWith("../")&&!e.startsWith("/")){let p=!1;try{new C.URL(e),p=!0}catch{}if(!p){let d=n?Kr.call(Yr,e,()=>t):e+t;return wc(d,s,c)}}throw er(r,e,s,a,i)}if(oc.exec(e.slice(2))!==null)if(uc.exec(e.slice(2))===null){if(!u){let p=n?r.replace("*",()=>t):r+t,d=n?Kr.call(Yr,e,()=>t):e;lc(d,p,r,s,a,i,!0)}}else throw er(r,e,s,a,i);let f=new C.URL(e,s),l=f.pathname,h=new C.URL(".",s).pathname;if(!l.startsWith(h))throw er(r,e,s,a,i);if(t==="")return f;if(oc.exec(t)!==null){let p=n?r.replace("*",()=>t):r+t;if(uc.exec(t)===null){if(!u){let d=n?Kr.call(Yr,e,()=>t):e;lc(d,p,r,s,a,i,!1)}}else ym(p,r,s,a,i)}return n?new C.URL(Kr.call(Yr,f.href,()=>t)):new C.URL(t,f)}function bm(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Nt(e,t,r,s,i,n,a,u,c){if(typeof t=="string")return vm(t,r,s,e,i,n,a,u,c);if(Array.isArray(t)){let f=t;if(f.length===0)return null;let l,h=-1;for(;++h<f.length;){let p=f[h],d;try{d=Nt(e,p,r,s,i,n,a,u,c)}catch(R){let L=R;if(l=L,L.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw R}if(d!==void 0){if(d===null){l=null;continue}return d}}if(l==null)return null;throw l}if(typeof t=="object"&&t!==null){let f=Object.getOwnPropertyNames(t),l=-1;for(;++l<f.length;){let h=f[l];if(bm(h))throw new _c((0,C.fileURLToPath)(e),i,'"exports" cannot contain numeric property keys.')}for(l=-1;++l<f.length;){let h=f[l];if(h==="default"||c&&c.has(h)){let p=t[h],d=Nt(e,p,r,s,i,n,a,u,c);if(d===void 0)continue;return d}}return null}if(t===null)return null;throw er(s,t,e,a,i)}function wm(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let s=Object.getOwnPropertyNames(e),i=!1,n=0,a=-1;for(;++a<s.length;){let u=s[a],c=u===""||u[0]!==".";if(n++===0)i=c;else if(i!==c)throw new _c((0,C.fileURLToPath)(t),r,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}function Cm(e,t,r){if(ct.default.noDeprecation)return;let s=(0,C.fileURLToPath)(t);cc.has(s+"|"+e)||(cc.add(s+"|"+e),ct.default.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${s}${r?` imported from ${(0,C.fileURLToPath)(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function fc(e,t,r,s,i){let n=r.exports;if(wm(n,e,s)&&(n={".":n}),yc.call(n,t)&&!t.includes("*")&&!t.endsWith("/")){let l=n[t],h=Nt(e,l,"",t,s,!1,!1,!1,i);if(h==null)throw Vi(t,e,s);return h}let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&t.startsWith(l.slice(0,h))){t.endsWith("/")&&Cm(t,e,s);let p=l.slice(h+1);t.length>=l.length&&t.endsWith(p)&&bc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=t.slice(h,t.length-p.length))}}if(a){let l=n[a],h=Nt(e,l,u,a,s,!0,!1,t.endsWith("/"),i);if(h==null)throw Vi(t,e,s);return h}throw Vi(t,e,s)}function bc(e,t){let r=e.indexOf("*"),s=t.indexOf("*"),i=r===-1?e.length:r+1,n=s===-1?t.length:s+1;return i>n?-1:n>i||r===-1?1:s===-1||e.length>t.length?-1:t.length>e.length?1:0}function km(e,t,r){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new Xr(e,n,(0,C.fileURLToPath)(t))}let s,i=Gi(t);if(i.exists){s=(0,C.pathToFileURL)(i.pjsonPath);let n=i.imports;if(n)if(yc.call(n,e)&&!e.includes("*")){let a=Nt(s,n[e],"",e,t,!1,!0,!1,r);if(a!=null)return a}else{let a="",u="",c=Object.getOwnPropertyNames(n),f=-1;for(;++f<c.length;){let l=c[f],h=l.indexOf("*");if(h!==-1&&e.startsWith(l.slice(0,-1))){let p=l.slice(h+1);e.length>=l.length&&e.endsWith(p)&&bc(a,l)===1&&l.lastIndexOf("*")===h&&(a=l,u=e.slice(h,e.length-p.length))}}if(a){let l=n[a],h=Nt(s,l,u,a,t,!0,!0,!1,r);if(h!=null)return h}}}throw _m(e,s,t)}function Em(e,t){let r=e.indexOf("/"),s=!0,i=!1;e[0]==="@"&&(i=!0,r===-1||e.length===0?s=!1:r=e.indexOf("/",r+1));let n=r===-1?e:e.slice(0,r);if(pm.exec(n)!==null&&(s=!1),!s)throw new Xr(e,"is not a valid package name",(0,C.fileURLToPath)(t));let a="."+(r===-1?"":e.slice(r));return{packageName:n,packageSubpath:a,isScoped:i}}function wc(e,t,r){if(tr.builtinModules.includes(e))return new C.URL("node:"+e);let{packageName:s,packageSubpath:i,isScoped:n}=Em(e,t),a=Gi(t);if(a.exists){let l=(0,C.pathToFileURL)(a.pjsonPath);if(a.name===s&&a.exports!==void 0&&a.exports!==null)return fc(l,i,a,t,r)}let u=new C.URL("./node_modules/"+s+"/package.json",t),c=(0,C.fileURLToPath)(u),f;do{let l=vc(c.slice(0,-13));if(!l||!l.isDirectory()){f=c,u=new C.URL((n?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",u),c=(0,C.fileURLToPath)(u);continue}let h=xc(c,{base:t,specifier:e});return h.exports!==void 0&&h.exports!==null?fc(u,i,h,t,r):i==="."?gm(u,h,t):new C.URL(i,u)}while(c.length!==f.length);throw new Wi(s,(0,C.fileURLToPath)(t),!1)}function Sm(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function Am(e){return e===""?!1:e[0]==="/"?!0:Sm(e)}function Tm(e,t,r,s){let i=t.protocol,a=i==="data:"||i==="http:"||i==="https:",u;if(Am(e))try{u=new C.URL(e,t)}catch(c){let f=new ac(e,t);throw f.cause=c,f}else if(i==="file:"&&e[0]==="#")u=km(e,t,r);else try{u=new C.URL(e)}catch(c){if(a&&!tr.builtinModules.includes(e)){let f=new ac(e,t);throw f.cause=c,f}u=wc(e,t,r)}return(0,tt.default)(u!==void 0,"expected to be defined"),u.protocol!=="file:"?u:xm(u,t)}function Qr(e){return typeof e=="string"&&!e.startsWith("file://")?Bi(e):Bi((0,C.fileURLToPath)(e))}function ji(e){return(0,C.pathToFileURL)(Qr(e)).toString()}function Om(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:mc.has(e)?"node:"+e:"file://"+encodeURI(Bi(e))}var Rm=new Set(["node","import"]),Pm=[".mjs",".cjs",".js",".json"],Im=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function pc(e,t,r){try{return Tm(e,t,r)}catch(s){if(!Im.has(s?.code))throw s}}function Nm(e,t={}){if(typeof e!="string")if(e instanceof URL)e=Qr(e);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(e))return e;if(mc.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=Qr(e)),$i(e))try{if((0,rt.statSync)(e).isFile())return ji(e)}catch(a){if(a?.code!=="ENOENT")throw a}let r=t.conditions?new Set(t.conditions):Rm,s=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(a=>new URL(Om(a.toString())));s.length===0&&s.push(new URL(ji(process.cwd())));let i=[...s];for(let a of s)a.protocol==="file:"&&i.push(new URL("./",a),new URL(Di(a.pathname,"_index.js"),a),new URL("node_modules",a));let n;for(let a of i){if(n=pc(e,a,r),n)break;for(let u of["","/index"]){for(let c of t.extensions||Pm)if(n=pc(Di(e,u)+c,a,r),n)break;if(n)break}if(n)break}if(!n){let a=new Error(`Cannot find module ${e} imported from ${i.join(", ")}`);throw a.code="ERR_MODULE_NOT_FOUND",a}return ji(n)}function Lm(e,t){return Nm(e,t)}function Cc(e,t){return Qr(Lm(e,t))}_();_();var kc=Symbol.for("quansync.getIsAsync"),Zr=class extends Error{constructor(t="Unexpected promise in sync context"){super(t),this.name="QuansyncError"}};function qi(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Dm(e){return e&&typeof e=="object"&&typeof e[Symbol.iterator]=="function"&&"__quansync"in e}function zi(e){let t=function*(...s){return(yield kc)?yield e.async.apply(this,s):e.sync.apply(this,s)};function r(...s){let i=t.apply(this,s);return i.then=(...n)=>e.async.apply(this,s).then(...n),i.__quansync=!0,i}return r.sync=e.sync,r.async=e.async,r}function $m(e){return zi({async:()=>Promise.resolve(e),sync:()=>{if(qi(e))throw new Zr;return e}})}function Hi(e,t){if(e===kc)return t;if(Dm(e))return t?Ac(e):Sc(e);if(!t&&qi(e))throw new Zr;return e}var Ec=e=>e;function Sc(e,t=Ec){let r=e.next();for(;!r.done;)try{r=e.next(Hi(t(r.value,!1)))}catch(s){r=e.throw(s)}return Hi(r.value)}async function Ac(e,t=Ec){let r=e.next();for(;!r.done;)try{r=e.next(await Hi(t(r.value,!0),!0))}catch(s){r=e.throw(s)}return r.value}function Fm(e,t){return zi({name:e.name,async(...r){return Ac(e.apply(this,r),t?.onYield)},sync(...r){return Sc(e.apply(this,r),t?.onYield)}})}function Ki(e,t){return qi(e)?$m(e):typeof e=="function"?Fm(e,t):zi(e)}var J0=Ki({async:()=>Promise.resolve(!0),sync:()=>!1});var Lt=Ki;var Jr=e=>e instanceof URL?(0,Pc.fileURLToPath)(e):e;async function Mm(e,{cwd:t=_t.default.cwd(),type:r="file",stopAt:s}={}){let i=ne.default.resolve(Jr(t)??""),{root:n}=ne.default.parse(i);s=ne.default.resolve(i,Jr(s??n));let a=ne.default.isAbsolute(e);for(;i;){let u=a?e:ne.default.join(i,e);try{let c=await Rc.default.stat(u);if(r==="file"&&c.isFile()||r==="directory"&&c.isDirectory())return u}catch{}if(i===s||i===n)break;i=ne.default.dirname(i)}}function Vm(e,{cwd:t=_t.default.cwd(),type:r="file",stopAt:s}={}){let i=ne.default.resolve(Jr(t)??""),{root:n}=ne.default.parse(i);s=ne.default.resolve(i,Jr(s)??n);let a=ne.default.isAbsolute(e);for(;i;){let u=a?e:ne.default.join(i,e);try{let c=Dt.default.statSync(u,{throwIfNoEntry:!1});if(r==="file"&&c?.isFile()||r==="directory"&&c?.isDirectory())return u}catch{}if(i===s||i===n)break;i=ne.default.dirname(i)}}function Tc(e,t={}){if((t.platform==="auto"||!t.platform)&&(t.platform=_t.default.platform==="win32"?"win32":"posix"),_t.default.versions.pnp){let s=t.paths||[];s.length===0&&s.push(_t.default.cwd());let i=(0,Oc.createRequire)($);try{return i.resolve(e,{paths:s})}catch{}}let r=Cc(e,{url:t.paths});return t.platform==="win32"?ne.win32.normalize(r):r}function Ic(e,t={}){return!!Lc(e,t)}function jm(e,t={}){let r=Lc(e,t);if(r)return Um(r)}var Nc=Lt({async:e=>Dt.default.promises.readFile(e,"utf8"),sync:e=>Dt.default.readFileSync(e,"utf8")}),Bm=Lt(function*(e,t={}){let r=jm(e,t);if(!r)return;let s=JSON.parse(yield Nc(r));return{name:e,version:s.version,rootPath:(0,ne.dirname)(r),packageJsonPath:r,packageJson:s}}),ux=Bm.sync;function Lc(e,t={}){try{return Tc(`${e}/package.json`,t)}catch{}try{return Tc(e,t)}catch(r){return r.code!=="MODULE_NOT_FOUND"&&r.code!=="ERR_MODULE_NOT_FOUND"&&console.error(r),!1}}function Um(e){let t;for(;;){if(!e)return;let r=(0,ne.dirname)(e);if(r===e)return;if(e=r,t=(0,ne.join)(e,"package.json"),Dt.default.existsSync(t))break}return t}var Gm=Lt({sync:Vm,async:Mm}),Dc=Lt(function*(e=_t.default.cwd()){let t=yield Gm("package.json",{cwd:e});return!t||!Dt.default.existsSync(t)?null:JSON.parse(yield Nc(t))}),cx=Dc.sync,Wm=Lt(function*(e,t){let r=(yield Dc(t))||{};return e in(r.dependencies||{})||e in(r.devDependencies||{})}),lx=Wm.sync;_();var $c=require("child_process"),sr=ie(bs(),1),Z={info:e=>console.log(sr.default.blue(`\u25CF ${e}`)),success:e=>console.log(sr.default.green(`\u2713 ${e}`)),warn:e=>console.log(sr.default.yellow(`\u25B2 ${e}`)),error:e=>console.log(sr.default.red(`\u2717 ${e}`))};function Yi(e,t={}){try{return(0,$c.execSync)(e,{stdio:"inherit",...t})}catch(r){throw Z.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${e}`),r}}function Fc(){let e=process.env.npm_config_user_agent||"";return e.startsWith("pnpm")?"pnpm":e.startsWith("yarn")?"yarn":"npm"}_();var Mc={postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc"},Vc=["simple-git-hooks","commitizen","cz-conventional-changelog","lint-staged","@commitlint/cli","@commitlint/config-conventional","@lntvow/eslint-config","eslint","prettier","npm-run-all","bumpp"];_();var $t=ie(require("fs"),1),es=ie(require("path"),1);function Qi(e,t){if($t.default.statSync(e).isDirectory()){if(es.default.basename(e)==="node_modules")return;$t.default.mkdirSync(t,{recursive:!0}),$t.default.readdirSync(e).forEach(s=>{Qi(es.default.resolve(e,s),es.default.resolve(t,s))})}else{if($t.default.existsSync(t))return;$t.default.copyFileSync(e,t)}}var Uc=require("url");ts.default.extend(Bc.default);ts.default.tz.setDefault("Asia/Shanghai");var Hm=(0,Uc.fileURLToPath)($),qm=(0,nr.dirname)(Hm);Mt.name(pu).version(du,"-v, --version","output the version number");Mt.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").description("init project").action(async e=>{Z.success("Init project by @lntvow/dev"),Z.info(`Cwd is ${process.cwd()}`);let{temp:t,git:r,scripts:s}=e;try{Qm(),t&&zm(),s&&Ym(),r&&Km(),Z.success("Project initialization completed successfully!")}catch(i){Z.error(`Initialization failed: ${i.message}`),process.exit(1)}});function zm(){Z.info("Copying template files..."),Qi((0,nr.resolve)(qm,"./configs"),process.cwd()),Z.success("Template files copied successfully")}function Km(){if(!Ic("simple-git-hooks")){Z.warn("simple-git-hooks not installed, skipping initialization");return}try{Z.info("Initializing Git hooks..."),Yi("npx simple-git-hooks"),Z.success("Git hooks initialized successfully")}catch(e){Z.error(`Failed to initialize Git hooks: ${e.message}`)}}function Ym(){Z.info("Updating package.json scripts...");let e=(0,nr.resolve)(process.cwd(),"package.json"),t;try{t=(0,ir.readFileSync)(e,"utf-8");let r=JSON.parse(t),s={...r,scripts:{...Mc,...r.scripts}};(0,ir.writeFileSync)(e,JSON.stringify(s,null,2)),Z.success("Package.json scripts updated successfully")}catch(r){t&&(0,ir.writeFileSync)(e,t),Z.error(`Failed to update package.json: ${r.message}`),process.exit(1)}}function Qm(){try{let e=Vc.map(s=>`${s}@latest`).join(" "),t=Fc(),r="";t==="pnpm"?r=`pnpm add -D ${e}`:t==="yarn"?r=`yarn add -D ${e}`:r=`npm install -D ${e}`,Z.info(`Installing dependencies: ${r}`),Yi(r),Z.success("Dependencies installed successfully")}catch(e){Z.error(`Dependency installation failed: ${e.message}`),process.exit(1)}}Mt.command("release").description("git release").action(async()=>{console.log(jc.default.green("Release project..."));try{await Xm(),Z.success("Release completed successfully!")}catch(e){Z.error(`Release failed: ${e.message}`),process.exit(1)}});async function Xm(){let e=hu(process.cwd());try{let t=(0,ts.default)().format("YYYYMMDD HH:mm");await e.pull(),await e.add("."),await e.commit(t,["--no-verify"]),await e.push("origin"),Z.success(`\u63D0\u4EA4\u6210\u529F: ${t}`)}catch(t){Z.error(`Git\u64CD\u4F5C\u5931\u8D25: ${t.message}`),process.exit(1)}}Mt.parse();