create-seedcord 0.5.0-next.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +32 -36
  2. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -123,19 +123,19 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
123
123
  `,s=this.lastTerminalHeight,c=xl({isStdoutTty:i,viewportRows:a,previousViewportRows:s,previousOutputHeight:this.lastOutputHeight,nextOutputHeight:t,isUnmounting:this.isUnmounting});if(this.lastTerminalHeight=a,c||r||o!==this.lastOutputToRender||this.log.isCursorDirty()){if(this.log.setCursorPosition(this.cursorPosition),c){let r=this.shouldSync();if(r&&this.options.stdout.write(oc),this.alternateScreen)this.options.stdout.write(bl+this.fullStaticOutput+o);else if(this.lastOutputHeight>=a){let e=bl,t=this.log.getCursorPosition();!yl&&t&&a<s&&(e=(t.y>0?Ht(t.y):``)+Bt(0)+`\x1B[J`),this.options.stdout.write(e+n+o)}else this.log.clear(),this.options.stdout.write(n+o);this.lastOutput=e,this.lastOutputToRender=o,this.lastOutputHeight=t,this.log.sync(o),r&&this.options.stdout.write(sc);return}if(r){let e=this.shouldSync();e&&this.options.stdout.write(oc),this.log.clear(),this.options.stdout.write(n),this.log(o),e&&this.options.stdout.write(sc)}else this.throttledLog(o);this.lastOutput=e,this.lastOutputToRender=o,this.lastOutputHeight=t}}initKittyKeyboard(){if(!this.options.kittyKeyboard)return;let e=this.options.kittyKeyboard,t=e.mode??`auto`;if(t===`disabled`)return;let n=e.flags??[`disambiguateEscapeCodes`];if(t===`enabled`){Gc(this.options.stdin)&&this.options.stdout.isTTY&&this.enableKittyProtocol(n);return}this.interactive&&Gc(this.options.stdin)&&this.options.stdout.isTTY&&this.confirmKittySupport(n)}confirmKittySupport(e){let t=t=>{this.finishKittyDetection=void 0,clearTimeout(n),t&&!this.isUnmounted&&this.enableKittyProtocol(e)},n=setTimeout(()=>{t(!1)},200);this.finishKittyDetection=t,this.options.stdout.write(`\x1B[?u`)}enableKittyProtocol(e){this.options.stdout.write(`\u{1B}[>${wc(e)}u`),this.kittyProtocolEnabled=!0,this.kittyFlags=e}beginSuspend(){if(this.interactive){if(this.isSuspended)throw Error(`The terminal is already suspended. Resume the current suspension before suspending again.`);if(this.finishKittyDetection?.(!1),this.isSuspended=!0,!(!this.interactive||this.isUnmounted||this.isUnmounting))try{let{stdout:e}=this.options,{canWriteToStdout:t}=Cl(e);wl(this.throttledOnRender,t),wl(this.throttledLog,t),t&&(this.log.clear(),this.log.done(),this.kittyProtocolEnabled&&=(this.writeBestEffort(this.options.stdout,`\x1B[<u`),!1),this.alternateScreen&&this.writeBestEffort(this.options.stdout,qt)),this.pauseInput?.()}catch(e){this.isSuspended=!1;try{this.resumeInput?.()}catch{}throw e}}}async endSuspend(){if(!this.isSuspended||(this.isSuspended=!1,!this.interactive||this.isUnmounted||this.isUnmounting))return;this.resumeInput?.();let{stdout:e}=this.options,{canWriteToStdout:t}=Cl(e);t&&(this.alternateScreen&&this.writeBestEffort(this.options.stdout,Kt+(this.options.debug?``:this.fullStaticOutput)),this.kittyFlags&&(this.writeBestEffort(this.options.stdout,`\u{1B}[>${wc(this.kittyFlags)}u`),this.kittyProtocolEnabled=!0)),this.lastOutput=``,this.lastOutputToRender=``,this.lastOutputHeight=0,this.log.reset();try{this.calculateLayout(),this.onRender(),await this.waitUntilRenderFlush()}catch{}}render(e){let t=L.createElement(sl,{value:{isScreenReaderEnabled:this.isScreenReaderEnabled}},L.createElement(hl,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,exitOnCtrlC:this.options.exitOnCtrlC,interactive:this.interactive,renderThrottleMs:this.renderThrottleMs,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,setCursorPosition:this.setCursorPosition,onExit:this.handleAppExit,onWaitUntilRenderFlush:this.waitUntilRenderFlush,onSuspendTerminal:this.suspendTerminal,onRegisterInputControl:this.registerInputControl,onKittyQueryResponse:this.handleKittyQueryResponse},L.createElement(gl,{value:this.rootNode},e)));this.options.concurrent?gs.updateContainer(t,this.container,null,_l):(gs.updateContainerSync(t,this.container,null,_l),gs.flushSyncWork())}writeToStdout(e){if(this.isUnmounted||this.isSuspended)return;if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(!this.interactive){this.options.stdout.write(e);return}let t=this.shouldSync();t&&this.options.stdout.write(oc),this.log.clear(),this.options.stdout.write(e),this.restoreLastOutput(),t&&this.options.stdout.write(sc)}writeToStderr(e){if(this.isUnmounted||this.isSuspended)return;if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(!this.interactive){this.options.stderr.write(e);return}let t=this.shouldSync();t&&this.options.stdout.write(oc),this.log.clear(),this.options.stderr.write(e),this.restoreLastOutput(),t&&this.options.stdout.write(sc)}unmount(e){if(this.isUnmounted||this.isUnmounting)return;this.isUnmounting=!0,this.beforeExitHandler&&=(c.off(`beforeExit`,this.beforeExitHandler),void 0);let{stdout:t}=this.options,{canWriteToStdout:n}=Cl(t);wl(this.throttledOnRender,n),n&&(!this.throttledOnRender||!this.hasPendingThrottledRender&&!this.hasRenderedStaticOutput)&&(this.calculateLayout(),this.onRender()),this.isUnmounted=!0,this.unsubscribeExit(),wl(this.throttledLog,n),typeof this.restoreConsole==`function`&&this.restoreConsole();let r=()=>{typeof this.unsubscribeResize==`function`&&this.unsubscribeResize(),this.finishKittyDetection?.(!1),n&&(this.kittyProtocolEnabled&&=(this.writeBestEffort(this.options.stdout,`\x1B[<u`),!1),this.interactive&&!this.options.debug&&this.log.done(),this.alternateScreen&&=(this.writeBestEffort(this.options.stdout,qt),this.writeBestEffort(this.options.stdout,zs),!1),this.interactive||this.options.stdout.write(this.options.debug?`
124
124
  `:this.lastOutput+`
125
125
  `)),this.kittyProtocolEnabled=!1,lc.delete(this.options.stdout),this.rootNode.yogaNode?.free(),this.rootNode.yogaNode=void 0;let{exitResult:t}=this,r=()=>{Sl(e)?this.rejectExitPromise(e):this.resolveExitPromise(t)};e!==void 0&&!Sl(e)?r():n?this.options.stdout.write(``,r):setImmediate(r)},i=gs;this.options.concurrent?(gs.updateContainerSync(null,this.container,null,_l),gs.flushSyncWork(),i.flushPassiveEffects?.(),r()):(gs.updateContainerSync(null,this.container,null,_l),gs.flushSyncWork(),r())}async waitUntilExit(){return!this.isUnmounting&&!this.beforeExitHandler&&(this.beforeExitHandler=()=>{this.unmount()},c.once(`beforeExit`,this.beforeExitHandler)),this.exitPromise}async waitUntilRenderFlush(){if(this.isUnmounted||this.isUnmounting){await this.awaitExit();return}if(await vl(),this.isUnmounted||this.isUnmounting){await this.awaitExit();return}if(this.isConcurrent&&this.hasPendingConcurrentWork()&&(await Promise.race([this.awaitNextRender(),this.awaitExit()]),this.isUnmounted||this.isUnmounting)){this.nextRenderCommit=void 0,await this.awaitExit();return}gs.flushSyncWork();let{stdout:e}=this.options,{canWriteToStdout:t}=Cl(e);if(wl(this.throttledOnRender,t),wl(this.throttledLog,t),t){await new Promise(e=>{this.options.stdout.write(``,()=>{e()})});return}await vl()}clear(){this.interactive&&!this.options.debug&&(this.log.clear(),this.lastOutputHeight=0)}patchConsole(){this.options.debug||(this.restoreConsole=nn((e,t)=>{e===`stdout`?this.writeToStdout(t):e===`stderr`&&(t.startsWith(`The above error occurred`)||this.writeToStderr(t))}))}registerInputControl(e,t){this.pauseInput=e,this.resumeInput=t}async suspendTerminal(e){if(this.beginSuspend(),e){try{await e()}finally{await this.endSuspend()}return}let t=!1,n=async()=>{t||(t=!0,await this.endSuspend())};return{resume:n,[Symbol.asyncDispose]:n}}};const El=(e,t)=>{let{stdout:n=c.stdout,stdin:r=c.stdin,stderr:i=c.stderr,exitOnCtrlC:a=!0,patchConsole:o=!0,...s}=Dl(t),l={stdout:n,stdin:r,stderr:i,debug:!1,exitOnCtrlC:a,patchConsole:o,maxFps:30,incrementalRendering:!1,concurrent:!1,alternateScreen:!1,...s},u=Ol(l.stdout,()=>new Tl(l));return u.render(e),{rerender:u.render,unmount(){u.unmount()},waitUntilExit:u.waitUntilExit,waitUntilRenderFlush:u.waitUntilRenderFlush,cleanup(){u.unmount()},clear:u.clear}},Dl=(e={})=>e instanceof m?{stdout:e,stdin:c.stdin}:e,Ol=(e,t)=>{let n=lc.get(e);if(n===void 0){let n=t();return lc.set(e,n),n}return c.stderr.write(`Warning: render() was called again for the same stdout before the previous Ink instance was unmounted. Reusing stdout across multiple render() calls is unsupported. Call unmount() first.
126
- `),n},kl=()=>(0,L.use)(Xc),Al=(e,t={})=>{let{setRawMode:n,internal_exitOnCtrlC:r,internal_eventEmitter:i}=kl();(0,L.useEffect)(()=>{if(t.isActive!==!1)return n(!0),()=>{n(!1)}},[t.isActive,n]);let a=(0,L.useEffectEvent)(t=>{let n=Wc(t),i={upArrow:n.name===`up`,downArrow:n.name===`down`,leftArrow:n.name===`left`,rightArrow:n.name===`right`,pageDown:n.name===`pagedown`,pageUp:n.name===`pageup`,home:n.name===`home`,end:n.name===`end`,return:n.name===`return`,escape:n.name===`escape`,ctrl:n.ctrl,shift:n.shift,tab:n.name===`tab`,backspace:n.name===`backspace`,delete:n.name===`delete`,meta:n.meta,super:n.super??!1,hyper:n.hyper??!1,capsLock:n.capsLock??!1,numLock:n.numLock??!1,eventType:n.eventType},a;a=n.isKittyProtocol?n.isPrintable?n.text??n.name:``:n.ctrl?n.name===`space`?` `:n.name??``:n.sequence,!n.isKittyProtocol&&Ac.includes(n.name)&&(a=``),a.startsWith(`\x1B`)&&(a=a.slice(1)),!n.isKittyProtocol&&a.length===1&&/[A-Z]/.test(a)&&(i.shift=!0),!(r&&n.name===`c`&&i.ctrl&&n.eventType!==`release`)&&gs.discreteUpdates(()=>{e(a,i)})});(0,L.useEffect)(()=>{if(t.isActive!==!1)return i.on(`input`,a),()=>{i.removeListener(`input`,a)}},[t.isActive,i])};var jl=/* @__PURE__ */ le((/* @__PURE__ */ j(((e,t)=>{let n=(e,t)=>e>t?1:e<t?-1:0,r=1/0,i=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),a=`eexxaacctt`,o=/\p{P}/gu,s=[`en`,{numeric:!0,sensitivity:`base`}],c=(e,t,n)=>e.replace(`A-Z`,t).replace(`a-z`,n),l={unicode:!1,alpha:null,interSplit:`[^A-Za-z\\d']+`,intraSplit:`[a-z][A-Z]`,interBound:`[^A-Za-z\\d]`,intraBound:`[A-Za-z]\\d|\\d[A-Za-z]|[a-z][A-Z]`,interLft:0,interRgt:0,interChars:`.`,interIns:r,intraChars:`[a-z\\d']`,intraIns:null,intraContr:`'[a-z]{1,2}\\b`,intraMode:0,intraSlice:[1,r],intraSub:null,intraTrn:null,intraDel:null,intraFilt:(e,t,n)=>!0,toUpper:e=>e.toLocaleUpperCase(),toLower:e=>e.toLocaleLowerCase(),compare:null,sort:(e,t,r,i=n)=>{let{idx:a,chars:o,terms:s,interLft2:c,interLft1:l,start:u,intraIns:d,interIns:f,cases:p}=e;return a.map((e,t)=>t).sort((e,n)=>o[n]-o[e]||d[e]-d[n]||s[n]+c[n]+.5*l[n]-(s[e]+c[e]+.5*l[e])||f[e]-f[n]||u[e]-u[n]||p[n]-p[e]||i(t[a[e]],t[a[n]]))}},u=(e,t)=>t==0?``:t==1?e+`??`:t==r?e+`*?`:e+`{0,${t}}?`,d=`(?:\\b|_)`;function f(e){e=Object.assign({},l,e);let{unicode:t,interLft:r,interRgt:f,intraMode:p,intraSlice:h,intraIns:g,intraSub:_,intraTrn:v,intraDel:y,intraContr:b,intraSplit:x,interSplit:S,intraBound:C,interBound:w,intraChars:T,toUpper:ee,toLower:te,compare:E}=e;g??=p,_??=p,v??=p,y??=p,E??=typeof Intl>`u`?n:new Intl.Collator(...s).compare;let D=e.letters??e.alpha;if(D!=null){let e=ee(D),t=te(D);S=c(S,e,t),x=c(x,e,t),w=c(w,e,t),C=c(C,e,t),T=c(T,e,t),b=c(b,e,t)}let O=t?`u`:``,k=`".+?"`,ne=RegExp(k,`gi`+O),re=RegExp(`(?:\\s+|^)-(?:${T}+|${k})`,`gi`+O),{intraRules:ie}=e;ie??=e=>{let t=l.intraSlice,n=0,r=0,i=0,a=0;if(/[^\d]/.test(e)){let o=e.length;o<=4?o>=3&&(i=Math.min(v,1),o==4&&(n=Math.min(g,1))):(t=h,n=g,r=_,i=v,a=y)}return{intraSlice:t,intraIns:n,intraSub:r,intraTrn:i,intraDel:a}};let A=!!x,ae=new RegExp(x,`g`+O),oe=new RegExp(S,`g`+O),se=RegExp(`^`+S+`|`+S+`$`,`g`+O),j=new RegExp(b,`gi`+O),ce=(e,t=!1)=>{let n=[];e=e.replace(ne,e=>(n.push(e),a)),e=e.replace(se,``),t||(e=te(e)),A&&(e=e.replace(ae,e=>e[0]+` `+e[1]));let r=0;return e.split(oe).filter(e=>e!=``).map(e=>e===a?n[r++]:e)},le=/[^\d]+|\d+/g,ue=(t,n=0,a=!1)=>{let o=ce(t);if(o.length==0)return[];let s=Array(o.length).fill(``);o=o.map((e,t)=>e.replace(j,e=>(s[t]=e,``)));let c;if(p==1)c=o.map((e,t)=>{if(e[0]===`"`)return i(e.slice(1,-1));let n=``;for(let r of e.matchAll(le)){let e=r[0],{intraSlice:i,intraIns:a,intraSub:o,intraTrn:c,intraDel:l}=ie(e);if(a+o+c+l==0)n+=e+s[t];else{let[r,d]=i,f=e.slice(0,r),p=e.slice(d),m=e.slice(r,d);a==1&&f.length==1&&f!=m[0]&&(f+=`(?!`+f+`)`);let h=m.length,g=[e];if(o)for(let e=0;e<h;e++)g.push(f+m.slice(0,e)+T+m.slice(e+1)+p);if(c)for(let e=0;e<h-1;e++)m[e]!=m[e+1]&&g.push(f+m.slice(0,e)+m[e+1]+m[e]+m.slice(e+2)+p);if(l)for(let e=0;e<h;e++)g.push(f+m.slice(0,e+1)+`?`+m.slice(e+1)+p);if(a){let e=u(T,1);for(let t=0;t<h;t++)g.push(f+m.slice(0,t)+e+m.slice(t)+p)}n+=`(?:`+g.join(`|`)+`)`+s[t]}}return n});else{let e=u(T,g);n==2&&g>0&&(e=`)(`+e+`)(`),c=o.map((t,n)=>t[0]===`"`?i(t.slice(1,-1)):t.split(``).map((e,t,n)=>(g==1&&t==0&&n.length>1&&e!=n[t+1]&&(e+=`(?!`+e+`)`),e)).join(e)+s[n])}let l=r==2?d:``,m=f==2?d:``,h=m+u(e.interChars,e.interIns)+l;return n>0?a?c=l+`(`+c.join(`)`+m+`|`+l+`(`)+`)`+m:(c=`(`+c.join(`)(`+h+`)(`)+`)`,c=`(.??`+l+`)`+c+`(`+m+`.*)`):(c=c.join(h),c=l+c+m),[new RegExp(c,`i`+O),o,s]},de=(e,t,n)=>{let[r]=ue(t);if(r==null)return null;let i=[];if(n!=null)for(let t=0;t<n.length;t++){let a=n[t];r.test(e[a])&&i.push(a)}else for(let t=0;t<e.length;t++)r.test(e[t])&&i.push(t);return i},M=!!C,fe=new RegExp(w,O),pe=new RegExp(C,O),me=(t,n,i)=>{let[a,o,s]=ue(i,1),c=ce(i,!0),[l]=ue(i,2),u=o.length,d=Array(u),p=Array(u);for(let e=0;e<u;e++){let t=o[e],n=c[e],r=t[0]==`"`?t.slice(1,-1):t+s[e],i=n[0]==`"`?n.slice(1,-1):n+s[e];d[e]=r,p[e]=i}let m=t.length,h=Array(m).fill(0),g={idx:Array(m),start:h.slice(),chars:h.slice(),cases:h.slice(),terms:h.slice(),interIns:h.slice(),intraIns:h.slice(),interLft2:h.slice(),interRgt2:h.slice(),interLft1:h.slice(),interRgt1:h.slice(),ranges:Array(m)},_=r==1||f==1,v=0;for(let i=0;i<t.length;i++){let o=n[t[i]],s=o.match(a),c=s.index+s[1].length,m=c,h=!1,y=0,b=0,x=0,S=0,C=0,w=0,T=0,ee=0,E=0,D=[];for(let t=0,n=2;t<u;t++,n+=2){let i=te(s[n]),a=d[t],l=p[t],g=a.length,v=i.length,k=i==a;if(s[n]==l&&T++,!k&&s[n+1].length>=g){let e=te(s[n+1]).indexOf(a);e>-1&&(D.push(m,v,e,g),m+=he(s,n,e,g),i=a,v=g,k=!0,t==0&&(c=m))}if(_||k){let e=m-1,l=m+v,u=!1,d=!1;if(e==-1||fe.test(o[e]))k&&y++,u=!0;else{if(r==2){h=!0;break}if(M&&pe.test(o[e]+o[e+1]))k&&b++,u=!0;else if(r==1){let e=s[n+1],r=m+v;if(e.length>=g){let l=0,d=!1,f=new RegExp(a,`ig`+O),p;for(;p=f.exec(e);){l=p.index;let e=r+l,t=e-1;if(t==-1||fe.test(o[t])){y++,d=!0;break}if(pe.test(o[t]+o[e])){b++,d=!0;break}}d&&(u=!0,D.push(m,v,l,g),m+=he(s,n,l,g),i=a,v=g,k=!0,t==0&&(c=m))}if(!u){h=!0;break}}}if(l==o.length||fe.test(o[l]))k&&x++,d=!0;else{if(f==2){h=!0;break}if(M&&pe.test(o[l-1]+o[l]))k&&S++,d=!0;else if(f==1){h=!0;break}}k&&(C+=g,u&&d&&w++)}if(v>g&&(E+=v-g),t>0&&(ee+=s[n-1].length),!e.intraFilt(a,i,m)){h=!0;break}t<u-1&&(m+=v+s[n+1].length)}if(!h){g.idx[v]=t[i],g.interLft2[v]=y,g.interLft1[v]=b,g.interRgt2[v]=x,g.interRgt1[v]=S,g.chars[v]=C,g.terms[v]=w,g.cases[v]=T,g.interIns[v]=ee,g.intraIns[v]=E,g.start[v]=c;let e=o.match(l),n=e.index+e[1].length,r=D.length,a=r>0?0:1/0,s=r-4;for(let t=2;t<e.length;){let r=e[t].length;if(a<=s&&D[a]==n){let r=D[a+1],i=D[a+2],o=D[a+3],s=t,c=``;for(let t=0;t<r;s++)c+=e[s],t+=e[s].length;e.splice(t,s-t,c),n+=he(e,t,i,o),a+=4}else n+=r,t++}n=e.index+e[1].length;let u=g.ranges[v]=[],d=n,f=n;for(let t=2;t<e.length;t++){let r=e[t].length;n+=r,t%2==0?f=n:r>0&&(u.push(d,f),d=f=n)}f>d&&u.push(d,f),v++}}if(v<t.length)for(let e in g)g[e]=g[e].slice(0,v);return g},he=(e,t,n,r)=>{let i=e[t]+e[t+1].slice(0,n);return e[t-1]+=i,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),i.length},N=(t,n,r,a=1e3,s)=>{r=r?r===!0?5:r:0;let c=null,l=null,u=[];n=n.replace(re,e=>{let t=e.trim().slice(1);return t=t[0]===`"`?i(t.slice(1,-1)):t.replace(o,``),t!=``&&u.push(t),``});let d=ce(n),f;if(u.length>0){if(f=new RegExp(u.join(`|`),`i`+O),d.length==0){let e=[];for(let n=0;n<t.length;n++)f.test(t[n])||e.push(n);return[e,null,null]}}else if(d.length==0)return[null,null,null];if(r>0){let e=ce(n);if(e.length>1){let n=e.slice().sort((e,t)=>t.length-e.length);for(let e=0;e<n.length;e++){if(s?.length==0)return[[],null,null];s=de(t,n[e],s)}if(e.length>r)return[s,null,null];c=m(e).map(e=>e.join(` `)),l=[];let i=/* @__PURE__ */ new Set;for(let e=0;e<c.length;e++)if(i.size<s.length){let n=s.filter(e=>!i.has(e)),r=de(t,c[e],n);for(let e=0;e<r.length;e++)i.add(r[e]);l.push(r)}else l.push([])}}c??(c=[n],l=[s?.length>0?s:de(t,n)]);let p=null,h=null;if(u.length>0&&(l=l.map(e=>e.filter(e=>!f.test(t[e])))),l.reduce((e,t)=>e+t.length,0)<=a){p={},h=[];for(let n=0;n<l.length;n++){let r=l[n];if(r==null||r.length==0)continue;let i=c[n],a=me(r,t,i),o=e.sort(a,t,i,E);if(n>0)for(let e=0;e<o.length;e++)o[e]+=h.length;for(let e in a)p[e]=(p[e]??[]).concat(a[e]);h=h.concat(o)}}return[[].concat(...l),p,h]};return{search:(...e)=>N(...e),split:ce,filter:de,info:me,sort:e.sort}}let p=(()=>{let e={A:`ÁÀÃÂÄĄĂÅ`,a:`áàãâäąăå`,E:`ÉÈÊËĖĚ`,e:`éèêëęě`,I:`ÍÌÎÏĮİ`,i:`íìîïįı`,O:`ÓÒÔÕÖ`,o:`óòôõö`,U:`ÚÙÛÜŪŲŮŰ`,u:`úùûüūųůű`,C:`ÇČĆ`,c:`çčć`,D:`Ď`,d:`ď`,G:`Ğ`,g:`ğ`,L:`Ł`,l:`ł`,N:`ÑŃŇ`,n:`ñńň`,S:`ŠŚȘŞ`,s:`šśșş`,T:`ŢȚŤ`,t:`ţțť`,Y:`Ý`,y:`ý`,Z:`ŻŹŽ`,z:`żźž`},t={},n=``;for(let r in e)e[r].split(``).forEach(e=>{n+=e,t[e]=r});let r=RegExp(`[${n}]`,`g`),i=e=>t[e];return e=>{if(typeof e==`string`)return e.replace(r,i);let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n].replace(r,i);return t}})();function m(e){e=e.slice();let t=e.length,n=[e.slice()],r=Array(t).fill(0),i=1,a,o;for(;i<t;)r[i]<i?(a=i%2&&r[i],o=e[i],e[i]=e[a],e[a]=o,++r[i],i=1,n.push(e.slice())):(r[i]=0,++i);return n}let h=(e,t)=>t?`<mark>${e}</mark>`:e,g=(e,t)=>e+t;function _(e,t,n=h,r=``,i=g){r=i(r,n(e.substring(0,t[0]),!1))??r;for(let a=0;a<t.length;a+=2){let o=t[a],s=t[a+1];r=i(r,n(e.substring(o,s),!0))??r,a<t.length-3&&(r=i(r,n(e.substring(t[a+1],t[a+2]),!1))??r)}return r=i(r,n(e.substring(t[t.length-1]),!1))??r,r}f.latinize=p,f.permute=e=>m([...Array(e.length).keys()]).sort((e,t)=>{for(let n=0;n<e.length;n++)if(e[n]!=t[n])return e[n]-t[n];return 0}).map(t=>t.map(t=>e[t])),f.highlight=_,t.exports=f})))(),1);const Ml=new Intl.Segmenter(void 0,{granularity:`grapheme`});var Nl=class e{text;caret;constructor(e,t){this.text=e,this.caret=t}static empty(){return new e(``,0)}get before(){return this.text.slice(0,this.caret)}get after(){return this.text.slice(this.caret)}insert(t){return new e(this.before+t+this.after,this.caret+t.length)}deleteBack(){return this.cut(this.charStartBefore(),this.caret)}deleteForward(){return this.cut(this.caret,this.charEndAfter())}deleteWordBack(){return this.cut(this.wordStartBefore(),this.caret)}deleteWordForward(){return this.cut(this.caret,this.wordEndAfter())}deleteToStart(){return this.cut(0,this.caret)}deleteToEnd(){return this.cut(this.caret,this.text.length)}left(){return this.moveTo(this.charStartBefore())}right(){return this.moveTo(this.charEndAfter())}wordLeft(){return this.moveTo(this.wordStartBefore())}wordRight(){return this.moveTo(this.wordEndAfter())}start(){return this.moveTo(0)}end(){return this.moveTo(this.text.length)}masked(t){let n=e=>[...Ml.segment(e)].length;return new e(t.repeat(n(this.text)),t.length*n(this.before))}get atCaret(){let[e]=Ml.segment(this.after);return e?.segment??``}charStartBefore(){return[...Ml.segment(this.before)].at(-1)?.index??0}charEndAfter(){return this.caret+this.atCaret.length}wordStartBefore(){return this.before.trimEnd().search(/\S*$/u)}wordEndAfter(){return this.caret+(/^\s*\S*/u.exec(this.after)?.[0].length??0)}moveTo(t){return new e(this.text,t)}cut(t,n){return new e(this.text.slice(0,t)+this.text.slice(n),t)}};const Pl=e=>({input:t,key:n})=>n.ctrl&&t===e,Fl=e=>({input:t,key:n})=>n.meta&&t===e,Il=e=>e.ctrl||e.meta,Ll=[[({key:e})=>e.backspace&&Il(e),e=>e.deleteWordBack()],[Pl(`w`),e=>e.deleteWordBack()],[({key:e})=>e.backspace&&!Il(e),e=>e.deleteBack()],[({key:e})=>e.delete&&Il(e),e=>e.deleteWordForward()],[Fl(`d`),e=>e.deleteWordForward()],[({key:e})=>e.delete&&!Il(e),e=>e.deleteForward()],[Pl(`u`),e=>e.deleteToStart()],[Pl(`k`),e=>e.deleteToEnd()],[({key:e})=>e.leftArrow&&Il(e),e=>e.wordLeft()],[Fl(`b`),e=>e.wordLeft()],[({key:e})=>e.rightArrow&&Il(e),e=>e.wordRight()],[Fl(`f`),e=>e.wordRight()],[({key:e})=>e.leftArrow&&!Il(e),e=>e.left()],[({key:e})=>e.rightArrow&&!Il(e),e=>e.right()],[({key:e})=>e.home,e=>e.start()],[Pl(`a`),e=>e.start()],[({key:e})=>e.end,e=>e.end()],[Pl(`e`),e=>e.end()]];function Rl({input:e,key:t}){return e!==``&&!t.ctrl&&!t.meta&&!t.tab&&!t.return&&!t.escape}function zl(e,t){let n=Ll.find(([e])=>e(t));return n?n[1](e):Rl(t)?e.insert(t.input):e}var Bl=class e{items;index;constructor(e,t=0){this.items=e,this.index=t}get current(){return this.items[this.index]}window(e){let t=this.index-Math.floor(e/2),n=Math.max(0,this.items.length-e),r=Math.min(Math.max(t,0),n);return{start:r,items:this.items.slice(r,r+e)}}next(){return this.step(1)}previous(){return this.step(-1)}step(t){let{length:n}=this.items;return n===0?this:new e(this.items,(this.index+t+n)%n)}};function Vl(e,t){return e.toLowerCase().includes(t.trim().toLowerCase())}const Hl=new jl.default({intraIns:1/0,intraChars:String.raw`[a-z\d' ]`}),Ul=new jl.default({intraMode:1});function Wl(e,t,n){let[r,i,a]=e.search(t,n,3);return i?a.flatMap(e=>i.idx[e]??[]):r??[]}function Gl(e,t){if(t.trim()===``)return e;let n=e.map(e=>e.label),r=/* @__PURE__ */ new Set([...Wl(Hl,n,t),...Wl(Ul,n,t)]);for(let[n,i]of e.entries())(Vl(i.label,t)||Vl(i.value,t))&&r.add(n);return[...r].flatMap(t=>e[t]??[])}const Kl={question:`?`,cursor:`❯`,picked:`■`,unpicked:`□`},ql=` `.repeat(Kl.cursor.length+1);function Jl(e){return`${I.sky(Kl.question)} ${e}`}function Yl(e,t){return t?` ${I.sky(Kl.cursor)} ${I.sky.bold(e)}`:` ${ql}${e}`}function Xl(e,t){return t?`${e} ${I.mute(t)}`:e}function Zl(e){return e?I.mint(Kl.picked):I.mute(Kl.unpicked)}function Ql(e,t){let n=e.atCaret||` `,r=e.text===``?I.mute(t):I.sky(e.after.slice(e.atCaret.length));return`${I.sky(e.before)}${I.sky.inverse(n)}${r}`}function $l(e){return Object.entries(e).map(([e,t])=>`${I.sky(e)} ${I.mute(t)}`).join(` `)}function eu({input:e,key:t}){return t.escape||t.ctrl&&e===`c`}function tu(e,t,n){if(t.outcome)return t;if(eu(n))return{...t,outcome:{kind:`cancelled`}};if(!n.key.return)return{state:e.press(t.state,n)};let r=e.submit(t.state);return`stay`in r?{state:r.stay}:{...t,outcome:{kind:`answered`,answer:r.answer}}}const nu=/\r\n|\r|\n/u;function ru({input:e,key:t}){if(t.return||!nu.test(e))return[{input:e,key:t}];let n={input:`\r`,key:{...t,return:!0}};return e.split(nu).flatMap((e,r)=>{let i=e===``?[]:[{input:e,key:t}];return r===0?i:[n,...i]})}function iu(e,t){let[{state:n,outcome:r},i]=(0,L.useReducer)((t,n)=>tu(e,t,n),{state:e.initial});return Al((e,t)=>{for(let n of ru({input:e,key:t}))i(n)},{isActive:!r}),(0,L.useEffect)(()=>{r&&t(r)},[r,t]),n}function au(e,t){let n=n=>{let r=t?.(n),i=Gl(e,n);return new Bl(r?[r,...i]:i)};return{initial:{filter:Nl.empty(),cursor:n(``)},press:(e,t)=>{let{key:r}=t;if(r.upArrow)return{...e,cursor:e.cursor.previous()};if(r.downArrow)return{...e,cursor:e.cursor.next()};let i=zl(e.filter,t);return i.text===e.filter.text?{...e,filter:i}:{filter:i,cursor:n(i.text)}},submit:e=>e.cursor.current?{answer:e.cursor.current.value}:{stay:e}}}const ou=$l({"↑↓":`move`,enter:`pick`});function su({message:e,placeholder:t=`type to search`,choices:n,typedChoice:r,onEnd:i}){let{filter:a,cursor:o}=iu((0,L.useMemo)(()=>au(n,r),[n,r]),i),{start:s,items:c}=o.window(8);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e),` `,Ql(a,t)),c.map((e,t)=>/* @__PURE__ */ L.createElement(W,{key:e.value},Xl(Yl(e.label,s+t===o.index),e.hint))),/* @__PURE__ */ L.createElement(ll,{paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,ou)))}function cu(e,t){let n=new Set(e);return n.delete(t)||n.add(t),n}function lu(e,t){return e.flatMap(e=>t.has(e.value)?[e.value]:[])}function uu(e){return{initial:{cursor:new Bl(e),picked:/* @__PURE__ */ new Set},press:(e,{input:t,key:n})=>{if(n.upArrow)return{...e,cursor:e.cursor.previous()};if(n.downArrow)return{...e,cursor:e.cursor.next()};let r=e.cursor.current;return t===` `&&r?{...e,picked:cu(e.picked,r.value)}:e},submit:({picked:t})=>({answer:lu(e,t)})}}const du=$l({"↑↓":`move`,space:`toggle`,enter:`done`});function fu({message:e,choices:t,onEnd:n}){let{cursor:r,picked:i}=iu((0,L.useMemo)(()=>uu(t),[t]),n);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e)),t.map((e,t)=>/* @__PURE__ */ L.createElement(W,{key:e.value},Xl(Yl(`${Zl(i.has(e.value))} ${e.label}`,t===r.index),e.hint))),/* @__PURE__ */ L.createElement(ll,{paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,du)))}function pu(e){return e.upArrow||e.downArrow||e.leftArrow||e.rightArrow}function mu(e){return{initial:e,press:(e,{input:t,key:n})=>{let r=t.toLowerCase();return r===`y`?!0:r===`n`?!1:pu(n)?!e:e},submit:e=>({answer:e})}}function hu(e,t){return t?I.sky.underline(e):I.mute(e)}function gu({message:e,initial:t=!1,onEnd:n}){let r=iu((0,L.useMemo)(()=>mu(t),[t]),n);return/* @__PURE__ */ L.createElement(ll,{paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e),` `,hu(`yes`,r),` `,I.mute(`/`),` `,hu(`no`,!r)))}function _u(e){return{initial:{filter:Nl.empty(),cursor:new Bl(e),picked:/* @__PURE__ */ new Set},press:(t,n)=>{let{key:r}=n;if(r.upArrow)return{...t,cursor:t.cursor.previous()};if(r.downArrow)return{...t,cursor:t.cursor.next()};let i=t.cursor.current;if(r.tab&&i)return{...t,picked:cu(t.picked,i.value)};let a=zl(t.filter,n);return a.text===t.filter.text?{...t,filter:a}:{...t,filter:a,cursor:new Bl(Gl(e,a.text))}},submit:({picked:t})=>({answer:lu(e,t)})}}const G=$l({"↑↓":`move`,tab:`toggle`,enter:`done`});function vu(e,t,n){let r=e=>I.iris(String(e));return`${r(e)} ${I.mute(`selected ·`)} ${r(t)} ${I.mute(`of`)} ${r(n)} ${I.mute(`match`)}`}function yu({message:e,choices:t,onEnd:n}){let{filter:r,cursor:i,picked:a}=iu((0,L.useMemo)(()=>_u(t),[t]),n),{start:o,items:s}=i.window(10);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e),` `,Ql(r,`type to search`)),s.map((e,t)=>{let n=`${Zl(a.has(e.value))} ${e.label}`;return/* @__PURE__ */ L.createElement(W,{key:e.value},Yl(n,o+t===i.index))}),/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,vu(a.size,i.items.length,t.length)),/* @__PURE__ */ L.createElement(W,null,G)))}function bu(e){return{initial:new Bl(e),press:(e,{key:t})=>t.upArrow?e.previous():t.downArrow?e.next():e,submit:e=>e.current?{answer:e.current.value}:{stay:e}}}function xu({message:e,choices:t,onEnd:n}){let r=iu((0,L.useMemo)(()=>bu(t),[t]),n);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e)),t.map((e,t)=>/* @__PURE__ */ L.createElement(W,{key:e.value},Xl(Yl(e.label,t===r.index),e.hint))))}function Su(e,t){return{initial:{line:Nl.empty()},press:({line:e},t)=>({line:zl(e,t)}),submit:({line:n,error:r})=>{if(n.text.trim()===``&&t!==void 0)return r===t?{answer:``}:{stay:{line:n,error:t}};let i=e?.(n.text);return i===void 0?{answer:n.text}:{stay:{line:n,error:i}}}}}function Cu({message:e,placeholder:t=``,validate:n,emptyWarning:r,masked:i=!1,onEnd:a}){let{line:o,error:s}=iu((0,L.useMemo)(()=>Su(n,r),[n,r]),a);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e),` `,Ql(i?o.masked(`•`):o,t)),s?/* @__PURE__ */ L.createElement(W,null,` ${I.amber(s)}`):null)}var wu=class{streams;constructor({stdin:e=process.stdin,stdout:t=process.stdout}={}){this.streams={stdin:e,stdout:t}}select(e){return this.ask(t=>/* @__PURE__ */ L.createElement(xu,{...e,onEnd:t}))}confirm(e){return this.ask(t=>/* @__PURE__ */ L.createElement(gu,{...e,onEnd:t}))}pickMany(e){return this.ask(t=>/* @__PURE__ */ L.createElement(yu,{...e,onEnd:t}))}checklist(e){return this.ask(t=>/* @__PURE__ */ L.createElement(fu,{...e,onEnd:t}))}autocomplete(e){return this.ask(t=>/* @__PURE__ */ L.createElement(su,{...e,onEnd:t}))}text(e){return this.ask(t=>/* @__PURE__ */ L.createElement(Cu,{...e,onEnd:t}))}password(e){return this.ask(t=>/* @__PURE__ */ L.createElement(Cu,{...e,masked:!0,onEnd:t}))}async ask(e){let t=Promise.withResolvers(),n=El(e(t.resolve),{...this.streams,interactive:!0,exitOnCtrlC:!1,patchConsole:!1}),r=await t.promise;if(await n.waitUntilRenderFlush(),n.clear(),n.unmount(),await n.waitUntilExit(),r.kind===`cancelled`)throw new yt(We.CliCancelled);return r.answer}},Tu={dots:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`]},dots2:{interval:80,frames:[`⣾`,`⣽`,`⣻`,`⢿`,`⡿`,`⣟`,`⣯`,`⣷`]},dots3:{interval:80,frames:[`⠋`,`⠙`,`⠚`,`⠞`,`⠖`,`⠦`,`⠴`,`⠲`,`⠳`,`⠓`]},dots4:{interval:80,frames:[`⠄`,`⠆`,`⠇`,`⠋`,`⠙`,`⠸`,`⠰`,`⠠`,`⠰`,`⠸`,`⠙`,`⠋`,`⠇`,`⠆`]},dots5:{interval:80,frames:[`⠋`,`⠙`,`⠚`,`⠒`,`⠂`,`⠂`,`⠒`,`⠲`,`⠴`,`⠦`,`⠖`,`⠒`,`⠐`,`⠐`,`⠒`,`⠓`,`⠋`]},dots6:{interval:80,frames:[`⠁`,`⠉`,`⠙`,`⠚`,`⠒`,`⠂`,`⠂`,`⠒`,`⠲`,`⠴`,`⠤`,`⠄`,`⠄`,`⠤`,`⠴`,`⠲`,`⠒`,`⠂`,`⠂`,`⠒`,`⠚`,`⠙`,`⠉`,`⠁`]},dots7:{interval:80,frames:[`⠈`,`⠉`,`⠋`,`⠓`,`⠒`,`⠐`,`⠐`,`⠒`,`⠖`,`⠦`,`⠤`,`⠠`,`⠠`,`⠤`,`⠦`,`⠖`,`⠒`,`⠐`,`⠐`,`⠒`,`⠓`,`⠋`,`⠉`,`⠈`]},dots8:{interval:80,frames:/* @__PURE__ */ `⠁.⠁.⠉.⠙.⠚.⠒.⠂.⠂.⠒.⠲.⠴.⠤.⠄.⠄.⠤.⠠.⠠.⠤.⠦.⠖.⠒.⠐.⠐.⠒.⠓.⠋.⠉.⠈.⠈`.split(`.`)},dots9:{interval:80,frames:[`⢹`,`⢺`,`⢼`,`⣸`,`⣇`,`⡧`,`⡗`,`⡏`]},dots10:{interval:80,frames:[`⢄`,`⢂`,`⢁`,`⡁`,`⡈`,`⡐`,`⡠`]},dots11:{interval:100,frames:[`⠁`,`⠂`,`⠄`,`⡀`,`⢀`,`⠠`,`⠐`,`⠈`]},dots12:{interval:80,frames:/* @__PURE__ */ `⢀⠀.⡀⠀.⠄⠀.⢂⠀.⡂⠀.⠅⠀.⢃⠀.⡃⠀.⠍⠀.⢋⠀.⡋⠀.⠍⠁.⢋⠁.⡋⠁.⠍⠉.⠋⠉.⠋⠉.⠉⠙.⠉⠙.⠉⠩.⠈⢙.⠈⡙.⢈⠩.⡀⢙.⠄⡙.⢂⠩.⡂⢘.⠅⡘.⢃⠨.⡃⢐.⠍⡐.⢋⠠.⡋⢀.⠍⡁.⢋⠁.⡋⠁.⠍⠉.⠋⠉.⠋⠉.⠉⠙.⠉⠙.⠉⠩.⠈⢙.⠈⡙.⠈⠩.⠀⢙.⠀⡙.⠀⠩.⠀⢘.⠀⡘.⠀⠨.⠀⢐.⠀⡐.⠀⠠.⠀⢀.⠀⡀`.split(`.`)},dots13:{interval:80,frames:[`⣼`,`⣹`,`⢻`,`⠿`,`⡟`,`⣏`,`⣧`,`⣶`]},dots14:{interval:80,frames:[`⠉⠉`,`⠈⠙`,`⠀⠹`,`⠀⢸`,`⠀⣰`,`⢀⣠`,`⣀⣀`,`⣄⡀`,`⣆⠀`,`⡇⠀`,`⠏⠀`,`⠋⠁`]},dots8Bit:{interval:80,frames:/* @__PURE__ */ `⠀.⠁.⠂.⠃.⠄.⠅.⠆.⠇.⡀.⡁.⡂.⡃.⡄.⡅.⡆.⡇.⠈.⠉.⠊.⠋.⠌.⠍.⠎.⠏.⡈.⡉.⡊.⡋.⡌.⡍.⡎.⡏.⠐.⠑.⠒.⠓.⠔.⠕.⠖.⠗.⡐.⡑.⡒.⡓.⡔.⡕.⡖.⡗.⠘.⠙.⠚.⠛.⠜.⠝.⠞.⠟.⡘.⡙.⡚.⡛.⡜.⡝.⡞.⡟.⠠.⠡.⠢.⠣.⠤.⠥.⠦.⠧.⡠.⡡.⡢.⡣.⡤.⡥.⡦.⡧.⠨.⠩.⠪.⠫.⠬.⠭.⠮.⠯.⡨.⡩.⡪.⡫.⡬.⡭.⡮.⡯.⠰.⠱.⠲.⠳.⠴.⠵.⠶.⠷.⡰.⡱.⡲.⡳.⡴.⡵.⡶.⡷.⠸.⠹.⠺.⠻.⠼.⠽.⠾.⠿.⡸.⡹.⡺.⡻.⡼.⡽.⡾.⡿.⢀.⢁.⢂.⢃.⢄.⢅.⢆.⢇.⣀.⣁.⣂.⣃.⣄.⣅.⣆.⣇.⢈.⢉.⢊.⢋.⢌.⢍.⢎.⢏.⣈.⣉.⣊.⣋.⣌.⣍.⣎.⣏.⢐.⢑.⢒.⢓.⢔.⢕.⢖.⢗.⣐.⣑.⣒.⣓.⣔.⣕.⣖.⣗.⢘.⢙.⢚.⢛.⢜.⢝.⢞.⢟.⣘.⣙.⣚.⣛.⣜.⣝.⣞.⣟.⢠.⢡.⢢.⢣.⢤.⢥.⢦.⢧.⣠.⣡.⣢.⣣.⣤.⣥.⣦.⣧.⢨.⢩.⢪.⢫.⢬.⢭.⢮.⢯.⣨.⣩.⣪.⣫.⣬.⣭.⣮.⣯.⢰.⢱.⢲.⢳.⢴.⢵.⢶.⢷.⣰.⣱.⣲.⣳.⣴.⣵.⣶.⣷.⢸.⢹.⢺.⢻.⢼.⢽.⢾.⢿.⣸.⣹.⣺.⣻.⣼.⣽.⣾.⣿`.split(`.`)},dotsCircle:{interval:80,frames:[`⢎ `,`⠎⠁`,`⠊⠑`,`⠈⠱`,` ⡱`,`⢀⡰`,`⢄⡠`,`⢆⡀`]},sand:{interval:80,frames:/* @__PURE__ */ `⠁.⠂.⠄.⡀.⡈.⡐.⡠.⣀.⣁.⣂.⣄.⣌.⣔.⣤.⣥.⣦.⣮.⣶.⣷.⣿.⡿.⠿.⢟.⠟.⡛.⠛.⠫.⢋.⠋.⠍.⡉.⠉.⠑.⠡.⢁`.split(`.`)},line:{interval:130,frames:[`-`,`\\`,`|`,`/`]},line2:{interval:100,frames:[`⠂`,`-`,`–`,`—`,`–`,`-`]},rollingLine:{interval:80,frames:[`/ `,` - `,` \\ `,` |`,` |`,` \\ `,` - `,`/ `]},pipe:{interval:100,frames:[`┤`,`┘`,`┴`,`└`,`├`,`┌`,`┬`,`┐`]},simpleDots:{interval:400,frames:[`. `,`.. `,`...`,` `]},simpleDotsScrolling:{interval:200,frames:[`. `,`.. `,`...`,` ..`,` .`,` `]},star:{interval:70,frames:[`✶`,`✸`,`✹`,`✺`,`✹`,`✷`]},star2:{interval:80,frames:[`+`,`x`,`*`]},flip:{interval:70,frames:[`_`,`_`,`_`,`-`,"`","`",`'`,`´`,`-`,`_`,`_`,`_`]},hamburger:{interval:100,frames:[`☱`,`☲`,`☴`]},growVertical:{interval:120,frames:[`▁`,`▃`,`▄`,`▅`,`▆`,`▇`,`▆`,`▅`,`▄`,`▃`]},growHorizontal:{interval:120,frames:[`▏`,`▎`,`▍`,`▌`,`▋`,`▊`,`▉`,`▊`,`▋`,`▌`,`▍`,`▎`]},balloon:{interval:140,frames:[` `,`.`,`o`,`O`,`@`,`*`,` `]},balloon2:{interval:120,frames:[`.`,`o`,`O`,`°`,`O`,`o`,`.`]},noise:{interval:100,frames:[`▓`,`▒`,`░`]},bounce:{interval:120,frames:[`⠁`,`⠂`,`⠄`,`⠂`]},boxBounce:{interval:120,frames:[`▖`,`▘`,`▝`,`▗`]},boxBounce2:{interval:100,frames:[`▌`,`▀`,`▐`,`▄`]},triangle:{interval:50,frames:[`◢`,`◣`,`◤`,`◥`]},binary:{interval:80,frames:[`010010`,`001100`,`100101`,`111010`,`111101`,`010111`,`101011`,`111000`,`110011`,`110101`]},arc:{interval:100,frames:[`◜`,`◠`,`◝`,`◞`,`◡`,`◟`]},circle:{interval:120,frames:[`◡`,`⊙`,`◠`]},squareCorners:{interval:180,frames:[`◰`,`◳`,`◲`,`◱`]},circleQuarters:{interval:120,frames:[`◴`,`◷`,`◶`,`◵`]},circleHalves:{interval:50,frames:[`◐`,`◓`,`◑`,`◒`]},squish:{interval:100,frames:[`╫`,`╪`]},toggle:{interval:250,frames:[`⊶`,`⊷`]},toggle2:{interval:80,frames:[`▫`,`▪`]},toggle3:{interval:120,frames:[`□`,`■`]},toggle4:{interval:100,frames:[`■`,`□`,`▪`,`▫`]},toggle5:{interval:100,frames:[`▮`,`▯`]},toggle6:{interval:300,frames:[`ဝ`,`၀`]},toggle7:{interval:80,frames:[`⦾`,`⦿`]},toggle8:{interval:100,frames:[`◍`,`◌`]},toggle9:{interval:100,frames:[`◉`,`◎`]},toggle10:{interval:100,frames:[`㊂`,`㊀`,`㊁`]},toggle11:{interval:50,frames:[`⧇`,`⧆`]},toggle12:{interval:120,frames:[`☗`,`☖`]},toggle13:{interval:80,frames:[`=`,`*`,`-`]},arrow:{interval:100,frames:[`←`,`↖`,`↑`,`↗`,`→`,`↘`,`↓`,`↙`]},arrow2:{interval:80,frames:[`⬆️ `,`↗️ `,`➡️ `,`↘️ `,`⬇️ `,`↙️ `,`⬅️ `,`↖️ `]},arrow3:{interval:120,frames:[`▹▹▹▹▹`,`▸▹▹▹▹`,`▹▸▹▹▹`,`▹▹▸▹▹`,`▹▹▹▸▹`,`▹▹▹▹▸`]},bouncingBar:{interval:80,frames:[`[ ]`,`[= ]`,`[== ]`,`[=== ]`,`[====]`,`[ ===]`,`[ ==]`,`[ =]`,`[ ]`,`[ =]`,`[ ==]`,`[ ===]`,`[====]`,`[=== ]`,`[== ]`,`[= ]`]},bouncingBall:{interval:80,frames:[`( ● )`,`( ● )`,`( ● )`,`( ● )`,`( ●)`,`( ● )`,`( ● )`,`( ● )`,`( ● )`,`(● )`]},smiley:{interval:200,frames:[`😄 `,`😝 `]},monkey:{interval:300,frames:[`🙈 `,`🙈 `,`🙉 `,`🙊 `]},hearts:{interval:100,frames:[`💛 `,`💙 `,`💜 `,`💚 `,`💗 `]},clock:{interval:100,frames:[`🕛 `,`🕐 `,`🕑 `,`🕒 `,`🕓 `,`🕔 `,`🕕 `,`🕖 `,`🕗 `,`🕘 `,`🕙 `,`🕚 `]},earth:{interval:180,frames:[`🌍 `,`🌎 `,`🌏 `]},material:{interval:17,frames:/* @__PURE__ */ `█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁.███████▁▁▁▁▁▁▁▁▁▁▁▁▁.████████▁▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.██████████▁▁▁▁▁▁▁▁▁▁.███████████▁▁▁▁▁▁▁▁▁.█████████████▁▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁▁██████████████▁▁▁▁.▁▁▁██████████████▁▁▁.▁▁▁▁█████████████▁▁▁.▁▁▁▁██████████████▁▁.▁▁▁▁██████████████▁▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁▁██████████████.▁▁▁▁▁▁██████████████.▁▁▁▁▁▁▁█████████████.▁▁▁▁▁▁▁█████████████.▁▁▁▁▁▁▁▁████████████.▁▁▁▁▁▁▁▁████████████.▁▁▁▁▁▁▁▁▁███████████.▁▁▁▁▁▁▁▁▁███████████.▁▁▁▁▁▁▁▁▁▁██████████.▁▁▁▁▁▁▁▁▁▁██████████.▁▁▁▁▁▁▁▁▁▁▁▁████████.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.██████▁▁▁▁▁▁▁▁▁▁▁▁▁█.████████▁▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.███████████▁▁▁▁▁▁▁▁▁.████████████▁▁▁▁▁▁▁▁.████████████▁▁▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁▁▁█████████████▁▁▁▁.▁▁▁▁▁████████████▁▁▁.▁▁▁▁▁████████████▁▁▁.▁▁▁▁▁▁███████████▁▁▁.▁▁▁▁▁▁▁▁█████████▁▁▁.▁▁▁▁▁▁▁▁█████████▁▁▁.▁▁▁▁▁▁▁▁▁█████████▁▁.▁▁▁▁▁▁▁▁▁█████████▁▁.▁▁▁▁▁▁▁▁▁▁█████████▁.▁▁▁▁▁▁▁▁▁▁▁████████▁.▁▁▁▁▁▁▁▁▁▁▁████████▁.▁▁▁▁▁▁▁▁▁▁▁▁███████▁.▁▁▁▁▁▁▁▁▁▁▁▁███████▁.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁`.split(`.`)},moon:{interval:80,frames:[`🌑 `,`🌒 `,`🌓 `,`🌔 `,`🌕 `,`🌖 `,`🌗 `,`🌘 `]},runner:{interval:140,frames:[`🚶 `,`🏃 `]},pong:{interval:80,frames:/* @__PURE__ */ `▐⠂ ▌.▐⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂▌.▐ ⠠▌.▐ ⡀▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐⠠ ▌`.split(`.`)},shark:{interval:120,frames:/* @__PURE__ */ `▐|\\____________▌.▐_|\\___________▌.▐__|\\__________▌.▐___|\\_________▌.▐____|\\________▌.▐_____|\\_______▌.▐______|\\______▌.▐_______|\\_____▌.▐________|\\____▌.▐_________|\\___▌.▐__________|\\__▌.▐___________|\\_▌.▐____________|\\▌.▐____________/|▌.▐___________/|_▌.▐__________/|__▌.▐_________/|___▌.▐________/|____▌.▐_______/|_____▌.▐______/|______▌.▐_____/|_______▌.▐____/|________▌.▐___/|_________▌.▐__/|__________▌.▐_/|___________▌.▐/|____________▌`.split(`.`)},dqpb:{interval:100,frames:[`d`,`q`,`p`,`b`]},weather:{interval:100,frames:[`☀️ `,`☀️ `,`☀️ `,`🌤 `,`⛅️ `,`🌥 `,`☁️ `,`🌧 `,`🌨 `,`🌧 `,`🌨 `,`🌧 `,`🌨 `,`⛈ `,`🌨 `,`🌧 `,`🌨 `,`☁️ `,`🌥 `,`⛅️ `,`🌤 `,`☀️ `,`☀️ `]},christmas:{interval:400,frames:[`🌲`,`🎄`]},grenade:{interval:80,frames:[`، `,`′ `,` ´ `,` ‾ `,` ⸌`,` ⸊`,` |`,` ⁎`,` ⁕`,` ෴ `,` ⁓`,` `,` `,` `]},point:{interval:125,frames:[`∙∙∙`,`●∙∙`,`∙●∙`,`∙∙●`,`∙∙∙`]},layer:{interval:150,frames:[`-`,`=`,`≡`]},betaWave:{interval:80,frames:[`ρββββββ`,`βρβββββ`,`ββρββββ`,`βββρβββ`,`ββββρββ`,`βββββρβ`,`ββββββρ`]},fingerDance:{interval:160,frames:[`🤘 `,`🤟 `,`🖖 `,`✋ `,`🤚 `,`👆 `]},fistBump:{interval:80,frames:[`🤜    🤛 `,`🤜    🤛 `,`🤜    🤛 `,` 🤜  🤛  `,`  🤜🤛   `,` 🤜✨🤛   `,`🤜 ✨ 🤛  `]},soccerHeader:{interval:80,frames:[` 🧑⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `]},mindblown:{interval:160,frames:[`😐 `,`😐 `,`😮 `,`😮 `,`😦 `,`😦 `,`😧 `,`😧 `,`🤯 `,`💥 `,`✨ `,`  `,`  `,`  `]},speaker:{interval:160,frames:[`🔈 `,`🔉 `,`🔊 `,`🔉 `]},orangePulse:{interval:100,frames:[`🔸 `,`🔶 `,`🟠 `,`🟠 `,`🔶 `]},bluePulse:{interval:100,frames:[`🔹 `,`🔷 `,`🔵 `,`🔵 `,`🔷 `]},orangeBluePulse:{interval:100,frames:[`🔸 `,`🔶 `,`🟠 `,`🟠 `,`🔶 `,`🔹 `,`🔷 `,`🔵 `,`🔵 `,`🔷 `]},timeTravel:{interval:100,frames:[`🕛 `,`🕚 `,`🕙 `,`🕘 `,`🕗 `,`🕖 `,`🕕 `,`🕔 `,`🕓 `,`🕒 `,`🕑 `,`🕐 `]},aesthetic:{interval:80,frames:[`▰▱▱▱▱▱▱`,`▰▰▱▱▱▱▱`,`▰▰▰▱▱▱▱`,`▰▰▰▰▱▱▱`,`▰▰▰▰▰▱▱`,`▰▰▰▰▰▰▱`,`▰▰▰▰▰▰▰`,`▰▱▱▱▱▱▱`]},dwarfFortress:{interval:80,frames:/* @__PURE__ */ ` ██████£££ .☺██████£££ .☺██████£££ .☺▓█████£££ .☺▓█████£££ .☺▒█████£££ .☺▒█████£££ .☺░█████£££ .☺░█████£££ .☺ █████£££ . ☺█████£££ . ☺█████£££ . ☺▓████£££ . ☺▓████£££ . ☺▒████£££ . ☺▒████£££ . ☺░████£££ . ☺░████£££ . ☺ ████£££ . ☺████£££ . ☺████£££ . ☺▓███£££ . ☺▓███£££ . ☺▒███£££ . ☺▒███£££ . ☺░███£££ . ☺░███£££ . ☺ ███£££ . ☺███£££ . ☺███£££ . ☺▓██£££ . ☺▓██£££ . ☺▒██£££ . ☺▒██£££ . ☺░██£££ . ☺░██£££ . ☺ ██£££ . ☺██£££ . ☺██£££ . ☺▓█£££ . ☺▓█£££ . ☺▒█£££ . ☺▒█£££ . ☺░█£££ . ☺░█£££ . ☺ █£££ . ☺█£££ . ☺█£££ . ☺▓£££ . ☺▓£££ . ☺▒£££ . ☺▒£££ . ☺░£££ . ☺░£££ . ☺ £££ . ☺£££ . ☺£££ . ☺▓££ . ☺▓££ . ☺▒££ . ☺▒££ . ☺░££ . ☺░££ . ☺ ££ . ☺££ . ☺££ . ☺▓£ . ☺▓£ . ☺▒£ . ☺▒£ . ☺░£ . ☺░£ . ☺ £ . ☺£ . ☺£ . ☺▓ . ☺▓ . ☺▒ . ☺▒ . ☺░ . ☺░ . ☺ . ☺ &. ☺ ☼&. ☺ ☼ &. ☺☼ &. ☺☼ & . ‼ & . ☺ & . ‼ & . ☺ & . ‼ & . ☺ & .‼ & . & . & . & ░ . & ▒ . & ▓ . & £ . & ░£ . & ▒£ . & ▓£ . & ££ . & ░££ . & ▒££ .& ▓££ .& £££ . ░£££ . ▒£££ . ▓£££ . █£££ . ░█£££ . ▒█£££ . ▓█£££ . ██£££ . ░██£££ . ▒██£££ . ▓██£££ . ███£££ . ░███£££ . ▒███£££ . ▓███£££ . ████£££ . ░████£££ . ▒████£££ . ▓████£££ . █████£££ . ░█████£££ . ▒█████£££ . ▓█████£££ . ██████£££ . ██████£££ `.split(`.`)},fish:{interval:80,frames:/* @__PURE__ */ `~~~~~~~~~~~~~~~~~~~~.> ~~~~~~~~~~~~~~~~~~.º> ~~~~~~~~~~~~~~~~~.(º> ~~~~~~~~~~~~~~~~.((º> ~~~~~~~~~~~~~~~.<((º> ~~~~~~~~~~~~~~.><((º> ~~~~~~~~~~~~~. ><((º> ~~~~~~~~~~~~.~ ><((º> ~~~~~~~~~~~.~~ <>((º> ~~~~~~~~~~.~~~ ><((º> ~~~~~~~~~.~~~~ <>((º> ~~~~~~~~.~~~~~ ><((º> ~~~~~~~.~~~~~~ <>((º> ~~~~~~.~~~~~~~ ><((º> ~~~~~.~~~~~~~~ <>((º> ~~~~.~~~~~~~~~ ><((º> ~~~.~~~~~~~~~~ <>((º> ~~.~~~~~~~~~~~ ><((º> ~.~~~~~~~~~~~~ <>((º> .~~~~~~~~~~~~~ ><((º>.~~~~~~~~~~~~~~ <>((º.~~~~~~~~~~~~~~~ ><((.~~~~~~~~~~~~~~~~ <>(.~~~~~~~~~~~~~~~~~ ><.~~~~~~~~~~~~~~~~~~ <.~~~~~~~~~~~~~~~~~~~~`.split(`.`)}},Eu=Tu;Object.keys(Tu);const Du=1e3;function Ou(e){let t=Math.round(e);return t<Du?`${t}ms`:`${(e/Du).toFixed(1)}s`}const{frames:ku,interval:Au}=Eu.dots,ju=`\r\x1B[2K`;var Mu=class e{write;render;frame=0;timer;constructor(e,t){this.write=e,this.render=t}static start(t,n){let r=new e(t,n);return t(`\x1B[?25l`),r.draw(),r.timer=setInterval(()=>r.draw(),Au),process.once(`SIGINT`,r.restoreOnInterrupt),r}printAbove(e){this.write(`${ju}${e}\n`),this.draw()}stop(){clearInterval(this.timer),process.off(`SIGINT`,this.restoreOnInterrupt),this.write(`${ju}[?25h`)}draw(){let e=ku[this.frame++%ku.length]??``;this.write(`${ju}${this.render(e)}`)}restoreOnInterrupt=()=>{this.stop(),process.kill(process.pid,`SIGINT`)}},Nu=class{options;startedAt=0;spinner;constructor(e){this.options=e}async run(e,t){this.start();let n;try{n=await e()}catch(e){throw this.finish(I.coral(I.cross),t.linesUnderFailure(e)),e}let r;try{r=t.done(n)}catch(e){throw this.spinner?.stop(),e}return this.finish(I.mint(I.check),r.lines,r.note),n}printAbove(e){this.spinner?this.spinner.printAbove(` ${e}`):this.options.write(` ${e}\n`)}start(){this.startedAt=performance.now(),this.options.animate&&(this.spinner=Mu.start(this.options.write,e=>this.line(I.sky(e))))}finish(e,t,n){this.spinner?.stop(),this.options.write(`${this.line(e,n)}\n`);for(let e of t)this.options.write(` ${I.mute(`│`)} ${e}\n`)}line(e,t){let{label:n,labelWidth:r}=this.options,i=I.mute(Ou(performance.now()-this.startedAt).padStart(6)),a=t?` ${t}`:``;return` ${e} ${n.padEnd(r)} ${i}${a}`}};async function Pu(e,t){try{return await t()}catch(t){if(!xt(t,`SeedcordError`,We.CliCancelled))throw t;e.line(I.mute(`cancelled`));return}}var Fu={node:`>=24.11`,bun:`>=1.4.2`},Iu={type:`git`,url:`https://github.com/seedcord/seedcord.git`,directory:`cli/create-seedcord`};function Lu(e){return`no-${e}`}function Ru({flag:e},t){let n=t[e.name],r=Lu(e.name),i=e.noFlag!==void 0&&t[r]===!0;if(i&&n!==void 0)throw new bt(We.CreateBadUsage,[`Pass --${e.name} or --${r}, not both.`]);return`parse`in e?i?null:typeof n==`string`?e.parse(n):void 0:!i&&n}function zu(e,t){let n={};for(let r of e){let e=Ru(r,t);e!==void 0&&(n[r.key]=e)}return n}const Bu=/* @__PURE__ */ `Blurple.Aqua.Blue.DarkAqua.DarkBlue.DarkButNotBlack.DarkerGrey.DarkGold.DarkGreen.DarkGrey.DarkNavy.DarkOrange.DarkPurple.DarkRed.DarkVividPink.Default.Fuchsia.Gold.Green.Grey.Greyple.LightGrey.LuminousVividPink.Navy.NotQuiteBlack.Orange.Purple.Red.White.Yellow.Random`.split(`.`);function Vu(e){let t=e.trim().replace(/^#/,``);return/^[\da-f]{6}$/i.test(t)?`#${t.toLowerCase()}`:null}function Hu(e){let t=Vu(e);if(t)return t;let n=e.trim().toLowerCase(),r=Bu.find(e=>e.toLowerCase()===n);if(!r)throw new bt(We.CreateInvalidAnswer,[`color`,`Unknown color "${e}". Use a color name or a six-digit hex.`]);return r}const Uu=Bu.map(e=>({value:e,label:e}));function Wu(e){let t=Vu(e);return t?{value:t,label:t,hint:`hex`}:void 0}const Gu={key:`botColor`,label:`color`,flag:{name:`color`,description:`a color name or a six-digit hex`,parse:Hu},ask:async(e,t)=>Hu(await t.autocomplete({message:`Pick an accent color, or type a hex`,placeholder:`Blurple`,choices:Uu,typedChoice:Wu})),shown:e=>e},Ku=[{id:`guild-messages`,label:`Messages in servers`,hint:`know when a message is sent, edited, or deleted`,intents:[`GuildMessages`],partials:[]},{id:`message-text`,label:`The messages' contents`,hint:`without this, message text is empty unless the message mentions your bot`,intents:[`GuildMessages`,`MessageContent`],partials:[]},{id:`direct-messages`,label:`Direct messages`,hint:`messages people send your bot directly`,intents:[`DirectMessages`],partials:[`Channel`]},{id:`reactions`,label:`Reactions`,hint:`know when someone reacts to a message`,intents:[`GuildMessageReactions`,`DirectMessageReactions`],partials:[`Message`,`Channel`,`Reaction`]},{id:`members`,label:`Member joins and leaves`,hint:`also covers nickname and role changes`,intents:[`GuildMembers`],partials:[`GuildMember`]},{id:`presence`,label:`Member online status`,hint:`who is online, and what they are playing`,intents:[`GuildPresences`],partials:[]},{id:`voice`,label:`Voice channel activity`,hint:`know when someone joins, leaves, or moves between voice channels`,intents:[`GuildVoiceStates`],partials:[]},{id:`moderation`,label:`Bans and timeouts`,hint:`know when a member is banned, unbanned, or timed out`,intents:[`GuildModeration`],partials:[]},{id:`scheduled-events`,label:`Scheduled events`,hint:`know when a server event is made, changed, or starts, and when people sign up`,intents:[`GuildScheduledEvents`],partials:[`User`]},{id:`automod`,label:`AutoMod`,hint:`know when a server AutoMod rule changes or fires`,intents:[`AutoModerationConfiguration`,`AutoModerationExecution`],partials:[]},{id:`polls`,label:`Polls`,hint:`know when someone votes in a poll`,intents:[`GuildMessagePolls`,`DirectMessagePolls`],partials:[`Message`,`Channel`,`Poll`,`PollAnswer`]}];function qu(e){let t=new Set(e);return Ku.filter(e=>t.has(e.id))}function Ju(e){return[.../* @__PURE__ */ new Set([`Guilds`,...qu(e).flatMap(e=>e.intents)])]}function Yu(e){return[...new Set(qu(e).flatMap(e=>e.partials))]}const Xu=/* @__PURE__ */ new Set([`GuildMembers`,`GuildPresences`,`MessageContent`]);function Zu(e){return Ju(e).filter(e=>Xu.has(e))}function Qu(e){return Zu([e]).length>0}function $u(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e!==``);for(let e of t)if(!Ku.some(t=>t.id===e))throw new bt(We.CreateInvalidAnswer,[`capabilities`,`Unknown capability "${e}". Run with --help for the list.`]);return t}function ed(e,t){return Qu(e)?`${t} ${I.amber(`privileged`)}`:t}function td(e){return Ku.find(t=>t.id===e)?.label??e}const nd={key:`capabilities`,label:`events`,flag:{name:`capabilities`,description:`a comma separated list of ${Ku.map(e=>e.id).join(`, `)}`,parse:$u},skip:e=>e.transport===`http`,ask:(e,t)=>t.checklist({message:`What should your bot react to?`,choices:Ku.map(e=>({value:e.id,label:ed(e.id,e.label),hint:e.hint}))}),shown:e=>e.length===0?I.mute(`none`):e.map(td).join(`, `)};function rd(e){let t=x(e,{throwIfNoEntry:!1});if(t===void 0)return{existed:!1};if(t.isDirectory()&&b(e).length===0)return{existed:!0};throw new yt(We.CreateTargetNotEmpty,[e])}function id(e){return Error.isError(e)?e.message:String(e)}function ad(e){return t=>{try{e(t);return}catch(e){return id(e)}}}const od=/^[a-z\d][a-z\d._-]*$/,K=`lowercase, digits, and . _ -`,q=/[$`"!%]/;function sd(e){let n=e.trim();if(n===``)throw new bt(We.CreateInvalidAnswer,[`dir`,`A project directory cannot be empty.`]);let r=q.exec(n)?.[0];if(r!==void 0)throw new bt(We.CreateInvalidAnswer,[`dir`,`Pick a path without ${r}. A shell reads it even inside the quotes of the commands printed at the end.`]);let i=t(n);if(i.length>64)throw new bt(We.CreateInvalidAnswer,[`dir`,`Keep the folder name to 64 characters or fewer.`]);if(!od.test(i))throw new bt(We.CreateInvalidAnswer,[`dir`,`The folder name becomes the package name. Use ${K}, starting with a letter or digit.`]);return n}const cd={key:`directory`,label:`folder`,flag:{name:`dir`,description:`where the project goes`,parse:sd},ask:async(e,t)=>sd(await t.text({message:`Where should the project go? ${I.mute(K)}`,placeholder:`my-bot`,validate:ad(e=>rd(o(sd(e))))})),shown:e=>e},ld=[{value:`server`,label:`Node or Bun`,hint:`a process you run on any host`},{value:`edge`,label:`Cloudflare Workers`,hint:`a worker on Cloudflare's network`}],ud=ld.map(({value:e})=>e);function dd(e){let t=e.trim().toLowerCase(),n=ud.find(e=>e===t);if(!n)throw new bt(We.CreateInvalidAnswer,[`runtime`,`Unknown runtime "${e}". Pick server or edge.`]);return n}const fd={key:`runtime`,label:`runtime`,flag:{name:`runtime`,description:`server or edge, for an http bot`,parse:dd},skip:e=>e.transport===`gateway`,answerWithoutTerminal:`server`,ask:(e,t)=>t.select({message:`Where should your http bot run?`,choices:ld}),shown:e=>ld.find(t=>t.value===e)?.label??e};function pd(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e!==``),n=t.find(e=>!Ct(e));if(n!==void 0)throw new bt(We.CreateInvalidAnswer,[`testing-guilds`,`"${n}" is not a server id. Right-click the server in Discord with Developer Mode on and pick Copy Server ID.`]);return t}const md={key:`testingGuilds`,label:`test servers`,flag:{name:`testing-guilds`,description:`comma-separated server ids your commands deploy to while you build`,parse:pd},answerWithoutTerminal:[],ask:async(e,t)=>pd(await t.text({message:`Server ids to test your commands in ${I.mute(`or press Enter to deploy them globally`)}`,validate:ad(pd)})),shown:e=>e.length===0?I.mute(`global`):e.join(`, `)};function hd(e){try{return jt(e)}catch{throw new bt(We.CreateInvalidAnswer,[`token`,`That does not look like a bot token. Copy it from the Bot page of your app.`])}}const gd={key:`token`,label:`token`,flag:{name:`token`,description:`your bot token`,parse:hd,noFlag:`leave the bot token empty in .env to fill in later`},ask:async(e,t)=>{let n=await t.password({message:`Paste your bot token ${I.mute(`or press Enter twice to add it to .env later`)}`,validate:ad(hd),emptyWarning:`Nothing pasted. Press Enter again to leave it empty in .env for now.`});return n===``?null:hd(n)},shown:e=>e===null?I.mute(`later, in .env`):`••••••••`},_d=[`http`,`gateway`],vd=[{value:`http`,label:`Http`,hint:`Discord posts interactions to your URL`},{value:`gateway`,label:`Gateway`,hint:`keeps a connection to Discord open for messages, reactions, joins, and voice activity too`}];function yd(e){let t=e.trim().toLowerCase(),n=_d.find(e=>e===t);if(!n)throw new bt(We.CreateInvalidAnswer,[`transport`,`Unknown transport "${e}". Pick http or gateway.`]);return n}const bd={key:`transport`,label:`transport`,flag:{name:`transport`,description:`http or gateway`,parse:yd},ask:(e,t)=>t.select({message:`How should Discord reach your bot?`,choices:vd}),shown:e=>vd.find(t=>t.value===e)?.label??e};function xd(e){return e?`yes`:`no`}const Sd=[cd,bd,fd,nd,gd,md,Gu,{key:`install`,label:`install`,flag:{name:`install`,description:`install dependencies`,noFlag:`skip installing dependencies`},answerWithoutTerminal:!0,ask:(e,t)=>t.confirm({message:`Install dependencies now?`,initial:!0}),shown:xd},{key:`git`,label:`git`,flag:{name:`git`,description:`run git init and make the first commit`,noFlag:`skip git init and the first commit`},answerWithoutTerminal:!0,ask:(e,t)=>t.confirm({message:`Set up git with a first commit?`,initial:!0}),shown:xd}],Cd=`verbose`,wd=Object.fromEntries([...Sd.flatMap(({flag:e})=>[[e.name,{type:`parse`in e?`string`:`boolean`}],...e.noFlag===void 0?[]:[[Lu(e.name),{type:`boolean`}]]]),[Cd,{type:`boolean`}]]),Td=/* @__PURE__ */ new Set([`--help`,`-h`]),Ed=/* @__PURE__ */ new Set([`--version`,`-v`]);function Dd(e){return e.some(e=>Td.has(e))}function Od(e){return e.some(e=>Ed.has(e))}function J(e){return e.includes(`--${Cd}`)}function kd(e){try{return C({args:e,options:wd,allowPositionals:!0,strict:!0})}catch(e){throw new bt(We.CreateBadUsage,[Error.isError(e)?e.message:`Could not read the command line.`])}}function Ad(e,t){if(e.length>1)throw new bt(We.CreateBadUsage,[`Pass one directory at most.`]);let[n]=e;if(n!==void 0&&typeof t==`string`&&t!==n)throw new bt(We.CreateInvalidAnswer,[`dir`,`The directory was given twice. Pass it as an argument or as a flag.`]);return typeof t==`string`?t:n}function jd(e){let{values:t,positionals:n}=kd(e),r=Ad(n,t.dir),i=Object.fromEntries(Object.entries({...t,dir:r}).filter(e=>typeof e[1]==`string`||typeof e[1]==`boolean`));return zu(Sd,i)}const Md=[{name:Cd,description:`show the stack frames a failed step leaves out`},{name:`version`,short:`v`,description:`print the version`},{name:`help`,short:`h`,description:`print this`}];function Nd({flag:e}){return e.noFlag===void 0?[e]:[e,{name:Lu(e.name),description:e.noFlag}]}function Pd(e){return e.short===void 0?`--${e.name}`:`-${e.short}, --${e.name}`}function Fd(){let e=[...Sd.flatMap(Nd),...Md],t=Math.max(...e.map(e=>Pd(e).length));return[`Usage: create-seedcord [directory] [flags]`,``,`Every question the interview asks has a flag. Pass them all to skip the interview.`,``,...e.map(e=>` ${Pd(e).padEnd(t)} ${e.description}`),``,`npm needs a -- before the flags: npm create seedcord my-bot -- --transport gateway`].join(`
127
- `)}function Id(e){return e?`https://discord.com/oauth2/authorize?client_id=${e.applicationId}`:null}function Ld(e=`0.5.0-next.0`){let t=`${Ye}${I.mute(` create`)}`;return e===void 0?t:`${t}${I.pith(` • v${e}`)}`}const Rd=/error|ERR[_!]/i,zd=/ERR_PNPM_IGNORED_BUILDS/,Bd=/^\s/,Vd=/[\r\n]+/,Hd=/^\s+at\s/;function Ud(e,t){let n=[];for(let e of t){if(!Bd.test(e.plain))break;n.push(e)}return[e,...n]}function Wd(e){let t=[],n=-1;for(let[r,i]of e.entries()){if(r<=n||!Rd.test(i.plain))continue;let a=Ud(i,e.slice(r+1));t.push(...a),n=r+a.length-1}return(t.length>0?t:e).slice(-12)}var Gd=class extends yt{command;output;constructor(e,t){super(We.CreateStepFailed,[e,t.join(`
126
+ `),n},kl=()=>(0,L.use)(Xc),Al=(e,t={})=>{let{setRawMode:n,internal_exitOnCtrlC:r,internal_eventEmitter:i}=kl();(0,L.useEffect)(()=>{if(t.isActive!==!1)return n(!0),()=>{n(!1)}},[t.isActive,n]);let a=(0,L.useEffectEvent)(t=>{let n=Wc(t),i={upArrow:n.name===`up`,downArrow:n.name===`down`,leftArrow:n.name===`left`,rightArrow:n.name===`right`,pageDown:n.name===`pagedown`,pageUp:n.name===`pageup`,home:n.name===`home`,end:n.name===`end`,return:n.name===`return`,escape:n.name===`escape`,ctrl:n.ctrl,shift:n.shift,tab:n.name===`tab`,backspace:n.name===`backspace`,delete:n.name===`delete`,meta:n.meta,super:n.super??!1,hyper:n.hyper??!1,capsLock:n.capsLock??!1,numLock:n.numLock??!1,eventType:n.eventType},a;a=n.isKittyProtocol?n.isPrintable?n.text??n.name:``:n.ctrl?n.name===`space`?` `:n.name??``:n.sequence,!n.isKittyProtocol&&Ac.includes(n.name)&&(a=``),a.startsWith(`\x1B`)&&(a=a.slice(1)),!n.isKittyProtocol&&a.length===1&&/[A-Z]/.test(a)&&(i.shift=!0),!(r&&n.name===`c`&&i.ctrl&&n.eventType!==`release`)&&gs.discreteUpdates(()=>{e(a,i)})});(0,L.useEffect)(()=>{if(t.isActive!==!1)return i.on(`input`,a),()=>{i.removeListener(`input`,a)}},[t.isActive,i])};var jl=/* @__PURE__ */ le((/* @__PURE__ */ j(((e,t)=>{let n=(e,t)=>e>t?1:e<t?-1:0,r=1/0,i=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),a=`eexxaacctt`,o=/\p{P}/gu,s=[`en`,{numeric:!0,sensitivity:`base`}],c=(e,t,n)=>e.replace(`A-Z`,t).replace(`a-z`,n),l={unicode:!1,alpha:null,interSplit:`[^A-Za-z\\d']+`,intraSplit:`[a-z][A-Z]`,interBound:`[^A-Za-z\\d]`,intraBound:`[A-Za-z]\\d|\\d[A-Za-z]|[a-z][A-Z]`,interLft:0,interRgt:0,interChars:`.`,interIns:r,intraChars:`[a-z\\d']`,intraIns:null,intraContr:`'[a-z]{1,2}\\b`,intraMode:0,intraSlice:[1,r],intraSub:null,intraTrn:null,intraDel:null,intraFilt:(e,t,n)=>!0,toUpper:e=>e.toLocaleUpperCase(),toLower:e=>e.toLocaleLowerCase(),compare:null,sort:(e,t,r,i=n)=>{let{idx:a,chars:o,terms:s,interLft2:c,interLft1:l,start:u,intraIns:d,interIns:f,cases:p}=e;return a.map((e,t)=>t).sort((e,n)=>o[n]-o[e]||d[e]-d[n]||s[n]+c[n]+.5*l[n]-(s[e]+c[e]+.5*l[e])||f[e]-f[n]||u[e]-u[n]||p[n]-p[e]||i(t[a[e]],t[a[n]]))}},u=(e,t)=>t==0?``:t==1?e+`??`:t==r?e+`*?`:e+`{0,${t}}?`,d=`(?:\\b|_)`;function f(e){e=Object.assign({},l,e);let{unicode:t,interLft:r,interRgt:f,intraMode:p,intraSlice:h,intraIns:g,intraSub:_,intraTrn:v,intraDel:y,intraContr:b,intraSplit:x,interSplit:S,intraBound:C,interBound:w,intraChars:T,toUpper:ee,toLower:te,compare:E}=e;g??=p,_??=p,v??=p,y??=p,E??=typeof Intl>`u`?n:new Intl.Collator(...s).compare;let D=e.letters??e.alpha;if(D!=null){let e=ee(D),t=te(D);S=c(S,e,t),x=c(x,e,t),w=c(w,e,t),C=c(C,e,t),T=c(T,e,t),b=c(b,e,t)}let O=t?`u`:``,k=`".+?"`,ne=RegExp(k,`gi`+O),re=RegExp(`(?:\\s+|^)-(?:${T}+|${k})`,`gi`+O),{intraRules:ie}=e;ie??=e=>{let t=l.intraSlice,n=0,r=0,i=0,a=0;if(/[^\d]/.test(e)){let o=e.length;o<=4?o>=3&&(i=Math.min(v,1),o==4&&(n=Math.min(g,1))):(t=h,n=g,r=_,i=v,a=y)}return{intraSlice:t,intraIns:n,intraSub:r,intraTrn:i,intraDel:a}};let A=!!x,ae=new RegExp(x,`g`+O),oe=new RegExp(S,`g`+O),se=RegExp(`^`+S+`|`+S+`$`,`g`+O),j=new RegExp(b,`gi`+O),ce=(e,t=!1)=>{let n=[];e=e.replace(ne,e=>(n.push(e),a)),e=e.replace(se,``),t||(e=te(e)),A&&(e=e.replace(ae,e=>e[0]+` `+e[1]));let r=0;return e.split(oe).filter(e=>e!=``).map(e=>e===a?n[r++]:e)},le=/[^\d]+|\d+/g,ue=(t,n=0,a=!1)=>{let o=ce(t);if(o.length==0)return[];let s=Array(o.length).fill(``);o=o.map((e,t)=>e.replace(j,e=>(s[t]=e,``)));let c;if(p==1)c=o.map((e,t)=>{if(e[0]===`"`)return i(e.slice(1,-1));let n=``;for(let r of e.matchAll(le)){let e=r[0],{intraSlice:i,intraIns:a,intraSub:o,intraTrn:c,intraDel:l}=ie(e);if(a+o+c+l==0)n+=e+s[t];else{let[r,d]=i,f=e.slice(0,r),p=e.slice(d),m=e.slice(r,d);a==1&&f.length==1&&f!=m[0]&&(f+=`(?!`+f+`)`);let h=m.length,g=[e];if(o)for(let e=0;e<h;e++)g.push(f+m.slice(0,e)+T+m.slice(e+1)+p);if(c)for(let e=0;e<h-1;e++)m[e]!=m[e+1]&&g.push(f+m.slice(0,e)+m[e+1]+m[e]+m.slice(e+2)+p);if(l)for(let e=0;e<h;e++)g.push(f+m.slice(0,e+1)+`?`+m.slice(e+1)+p);if(a){let e=u(T,1);for(let t=0;t<h;t++)g.push(f+m.slice(0,t)+e+m.slice(t)+p)}n+=`(?:`+g.join(`|`)+`)`+s[t]}}return n});else{let e=u(T,g);n==2&&g>0&&(e=`)(`+e+`)(`),c=o.map((t,n)=>t[0]===`"`?i(t.slice(1,-1)):t.split(``).map((e,t,n)=>(g==1&&t==0&&n.length>1&&e!=n[t+1]&&(e+=`(?!`+e+`)`),e)).join(e)+s[n])}let l=r==2?d:``,m=f==2?d:``,h=m+u(e.interChars,e.interIns)+l;return n>0?a?c=l+`(`+c.join(`)`+m+`|`+l+`(`)+`)`+m:(c=`(`+c.join(`)(`+h+`)(`)+`)`,c=`(.??`+l+`)`+c+`(`+m+`.*)`):(c=c.join(h),c=l+c+m),[new RegExp(c,`i`+O),o,s]},de=(e,t,n)=>{let[r]=ue(t);if(r==null)return null;let i=[];if(n!=null)for(let t=0;t<n.length;t++){let a=n[t];r.test(e[a])&&i.push(a)}else for(let t=0;t<e.length;t++)r.test(e[t])&&i.push(t);return i},M=!!C,fe=new RegExp(w,O),pe=new RegExp(C,O),me=(t,n,i)=>{let[a,o,s]=ue(i,1),c=ce(i,!0),[l]=ue(i,2),u=o.length,d=Array(u),p=Array(u);for(let e=0;e<u;e++){let t=o[e],n=c[e],r=t[0]==`"`?t.slice(1,-1):t+s[e],i=n[0]==`"`?n.slice(1,-1):n+s[e];d[e]=r,p[e]=i}let m=t.length,h=Array(m).fill(0),g={idx:Array(m),start:h.slice(),chars:h.slice(),cases:h.slice(),terms:h.slice(),interIns:h.slice(),intraIns:h.slice(),interLft2:h.slice(),interRgt2:h.slice(),interLft1:h.slice(),interRgt1:h.slice(),ranges:Array(m)},_=r==1||f==1,v=0;for(let i=0;i<t.length;i++){let o=n[t[i]],s=o.match(a),c=s.index+s[1].length,m=c,h=!1,y=0,b=0,x=0,S=0,C=0,w=0,T=0,ee=0,E=0,D=[];for(let t=0,n=2;t<u;t++,n+=2){let i=te(s[n]),a=d[t],l=p[t],g=a.length,v=i.length,k=i==a;if(s[n]==l&&T++,!k&&s[n+1].length>=g){let e=te(s[n+1]).indexOf(a);e>-1&&(D.push(m,v,e,g),m+=he(s,n,e,g),i=a,v=g,k=!0,t==0&&(c=m))}if(_||k){let e=m-1,l=m+v,u=!1,d=!1;if(e==-1||fe.test(o[e]))k&&y++,u=!0;else{if(r==2){h=!0;break}if(M&&pe.test(o[e]+o[e+1]))k&&b++,u=!0;else if(r==1){let e=s[n+1],r=m+v;if(e.length>=g){let l=0,d=!1,f=new RegExp(a,`ig`+O),p;for(;p=f.exec(e);){l=p.index;let e=r+l,t=e-1;if(t==-1||fe.test(o[t])){y++,d=!0;break}if(pe.test(o[t]+o[e])){b++,d=!0;break}}d&&(u=!0,D.push(m,v,l,g),m+=he(s,n,l,g),i=a,v=g,k=!0,t==0&&(c=m))}if(!u){h=!0;break}}}if(l==o.length||fe.test(o[l]))k&&x++,d=!0;else{if(f==2){h=!0;break}if(M&&pe.test(o[l-1]+o[l]))k&&S++,d=!0;else if(f==1){h=!0;break}}k&&(C+=g,u&&d&&w++)}if(v>g&&(E+=v-g),t>0&&(ee+=s[n-1].length),!e.intraFilt(a,i,m)){h=!0;break}t<u-1&&(m+=v+s[n+1].length)}if(!h){g.idx[v]=t[i],g.interLft2[v]=y,g.interLft1[v]=b,g.interRgt2[v]=x,g.interRgt1[v]=S,g.chars[v]=C,g.terms[v]=w,g.cases[v]=T,g.interIns[v]=ee,g.intraIns[v]=E,g.start[v]=c;let e=o.match(l),n=e.index+e[1].length,r=D.length,a=r>0?0:1/0,s=r-4;for(let t=2;t<e.length;){let r=e[t].length;if(a<=s&&D[a]==n){let r=D[a+1],i=D[a+2],o=D[a+3],s=t,c=``;for(let t=0;t<r;s++)c+=e[s],t+=e[s].length;e.splice(t,s-t,c),n+=he(e,t,i,o),a+=4}else n+=r,t++}n=e.index+e[1].length;let u=g.ranges[v]=[],d=n,f=n;for(let t=2;t<e.length;t++){let r=e[t].length;n+=r,t%2==0?f=n:r>0&&(u.push(d,f),d=f=n)}f>d&&u.push(d,f),v++}}if(v<t.length)for(let e in g)g[e]=g[e].slice(0,v);return g},he=(e,t,n,r)=>{let i=e[t]+e[t+1].slice(0,n);return e[t-1]+=i,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),i.length},N=(t,n,r,a=1e3,s)=>{r=r?r===!0?5:r:0;let c=null,l=null,u=[];n=n.replace(re,e=>{let t=e.trim().slice(1);return t=t[0]===`"`?i(t.slice(1,-1)):t.replace(o,``),t!=``&&u.push(t),``});let d=ce(n),f;if(u.length>0){if(f=new RegExp(u.join(`|`),`i`+O),d.length==0){let e=[];for(let n=0;n<t.length;n++)f.test(t[n])||e.push(n);return[e,null,null]}}else if(d.length==0)return[null,null,null];if(r>0){let e=ce(n);if(e.length>1){let n=e.slice().sort((e,t)=>t.length-e.length);for(let e=0;e<n.length;e++){if(s?.length==0)return[[],null,null];s=de(t,n[e],s)}if(e.length>r)return[s,null,null];c=m(e).map(e=>e.join(` `)),l=[];let i=/* @__PURE__ */ new Set;for(let e=0;e<c.length;e++)if(i.size<s.length){let n=s.filter(e=>!i.has(e)),r=de(t,c[e],n);for(let e=0;e<r.length;e++)i.add(r[e]);l.push(r)}else l.push([])}}c??(c=[n],l=[s?.length>0?s:de(t,n)]);let p=null,h=null;if(u.length>0&&(l=l.map(e=>e.filter(e=>!f.test(t[e])))),l.reduce((e,t)=>e+t.length,0)<=a){p={},h=[];for(let n=0;n<l.length;n++){let r=l[n];if(r==null||r.length==0)continue;let i=c[n],a=me(r,t,i),o=e.sort(a,t,i,E);if(n>0)for(let e=0;e<o.length;e++)o[e]+=h.length;for(let e in a)p[e]=(p[e]??[]).concat(a[e]);h=h.concat(o)}}return[[].concat(...l),p,h]};return{search:(...e)=>N(...e),split:ce,filter:de,info:me,sort:e.sort}}let p=(()=>{let e={A:`ÁÀÃÂÄĄĂÅ`,a:`áàãâäąăå`,E:`ÉÈÊËĖĚ`,e:`éèêëęě`,I:`ÍÌÎÏĮİ`,i:`íìîïįı`,O:`ÓÒÔÕÖ`,o:`óòôõö`,U:`ÚÙÛÜŪŲŮŰ`,u:`úùûüūųůű`,C:`ÇČĆ`,c:`çčć`,D:`Ď`,d:`ď`,G:`Ğ`,g:`ğ`,L:`Ł`,l:`ł`,N:`ÑŃŇ`,n:`ñńň`,S:`ŠŚȘŞ`,s:`šśșş`,T:`ŢȚŤ`,t:`ţțť`,Y:`Ý`,y:`ý`,Z:`ŻŹŽ`,z:`żźž`},t={},n=``;for(let r in e)e[r].split(``).forEach(e=>{n+=e,t[e]=r});let r=RegExp(`[${n}]`,`g`),i=e=>t[e];return e=>{if(typeof e==`string`)return e.replace(r,i);let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n].replace(r,i);return t}})();function m(e){e=e.slice();let t=e.length,n=[e.slice()],r=Array(t).fill(0),i=1,a,o;for(;i<t;)r[i]<i?(a=i%2&&r[i],o=e[i],e[i]=e[a],e[a]=o,++r[i],i=1,n.push(e.slice())):(r[i]=0,++i);return n}let h=(e,t)=>t?`<mark>${e}</mark>`:e,g=(e,t)=>e+t;function _(e,t,n=h,r=``,i=g){r=i(r,n(e.substring(0,t[0]),!1))??r;for(let a=0;a<t.length;a+=2){let o=t[a],s=t[a+1];r=i(r,n(e.substring(o,s),!0))??r,a<t.length-3&&(r=i(r,n(e.substring(t[a+1],t[a+2]),!1))??r)}return r=i(r,n(e.substring(t[t.length-1]),!1))??r,r}f.latinize=p,f.permute=e=>m([...Array(e.length).keys()]).sort((e,t)=>{for(let n=0;n<e.length;n++)if(e[n]!=t[n])return e[n]-t[n];return 0}).map(t=>t.map(t=>e[t])),f.highlight=_,t.exports=f})))(),1);const Ml=new Intl.Segmenter(void 0,{granularity:`grapheme`});var Nl=class e{text;caret;constructor(e,t){this.text=e,this.caret=t}static empty(){return new e(``,0)}get before(){return this.text.slice(0,this.caret)}get after(){return this.text.slice(this.caret)}insert(t){return new e(this.before+t+this.after,this.caret+t.length)}deleteBack(){return this.cut(this.charStartBefore(),this.caret)}deleteForward(){return this.cut(this.caret,this.charEndAfter())}deleteWordBack(){return this.cut(this.wordStartBefore(),this.caret)}deleteWordForward(){return this.cut(this.caret,this.wordEndAfter())}deleteToStart(){return this.cut(0,this.caret)}deleteToEnd(){return this.cut(this.caret,this.text.length)}left(){return this.moveTo(this.charStartBefore())}right(){return this.moveTo(this.charEndAfter())}wordLeft(){return this.moveTo(this.wordStartBefore())}wordRight(){return this.moveTo(this.wordEndAfter())}start(){return this.moveTo(0)}end(){return this.moveTo(this.text.length)}masked(t){let n=e=>[...Ml.segment(e)].length;return new e(t.repeat(n(this.text)),t.length*n(this.before))}get atCaret(){let[e]=Ml.segment(this.after);return e?.segment??``}charStartBefore(){return[...Ml.segment(this.before)].at(-1)?.index??0}charEndAfter(){return this.caret+this.atCaret.length}wordStartBefore(){return this.before.trimEnd().search(/\S*$/u)}wordEndAfter(){return this.caret+(/^\s*\S*/u.exec(this.after)?.[0].length??0)}moveTo(t){return new e(this.text,t)}cut(t,n){return new e(this.text.slice(0,t)+this.text.slice(n),t)}};const Pl=e=>({input:t,key:n})=>n.ctrl&&t===e,Fl=e=>({input:t,key:n})=>n.meta&&t===e,Il=e=>e.ctrl||e.meta,Ll=[[({key:e})=>e.backspace&&Il(e),e=>e.deleteWordBack()],[Pl(`w`),e=>e.deleteWordBack()],[({key:e})=>e.backspace&&!Il(e),e=>e.deleteBack()],[({key:e})=>e.delete&&Il(e),e=>e.deleteWordForward()],[Fl(`d`),e=>e.deleteWordForward()],[({key:e})=>e.delete&&!Il(e),e=>e.deleteForward()],[Pl(`u`),e=>e.deleteToStart()],[Pl(`k`),e=>e.deleteToEnd()],[({key:e})=>e.leftArrow&&Il(e),e=>e.wordLeft()],[Fl(`b`),e=>e.wordLeft()],[({key:e})=>e.rightArrow&&Il(e),e=>e.wordRight()],[Fl(`f`),e=>e.wordRight()],[({key:e})=>e.leftArrow&&!Il(e),e=>e.left()],[({key:e})=>e.rightArrow&&!Il(e),e=>e.right()],[({key:e})=>e.home,e=>e.start()],[Pl(`a`),e=>e.start()],[({key:e})=>e.end,e=>e.end()],[Pl(`e`),e=>e.end()]];function Rl({input:e,key:t}){return e!==``&&!t.ctrl&&!t.meta&&!t.tab&&!t.return&&!t.escape}function zl(e,t){let n=Ll.find(([e])=>e(t));return n?n[1](e):Rl(t)?e.insert(t.input):e}var Bl=class e{items;index;constructor(e,t=0){this.items=e,this.index=t}get current(){return this.items[this.index]}window(e){let t=this.index-Math.floor(e/2),n=Math.max(0,this.items.length-e),r=Math.min(Math.max(t,0),n);return{start:r,items:this.items.slice(r,r+e)}}next(){return this.step(1)}previous(){return this.step(-1)}step(t){let{length:n}=this.items;return n===0?this:new e(this.items,(this.index+t+n)%n)}};function Vl(e,t){return e.toLowerCase().includes(t.trim().toLowerCase())}const Hl=new jl.default({intraIns:1/0,intraChars:String.raw`[a-z\d' ]`}),Ul=new jl.default({intraMode:1});function Wl(e,t,n){let[r,i,a]=e.search(t,n,3);return i?a.flatMap(e=>i.idx[e]??[]):r??[]}function Gl(e,t){if(t.trim()===``)return e;let n=e.map(e=>e.label),r=/* @__PURE__ */ new Set([...Wl(Hl,n,t),...Wl(Ul,n,t)]);for(let[n,i]of e.entries())(Vl(i.label,t)||Vl(i.value,t))&&r.add(n);return[...r].flatMap(t=>e[t]??[])}const Kl={question:`?`,cursor:`❯`,picked:`■`,unpicked:`□`},ql=` `.repeat(Kl.cursor.length+1);function Jl(e){return`${I.sky(Kl.question)} ${e}`}function Yl(e,t){return t?` ${I.sky(Kl.cursor)} ${I.sky.bold(e)}`:` ${ql}${e}`}function Xl(e,t){return t?`${e} ${I.mute(t)}`:e}function Zl(e){return e?I.mint(Kl.picked):I.mute(Kl.unpicked)}function Ql(e,t){let n=e.atCaret||` `,r=e.text===``?I.mute(t):I.sky(e.after.slice(e.atCaret.length));return`${I.sky(e.before)}${I.sky.inverse(n)}${r}`}function $l(e){return Object.entries(e).map(([e,t])=>`${I.sky(e)} ${I.mute(t)}`).join(` `)}function eu({input:e,key:t}){return t.escape||t.ctrl&&e===`c`}function tu(e,t,n){if(t.outcome)return t;if(eu(n))return{...t,outcome:{kind:`cancelled`}};if(!n.key.return)return{state:e.press(t.state,n)};let r=e.submit(t.state);return`stay`in r?{state:r.stay}:{...t,outcome:{kind:`answered`,answer:r.answer}}}const nu=/\r\n|\r|\n/u;function ru({input:e,key:t}){if(t.return||!nu.test(e))return[{input:e,key:t}];let n={input:`\r`,key:{...t,return:!0}};return e.split(nu).flatMap((e,r)=>{let i=e===``?[]:[{input:e,key:t}];return r===0?i:[n,...i]})}function iu(e,t){let[{state:n,outcome:r},i]=(0,L.useReducer)((t,n)=>tu(e,t,n),{state:e.initial});return Al((e,t)=>{for(let n of ru({input:e,key:t}))i(n)},{isActive:!r}),(0,L.useEffect)(()=>{r&&t(r)},[r,t]),n}function au(e,t){let n=n=>{let r=t?.(n),i=Gl(e,n);return new Bl(r?[r,...i]:i)};return{initial:{filter:Nl.empty(),cursor:n(``)},press:(e,t)=>{let{key:r}=t;if(r.upArrow)return{...e,cursor:e.cursor.previous()};if(r.downArrow)return{...e,cursor:e.cursor.next()};let i=zl(e.filter,t);return i.text===e.filter.text?{...e,filter:i}:{filter:i,cursor:n(i.text)}},submit:e=>e.cursor.current?{answer:e.cursor.current.value}:{stay:e}}}const ou=$l({"↑↓":`move`,enter:`pick`});function su({message:e,placeholder:t=`type to search`,choices:n,typedChoice:r,onEnd:i}){let{filter:a,cursor:o}=iu((0,L.useMemo)(()=>au(n,r),[n,r]),i),{start:s,items:c}=o.window(8);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e),` `,Ql(a,t)),c.map((e,t)=>/* @__PURE__ */ L.createElement(W,{key:e.value},Xl(Yl(e.label,s+t===o.index),e.hint))),/* @__PURE__ */ L.createElement(ll,{paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,ou)))}function cu(e,t){let n=new Set(e);return n.delete(t)||n.add(t),n}function lu(e,t){return e.flatMap(e=>t.has(e.value)?[e.value]:[])}function uu(e){return{initial:{cursor:new Bl(e),picked:/* @__PURE__ */ new Set},press:(e,{input:t,key:n})=>{if(n.upArrow)return{...e,cursor:e.cursor.previous()};if(n.downArrow)return{...e,cursor:e.cursor.next()};let r=e.cursor.current;return t===` `&&r?{...e,picked:cu(e.picked,r.value)}:e},submit:({picked:t})=>({answer:lu(e,t)})}}const du=$l({"↑↓":`move`,space:`toggle`,enter:`done`});function fu({message:e,choices:t,onEnd:n}){let{cursor:r,picked:i}=iu((0,L.useMemo)(()=>uu(t),[t]),n);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e)),t.map((e,t)=>/* @__PURE__ */ L.createElement(W,{key:e.value},Xl(Yl(`${Zl(i.has(e.value))} ${e.label}`,t===r.index),e.hint))),/* @__PURE__ */ L.createElement(ll,{paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,du)))}function pu(e){return e.upArrow||e.downArrow||e.leftArrow||e.rightArrow}function mu(e){return{initial:e,press:(e,{input:t,key:n})=>{let r=t.toLowerCase();return r===`y`?!0:r===`n`?!1:pu(n)?!e:e},submit:e=>({answer:e})}}function hu(e,t){return t?I.sky.underline(e):I.mute(e)}function gu({message:e,initial:t=!1,onEnd:n}){let r=iu((0,L.useMemo)(()=>mu(t),[t]),n);return/* @__PURE__ */ L.createElement(ll,{paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e),` `,hu(`yes`,r),` `,I.mute(`/`),` `,hu(`no`,!r)))}function _u(e){return{initial:{filter:Nl.empty(),cursor:new Bl(e),picked:/* @__PURE__ */ new Set},press:(t,n)=>{let{key:r}=n;if(r.upArrow)return{...t,cursor:t.cursor.previous()};if(r.downArrow)return{...t,cursor:t.cursor.next()};let i=t.cursor.current;if(r.tab&&i)return{...t,picked:cu(t.picked,i.value)};let a=zl(t.filter,n);return a.text===t.filter.text?{...t,filter:a}:{...t,filter:a,cursor:new Bl(Gl(e,a.text))}},submit:({picked:t})=>({answer:lu(e,t)})}}const G=$l({"↑↓":`move`,tab:`toggle`,enter:`done`});function vu(e,t,n){let r=e=>I.iris(String(e));return`${r(e)} ${I.mute(`selected ·`)} ${r(t)} ${I.mute(`of`)} ${r(n)} ${I.mute(`match`)}`}function yu({message:e,choices:t,onEnd:n}){let{filter:r,cursor:i,picked:a}=iu((0,L.useMemo)(()=>_u(t),[t]),n),{start:o,items:s}=i.window(10);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e),` `,Ql(r,`type to search`)),s.map((e,t)=>{let n=`${Zl(a.has(e.value))} ${e.label}`;return/* @__PURE__ */ L.createElement(W,{key:e.value},Yl(n,o+t===i.index))}),/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,vu(a.size,i.items.length,t.length)),/* @__PURE__ */ L.createElement(W,null,G)))}function bu(e){return{initial:new Bl(e),press:(e,{key:t})=>t.upArrow?e.previous():t.downArrow?e.next():e,submit:e=>e.current?{answer:e.current.value}:{stay:e}}}function xu({message:e,choices:t,onEnd:n}){let r=iu((0,L.useMemo)(()=>bu(t),[t]),n);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e)),t.map((e,t)=>/* @__PURE__ */ L.createElement(W,{key:e.value},Xl(Yl(e.label,t===r.index),e.hint))))}function Su(e,t){return{initial:{line:Nl.empty()},press:({line:e},t)=>({line:zl(e,t)}),submit:({line:n,error:r})=>{if(n.text.trim()===``&&t!==void 0)return r===t?{answer:``}:{stay:{line:n,error:t}};let i=e?.(n.text);return i===void 0?{answer:n.text}:{stay:{line:n,error:i}}}}}function Cu({message:e,placeholder:t=``,validate:n,emptyWarning:r,masked:i=!1,onEnd:a}){let{line:o,error:s}=iu((0,L.useMemo)(()=>Su(n,r),[n,r]),a);return/* @__PURE__ */ L.createElement(ll,{flexDirection:`column`,paddingLeft:2},/* @__PURE__ */ L.createElement(W,null,Jl(e),` `,Ql(i?o.masked(`•`):o,t)),s?/* @__PURE__ */ L.createElement(W,null,` ${I.amber(s)}`):null)}var wu=class{streams;constructor({stdin:e=process.stdin,stdout:t=process.stdout}={}){this.streams={stdin:e,stdout:t}}select(e){return this.ask(t=>/* @__PURE__ */ L.createElement(xu,{...e,onEnd:t}))}confirm(e){return this.ask(t=>/* @__PURE__ */ L.createElement(gu,{...e,onEnd:t}))}pickMany(e){return this.ask(t=>/* @__PURE__ */ L.createElement(yu,{...e,onEnd:t}))}checklist(e){return this.ask(t=>/* @__PURE__ */ L.createElement(fu,{...e,onEnd:t}))}autocomplete(e){return this.ask(t=>/* @__PURE__ */ L.createElement(su,{...e,onEnd:t}))}text(e){return this.ask(t=>/* @__PURE__ */ L.createElement(Cu,{...e,onEnd:t}))}password(e){return this.ask(t=>/* @__PURE__ */ L.createElement(Cu,{...e,masked:!0,onEnd:t}))}async ask(e){let t=Promise.withResolvers(),n=El(e(t.resolve),{...this.streams,interactive:!0,exitOnCtrlC:!1,patchConsole:!1}),r=await t.promise;if(await n.waitUntilRenderFlush(),n.clear(),n.unmount(),await n.waitUntilExit(),r.kind===`cancelled`)throw new yt(We.CliCancelled);return r.answer}},Tu={dots:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`]},dots2:{interval:80,frames:[`⣾`,`⣽`,`⣻`,`⢿`,`⡿`,`⣟`,`⣯`,`⣷`]},dots3:{interval:80,frames:[`⠋`,`⠙`,`⠚`,`⠞`,`⠖`,`⠦`,`⠴`,`⠲`,`⠳`,`⠓`]},dots4:{interval:80,frames:[`⠄`,`⠆`,`⠇`,`⠋`,`⠙`,`⠸`,`⠰`,`⠠`,`⠰`,`⠸`,`⠙`,`⠋`,`⠇`,`⠆`]},dots5:{interval:80,frames:[`⠋`,`⠙`,`⠚`,`⠒`,`⠂`,`⠂`,`⠒`,`⠲`,`⠴`,`⠦`,`⠖`,`⠒`,`⠐`,`⠐`,`⠒`,`⠓`,`⠋`]},dots6:{interval:80,frames:[`⠁`,`⠉`,`⠙`,`⠚`,`⠒`,`⠂`,`⠂`,`⠒`,`⠲`,`⠴`,`⠤`,`⠄`,`⠄`,`⠤`,`⠴`,`⠲`,`⠒`,`⠂`,`⠂`,`⠒`,`⠚`,`⠙`,`⠉`,`⠁`]},dots7:{interval:80,frames:[`⠈`,`⠉`,`⠋`,`⠓`,`⠒`,`⠐`,`⠐`,`⠒`,`⠖`,`⠦`,`⠤`,`⠠`,`⠠`,`⠤`,`⠦`,`⠖`,`⠒`,`⠐`,`⠐`,`⠒`,`⠓`,`⠋`,`⠉`,`⠈`]},dots8:{interval:80,frames:/* @__PURE__ */ `⠁.⠁.⠉.⠙.⠚.⠒.⠂.⠂.⠒.⠲.⠴.⠤.⠄.⠄.⠤.⠠.⠠.⠤.⠦.⠖.⠒.⠐.⠐.⠒.⠓.⠋.⠉.⠈.⠈`.split(`.`)},dots9:{interval:80,frames:[`⢹`,`⢺`,`⢼`,`⣸`,`⣇`,`⡧`,`⡗`,`⡏`]},dots10:{interval:80,frames:[`⢄`,`⢂`,`⢁`,`⡁`,`⡈`,`⡐`,`⡠`]},dots11:{interval:100,frames:[`⠁`,`⠂`,`⠄`,`⡀`,`⢀`,`⠠`,`⠐`,`⠈`]},dots12:{interval:80,frames:/* @__PURE__ */ `⢀⠀.⡀⠀.⠄⠀.⢂⠀.⡂⠀.⠅⠀.⢃⠀.⡃⠀.⠍⠀.⢋⠀.⡋⠀.⠍⠁.⢋⠁.⡋⠁.⠍⠉.⠋⠉.⠋⠉.⠉⠙.⠉⠙.⠉⠩.⠈⢙.⠈⡙.⢈⠩.⡀⢙.⠄⡙.⢂⠩.⡂⢘.⠅⡘.⢃⠨.⡃⢐.⠍⡐.⢋⠠.⡋⢀.⠍⡁.⢋⠁.⡋⠁.⠍⠉.⠋⠉.⠋⠉.⠉⠙.⠉⠙.⠉⠩.⠈⢙.⠈⡙.⠈⠩.⠀⢙.⠀⡙.⠀⠩.⠀⢘.⠀⡘.⠀⠨.⠀⢐.⠀⡐.⠀⠠.⠀⢀.⠀⡀`.split(`.`)},dots13:{interval:80,frames:[`⣼`,`⣹`,`⢻`,`⠿`,`⡟`,`⣏`,`⣧`,`⣶`]},dots14:{interval:80,frames:[`⠉⠉`,`⠈⠙`,`⠀⠹`,`⠀⢸`,`⠀⣰`,`⢀⣠`,`⣀⣀`,`⣄⡀`,`⣆⠀`,`⡇⠀`,`⠏⠀`,`⠋⠁`]},dots8Bit:{interval:80,frames:/* @__PURE__ */ `⠀.⠁.⠂.⠃.⠄.⠅.⠆.⠇.⡀.⡁.⡂.⡃.⡄.⡅.⡆.⡇.⠈.⠉.⠊.⠋.⠌.⠍.⠎.⠏.⡈.⡉.⡊.⡋.⡌.⡍.⡎.⡏.⠐.⠑.⠒.⠓.⠔.⠕.⠖.⠗.⡐.⡑.⡒.⡓.⡔.⡕.⡖.⡗.⠘.⠙.⠚.⠛.⠜.⠝.⠞.⠟.⡘.⡙.⡚.⡛.⡜.⡝.⡞.⡟.⠠.⠡.⠢.⠣.⠤.⠥.⠦.⠧.⡠.⡡.⡢.⡣.⡤.⡥.⡦.⡧.⠨.⠩.⠪.⠫.⠬.⠭.⠮.⠯.⡨.⡩.⡪.⡫.⡬.⡭.⡮.⡯.⠰.⠱.⠲.⠳.⠴.⠵.⠶.⠷.⡰.⡱.⡲.⡳.⡴.⡵.⡶.⡷.⠸.⠹.⠺.⠻.⠼.⠽.⠾.⠿.⡸.⡹.⡺.⡻.⡼.⡽.⡾.⡿.⢀.⢁.⢂.⢃.⢄.⢅.⢆.⢇.⣀.⣁.⣂.⣃.⣄.⣅.⣆.⣇.⢈.⢉.⢊.⢋.⢌.⢍.⢎.⢏.⣈.⣉.⣊.⣋.⣌.⣍.⣎.⣏.⢐.⢑.⢒.⢓.⢔.⢕.⢖.⢗.⣐.⣑.⣒.⣓.⣔.⣕.⣖.⣗.⢘.⢙.⢚.⢛.⢜.⢝.⢞.⢟.⣘.⣙.⣚.⣛.⣜.⣝.⣞.⣟.⢠.⢡.⢢.⢣.⢤.⢥.⢦.⢧.⣠.⣡.⣢.⣣.⣤.⣥.⣦.⣧.⢨.⢩.⢪.⢫.⢬.⢭.⢮.⢯.⣨.⣩.⣪.⣫.⣬.⣭.⣮.⣯.⢰.⢱.⢲.⢳.⢴.⢵.⢶.⢷.⣰.⣱.⣲.⣳.⣴.⣵.⣶.⣷.⢸.⢹.⢺.⢻.⢼.⢽.⢾.⢿.⣸.⣹.⣺.⣻.⣼.⣽.⣾.⣿`.split(`.`)},dotsCircle:{interval:80,frames:[`⢎ `,`⠎⠁`,`⠊⠑`,`⠈⠱`,` ⡱`,`⢀⡰`,`⢄⡠`,`⢆⡀`]},sand:{interval:80,frames:/* @__PURE__ */ `⠁.⠂.⠄.⡀.⡈.⡐.⡠.⣀.⣁.⣂.⣄.⣌.⣔.⣤.⣥.⣦.⣮.⣶.⣷.⣿.⡿.⠿.⢟.⠟.⡛.⠛.⠫.⢋.⠋.⠍.⡉.⠉.⠑.⠡.⢁`.split(`.`)},line:{interval:130,frames:[`-`,`\\`,`|`,`/`]},line2:{interval:100,frames:[`⠂`,`-`,`–`,`—`,`–`,`-`]},rollingLine:{interval:80,frames:[`/ `,` - `,` \\ `,` |`,` |`,` \\ `,` - `,`/ `]},pipe:{interval:100,frames:[`┤`,`┘`,`┴`,`└`,`├`,`┌`,`┬`,`┐`]},simpleDots:{interval:400,frames:[`. `,`.. `,`...`,` `]},simpleDotsScrolling:{interval:200,frames:[`. `,`.. `,`...`,` ..`,` .`,` `]},star:{interval:70,frames:[`✶`,`✸`,`✹`,`✺`,`✹`,`✷`]},star2:{interval:80,frames:[`+`,`x`,`*`]},flip:{interval:70,frames:[`_`,`_`,`_`,`-`,"`","`",`'`,`´`,`-`,`_`,`_`,`_`]},hamburger:{interval:100,frames:[`☱`,`☲`,`☴`]},growVertical:{interval:120,frames:[`▁`,`▃`,`▄`,`▅`,`▆`,`▇`,`▆`,`▅`,`▄`,`▃`]},growHorizontal:{interval:120,frames:[`▏`,`▎`,`▍`,`▌`,`▋`,`▊`,`▉`,`▊`,`▋`,`▌`,`▍`,`▎`]},balloon:{interval:140,frames:[` `,`.`,`o`,`O`,`@`,`*`,` `]},balloon2:{interval:120,frames:[`.`,`o`,`O`,`°`,`O`,`o`,`.`]},noise:{interval:100,frames:[`▓`,`▒`,`░`]},bounce:{interval:120,frames:[`⠁`,`⠂`,`⠄`,`⠂`]},boxBounce:{interval:120,frames:[`▖`,`▘`,`▝`,`▗`]},boxBounce2:{interval:100,frames:[`▌`,`▀`,`▐`,`▄`]},triangle:{interval:50,frames:[`◢`,`◣`,`◤`,`◥`]},binary:{interval:80,frames:[`010010`,`001100`,`100101`,`111010`,`111101`,`010111`,`101011`,`111000`,`110011`,`110101`]},arc:{interval:100,frames:[`◜`,`◠`,`◝`,`◞`,`◡`,`◟`]},circle:{interval:120,frames:[`◡`,`⊙`,`◠`]},squareCorners:{interval:180,frames:[`◰`,`◳`,`◲`,`◱`]},circleQuarters:{interval:120,frames:[`◴`,`◷`,`◶`,`◵`]},circleHalves:{interval:50,frames:[`◐`,`◓`,`◑`,`◒`]},squish:{interval:100,frames:[`╫`,`╪`]},toggle:{interval:250,frames:[`⊶`,`⊷`]},toggle2:{interval:80,frames:[`▫`,`▪`]},toggle3:{interval:120,frames:[`□`,`■`]},toggle4:{interval:100,frames:[`■`,`□`,`▪`,`▫`]},toggle5:{interval:100,frames:[`▮`,`▯`]},toggle6:{interval:300,frames:[`ဝ`,`၀`]},toggle7:{interval:80,frames:[`⦾`,`⦿`]},toggle8:{interval:100,frames:[`◍`,`◌`]},toggle9:{interval:100,frames:[`◉`,`◎`]},toggle10:{interval:100,frames:[`㊂`,`㊀`,`㊁`]},toggle11:{interval:50,frames:[`⧇`,`⧆`]},toggle12:{interval:120,frames:[`☗`,`☖`]},toggle13:{interval:80,frames:[`=`,`*`,`-`]},arrow:{interval:100,frames:[`←`,`↖`,`↑`,`↗`,`→`,`↘`,`↓`,`↙`]},arrow2:{interval:80,frames:[`⬆️ `,`↗️ `,`➡️ `,`↘️ `,`⬇️ `,`↙️ `,`⬅️ `,`↖️ `]},arrow3:{interval:120,frames:[`▹▹▹▹▹`,`▸▹▹▹▹`,`▹▸▹▹▹`,`▹▹▸▹▹`,`▹▹▹▸▹`,`▹▹▹▹▸`]},bouncingBar:{interval:80,frames:[`[ ]`,`[= ]`,`[== ]`,`[=== ]`,`[====]`,`[ ===]`,`[ ==]`,`[ =]`,`[ ]`,`[ =]`,`[ ==]`,`[ ===]`,`[====]`,`[=== ]`,`[== ]`,`[= ]`]},bouncingBall:{interval:80,frames:[`( ● )`,`( ● )`,`( ● )`,`( ● )`,`( ●)`,`( ● )`,`( ● )`,`( ● )`,`( ● )`,`(● )`]},smiley:{interval:200,frames:[`😄 `,`😝 `]},monkey:{interval:300,frames:[`🙈 `,`🙈 `,`🙉 `,`🙊 `]},hearts:{interval:100,frames:[`💛 `,`💙 `,`💜 `,`💚 `,`💗 `]},clock:{interval:100,frames:[`🕛 `,`🕐 `,`🕑 `,`🕒 `,`🕓 `,`🕔 `,`🕕 `,`🕖 `,`🕗 `,`🕘 `,`🕙 `,`🕚 `]},earth:{interval:180,frames:[`🌍 `,`🌎 `,`🌏 `]},material:{interval:17,frames:/* @__PURE__ */ `█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁.██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁.███████▁▁▁▁▁▁▁▁▁▁▁▁▁.████████▁▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.██████████▁▁▁▁▁▁▁▁▁▁.███████████▁▁▁▁▁▁▁▁▁.█████████████▁▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁▁██████████████▁▁▁▁.▁▁▁██████████████▁▁▁.▁▁▁▁█████████████▁▁▁.▁▁▁▁██████████████▁▁.▁▁▁▁██████████████▁▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁██████████████▁.▁▁▁▁▁▁██████████████.▁▁▁▁▁▁██████████████.▁▁▁▁▁▁▁█████████████.▁▁▁▁▁▁▁█████████████.▁▁▁▁▁▁▁▁████████████.▁▁▁▁▁▁▁▁████████████.▁▁▁▁▁▁▁▁▁███████████.▁▁▁▁▁▁▁▁▁███████████.▁▁▁▁▁▁▁▁▁▁██████████.▁▁▁▁▁▁▁▁▁▁██████████.▁▁▁▁▁▁▁▁▁▁▁▁████████.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.██████▁▁▁▁▁▁▁▁▁▁▁▁▁█.████████▁▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.█████████▁▁▁▁▁▁▁▁▁▁▁.███████████▁▁▁▁▁▁▁▁▁.████████████▁▁▁▁▁▁▁▁.████████████▁▁▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.██████████████▁▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁██████████████▁▁▁▁▁.▁▁▁█████████████▁▁▁▁.▁▁▁▁▁████████████▁▁▁.▁▁▁▁▁████████████▁▁▁.▁▁▁▁▁▁███████████▁▁▁.▁▁▁▁▁▁▁▁█████████▁▁▁.▁▁▁▁▁▁▁▁█████████▁▁▁.▁▁▁▁▁▁▁▁▁█████████▁▁.▁▁▁▁▁▁▁▁▁█████████▁▁.▁▁▁▁▁▁▁▁▁▁█████████▁.▁▁▁▁▁▁▁▁▁▁▁████████▁.▁▁▁▁▁▁▁▁▁▁▁████████▁.▁▁▁▁▁▁▁▁▁▁▁▁███████▁.▁▁▁▁▁▁▁▁▁▁▁▁███████▁.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁███████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁.▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁`.split(`.`)},moon:{interval:80,frames:[`🌑 `,`🌒 `,`🌓 `,`🌔 `,`🌕 `,`🌖 `,`🌗 `,`🌘 `]},runner:{interval:140,frames:[`🚶 `,`🏃 `]},pong:{interval:80,frames:/* @__PURE__ */ `▐⠂ ▌.▐⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂▌.▐ ⠠▌.▐ ⡀▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐ ⠠ ▌.▐ ⠂ ▌.▐ ⠈ ▌.▐ ⠂ ▌.▐ ⠠ ▌.▐ ⡀ ▌.▐⠠ ▌`.split(`.`)},shark:{interval:120,frames:/* @__PURE__ */ `▐|\\____________▌.▐_|\\___________▌.▐__|\\__________▌.▐___|\\_________▌.▐____|\\________▌.▐_____|\\_______▌.▐______|\\______▌.▐_______|\\_____▌.▐________|\\____▌.▐_________|\\___▌.▐__________|\\__▌.▐___________|\\_▌.▐____________|\\▌.▐____________/|▌.▐___________/|_▌.▐__________/|__▌.▐_________/|___▌.▐________/|____▌.▐_______/|_____▌.▐______/|______▌.▐_____/|_______▌.▐____/|________▌.▐___/|_________▌.▐__/|__________▌.▐_/|___________▌.▐/|____________▌`.split(`.`)},dqpb:{interval:100,frames:[`d`,`q`,`p`,`b`]},weather:{interval:100,frames:[`☀️ `,`☀️ `,`☀️ `,`🌤 `,`⛅️ `,`🌥 `,`☁️ `,`🌧 `,`🌨 `,`🌧 `,`🌨 `,`🌧 `,`🌨 `,`⛈ `,`🌨 `,`🌧 `,`🌨 `,`☁️ `,`🌥 `,`⛅️ `,`🌤 `,`☀️ `,`☀️ `]},christmas:{interval:400,frames:[`🌲`,`🎄`]},grenade:{interval:80,frames:[`، `,`′ `,` ´ `,` ‾ `,` ⸌`,` ⸊`,` |`,` ⁎`,` ⁕`,` ෴ `,` ⁓`,` `,` `,` `]},point:{interval:125,frames:[`∙∙∙`,`●∙∙`,`∙●∙`,`∙∙●`,`∙∙∙`]},layer:{interval:150,frames:[`-`,`=`,`≡`]},betaWave:{interval:80,frames:[`ρββββββ`,`βρβββββ`,`ββρββββ`,`βββρβββ`,`ββββρββ`,`βββββρβ`,`ββββββρ`]},fingerDance:{interval:160,frames:[`🤘 `,`🤟 `,`🖖 `,`✋ `,`🤚 `,`👆 `]},fistBump:{interval:80,frames:[`🤜    🤛 `,`🤜    🤛 `,`🤜    🤛 `,` 🤜  🤛  `,`  🤜🤛   `,` 🤜✨🤛   `,`🤜 ✨ 🤛  `]},soccerHeader:{interval:80,frames:[` 🧑⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `,`🧑 ⚽️ 🧑 `]},mindblown:{interval:160,frames:[`😐 `,`😐 `,`😮 `,`😮 `,`😦 `,`😦 `,`😧 `,`😧 `,`🤯 `,`💥 `,`✨ `,`  `,`  `,`  `]},speaker:{interval:160,frames:[`🔈 `,`🔉 `,`🔊 `,`🔉 `]},orangePulse:{interval:100,frames:[`🔸 `,`🔶 `,`🟠 `,`🟠 `,`🔶 `]},bluePulse:{interval:100,frames:[`🔹 `,`🔷 `,`🔵 `,`🔵 `,`🔷 `]},orangeBluePulse:{interval:100,frames:[`🔸 `,`🔶 `,`🟠 `,`🟠 `,`🔶 `,`🔹 `,`🔷 `,`🔵 `,`🔵 `,`🔷 `]},timeTravel:{interval:100,frames:[`🕛 `,`🕚 `,`🕙 `,`🕘 `,`🕗 `,`🕖 `,`🕕 `,`🕔 `,`🕓 `,`🕒 `,`🕑 `,`🕐 `]},aesthetic:{interval:80,frames:[`▰▱▱▱▱▱▱`,`▰▰▱▱▱▱▱`,`▰▰▰▱▱▱▱`,`▰▰▰▰▱▱▱`,`▰▰▰▰▰▱▱`,`▰▰▰▰▰▰▱`,`▰▰▰▰▰▰▰`,`▰▱▱▱▱▱▱`]},dwarfFortress:{interval:80,frames:/* @__PURE__ */ ` ██████£££ .☺██████£££ .☺██████£££ .☺▓█████£££ .☺▓█████£££ .☺▒█████£££ .☺▒█████£££ .☺░█████£££ .☺░█████£££ .☺ █████£££ . ☺█████£££ . ☺█████£££ . ☺▓████£££ . ☺▓████£££ . ☺▒████£££ . ☺▒████£££ . ☺░████£££ . ☺░████£££ . ☺ ████£££ . ☺████£££ . ☺████£££ . ☺▓███£££ . ☺▓███£££ . ☺▒███£££ . ☺▒███£££ . ☺░███£££ . ☺░███£££ . ☺ ███£££ . ☺███£££ . ☺███£££ . ☺▓██£££ . ☺▓██£££ . ☺▒██£££ . ☺▒██£££ . ☺░██£££ . ☺░██£££ . ☺ ██£££ . ☺██£££ . ☺██£££ . ☺▓█£££ . ☺▓█£££ . ☺▒█£££ . ☺▒█£££ . ☺░█£££ . ☺░█£££ . ☺ █£££ . ☺█£££ . ☺█£££ . ☺▓£££ . ☺▓£££ . ☺▒£££ . ☺▒£££ . ☺░£££ . ☺░£££ . ☺ £££ . ☺£££ . ☺£££ . ☺▓££ . ☺▓££ . ☺▒££ . ☺▒££ . ☺░££ . ☺░££ . ☺ ££ . ☺££ . ☺££ . ☺▓£ . ☺▓£ . ☺▒£ . ☺▒£ . ☺░£ . ☺░£ . ☺ £ . ☺£ . ☺£ . ☺▓ . ☺▓ . ☺▒ . ☺▒ . ☺░ . ☺░ . ☺ . ☺ &. ☺ ☼&. ☺ ☼ &. ☺☼ &. ☺☼ & . ‼ & . ☺ & . ‼ & . ☺ & . ‼ & . ☺ & .‼ & . & . & . & ░ . & ▒ . & ▓ . & £ . & ░£ . & ▒£ . & ▓£ . & ££ . & ░££ . & ▒££ .& ▓££ .& £££ . ░£££ . ▒£££ . ▓£££ . █£££ . ░█£££ . ▒█£££ . ▓█£££ . ██£££ . ░██£££ . ▒██£££ . ▓██£££ . ███£££ . ░███£££ . ▒███£££ . ▓███£££ . ████£££ . ░████£££ . ▒████£££ . ▓████£££ . █████£££ . ░█████£££ . ▒█████£££ . ▓█████£££ . ██████£££ . ██████£££ `.split(`.`)},fish:{interval:80,frames:/* @__PURE__ */ `~~~~~~~~~~~~~~~~~~~~.> ~~~~~~~~~~~~~~~~~~.º> ~~~~~~~~~~~~~~~~~.(º> ~~~~~~~~~~~~~~~~.((º> ~~~~~~~~~~~~~~~.<((º> ~~~~~~~~~~~~~~.><((º> ~~~~~~~~~~~~~. ><((º> ~~~~~~~~~~~~.~ ><((º> ~~~~~~~~~~~.~~ <>((º> ~~~~~~~~~~.~~~ ><((º> ~~~~~~~~~.~~~~ <>((º> ~~~~~~~~.~~~~~ ><((º> ~~~~~~~.~~~~~~ <>((º> ~~~~~~.~~~~~~~ ><((º> ~~~~~.~~~~~~~~ <>((º> ~~~~.~~~~~~~~~ ><((º> ~~~.~~~~~~~~~~ <>((º> ~~.~~~~~~~~~~~ ><((º> ~.~~~~~~~~~~~~ <>((º> .~~~~~~~~~~~~~ ><((º>.~~~~~~~~~~~~~~ <>((º.~~~~~~~~~~~~~~~ ><((.~~~~~~~~~~~~~~~~ <>(.~~~~~~~~~~~~~~~~~ ><.~~~~~~~~~~~~~~~~~~ <.~~~~~~~~~~~~~~~~~~~~`.split(`.`)}},Eu=Tu;Object.keys(Tu);const Du=1e3;function Ou(e){let t=Math.round(e);return t<Du?`${t}ms`:`${(e/Du).toFixed(1)}s`}const{frames:ku,interval:Au}=Eu.dots,ju=`\r\x1B[2K`;var Mu=class e{write;render;frame=0;timer;constructor(e,t){this.write=e,this.render=t}static start(t,n){let r=new e(t,n);return t(`\x1B[?25l`),r.draw(),r.timer=setInterval(()=>r.draw(),Au),process.once(`SIGINT`,r.restoreOnInterrupt),r}printAbove(e){this.write(`${ju}${e}\n`),this.draw()}stop(){clearInterval(this.timer),process.off(`SIGINT`,this.restoreOnInterrupt),this.write(`${ju}[?25h`)}draw(){let e=ku[this.frame++%ku.length]??``;this.write(`${ju}${this.render(e)}`)}restoreOnInterrupt=()=>{this.stop(),process.kill(process.pid,`SIGINT`)}},Nu=class{options;startedAt=0;spinner;constructor(e){this.options=e}async run(e,t){this.start();let n;try{n=await e()}catch(e){throw this.finish(I.coral(I.cross),t.linesUnderFailure(e)),e}let r;try{r=t.done(n)}catch(e){throw this.spinner?.stop(),e}return this.finish(I.mint(I.check),r.lines,r.note),n}printAbove(e){this.spinner?this.spinner.printAbove(` ${e}`):this.options.write(` ${e}\n`)}start(){this.startedAt=performance.now(),this.options.animate&&(this.spinner=Mu.start(this.options.write,e=>this.line(I.sky(e))))}finish(e,t,n){this.spinner?.stop(),this.options.write(`${this.line(e,n)}\n`);for(let e of t)this.options.write(` ${I.mute(`│`)} ${e}\n`)}line(e,t){let{label:n,labelWidth:r}=this.options,i=I.mute(Ou(performance.now()-this.startedAt).padStart(6)),a=t?` ${t}`:``;return` ${e} ${n.padEnd(r)} ${i}${a}`}};async function Pu(e,t){try{return await t()}catch(t){if(!xt(t,`SeedcordError`,We.CliCancelled))throw t;e.line(I.mute(`cancelled`));return}}var Fu={node:`^24.22.1 || >=26.12.1`,bun:`>=1.4.2`},Iu={type:`git`,url:`https://github.com/seedcord/seedcord.git`,directory:`cli/create-seedcord`};function Lu(e){return`no-${e}`}function Ru({flag:e},t){let n=t[e.name],r=Lu(e.name),i=e.noFlag!==void 0&&t[r]===!0;if(i&&n!==void 0)throw new bt(We.CreateBadUsage,[`Pass --${e.name} or --${r}, not both.`]);return`parse`in e?i?null:typeof n==`string`?e.parse(n):void 0:!i&&n}function zu(e,t){let n={};for(let r of e){let e=Ru(r,t);e!==void 0&&(n[r.key]=e)}return n}const Bu=/* @__PURE__ */ `Blurple.Aqua.Blue.DarkAqua.DarkBlue.DarkButNotBlack.DarkerGrey.DarkGold.DarkGreen.DarkGrey.DarkNavy.DarkOrange.DarkPurple.DarkRed.DarkVividPink.Default.Fuchsia.Gold.Green.Grey.Greyple.LightGrey.LuminousVividPink.Navy.NotQuiteBlack.Orange.Purple.Red.White.Yellow.Random`.split(`.`);function Vu(e){let t=e.trim().replace(/^#/,``);return/^[\da-f]{6}$/i.test(t)?`#${t.toLowerCase()}`:null}function Hu(e){let t=Vu(e);if(t)return t;let n=e.trim().toLowerCase(),r=Bu.find(e=>e.toLowerCase()===n);if(!r)throw new bt(We.CreateInvalidAnswer,[`color`,`Unknown color "${e}". Use a color name or a six-digit hex.`]);return r}const Uu=Bu.map(e=>({value:e,label:e}));function Wu(e){let t=Vu(e);return t?{value:t,label:t,hint:`hex`}:void 0}const Gu={key:`botColor`,label:`color`,flag:{name:`color`,description:`a color name or a six-digit hex`,parse:Hu},ask:async(e,t)=>Hu(await t.autocomplete({message:`Pick an accent color, or type a hex`,placeholder:`Blurple`,choices:Uu,typedChoice:Wu})),shown:e=>e},Ku=[{id:`guild-messages`,label:`Messages in servers`,hint:`know when a message is sent, edited, or deleted`,intents:[`GuildMessages`],partials:[]},{id:`message-text`,label:`The messages' contents`,hint:`without this, message text is empty unless the message mentions your bot`,intents:[`GuildMessages`,`MessageContent`],partials:[]},{id:`direct-messages`,label:`Direct messages`,hint:`messages people send your bot directly`,intents:[`DirectMessages`],partials:[`Channel`]},{id:`reactions`,label:`Reactions`,hint:`know when someone reacts to a message`,intents:[`GuildMessageReactions`,`DirectMessageReactions`],partials:[`Message`,`Channel`,`Reaction`]},{id:`members`,label:`Member joins and leaves`,hint:`also covers nickname and role changes`,intents:[`GuildMembers`],partials:[`GuildMember`]},{id:`presence`,label:`Member online status`,hint:`who is online, and what they are playing`,intents:[`GuildPresences`],partials:[]},{id:`voice`,label:`Voice channel activity`,hint:`know when someone joins, leaves, or moves between voice channels`,intents:[`GuildVoiceStates`],partials:[]},{id:`moderation`,label:`Bans and timeouts`,hint:`know when a member is banned, unbanned, or timed out`,intents:[`GuildModeration`],partials:[]},{id:`scheduled-events`,label:`Scheduled events`,hint:`know when a server event is made, changed, or starts, and when people sign up`,intents:[`GuildScheduledEvents`],partials:[`User`]},{id:`automod`,label:`AutoMod`,hint:`know when a server AutoMod rule changes or fires`,intents:[`AutoModerationConfiguration`,`AutoModerationExecution`],partials:[]},{id:`polls`,label:`Polls`,hint:`know when someone votes in a poll`,intents:[`GuildMessagePolls`,`DirectMessagePolls`],partials:[`Message`,`Channel`,`Poll`,`PollAnswer`]}];function qu(e){let t=new Set(e);return Ku.filter(e=>t.has(e.id))}function Ju(e){return[.../* @__PURE__ */ new Set([`Guilds`,...qu(e).flatMap(e=>e.intents)])]}function Yu(e){return[...new Set(qu(e).flatMap(e=>e.partials))]}const Xu=/* @__PURE__ */ new Set([`GuildMembers`,`GuildPresences`,`MessageContent`]);function Zu(e){return Ju(e).filter(e=>Xu.has(e))}function Qu(e){return Zu([e]).length>0}function $u(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e!==``);for(let e of t)if(!Ku.some(t=>t.id===e))throw new bt(We.CreateInvalidAnswer,[`capabilities`,`Unknown capability "${e}". Run with --help for the list.`]);return t}function ed(e,t){return Qu(e)?`${t} ${I.amber(`privileged`)}`:t}function td(e){return Ku.find(t=>t.id===e)?.label??e}const nd={key:`capabilities`,label:`events`,flag:{name:`capabilities`,description:`a comma separated list of ${Ku.map(e=>e.id).join(`, `)}`,parse:$u},skip:e=>e.transport===`http`,ask:(e,t)=>t.checklist({message:`What should your bot react to?`,choices:Ku.map(e=>({value:e.id,label:ed(e.id,e.label),hint:e.hint}))}),shown:e=>e.length===0?I.mute(`none`):e.map(td).join(`, `)};function rd(e){let t=x(e,{throwIfNoEntry:!1});if(t===void 0)return{existed:!1};if(t.isDirectory()&&b(e).length===0)return{existed:!0};throw new yt(We.CreateTargetNotEmpty,[e])}function id(e){return Error.isError(e)?e.message:String(e)}function ad(e){return t=>{try{e(t);return}catch(e){return id(e)}}}const od=/^[a-z\d][a-z\d._-]*$/,K=`lowercase, digits, and . _ -`,q=/[$`"!%]/;function sd(e){let n=e.trim();if(n===``)throw new bt(We.CreateInvalidAnswer,[`dir`,`A project directory cannot be empty.`]);let r=q.exec(n)?.[0];if(r!==void 0)throw new bt(We.CreateInvalidAnswer,[`dir`,`Pick a path without ${r}. A shell reads it even inside the quotes of the commands printed at the end.`]);let i=t(n);if(i.length>64)throw new bt(We.CreateInvalidAnswer,[`dir`,`Keep the folder name to 64 characters or fewer.`]);if(!od.test(i))throw new bt(We.CreateInvalidAnswer,[`dir`,`The folder name becomes the package name. Use ${K}, starting with a letter or digit.`]);return n}const cd={key:`directory`,label:`folder`,flag:{name:`dir`,description:`where the project goes`,parse:sd},ask:async(e,t)=>sd(await t.text({message:`Where should the project go? ${I.mute(K)}`,placeholder:`my-bot`,validate:ad(e=>rd(o(sd(e))))})),shown:e=>e},ld=[{value:`server`,label:`Node or Bun`,hint:`a process you run on any host`},{value:`edge`,label:`Cloudflare Workers`,hint:`a worker on Cloudflare's network`}],ud=ld.map(({value:e})=>e);function dd(e){let t=e.trim().toLowerCase(),n=ud.find(e=>e===t);if(!n)throw new bt(We.CreateInvalidAnswer,[`runtime`,`Unknown runtime "${e}". Pick server or edge.`]);return n}const fd={key:`runtime`,label:`runtime`,flag:{name:`runtime`,description:`server or edge, for an http bot`,parse:dd},skip:e=>e.transport===`gateway`,answerWithoutTerminal:`server`,ask:(e,t)=>t.select({message:`Where should your http bot run?`,choices:ld}),shown:e=>ld.find(t=>t.value===e)?.label??e};function pd(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e!==``),n=t.find(e=>!Ct(e));if(n!==void 0)throw new bt(We.CreateInvalidAnswer,[`testing-guilds`,`"${n}" is not a server id. Right-click the server in Discord with Developer Mode on and pick Copy Server ID.`]);return t}const md={key:`testingGuilds`,label:`test servers`,flag:{name:`testing-guilds`,description:`comma-separated server ids your commands deploy to while you build`,parse:pd},answerWithoutTerminal:[],ask:async(e,t)=>pd(await t.text({message:`Server ids to test your commands in ${I.mute(`or press Enter to deploy them globally`)}`,validate:ad(pd)})),shown:e=>e.length===0?I.mute(`global`):e.join(`, `)};function hd(e){try{return jt(e)}catch{throw new bt(We.CreateInvalidAnswer,[`token`,`That does not look like a bot token. Copy it from the Bot page of your app.`])}}const gd={key:`token`,label:`token`,flag:{name:`token`,description:`your bot token`,parse:hd,noFlag:`leave the bot token empty in .env to fill in later`},ask:async(e,t)=>{let n=await t.password({message:`Paste your bot token ${I.mute(`or press Enter twice to add it to .env later`)}`,validate:ad(hd),emptyWarning:`Nothing pasted. Press Enter again to leave it empty in .env for now.`});return n===``?null:hd(n)},shown:e=>e===null?I.mute(`later, in .env`):`••••••••`},_d=[`http`,`gateway`],vd=[{value:`http`,label:`Http`,hint:`Discord posts interactions to your URL`},{value:`gateway`,label:`Gateway`,hint:`keeps a connection to Discord open for messages, reactions, joins, and voice activity too`}];function yd(e){let t=e.trim().toLowerCase(),n=_d.find(e=>e===t);if(!n)throw new bt(We.CreateInvalidAnswer,[`transport`,`Unknown transport "${e}". Pick http or gateway.`]);return n}const bd={key:`transport`,label:`transport`,flag:{name:`transport`,description:`http or gateway`,parse:yd},ask:(e,t)=>t.select({message:`How should Discord reach your bot?`,choices:vd}),shown:e=>vd.find(t=>t.value===e)?.label??e};function xd(e){return e?`yes`:`no`}const Sd=[cd,bd,fd,nd,gd,md,Gu,{key:`install`,label:`install`,flag:{name:`install`,description:`install dependencies`,noFlag:`skip installing dependencies`},answerWithoutTerminal:!0,ask:(e,t)=>t.confirm({message:`Install dependencies now?`,initial:!0}),shown:xd},{key:`git`,label:`git`,flag:{name:`git`,description:`run git init and make the first commit`,noFlag:`skip git init and the first commit`},answerWithoutTerminal:!0,ask:(e,t)=>t.confirm({message:`Set up git with a first commit?`,initial:!0}),shown:xd}],Cd=`verbose`,wd=Object.fromEntries([...Sd.flatMap(({flag:e})=>[[e.name,{type:`parse`in e?`string`:`boolean`}],...e.noFlag===void 0?[]:[[Lu(e.name),{type:`boolean`}]]]),[Cd,{type:`boolean`}]]),Td=/* @__PURE__ */ new Set([`--help`,`-h`]),Ed=/* @__PURE__ */ new Set([`--version`,`-v`]);function Dd(e){return e.some(e=>Td.has(e))}function Od(e){return e.some(e=>Ed.has(e))}function J(e){return e.includes(`--${Cd}`)}function kd(e){try{return C({args:e,options:wd,allowPositionals:!0,strict:!0})}catch(e){throw new bt(We.CreateBadUsage,[Error.isError(e)?e.message:`Could not read the command line.`])}}function Ad(e,t){if(e.length>1)throw new bt(We.CreateBadUsage,[`Pass one directory at most.`]);let[n]=e;if(n!==void 0&&typeof t==`string`&&t!==n)throw new bt(We.CreateInvalidAnswer,[`dir`,`The directory was given twice. Pass it as an argument or as a flag.`]);return typeof t==`string`?t:n}function jd(e){let{values:t,positionals:n}=kd(e),r=Ad(n,t.dir),i=Object.fromEntries(Object.entries({...t,dir:r}).filter(e=>typeof e[1]==`string`||typeof e[1]==`boolean`));return zu(Sd,i)}const Md=[{name:Cd,description:`show the stack frames a failed step leaves out`},{name:`version`,short:`v`,description:`print the version`},{name:`help`,short:`h`,description:`print this`}];function Nd({flag:e}){return e.noFlag===void 0?[e]:[e,{name:Lu(e.name),description:e.noFlag}]}function Pd(e){return e.short===void 0?`--${e.name}`:`-${e.short}, --${e.name}`}function Fd(){let e=[...Sd.flatMap(Nd),...Md],t=Math.max(...e.map(e=>Pd(e).length));return[`Usage: create-seedcord [directory] [flags]`,``,`Every question the interview asks has a flag. Pass them all to skip the interview.`,``,...e.map(e=>` ${Pd(e).padEnd(t)} ${e.description}`),``,`npm needs a -- before the flags: npm create seedcord my-bot -- --transport gateway`].join(`
127
+ `)}function Id(e){return e?`https://discord.com/oauth2/authorize?client_id=${e.applicationId}`:null}function Ld(e=`0.5.0`){let t=`${Ye}${I.mute(` create`)}`;return e===void 0?t:`${t}${I.pith(` • v${e}`)}`}const Rd=/error|ERR[_!]/i,zd=/ERR_PNPM_IGNORED_BUILDS/,Bd=/^\s/,Vd=/[\r\n]+/,Hd=/^\s+at\s/;function Ud(e,t){let n=[];for(let e of t){if(!Bd.test(e.plain))break;n.push(e)}return[e,...n]}function Wd(e){let t=[],n=-1;for(let[r,i]of e.entries()){if(r<=n||!Rd.test(i.plain))continue;let a=Ud(i,e.slice(r+1));t.push(...a),n=r+a.length-1}return(t.length>0?t:e).slice(-12)}var Gd=class extends yt{command;output;constructor(e,t){super(We.CreateStepFailed,[e,t.join(`
128
128
  `)]),this.command=e,this.output=t}};const Kd=/* @__PURE__ */ new Set([`npm`,`npx`,`pnpm`,`yarn`,`bun`,`deno`]);function qd(e,t,n){let r=n===`win32`&&Kd.has(e);return r?{command:[e,...t].join(` `),args:[],shell:r}:{command:e,args:t,shell:r}}function Jd(e){return(t,n,r)=>Y(t,n,r,e)}function Y(e,t,n,{verbose:r,color:i}){let a=[e,...t].join(` `),o=qd(e,t,c.platform),s=i?{...c.env,FORCE_COLOR:`1`}:c.env;return new Promise((e,t)=>{let i=_(o.command,o.args,{cwd:n,shell:o.shell,env:s}),c=[],l=e=>{for(let t of e.toString(`utf8`).split(Vd)){let e=t.trimEnd().slice(0,4096),n=T(e);n.trim()===``||!r&&Hd.test(n)||c.push({text:e,plain:n})}};i.stdout.on(`data`,l),i.stderr.on(`data`,l),i.on(`error`,e=>{t(new Gd(a,[e.message]))}),i.on(`close`,n=>{if(n===0){e(null);return}let r=Wd(c).map(e=>e.text);if(c.some(e=>zd.test(e.plain))){e(r.join(`
129
129
  `));return}t(new Gd(a,r.length>0?r:[`exited with ${n}`]))})})}const X=[`intents`,`next`,`invite`,`again`,`guide`];function Z(e){return e instanceof Gd?[I.mute(e.command),...e.output]:id(e).split(`
130
130
  `)}var Q=class{stdout;stderr;labelWidth;constructor(e,t=process.stdout,n=process.stderr){this.stdout=t,this.stderr=n,this.labelWidth=Math.max(...[...e,...X].map(e=>e.length))}header(){this.stdout.write(`\n${Ld()}\n\n`)}answer(e,t){this.line(`${I.mint(I.check)} ${e.padEnd(this.labelWidth)} ${t}`)}stepRows(){return{run:(e,t)=>new Nu({write:e=>this.stdout.write(e),label:e,labelWidth:this.labelWidth,animate:!!this.stdout.isTTY}).run(t,{done:()=>({lines:[]}),linesUnderFailure:Z}),skip:e=>this.line(I.mute(`- ${e.padEnd(this.labelWidth)} skipped`))}}plainSteps(){return{run:async(e,t)=>{try{return await t()}catch(e){throw this.warn(id(e)),e}},skip:()=>void 0}}warn(e){let[t,...n]=e.split(`
131
131
  `);this.line(`${I.amber(`▲`)} ${t}`);for(let e of n)this.line(` ${e}`)}row(e,t){let n=` `.repeat(this.labelWidth);for(let[r,i]of t.entries()){let t=r===0?I.mute(e.padEnd(this.labelWidth)):n;this.line(` ${t} ${i}`)}}fail(e){this.stderr.write(`\n ${I.coral(`⬢`)} ${e}\n`),this.nothingCreated()}nothingCreated(){this.stderr.write(` ${I.mute(`Nothing was created.`)}\n`)}line(e=``){this.stdout.write(e===``?`
132
- `:` ${e}\n`)}};function $(e,t=[]){for(let n=0;n<e.length;n++)if(!e[n].startsWith(`-`)&&!(n>0&&t.includes(e[n-1])))return{before:e.slice(0,n),script:e[n],after:e.slice(n+1)};return{before:e,script:void 0,after:[]}}function Yd(e,t,n=[]){return r=>{let{before:i,script:a,after:o}=$(r,n);return a===void 0?[e,t,...i]:o.length>0?[e,t,...i,a,`--`,...o]:[e,t,...i,a]}}const Xd={agent:[`npm`,0],run:Yd(`npm`,`run`,[`-w`,`--workspace`]),install:[`npm`,`i`,0],frozen:[`npm`,`ci`,0],global:[`npm`,`i`,`-g`,0],add:[`npm`,`i`,0],upgrade:[`npm`,`update`,0],"upgrade-interactive":null,dedupe:[`npm`,`dedupe`,0],execute:[`npx`,0],"execute-local":[`npx`,0],uninstall:[`npm`,`uninstall`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]},Zd={agent:[`yarn`,0],run:[`yarn`,`run`,0],install:[`yarn`,`install`,0],frozen:[`yarn`,`install`,`--frozen-lockfile`,0],global:[`yarn`,`global`,`add`,0],add:[`yarn`,`add`,0],upgrade:[`yarn`,`upgrade`,0],"upgrade-interactive":[`yarn`,`upgrade-interactive`,0],dedupe:null,execute:[`npx`,0],"execute-local":Yd(`yarn`,`exec`),uninstall:[`yarn`,`remove`,0],global_uninstall:[`yarn`,`global`,`remove`,0]},Qd={...Zd,frozen:[`yarn`,`install`,`--immutable`,0],upgrade:[`yarn`,`up`,0],"upgrade-interactive":[`yarn`,`up`,`-i`,0],dedupe:[`yarn`,`dedupe`,0],execute:[`yarn`,`dlx`,0],"execute-local":[`yarn`,`exec`,0],global:[`npm`,`i`,`-g`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]};function $d(e){return{agent:[e,0],run:[e,`run`,0],install:[e,`i`,0],frozen:[e,`i`,`--frozen-lockfile`,0],global:[e,`add`,`-g`,0],add:[e,`add`,0],upgrade:[e,`update`,0],"upgrade-interactive":[e,`update`,`-i`,0],dedupe:[e,`dedupe`,0],execute:[e,`dlx`,0],"execute-local":[e,`exec`,0],uninstall:[e,`remove`,0],global_uninstall:[e,`remove`,`--global`,0]}}const ef=$d(`pnpm`),tf=$d(`rush-pnpm`),nf={agent:[`bun`,0],run:[`bun`,`run`,0],install:[`bun`,`install`,0],frozen:[`bun`,`install`,`--frozen-lockfile`,0],global:[`bun`,`add`,`-g`,0],add:[`bun`,`add`,0],upgrade:[`bun`,`update`,0],"upgrade-interactive":[`bun`,`update`,`-i`,0],dedupe:null,execute:[`bun`,`x`,0],"execute-local":[`bun`,`x`,0],uninstall:[`bun`,`remove`,0],global_uninstall:[`bun`,`remove`,`-g`,0]},rf={agent:[`aube`,0],run:[`aube`,`run`,0],install:[`aube`,`install`,0],frozen:[`aube`,`install`,`--frozen-lockfile`,0],global:[`aube`,`add`,`-g`,0],add:[`aube`,`add`,0],upgrade:[`aube`,`update`,0],"upgrade-interactive":[`aube`,`update`,`-i`,0],dedupe:[`aube`,`dedupe`,0],execute:[`aube`,`dlx`,0],"execute-local":[`aube`,`exec`,0],uninstall:[`aube`,`remove`,0],global_uninstall:[`aube`,`remove`,`-g`,0]},af={agent:[`deno`,0],run:[`deno`,`task`,0],install:[`deno`,`install`,0],frozen:[`deno`,`install`,`--frozen`,0],global:[`deno`,`install`,`-g`,0],add:[`deno`,`add`,0],upgrade:[`deno`,`outdated`,`--update`,0],"upgrade-interactive":[`deno`,`outdated`,`--update`,0],dedupe:null,execute:[`deno`,`x`,0],"execute-local":[`deno`,`task`,`--eval`,0],uninstall:[`deno`,`remove`,0],global_uninstall:[`deno`,`uninstall`,`-g`,0]},of={agent:[`nub`,0],run:[`nub`,`run`,0],install:[`nub`,`install`,0],frozen:[`nub`,`install`,`--frozen-lockfile`,0],global:[`nub`,`add`,`-g`,0],add:[`nub`,`add`,0],upgrade:[`nub`,`update`,0],"upgrade-interactive":[`nub`,`update`,`-i`,0],dedupe:[`nub`,`dedupe`,0],execute:[`nubx`,0],"execute-local":[`nub`,`exec`,0],uninstall:[`nub`,`remove`,0],global_uninstall:[`nub`,`remove`,`-g`,0]},sf={npm:Xd,yarn:Zd,"yarn@berry":Qd,pnpm:ef,"pnpm@6":{...ef,run:Yd(`pnpm`,`run`,[`-F`,`--filter`])},"pnpm-rush":tf,bun:nf,aube:rf,deno:af,nub:of};function cf(e,t,n){let r=sf[e][t];return lf(r,n)}function lf(e,t){if(e==null)return null;let n=typeof e==`function`?e(t):e.flatMap(e=>typeof e==`number`?t:[e]);return{command:n[0],args:n.slice(1)}}const uf=[`npm`,`yarn`,`yarn@berry`,`pnpm`,`pnpm@6`,`pnpm-rush`,`bun`,`deno`,`nub`,`aube`];function df(){let e=c.env.npm_config_user_agent;if(!e)return null;let t=e.split(`/`)[0];return uf.includes(t)?t:null}function ff(){return df()??`npm`}function pf(e,t,n){let r=cf(e,t,[`dev`]);return r?[r.command,...r.args.slice(0,-1)].join(` `):n}function mf(e){return pf(e,`run`,`${e} run`)}function hf(e){return pf(e,`execute-local`,`${e} exec`)}function gf(e,t,n){let r=n?[`-D`,...t]:t;return cf(e,`add`,r)??{command:e,args:[`add`,...r]}}function _f(e,t){return cf(e,`execute-local`,t)??{command:e,args:[`exec`,...t]}}const vf=[`files`,`install`,`format`,`types`,`git`],yf=`0.5.0-next.0`,bf={GuildMembers:`Server Members Intent`,GuildPresences:`Presence Intent`,MessageContent:`Message Content Intent`},xf=/^[\w@+=:./-]+$/;function Sf(e){return xf.test(e)?e:`"${e}"`}function Cf(e,t){let n=t.installed?[]:[I.bold(`${t.agent} install`)],r=e.token===null?[I.mute(`add DISCORD_BOT_TOKEN to .env`)]:[];return[I.bold(`cd ${Sf(e.directory)}`),...n,...r,I.bold(`${mf(t.agent)} dev`)]}function wf(e,t,n){return e===null?`--${Lu(t)}`:`--${t} ${n}`}function Tf(e,t){return e?`--${t}`:`--${Lu(t)}`}function Ef(e){let t=Zu(e);if(t.length===0)return[];let n=t.map(e=>bf[e]??e).join(`, `);return[I.amber(n),I.mute(`turn on under Bot in https://discord.com/developers/applications`)]}function Df(e,t){let n=[`--transport ${e.transport}`,e.transport===`gateway`?`--capabilities ${Sf(e.capabilities.join(`,`))}`:`--runtime ${e.runtime}`,wf(e.token,`token`,`YOUR_TOKEN`),`--testing-guilds=${e.testingGuilds.join(`,`)}`,`--color ${Sf(e.botColor)}`,Tf(e.install,`install`),Tf(e.git,`git`)],r=t===`npm`?`-- `:``;return`${t} create seedcord@${yf} ${Sf(e.directory)} ${r}${n.join(` `)}`}function Of({flag:e}){let t=`Required when there is no terminal to ask on.`;return e.noFlag===void 0?t:`${t} Pass --${Lu(e.name)} to ${e.noFlag}.`}async function kf(e,t,n){if(n.interactive){let r=await e.ask(t,n.prompter);return n.onAnswer(e.label,e.shown(r)),r}if(e.answerWithoutTerminal!==void 0)return e.answerWithoutTerminal;throw new bt(We.CreateInvalidAnswer,[e.flag.name,Of(e)])}async function Af(e,t,n){let r={...t};for(let i of e){if(i.skip?.(r)){if(i.key in t)throw new bt(We.CreateFlagNotApplicable,[i.flag.name]);continue}r[i.key]===void 0&&(r[i.key]=await kf(i,r,n))}return r}const jf=w(h);function Mf(e){return e===`darwin`?`brew install cloudflared`:e===`win32`?`winget install -e --id Cloudflare.cloudflared`:`https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`}function Nf(e){return`\`seedcord dev\` opens a cloudflared tunnel so Discord can reach your bot. Install it with:\n${I.mint(Mf(e))}`}async function Pf(e=`cloudflared`,t=3e3){return await jf(e,[`--version`],{timeout:t}).catch(()=>null)!==null}const Ff=w(h),If=`the developer`,Lf=`Error cards will say "${If}" until you set notifications.developerUsername in src/bot.ts.`,Rf=`git is not installed. ${Lf}`,zf=`git reported no user.name. ${Lf}`;function Bf(e,t){return e.installed?e.userName===null?zf:t&&e.insideRepo?`this directory is already inside a git repo. Nothing was initialized.`:null:Rf}function Vf(e,t){return{init:t&&e.installed&&!e.insideRepo,developerUsername:e.userName??If,notice:Bf(e,t)}}async function Hf(e,t){let n=await Ff(`git`,e,{cwd:t}).catch(()=>null);return n===null?null:n.stdout.trim()}async function Uf(e){if(await Hf([`--version`],e)===null)return{installed:!1,insideRepo:!1,userName:null};let[t,n]=await Promise.all([Hf([`rev-parse`,`--is-inside-work-tree`],e),Hf([`config`,`user.name`],e)]);return{installed:!0,insideRepo:t===`true`,userName:n===null||n===``?null:n}}function Wf(e){return e.transport===`gateway`?e.capabilities:[]}const Gf=/* @__PURE__ */ new Set([`guild-messages`,`message-text`,`direct-messages`]);function Kf(e,t){let n=e[t];if(n===void 0){let e=Sd.find(e=>e.key===t)?.flag.name??t;throw new bt(We.CreateInvalidAnswer,[e,`No answer was collected.`])}return n}function qf(e){let t={directory:Kf(e,`directory`),token:Kf(e,`token`),testingGuilds:Kf(e,`testingGuilds`),botColor:Kf(e,`botColor`),install:Kf(e,`install`),git:Kf(e,`git`)};return Kf(e,`transport`)===`gateway`?{...t,transport:`gateway`,capabilities:Kf(e,`capabilities`)}:{...t,transport:`http`,runtime:Kf(e,`runtime`)}}function Jf(e,n){let r=e.transport===`gateway`,i=e.transport===`http`&&e.runtime===`edge`,a=Wf(e);return{projectName:t(e.directory),isGateway:r,isEdge:i,transportPackage:r?`@seedcord/gateway`:`@seedcord/http`,intents:r?Ju(a):[],partials:r?Yu(a):[],hasMessages:a.some(e=>Gf.has(e)),token:e.token?.value??``,testingGuildIds:e.testingGuilds.join(`,`),botColor:e.botColor,developerUsername:n.developerUsername,cliOnBun:n.agent===`bun`&&!i,pm:{run:mf(n.agent),exec:hf(n.agent),isPnpm:n.agent===`pnpm`},engines:Fu}}var Yf=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.extend=a,e.indexOf=l,e.escapeExpression=u,e.isEmpty=d,e.createFrame=f,e.blockParams=p,e.appendContextPath=m;var t={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#x27;`,"`":`&#x60;`,"=":`&#x3D;`},n=/[&<>"'`=]/g,r=/[&<>"'`=]/;function i(e){return t[e]}function a(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var o=Object.prototype.toString;e.toString=o;var s=function(e){return typeof e==`function`};s(/x/)&&(e.isFunction=s=function(e){return typeof e==`function`&&o.call(e)===`[object Function]`}),e.isFunction=s;
132
+ `:` ${e}\n`)}};function $(e,t=[]){for(let n=0;n<e.length;n++)if(!e[n].startsWith(`-`)&&!(n>0&&t.includes(e[n-1])))return{before:e.slice(0,n),script:e[n],after:e.slice(n+1)};return{before:e,script:void 0,after:[]}}function Yd(e,t,n=[]){return r=>{let{before:i,script:a,after:o}=$(r,n);return a===void 0?[e,t,...i]:o.length>0?[e,t,...i,a,`--`,...o]:[e,t,...i,a]}}const Xd={agent:[`npm`,0],run:Yd(`npm`,`run`,[`-w`,`--workspace`]),install:[`npm`,`i`,0],frozen:[`npm`,`ci`,0],global:[`npm`,`i`,`-g`,0],add:[`npm`,`i`,0],upgrade:[`npm`,`update`,0],"upgrade-interactive":null,dedupe:[`npm`,`dedupe`,0],execute:[`npx`,0],"execute-local":[`npx`,0],uninstall:[`npm`,`uninstall`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]},Zd={agent:[`yarn`,0],run:[`yarn`,`run`,0],install:[`yarn`,`install`,0],frozen:[`yarn`,`install`,`--frozen-lockfile`,0],global:[`yarn`,`global`,`add`,0],add:[`yarn`,`add`,0],upgrade:[`yarn`,`upgrade`,0],"upgrade-interactive":[`yarn`,`upgrade-interactive`,0],dedupe:null,execute:[`npx`,0],"execute-local":Yd(`yarn`,`exec`),uninstall:[`yarn`,`remove`,0],global_uninstall:[`yarn`,`global`,`remove`,0]},Qd={...Zd,frozen:[`yarn`,`install`,`--immutable`,0],upgrade:[`yarn`,`up`,0],"upgrade-interactive":[`yarn`,`up`,`-i`,0],dedupe:[`yarn`,`dedupe`,0],execute:[`yarn`,`dlx`,0],"execute-local":[`yarn`,`exec`,0],global:[`npm`,`i`,`-g`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]};function $d(e){return{agent:[e,0],run:[e,`run`,0],install:[e,`i`,0],frozen:[e,`i`,`--frozen-lockfile`,0],global:[e,`add`,`-g`,0],add:[e,`add`,0],upgrade:[e,`update`,0],"upgrade-interactive":[e,`update`,`-i`,0],dedupe:[e,`dedupe`,0],execute:[e,`dlx`,0],"execute-local":[e,`exec`,0],uninstall:[e,`remove`,0],global_uninstall:[e,`remove`,`--global`,0]}}const ef=$d(`pnpm`),tf=$d(`rush-pnpm`),nf={agent:[`bun`,0],run:[`bun`,`run`,0],install:[`bun`,`install`,0],frozen:[`bun`,`install`,`--frozen-lockfile`,0],global:[`bun`,`add`,`-g`,0],add:[`bun`,`add`,0],upgrade:[`bun`,`update`,0],"upgrade-interactive":[`bun`,`update`,`-i`,0],dedupe:null,execute:[`bun`,`x`,0],"execute-local":[`bun`,`x`,0],uninstall:[`bun`,`remove`,0],global_uninstall:[`bun`,`remove`,`-g`,0]},rf={agent:[`aube`,0],run:[`aube`,`run`,0],install:[`aube`,`install`,0],frozen:[`aube`,`install`,`--frozen-lockfile`,0],global:[`aube`,`add`,`-g`,0],add:[`aube`,`add`,0],upgrade:[`aube`,`update`,0],"upgrade-interactive":[`aube`,`update`,`-i`,0],dedupe:[`aube`,`dedupe`,0],execute:[`aube`,`dlx`,0],"execute-local":[`aube`,`exec`,0],uninstall:[`aube`,`remove`,0],global_uninstall:[`aube`,`remove`,`-g`,0]},af={agent:[`deno`,0],run:[`deno`,`task`,0],install:[`deno`,`install`,0],frozen:[`deno`,`install`,`--frozen`,0],global:[`deno`,`install`,`-g`,0],add:[`deno`,`add`,0],upgrade:[`deno`,`outdated`,`--update`,0],"upgrade-interactive":[`deno`,`outdated`,`--update`,0],dedupe:null,execute:[`deno`,`x`,0],"execute-local":[`deno`,`task`,`--eval`,0],uninstall:[`deno`,`remove`,0],global_uninstall:[`deno`,`uninstall`,`-g`,0]},of={agent:[`nub`,0],run:[`nub`,`run`,0],install:[`nub`,`install`,0],frozen:[`nub`,`install`,`--frozen-lockfile`,0],global:[`nub`,`add`,`-g`,0],add:[`nub`,`add`,0],upgrade:[`nub`,`update`,0],"upgrade-interactive":[`nub`,`update`,`-i`,0],dedupe:[`nub`,`dedupe`,0],execute:[`nubx`,0],"execute-local":[`nub`,`exec`,0],uninstall:[`nub`,`remove`,0],global_uninstall:[`nub`,`remove`,`-g`,0]},sf={npm:Xd,yarn:Zd,"yarn@berry":Qd,pnpm:ef,"pnpm@6":{...ef,run:Yd(`pnpm`,`run`,[`-F`,`--filter`])},"pnpm-rush":tf,bun:nf,aube:rf,deno:af,nub:of};function cf(e,t,n){let r=sf[e][t];return lf(r,n)}function lf(e,t){if(e==null)return null;let n=typeof e==`function`?e(t):e.flatMap(e=>typeof e==`number`?t:[e]);return{command:n[0],args:n.slice(1)}}const uf=[`npm`,`yarn`,`yarn@berry`,`pnpm`,`pnpm@6`,`pnpm-rush`,`bun`,`deno`,`nub`,`aube`];function df(){let e=c.env.npm_config_user_agent;if(!e)return null;let t=e.split(`/`)[0];return uf.includes(t)?t:null}function ff(){return df()??`npm`}function pf(e,t,n){let r=cf(e,t,[`dev`]);return r?[r.command,...r.args.slice(0,-1)].join(` `):n}function mf(e){return pf(e,`run`,`${e} run`)}function hf(e){return pf(e,`execute-local`,`${e} exec`)}function gf(e,t,n){let r=n?[`-D`,...t]:t;return cf(e,`add`,r)??{command:e,args:[`add`,...r]}}function _f(e,t){return cf(e,`execute-local`,t)??{command:e,args:[`exec`,...t]}}const vf=[`files`,`install`,`format`,`types`,`git`],yf=`0.5.0`,bf={GuildMembers:`Server Members Intent`,GuildPresences:`Presence Intent`,MessageContent:`Message Content Intent`},xf=/^[\w@+=:./-]+$/;function Sf(e){return xf.test(e)?e:`"${e}"`}function Cf(e,t){let n=t.installed?[]:[I.bold(`${t.agent} install`)],r=e.token===null?[I.mute(`add DISCORD_BOT_TOKEN to .env`)]:[];return[I.bold(`cd ${Sf(e.directory)}`),...n,...r,I.bold(`${mf(t.agent)} dev`)]}function wf(e,t,n){return e===null?`--${Lu(t)}`:`--${t} ${n}`}function Tf(e,t){return e?`--${t}`:`--${Lu(t)}`}function Ef(e){let t=Zu(e);if(t.length===0)return[];let n=t.map(e=>bf[e]??e).join(`, `);return[I.amber(n),I.mute(`turn on under Bot in https://discord.com/developers/applications`)]}function Df(e,t){let n=[`--transport ${e.transport}`,e.transport===`gateway`?`--capabilities ${Sf(e.capabilities.join(`,`))}`:`--runtime ${e.runtime}`,wf(e.token,`token`,`YOUR_TOKEN`),`--testing-guilds=${e.testingGuilds.join(`,`)}`,`--color ${Sf(e.botColor)}`,Tf(e.install,`install`),Tf(e.git,`git`)],r=t===`npm`?`-- `:``;return`${t} create seedcord@${yf} ${Sf(e.directory)} ${r}${n.join(` `)}`}function Of({flag:e}){let t=`Required when there is no terminal to ask on.`;return e.noFlag===void 0?t:`${t} Pass --${Lu(e.name)} to ${e.noFlag}.`}async function kf(e,t,n){if(n.interactive){let r=await e.ask(t,n.prompter);return n.onAnswer(e.label,e.shown(r)),r}if(e.answerWithoutTerminal!==void 0)return e.answerWithoutTerminal;throw new bt(We.CreateInvalidAnswer,[e.flag.name,Of(e)])}async function Af(e,t,n){let r={...t};for(let i of e){if(i.skip?.(r)){if(i.key in t)throw new bt(We.CreateFlagNotApplicable,[i.flag.name]);continue}r[i.key]===void 0&&(r[i.key]=await kf(i,r,n))}return r}const jf=w(h);function Mf(e){return e===`darwin`?`brew install cloudflared`:e===`win32`?`winget install -e --id Cloudflare.cloudflared`:`https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`}function Nf(e){return`\`seedcord dev\` opens a cloudflared tunnel so Discord can reach your bot. Install it with:\n${I.mint(Mf(e))}`}async function Pf(e=`cloudflared`,t=3e3){return await jf(e,[`--version`],{timeout:t}).catch(()=>null)!==null}const Ff=w(h),If=`the developer`,Lf=`Error cards will say "${If}" until you set notifications.developerUsername in src/bot.ts.`,Rf=`git is not installed. ${Lf}`,zf=`git reported no user.name. ${Lf}`;function Bf(e,t){return e.installed?e.userName===null?zf:t&&e.insideRepo?`this directory is already inside a git repo. Nothing was initialized.`:null:Rf}function Vf(e,t){return{init:t&&e.installed&&!e.insideRepo,developerUsername:e.userName??If,notice:Bf(e,t)}}async function Hf(e,t){let n=await Ff(`git`,e,{cwd:t}).catch(()=>null);return n===null?null:n.stdout.trim()}async function Uf(e){if(await Hf([`--version`],e)===null)return{installed:!1,insideRepo:!1,userName:null};let[t,n]=await Promise.all([Hf([`rev-parse`,`--is-inside-work-tree`],e),Hf([`config`,`user.name`],e)]);return{installed:!0,insideRepo:t===`true`,userName:n===null||n===``?null:n}}function Wf(e){return e.transport===`gateway`?e.capabilities:[]}const Gf=/* @__PURE__ */ new Set([`guild-messages`,`message-text`,`direct-messages`]);function Kf(e,t){let n=e[t];if(n===void 0){let e=Sd.find(e=>e.key===t)?.flag.name??t;throw new bt(We.CreateInvalidAnswer,[e,`No answer was collected.`])}return n}function qf(e){let t={directory:Kf(e,`directory`),token:Kf(e,`token`),testingGuilds:Kf(e,`testingGuilds`),botColor:Kf(e,`botColor`),install:Kf(e,`install`),git:Kf(e,`git`)};return Kf(e,`transport`)===`gateway`?{...t,transport:`gateway`,capabilities:Kf(e,`capabilities`)}:{...t,transport:`http`,runtime:Kf(e,`runtime`)}}function Jf(e,n){let r=e.transport===`gateway`,i=e.transport===`http`&&e.runtime===`edge`,a=Wf(e);return{projectName:t(e.directory),isGateway:r,isEdge:i,transportPackage:r?`@seedcord/gateway`:`@seedcord/http`,intents:r?Ju(a):[],partials:r?Yu(a):[],hasMessages:a.some(e=>Gf.has(e)),token:e.token?.value??``,testingGuildIds:e.testingGuilds.join(`,`),botColor:e.botColor,developerUsername:n.developerUsername,cliOnBun:n.agent===`bun`&&!i,pm:{run:mf(n.agent),exec:hf(n.agent),isPnpm:n.agent===`pnpm`},engines:Fu}}var Yf=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.extend=a,e.indexOf=l,e.escapeExpression=u,e.isEmpty=d,e.createFrame=f,e.blockParams=p,e.appendContextPath=m;var t={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#x27;`,"`":`&#x60;`,"=":`&#x3D;`},n=/[&<>"'`=]/g,r=/[&<>"'`=]/;function i(e){return t[e]}function a(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var o=Object.prototype.toString;e.toString=o;var s=function(e){return typeof e==`function`};s(/x/)&&(e.isFunction=s=function(e){return typeof e==`function`&&o.call(e)===`[object Function]`}),e.isFunction=s;
133
133
  /* istanbul ignore next */
134
- var c=Array.isArray||function(e){return e&&typeof e==`object`?o.call(e)===`[object Array]`:!1};e.isArray=c;function l(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function u(e){if(typeof e!=`string`){if(e&&e.toHTML)return e.toHTML();if(e==null)return``;if(!e)return e+``;e=``+e}return r.test(e)?e.replace(n,i):e}function d(e){return!!(!e&&e!==0||c(e)&&e.length===0)}function f(e){var t=a({},e);return t._parent=e,t}function p(e,t){return e.path=t,e}function m(e,t){return(e?e+`.`:``)+t}})),Xf=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;var n=[`description`,`fileName`,`lineNumber`,`endLineNumber`,`message`,`name`,`number`,`stack`];function r(e,t){var i=t&&t.loc,a=void 0,o=void 0,s=void 0,c=void 0;i&&(a=i.start.line,o=i.end.line,s=i.start.column,c=i.end.column,e+=` - `+a+`:`+s);for(var l=Error.prototype.constructor.call(this,e),u=0;u<n.length;u++)this[n[u]]=l[n[u]];
134
+ var c=Array.isArray||function(e){return e&&typeof e==`object`?o.call(e)===`[object Array]`:!1};e.isArray=c;function l(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function u(e){if(typeof e!=`string`){if(e&&typeof e.toHTML==`function`)return e.toHTML();if(e==null)return``;if(!e)return e+``;e=``+e}return r.test(e)?e.replace(n,i):e}function d(e){return!!(!e&&e!==0||c(e)&&e.length===0)}function f(e){var t=a({},e);return t._parent=e,t}function p(e,t){return e.path=t,e}function m(e,t){return(e?e+`.`:``)+t}})),Xf=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;var n=[`description`,`fileName`,`lineNumber`,`endLineNumber`,`message`,`name`,`number`,`stack`];function r(e,t){var i=t&&t.loc,a=void 0,o=void 0,s=void 0,c=void 0;i&&i.start&&(a=i.start.line,s=i.start.column,i.end&&(o=i.end.line,c=i.end.column),e+=` - `+a+`:`+s);for(var l=Error.prototype.constructor.call(this,e),u=0;u<n.length;u++)this[n[u]]=l[n[u]];
135
135
  /* istanbul ignore else */
136
136
  Error.captureStackTrace&&Error.captureStackTrace(this,r);try{i&&(this.lineNumber=a,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:c,enumerable:!0})):(this.column=s,this.endColumn=c))}catch{}}r.prototype=/* @__PURE__ */ Error(),e.default=r,t.exports=e.default})),Zf=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;var n=Yf();e.default=function(e){e.registerHelper(`blockHelperMissing`,function(t,r){var i=r.inverse,a=r.fn;if(t===!0)return a(this);if(t===!1||t==null)return i(this);if(n.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):i(this);if(r.data&&r.ids){var o=n.createFrame(r.data);o.contextPath=n.appendContextPath(r.data.contextPath,r.name),r={data:o}}return a(t,r)})},t.exports=e.default})),Qf=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
137
137
  // istanbul ignore next
138
- function n(e){return e&&e.__esModule?e:{default:e}}var r=Yf(),i=n(Xf());e.default=function(e){e.registerHelper(`each`,function(e,t){if(!t)throw new i.default(`Must pass iterator to #each`);var n=t.fn,a=t.inverse,o=0,s=``,c=void 0,l=void 0;t.data&&t.ids&&(l=r.appendContextPath(t.data.contextPath,t.ids[0])+`.`),r.isFunction(e)&&(e=e.call(this)),t.data&&(c=r.createFrame(t.data));function u(t,i,a){c&&(c.key=t,c.index=i,c.first=i===0,c.last=!!a,l&&(c.contextPath=l+t)),s+=n(e[t],{data:c,blockParams:r.blockParams([e[t],t],[l+t,null])})}if(e&&typeof e==`object`){if(r.isArray(e))for(var d=e.length;o<d;o++)o in e&&u(o,o,o===e.length-1);else if(typeof Symbol==`function`&&e[Symbol.iterator]){for(var f=[],p=e[Symbol.iterator](),m=p.next();!m.done;m=p.next())f.push(m.value);e=f;for(var d=e.length;o<d;o++)u(o,o,o===e.length-1)}else(function(){var t=void 0;Object.keys(e).forEach(function(e){t!==void 0&&u(t,o-1),t=e,o++}),t!==void 0&&u(t,o-1,!0)})()}return o===0&&(s=a(this)),s})},t.exports=e.default})),$f=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
138
+ function n(e){return e&&e.__esModule?e:{default:e}}var r=Yf(),i=n(Xf());function a(e){try{var t=e.return;r.isFunction(t)&&t.call(e)}catch{}}e.default=function(e){e.registerHelper(`each`,function(e,t){if(!t)throw new i.default(`Must pass iterator to #each`);var n=t.fn,o=t.inverse,s=0,c=``,l=void 0,u=void 0;t.data&&t.ids&&(u=r.appendContextPath(t.data.contextPath,t.ids[0])+`.`),r.isFunction(e)&&(e=e.call(this)),t.data&&(l=r.createFrame(t.data));function d(e,t,i,a){l&&(l.key=e,l.index=t,l.first=t===0,l.last=!!i,u&&(l.contextPath=u+e)),c+=n(a,{data:l,blockParams:r.blockParams([a,e],[u+e,null])})}if(e&&typeof e==`object`){if(r.isArray(e))for(var f=e.length;s<f;s++)s in e&&d(s,s,s===e.length-1,e[s]);else if(typeof Symbol==`function`&&e[Symbol.iterator])for(var p=e[Symbol.iterator](),m=p.next();!m.done;){var h=p.next();try{d(s,s,h.done,m.value)}catch(e){throw h.done||a(p),e}m=h,s++}else(function(){var t=void 0;Object.keys(e).forEach(function(n){t!==void 0&&d(t,s-1,!1,e[t]),t=n,s++}),t!==void 0&&d(t,s-1,!0,e[t])})()}return s===0&&(c=o(this)),c})},t.exports=e.default})),$f=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
139
139
  // istanbul ignore next
140
140
  function n(e){return e&&e.__esModule?e:{default:e}}var r=n(Xf());e.default=function(e){e.registerHelper(`helperMissing`,function(){if(arguments.length!==1)throw new r.default(`Missing helper: "`+arguments[arguments.length-1].name+`"`)})},t.exports=e.default})),ep=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
141
141
  // istanbul ignore next
@@ -145,21 +145,21 @@ function n(e){return e&&e.__esModule?e:{default:e}}var r=Yf(),i=n(Xf());e.defaul
145
145
  // istanbul ignore next
146
146
  function t(e){return e&&e.__esModule?e:{default:e}}var n=t(Zf()),r=t(Qf()),i=t($f()),a=t(ep()),o=t(tp()),s=t(np()),c=t(rp());function l(e){n.default(e),r.default(e),i.default(e),a.default(e),o.default(e),s.default(e),c.default(e)}function u(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||(e.helpers[t]=void 0))}})),ap=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;var n=Yf();e.default=function(e){e.registerDecorator(`inline`,function(e,t,r,i){var a=e;return t.partials||(t.partials={},a=function(i,a){var o=r.partials;r.partials=n.extend({},o,t.partials);var s=e(i,a);return r.partials=o,s}),t.partials[i.args[0]]=i.fn,a})},t.exports=e.default})),op=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.registerDefaultDecorators=r;
147
147
  // istanbul ignore next
148
- function t(e){return e&&e.__esModule?e:{default:e}}var n=t(ap());function r(e){n.default(e)}})),sp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;var n=Yf(),r={methodMap:[`debug`,`info`,`warn`,`error`],level:`info`,lookupLevel:function(e){if(typeof e==`string`){var t=n.indexOf(r.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=r.lookupLevel(e),typeof console<`u`&&r.lookupLevel(r.level)<=e){var t=r.methodMap[e];console[t]||(t=`log`);var n=[...arguments].slice(1);console[t].apply(console,n)}}};e.default=r,t.exports=e.default})),cp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.createProtoAccessControl=a,e.resultIsAllowed=o,e.resetLoggedProperties=l;
148
+ function t(e){return e&&e.__esModule?e:{default:e}}var n=t(ap());function r(e){n.default(e)}})),sp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;var n=Yf(),r={methodMap:[`debug`,`info`,`warn`,`error`],level:`info`,lookupLevel:function(e){if(typeof e==`string`){var t=n.indexOf(r.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=r.lookupLevel(e),typeof console<`u`&&r.lookupLevel(r.level)<=e){var t=r.methodMap[e];console[t]||(t=`log`);var n=[...arguments].slice(1);console[t].apply(console,n)}}};e.default=r,t.exports=e.default})),cp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.createProtoAccessControl=a,e.resultIsAllowed=o,e.isPrototypeConstructor=s,e.resetLoggedProperties=u;
149
149
  // istanbul ignore next
150
- function t(e){return e&&e.__esModule?e:{default:e}}var n=Yf(),r=t(sp()),i=Object.create(null);function a(e){var t=Object.create(null);t.__proto__=!1,n.extend(t,e.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,n.extend(r,e.allowedProtoMethods),{properties:{whitelist:t,defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:e.allowProtoMethodsByDefault}}}function o(e,t,n){return s(typeof e==`function`?t.methods:t.properties,n)}function s(e,t){return e.whitelist[t]===void 0?e.defaultValue===void 0?(c(t),!1):e.defaultValue:e.whitelist[t]===!0}function c(e){i[e]!==!0&&(i[e]=!0,r.default.log(`error`,`Handlebars: Access has been denied to resolve the property "`+e+`" because it is not an "own property" of its parent.
150
+ function t(e){return e&&e.__esModule?e:{default:e}}var n=Yf(),r=t(sp()),i=Object.create(null);function a(e){var t=Object.create(null);t.__proto__=!1,n.extend(t,e.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,n.extend(r,e.allowedProtoMethods),{properties:{whitelist:t,defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:e.allowProtoMethodsByDefault}}}function o(e,t,n){return c(typeof e==`function`?t.methods:t.properties,n)}function s(e,t,n){return t===`constructor`&&typeof n==`function`&&e===n.prototype}function c(e,t){return e.whitelist[t]===void 0?e.defaultValue===void 0?(l(t),!1):e.defaultValue:e.whitelist[t]===!0}function l(e){i[e]!==!0&&(i[e]=!0,r.default.log(`error`,`Handlebars: Access has been denied to resolve the property "`+e+`" because it is not an "own property" of its parent.
151
151
  You can add a runtime option to disable the check or this warning:
152
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function l(){Object.keys(i).forEach(function(e){delete i[e]})}})),lp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.HandlebarsEnvironment=l;
152
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function u(){Object.keys(i).forEach(function(e){delete i[e]})}})),lp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.HandlebarsEnvironment=l;
153
153
  // istanbul ignore next
154
- function t(e){return e&&e.__esModule?e:{default:e}}var n=Yf(),r=t(Xf()),i=ip(),a=op(),o=t(sp()),s=cp();e.VERSION=`4.7.9`,e.COMPILER_REVISION=8,e.LAST_COMPATIBLE_COMPILER_REVISION=7,e.REVISION_CHANGES={1:`<= 1.0.rc.2`,2:`== 1.0.0-rc.3`,3:`== 1.0.0-rc.4`,4:`== 1.x.x`,5:`== 2.0.0-alpha.x`,6:`>= 2.0.0-beta.1`,7:`>= 4.0.0 <4.3.0`,8:`>= 4.3.0`};var c=`[object Object]`;function l(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},i.registerDefaultHelpers(this),a.registerDefaultDecorators(this)}l.prototype={constructor:l,logger:o.default,log:o.default.log,registerHelper:function(e,t){if(n.toString.call(e)===c){if(t)throw new r.default(`Arg not supported with multiple helpers`);n.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(n.toString.call(e)===c)n.extend(this.partials,e);else{if(t===void 0)throw new r.default(`Attempting to register a partial called "`+e+`" as undefined`);this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(n.toString.call(e)===c){if(t)throw new r.default(`Arg not supported with multiple decorators`);n.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){s.resetLoggedProperties()}},e.log=o.default.log,e.createFrame=n.createFrame,e.logger=o.default})),up=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;function n(e){this.string=e}n.prototype.toString=n.prototype.toHTML=function(){return``+this.string},e.default=n,t.exports=e.default})),dp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.wrapHelper=t;function t(e,t){return typeof e==`function`?function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=t(n),e.apply(this,arguments)}:e}})),fp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.checkRevision=l,e.template=u,e.wrapProgram=d,e.resolvePartial=f,e.invokePartial=p,e.noop=m;
154
+ function t(e){return e&&e.__esModule?e:{default:e}}var n=Yf(),r=t(Xf()),i=ip(),a=op(),o=t(sp()),s=cp();e.VERSION=`4.7.10`,e.COMPILER_REVISION=8,e.LAST_COMPATIBLE_COMPILER_REVISION=7,e.REVISION_CHANGES={1:`<= 1.0.rc.2`,2:`== 1.0.0-rc.3`,3:`== 1.0.0-rc.4`,4:`== 1.x.x`,5:`== 2.0.0-alpha.x`,6:`>= 2.0.0-beta.1`,7:`>= 4.0.0 <4.3.0`,8:`>= 4.3.0`};var c=`[object Object]`;function l(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},i.registerDefaultHelpers(this),a.registerDefaultDecorators(this)}l.prototype={constructor:l,logger:o.default,log:o.default.log,registerHelper:function(e,t){if(n.toString.call(e)===c){if(t)throw new r.default(`Arg not supported with multiple helpers`);n.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(n.toString.call(e)===c)n.extend(this.partials,e);else{if(t===void 0)throw new r.default(`Attempting to register a partial called "`+e+`" as undefined`);this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(n.toString.call(e)===c){if(t)throw new r.default(`Arg not supported with multiple decorators`);n.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){s.resetLoggedProperties()}},e.log=o.default.log,e.createFrame=n.createFrame,e.logger=o.default})),up=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;function n(e){this.string=e}n.prototype.toString=n.prototype.toHTML=function(){return``+this.string},e.default=n,t.exports=e.default})),dp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.wrapHelper=t;function t(e,t){return typeof e==`function`?function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=t(n),e.apply(this,arguments)}:e}})),fp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.checkRevision=l,e.template=u,e.wrapProgram=d,e.resolvePartial=f,e.invokePartial=p,e.noop=m;
155
155
  // istanbul ignore next
156
156
  function t(e){return e&&e.__esModule?e:{default:e}}
157
157
  // istanbul ignore next
158
158
  function n(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var r=n(Yf()),i=t(Xf()),a=lp(),o=ip(),s=dp(),c=cp();function l(e){var t=e&&e[0]||1,n=a.COMPILER_REVISION;if(!(t>=a.LAST_COMPATIBLE_COMPILER_REVISION&&t<=a.COMPILER_REVISION)){if(t<a.LAST_COMPATIBLE_COMPILER_REVISION){var r=a.REVISION_CHANGES[n],o=a.REVISION_CHANGES[t];throw new i.default(`Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (`+r+`) or downgrade your runtime to an older version (`+o+`).`)}throw new i.default(`Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (`+e[1]+`).`)}}function u(e,t){
159
159
  /* istanbul ignore next */
160
- if(!t)throw new i.default(`No environment passed to template`);if(!e||!e.main)throw new i.default(`Unknown template object: `+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&e.compiler[0]===7;function a(n,a,o){o.hash&&(a=r.extend({},a,o.hash),o.ids&&(o.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,a,o),o.hooks=this.hooks,o.protoAccessControl=this.protoAccessControl;var s=t.VM.invokePartial.call(this,n,a,o);if(s==null&&t.compile&&(o.partials[o.name]=t.compile(n,e.compilerOptions,t),s=o.partials[o.name](a,o)),s!=null){if(o.indent){for(var c=s.split(`
160
+ if(!t)throw new i.default(`No environment passed to template`);if(!e||!e.main)throw new i.default(`Unknown template object: `+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&e.compiler[0]===7;function a(n,a,o){o.hash&&(a=r.extend({},a,o.hash),o.ids&&(o.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,a,o),o.hooks=this.hooks,o.protoAccessControl=this.protoAccessControl;var s=t.VM.invokePartial.call(this,n,a,o);if(s==null&&r.isFunction(n))throw new i.default(`The partial `+o.name+` returned no output: partials must return a string`);if(s==null&&t.compile){if(typeof n!=`string`)throw new i.default(`The partial `+o.name+` could not be compiled: partials must be strings or functions returning strings`);o.partials[o.name]=t.compile(n,e.compilerOptions,t),s=o.partials[o.name](a,o)}if(s!=null){if(o.indent){for(var c=s.split(`
161
161
  `),l=0,u=c.length;l<u&&(c[l]||l+1!==u);l++)c[l]=o.indent+c[l];s=c.join(`
162
- `)}return s}throw new i.default(`The partial `+o.name+` could not be compiled when running in runtime-only mode`)}var s={strict:function(e,t,n){if(!e||!(t in e))throw new i.default(`"`+t+`" not defined in `+e,{loc:n});return s.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];if(n==null||Object.prototype.hasOwnProperty.call(e,t)||c.resultIsAllowed(n,s.protoAccessControl,t))return n},lookup:function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r]&&s.lookupProperty(e[r],t);if(i!=null)return i}},lambda:function(e,t){return typeof e==`function`?e.call(t):e},escapeExpression:r.escapeExpression,invokePartial:a,fn:function(t){var n=e[t];return n.decorator=e[t+`_d`],n},programs:[],program:function(e,t,n,r,i){var a=this.programs[e],o=this.fn(e);return t||i||r||n?a=d(this,e,o,t,n,r,i):a||=this.programs[e]=d(this,e,o),a},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=r.extend({},t,e)),n},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function l(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],r=n.data;l._setup(n),!n.partial&&e.useData&&(r=g(t,r));var i=void 0,a=e.useBlockParams?[]:void 0;e.useDepths&&(i=n.depths?t==n.depths[0]?n.depths:[t].concat(n.depths):[t]);function o(t){return``+e.main(s,t,s.helpers,s.partials,r,a,i)}return o=_(e.main,o,s,n.depths||[],r,a),o(t,n)}return l.isTop=!0,l._setup=function(i){if(i.partial)s.protoAccessControl=i.protoAccessControl,s.helpers=i.helpers,s.partials=i.partials,s.decorators=i.decorators,s.hooks=i.hooks;else{var a={};v(a,t.helpers,s),v(a,i.helpers,s),s.helpers=a,e.usePartial&&(s.partials=s.mergeIfNeeded(i.partials,t.partials)),(e.usePartial||e.useDecorators)&&(s.decorators=r.extend({},t.decorators,i.decorators)),s.hooks={},s.protoAccessControl=c.createProtoAccessControl(i);var l=i.allowCallsToHelperMissing||n;o.moveHelperToHooks(s,`helperMissing`,l),o.moveHelperToHooks(s,`blockHelperMissing`,l)}},l._child=function(t,n,r,a){if(e.useBlockParams&&!r)throw new i.default(`must pass block params`);if(e.useDepths&&!a)throw new i.default(`must pass parent depths`);return d(s,t,e[t],n,0,r,a)},l}function d(e,t,n,r,i,a,o){function s(t){var i=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],s=o;return o&&t!=o[0]&&(t!==e.nullContext||o[0]!==null)&&(s=[t].concat(o)),n(e,t,e.helpers,e.partials,i.data||r,a&&[i.blockParams].concat(a),s)}return s=_(n,s,e,o,r,a),s.program=t,s.depth=o?o.length:0,s.blockParams=i||0,s}function f(e,t,n){return e?!e.call&&!n.name&&(n.name=e,e=h(n.partials,e)):e=n.name===`@partial-block`?h(n.data,`partial-block`):h(n.partials,n.name),e}function p(e,t,n){var o=h(n.data,`partial-block`);n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var s=void 0;if(n.fn&&n.fn!==m&&(function(){n.data=a.createFrame(n.data);var e=n.fn;s=n.data[`partial-block`]=function(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return n.data=a.createFrame(n.data),n.data[`partial-block`]=o,e(t,n)},e.partials&&(n.partials=r.extend({},n.partials,e.partials))})(),e===void 0&&s&&(e=s),e===void 0)throw new i.default(`The partial `+n.name+` could not be found`);if(e instanceof Function)return e(t,n)}function m(){return``}function h(e,t){if(e&&Object.prototype.hasOwnProperty.call(e,t))return e[t]}function g(e,t){return(!t||!(`root`in t))&&(t=t?a.createFrame(t):{},t.root=e),t}function _(e,t,n,i,a,o){if(e.decorator){var s={};t=e.decorator(t,s,n,i&&i[0],a,o,i),r.extend(t,s)}return t}function v(e,t,n){t&&Object.keys(t).forEach(function(r){var i=t[r];e[r]=y(i,n)})}function y(e,t){var n=t.lookupProperty;return s.wrapHelper(e,function(e){return e.lookupProperty=n,e})}})),pp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0,e.default=function(e){
162
+ `)}return s}throw new i.default(`The partial `+o.name+` could not be compiled when running in runtime-only mode`)}var s={strict:function(e,t,n){if(!e||!(t in e))throw new i.default(`"`+t+`" not defined in `+e,{loc:n});return s.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];if(n==null||Object.prototype.hasOwnProperty.call(e,t)&&!c.isPrototypeConstructor(e,t,n)||c.resultIsAllowed(n,s.protoAccessControl,t))return n},lookup:function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r]&&s.lookupProperty(e[r],t);if(i!=null)return i}},lambda:function(e,t){return typeof e==`function`?e.call(t):e},escapeExpression:r.escapeExpression,invokePartial:a,fn:function(t){var n=e[t];return n.decorator=e[t+`_d`],n},programs:[],program:function(e,t,n,r,i){var a=this.programs[e],o=this.fn(e);return t||i||r||n?a=d(this,e,o,t,n,r,i):a||=this.programs[e]=d(this,e,o),a},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=r.extend({},t,e)),n},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function l(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],r=n.data;l._setup(n),!n.partial&&e.useData&&(r=g(t,r));var i=void 0,a=e.useBlockParams?[]:void 0;e.useDepths&&(i=n.depths?t==n.depths[0]?n.depths:[t].concat(n.depths):[t]);function o(t){return``+e.main(s,t,s.helpers,s.partials,r,a,i)}return o=_(e.main,o,s,n.depths||[],r,a),o(t,n)}return l.isTop=!0,l._setup=function(i){if(i.partial)s.protoAccessControl=i.protoAccessControl,s.helpers=i.helpers,s.partials=i.partials,s.decorators=i.decorators,s.hooks=i.hooks;else{var a={};v(a,t.helpers,s),v(a,i.helpers,s),s.helpers=a,e.usePartial&&(s.partials=s.mergeIfNeeded(i.partials,t.partials)),(e.usePartial||e.useDecorators)&&(s.decorators=r.extend({},t.decorators,i.decorators)),s.hooks={},s.protoAccessControl=c.createProtoAccessControl(i);var l=i.allowCallsToHelperMissing||n;o.moveHelperToHooks(s,`helperMissing`,l),o.moveHelperToHooks(s,`blockHelperMissing`,l)}},l._child=function(t,n,r,a){if(e.useBlockParams&&!r)throw new i.default(`must pass block params`);if(e.useDepths&&!a)throw new i.default(`must pass parent depths`);return d(s,t,e[t],n,0,r,a)},l}function d(e,t,n,r,i,a,o){function s(t){var i=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],s=o;return o&&t!=o[0]&&(t!==e.nullContext||o[0]!==null)&&(s=[t].concat(o)),n(e,t,e.helpers,e.partials,i.data||r,a&&[i.blockParams].concat(a),s)}return s=_(n,s,e,o,r,a),s.program=t,s.depth=o?o.length:0,s.blockParams=i||0,s}function f(e,t,n){return e?typeof e!=`function`&&!n.name&&(n.name=e,e=h(n.partials,e)):e=n.name===`@partial-block`?h(n.data,`partial-block`):h(n.partials,n.name),e}function p(e,t,n){var o=h(n.data,`partial-block`);n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var s=void 0;if(n.fn&&n.fn!==m&&(function(){n.data=a.createFrame(n.data);var e=n.fn;s=n.data[`partial-block`]=function(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return n.data=a.createFrame(n.data),n.data[`partial-block`]=o,e(t,n)},e.partials&&(n.partials=r.extend({},n.partials,e.partials))})(),e===void 0&&s&&(e=s),e===void 0)throw new i.default(`The partial `+n.name+` could not be found`);if(e instanceof Function)return e(t,n)}function m(){return``}function h(e,t){if(e&&Object.prototype.hasOwnProperty.call(e,t))return e[t]}function g(e,t){return(!t||!(`root`in t))&&(t=t?a.createFrame(t):{},t.root=e),t}function _(e,t,n,i,a,o){if(e.decorator){var s={};t=e.decorator(t,s,n,i&&i[0],a,o,i),r.extend(t,s)}return t}function v(e,t,n){t&&Object.keys(t).forEach(function(r){var i=t[r];e[r]=y(i,n)})}function y(e,t){var n=t.lookupProperty;return s.wrapHelper(e,function(e){return e.lookupProperty=n,e})}})),pp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0,e.default=function(e){
163
163
  /* istanbul ignore next */
164
164
  (function(){typeof globalThis!=`object`&&(Object.prototype.__defineGetter__(`__magic__`,function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;
165
165
  /* istanbul ignore next */
@@ -171,41 +171,37 @@ function r(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Obj
171
171
  `+this.lexer.showPosition()+`
172
172
  Expecting `+S.join(`, `)+`, got '`+(this.terminals_[p]||p)+`'`:`Parse error on line `+(s+1)+`: Unexpected `+(p==1?`end of input`:`'`+(this.terminals_[p]||p)+`'`),this.parseError(C,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:u,expected:S})}}if(g[0]instanceof Array&&g.length>1)throw Error(`Parse Error: multiple actions possible at state: `+h+`, token: `+p);switch(g[0]){case 1:n.push(p),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(g[1]),p=null,m?(p=m,m=null):(c=this.lexer.yyleng,o=this.lexer.yytext,s=this.lexer.yylineno,u=this.lexer.yylloc,l>0&&l--);break;case 2:if(b=this.productions_[g[1]][1],v.$=r[r.length-b],v._$={first_line:i[i.length-(b||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(b||1)].first_column,last_column:i[i.length-1].last_column},d&&(v._$.range=[i[i.length-(b||1)].range[0],i[i.length-1].range[1]]),_=this.performAction.call(v,o,c,s,this.yy,g[1],r,i),_!==void 0)return _;b&&(n=n.slice(0,-1*b*2),r=r.slice(0,-1*b),i=i.slice(0,-1*b)),n.push(this.productions_[g[1]][0]),r.push(v.$),i.push(v._$),x=a[n[n.length-2]][n[n.length-1]],n.push(x);break;case 3:return!0}}return!0}};e.lexer=(function(){var e={EOF:1,parseError:function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},showPosition:function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
173
173
  `+t+`^`},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i;this._more||(this.yytext=``,this.match=``);for(var a=this._currentRules(),o=0;o<a.length&&(n=this._input.match(this.rules[a[o]]),!(n&&(!t||n[0].length>t[0].length)&&(t=n,r=o,!this.options.flex)));o++);return t?(i=t[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,a[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
174
- `+this.showPosition(),{text:``,token:null,line:this.yylineno})},lex:function(){var e=this.next();return e===void 0?this.lex():e},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){function i(e,n){return t.yytext=t.yytext.substring(e,t.yyleng-n+e)}switch(n){case 0:if(t.yytext.slice(-2)===`\\\\`?(i(0,1),this.begin(`mu`)):t.yytext.slice(-1)===`\\`?(i(0,1),this.begin(`emu`)):this.begin(`mu`),t.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin(`raw`),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]===`raw`?15:(i(5,9),`END_RAW_BLOCK`);case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin(`raw`),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin(`com`);break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=i(1,2).replace(/\\"/g,`"`),80;case 32:return t.yytext=i(1,2).replace(/\\'/g,`'`),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,`$1`),72;case 43:return`INVALID`;case 44:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},e})();function t(){this.yy={}}return t.prototype=e,e.Parser=t,new t})(),t.exports=e.default})),_p=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
174
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},lex:function(){var e=this.next();return e===void 0?this.lex():e},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){function i(e,n){return t.yytext=t.yytext.substring(e,t.yyleng-n+e)}switch(n){case 0:if(t.yytext.slice(-2)===`\\\\`?(i(0,1),this.begin(`mu`)):t.yytext.slice(-1)===`\\`?(i(0,1),this.begin(`emu`)):this.begin(`mu`),t.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin(`raw`),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]===`raw`?15:(i(5,9),`END_RAW_BLOCK`);case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin(`raw`),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin(`com`);break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=i(1,2).replace(/\\"/g,`"`),80;case 32:return t.yytext=i(1,2).replace(/\\'/g,`'`),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,`$1`),72;case 43:return`INVALID`;case 44:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},e})();function t(){this.yy={}}return t.prototype=e,e.Parser=t,new t})(),t.exports=e.default})),_p=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.NODE_TYPES=[`Program`,`BlockStatement`,`DecoratorBlock`,`PartialStatement`,`PartialBlockStatement`,`Decorator`,`MustacheStatement`,`ContentStatement`,`CommentStatement`,`SubExpression`,`PathExpression`,`StringLiteral`,`NumberLiteral`,`BooleanLiteral`,`UndefinedLiteral`,`NullLiteral`,`Hash`,`HashPair`]})),vp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
175
175
  // istanbul ignore next
176
- function n(e){return e&&e.__esModule?e:{default:e}}var r=n(Xf());function i(){this.parents=[]}i.prototype={constructor:i,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!i.prototype[n.type])throw new r.default(`Unexpected node type "`+n.type+`" found when accepting `+t+` on `+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new r.default(e.type+` requires `+t)},acceptArray:function(e){for(var t=0,n=e.length;t<n;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){
177
- /* istanbul ignore next: Sanity code */
178
- if(!this[e.type])throw new r.default(`Unknown type: `+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:a,Decorator:a,BlockStatement:o,DecoratorBlock:o,PartialStatement:s,PartialBlockStatement:function(e){s.call(this,e),this.acceptKey(e,`program`)},ContentStatement:function(){},CommentStatement:function(){},SubExpression:a,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,`value`)}};function a(e){this.acceptRequired(e,`path`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}function o(e){a.call(this,e),this.acceptKey(e,`program`),this.acceptKey(e,`inverse`)}function s(e){this.acceptRequired(e,`name`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}e.default=i,t.exports=e.default})),vp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
176
+ function n(e){return e&&e.__esModule?e:{default:e}}var r=n(Xf()),i=Yf(),a=_p();function o(){this.parents=[]}function s(e,t){return i.indexOf(a.NODE_TYPES,t)!==-1||!(t in o.prototype)&&typeof e[t]==`function`}o.prototype={constructor:o,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!s(this,n.type))throw new r.default(`Unexpected node type "`+n.type+`" found when accepting `+t+` on `+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new r.default(e.type+` requires `+t)},acceptArray:function(e){for(var t=0,n=e.length;t<n;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){if(!s(this,e.type)||!this[e.type])throw new r.default(`Unknown type: `+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:c,Decorator:c,BlockStatement:l,DecoratorBlock:l,PartialStatement:u,PartialBlockStatement:function(e){u.call(this,e),this.acceptKey(e,`program`)},ContentStatement:function(){},CommentStatement:function(){},SubExpression:c,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,`value`)}};function c(e){this.acceptRequired(e,`path`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}function l(e){c.call(this,e),this.acceptKey(e,`program`),this.acceptKey(e,`inverse`)}function u(e){this.acceptRequired(e,`name`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}e.default=o,t.exports=e.default})),yp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
179
177
  // istanbul ignore next
180
- function n(e){return e&&e.__esModule?e:{default:e}}var r=n(_p());function i(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}i.prototype=new r.default,i.prototype.Program=function(e){var t=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=e.body,i=0,l=r.length;i<l;i++){var u=r[i],d=this.accept(u);if(d){var f=a(r,i,n),p=o(r,i,n),m=d.openStandalone&&f,h=d.closeStandalone&&p,g=d.inlineStandalone&&f&&p;d.close&&s(r,i,!0),d.open&&c(r,i,!0),t&&g&&(s(r,i),c(r,i)&&u.type===`PartialStatement`&&(u.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),t&&m&&(s((u.program||u.inverse).body),c(r,i)),t&&h&&(s(r,i),c((u.inverse||u.program).body))}}return e},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,n=e.program&&e.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var l={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:o(t.body),closeStandalone:a((r||t).body)};if(e.openStrip.close&&s(t.body,null,!0),n){var u=e.inverseStrip;u.open&&c(t.body,null,!0),u.close&&s(r.body,null,!0),e.closeStrip.open&&c(i.body,null,!0),!this.options.ignoreStandalone&&a(t.body)&&o(r.body)&&(c(t.body),s(r.body))}else e.closeStrip.open&&c(t.body,null,!0);return l},i.prototype.Decorator=i.prototype.MustacheStatement=function(e){return e.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(e){
178
+ function n(e){return e&&e.__esModule?e:{default:e}}var r=n(vp());function i(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}i.prototype=new r.default,i.prototype.Program=function(e){var t=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=e.body,i=0,l=r.length;i<l;i++){var u=r[i],d=this.accept(u);if(d){var f=a(r,i,n),p=o(r,i,n),m=d.openStandalone&&f,h=d.closeStandalone&&p,g=d.inlineStandalone&&f&&p;d.close&&s(r,i,!0),d.open&&c(r,i,!0),t&&g&&(s(r,i),c(r,i)&&u.type===`PartialStatement`&&(u.indent=/(?:^|[^ \t])([ \t]+)$/.exec(r[i-1].original)[1])),t&&m&&(s((u.program||u.inverse).body),c(r,i)),t&&h&&(s(r,i),c((u.inverse||u.program).body))}}return e},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,n=e.program&&e.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var l={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:o(t.body),closeStandalone:a((r||t).body)};if(e.openStrip.close&&s(t.body,null,!0),n){var u=e.inverseStrip;u.open&&c(t.body,null,!0),u.close&&s(r.body,null,!0),e.closeStrip.open&&c(i.body,null,!0),!this.options.ignoreStandalone&&a(t.body)&&o(r.body)&&(c(t.body),s(r.body))}else e.closeStrip.open&&c(t.body,null,!0);return l},i.prototype.Decorator=i.prototype.MustacheStatement=function(e){return e.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(e){
181
179
  /* istanbul ignore next */
182
- var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function a(e,t,n){t===void 0&&(t=e.length);var r=e[t-1],i=e[t-2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function o(e,t,n){t===void 0&&(t=-1);var r=e[t+1],i=e[t+2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function s(e,t,n){var r=e[t==null?0:t+1];if(!(!r||r.type!==`ContentStatement`||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,``),r.rightStripped=r.value!==i}}function c(e,t,n){var r=e[t==null?e.length-1:t-1];if(!(!r||r.type!==`ContentStatement`||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,``),r.leftStripped=r.value!==i,r.leftStripped}}e.default=i,t.exports=e.default})),yp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.SourceLocation=i,e.id=a,e.stripFlags=o,e.stripComment=s,e.preparePath=c,e.prepareMustache=l,e.prepareRawBlock=u,e.prepareBlock=d,e.prepareProgram=f,e.preparePartialBlock=p;
180
+ var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function a(e,t,n){t===void 0&&(t=e.length);var r=e[t-1],i=e[t-2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/(?:^|\S)[^\S\n]*\n\s*$/:/^\s*$|(?:^|\S)[^\S\n]*\n\s*$/).test(r.original)}function o(e,t,n){t===void 0&&(t=-1);var r=e[t+1],i=e[t+2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function s(e,t,n){var r=e[t==null?0:t+1];if(!(!r||r.type!==`ContentStatement`||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,``),r.rightStripped=r.value!==i}}function c(e,t,n){var r=e[t==null?e.length-1:t-1];if(!(!r||r.type!==`ContentStatement`||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/(^|\S)\s+$/:/(^|[^ \t])[ \t]+$/,`$1`),r.leftStripped=r.value!==i,r.leftStripped}}e.default=i,t.exports=e.default})),bp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.SourceLocation=i,e.id=a,e.stripFlags=o,e.stripComment=s,e.preparePath=c,e.prepareMustache=l,e.prepareRawBlock=u,e.prepareBlock=d,e.prepareProgram=f,e.preparePartialBlock=p;
183
181
  // istanbul ignore next
184
182
  function t(e){return e&&e.__esModule?e:{default:e}}var n=t(Xf());function r(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new n.default(e.path.original+` doesn't match `+t,r)}}function i(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function a(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function o(e,t){return{open:e.charAt(2)===`~`,close:t.charAt(t.length-3)===`~`}}function s(e){return e.replace(/^\{\{~?!-?-?/,``).replace(/-?-?~?\}\}$/,``)}function c(e,t,r){r=this.locInfo(r);for(var i=e?`@`:``,a=[],o=0,s=0,c=t.length;s<c;s++){var l=t[s].part,u=t[s].original!==l;if(i+=(t[s].separator||``)+l,!u&&(l===`..`||l===`.`||l===`this`)){if(a.length>0)throw new n.default(`Invalid path: `+i,{loc:r});l===`..`&&o++}else a.push(l)}return{type:`PathExpression`,data:e,depth:o,parts:a,original:i,loc:r}}function l(e,t,n,r,i,a){var o=r.charAt(3)||r.charAt(2),s=o!==`{`&&o!==`&`;return{type:/\*/.test(r)?`Decorator`:`MustacheStatement`,path:e,params:t,hash:n,escaped:s,strip:i,loc:this.locInfo(a)}}function u(e,t,n,i){r(e,n),i=this.locInfo(i);var a={type:`Program`,body:t,strip:{},loc:i};return{type:`BlockStatement`,path:e.path,params:e.params,hash:e.hash,program:a,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}}function d(e,t,i,a,o,s){a&&a.path&&r(e,a);var c=/\*/.test(e.open);t.blockParams=e.blockParams;var l=void 0,u=void 0;if(i){if(c)throw new n.default(`Unexpected inverse block on decorator`,i);i.chain&&(i.program.body[0].closeStrip=a.strip),u=i.strip,l=i.program}return o&&(o=l,l=t,t=o),{type:c?`DecoratorBlock`:`BlockStatement`,path:e.path,params:e.params,hash:e.hash,program:t,inverse:l,openStrip:e.strip,inverseStrip:u,closeStrip:a&&a.strip,loc:this.locInfo(s)}}function f(e,t){if(!t&&e.length){var n=e[0].loc,r=e[e.length-1].loc;
185
183
  /* istanbul ignore else */
186
- n&&r&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:`Program`,body:e,strip:{},loc:t}}function p(e,t,n,i){return r(e,n),{type:`PartialBlockStatement`,name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}}})),bp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.parseWithoutProcessing=l,e.parse=u;
184
+ n&&r&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:`Program`,body:e,strip:{},loc:t}}function p(e,t,n,i){return r(e,n),{type:`PartialBlockStatement`,name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}}})),xp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.parseWithoutProcessing=c,e.parse=l;
187
185
  // istanbul ignore next
188
186
  function t(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}
189
187
  // istanbul ignore next
190
- function n(e){return e&&e.__esModule?e:{default:e}}var r=n(gp()),i=n(vp()),a=t(yp()),o=n(Xf()),s=Yf();e.parser=r.default;var c={};s.extend(c,a);function l(e,t){return e.type===`Program`?(d(e),e):(r.default.yy=c,c.locInfo=function(e){return new c.SourceLocation(t&&t.srcName,e)},r.default.parse(e))}function u(e,t){var n=l(e,t);return new i.default(t).accept(n)}function d(e){f(e)}function f(e){if(e!=null){if(Array.isArray(e)){e.forEach(f);return}if(typeof e==`object`){if(e.type===`PathExpression`){if(!p(e.depth))throw new o.default(`Invalid AST: PathExpression.depth must be an integer`);if(!Array.isArray(e.parts))throw new o.default(`Invalid AST: PathExpression.parts must be an array`);for(var t=0;t<e.parts.length;t++)if(typeof e.parts[t]!=`string`)throw new o.default(`Invalid AST: PathExpression.parts must only contain strings`)}else if(e.type===`NumberLiteral`){if(typeof e.value!=`number`||!isFinite(e.value))throw new o.default(`Invalid AST: NumberLiteral.value must be a number`)}else if(e.type===`BooleanLiteral`&&typeof e.value!=`boolean`)throw new o.default(`Invalid AST: BooleanLiteral.value must be a boolean`);Object.keys(e).forEach(function(t){t!==`loc`&&f(e[t])})}}}function p(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e&&e>=0}})),xp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.Compiler=o,e.precompile=s,e.compile=c;
188
+ function n(e){return e&&e.__esModule?e:{default:e}}var r=n(gp()),i=n(yp()),a=t(bp()),o=Yf();e.parser=r.default;var s={};o.extend(s,a);function c(e,t){return e.type===`Program`?e:(r.default.yy=s,s.locInfo=function(e){return new s.SourceLocation(t&&t.srcName,e)},r.default.parse(e))}function l(e,t){var n=c(e,t);return new i.default(t).accept(n)}})),Sp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.Compiler=s,e.precompile=c,e.compile=l;
191
189
  // istanbul ignore next
192
- function t(e){return e&&e.__esModule?e:{default:e}}var n=t(Xf()),r=Yf(),i=t(hp()),a=[].slice;function o(){}o.prototype={compiler:o,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var r=this.opcodes[n],i=e.opcodes[n];if(r.opcode!==i.opcode||!l(r.args,i.args))return!1}t=this.children.length;for(var n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=r.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=new this.compiler().compile(e,this.options),n=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[n]=t,this.useDepths=this.useDepths||t.useDepths,n},accept:function(e){
193
- /* istanbul ignore next: Sanity code */
194
- if(!this[e.type])throw new n.default(`Unknown type: `+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,r=0;r<n;r++)this.accept(t[r]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){u(e);var t=e.program,n=e.inverse;t&&=this.compileProgram(t),n&&=this.compileProgram(n);var r=this.classifySexpr(e);r===`helper`?this.helperSexpr(e,t,n):r===`simple`?(this.simpleSexpr(e),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`blockValue`,e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`ambiguousBlockValue`)),this.opcode(`append`)},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),r=e.path;this.useDecorators=!0,this.opcode(`registerDecorator`,n.length,r.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&=this.compileProgram(e.program);var r=e.params;if(r.length>1)throw new n.default(`Unsupported number of partial arguments: `+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode(`pushLiteral`,`undefined`):r.push({type:`PathExpression`,parts:[],depth:0}));var i=e.name.original,a=e.name.type===`SubExpression`;a&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||``;this.options.preventIndent&&o&&(this.opcode(`appendContent`,o),o=``),this.opcode(`invokePartial`,a,i,o),this.opcode(`append`)},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode(`appendEscaped`):this.opcode(`append`)},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode(`appendContent`,e.value)},CommentStatement:function(){},SubExpression:function(e){u(e);var t=this.classifySexpr(e);t===`simple`?this.simpleSexpr(e):t===`helper`?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var r=e.path,i=r.parts[0],a=t!=null||n!=null;this.opcode(`getContext`,r.depth),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),r.strict=!0,this.accept(r),this.opcode(`invokeAmbiguous`,i,a)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode(`resolvePossibleLambda`)},helperSexpr:function(e,t,r){var a=this.setupFullMustacheParams(e,t,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode(`invokeKnownHelper`,a.length,s);else if(this.options.knownHelpersOnly)throw new n.default(`You specified knownHelpersOnly, but used the unknown helper `+s,e);else o.strict=!0,o.falsy=!0,this.accept(o),this.opcode(`invokeHelper`,a.length,o.original,i.default.helpers.simpleId(o))},PathExpression:function(e){this.addDepth(e.depth),this.opcode(`getContext`,e.depth);var t=e.parts[0],n=i.default.helpers.scopedId(e),r=!e.depth&&!n&&this.blockParamIndex(t);r?this.opcode(`lookupBlockParam`,r,e.parts):t?e.data?(this.options.data=!0,this.opcode(`lookupData`,e.depth,e.parts,e.strict)):this.opcode(`lookupOnContext`,e.parts,e.falsy,e.strict,n):this.opcode(`pushContext`)},StringLiteral:function(e){this.opcode(`pushString`,e.value)},NumberLiteral:function(e){this.opcode(`pushLiteral`,e.value)},BooleanLiteral:function(e){this.opcode(`pushLiteral`,e.value)},UndefinedLiteral:function(){this.opcode(`pushLiteral`,`undefined`)},NullLiteral:function(){this.opcode(`pushLiteral`,`null`)},Hash:function(e){var t=e.pairs,n=0,r=t.length;for(this.opcode(`pushHash`);n<r;n++)this.pushParam(t[n].value);for(;n--;)this.opcode(`assignToHash`,t[n].key);this.opcode(`popHash`)},opcode:function(e){this.opcodes.push({opcode:e,args:a.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=i.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),r=!n&&i.default.helpers.helperExpression(e),a=!n&&(r||t);if(a&&!r){var o=e.path.parts[0],s=this.options;s.knownHelpers[o]?r=!0:s.knownHelpersOnly&&(a=!1)}return r?`helper`:a?`ambiguous`:`simple`},pushParams:function(e){for(var t=0,n=e.length;t<n;t++)this.pushParam(e[t])},pushParam:function(e){var t=e.value==null?e.original||``:e.value;if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,``).replace(/\//g,`.`)),e.depth&&this.addDepth(e.depth),this.opcode(`getContext`,e.depth||0),this.opcode(`pushStringParam`,t,e.type),e.type===`SubExpression`&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!i.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var r=e.parts.slice(1).join(`.`);this.opcode(`pushId`,`BlockParam`,n,r)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,``).replace(/^\.\//,``).replace(/^\.$/,``)),this.opcode(`pushId`,e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,r){var i=e.params;return this.pushParams(i),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),e.hash?this.accept(e.hash):this.opcode(`emptyHash`,r),i},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;t<n;t++){var i=this.options.blockParams[t],a=i&&r.indexOf(i,e);if(i&&a>=0)return[t,a]}}};function s(e,t,r){if(e==null||typeof e!=`string`&&e.type!==`Program`)throw new n.default(`You must pass a string or Handlebars AST to Handlebars.precompile. You passed `+e);t||={},`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var i=r.parse(e,t),a=new r.Compiler().compile(i,t);return new r.JavaScriptCompiler().compile(a,t)}function c(e,t,i){if(t===void 0&&(t={}),e==null||typeof e!=`string`&&e.type!==`Program`)throw new n.default(`You must pass a string or Handlebars AST to Handlebars.compile. You passed `+e);t=r.extend({},t),`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var a=void 0;function o(){var n=i.parse(e,t),r=new i.Compiler().compile(n,t),a=new i.JavaScriptCompiler().compile(r,t,void 0,!0);return i.template(a)}function s(e,t){return a||=o(),a.call(this,e,t)}return s._setup=function(e){return a||=o(),a._setup(e)},s._child=function(e,t,n,r){return a||=o(),a._child(e,t,n,r)},s}function l(e,t){if(e===t)return!0;if(r.isArray(e)&&r.isArray(t)&&e.length===t.length){for(var n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1;return!0}}function u(e){if(!e.path.parts){var t=e.path;e.path={type:`PathExpression`,data:!1,depth:0,parts:[t.original+``],original:t.original+``,loc:t.loc}}}})),Sp=/* @__PURE__ */ j((e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``);e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw TypeError(`Must be between 0 and 63: `+e)},e.decode=function(e){var t=65,n=90,r=97,i=122,a=48;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+26:a<=e&&e<=57?e-a+52:e==43?62:e==47?63:-1}})),Cp=/* @__PURE__ */ j((e=>{var t=Sp(),n=5,r=1<<n,i=r-1,a=r;function o(e){return e<0?(-e<<1)+1:(e<<1)+0}function s(e){var t=(e&1)==1,n=e>>1;return t?-n:n}e.encode=function(e){var r=``,s,c=o(e);do s=c&i,c>>>=n,c>0&&(s|=a),r+=t.encode(s);while(c>0);return r},e.decode=function(e,r,o){var c=e.length,l=0,u=0,d,f;do{if(r>=c)throw Error(`Expected more digits in base 64 VLQ value.`);if(f=t.decode(e.charCodeAt(r++)),f===-1)throw Error(`Invalid base64 digit: `+e.charAt(r-1));d=!!(f&a),f&=i,l+=f<<u,u+=n}while(d);o.value=s(l),o.rest=r}})),wp=/* @__PURE__ */ j((e=>{function t(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw Error(`"`+t+`" is a required argument.`)}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}e.urlParse=i;function a(e){var t=``;return e.scheme&&(t+=e.scheme+`:`),t+=`//`,e.auth&&(t+=e.auth+`@`),e.host&&(t+=e.host),e.port&&(t+=`:`+e.port),e.path&&(t+=e.path),t}e.urlGenerate=a;function o(t){var n=t,r=i(t);if(r){if(!r.path)return t;n=r.path}for(var o=e.isAbsolute(n),s=n.split(/\/+/),c,l=0,u=s.length-1;u>=0;u--)c=s[u],c===`.`?s.splice(u,1):c===`..`?l++:l>0&&(c===``?(s.splice(u+1,l),l=0):(s.splice(u,2),l--));return n=s.join(`/`),n===``&&(n=o?`/`:`.`),r?(r.path=n,a(r)):n}e.normalize=o;function s(e,t){e===``&&(e=`.`),t===``&&(t=`.`);var n=i(t),s=i(e);if(s&&(e=s.path||`/`),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c=t.charAt(0)===`/`?t:o(e.replace(/\/+$/,``)+`/`+t);return s?(s.path=c,a(s)):c}e.join=s,e.isAbsolute=function(e){return e.charAt(0)===`/`||n.test(e)};function c(e,t){e===``&&(e=`.`),e=e.replace(/\/$/,``);for(var n=0;t.indexOf(e+`/`)!==0;){var r=e.lastIndexOf(`/`);if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join(`../`)+t.substr(e.length+1)}e.relative=c;var l=function(){return!(`__proto__`in Object.create(null))}();function u(e){return e}function d(e){return p(e)?`$`+e:e}e.toSetString=l?u:d;function f(e){return p(e)?e.slice(1):e}e.fromSetString=l?u:f;function p(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function m(e,t,n){var r=g(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:g(e.name,t.name)}e.compareByOriginalPositions=m;function h(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=g(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:g(e.name,t.name)}e.compareByGeneratedPositionsDeflated=h;function g(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function _(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=g(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:g(e.name,t.name)}e.compareByGeneratedPositionsInflated=_;function v(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,``))}e.parseSourceMapInput=v;function y(e,t,n){if(t||=``,e&&(e[e.length-1]!==`/`&&t[0]!==`/`&&(e+=`/`),t=e+t),n){var r=i(n);if(!r)throw Error(`sourceMapURL could not be parsed`);if(r.path){var c=r.path.lastIndexOf(`/`);c>=0&&(r.path=r.path.substring(0,c+1))}t=s(a(r),t)}return o(t)}e.computeSourceURL=y})),Tp=/* @__PURE__ */ j((e=>{var t=wp(),n=Object.prototype.hasOwnProperty,r=typeof Map<`u`;function i(){this._array=[],this._set=r?/* @__PURE__ */ new Map:Object.create(null)}i.fromArray=function(e,t){for(var n=new i,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(e,i){var a=r?e:t.toSetString(e),o=r?this.has(e):n.call(this._set,a),s=this._array.length;(!o||i)&&this._array.push(e),o||(r?this._set.set(e,s):this._set[a]=s)},i.prototype.has=function(e){if(r)return this._set.has(e);var i=t.toSetString(e);return n.call(this._set,i)},i.prototype.indexOf=function(e){if(r){var i=this._set.get(e);if(i>=0)return i}else{var a=t.toSetString(e);if(n.call(this._set,a))return this._set[a]}throw Error(`"`+e+`" is not in the set.`)},i.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error(`No element indexed by `+e)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),Ep=/* @__PURE__ */ j((e=>{var t=wp();function n(e,n){var r=e.generatedLine,i=n.generatedLine,a=e.generatedColumn,o=n.generatedColumn;return i>r||i==r&&o>=a||t.compareByGeneratedPositionsInflated(e,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||=(this._array.sort(t.compareByGeneratedPositionsInflated),!0),this._array},e.MappingList=r})),Dp=/* @__PURE__ */ j((e=>{var t=Cp(),n=wp(),r=Tp().ArraySet,i=Ep().MappingList;function a(e){e||={},this._file=n.getArg(e,`file`,null),this._sourceRoot=n.getArg(e,`sourceRoot`,null),this._skipValidation=n.getArg(e,`skipValidation`,!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e){var t=e.sourceRoot,r=new a({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var i={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source!=null&&(i.source=e.source,t!=null&&(i.source=n.relative(t,i.source)),i.original={line:e.originalLine,column:e.originalColumn},e.name!=null&&(i.name=e.name)),r.addMapping(i)}),e.sources.forEach(function(i){var a=i;t!==null&&(a=n.relative(t,i)),r._sources.has(a)||r._sources.add(a);var o=e.sourceContentFor(i);o!=null&&r.setSourceContent(i,o)}),r},a.prototype.addMapping=function(e){var t=n.getArg(e,`generated`),r=n.getArg(e,`original`,null),i=n.getArg(e,`source`,null),a=n.getArg(e,`name`,null);this._skipValidation||this._validateMapping(t,r,i,a),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:a})},a.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=n.relative(this._sourceRoot,r)),t==null?this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null)):(this._sourcesContents||=Object.create(null),this._sourcesContents[n.toSetString(r)]=t)},a.prototype.applySourceMap=function(e,t,i){var a=t;if(t==null){if(e.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);a=e.file}var o=this._sourceRoot;o!=null&&(a=n.relative(o,a));var s=new r,c=new r;this._mappings.unsortedForEach(function(t){if(t.source===a&&t.originalLine!=null){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});r.source!=null&&(t.source=r.source,i!=null&&(t.source=n.join(i,t.source)),o!=null&&(t.source=n.relative(o,t.source)),t.originalLine=r.line,t.originalColumn=r.column,r.name!=null&&(t.name=r.name))}var l=t.source;l!=null&&!s.has(l)&&s.add(l);var u=t.name;u!=null&&!c.has(u)&&c.add(u)},this),this._sources=s,this._names=c,e.sources.forEach(function(t){var r=e.sourceContentFor(t);r!=null&&(i!=null&&(t=n.join(i,t)),o!=null&&(t=n.relative(o,t)),this.setSourceContent(t,r))},this)},a.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!=`number`&&typeof t.column!=`number`)throw Error(`original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.`);if(!(e&&`line`in e&&`column`in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)&&!(e&&`line`in e&&`column`in e&&t&&`line`in t&&`column`in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw Error(`Invalid mapping: `+JSON.stringify({generated:e,source:n,original:t,name:r}))},a.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,a=0,o=0,s=0,c=``,l,u,d,f,p=this._mappings.toArray(),m=0,h=p.length;m<h;m++){if(u=p[m],l=``,u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=`;`,r++;else if(m>0){if(!n.compareByGeneratedPositionsInflated(u,p[m-1]))continue;l+=`,`}l+=t.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=t.encode(f-s),s=f,l+=t.encode(u.originalLine-1-a),a=u.originalLine-1,l+=t.encode(u.originalColumn-i),i=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=t.encode(d-o),o=d)),c+=l}return c},a.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;t!=null&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=a})),Op=/* @__PURE__ */ j((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,i,a,o,s){var c=Math.floor((r-n)/2)+n,l=o(i,a[c],!0);return l===0?c:l>0?r-c>1?t(c,r,i,a,o,s):s==e.LEAST_UPPER_BOUND?r<a.length?r:-1:c:c-n>1?t(n,c,i,a,o,s):s==e.LEAST_UPPER_BOUND?c:n<0?-1:n}e.search=function(n,r,i,a){if(r.length===0)return-1;var o=t(-1,r.length,n,r,i,a||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&i(r[o],r[o-1],!0)===0;)--o;return o}})),kp=/* @__PURE__ */ j((e=>{function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return Math.round(e+Math.random()*(t-e))}function r(e,i,a,o){if(a<o){var s=n(a,o),c=a-1;t(e,s,o);for(var l=e[o],u=a;u<o;u++)i(e[u],l)<=0&&(c+=1,t(e,c,u));t(e,c+1,u);var d=c+1;r(e,i,a,d-1),r(e,i,d+1,o)}}e.quickSort=function(e,t){r(e,t,0,e.length-1)}})),Ap=/* @__PURE__ */ j((e=>{var t=wp(),n=Op(),r=Tp().ArraySet,i=Cp(),a=kp().quickSort;function o(e,n){var r=e;return typeof e==`string`&&(r=t.parseSourceMapInput(e)),r.sections==null?new s(r,n):new l(r,n)}o.fromSourceMap=function(e,t){return s.fromSourceMap(e,t)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===`;`||n===`,`},o.prototype._parseMappings=function(e,t){throw Error(`Subclasses must implement _parseMappings`)},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(e,n,r){var i=n||null,a=r||o.GENERATED_ORDER,s;switch(a){case o.GENERATED_ORDER:s=this._generatedMappings;break;case o.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw Error(`Unknown order of iteration.`)}var c=this.sourceRoot;s.map(function(e){var n=e.source===null?null:this._sources.at(e.source);return n=t.computeSourceURL(c,n,this._sourceMapURL),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,i)},o.prototype.allGeneratedPositionsFor=function(e){var r=t.getArg(e,`line`),i={source:t.getArg(e,`source`),originalLine:r,originalColumn:t.getArg(e,`column`,0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],o=this._findMapping(i,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,n.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var c=s.originalLine;s&&s.originalLine===c;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o]}return a},e.SourceMapConsumer=o;function s(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),o=t.getArg(i,`sources`),s=t.getArg(i,`names`,[]),c=t.getArg(i,`sourceRoot`,null),l=t.getArg(i,`sourcesContent`,null),u=t.getArg(i,`mappings`),d=t.getArg(i,`file`,null);if(a!=this._version)throw Error(`Unsupported version: `+a);c&&=t.normalize(c),o=o.map(String).map(t.normalize).map(function(e){return c&&t.isAbsolute(c)&&t.isAbsolute(e)?t.relative(c,e):e}),this._names=r.fromArray(s.map(String),!0),this._sources=r.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(c,e,n)}),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=n,this.file=d}s.prototype=Object.create(o.prototype),s.prototype.consumer=o,s.prototype._findSourceIndex=function(e){var n=e;if(this.sourceRoot!=null&&(n=t.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(var r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1},s.fromSourceMap=function(e,n){var i=Object.create(s.prototype),o=i._names=r.fromArray(e._names.toArray(),!0),l=i._sources=r.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=n,i._absoluteSources=i._sources.toArray().map(function(e){return t.computeSourceURL(i.sourceRoot,e,n)});for(var u=e._mappings.toArray().slice(),d=i.__generatedMappings=[],f=i.__originalMappings=[],p=0,m=u.length;p<m;p++){var h=u[p],g=new c;g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=l.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=o.indexOf(h.name)),f.push(g)),d.push(g)}return a(i.__originalMappings,t.compareByOriginalPositions),i},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(e,n){for(var r=1,o=0,s=0,l=0,u=0,d=0,f=e.length,p=0,m={},h={},g=[],_=[],v,y,b,x,S;p<f;)if(e.charAt(p)===`;`)r++,p++,o=0;else if(e.charAt(p)===`,`)p++;else{for(v=new c,v.generatedLine=r,x=p;x<f&&!this._charIsMappingSeparator(e,x);x++);if(y=e.slice(p,x),b=m[y],b)p+=y.length;else{for(b=[];p<x;)i.decode(e,p,h),S=h.value,p=h.rest,b.push(S);if(b.length===2)throw Error(`Found a source, but no line and column`);if(b.length===3)throw Error(`Found a source and line, but no column`);m[y]=b}v.generatedColumn=o+b[0],o=v.generatedColumn,b.length>1&&(v.source=u+b[1],u+=b[1],v.originalLine=s+b[2],s=v.originalLine,v.originalLine+=1,v.originalColumn=l+b[3],l=v.originalColumn,b.length>4&&(v.name=d+b[4],d+=b[4])),_.push(v),typeof v.originalLine==`number`&&g.push(v)}a(_,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,a(g,t.compareByOriginalPositions),this.__originalMappings=g},s.prototype._findMapping=function(e,t,r,i,a,o){if(e[r]<=0)throw TypeError(`Line must be greater than or equal to 1, got `+e[r]);if(e[i]<0)throw TypeError(`Column must be greater than or equal to 0, got `+e[i]);return n.search(e,t,a,o)},s.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(e){var n={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},r=this._findMapping(n,this._generatedMappings,`generatedLine`,`generatedColumn`,t.compareByGeneratedPositionsDeflated,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var a=t.getArg(i,`source`,null);a!==null&&(a=this._sources.at(a),a=t.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var s=t.getArg(i,`name`,null);return s!==null&&(s=this._names.at(s)),{source:a,line:t.getArg(i,`originalLine`,null),column:t.getArg(i,`originalColumn`,null),name:s}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},s.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=t.relative(this.sourceRoot,i));var a;if(this.sourceRoot!=null&&(a=t.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,``);if(a.scheme==`file`&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!a.path||a.path==`/`)&&this._sources.has(`/`+i))return this.sourcesContent[this._sources.indexOf(`/`+i)]}if(n)return null;throw Error(`"`+i+`" is not in the SourceMap.`)},s.prototype.generatedPositionFor=function(e){var n=t.getArg(e,`source`);if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:t.getArg(e,`line`),originalColumn:t.getArg(e,`column`)},i=this._findMapping(r,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:t.getArg(a,`generatedLine`,null),column:t.getArg(a,`generatedColumn`,null),lastColumn:t.getArg(a,`lastGeneratedColumn`,null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=s;function l(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),s=t.getArg(i,`sections`);if(a!=this._version)throw Error(`Unsupported version: `+a);this._sources=new r,this._names=new r;var c={line:-1,column:0};this._sections=s.map(function(e){if(e.url)throw Error(`Support for url field in sections not implemented.`);var r=t.getArg(e,`offset`),i=t.getArg(r,`line`),a=t.getArg(r,`column`);if(i<c.line||i===c.line&&a<c.column)throw Error(`Section offsets must be ordered and non-overlapping.`);return c=r,{generatedOffset:{generatedLine:i+1,generatedColumn:a+1},consumer:new o(t.getArg(e,`map`),n)}})}l.prototype=Object.create(o.prototype),l.prototype.constructor=o,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),l.prototype.originalPositionFor=function(e){var r={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},i=n.search(r,this._sections,function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn}),a=this._sections[i];return a?a.consumer.originalPositionFor({line:r.generatedLine-(a.generatedOffset.generatedLine-1),column:r.generatedColumn-(a.generatedOffset.generatedLine===r.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw Error(`"`+e+`" is not in the SourceMap.`)},l.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(t.getArg(e,`source`))!==-1){var i=r.consumer.generatedPositionFor(e);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},l.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var c=o[s],l=i.consumer._sources.at(c.source);l=t.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;c.name&&(u=i.consumer._names.at(c.name),this._names.add(u),u=this._names.indexOf(u));var d={source:l,generatedLine:c.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(i.generatedOffset.generatedLine===c.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(d),typeof d.originalLine==`number`&&this.__originalMappings.push(d)}a(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),a(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=l})),jp=/* @__PURE__ */ j((e=>{var t=Dp().SourceMapGenerator,n=wp(),r=/(\r?\n)/,i=10,a=`$$$isSourceNode$$$`;function o(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=n??null,this.name=i??null,this[a]=!0,r!=null&&this.add(r)}o.fromStringWithSourceMap=function(e,t,i){var a=new o,s=e.split(r),c=0,l=function(){return e()+(e()||``);function e(){return c<s.length?s[c++]:void 0}},u=1,d=0,f=null;return t.eachMapping(function(e){if(f!==null){if(u<e.generatedLine)p(f,l()),u++,d=0;else{var t=s[c]||``,n=t.substr(0,e.generatedColumn-d);s[c]=t.substr(e.generatedColumn-d),d=e.generatedColumn,p(f,n),f=e;return}}for(;u<e.generatedLine;)a.add(l()),u++;if(d<e.generatedColumn){var t=s[c]||``;a.add(t.substr(0,e.generatedColumn)),s[c]=t.substr(e.generatedColumn),d=e.generatedColumn}f=e},this),c<s.length&&(f&&p(f,l()),a.add(s.splice(c).join(``))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);r!=null&&(i!=null&&(e=n.join(i,e)),a.setSourceContent(e,r))}),a;function p(e,t){if(e===null||e.source===void 0)a.add(t);else{var r=i?n.join(i,e.source):e.source;a.add(new o(e.originalLine,e.originalColumn,r,t,e.name))}}},o.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[a]||typeof e==`string`)e&&this.children.push(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[a]||typeof e==`string`)this.children.unshift(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[a]?t.walk(e):t!==``&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},o.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):typeof n==`string`?this.children[this.children.length-1]=n.replace(e,t):this.children.push(``.replace(e,t)),this},o.prototype.setSourceContent=function(e,t){this.sourceContents[n.toSetString(e)]=t},o.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,r=i.length;t<r;t++)e(n.fromSetString(i[t]),this.sourceContents[i[t]])},o.prototype.toString=function(){var e=``;return this.walk(function(t){e+=t}),e},o.prototype.toStringWithSourceMap=function(e){var n={code:``,line:1,column:0},r=new t(e),a=!1,o=null,s=null,c=null,l=null;return this.walk(function(e,t){n.code+=e,t.source!==null&&t.line!==null&&t.column!==null?((o!==t.source||s!==t.line||c!==t.column||l!==t.name)&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),o=t.source,s=t.line,c=t.column,l=t.name,a=!0):a&&=(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,!1);for(var u=0,d=e.length;u<d;u++)e.charCodeAt(u)===i?(n.line++,n.column=0,u+1===d?(o=null,a=!1):a&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:n.code,map:r}},e.SourceNode=o})),Mp=/* @__PURE__ */ j((e=>{e.SourceMapGenerator=Dp().SourceMapGenerator,e.SourceMapConsumer=Ap().SourceMapConsumer,e.SourceNode=jp().SourceNode})),Np=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;var n=Yf(),r=void 0;try{
190
+ function t(e){return e&&e.__esModule?e:{default:e}}var n=t(Xf()),r=Yf(),i=t(hp()),a=_p(),o=[].slice;function s(){}s.prototype={compiler:s,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var r=this.opcodes[n],i=e.opcodes[n];if(r.opcode!==i.opcode||!g(r.args,i.args))return!1}t=this.children.length;for(var n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=r.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=new this.compiler().compile(e,this.options),n=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[n]=t,this.useDepths=this.useDepths||t.useDepths,n},accept:function(e){if(r.indexOf(a.NODE_TYPES,e.type)===-1||!this[e.type])throw new n.default(`Unknown type: `+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){h(e),this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,r=0;r<n;r++)this.accept(t[r]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){_(e);var t=e.program,n=e.inverse;t&&=this.compileProgram(t),n&&=this.compileProgram(n);var r=this.classifySexpr(e);r===`helper`?this.helperSexpr(e,t,n):r===`simple`?(this.simpleSexpr(e),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`blockValue`,e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`ambiguousBlockValue`)),this.opcode(`append`)},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),r=e.path;this.useDecorators=!0,this.opcode(`registerDecorator`,n.length,r.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&=this.compileProgram(e.program);var r=e.params;if(r.length>1)throw new n.default(`Unsupported number of partial arguments: `+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode(`pushLiteral`,`undefined`):r.push({type:`PathExpression`,parts:[],depth:0}));var i=e.name.original,a=e.name.type===`SubExpression`;a&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||``;this.options.preventIndent&&o&&(this.opcode(`appendContent`,o),o=``),this.opcode(`invokePartial`,a,i,o),this.opcode(`append`)},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode(`appendEscaped`):this.opcode(`append`)},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){if(e.value!=null&&typeof e.value!=`string`)throw u(e,`value must be a string`);e.value&&this.opcode(`appendContent`,e.value)},CommentStatement:function(){},SubExpression:function(e){_(e);var t=this.classifySexpr(e);t===`simple`?this.simpleSexpr(e):t===`helper`?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var r=e.path,i=r.parts[0],a=t!=null||n!=null;this.opcode(`getContext`,d(r)),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),r.strict=!0,this.accept(r),this.opcode(`invokeAmbiguous`,i,a)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode(`resolvePossibleLambda`)},helperSexpr:function(e,t,r){var a=this.setupFullMustacheParams(e,t,r),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode(`invokeKnownHelper`,a.length,s);else if(this.options.knownHelpersOnly)throw new n.default(`You specified knownHelpersOnly, but used the unknown helper `+s,e);else o.strict=!0,o.falsy=!0,this.accept(o),this.opcode(`invokeHelper`,a.length,o.original,i.default.helpers.simpleId(o))},PathExpression:function(e){var t=d(e),n=m(e);this.addDepth(t),this.opcode(`getContext`,t);var r=n[0],a=i.default.helpers.scopedId(e),o=!t&&!a&&this.blockParamIndex(r);o?this.opcode(`lookupBlockParam`,o,n):r?e.data?(this.options.data=!0,this.opcode(`lookupData`,t,n,e.strict)):this.opcode(`lookupOnContext`,n,e.falsy,e.strict,a):this.opcode(`pushContext`)},StringLiteral:function(e){f(e),this.opcode(`pushString`,e.value)},NumberLiteral:function(e){f(e),this.opcode(`pushLiteral`,e.value)},BooleanLiteral:function(e){f(e),this.opcode(`pushLiteral`,e.value)},UndefinedLiteral:function(){this.opcode(`pushLiteral`,`undefined`)},NullLiteral:function(){this.opcode(`pushLiteral`,`null`)},Hash:function(e){var t=e.pairs,n=0,i=void 0;if(!r.isArray(t))throw u(e,`pairs must be an array`);i=t.length;for(var a=0;a<i;a++)if(!t[a]||typeof t[a].key!=`string`)throw u(e,`pair keys must be strings`);for(this.opcode(`pushHash`);n<i;n++)this.pushParam(t[n].value);for(;n--;)this.opcode(`assignToHash`,t[n].key);this.opcode(`popHash`)},opcode:function(e){this.opcodes.push({opcode:e,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){m(e.path);var t=i.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),r=!n&&i.default.helpers.helperExpression(e),a=!n&&(r||t);if(a&&!r){var o=e.path.parts[0],s=this.options;s.knownHelpers[o]?r=!0:s.knownHelpersOnly&&(a=!1)}return r?`helper`:a?`ambiguous`:`simple`},pushParams:function(e){for(var t=0,n=e.length;t<n;t++)this.pushParam(e[t])},pushParam:function(e){f(e);var t=e.value==null?e.original||``:e.value,n=d(e);if(this.stringParams)typeof t!=`number`&&typeof t!=`boolean`&&(t=String(t)),t.replace&&(t=t.replace(/^(\.?\.\/)*/g,``).replace(/\//g,`.`)),n&&this.addDepth(n),this.opcode(`getContext`,n),this.opcode(`pushStringParam`,t,e.type),e.type===`SubExpression`&&this.accept(e);else{if(this.trackIds){var r=void 0;if(e.parts&&!i.default.helpers.scopedId(e)&&!n&&(r=this.blockParamIndex(m(e)[0])),r){var a=e.parts.slice(1).join(`.`);this.opcode(`pushId`,`BlockParam`,r,a)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,``).replace(/^\.\//,``).replace(/^\.$/,``)),this.opcode(`pushId`,e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,r){var i=e.params;return this.pushParams(i),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),e.hash?this.accept(e.hash):this.opcode(`emptyHash`,r),i},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;t<n;t++){var i=this.options.blockParams[t],a=i&&r.indexOf(i,e);if(i&&a>=0)return[t,a]}}};function c(e,t,r){if(e==null||typeof e!=`string`&&e.type!==`Program`)throw new n.default(`You must pass a string or Handlebars AST to Handlebars.precompile. You passed `+e);t||={},`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var i=r.parse(e,t),a=new r.Compiler().compile(i,t);return new r.JavaScriptCompiler().compile(a,t)}function l(e,t,i){if(t===void 0&&(t={}),e==null||typeof e!=`string`&&e.type!==`Program`)throw new n.default(`You must pass a string or Handlebars AST to Handlebars.compile. You passed `+e);t=r.extend({},t),`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var a=void 0;function o(){var n=i.parse(e,t),r=new i.Compiler().compile(n,t),a=new i.JavaScriptCompiler().compile(r,t,void 0,!0);return i.template(a)}function s(e,t){return a||=o(),a.call(this,e,t)}return s._setup=function(e){return a||=o(),a._setup(e)},s._child=function(e,t,n,r){return a||=o(),a._child(e,t,n,r)},s}function u(e,t){return new n.default(`Invalid AST: `+e.type+` `+t,e)}function d(e){var t=e.depth;if(t==null)return 0;if(typeof t!=`number`||!isFinite(t)||Math.floor(t)!==t||t<0)throw u(e,`depth must be a non-negative integer`);return t}function f(e){var t=e.value;if(e.type===`StringLiteral`&&typeof t!=`string`)throw u(e,`value must be a string`);if(e.type===`NumberLiteral`&&typeof t!=`number`)throw u(e,`value must be a number`);if(e.type===`BooleanLiteral`&&typeof t!=`boolean`)throw u(e,`value must be a boolean`)}function p(e,t,n){if(!r.isArray(t))throw u(e,n+` must be an array`);for(var i=0;i<t.length;i++)if(typeof t[i]!=`string`)throw u(e,n+` must only contain strings`);return t}function m(e){return p(e,e.parts,`parts`)}function h(e){e.blockParams!=null&&p(e,e.blockParams,`blockParams`)}function g(e,t){if(e===t)return!0;if(r.isArray(e)&&r.isArray(t)&&e.length===t.length){for(var n=0;n<e.length;n++)if(!g(e[n],t[n]))return!1;return!0}}function _(e){if(!e.path.parts){var t=e.path;e.path={type:`PathExpression`,data:!1,depth:0,parts:[t.original+``],original:t.original+``,loc:t.loc}}}})),Cp=/* @__PURE__ */ j((e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``);e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw TypeError(`Must be between 0 and 63: `+e)},e.decode=function(e){var t=65,n=90,r=97,i=122,a=48;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+26:a<=e&&e<=57?e-a+52:e==43?62:e==47?63:-1}})),wp=/* @__PURE__ */ j((e=>{var t=Cp(),n=5,r=1<<n,i=r-1,a=r;function o(e){return e<0?(-e<<1)+1:(e<<1)+0}function s(e){var t=(e&1)==1,n=e>>1;return t?-n:n}e.encode=function(e){var r=``,s,c=o(e);do s=c&i,c>>>=n,c>0&&(s|=a),r+=t.encode(s);while(c>0);return r},e.decode=function(e,r,o){var c=e.length,l=0,u=0,d,f;do{if(r>=c)throw Error(`Expected more digits in base 64 VLQ value.`);if(f=t.decode(e.charCodeAt(r++)),f===-1)throw Error(`Invalid base64 digit: `+e.charAt(r-1));d=!!(f&a),f&=i,l+=f<<u,u+=n}while(d);o.value=s(l),o.rest=r}})),Tp=/* @__PURE__ */ j((e=>{function t(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw Error(`"`+t+`" is a required argument.`)}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}e.urlParse=i;function a(e){var t=``;return e.scheme&&(t+=e.scheme+`:`),t+=`//`,e.auth&&(t+=e.auth+`@`),e.host&&(t+=e.host),e.port&&(t+=`:`+e.port),e.path&&(t+=e.path),t}e.urlGenerate=a;function o(t){var n=t,r=i(t);if(r){if(!r.path)return t;n=r.path}for(var o=e.isAbsolute(n),s=n.split(/\/+/),c,l=0,u=s.length-1;u>=0;u--)c=s[u],c===`.`?s.splice(u,1):c===`..`?l++:l>0&&(c===``?(s.splice(u+1,l),l=0):(s.splice(u,2),l--));return n=s.join(`/`),n===``&&(n=o?`/`:`.`),r?(r.path=n,a(r)):n}e.normalize=o;function s(e,t){e===``&&(e=`.`),t===``&&(t=`.`);var n=i(t),s=i(e);if(s&&(e=s.path||`/`),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c=t.charAt(0)===`/`?t:o(e.replace(/\/+$/,``)+`/`+t);return s?(s.path=c,a(s)):c}e.join=s,e.isAbsolute=function(e){return e.charAt(0)===`/`||n.test(e)};function c(e,t){e===``&&(e=`.`),e=e.replace(/\/$/,``);for(var n=0;t.indexOf(e+`/`)!==0;){var r=e.lastIndexOf(`/`);if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join(`../`)+t.substr(e.length+1)}e.relative=c;var l=function(){return!(`__proto__`in Object.create(null))}();function u(e){return e}function d(e){return p(e)?`$`+e:e}e.toSetString=l?u:d;function f(e){return p(e)?e.slice(1):e}e.fromSetString=l?u:f;function p(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function m(e,t,n){var r=g(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:g(e.name,t.name)}e.compareByOriginalPositions=m;function h(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=g(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:g(e.name,t.name)}e.compareByGeneratedPositionsDeflated=h;function g(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function _(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=g(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:g(e.name,t.name)}e.compareByGeneratedPositionsInflated=_;function v(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,``))}e.parseSourceMapInput=v;function y(e,t,n){if(t||=``,e&&(e[e.length-1]!==`/`&&t[0]!==`/`&&(e+=`/`),t=e+t),n){var r=i(n);if(!r)throw Error(`sourceMapURL could not be parsed`);if(r.path){var c=r.path.lastIndexOf(`/`);c>=0&&(r.path=r.path.substring(0,c+1))}t=s(a(r),t)}return o(t)}e.computeSourceURL=y})),Ep=/* @__PURE__ */ j((e=>{var t=Tp(),n=Object.prototype.hasOwnProperty,r=typeof Map<`u`;function i(){this._array=[],this._set=r?/* @__PURE__ */ new Map:Object.create(null)}i.fromArray=function(e,t){for(var n=new i,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(e,i){var a=r?e:t.toSetString(e),o=r?this.has(e):n.call(this._set,a),s=this._array.length;(!o||i)&&this._array.push(e),o||(r?this._set.set(e,s):this._set[a]=s)},i.prototype.has=function(e){if(r)return this._set.has(e);var i=t.toSetString(e);return n.call(this._set,i)},i.prototype.indexOf=function(e){if(r){var i=this._set.get(e);if(i>=0)return i}else{var a=t.toSetString(e);if(n.call(this._set,a))return this._set[a]}throw Error(`"`+e+`" is not in the set.`)},i.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error(`No element indexed by `+e)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),Dp=/* @__PURE__ */ j((e=>{var t=Tp();function n(e,n){var r=e.generatedLine,i=n.generatedLine,a=e.generatedColumn,o=n.generatedColumn;return i>r||i==r&&o>=a||t.compareByGeneratedPositionsInflated(e,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||=(this._array.sort(t.compareByGeneratedPositionsInflated),!0),this._array},e.MappingList=r})),Op=/* @__PURE__ */ j((e=>{var t=wp(),n=Tp(),r=Ep().ArraySet,i=Dp().MappingList;function a(e){e||={},this._file=n.getArg(e,`file`,null),this._sourceRoot=n.getArg(e,`sourceRoot`,null),this._skipValidation=n.getArg(e,`skipValidation`,!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e){var t=e.sourceRoot,r=new a({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var i={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source!=null&&(i.source=e.source,t!=null&&(i.source=n.relative(t,i.source)),i.original={line:e.originalLine,column:e.originalColumn},e.name!=null&&(i.name=e.name)),r.addMapping(i)}),e.sources.forEach(function(i){var a=i;t!==null&&(a=n.relative(t,i)),r._sources.has(a)||r._sources.add(a);var o=e.sourceContentFor(i);o!=null&&r.setSourceContent(i,o)}),r},a.prototype.addMapping=function(e){var t=n.getArg(e,`generated`),r=n.getArg(e,`original`,null),i=n.getArg(e,`source`,null),a=n.getArg(e,`name`,null);this._skipValidation||this._validateMapping(t,r,i,a),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:a})},a.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=n.relative(this._sourceRoot,r)),t==null?this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null)):(this._sourcesContents||=Object.create(null),this._sourcesContents[n.toSetString(r)]=t)},a.prototype.applySourceMap=function(e,t,i){var a=t;if(t==null){if(e.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);a=e.file}var o=this._sourceRoot;o!=null&&(a=n.relative(o,a));var s=new r,c=new r;this._mappings.unsortedForEach(function(t){if(t.source===a&&t.originalLine!=null){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});r.source!=null&&(t.source=r.source,i!=null&&(t.source=n.join(i,t.source)),o!=null&&(t.source=n.relative(o,t.source)),t.originalLine=r.line,t.originalColumn=r.column,r.name!=null&&(t.name=r.name))}var l=t.source;l!=null&&!s.has(l)&&s.add(l);var u=t.name;u!=null&&!c.has(u)&&c.add(u)},this),this._sources=s,this._names=c,e.sources.forEach(function(t){var r=e.sourceContentFor(t);r!=null&&(i!=null&&(t=n.join(i,t)),o!=null&&(t=n.relative(o,t)),this.setSourceContent(t,r))},this)},a.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!=`number`&&typeof t.column!=`number`)throw Error(`original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.`);if(!(e&&`line`in e&&`column`in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)&&!(e&&`line`in e&&`column`in e&&t&&`line`in t&&`column`in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw Error(`Invalid mapping: `+JSON.stringify({generated:e,source:n,original:t,name:r}))},a.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,a=0,o=0,s=0,c=``,l,u,d,f,p=this._mappings.toArray(),m=0,h=p.length;m<h;m++){if(u=p[m],l=``,u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=`;`,r++;else if(m>0){if(!n.compareByGeneratedPositionsInflated(u,p[m-1]))continue;l+=`,`}l+=t.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=t.encode(f-s),s=f,l+=t.encode(u.originalLine-1-a),a=u.originalLine-1,l+=t.encode(u.originalColumn-i),i=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=t.encode(d-o),o=d)),c+=l}return c},a.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;t!=null&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=a})),kp=/* @__PURE__ */ j((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,i,a,o,s){var c=Math.floor((r-n)/2)+n,l=o(i,a[c],!0);return l===0?c:l>0?r-c>1?t(c,r,i,a,o,s):s==e.LEAST_UPPER_BOUND?r<a.length?r:-1:c:c-n>1?t(n,c,i,a,o,s):s==e.LEAST_UPPER_BOUND?c:n<0?-1:n}e.search=function(n,r,i,a){if(r.length===0)return-1;var o=t(-1,r.length,n,r,i,a||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&i(r[o],r[o-1],!0)===0;)--o;return o}})),Ap=/* @__PURE__ */ j((e=>{function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return Math.round(e+Math.random()*(t-e))}function r(e,i,a,o){if(a<o){var s=n(a,o),c=a-1;t(e,s,o);for(var l=e[o],u=a;u<o;u++)i(e[u],l)<=0&&(c+=1,t(e,c,u));t(e,c+1,u);var d=c+1;r(e,i,a,d-1),r(e,i,d+1,o)}}e.quickSort=function(e,t){r(e,t,0,e.length-1)}})),jp=/* @__PURE__ */ j((e=>{var t=Tp(),n=kp(),r=Ep().ArraySet,i=wp(),a=Ap().quickSort;function o(e,n){var r=e;return typeof e==`string`&&(r=t.parseSourceMapInput(e)),r.sections==null?new s(r,n):new l(r,n)}o.fromSourceMap=function(e,t){return s.fromSourceMap(e,t)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===`;`||n===`,`},o.prototype._parseMappings=function(e,t){throw Error(`Subclasses must implement _parseMappings`)},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(e,n,r){var i=n||null,a=r||o.GENERATED_ORDER,s;switch(a){case o.GENERATED_ORDER:s=this._generatedMappings;break;case o.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw Error(`Unknown order of iteration.`)}var c=this.sourceRoot;s.map(function(e){var n=e.source===null?null:this._sources.at(e.source);return n=t.computeSourceURL(c,n,this._sourceMapURL),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,i)},o.prototype.allGeneratedPositionsFor=function(e){var r=t.getArg(e,`line`),i={source:t.getArg(e,`source`),originalLine:r,originalColumn:t.getArg(e,`column`,0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],o=this._findMapping(i,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,n.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var c=s.originalLine;s&&s.originalLine===c;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o]}return a},e.SourceMapConsumer=o;function s(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),o=t.getArg(i,`sources`),s=t.getArg(i,`names`,[]),c=t.getArg(i,`sourceRoot`,null),l=t.getArg(i,`sourcesContent`,null),u=t.getArg(i,`mappings`),d=t.getArg(i,`file`,null);if(a!=this._version)throw Error(`Unsupported version: `+a);c&&=t.normalize(c),o=o.map(String).map(t.normalize).map(function(e){return c&&t.isAbsolute(c)&&t.isAbsolute(e)?t.relative(c,e):e}),this._names=r.fromArray(s.map(String),!0),this._sources=r.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(c,e,n)}),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=n,this.file=d}s.prototype=Object.create(o.prototype),s.prototype.consumer=o,s.prototype._findSourceIndex=function(e){var n=e;if(this.sourceRoot!=null&&(n=t.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(var r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1},s.fromSourceMap=function(e,n){var i=Object.create(s.prototype),o=i._names=r.fromArray(e._names.toArray(),!0),l=i._sources=r.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=n,i._absoluteSources=i._sources.toArray().map(function(e){return t.computeSourceURL(i.sourceRoot,e,n)});for(var u=e._mappings.toArray().slice(),d=i.__generatedMappings=[],f=i.__originalMappings=[],p=0,m=u.length;p<m;p++){var h=u[p],g=new c;g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=l.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=o.indexOf(h.name)),f.push(g)),d.push(g)}return a(i.__originalMappings,t.compareByOriginalPositions),i},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(e,n){for(var r=1,o=0,s=0,l=0,u=0,d=0,f=e.length,p=0,m={},h={},g=[],_=[],v,y,b,x,S;p<f;)if(e.charAt(p)===`;`)r++,p++,o=0;else if(e.charAt(p)===`,`)p++;else{for(v=new c,v.generatedLine=r,x=p;x<f&&!this._charIsMappingSeparator(e,x);x++);if(y=e.slice(p,x),b=m[y],b)p+=y.length;else{for(b=[];p<x;)i.decode(e,p,h),S=h.value,p=h.rest,b.push(S);if(b.length===2)throw Error(`Found a source, but no line and column`);if(b.length===3)throw Error(`Found a source and line, but no column`);m[y]=b}v.generatedColumn=o+b[0],o=v.generatedColumn,b.length>1&&(v.source=u+b[1],u+=b[1],v.originalLine=s+b[2],s=v.originalLine,v.originalLine+=1,v.originalColumn=l+b[3],l=v.originalColumn,b.length>4&&(v.name=d+b[4],d+=b[4])),_.push(v),typeof v.originalLine==`number`&&g.push(v)}a(_,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,a(g,t.compareByOriginalPositions),this.__originalMappings=g},s.prototype._findMapping=function(e,t,r,i,a,o){if(e[r]<=0)throw TypeError(`Line must be greater than or equal to 1, got `+e[r]);if(e[i]<0)throw TypeError(`Column must be greater than or equal to 0, got `+e[i]);return n.search(e,t,a,o)},s.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(e){var n={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},r=this._findMapping(n,this._generatedMappings,`generatedLine`,`generatedColumn`,t.compareByGeneratedPositionsDeflated,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var a=t.getArg(i,`source`,null);a!==null&&(a=this._sources.at(a),a=t.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var s=t.getArg(i,`name`,null);return s!==null&&(s=this._names.at(s)),{source:a,line:t.getArg(i,`originalLine`,null),column:t.getArg(i,`originalColumn`,null),name:s}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},s.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=t.relative(this.sourceRoot,i));var a;if(this.sourceRoot!=null&&(a=t.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,``);if(a.scheme==`file`&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!a.path||a.path==`/`)&&this._sources.has(`/`+i))return this.sourcesContent[this._sources.indexOf(`/`+i)]}if(n)return null;throw Error(`"`+i+`" is not in the SourceMap.`)},s.prototype.generatedPositionFor=function(e){var n=t.getArg(e,`source`);if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:t.getArg(e,`line`),originalColumn:t.getArg(e,`column`)},i=this._findMapping(r,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:t.getArg(a,`generatedLine`,null),column:t.getArg(a,`generatedColumn`,null),lastColumn:t.getArg(a,`lastGeneratedColumn`,null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=s;function l(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),s=t.getArg(i,`sections`);if(a!=this._version)throw Error(`Unsupported version: `+a);this._sources=new r,this._names=new r;var c={line:-1,column:0};this._sections=s.map(function(e){if(e.url)throw Error(`Support for url field in sections not implemented.`);var r=t.getArg(e,`offset`),i=t.getArg(r,`line`),a=t.getArg(r,`column`);if(i<c.line||i===c.line&&a<c.column)throw Error(`Section offsets must be ordered and non-overlapping.`);return c=r,{generatedOffset:{generatedLine:i+1,generatedColumn:a+1},consumer:new o(t.getArg(e,`map`),n)}})}l.prototype=Object.create(o.prototype),l.prototype.constructor=o,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),l.prototype.originalPositionFor=function(e){var r={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},i=n.search(r,this._sections,function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn}),a=this._sections[i];return a?a.consumer.originalPositionFor({line:r.generatedLine-(a.generatedOffset.generatedLine-1),column:r.generatedColumn-(a.generatedOffset.generatedLine===r.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw Error(`"`+e+`" is not in the SourceMap.`)},l.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(t.getArg(e,`source`))!==-1){var i=r.consumer.generatedPositionFor(e);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},l.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var c=o[s],l=i.consumer._sources.at(c.source);l=t.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;c.name&&(u=i.consumer._names.at(c.name),this._names.add(u),u=this._names.indexOf(u));var d={source:l,generatedLine:c.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(i.generatedOffset.generatedLine===c.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(d),typeof d.originalLine==`number`&&this.__originalMappings.push(d)}a(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),a(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=l})),Mp=/* @__PURE__ */ j((e=>{var t=Op().SourceMapGenerator,n=Tp(),r=/(\r?\n)/,i=10,a=`$$$isSourceNode$$$`;function o(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=n??null,this.name=i??null,this[a]=!0,r!=null&&this.add(r)}o.fromStringWithSourceMap=function(e,t,i){var a=new o,s=e.split(r),c=0,l=function(){return e()+(e()||``);function e(){return c<s.length?s[c++]:void 0}},u=1,d=0,f=null;return t.eachMapping(function(e){if(f!==null){if(u<e.generatedLine)p(f,l()),u++,d=0;else{var t=s[c]||``,n=t.substr(0,e.generatedColumn-d);s[c]=t.substr(e.generatedColumn-d),d=e.generatedColumn,p(f,n),f=e;return}}for(;u<e.generatedLine;)a.add(l()),u++;if(d<e.generatedColumn){var t=s[c]||``;a.add(t.substr(0,e.generatedColumn)),s[c]=t.substr(e.generatedColumn),d=e.generatedColumn}f=e},this),c<s.length&&(f&&p(f,l()),a.add(s.splice(c).join(``))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);r!=null&&(i!=null&&(e=n.join(i,e)),a.setSourceContent(e,r))}),a;function p(e,t){if(e===null||e.source===void 0)a.add(t);else{var r=i?n.join(i,e.source):e.source;a.add(new o(e.originalLine,e.originalColumn,r,t,e.name))}}},o.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[a]||typeof e==`string`)e&&this.children.push(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[a]||typeof e==`string`)this.children.unshift(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[a]?t.walk(e):t!==``&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},o.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):typeof n==`string`?this.children[this.children.length-1]=n.replace(e,t):this.children.push(``.replace(e,t)),this},o.prototype.setSourceContent=function(e,t){this.sourceContents[n.toSetString(e)]=t},o.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,r=i.length;t<r;t++)e(n.fromSetString(i[t]),this.sourceContents[i[t]])},o.prototype.toString=function(){var e=``;return this.walk(function(t){e+=t}),e},o.prototype.toStringWithSourceMap=function(e){var n={code:``,line:1,column:0},r=new t(e),a=!1,o=null,s=null,c=null,l=null;return this.walk(function(e,t){n.code+=e,t.source!==null&&t.line!==null&&t.column!==null?((o!==t.source||s!==t.line||c!==t.column||l!==t.name)&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),o=t.source,s=t.line,c=t.column,l=t.name,a=!0):a&&=(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,!1);for(var u=0,d=e.length;u<d;u++)e.charCodeAt(u)===i?(n.line++,n.column=0,u+1===d?(o=null,a=!1):a&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:n.code,map:r}},e.SourceNode=o})),Np=/* @__PURE__ */ j((e=>{e.SourceMapGenerator=Op().SourceMapGenerator,e.SourceMapConsumer=jp().SourceMapConsumer,e.SourceNode=Mp().SourceNode})),Pp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.safeJsonLiteral=o;var t=Yf(),n=/[\x00-\x1f\\"\u2028\u2029<\ud800-\udfff]/,r=/<(?=!--|\/?script)/gi;function i(e){return e.replace(r,`\\u003C`)}function a(e){return`\\u`+e.charCodeAt(0).toString(16)}function o(e){return i(JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/[\ud800-\udfff]/g,a))}var s=void 0;try{
195
191
  /* istanbul ignore next */
196
- (typeof define!=`function`||!define.amd)&&(r=Mp().SourceNode)}catch{}
192
+ (typeof define!=`function`||!define.amd)&&(s=Np().SourceNode)}catch{}
197
193
  /* istanbul ignore if: tested but not covered in istanbul due to dist build */
198
- r||(r=function(e,t,n,r){this.src=``,r&&this.add(r)},r.prototype={add:function(e){n.isArray(e)&&(e=e.join(``)),this.src+=e},prepend:function(e){n.isArray(e)&&(e=e.join(``)),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function i(e,t,r){if(n.isArray(e)){for(var i=[],a=0,o=e.length;a<o;a++)i.push(t.wrap(e[a],r));return i}return typeof e==`boolean`||typeof e==`number`?e+``:e}function a(e){this.srcFile=e,this.source=[]}a.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([` `,t,`
199
- `])}),e},each:function(e){for(var t=0,n=this.source.length;t<n;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new r(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof r?e:(e=i(e,this,t),new r(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?`.`+t+`(`:`(`,n,`)`])},quotedString:function(e){return`"`+(e+``).replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)+`"`},objectLiteral:function(e){
194
+ s||(s=function(e,t,n,r){this.src=``,r&&this.add(r)},s.prototype={add:function(e){t.isArray(e)&&(e=e.join(``)),this.src+=e},prepend:function(e){t.isArray(e)&&(e=e.join(``)),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function c(e,n,r){if(t.isArray(e)){for(var i=[],a=0,o=e.length;a<o;a++)i.push(n.wrap(e[a],r));return i}return typeof e==`boolean`||typeof e==`number`?e+``:e}function l(e){this.srcFile=e,this.source=[]}l.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([` `,t,`
195
+ `])}),e},each:function(e){for(var t=0,n=this.source.length;t<n;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new s(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof s?e:(e=c(e,this,t),new s(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?`.`+t+`(`:`(`,n,`)`])},quotedString:function(e){return e+=``,n.test(e)?o(e):`"`+e+`"`},objectLiteral:function(e){
200
196
  // istanbul ignore next
201
- var t=this,n=[];Object.keys(e).forEach(function(r){var a=i(e[r],t);a!==`undefined`&&n.push([t.quotedString(r),`:`,a])});var r=this.generateList(n);return r.prepend(`{`),r.add(`}`),r},generateList:function(e){for(var t=this.empty(),n=0,r=e.length;n<r;n++)n&&t.add(`,`),t.add(i(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend(`[`),t.add(`]`),t}},e.default=a,t.exports=e.default})),Pp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
197
+ var t=this,n=[];Object.keys(e).forEach(function(r){var i=c(e[r],t);i!==`undefined`&&n.push([t.quotedString(r),`:`,i])});var r=this.generateList(n);return r.prepend(`{`),r.add(`}`),r},generateList:function(e){for(var t=this.empty(),n=0,r=e.length;n<r;n++)n&&t.add(`,`),t.add(c(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend(`[`),t.add(`]`),t}},e.default=l})),Fp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
202
198
  // istanbul ignore next
203
- function n(e){return e&&e.__esModule?e:{default:e}}var r=lp(),i=n(Xf()),a=Yf(),o=n(Np());function s(e){this.value=e}function c(){}c.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable(`container.lookup`),`(depths, `,JSON.stringify(e),`)`]},compilerInfo:function(){var e=r.COMPILER_REVISION;return[e,r.REVISION_CHANGES[e]]},appendToBuffer:function(e,t,n){return a.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?[`return `,e,`;`]:n?[`buffer += `,e,`;`]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString(``)},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,[`lookupProperty(`,e,`,`,JSON.stringify(t),`)`]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,n,r){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var a=e.opcodes,o=void 0,s=void 0,c=void 0,l=void 0;for(c=0,l=a.length;c<l;c++)o=a[c],this.source.currentLocation=o.loc,s||=o.loc,this[o.opcode].apply(this,o.args);
199
+ function n(e){return e&&e.__esModule?e:{default:e}}var r=lp(),i=n(Xf()),a=Yf(),o=Pp(),s=n(o);function c(e){this.value=e}function l(){}l.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable(`container.lookup`),`(depths, `,this.quotedString(e),`)`]},compilerInfo:function(){var e=r.COMPILER_REVISION;return[e,r.REVISION_CHANGES[e]]},appendToBuffer:function(e,t,n){return a.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?[`return `,e,`;`]:n?[`buffer += `,e,`;`]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString(``)},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,[`lookupProperty(`,e,`,`,this.quotedString(t),`)`]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,n,r){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var a=e.opcodes,o=void 0,s=void 0,c=void 0,l=void 0;for(c=0,l=a.length;c<l;c++)o=a[c],this.source.currentLocation=o.loc,s||=o.loc,this[o.opcode].apply(this,o.args);
204
200
  /* istanbul ignore next */
205
201
  if(this.source.currentLocation=s,this.pushSource(``),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new i.default(`Compile completed with content left on stack`);this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend([`var decorators = container.decorators, `,this.lookupPropertyFunctionVarDeclaration(),`;
206
202
  `]),this.decorators.push(`return fn;`),r?this.decorators=Function.apply(this,[`fn`,`props`,`container`,`depth0`,`data`,`blockParams`,`depths`,this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
207
203
  `),this.decorators.push(`}
208
- `),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(r);if(this.isChild)return u;var d={compiler:this.compilerInfo(),main:u};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var f=this.context,p=f.programs,m=f.decorators;for(c=0,l=p.length;c<l;c++)d[c]=p[c],m[c]&&(d[c+`_d`]=m[c],d.useDecorators=!0);return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),r?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),t.srcName?(d=d.toStringWithSourceMap({file:t.destName}),d.map=d.map&&d.map.toString()):d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new o.default(this.options.srcName),this.decorators=new o.default(this.options.srcName)},createFunctionContext:function(e){
204
+ `),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(r);if(this.isChild)return u;var d={compiler:this.compilerInfo(),main:u};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var f=this.context,p=f.programs,m=f.decorators;for(c=0,l=p.length;c<l;c++)d[c]=p[c],m[c]&&(d[c+`_d`]=m[c],d.useDecorators=!0);return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),r?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),t.srcName?(d=d.toStringWithSourceMap({file:t.destName}),d.map=d.map&&d.map.toString()):d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new s.default(this.options.srcName),this.decorators=new s.default(this.options.srcName)},createFunctionContext:function(e){
209
205
  // istanbul ignore next
210
206
  var t=this,n=``,r=this.stackVars.concat(this.registers.list);r.length>0&&(n+=`, `+r.join(`, `));var i=0;Object.keys(this.aliases).forEach(function(e){var r=t.aliases[e];r.children&&r.referenceCount>1&&(n+=`, alias`+ ++i+`=`+e,r.children[0]=`alias`+i)}),this.lookupPropertyFunctionIsUsed&&(n+=`, `+this.lookupPropertyFunctionVarDeclaration());var a=[`container`,`depth0`,`helpers`,`partials`,`data`];(this.useBlockParams||this.useDepths)&&a.push(`blockParams`),this.useDepths&&a.push(`depths`);var o=this.mergeSource(n);return e?(a.push(o),Function.apply(this,a)):this.source.wrap([`function(`,a.join(`,`),`) {
211
207
  `,o,`}`])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,r=void 0,i=void 0,a=void 0,o=void 0;return this.source.each(function(e){e.appendToBuffer?(a?e.prepend(` + `):a=e,o=e):(a&&=(i?a.prepend(`buffer += `):r=!0,o.add(`;`),o=void 0),i=!0,t||(n=!1))}),n?a?(a.prepend(`return `),o.add(`;`)):i||this.source.push(`return "";`):(e+=`, buffer = `+(r?``:this.initializeBuffer()),a?(a.prepend(`return buffer + `),o.add(`;`)):this.source.push(`return buffer;`)),e&&this.source.prepend(`var `+e.substring(2)+(r?``:`;
@@ -216,17 +212,17 @@ var t=this,n=``,r=this.stackVars.concat(this.registers.list);r.length>0&&(n+=`,
216
212
  return undefined
217
213
  }`},blockValue:function(e){var t=this.aliasable(`container.hooks.blockHelperMissing`),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(t,`call`,n))},ambiguousBlockValue:function(){var e=this.aliasable(`container.hooks.blockHelperMissing`),t=[this.contextName(0)];this.setupHelperArgs(``,0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource([`if (!`,this.lastHelper,`) { `,n,` = `,this.source.functionCall(e,`call`,t),`}`])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(e){return[` != null ? `,e,` : ""`]}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource([`if (`,e,` != null) { `,this.appendToBuffer(e,void 0,!0),` }`]),this.environment.isSimple&&this.pushSource([`else { `,this.appendToBuffer(`''`,void 0,!0),` }`])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable(`container.escapeExpression`),`(`,this.popStack(),`)`]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,r){var i=0;!r&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[i++])):this.pushContext(),this.resolvePath(`context`,e,i,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push([`blockParams[`,e[0],`][`,e[1],`]`]),this.resolvePath(`context`,t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral(`container.data(data, `+e+`)`):this.pushStackLiteral(`data`),this.resolvePath(`data`,t,0,!0,n)},resolvePath:function(e,t,n,r,i){
218
214
  // istanbul ignore next
219
- var a=this;if(this.options.strict||this.options.assumeObjects){this.push(l(this.options.strict&&i,this,t,n,e));return}for(var o=t.length,s=function(n){a.replaceStack(function(i){var o=a.nameLookup(i,t[n],e);return r?[` && `,o]:[` != null ? `,o,` : `,i]})},c=n;c<o;c++)s(c)},resolvePossibleLambda:function(){this.push([this.aliasable(`container.lambda`),`(`,this.popStack(),`, `,this.contextName(0),`)`])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),t!==`SubExpression`&&(typeof e==`string`?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push(`{}`),this.stringParams&&(this.push(`{}`),this.push(`{}`)),this.pushStackLiteral(e?`undefined`:`{}`)},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e==null?this.pushStackLiteral(null):this.pushStackLiteral(this.programExpression(e))},registerDecorator:function(e,t){var n=this.nameLookup(`decorators`,t,`decorator`),r=this.setupHelperArgs(t,e);this.decorators.push([`var decorator = `,n,`;`]),this.decorators.push([`if (typeof decorator !== "function") { throw new Error(`,this.quotedString(`Missing decorator: "`+t+`"`),`); }`]),this.decorators.push([`fn = `,this.decorators.functionCall(`decorator`,``,[`fn`,`props`,`container`,r]),` || fn;`])},invokeHelper:function(e,t,n){var r=this.popStack(),i=this.setupHelper(e,t),a=[];n&&a.push(i.name),a.push(r),this.options.strict||a.push(this.aliasable(`container.hooks.helperMissing`));var o=[`(`,this.itemsSeparatedBy(a,`||`),`)`],s=this.source.functionCall(o,`call`,i.callParams);this.push(s)},itemsSeparatedBy:function(e,t){var n=[];n.push(e[0]);for(var r=1;r<e.length;r++)n.push(t,e[r]);return n},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,`call`,n.callParams))},invokeAmbiguous:function(e,t){this.useRegister(`helper`);var n=this.popStack();this.emptyHash();var r=this.setupHelper(0,e,t),i=[`(`,`(helper = `,this.lastHelper=this.nameLookup(`helpers`,e,`helper`),` || `,n,`)`];this.options.strict||(i[0]=`(helper = `,i.push(` != null ? helper : `,this.aliasable(`container.hooks.helperMissing`))),this.push([`(`,i,r.paramsInit?[`),(`,r.paramsInit]:[],`),`,`(typeof helper === `,this.aliasable(`"function"`),` ? `,this.source.functionCall(`helper`,`call`,r.callParams),` : helper))`])},invokePartial:function(e,t,n){var r=[],i=this.setupParams(t,1,r);e&&(t=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers=`helpers`,i.partials=`partials`,i.decorators=`container.decorators`,e?r.unshift(t):r.unshift(this.nameLookup(`partials`,t,`partial`)),this.options.compat&&(i.depths=`depths`),i=this.objectLiteral(i),r.push(i),this.push(this.source.functionCall(`container.invokePartial`,``,r))},assignToHash:function(e){var t=this.popStack(),n=void 0,r=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(r=this.popStack(),n=this.popStack());var a=this.hash;n&&(a.contexts[e]=n),r&&(a.types[e]=r),i&&(a.ids[e]=i),a.values[e]=t},pushId:function(e,t,n){e===`BlockParam`?this.pushStackLiteral(`blockParams[`+t[0]+`].path[`+t[1]+`]`+(n?` + `+JSON.stringify(`.`+n):``)):e===`PathExpression`?this.pushString(t):e===`SubExpression`?this.pushStackLiteral(`true`):this.pushStackLiteral(`null`)},compiler:c,compileChildren:function(e,t){for(var n=e.children,r=void 0,i=void 0,a=0,o=n.length;a<o;a++){r=n[a],i=new this.compiler;var s=this.matchExistingProgram(r);if(s==null){var c=this.context.programs.push(``)-1;r.index=c,r.name=`program`+c,this.context.programs[c]=i.compile(r,t,this.context,!this.precompile),this.context.decorators[c]=i.decorators,this.context.environments[c]=r,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams,r.useDepths=this.useDepths,r.useBlockParams=this.useBlockParams}else r.index=s.index,r.name=`program`+s.index,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var r=this.context.environments[t];if(r&&r.equals(e))return r}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,`data`,t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push(`blockParams`),this.useDepths&&n.push(`depths`),`container.program(`+n.join(`, `)+`)`},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof s||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new s(e))},pushSource:function(e){this.pendingContent&&=(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),void 0),e&&this.source.push(e)},replaceStack:function(e){var t=[`(`],n=void 0,r=void 0,a=void 0;
215
+ var a=this;if(this.options.strict||this.options.assumeObjects){this.push(d(this.options.strict&&i,this,t,n,e));return}for(var o=t.length,s=function(n){a.replaceStack(function(i){var o=a.nameLookup(i,t[n],e);return r?[` && `,o]:[` != null ? `,o,` : `,i]})},c=n;c<o;c++)s(c)},resolvePossibleLambda:function(){this.push([this.aliasable(`container.lambda`),`(`,this.popStack(),`, `,this.contextName(0),`)`])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),t!==`SubExpression`&&(typeof e==`string`?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push(`{}`),this.stringParams&&(this.push(`{}`),this.push(`{}`)),this.pushStackLiteral(e?`undefined`:`{}`)},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e==null?this.pushStackLiteral(null):this.pushStackLiteral(this.programExpression(e))},registerDecorator:function(e,t){var n=this.nameLookup(`decorators`,t,`decorator`),r=this.setupHelperArgs(t,e);this.decorators.push([`var decorator = `,n,`;`]),this.decorators.push([`if (typeof decorator !== "function") { throw new Error(`,this.quotedString(`Missing decorator: "`+t+`"`),`); }`]),this.decorators.push([`fn = `,this.decorators.functionCall(`decorator`,``,[`fn`,`props`,`container`,r]),` || fn;`])},invokeHelper:function(e,t,n){var r=this.popStack(),i=this.setupHelper(e,t),a=[];n&&a.push(i.name),a.push(r),this.options.strict||a.push(this.aliasable(`container.hooks.helperMissing`));var o=[`(`,this.itemsSeparatedBy(a,`||`),`)`],s=this.source.functionCall(o,`call`,i.callParams);this.push(s)},itemsSeparatedBy:function(e,t){var n=[];n.push(e[0]);for(var r=1;r<e.length;r++)n.push(t,e[r]);return n},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,`call`,n.callParams))},invokeAmbiguous:function(e,t){this.useRegister(`helper`);var n=this.popStack();this.emptyHash();var r=this.setupHelper(0,e,t),i=[`(`,`(helper = `,this.lastHelper=this.nameLookup(`helpers`,e,`helper`),` || `,n,`)`];this.options.strict||(i[0]=`(helper = `,i.push(` != null ? helper : `,this.aliasable(`container.hooks.helperMissing`))),this.push([`(`,i,r.paramsInit?[`),(`,r.paramsInit]:[],`),`,`(typeof helper === `,this.aliasable(`"function"`),` ? `,this.source.functionCall(`helper`,`call`,r.callParams),` : helper))`])},invokePartial:function(e,t,n){var r=[],i=this.setupParams(t,1,r);e&&(t=this.popStack(),delete i.name),n&&(i.indent=this.quotedString(n)),i.helpers=`helpers`,i.partials=`partials`,i.decorators=`container.decorators`,e?r.unshift(t):r.unshift(this.nameLookup(`partials`,t,`partial`)),this.options.compat&&(i.depths=`depths`),i=this.objectLiteral(i),r.push(i),this.push(this.source.functionCall(`container.invokePartial`,``,r))},assignToHash:function(e){var t=this.popStack(),n=void 0,r=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(r=this.popStack(),n=this.popStack());var a=this.hash;n&&(a.contexts[e]=n),r&&(a.types[e]=r),i&&(a.ids[e]=i),a.values[e]=t},pushId:function(e,t,n){e===`BlockParam`?this.pushStackLiteral(`blockParams[`+t[0]+`].path[`+t[1]+`]`+(n?` + `+this.quotedString(`.`+n):``)):e===`PathExpression`?this.pushString(t):e===`SubExpression`?this.pushStackLiteral(`true`):this.pushStackLiteral(`null`)},compiler:l,compileChildren:function(e,t){for(var n=e.children,r=void 0,i=void 0,a=0,o=n.length;a<o;a++){r=n[a],i=new this.compiler;var s=this.matchExistingProgram(r);if(s==null){var c=this.context.programs.push(``)-1;r.index=c,r.name=`program`+c,this.context.programs[c]=i.compile(r,t,this.context,!this.precompile),this.context.decorators[c]=i.decorators,this.context.environments[c]=r,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams,r.useDepths=this.useDepths,r.useBlockParams=this.useBlockParams}else r.index=s.index,r.name=`program`+s.index,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var r=this.context.environments[t];if(r&&r.equals(e))return r}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,`data`,t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push(`blockParams`),this.useDepths&&n.push(`depths`),`container.program(`+n.join(`, `)+`)`},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof c||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new c(e))},pushSource:function(e){this.pendingContent&&=(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),void 0),e&&this.source.push(e)},replaceStack:function(e){var t=[`(`],n=void 0,r=void 0,a=void 0;
220
216
  /* istanbul ignore next */
221
- if(!this.isInline())throw new i.default(`replaceStack on non-inline`);var o=this.popStack(!0);if(o instanceof s)n=[o.value],t=[`(`,n],a=!0;else{r=!0;var c=this.incrStack();t=[`((`,this.push(c),` = `,o,`)`],n=this.topStack()}var l=e.call(this,n);a||this.popStack(),r&&this.stackSlot--,this.push(t.concat(l,`)`))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push(`stack`+this.stackSlot),this.topStackName()},topStackName:function(){return`stack`+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];
217
+ if(!this.isInline())throw new i.default(`replaceStack on non-inline`);var o=this.popStack(!0);if(o instanceof c)n=[o.value],t=[`(`,n],a=!0;else{r=!0;var s=this.incrStack();t=[`((`,this.push(s),` = `,o,`)`],n=this.topStack()}var l=e.call(this,n);a||this.popStack(),r&&this.stackSlot--,this.push(t.concat(l,`)`))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push(`stack`+this.stackSlot),this.topStackName()},topStackName:function(){return`stack`+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];
222
218
  /* istanbul ignore if */
223
- if(r instanceof s)this.compileStack.push(r);else{var i=this.incrStack();this.pushSource([i,` = `,r,`;`]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof s)return n.value;if(!t){
219
+ if(r instanceof c)this.compileStack.push(r);else{var i=this.incrStack();this.pushSource([i,` = `,r,`;`]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof c)return n.value;if(!t){
224
220
  /* istanbul ignore next */
225
- if(!this.stackSlot)throw new i.default(`Invalid stack pop`);this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof s?t.value:t},contextName:function(e){return this.useDepths&&e?`depths[`+e+`]`:`depth`+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var r=[];return{params:r,paramsInit:this.setupHelperArgs(t,e,r,n),name:this.nameLookup(`helpers`,t,`helper`),callParams:[this.aliasable(this.contextName(0)+` != null ? `+this.contextName(0)+` : (container.nullContext || {})`)].concat(r)}},setupParams:function(e,t,n){var r={},i=[],a=[],o=[],s=!n,c=void 0;s&&(n=[]),r.name=this.quotedString(e),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack());var l=this.popStack(),u=this.popStack();(u||l)&&(r.fn=u||`container.noop`,r.inverse=l||`container.noop`);for(var d=t;d--;)c=this.popStack(),n[d]=c,this.trackIds&&(o[d]=this.popStack()),this.stringParams&&(a[d]=this.popStack(),i[d]=this.popStack());return s&&(r.args=this.source.generateArray(n)),this.trackIds&&(r.ids=this.source.generateArray(o)),this.stringParams&&(r.types=this.source.generateArray(a),r.contexts=this.source.generateArray(i)),this.options.data&&(r.data=`data`),this.useBlockParams&&(r.blockParams=`blockParams`),r},setupHelperArgs:function(e,t,n,r){var i=this.setupParams(e,t,n);return i.loc=JSON.stringify(this.source.currentLocation),i=this.objectLiteral(i),r?(this.useRegister(`options`),n.push(`options`),[`options=`,i]):n?(n.push(i),``):i}},(function(){for(var e=`break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false`.split(` `),t=c.RESERVED_WORDS={},n=0,r=e.length;n<r;n++)t[e[n]]=!0})(),c.isValidJavaScriptVariableName=function(e){return!c.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function l(e,t,n,r,i){var a=t.popStack(),o=n.length;e&&o--;for(var s=r;s<o;s++)a=t.nameLookup(a,n[s],i);return e?[t.aliasable(`container.strict`),`(`,a,`, `,t.quotedString(n[o]),`, `,JSON.stringify(t.source.currentLocation),` )`]:a}e.default=c,t.exports=e.default})),Fp=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
221
+ if(!this.stackSlot)throw new i.default(`Invalid stack pop`);this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof c?t.value:t},contextName:function(e){return this.useDepths&&e?`depths[`+e+`]`:`depth`+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var r=[];return{params:r,paramsInit:this.setupHelperArgs(t,e,r,n),name:this.nameLookup(`helpers`,t,`helper`),callParams:[this.aliasable(this.contextName(0)+` != null ? `+this.contextName(0)+` : (container.nullContext || {})`)].concat(r)}},setupParams:function(e,t,n){var r={},i=[],a=[],o=[],s=!n,c=void 0;s&&(n=[]),r.name=this.quotedString(e),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack());var l=this.popStack(),u=this.popStack();(u||l)&&(r.fn=u||`container.noop`,r.inverse=l||`container.noop`);for(var d=t;d--;)c=this.popStack(),n[d]=c,this.trackIds&&(o[d]=this.popStack()),this.stringParams&&(a[d]=this.popStack(),i[d]=this.popStack());return s&&(r.args=this.source.generateArray(n)),this.trackIds&&(r.ids=this.source.generateArray(o)),this.stringParams&&(r.types=this.source.generateArray(a),r.contexts=this.source.generateArray(i)),this.options.data&&(r.data=`data`),this.useBlockParams&&(r.blockParams=`blockParams`),r},setupHelperArgs:function(e,t,n,r){var i=this.setupParams(e,t,n);return i.loc=u(this),i=this.objectLiteral(i),r?(this.useRegister(`options`),n.push(`options`),[`options=`,i]):n?(n.push(i),``):i}},(function(){for(var e=`break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false`.split(` `),t=l.RESERVED_WORDS={},n=0,r=e.length;n<r;n++)t[e[n]]=!0})(),l.isValidJavaScriptVariableName=function(e){return!l.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function u(e){var t=e.source.currentLocation;return t?o.safeJsonLiteral(t):`undefined`}function d(e,t,n,r,i){var a=t.popStack(),o=n.length;e&&o--;for(var s=r;s<o;s++)a=t.nameLookup(a,n[s],i);return e?[t.aliasable(`container.strict`),`(`,a,`, `,t.quotedString(n[o]),`, `,u(t),` )`]:a}e.default=l,t.exports=e.default})),Ip=/* @__PURE__ */ j(((e,t)=>{e.__esModule=!0;
226
222
  // istanbul ignore next
227
- function n(e){return e&&e.__esModule?e:{default:e}}var r=n(mp()),i=n(hp()),a=bp(),o=xp(),s=n(Pp()),c=n(_p()),l=n(pp()),u=r.default.create;function d(){var e=u();return e.compile=function(t,n){return o.compile(t,n,e)},e.precompile=function(t,n){return o.precompile(t,n,e)},e.AST=i.default,e.Compiler=o.Compiler,e.JavaScriptCompiler=s.default,e.Parser=a.parser,e.parse=a.parse,e.parseWithoutProcessing=a.parseWithoutProcessing,e}var f=d();f.create=d,l.default(f),f.Visitor=c.default,f.default=f,e.default=f,t.exports=e.default})),Ip=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.print=r,e.PrintVisitor=i;
223
+ function n(e){return e&&e.__esModule?e:{default:e}}var r=n(mp()),i=n(hp()),a=xp(),o=Sp(),s=n(Fp()),c=n(vp()),l=n(pp()),u=r.default.create;function d(){var e=u();return e.compile=function(t,n){return o.compile(t,n,e)},e.precompile=function(t,n){return o.precompile(t,n,e)},e.AST=i.default,e.Compiler=o.Compiler,e.JavaScriptCompiler=s.default,e.Parser=a.parser,e.parse=a.parse,e.parseWithoutProcessing=a.parseWithoutProcessing,e}var f=d();f.create=d,l.default(f),f.Visitor=c.default,f.default=f,e.default=f,t.exports=e.default})),Lp=/* @__PURE__ */ j((e=>{e.__esModule=!0,e.print=r,e.PrintVisitor=i;
228
224
  // istanbul ignore next
229
- function t(e){return e&&e.__esModule?e:{default:e}}var n=t(_p());function r(e){return new i().accept(e)}function i(){this.padding=0}i.prototype=new n.default,i.prototype.pad=function(e){for(var t=``,n=0,r=this.padding;n<r;n++)t+=` `;return t+=e+`
230
- `,t},i.prototype.Program=function(e){var t=``,n=e.body,r=void 0,i=void 0;if(e.blockParams){var a=`BLOCK PARAMS: [`;for(r=0,i=e.blockParams.length;r<i;r++)a+=` `+e.blockParams[r];a+=` ]`,t+=this.pad(a)}for(r=0,i=n.length;r<i;r++)t+=this.accept(n[r]);return this.padding--,t},i.prototype.MustacheStatement=function(e){return this.pad(`{{ `+this.SubExpression(e)+` }}`)},i.prototype.Decorator=function(e){return this.pad(`{{ DIRECTIVE `+this.SubExpression(e)+` }}`)},i.prototype.BlockStatement=i.prototype.DecoratorBlock=function(e){var t=``;return t+=this.pad((e.type===`DecoratorBlock`?`DIRECTIVE `:``)+`BLOCK:`),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad(`PROGRAM:`),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad(`{{^}}`),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t},i.prototype.PartialStatement=function(e){var t=`PARTIAL:`+e.name.original;return e.params[0]&&(t+=` `+this.accept(e.params[0])),e.hash&&(t+=` `+this.accept(e.hash)),this.pad(`{{> `+t+` }}`)},i.prototype.PartialBlockStatement=function(e){var t=`PARTIAL BLOCK:`+e.name.original;return e.params[0]&&(t+=` `+this.accept(e.params[0])),e.hash&&(t+=` `+this.accept(e.hash)),t+=` `+this.pad(`PROGRAM:`),this.padding++,t+=this.accept(e.program),this.padding--,this.pad(`{{> `+t+` }}`)},i.prototype.ContentStatement=function(e){return this.pad(`CONTENT[ '`+e.value+`' ]`)},i.prototype.CommentStatement=function(e){return this.pad(`{{! '`+e.value+`' }}`)},i.prototype.SubExpression=function(e){for(var t=e.params,n=[],r=void 0,i=0,a=t.length;i<a;i++)n.push(this.accept(t[i]));return t=`[`+n.join(`, `)+`]`,r=e.hash?` `+this.accept(e.hash):``,this.accept(e.path)+` `+t+r},i.prototype.PathExpression=function(e){var t=e.parts.join(`/`);return(e.data?`@`:``)+`PATH:`+t},i.prototype.StringLiteral=function(e){return`"`+e.value+`"`},i.prototype.NumberLiteral=function(e){return`NUMBER{`+e.value+`}`},i.prototype.BooleanLiteral=function(e){return`BOOLEAN{`+e.value+`}`},i.prototype.UndefinedLiteral=function(){return`UNDEFINED`},i.prototype.NullLiteral=function(){return`NULL`},i.prototype.Hash=function(e){for(var t=e.pairs,n=[],r=0,i=t.length;r<i;r++)n.push(this.accept(t[r]));return`HASH{`+n.join(`, `)+`}`},i.prototype.HashPair=function(e){return e.key+`=`+this.accept(e.value)}})),Lp=/* @__PURE__ */ le((/* @__PURE__ */ j(((e,t)=>{var n=Fp().default,r=Ip();n.PrintVisitor=r.PrintVisitor,n.print=r.print,t.exports=n;function i(e,t){var r=ue(`fs`).readFileSync(t,`utf8`);e.exports=n.compile(r)}
225
+ function t(e){return e&&e.__esModule?e:{default:e}}var n=t(vp());function r(e){return new i().accept(e)}function i(){this.padding=0}i.prototype=new n.default,i.prototype.pad=function(e){for(var t=``,n=0,r=this.padding;n<r;n++)t+=` `;return t+=e+`
226
+ `,t},i.prototype.Program=function(e){var t=``,n=e.body,r=void 0,i=void 0;if(e.blockParams){var a=`BLOCK PARAMS: [`;for(r=0,i=e.blockParams.length;r<i;r++)a+=` `+e.blockParams[r];a+=` ]`,t+=this.pad(a)}for(r=0,i=n.length;r<i;r++)t+=this.accept(n[r]);return this.padding--,t},i.prototype.MustacheStatement=function(e){return this.pad(`{{ `+this.SubExpression(e)+` }}`)},i.prototype.Decorator=function(e){return this.pad(`{{ DIRECTIVE `+this.SubExpression(e)+` }}`)},i.prototype.BlockStatement=i.prototype.DecoratorBlock=function(e){var t=``;return t+=this.pad((e.type===`DecoratorBlock`?`DIRECTIVE `:``)+`BLOCK:`),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad(`PROGRAM:`),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad(`{{^}}`),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t},i.prototype.PartialStatement=function(e){var t=`PARTIAL:`+e.name.original;return e.params[0]&&(t+=` `+this.accept(e.params[0])),e.hash&&(t+=` `+this.accept(e.hash)),this.pad(`{{> `+t+` }}`)},i.prototype.PartialBlockStatement=function(e){var t=`PARTIAL BLOCK:`+e.name.original;return e.params[0]&&(t+=` `+this.accept(e.params[0])),e.hash&&(t+=` `+this.accept(e.hash)),t+=` `+this.pad(`PROGRAM:`),this.padding++,t+=this.accept(e.program),this.padding--,this.pad(`{{> `+t+` }}`)},i.prototype.ContentStatement=function(e){return this.pad(`CONTENT[ '`+e.value+`' ]`)},i.prototype.CommentStatement=function(e){return this.pad(`{{! '`+e.value+`' }}`)},i.prototype.SubExpression=function(e){for(var t=e.params,n=[],r=void 0,i=0,a=t.length;i<a;i++)n.push(this.accept(t[i]));return t=`[`+n.join(`, `)+`]`,r=e.hash?` `+this.accept(e.hash):``,this.accept(e.path)+` `+t+r},i.prototype.PathExpression=function(e){var t=e.parts.join(`/`);return(e.data?`@`:``)+`PATH:`+t},i.prototype.StringLiteral=function(e){return`"`+e.value+`"`},i.prototype.NumberLiteral=function(e){return`NUMBER{`+e.value+`}`},i.prototype.BooleanLiteral=function(e){return`BOOLEAN{`+e.value+`}`},i.prototype.UndefinedLiteral=function(){return`UNDEFINED`},i.prototype.NullLiteral=function(){return`NULL`},i.prototype.Hash=function(e){for(var t=e.pairs,n=[],r=0,i=t.length;r<i;r++)n.push(this.accept(t[r]));return`HASH{`+n.join(`, `)+`}`},i.prototype.HashPair=function(e){return e.key+`=`+this.accept(e.value)}})),Rp=/* @__PURE__ */ le((/* @__PURE__ */ j(((e,t)=>{var n=Ip().default,r=Lp();n.PrintVisitor=r.PrintVisitor,n.print=r.print,t.exports=n;function i(e,t){var r=ue(`fs`).readFileSync(t,`utf8`);e.exports=n.compile(r)}
231
227
  /* istanbul ignore else */
232
- ue!==void 0&&ue.extensions&&(ue.extensions[`.handlebars`]=i,ue.extensions[`.hbs`]=i)})))(),1);const Rp=/* @__PURE__ */ new Set([`env`,`gitattributes`,`gitignore`,`prettierignore`]);function zp(e){let t=e.split(s),n=t.pop()?.replace(/\.hbs$/,``)??``;return i.join(...t,Rp.has(n)?`.${n}`:n)}async function Bp(e,t){let n=(await O(e,{recursive:!0})).filter(e=>e.endsWith(`.hbs`));return(await Promise.all(n.map(async n=>{let i=await D(r(e,n),`utf8`);return{path:zp(n),contents:Lp.default.compile(i,{noEscape:!0})(t)}}))).filter(e=>e.contents.trim()!==``)}const Vp=[`@seedcord/eslint-config`,`@seedcord/tsconfig`,`@types/node`,`eslint`,`jiti`,`prettier`,`seedcord`,`typescript@~6.0`,`vite@^8.3.4`],Hp=[`cf@1.0.0-beta.17`,`@cloudflare/vite-plugin@2.0.0-beta.v.0`],Up=[`@discordjs/builders`,`envapt`];function Wp({isGateway:e}){return[...e?[`@seedcord/gateway`,`discord.js`]:[`@seedcord/http`],...Up]}function Gp({isEdge:e}){return e?[...Vp,...Hp]:Vp}async function Kp(e,t){for(let i of t){let t=r(e,i.path);await E(n(t),{recursive:!0}),await ne(t,i.contents,`utf8`)}}async function qp(e,t,n){try{return await e.run(t,n),!0}catch{return!1}}async function Jp(e,t,n){return n.init?await qp(e.steps,`git`,async()=>{await t(`git`,[`init`],e.target),await t(`git`,[`add`,`.`],e.target),await t(`git`,[`commit`,`-m`,`chore: create seedcord bot`],e.target)})?n.notice:`The project is complete and uncommitted.`:(e.steps.skip(`git`),n.notice)}function Yp(e){for(let t of[`install`,`format`,`types`])e.skip(t);return{installed:!1,notices:[],failed:!1}}async function Xp(e,t,n){let{agent:r,steps:i,target:a}=e,o=gf(r,Wp(n),!1),s=gf(r,Gp(n),!0),c=_f(r,[`prettier`,`--write`,`.`]),l=_f(r,[`seedcord`,`codegen`]),u=[],d=e=>{e!==null&&u.push(e)};if(!await qp(i,`install`,async()=>{d(await t(s.command,s.args,a)),d(await t(o.command,o.args,a))}))return i.skip(`format`),i.skip(`types`),{installed:!1,notices:u,failed:!0};let f=await qp(i,`format`,()=>t(c.command,c.args,a)),p=await qp(i,`types`,async()=>{if(await t(l.command,l.args,a),!n.isEdge)return;let e=_f(r,[`cf`,`workers`,`types`]);await t(e.command,e.args,a)});return{installed:!0,notices:u,failed:!f||!p}}async function Zp(e,t,n){let r=await qp(e.steps,`files`,async()=>{await E(e.target,{recursive:!0}),await Kp(e.target,await Bp(e.templatesRoot,t))});return r||(await k(e.target,{recursive:!0,force:!0}),n&&await E(e.target,{recursive:!0})),r}async function Qp(e,t){let{existed:r}=rd(e.target),i=n(e.target);await E(i,{recursive:!0});let a=Vf(await Uf(i),e.answers.git),o=Jf(e.answers,{developerUsername:a.developerUsername,agent:e.agent});if(!await Zp(e,o,r))return{created:!1};let s=e.answers.install?await Xp(e,t,o):Yp(e.steps),c=await Jp(e,t,a);return{created:!0,installed:s.installed,notices:c===null?s.notices:[...s.notices,c],failed:s.failed}}const $p=o(import.meta.dirname,`../templates`);function em(){return c.stdout.columns>0}function tm(){return c.stdin.isTTY&&c.stdout.isTTY&&em()&&!c.env.CI}function nm(e,t){return e?{interactive:!0,prompter:new wu,onAnswer:(e,n)=>t.answer(e,n)}:{interactive:!1}}async function rm(e){let t=c.argv.slice(2);if(Dd(t)){c.stdout.write(`${Fd()}\n`);return}if(Od(t)){c.stdout.write(`${yf}\n`);return}let n=tm();n&&e.header();let r=qf(await Af(Sd,jd(t),nm(n,e))),i=o(c.cwd(),r.directory),a=ff();n&&e.line();let s=await Qp({target:i,templatesRoot:$p,answers:r,agent:a,steps:n?e.stepRows():e.plainSteps()},Jd({verbose:J(t),color:!!c.stdout.isTTY}));if(!s.created){e.nothingCreated(),c.exitCode=1;return}for(let t of s.notices)e.warn(t);n&&await im(e,r,a,s.installed),s.failed&&(c.exitCode=1)}async function im(e,t,n,r){t.transport===`http`&&!await Pf()&&e.warn(Nf(c.platform));let i=Ef(Wf(t));i.length>0&&(e.line(),e.row(`intents`,i)),e.line(),e.row(`next`,Cf(t,{agent:n,installed:r})),e.line();let a=Id(t.token);a!==null&&e.row(`invite`,[I.sky(a)]),e.row(`again`,[I.bold(Df(t,n))]),e.row(`guide`,[I.sky(`https://seedcord.org/guide`)]),e.line(),e.line(I.mute(`A star on GitHub helps more people find seedcord: ${Iu.url.replace(/\.git$/,``)}`)),e.line()}const am=new Q([...Sd.map(e=>e.label),...vf]);try{await Pu(am,()=>rm(am))}catch(e){am.fail(id(e)),c.exitCode=1}export{};
228
+ ue!==void 0&&ue.extensions&&(ue.extensions[`.handlebars`]=i,ue.extensions[`.hbs`]=i)})))(),1);const zp=/* @__PURE__ */ new Set([`env`,`gitattributes`,`gitignore`,`prettierignore`]);function Bp(e){let t=e.split(s),n=t.pop()?.replace(/\.hbs$/,``)??``;return i.join(...t,zp.has(n)?`.${n}`:n)}async function Vp(e,t){let n=(await O(e,{recursive:!0})).filter(e=>e.endsWith(`.hbs`));return(await Promise.all(n.map(async n=>{let i=await D(r(e,n),`utf8`);return{path:Bp(n),contents:Rp.default.compile(i,{noEscape:!0})(t)}}))).filter(e=>e.contents.trim()!==``)}const Hp=[`@seedcord/eslint-config`,`@seedcord/tsconfig`,`@types/node`,`eslint`,`jiti`,`prettier`,`seedcord`,`typescript@~6.0`,`vite@^8.3.4`],Up=[`cf@1.0.0-beta.17`,`@cloudflare/vite-plugin@2.0.0-beta.v.0`],Wp=[`@discordjs/builders`,`envapt`];function Gp({isGateway:e}){return[...e?[`@seedcord/gateway`,`discord.js`]:[`@seedcord/http`],...Wp]}function Kp({isEdge:e}){return e?[...Hp,...Up]:Hp}async function qp(e,t){for(let i of t){let t=r(e,i.path);await E(n(t),{recursive:!0}),await ne(t,i.contents,`utf8`)}}async function Jp(e,t,n){try{return await e.run(t,n),!0}catch{return!1}}async function Yp(e,t,n){return n.init?await Jp(e.steps,`git`,async()=>{await t(`git`,[`init`],e.target),await t(`git`,[`add`,`.`],e.target),await t(`git`,[`commit`,`-m`,`chore: create seedcord bot`],e.target)})?n.notice:`The project is complete and uncommitted.`:(e.steps.skip(`git`),n.notice)}function Xp(e){for(let t of[`install`,`format`,`types`])e.skip(t);return{installed:!1,notices:[],failed:!1}}async function Zp(e,t,n){let{agent:r,steps:i,target:a}=e,o=gf(r,Gp(n),!1),s=gf(r,Kp(n),!0),c=_f(r,[`prettier`,`--write`,`.`]),l=_f(r,[`seedcord`,`codegen`]),u=[],d=e=>{e!==null&&u.push(e)};if(!await Jp(i,`install`,async()=>{d(await t(s.command,s.args,a)),d(await t(o.command,o.args,a))}))return i.skip(`format`),i.skip(`types`),{installed:!1,notices:u,failed:!0};let f=await Jp(i,`format`,()=>t(c.command,c.args,a)),p=await Jp(i,`types`,async()=>{if(await t(l.command,l.args,a),!n.isEdge)return;let e=_f(r,[`cf`,`workers`,`types`]);await t(e.command,e.args,a)});return{installed:!0,notices:u,failed:!f||!p}}async function Qp(e,t,n){let r=await Jp(e.steps,`files`,async()=>{await E(e.target,{recursive:!0}),await qp(e.target,await Vp(e.templatesRoot,t))});return r||(await k(e.target,{recursive:!0,force:!0}),n&&await E(e.target,{recursive:!0})),r}async function $p(e,t){let{existed:r}=rd(e.target),i=n(e.target);await E(i,{recursive:!0});let a=Vf(await Uf(i),e.answers.git),o=Jf(e.answers,{developerUsername:a.developerUsername,agent:e.agent});if(!await Qp(e,o,r))return{created:!1};let s=e.answers.install?await Zp(e,t,o):Xp(e.steps),c=await Yp(e,t,a);return{created:!0,installed:s.installed,notices:c===null?s.notices:[...s.notices,c],failed:s.failed}}const em=o(import.meta.dirname,`../templates`);function tm(){return c.stdout.columns>0}function nm(){return c.stdin.isTTY&&c.stdout.isTTY&&tm()&&!c.env.CI}function rm(e,t){return e?{interactive:!0,prompter:new wu,onAnswer:(e,n)=>t.answer(e,n)}:{interactive:!1}}async function im(e){let t=c.argv.slice(2);if(Dd(t)){c.stdout.write(`${Fd()}\n`);return}if(Od(t)){c.stdout.write(`${yf}\n`);return}let n=nm();n&&e.header();let r=qf(await Af(Sd,jd(t),rm(n,e))),i=o(c.cwd(),r.directory),a=ff();n&&e.line();let s=await $p({target:i,templatesRoot:em,answers:r,agent:a,steps:n?e.stepRows():e.plainSteps()},Jd({verbose:J(t),color:!!c.stdout.isTTY}));if(!s.created){e.nothingCreated(),c.exitCode=1;return}for(let t of s.notices)e.warn(t);n&&await am(e,r,a,s.installed),s.failed&&(c.exitCode=1)}async function am(e,t,n,r){t.transport===`http`&&!await Pf()&&e.warn(Nf(c.platform));let i=Ef(Wf(t));i.length>0&&(e.line(),e.row(`intents`,i)),e.line(),e.row(`next`,Cf(t,{agent:n,installed:r})),e.line();let a=Id(t.token);a!==null&&e.row(`invite`,[I.sky(a)]),e.row(`again`,[I.bold(Df(t,n))]),e.row(`guide`,[I.sky(`https://seedcord.org/guide`)]),e.line(),e.line(I.mute(`A star on GitHub helps more people find seedcord: ${Iu.url.replace(/\.git$/,``)}`)),e.line()}const om=new Q([...Sd.map(e=>e.label),...vf]);try{await Pu(om,()=>im(om))}catch(e){om.fail(id(e)),c.exitCode=1}export{};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-seedcord",
3
3
  "type": "module",
4
- "version": "0.5.0-next.0",
4
+ "version": "0.5.0",
5
5
  "description": "Scaffold a new seedcord bot",
6
6
  "keywords": [
7
7
  "discord",
@@ -12,7 +12,7 @@
12
12
  "starter"
13
13
  ],
14
14
  "engines": {
15
- "node": ">=24.11",
15
+ "node": "^24.22.1 || >=26.12.1",
16
16
  "bun": ">=1.4.2"
17
17
  },
18
18
  "bin": {
@@ -40,15 +40,15 @@
40
40
  "LICENSE"
41
41
  ],
42
42
  "devDependencies": {
43
- "@seedcord/cli-prompts": "^0.0.2-next.0",
44
- "@seedcord/errors": "^0.14.0-next.0",
45
- "@seedcord/eslint-config": "^2.5.1-next.0",
46
- "@seedcord/tsconfig": "^2.0.7-next.0",
43
+ "@seedcord/cli-prompts": "^0.0.2",
44
+ "@seedcord/errors": "^0.14.0",
45
+ "@seedcord/eslint-config": "^3.0.0",
46
+ "@seedcord/tsconfig": "^3.0.0",
47
47
  "@seedcord/tsdown-config": "^2.0.1",
48
- "@seedcord/types": "^0.15.0-next.0",
48
+ "@seedcord/types": "^0.15.0",
49
49
  "@seedcord/vitest-config": "^0.0.1",
50
50
  "discord.js": "^14.27.0",
51
- "handlebars": "^4.7.9",
51
+ "handlebars": "^4.7.10",
52
52
  "package-manager-detector": "^1.8.0",
53
53
  "tsx": "^4.23.15",
54
54
  "typescript": "^6.0.3"