@cline/cli-linux-arm64 3.0.71 → 3.0.72-nightly.1792153337
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cline +2 -2
- package/cline-hub/webview/assets/{Chat-isxvWEr4.js → Chat-BhcO3lxR.js} +6 -6
- package/cline-hub/webview/assets/{extensions-view-4Ay936b8.js → extensions-view-CcwDTH9q.js} +1 -1
- package/cline-hub/webview/assets/{highlighted-body-KPVGNVTW-Cf7e-dcI.js → highlighted-body-KPVGNVTW-D19paMBO.js} +1 -1
- package/cline-hub/webview/assets/{index-C4VrPGLg.js → index-DlpuYMzW.js} +2 -2
- package/cline-hub/webview/assets/{label-EH6r5p0T.js → label-DFsbx3OI.js} +2 -2
- package/cline-hub/webview/assets/mermaid-HWGCJPDP-C7YHt7l6.js +1 -0
- package/cline-hub/webview/assets/{settings-view-DYxyo5TV.js → settings-view-DEIwhwkV.js} +1 -1
- package/cline-hub/webview/index.html +1 -1
- package/extensions/plugin-sandbox-bootstrap.js +3 -3
- package/package.json +1 -1
- package/cline-hub/webview/assets/mermaid-HWGCJPDP-DjECNyFk.js +0 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Cline Hub</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-DlpuYMzW.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-B0Z9INg1.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/bundle-mjs-CyB9GzWm.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="./assets/vscode-CFosRdBr.js">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as ah}from"node:module";var Xd=Object.create;var{getPrototypeOf:Qd,defineProperty:Di,getOwnPropertyNames:eh}=Object;var ia=Object.prototype.hasOwnProperty;function th(u){return this[u]}var nh,rh,Ni=(u,v,D)=>{var M=u!=null&&typeof u==="object";if(M){var I=v?nh??=new WeakMap:rh??=new WeakMap,e=I.get(u);if(e)return e}D=u!=null?Xd(Qd(u)):{};let g=v||!u||!u.__esModule||!ia.call(u,"default")?Di(D,"default",{value:u,enumerable:!0}):D;if(u&&typeof u==="object"||typeof u==="function"){for(let s of eh(u))if(!ia.call(g,s))Di(g,s,{get:th.bind(u,s),enumerable:!0})}if(M)I.set(u,g);return g};var oa=(u,v)=>()=>(v||u((v={exports:{}}).exports,v),v.exports);var sh=(u)=>u;function ih(u,v){this[u]=sh.bind(null,v)}var oh=(u,v)=>{for(var D in v)Di(u,D,{get:v[D],enumerable:!0,configurable:!0,set:ih.bind(v,D)})};var aa=(u,v,D)=>()=>{if(u)try{v=u(u=0)}catch(M){D=[M]}if(D)throw D[0];return v};var yn=ah(import.meta.url);var _o=oa(function(
|
|
1
|
+
import{createRequire as ah}from"node:module";var Xd=Object.create;var{getPrototypeOf:Qd,defineProperty:Di,getOwnPropertyNames:eh}=Object;var ia=Object.prototype.hasOwnProperty;function th(u){return this[u]}var nh,rh,Ni=(u,v,D)=>{var M=u!=null&&typeof u==="object";if(M){var I=v?nh??=new WeakMap:rh??=new WeakMap,e=I.get(u);if(e)return e}D=u!=null?Xd(Qd(u)):{};let g=v||!u||!u.__esModule||!ia.call(u,"default")?Di(D,"default",{value:u,enumerable:!0}):D;if(u&&typeof u==="object"||typeof u==="function"){for(let s of eh(u))if(!ia.call(g,s))Di(g,s,{get:th.bind(u,s),enumerable:!0})}if(M)I.set(u,g);return g};var oa=(u,v)=>()=>(v||u((v={exports:{}}).exports,v),v.exports);var sh=(u)=>u;function ih(u,v){this[u]=sh.bind(null,v)}var oh=(u,v)=>{for(var D in v)Di(u,D,{get:v[D],enumerable:!0,configurable:!0,set:ih.bind(v,D)})};var aa=(u,v,D)=>()=>{if(u)try{v=u(u=0)}catch(M){D=[M]}if(D)throw D[0];return v};var yn=ah(import.meta.url);var _o=oa(function(mP,Qu){(()=>{var u={"./node_modules/.pnpm/mlly@1.8.2/node_modules/mlly/dist lazy recursive"(I){function e(g){return Promise.resolve().then(function(){var s=Error("Cannot find module '"+g+"'");throw s.code="MODULE_NOT_FOUND",s})}e.keys=()=>[],e.resolve=e,e.id="./node_modules/.pnpm/mlly@1.8.2/node_modules/mlly/dist lazy recursive",I.exports=e},fs(I){I.exports=yn("fs")},"node:fs"(I){I.exports=yn("node:fs")},"node:module"(I){I.exports=yn("node:module")},"node:path"(I){I.exports=yn("node:path")},os(I){I.exports=yn("os")},path(I){I.exports=yn("path")},"./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"(I,e,g){var s=Object.defineProperty,o=(oe,fe)=>s(oe,"name",{value:fe,configurable:!0}),l=g("node:path"),t=g("node:fs"),n=g("node:module"),y=g("./node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.cjs"),k=g("fs"),A=g("os"),S=g("path");function f(oe){return oe.startsWith("\\\\?\\")?oe:oe.replace(/\\/g,"/")}o(f,"slash");let m=o((oe)=>{let fe=t[oe];return(Fe,...ge)=>{let Ze=`${oe}:${ge.join(":")}`,Xe=Fe==null?void 0:Fe.get(Ze);return Xe===void 0&&(Xe=Reflect.apply(fe,t,ge),Fe==null||Fe.set(Ze,Xe)),Xe}},"cacheFs"),d=m("existsSync"),p=m("readFileSync"),b=m("statSync"),_=o((oe,fe,Fe)=>{for(;;){let ge=l.posix.join(oe,fe);if(d(Fe,ge))return ge;let Ze=l.dirname(oe);if(Ze===oe)return;oe=Ze}},"findUp"),E=/^\.{1,2}(\/.*)?$/,x=o((oe)=>{let fe=f(oe);return E.test(fe)?fe:`./${fe}`},"normalizeRelativePath");function P(oe,fe=!1){let Fe=oe.length,ge=0,Ze="",Xe=0,Je=16,xt=0,Et=0,Pt=0,$t=0,Rt=0;function rn(gt,on){let _n=0,Xt=0;for(;_n<gt;){let Mt=oe.charCodeAt(ge);if(Mt>=48&&Mt<=57)Xt=16*Xt+Mt-48;else if(Mt>=65&&Mt<=70)Xt=16*Xt+Mt-65+10;else{if(!(Mt>=97&&Mt<=102))break;Xt=16*Xt+Mt-97+10}ge++,_n++}return _n<gt&&(Xt=-1),Xt}function ht(gt){ge=gt,Ze="",Xe=0,Je=16,Rt=0}function en(){let gt=ge;if(oe.charCodeAt(ge)===48)ge++;else for(ge++;ge<oe.length&&Y(oe.charCodeAt(ge));)ge++;if(ge<oe.length&&oe.charCodeAt(ge)===46){if(ge++,!(ge<oe.length&&Y(oe.charCodeAt(ge))))return Rt=3,oe.substring(gt,ge);for(ge++;ge<oe.length&&Y(oe.charCodeAt(ge));)ge++}let on=ge;if(ge<oe.length&&(oe.charCodeAt(ge)===69||oe.charCodeAt(ge)===101))if(ge++,(ge<oe.length&&oe.charCodeAt(ge)===43||oe.charCodeAt(ge)===45)&&ge++,ge<oe.length&&Y(oe.charCodeAt(ge))){for(ge++;ge<oe.length&&Y(oe.charCodeAt(ge));)ge++;on=ge}else Rt=3;return oe.substring(gt,on)}function Jt(){let gt="",on=ge;for(;;){if(ge>=Fe){gt+=oe.substring(on,ge),Rt=2;break}let _n=oe.charCodeAt(ge);if(_n===34){gt+=oe.substring(on,ge),ge++;break}if(_n!==92){if(_n>=0&&_n<=31){if(R(_n)){gt+=oe.substring(on,ge),Rt=2;break}Rt=6}ge++}else{if(gt+=oe.substring(on,ge),ge++,ge>=Fe){Rt=2;break}switch(oe.charCodeAt(ge++)){case 34:gt+='"';break;case 92:gt+="\\";break;case 47:gt+="/";break;case 98:gt+="\b";break;case 102:gt+="\f";break;case 110:gt+=`
|
|
2
2
|
`;break;case 114:gt+="\r";break;case 116:gt+="\t";break;case 117:let Xt=rn(4);Xt>=0?gt+=String.fromCharCode(Xt):Rt=4;break;default:Rt=5}on=ge}}return gt}function Yt(){if(Ze="",Rt=0,Xe=ge,Et=xt,$t=Pt,ge>=Fe)return Xe=Fe,Je=17;let gt=oe.charCodeAt(ge);if(w(gt)){do ge++,Ze+=String.fromCharCode(gt),gt=oe.charCodeAt(ge);while(w(gt));return Je=15}if(R(gt))return ge++,Ze+=String.fromCharCode(gt),gt===13&&oe.charCodeAt(ge)===10&&(ge++,Ze+=`
|
|
3
3
|
`),xt++,Pt=ge,Je=14;switch(gt){case 123:return ge++,Je=1;case 125:return ge++,Je=2;case 91:return ge++,Je=3;case 93:return ge++,Je=4;case 58:return ge++,Je=6;case 44:return ge++,Je=5;case 34:return ge++,Ze=Jt(),Je=10;case 47:let on=ge-1;if(oe.charCodeAt(ge+1)===47){for(ge+=2;ge<Fe&&!R(oe.charCodeAt(ge));)ge++;return Ze=oe.substring(on,ge),Je=12}if(oe.charCodeAt(ge+1)===42){ge+=2;let _n=Fe-1,Xt=!1;for(;ge<_n;){let Mt=oe.charCodeAt(ge);if(Mt===42&&oe.charCodeAt(ge+1)===47){ge+=2,Xt=!0;break}ge++,R(Mt)&&(Mt===13&&oe.charCodeAt(ge)===10&&ge++,xt++,Pt=ge)}return Xt||(ge++,Rt=1),Ze=oe.substring(on,ge),Je=13}return Ze+=String.fromCharCode(gt),ge++,Je=16;case 45:if(Ze+=String.fromCharCode(gt),ge++,ge===Fe||!Y(oe.charCodeAt(ge)))return Je=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Ze+=en(),Je=11;default:for(;ge<Fe&&Pn(gt);)ge++,gt=oe.charCodeAt(ge);if(Xe!==ge){switch(Ze=oe.substring(Xe,ge),Ze){case"true":return Je=8;case"false":return Je=9;case"null":return Je=7}return Je=16}return Ze+=String.fromCharCode(gt),ge++,Je=16}}function Pn(gt){if(w(gt)||R(gt))return!1;switch(gt){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function dn(){let gt;do gt=Yt();while(gt>=12&><=15);return gt}return o(rn,"scanHexDigits"),o(ht,"setPosition"),o(en,"scanNumber"),o(Jt,"scanString"),o(Yt,"scanNext"),o(Pn,"isUnknownContentCharacter"),o(dn,"scanNextNonTrivia"),{setPosition:ht,getPosition:o(()=>ge,"getPosition"),scan:fe?dn:Yt,getToken:o(()=>Je,"getToken"),getTokenValue:o(()=>Ze,"getTokenValue"),getTokenOffset:o(()=>Xe,"getTokenOffset"),getTokenLength:o(()=>ge-Xe,"getTokenLength"),getTokenStartLine:o(()=>Et,"getTokenStartLine"),getTokenStartCharacter:o(()=>Xe-$t,"getTokenStartCharacter"),getTokenError:o(()=>Rt,"getTokenError")}}function w(oe){return oe===32||oe===9}function R(oe){return oe===10||oe===13}function Y(oe){return oe>=48&&oe<=57}var z,F;o(P,"createScanner"),o(w,"isWhiteSpace"),o(R,"isLineBreak"),o(Y,"isDigit"),(F=z||(z={}))[F.lineFeed=10]="lineFeed",F[F.carriageReturn=13]="carriageReturn",F[F.space=32]="space",F[F._0=48]="_0",F[F._1=49]="_1",F[F._2=50]="_2",F[F._3=51]="_3",F[F._4=52]="_4",F[F._5=53]="_5",F[F._6=54]="_6",F[F._7=55]="_7",F[F._8=56]="_8",F[F._9=57]="_9",F[F.a=97]="a",F[F.b=98]="b",F[F.c=99]="c",F[F.d=100]="d",F[F.e=101]="e",F[F.f=102]="f",F[F.g=103]="g",F[F.h=104]="h",F[F.i=105]="i",F[F.j=106]="j",F[F.k=107]="k",F[F.l=108]="l",F[F.m=109]="m",F[F.n=110]="n",F[F.o=111]="o",F[F.p=112]="p",F[F.q=113]="q",F[F.r=114]="r",F[F.s=115]="s",F[F.t=116]="t",F[F.u=117]="u",F[F.v=118]="v",F[F.w=119]="w",F[F.x=120]="x",F[F.y=121]="y",F[F.z=122]="z",F[F.A=65]="A",F[F.B=66]="B",F[F.C=67]="C",F[F.D=68]="D",F[F.E=69]="E",F[F.F=70]="F",F[F.G=71]="G",F[F.H=72]="H",F[F.I=73]="I",F[F.J=74]="J",F[F.K=75]="K",F[F.L=76]="L",F[F.M=77]="M",F[F.N=78]="N",F[F.O=79]="O",F[F.P=80]="P",F[F.Q=81]="Q",F[F.R=82]="R",F[F.S=83]="S",F[F.T=84]="T",F[F.U=85]="U",F[F.V=86]="V",F[F.W=87]="W",F[F.X=88]="X",F[F.Y=89]="Y",F[F.Z=90]="Z",F[F.asterisk=42]="asterisk",F[F.backslash=92]="backslash",F[F.closeBrace=125]="closeBrace",F[F.closeBracket=93]="closeBracket",F[F.colon=58]="colon",F[F.comma=44]="comma",F[F.dot=46]="dot",F[F.doubleQuote=34]="doubleQuote",F[F.minus=45]="minus",F[F.openBrace=123]="openBrace",F[F.openBracket=91]="openBracket",F[F.plus=43]="plus",F[F.slash=47]="slash",F[F.formFeed=12]="formFeed",F[F.tab=9]="tab",Array(20).fill(0).map((oe,fe)=>" ".repeat(fe));let X=200;var le,ee,G;function j(oe,fe=[],Fe=le.DEFAULT){let ge=null,Ze=[],Xe=[];function Je(xt){Array.isArray(Ze)?Ze.push(xt):ge!==null&&(Ze[ge]=xt)}return o(Je,"onValue"),Z(oe,{onObjectBegin:o(()=>{let xt={};Je(xt),Xe.push(Ze),Ze=xt,ge=null},"onObjectBegin"),onObjectProperty:o((xt)=>{ge=xt},"onObjectProperty"),onObjectEnd:o(()=>{Ze=Xe.pop()},"onObjectEnd"),onArrayBegin:o(()=>{let xt=[];Je(xt),Xe.push(Ze),Ze=xt,ge=null},"onArrayBegin"),onArrayEnd:o(()=>{Ze=Xe.pop()},"onArrayEnd"),onLiteralValue:Je,onError:o((xt,Et,Pt)=>{fe.push({error:xt,offset:Et,length:Pt})},"onError")},Fe),Ze[0]}function Z(oe,fe,Fe=le.DEFAULT){let ge=P(oe,!1),Ze=[],Xe=0;function Je(st){return st?()=>Xe===0&&st(ge.getTokenOffset(),ge.getTokenLength(),ge.getTokenStartLine(),ge.getTokenStartCharacter()):()=>!0}function xt(st){return st?(it)=>Xe===0&&st(it,ge.getTokenOffset(),ge.getTokenLength(),ge.getTokenStartLine(),ge.getTokenStartCharacter()):()=>!0}function Et(st){return st?(it)=>Xe===0&&st(it,ge.getTokenOffset(),ge.getTokenLength(),ge.getTokenStartLine(),ge.getTokenStartCharacter(),()=>Ze.slice()):()=>!0}function Pt(st){return st?()=>{Xe>0?Xe++:st(ge.getTokenOffset(),ge.getTokenLength(),ge.getTokenStartLine(),ge.getTokenStartCharacter(),()=>Ze.slice())===!1&&(Xe=1)}:()=>!0}function $t(st){return st?()=>{Xe>0&&Xe--,Xe===0&&st(ge.getTokenOffset(),ge.getTokenLength(),ge.getTokenStartLine(),ge.getTokenStartCharacter())}:()=>!0}o(Je,"toNoArgVisit"),o(xt,"toOneArgVisit"),o(Et,"toOneArgVisitWithPath"),o(Pt,"toBeginVisit"),o($t,"toEndVisit");let Rt=Pt(fe.onObjectBegin),rn=Et(fe.onObjectProperty),ht=$t(fe.onObjectEnd),en=Pt(fe.onArrayBegin),Jt=$t(fe.onArrayEnd),Yt=Et(fe.onLiteralValue),Pn=xt(fe.onSeparator),dn=Je(fe.onComment),gt=xt(fe.onError),on=Fe&&Fe.disallowComments,_n=Fe&&Fe.allowTrailingComma;function Xt(){for(;;){let st=ge.scan();switch(ge.getTokenError()){case 4:Mt(14);break;case 5:Mt(15);break;case 3:Mt(13);break;case 1:on||Mt(11);break;case 2:Mt(12);break;case 6:Mt(16)}switch(st){case 12:case 13:on?Mt(10):dn();break;case 16:Mt(1);break;case 15:case 14:break;default:return st}}}function Mt(st,it=[],It=[]){if(gt(st),it.length+It.length>0){let Dt=ge.getToken();for(;Dt!==17;){if(it.indexOf(Dt)!==-1){Xt();break}if(It.indexOf(Dt)!==-1)break;Dt=Xt()}}}function rr(st){let it=ge.getTokenValue();return st?Yt(it):(rn(it),Ze.push(it)),Xt(),!0}function Qn(){switch(ge.getToken()){case 11:let st=ge.getTokenValue(),it=Number(st);isNaN(it)&&(Mt(2),it=0),Yt(it);break;case 7:Yt(null);break;case 8:Yt(!0);break;case 9:Yt(!1);break;default:return!1}return Xt(),!0}function lr(){return ge.getToken()!==10?(Mt(3,[],[2,5]),!1):(rr(!1),ge.getToken()===6?(Pn(":"),Xt(),Kn()||Mt(4,[],[2,5])):Mt(5,[],[2,5]),Ze.pop(),!0)}function er(){Rt(),Xt();let st=!1;for(;ge.getToken()!==2&&ge.getToken()!==17;){if(ge.getToken()===5){if(st||Mt(4,[],[]),Pn(","),Xt(),ge.getToken()===2&&_n)break}else st&&Mt(6,[],[]);lr()||Mt(4,[],[2,5]),st=!0}return ht(),ge.getToken()!==2?Mt(7,[2],[]):Xt(),!0}function pr(){en(),Xt();let st=!0,it=!1;for(;ge.getToken()!==4&&ge.getToken()!==17;){if(ge.getToken()===5){if(it||Mt(4,[],[]),Pn(","),Xt(),ge.getToken()===4&&_n)break}else it&&Mt(6,[],[]);st?(Ze.push(0),st=!1):Ze[Ze.length-1]++,Kn()||Mt(4,[],[4,5]),it=!0}return Jt(),st||Ze.pop(),ge.getToken()!==4?Mt(8,[4],[]):Xt(),!0}function Kn(){switch(ge.getToken()){case 3:return pr();case 1:return er();case 10:return rr(!0);default:return Qn()}}return o(Xt,"scanNext"),o(Mt,"handleError"),o(rr,"parseString"),o(Qn,"parseLiteral"),o(lr,"parseProperty"),o(er,"parseObject"),o(pr,"parseArray"),o(Kn,"parseValue"),Xt(),ge.getToken()===17?!!Fe.allowEmptyContent||(Mt(4,[],[]),!1):Kn()?(ge.getToken()!==17&&Mt(9,[],[]),!0):(Mt(4,[],[]),!1)}Array(X).fill(0).map((oe,fe)=>`
|
|
4
4
|
`+" ".repeat(fe)),Array(X).fill(0).map((oe,fe)=>"\r"+" ".repeat(fe)),Array(X).fill(0).map((oe,fe)=>`\r
|
|
@@ -17,7 +17,7 @@ Defaulting to 2020, but this will stop working in the future.`)),C.ecmaVersion=1
|
|
|
17
17
|
Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function te(i){try{return(0,Mt.statSync)(i)}catch{}}function Ee(i){let C=(0,Mt.statSync)(i,{throwIfNoEntry:!1}),L=C?C.isFile():void 0;return L!=null&&L}function ze(i,C,L){let V;if(C.main!==void 0){if(V=new URL(C.main,i),Ee(V))return V;let Ce=[`./${C.main}.js`,`./${C.main}.json`,`./${C.main}.node`,`./${C.main}/index.js`,`./${C.main}/index.json`,`./${C.main}/index.node`],Re=-1;for(;++Re<Ce.length&&(V=new URL(Ce[Re],i),!Ee(V));)V=void 0;if(V)return K(V,i,L,C.main),V}let ie=["./index.js","./index.json","./index.node"],_e=-1;for(;++_e<ie.length&&(V=new URL(ie[_e],i),!Ee(V));)V=void 0;if(V)return K(V,i,L,C.main),V;throw new lt(qt.fileURLToPath(new URL(".",i)),qt.fileURLToPath(L))}function Ge(i,C,L){return new At(qt.fileURLToPath(new URL(".",C)),i,L&&qt.fileURLToPath(L))}function nt(i,C,L,V,ie){return C=typeof C=="object"&&C!==null?JSON.stringify(C,null,""):`${C}`,new ke(qt.fileURLToPath(new URL(".",L)),i,C,V,ie&&qt.fileURLToPath(ie))}function wt(i,C,L,V,ie,_e,Ce,Re,Qe){if(C!==""&&!_e&&i[i.length-1]!=="/")throw nt(L,i,V,Ce,ie);if(!i.startsWith("./")){if(Ce&&!i.startsWith("../")&&!i.startsWith("/")){let St=!1;try{new URL(i),St=!0}catch{}if(!St)return hr(_e?pe.call(kr,i,()=>C):i+C,V,Qe)}throw nt(L,i,V,Ce,ie)}if(Qt.exec(i.slice(2))!==null){if(Tn.exec(i.slice(2))!==null)throw nt(L,i,V,Ce,ie);if(!Re){let St=_e?L.replace("*",()=>C):L+C;N(_e?pe.call(kr,i,()=>C):i,St,L,V,Ce,ie,!0)}}let ut=new URL(i,V),pt=ut.pathname,Ct=new URL(".",V).pathname;if(!pt.startsWith(Ct))throw nt(L,i,V,Ce,ie);if(C==="")return ut;if(Qt.exec(C)!==null){let St=_e?L.replace("*",()=>C):L+C;if(Tn.exec(C)===null){if(!Re)N(_e?pe.call(kr,i,()=>C):i,St,L,V,Ce,ie,!1)}else(function(Zt,vn,Hn,ln,En){let sn=`request is not a valid match in pattern "${vn}" for the "${ln?"imports":"exports"}" resolution of ${qt.fileURLToPath(Hn)}`;throw new be(Zt,sn,En&&qt.fileURLToPath(En))})(St,L,V,Ce,ie)}return _e?new URL(pe.call(kr,ut.href,()=>C)):new URL(C,ut)}function Bt(i){let C=Number(i);return`${C}`===i&&(C>=0&&C<4294967295)}function Gt(i,C,L,V,ie,_e,Ce,Re,Qe){if(typeof C=="string")return wt(C,L,V,i,ie,_e,Ce,Re,Qe);if(Array.isArray(C)){let ut=C;if(ut.length===0)return null;let pt,Ct=-1;for(;++Ct<ut.length;){let St=ut[Ct],Zt;try{Zt=Gt(i,St,L,V,ie,_e,Ce,Re,Qe)}catch(vn){if(pt=vn,vn.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw vn}if(Zt!==void 0){if(Zt!==null)return Zt;pt=null}}if(pt==null)return null;throw pt}if(typeof C=="object"&&C!==null){let ut=Object.getOwnPropertyNames(C),pt=-1;for(;++pt<ut.length;)if(Bt(ut[pt]))throw new Ie(qt.fileURLToPath(i),ie,'"exports" cannot contain numeric property keys.');for(pt=-1;++pt<ut.length;){let Ct=ut[pt];if(Ct==="default"||Qe&&Qe.has(Ct)){let St=Gt(i,C[Ct],L,V,ie,_e,Ce,Re,Qe);if(St===void 0)continue;return St}}return null}if(C===null)return null;throw nt(V,C,i,Ce,ie)}function fn(i,C,L){if(On.noDeprecation)return;let V=qt.fileURLToPath(C);Hs.has(V+"|"+i)||(Hs.add(V+"|"+i),On.emitWarning(`Use of deprecated trailing slash pattern mapping "${i}" in the "exports" field module resolution of the package at ${V}${L?` imported from ${qt.fileURLToPath(L)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function In(i,C,L,V,ie){let _e=L.exports;if(function(pt,Ct,St){if(typeof pt=="string"||Array.isArray(pt))return!0;if(typeof pt!="object"||pt===null)return!1;let Zt=Object.getOwnPropertyNames(pt),vn=!1,Hn=0,ln=-1;for(;++ln<Zt.length;){let En=Zt[ln],sn=En===""||En[0]!==".";if(Hn++===0)vn=sn;else if(vn!==sn)throw new Ie(qt.fileURLToPath(Ct),St,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return vn}(_e,i,V)&&(_e={".":_e}),mn.call(_e,C)&&!C.includes("*")&&!C.endsWith("/")){let pt=Gt(i,_e[C],"",C,V,!1,!1,!1,ie);if(pt==null)throw Ge(C,i,V);return pt}let Ce="",Re="",Qe=Object.getOwnPropertyNames(_e),ut=-1;for(;++ut<Qe.length;){let pt=Qe[ut],Ct=pt.indexOf("*");if(Ct!==-1&&C.startsWith(pt.slice(0,Ct))){C.endsWith("/")&&fn(C,i,V);let St=pt.slice(Ct+1);C.length>=pt.length&&C.endsWith(St)&&Vn(Ce,pt)===1&&pt.lastIndexOf("*")===Ct&&(Ce=pt,Re=C.slice(Ct,C.length-St.length))}}if(Ce){let pt=Gt(i,_e[Ce],Re,Ce,V,!0,!1,C.endsWith("/"),ie);if(pt==null)throw Ge(C,i,V);return pt}throw Ge(C,i,V)}function Vn(i,C){let L=i.indexOf("*"),V=C.indexOf("*"),ie=L===-1?i.length:L+1,_e=V===-1?C.length:V+1;return ie>_e?-1:_e>ie||L===-1?1:V===-1||i.length>C.length?-1:C.length>i.length?1:0}function vr(i,C,L){if(i==="#"||i.startsWith("#/")||i.endsWith("/"))throw new be(i,"is not a valid internal imports specifier name",qt.fileURLToPath(C));let V,ie=Ir(C);if(ie.exists){V=qt.pathToFileURL(ie.pjsonPath);let _e=ie.imports;if(_e)if(mn.call(_e,i)&&!i.includes("*")){let Ce=Gt(V,_e[i],"",i,C,!1,!0,!1,L);if(Ce!=null)return Ce}else{let Ce="",Re="",Qe=Object.getOwnPropertyNames(_e),ut=-1;for(;++ut<Qe.length;){let pt=Qe[ut],Ct=pt.indexOf("*");if(Ct!==-1&&i.startsWith(pt.slice(0,-1))){let St=pt.slice(Ct+1);i.length>=pt.length&&i.endsWith(St)&&Vn(Ce,pt)===1&&pt.lastIndexOf("*")===Ct&&(Ce=pt,Re=i.slice(Ct,i.length-St.length))}}if(Ce){let pt=Gt(V,_e[Ce],Re,Ce,C,!0,!0,!1,L);if(pt!=null)return pt}}}throw function(_e,Ce,Re){return new Tt(_e,Ce&&qt.fileURLToPath(new URL(".",Ce)),qt.fileURLToPath(Re))}(i,V,C)}function hr(i,C,L){if(Xt.builtinModules.includes(i))return new URL("node:"+i);let{packageName:V,packageSubpath:ie,isScoped:_e}=function(pt,Ct){let St=pt.indexOf("/"),Zt=!0,vn=!1;pt[0]==="@"&&(vn=!0,St===-1||pt.length===0?Zt=!1:St=pt.indexOf("/",St+1));let Hn=St===-1?pt:pt.slice(0,St);if($n.exec(Hn)!==null&&(Zt=!1),!Zt)throw new be(pt,"is not a valid package name",qt.fileURLToPath(Ct));return{packageName:Hn,packageSubpath:"."+(St===-1?"":pt.slice(St)),isScoped:vn}}(i,C),Ce=Ir(C);if(Ce.exists){let pt=qt.pathToFileURL(Ce.pjsonPath);if(Ce.name===V&&Ce.exports!==void 0&&Ce.exports!==null)return In(pt,ie,Ce,C,L)}let Re,Qe=new URL("./node_modules/"+V+"/package.json",C),ut=qt.fileURLToPath(Qe);do{let pt=te(ut.slice(0,-13));if(!pt||!pt.isDirectory()){Re=ut,Qe=new URL((_e?"../../../../node_modules/":"../../../node_modules/")+V+"/package.json",Qe),ut=qt.fileURLToPath(Qe);continue}let Ct=Ur(ut,{base:C,specifier:i});return Ct.exports!==void 0&&Ct.exports!==null?In(Qe,ie,Ct,C,L):ie==="."?ze(Qe,Ct,C):new URL(ie,Qe)}while(ut.length!==Re.length)}function mr(i,C,L,V){L===void 0&&(L=Q());let ie=C.protocol,_e=ie==="data:"||ie==="http:"||ie==="https:",Ce;if(function(Re){return Re!==""&&(Re[0]==="/"||function(Qe){if(Qe[0]==="."){if(Qe.length===1||Qe[1]==="/")return!0;if(Qe[1]==="."&&(Qe.length===2||Qe[2]==="/"))return!0}return!1}(Re))}(i))try{Ce=new URL(i,C)}catch(Re){let Qe=new pn(i,C);throw Qe.cause=Re,Qe}else if(ie==="file:"&&i[0]==="#")Ce=vr(i,C,L);else try{Ce=new URL(i)}catch(Re){if(_e&&!Xt.builtinModules.includes(i)){let Qe=new pn(i,C);throw Qe.cause=Re,Qe}Ce=hr(i,C,L)}return Dn.ok(Ce!==void 0,"expected to be defined"),Ce.protocol!=="file:"?Ce:function(Re,Qe){if(Zr.exec(Re.pathname)!==null)throw new be(Re.pathname,'must not include encoded "/" or "\\" characters',qt.fileURLToPath(Qe));let ut;try{ut=qt.fileURLToPath(Re)}catch(Ct){let St=Ct;throw Object.defineProperty(St,"input",{value:String(Re)}),Object.defineProperty(St,"module",{value:String(Qe)}),St}let pt=te(ut.endsWith("/")?ut.slice(-1):ut);if(pt&&pt.isDirectory()){let Ct=new jt(ut,qt.fileURLToPath(Qe));throw Ct.url=String(Re),Ct}if(!pt||!pt.isFile()){let Ct=new lt(ut||Re.pathname,Qe&&qt.fileURLToPath(Qe),!0);throw Ct.url=String(Re),Ct}{let Ct=(0,Mt.realpathSync)(ut),{search:St,hash:Zt}=Re;(Re=qt.pathToFileURL(Ct+(ut.endsWith(ur.sep)?"/":""))).search=St,Re.hash=Zt}return Re}(Ce,C)}function sr(i){return typeof i!="string"||i.startsWith("file://")?nn(qt.fileURLToPath(i)):nn(i)}function Vt(i){return qt.pathToFileURL(sr(i)).toString()}let bn=new Set(["node","import"]),Sn=[".mjs",".cjs",".js",".json"],ir=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function Gn(i,C,L){try{return mr(i,C,L)}catch(V){if(!ir.has(V?.code))throw V}}function us(i,C={}){if(typeof i!="string"){if(!(i instanceof URL))throw TypeError("input must be a `string` or `URL`");i=sr(i)}if(/(?:node|data|http|https):/.test(i))return i;if(br.has(i))return"node:"+i;if(i.startsWith("file://")&&(i=sr(i)),Ht(i))try{if((0,Mt.statSync)(i).isFile())return Vt(i)}catch(Ce){if(Ce?.code!=="ENOENT")throw Ce}let L=C.conditions?new Set(C.conditions):bn,V=(Array.isArray(C.url)?C.url:[C.url]).filter(Boolean).map((Ce)=>new URL(function(Re){return typeof Re!="string"&&(Re=Re.toString()),/(?:node|data|http|https|file):/.test(Re)?Re:br.has(Re)?"node:"+Re:"file://"+encodeURI(nn(Re))}(Ce.toString())));V.length===0&&V.push(new URL(Vt(process.cwd())));let ie=[...V];for(let Ce of V)Ce.protocol==="file:"&&ie.push(new URL("./",Ce),new URL(Kn(Ce.pathname,"_index.js"),Ce),new URL("node_modules",Ce));let _e;for(let Ce of ie){if(_e=Gn(i,Ce,L),_e)break;for(let Re of["","/index"]){for(let Qe of C.extensions||Sn)if(_e=Gn(Kn(i,Re)+Qe,Ce,L),_e)break;if(_e)break}if(_e)break}if(!_e){let Ce=Error(`Cannot find module ${i} imported from ${ie.join(", ")}`);throw Ce.code="ERR_MODULE_NOT_FOUND",Ce}return Vt(_e)}function Er(i,C){return us(i,C)}function tr(i,C){return sr(Er(i,C))}let Tr=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,fr=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function Ws(i,C={}){return C.stripComments&&(i=i.replace(fr,"")),Tr.test(i)}function Cs(i){if(typeof i!="string")throw TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}let Cd=new Set(["/","\\",void 0]),Fo=Symbol.for("pathe:normalizedAlias"),wd=/[/\\]/;function Bo(i){if(i[Fo])return i;let C=Object.fromEntries(Object.entries(i).sort(([L],[V])=>function(ie,_e){return _e.split("/").length-ie.split("/").length}(L,V)));for(let L in C)for(let V in C)V===L||L.startsWith(V)||C[L]?.startsWith(V)&&Cd.has(C[L][V.length])&&(C[L]=C[V]+C[L].slice(V.length));return Object.defineProperty(C,Fo,{value:!0,enumerable:!1}),C}function Uo(i="/"){let C=i[i.length-1];return C==="/"||C==="\\"}var Id={rE:"2.6.1"};let kd=yn("node:crypto");var Si=D.n(kd);let or=globalThis.process?.env||Object.create(null),$r=globalThis.process||{env:or},qs=$r!==void 0&&$r.env&&$r.env.NODE_ENV||void 0,Dd=[["claude",["CLAUDECODE","CLAUDE_CODE"]],["replit",["REPL_ID"]],["gemini",["GEMINI_CLI"]],["codex",["CODEX_SANDBOX","CODEX_THREAD_ID"]],["opencode",["OPENCODE"]],["pi",[_i("PATH",/\.pi[\\/]agent/)]],["auggie",["AUGMENT_AGENT"]],["goose",["GOOSE_PROVIDER"]],["devin",[_i("EDITOR",/devin/)]],["cursor",["CURSOR_AGENT"]],["kiro",[_i("TERM_PROGRAM",/kiro/)]]];function _i(i,C){return()=>{let L=or[i];return!!L&&C.test(L)}}let $o=function(){let i=or.AI_AGENT;if(i)return{name:i.toLowerCase()};for(let[C,L]of Dd)for(let V of L)if(typeof V=="string"?or[V]:V())return{name:C};return{}}(),Nd=($o.name,$o.name,[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["GOOGLE_CLOUDRUN","K_SERVICE"],["GOOGLE_CLOUDRUN_JOB","CLOUD_RUN_JOB"],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["JENKINS","JENKINS_URL"],["HUDSON","HUDSON_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOY"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}],["EDGEONE_PAGES","EO_PAGES_CI",{ci:!0}]]),Vo=function(){for(let i of Nd)if(or[i[1]||i[0]])return{name:i[0].toLowerCase(),...i[2]};return or.SHELL==="/bin/jsh"&&$r.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}(),Pi=(Vo.name,$r.platform||""),Cy=!!or.CI||Vo.ci!==!1,Od=!!$r.stdout?.isTTY,wy=(or.DEBUG,qs==="test"||!!or.TEST),zo=(qs==="production"||or.MODE,qs==="dev"||qs==="development"||or.MODE,or.MINIMAL,/^win/i.test(Pi)),Rd=(/^linux/i.test(Pi),/^darwin/i.test(Pi),!or.NO_COLOR&&(!!or.FORCE_COLOR||(Od||zo)&&or.TERM),($r.versions?.node||"").replace(/^v/,"")||null),Md=(Number(Rd?.split(".")[0]),!!$r?.versions?.node),Ld="Bun"in globalThis,jd="Deno"in globalThis,Fd="fastly"in globalThis,Bd=[["Netlify"in globalThis,"netlify"],["EdgeRuntime"in globalThis,"edge-light"],[globalThis.navigator?.userAgent==="Cloudflare-Workers","workerd"],[Fd,"fastly"],[jd,"deno"],[Ld,"bun"],[Md,"node"]];(function(){let i=Bd.find((C)=>C[0]);if(i)i[1]})();let Ud=yn("node:tty"),$d=Ud?.WriteStream?.prototype?.hasColors?.()??!1,an=(i,C)=>{if(!$d)return(ie)=>ie;let L=`\x1B[${i}m`,V=`\x1B[${C}m`;return(ie)=>{let _e=ie+"",Ce=_e.indexOf(V);if(Ce===-1)return L+_e+V;let Re=L,Qe=0,ut=(C===22?V:"")+L;for(;Ce!==-1;)Re+=_e.slice(Qe,Ce)+ut,Qe=Ce+V.length,Ce=_e.indexOf(V,Qe);return Re+=_e.slice(Qe)+V,Re}},Ho=(an(0,0),an(1,22),an(2,22),an(3,23),an(4,24),an(53,55),an(7,27),an(8,28),an(9,29),an(30,39),an(31,39)),ds=an(32,39),Ks=an(33,39),Wo=an(34,39),Vd=(an(35,39),an(36,39)),zd=(an(37,39),an(90,39));an(40,49),an(41,49),an(42,49),an(43,49),an(44,49),an(45,49),an(46,49),an(47,49),an(100,49),an(91,39),an(92,39),an(93,39),an(94,39),an(95,39),an(96,39),an(97,39),an(101,49),an(102,49),an(103,49),an(104,49),an(105,49),an(106,49),an(107,49);function qo(i){if(typeof i!="string"||i.startsWith("file://"))return!1;try{return(0,Mt.lstatSync)(i).isDirectory()}catch{return!1}}function Ko(i,C=8){return(function(){if(hs!==void 0)return hs;try{return hs=!!Si().getFips?.(),hs}catch{return hs=!1,hs}}()?Si().createHash("sha256"):Si().createHash("md5")).update(i).digest("hex").slice(0,C)}let Go={true:ds("true"),false:Ks("false"),"[rebuild]":Ks("[rebuild]"),"[esm]":Wo("[esm]"),"[cjs]":ds("[cjs]"),"[import]":Wo("[import]"),"[require]":ds("[require]"),"[native]":Vd("[native]"),"[transpile]":Ks("[transpile]"),"[fallback]":Ho("[fallback]"),"[unknown]":Ho("[unknown]"),"[hit]":ds("[hit]"),"[miss]":Ks("[miss]"),"[json]":ds("[json]"),"[data]":ds("[data]")};function Bn(i,...C){if(!i.opts.debug)return;let L=process.cwd();console.log(zd(["[jiti]",...C.map((V)=>(V in Go)?Go[V]:typeof V!="string"?JSON.stringify(V):V.replace(L,"."))].join(" ")))}function Mr(i,C){return i.opts.interopDefault?function(L){let V=typeof L;if(L===null||V!=="object"&&V!=="function")return L;let ie=L.default,_e=typeof ie,Ce=ie==null,Re=_e==="object"||_e==="function";if(Ce&&L instanceof Promise)return L;let Qe=_e==="function"&&V!=="function",ut=Re&&!(ie instanceof Promise),pt=new Map;return new Proxy(L,{get(Ct,St){if(pt.has(St))return pt.get(St);let Zt;return St==="__esModule"?Zt=!0:St==="default"?Zt=Ce?L:typeof ie?.default=="function"&&L.__esModule?ie.default:ie:(St in Ct)?Zt=Ct[St]:ut&&(Zt=ie[St],typeof Zt=="function"&&(Zt=Zt.bind(ie))),pt.set(St,Zt),Zt},apply:Qe?(Ct,St,Zt)=>Reflect.apply(ie,St,Zt):void 0})}(C):C}let hs;function Dr(i,C){let L=Yr(i,C);return Boolean(L)}function Yr(i,C,L){let V=process.env[i];if(!(i in process.env))return C;try{return JSON.parse(V)}catch{return L?V:C}}let Jo=/\.(c|m)?j(sx?)$/,Zo=/\.(c|m)?t(sx?)$/;function ms(i,C,L){let V,ie;if(i.isNativeRe.test(C))return C;if(i.resolveTsConfigPaths&&!L.skipTsConfigPaths){let Re=i.resolveTsConfigPaths(C);for(let Qe of Re){let ut=ms(i,Qe,{...L,try:!0,skipTsConfigPaths:!0});if(ut)return ut}}i.alias&&(C=function(Re,Qe){let ut=it(Re);Qe=Bo(Qe);for(let[pt,Ct]of Object.entries(Qe)){if(!ut.startsWith(pt))continue;let St=Uo(pt)?pt.slice(0,-1):pt;if(Uo(ut[St.length]))return Lt(Ct,ut.slice(pt.length))}return ut}(C,i.alias));let _e=L?.parentURL||i.url;qo(_e)&&(_e=Lt(_e,"_index.js"));let Ce=((L?.async)?[L?.conditions,["node","import"],["node","require"]]:[L?.conditions,["node","require"],["node","import"]]).filter(Boolean);for(let Re of Ce){try{V=tr(C,{url:_e,conditions:Re,extensions:i.opts.extensions})}catch(Qe){ie=Qe}if(V)return V}try{return i.nativeRequire.resolve(C,{paths:L.paths})}catch(Re){ie=Re}for(let Re of i.additionalExts){if(V=Ai(i,C+Re,_e,L)||Ai(i,C+"/index"+Re,_e,L),V)return V;if((Zo.test(i.filename)||Zo.test(i.parentModule?.filename||"")||Jo.test(C))&&(V=Ai(i,C.replace(Jo,".$1t$2"),_e,L),V))return V}if(!L?.try)throw ie}function Ai(i,C,L,V){try{return i.nativeRequire.resolve(C,{...V,paths:[Nn(sr(L)),...V?.paths||[]]})}catch{}}let Hd=yn("node:fs/promises"),Yo=yn("node:perf_hooks"),Wd=yn("node:vm");var qd=D.n(Wd);function Gs(i,C,L){let V=i.parentCache||{};if(C.startsWith("node:"))return Xr(i,C,L.async);if(C.startsWith("file:"))C=qt.fileURLToPath(C);else if(C.startsWith("data:")){if(!L.async)throw Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return Bn(i,"[native]","[data]","[import]",C),Xr(i,C,!0)}if(Xt.builtinModules.includes(C)||C===".pnp.js")return Xr(i,C,L.async);if(i.opts.virtualModules&&C in i.opts.virtualModules){Bn(i,"[virtual]",C);let Re=i.opts.virtualModules[C];return L.async?Promise.resolve(Mr(i,Re)):Mr(i,Re)}if(i.opts.tryNative&&!i.opts.transformOptions)try{if(!(C=ms(i,C,L))&&L.try)return;if(Bn(i,"[try-native]",L.async&&i.nativeImport?"[import]":"[require]",C),L.async&&i.nativeImport)return i.nativeImport(C).then((Re)=>(i.opts.moduleCache===!1&&delete i.nativeRequire.cache[C],Mr(i,Re))).catch((Re)=>(Bn(i,`[try-native] Using fallback for ${C} because of an error:`,Re),Gs({...i,opts:{...i.opts,tryNative:!1}},C,L)));{let Re=i.nativeRequire(C);return i.opts.moduleCache===!1&&delete i.nativeRequire.cache[C],Mr(i,Re)}}catch(Re){Bn(i,`[try-native] Using fallback for ${C} because of an error:`,Re)}let ie=ms(i,C,L);if(!ie&&L.try)return;let _e=cn(ie);if(_e===".json"){Bn(i,"[json]",ie);let Re=i.nativeRequire(ie);return Re&&!("default"in Re)&&Object.defineProperty(Re,"default",{value:Re,enumerable:!1}),Re}if(_e&&!i.opts.extensions.includes(_e))return Bn(i,"[native]","[unknown]",L.async?"[import]":"[require]",ie),Xr(i,ie,L.async);if(i.isNativeRe.test(ie))return Bn(i,"[native]",L.async?"[import]":"[require]",ie),Xr(i,ie,L.async);if(V[ie])return Mr(i,V[ie]?.exports);if(i.opts.moduleCache){let Re=i.nativeRequire.cache[ie];if(Re?.loaded)return Mr(i,Re.exports)}let Ce=(0,Mt.readFileSync)(ie,"utf8");return wi(i,Ce,{id:C,filename:ie,ext:_e,cache:V,async:L.async})}function Xr(i,C,L){return L&&i.nativeImport?i.nativeImport(function(V){return zo&&Ht(V)?Vt(V):V}(C)).then((V)=>Mr(i,V)):Mr(i,i.nativeRequire(C))}let Kd="9";function Gd(i,C,L){if(!i.opts.fsCache||!C.filename)return L();let V=` /* v${Kd}-${Ko(C.source,16)} */
|
|
18
18
|
`,ie=`${Fn(Nn(C.filename))}-${function(Qe){let ut=Qe.split(wd).pop();if(!ut)return;let pt=ut.lastIndexOf(".");return pt<=0?ut:ut.slice(0,pt)}(C.filename)}`+(i.opts.sourceMaps?"+map":"")+(C.interopDefault?".i":"")+`.${Ko(C.filename)}`+(C.async?".mjs":".cjs");C.jsx&&C.filename.endsWith("x")&&(ie+="x");let _e=i.opts.fsCache,Ce=Lt(_e,ie);if(!i.opts.rebuildFsCache&&(0,Mt.existsSync)(Ce)){let Qe=(0,Mt.readFileSync)(Ce,"utf8");if(Qe.endsWith(V))return Bn(i,"[cache]","[hit]",C.filename,"~>",Ce),Qe}Bn(i,"[cache]","[miss]",C.filename);let Re=L();return Re.includes("__JITI_ERROR__")||((0,Mt.writeFileSync)(Ce,Re+V,"utf8"),Bn(i,"[cache]","[store]",C.filename,"~>",Ce)),Re}function Jd(i){if(i.opts.fsCache===!0&&(i.opts.fsCache=function(C){let L=C.filename&&bt(C.filename,"../node_modules");if(L&&(0,Mt.existsSync)(L))return Lt(L,".cache/jiti");let V=I.tmpdir();if(process.env.TMPDIR&&V===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let ie=process.env.TMPDIR;delete process.env.TMPDIR,V=I.tmpdir(),process.env.TMPDIR=ie}return Lt(V,"jiti")}(i)),i.opts.fsCache)try{if((0,Mt.mkdirSync)(i.opts.fsCache,{recursive:!0}),!function(C){try{return(0,Mt.accessSync)(C,Mt.constants.W_OK),!0}catch{return!1}}(i.opts.fsCache))throw Error("directory is not writable!")}catch(C){Bn(i,"Error creating cache directory at ",i.opts.fsCache,C),i.opts.fsCache=!1}}function Ci(i,C){let L=Gd(i,C,()=>{let V=i.opts.transform({...i.opts.transformOptions,babel:{...i.opts.sourceMaps?{sourceFileName:C.filename,sourceMaps:"inline"}:{},...i.opts.transformOptions?.babel},interopDefault:i.opts.interopDefault,...C});return V.error&&i.opts.debug&&Bn(i,V.error),V.code});return L.startsWith("#!")&&(L="// "+L),L}function wi(i,C,L={}){let V=L.id||(L.filename?Fn(L.filename):`_jitiEval.${L.ext||(L.async?"mjs":"js")}`),ie=L.filename||ms(i,V,{async:L.async}),_e=L.ext||cn(ie),Ce=L.cache||i.parentCache||{},Re=/\.[cm]?tsx?$/.test(_e),Qe=_e===".mjs"||_e===".js"&&function(sn){for(;sn&&sn!=="."&&sn!=="/";){sn=Lt(sn,"..");try{let Qr=(0,Mt.readFileSync)(Lt(sn,"package.json"),"utf8");try{return JSON.parse(Qr)}catch{}break}catch{}}}(ie)?.type==="module",ut=_e===".cjs",pt=L.forceTranspile??(!ut&&!(Qe&&L.async)&&(Re||Qe||i.isTransformRe.test(ie)||Ws(C))),Ct=Yo.performance.now();if(pt){C=Ci(i,{filename:ie,source:C,ts:Re,async:L.async??!1,jsx:i.opts.jsx});let sn=Math.round(1000*(Yo.performance.now()-Ct))/1000;Bn(i,"[transpile]",L.async?"[esm]":"[cjs]",ie,`(${sn}ms)`)}else{if(Bn(i,"[native]",L.async?"[import]":"[require]",ie),L.async)return Promise.resolve(Xr(i,ie,L.async)).catch((sn)=>(Bn(i,"Native import error:",sn),Bn(i,"[fallback]",ie),wi(i,C,{...L,forceTranspile:!0})));try{return Xr(i,ie,L.async)}catch(sn){Bn(i,"Native require error:",sn),Bn(i,"[fallback]",ie),C=Ci(i,{filename:ie,source:C,ts:Re,async:L.async??!1,jsx:i.opts.jsx})}}let St=new Xt.Module(ie);St.filename=ie,i.parentModule&&(St.parent=i.parentModule,Array.isArray(i.parentModule.children)&&!i.parentModule.children.includes(St)&&i.parentModule.children.push(St));let Zt=Xo(ie,i.opts,{parentModule:St,parentCache:Ce,nativeImport:i.nativeImport,onError:i.onError,createRequire:i.createRequire},!0),vn;St.require=Zt,St.path=Nn(ie),St.paths=Xt.Module._nodeModulePaths(St.path),Ce[ie]=St,i.opts.moduleCache&&(i.nativeRequire.cache[ie]=St);let Hn=function(sn,Qr){return`(${Qr?.async?"async ":""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${sn}
|
|
19
19
|
});`}(C,{async:L.async});try{vn=qd().runInThisContext(Hn,{filename:ie,lineOffset:0,displayErrors:!1})}catch(sn){sn.name==="SyntaxError"&&L.async&&i.nativeImport?(Bn(i,"[esm]","[import]","[fallback]",ie),vn=function(Qr,Ii,ki,Js,Zs){let Qo=`export default ${Ii}`,ea=Zs?void 0:`data:text/javascript;base64,${Buffer.from(Qo).toString("base64")}`;return(...Yd)=>{let ws,ta=()=>(ws=function(fs,na){let ra=Lt(I.tmpdir(),"jiti-esm");try{(0,Mt.mkdirSync)(ra,{recursive:!0})}catch{}let sa=Lt(ra,`${Fn(na,cn(na))}-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`);return(0,Mt.writeFileSync)(sa,fs),sa}(Qo,ki),Bn(Qr,"[esm]","[tempfile]",ws),Js(Vt(ws)));return(ea?Js(ea).catch((fs)=>{if(fs?.code!=="ENAMETOOLONG")throw fs;return ta()}):ta()).then((fs)=>fs.default(...Yd)).finally(()=>{ws&&Hd.unlink(ws).catch(()=>{})})}}(i,Hn,ie,i.nativeImport,i.opts.esmEvalTempFile)):(i.opts.moduleCache&&delete i.nativeRequire.cache[ie],i.onError(sn))}let ln;try{ln=vn(St.exports,St.require,St,St.filename,Nn(St.filename),Zt.import,Zt.esmResolve)}catch(sn){i.opts.moduleCache&&delete i.nativeRequire.cache[ie],i.onError(sn)}function En(){if(St.exports&&St.exports.__JITI_ERROR__){let{filename:sn,line:Qr,column:Ii,code:ki,message:Js}=St.exports.__JITI_ERROR__,Zs=Error(`${ki}: ${Js}
|
|
20
|
-
${`${sn}:${Qr}:${Ii}`}`);Error.captureStackTrace(Zs,Gs),i.onError(Zs)}return St.loaded=!0,Mr(i,St.exports)}return L.async?Promise.resolve(ln).then(En):En()}let Zd=I.platform()==="win32";function Xo(i,C={},L,V=!1){let ie=V?C:function(ln){let En={fsCache:Dr("JITI_FS_CACHE",Dr("JITI_CACHE",!0)),rebuildFsCache:Dr("JITI_REBUILD_FS_CACHE",!1),moduleCache:Dr("JITI_MODULE_CACHE",Dr("JITI_REQUIRE_CACHE",!0)),debug:Dr("JITI_DEBUG",!1),sourceMaps:Dr("JITI_SOURCE_MAPS",!1),interopDefault:Dr("JITI_INTEROP_DEFAULT",!0),extensions:Yr("JITI_EXTENSIONS",[".js",".mjs",".cjs",".ts",".tsx",".mts",".cts",".mtsx",".ctsx"]),alias:Yr("JITI_ALIAS",{}),nativeModules:Yr("JITI_NATIVE_MODULES",[]),transformModules:Yr("JITI_TRANSFORM_MODULES",[]),tryNative:Yr("JITI_TRY_NATIVE","Bun"in globalThis),esmEvalTempFile:Dr("JITI_ESM_EVAL_TEMP_FILE",!1),jsx:Dr("JITI_JSX",!1),tsconfigPaths:Yr("JITI_TSCONFIG_PATHS",!1,!0)};En.jsx&&En.extensions.push(".jsx",".tsx");let sn={};return ln.cache!==void 0&&(sn.fsCache=ln.cache),ln.requireCache!==void 0&&(sn.moduleCache=ln.requireCache),{...En,...sn,...ln}}(C);typeof i=="string"&&i.startsWith("file://")&&(i=sr(i));let _e=ie.alias&&Object.keys(ie.alias).length>0?Bo(ie.alias||{}):void 0,Ce;if(ie.tsconfigPaths){let{getTsconfig:ln,createPathsMatcher:En}=D("./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"),sn=ln(typeof ie.tsconfigPaths=="string"?ie.tsconfigPaths:Nn(i));sn&&(Ce=En(sn))}let Re=["typescript","jiti",...ie.nativeModules||[]],Qe=new RegExp(`node_modules/(${Re.map((ln)=>Cs(ln)).join("|")})/`),ut=[...ie.transformModules||[]],pt=new RegExp(`node_modules/(${ut.map((ln)=>Cs(ln)).join("|")})/`);i||(i=process.cwd()),!V&&qo(i)&&(i=Lt(i,"_index.js"));let Ct=Vt(i),St=[...ie.extensions].filter((ln)=>ln!==".js"),Zt=L.createRequire(Zd?i.replace(/\//g,"\\"):i),vn={filename:i,url:Ct,opts:ie,alias:_e,resolveTsConfigPaths:Ce,nativeModules:Re,transformModules:ut,isNativeRe:Qe,isTransformRe:pt,additionalExts:St,nativeRequire:Zt,onError:L.onError,parentModule:L.parentModule,parentCache:L.parentCache,nativeImport:L.nativeImport,createRequire:L.createRequire};return V||Bn(vn,"[init]",...[["version:",Id.rE],["module-cache:",ie.moduleCache],["fs-cache:",ie.fsCache],["rebuild-fs-cache:",ie.rebuildFsCache],["interop-defaults:",ie.interopDefault]].flat()),V||Jd(vn),Object.assign(function(ln){return Gs(vn,ln,{async:!1})},{cache:ie.moduleCache?Zt.cache:Object.create(null),extensions:Zt.extensions,main:Zt.main,options:ie,resolve:Object.assign(function(ln,En){return ms(vn,ln,{...En,async:!1})},{paths:Zt.resolve.paths}),transform:(ln)=>Ci(vn,ln),evalModule:(ln,En)=>wi(vn,ln,En),async import(ln,En){let sn=await Gs(vn,ln,{...En,async:!0});return En?.default?sn?.default??sn:sn},esmResolve(ln,En){typeof En=="string"&&(En={parentURL:En});let sn=ms(vn,ln,{parentURL:Ct,...En,async:!0});return!sn||typeof sn!="string"||sn.startsWith("file://")?sn:Vt(sn)}})}})(),Qu.exports=M.default})()});var td=oa(function(dP,ed){(()=>{var u={"./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files lazy recursive"(I){function e(g){return Promise.resolve().then(function(){var s=Error("Cannot find module '"+g+"'");throw s.code="MODULE_NOT_FOUND",s})}e.keys=()=>[],e.resolve=e,e.id="./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files lazy recursive",I.exports=e},"./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files sync recursive"(I){function e(g){var s=Error("Cannot find module '"+g+"'");throw s.code="MODULE_NOT_FOUND",s}e.keys=()=>[],e.resolve=e,e.id="./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files sync recursive",I.exports=e},"./node_modules/.pnpm/@babel+plugin-syntax-class-properties@7.12.13_@babel+core@7.29.0/node_modules/@babel/plugin-syntax-class-properties/lib/index.js"(I,e,g){e.A=void 0;var s=(0,g("./node_modules/.pnpm/@babel+helper-plugin-utils@7.28.6/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)((o)=>(o.assertVersion(7),{name:"syntax-class-properties",manipulateOptions(l,t){t.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}}));e.A=s},"./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(I,e,g){var s;(function(o,l,t){var{create:n,defineProperty:y,getOwnPropertyDescriptor:k,getOwnPropertyNames:A,getPrototypeOf:S}=Object,f=Object.prototype.hasOwnProperty,m=(We,Le)=>function(){return Le||(0,We[A(We)[0]])((Le={exports:{}}).exports,Le),Le.exports},d=(We,Le)=>{for(var Be in Le)y(We,Be,{get:Le[Be],enumerable:!0})},p=(We,Le,Be,tt)=>{if(Le&&typeof Le=="object"||typeof Le=="function")for(let vt of A(Le))f.call(We,vt)||vt===Be||y(We,vt,{get:()=>Le[vt],enumerable:!(tt=k(Le,vt))||tt.enumerable});return We},b=(We,Le,Be)=>(Be=We!=null?n(S(We)):{},p(!Le&&We&&We.__esModule?Be:y(Be,"default",{value:We,enumerable:!0}),We)),_=(We)=>p(y({},"__esModule",{value:!0}),We),E=m({"umd:@jridgewell/sourcemap-codec"(We,Le){Le.exports=l}}),x=m({"umd:@jridgewell/trace-mapping"(We,Le){Le.exports=t}}),P={};d(P,{GenMapping:()=>me,addMapping:()=>J,addSegment:()=>q,allMappings:()=>Ae,fromMap:()=>Te,maybeAddMapping:()=>B,maybeAddSegment:()=>W,setIgnore:()=>re,setSourceContent:()=>U,toDecodedMap:()=>ce,toEncodedMap:()=>ue}),o.exports=_(P);var w=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function R(We){return We}function Y(We,Le){return R(We)._indexes[Le]}function z(We,Le){let Be=Y(We,Le);if(Be!==void 0)return Be;let{array:tt,_indexes:vt}=R(We),et=tt.push(Le);return vt[Le]=et-1}function F(We,Le){let Be=Y(We,Le);if(Be===void 0)return;let{array:tt,_indexes:vt}=R(We);for(let et=Be+1;et<tt.length;et++){let _t=tt[et];tt[et-1]=_t,vt[_t]--}vt[Le]=void 0,tt.pop()}var X=b(E()),le=b(x()),ee=0,G=1,j=2,Z=3,ne=4,he=-1,me=class{constructor({file:We,sourceRoot:Le}={}){this._names=new w,this._sources=new w,this._sourcesContent=[],this._mappings=[],this.file=We,this.sourceRoot=Le,this._ignoreList=new w}};function Me(We){return We}function q(We,Le,Be,tt,vt,et,_t,yt){return ae(!1,We,Le,Be,tt,vt,et,_t,yt)}function J(We,Le){return qe(!1,We,Le)}var W=(We,Le,Be,tt,vt,et,_t,yt)=>ae(!0,We,Le,Be,tt,vt,et,_t,yt),B=(We,Le)=>qe(!0,We,Le);function U(We,Le,Be){let{_sources:tt,_sourcesContent:vt}=Me(We);vt[z(tt,Le)]=Be}function re(We,Le,Be=!0){let{_sources:tt,_sourcesContent:vt,_ignoreList:et}=Me(We),_t=z(tt,Le);_t===vt.length&&(vt[_t]=null),Be?z(et,_t):F(et,_t)}function ce(We){let{_mappings:Le,_sources:Be,_sourcesContent:tt,_names:vt,_ignoreList:et}=Me(We);return ye(Le),{version:3,file:We.file||void 0,names:vt.array,sourceRoot:We.sourceRoot||void 0,sources:Be.array,sourcesContent:tt,mappings:Le,ignoreList:et.array}}function ue(We){let Le=ce(We);return Object.assign({},Le,{mappings:(0,X.encode)(Le.mappings)})}function Te(We){let Le=new le.TraceMap(We),Be=new me({file:Le.file,sourceRoot:Le.sourceRoot});return H(Me(Be)._names,Le.names),H(Me(Be)._sources,Le.sources),Me(Be)._sourcesContent=Le.sourcesContent||Le.sources.map(()=>null),Me(Be)._mappings=(0,le.decodedMappings)(Le),Le.ignoreList&&H(Me(Be)._ignoreList,Le.ignoreList),Be}function Ae(We){let Le=[],{_mappings:Be,_sources:tt,_names:vt}=Me(We);for(let et=0;et<Be.length;et++){let _t=Be[et];for(let yt=0;yt<_t.length;yt++){let se=_t[yt],ve={line:et+1,column:se[ee]},Ke,rt,dt;se.length!==1&&(Ke=tt.array[se[G]],rt={line:se[j]+1,column:se[Z]},se.length===5&&(dt=vt.array[se[ne]])),Le.push({generated:ve,source:Ke,original:rt,name:dt})}}return Le}function ae(We,Le,Be,tt,vt,et,_t,yt,se){let{_mappings:ve,_sources:Ke,_sourcesContent:rt,_names:dt}=Me(Le),ft=Ne(ve,Be),Ot=xe(ft,tt);if(!vt){if(We&&Oe(ft,Ot))return;return Pe(ft,Ot,[tt])}de(et),de(_t);let Ft=z(Ke,vt),Se=yt?z(dt,yt):he;if(Ft===rt.length&&(rt[Ft]=se!=null?se:null),!We||!Ve(ft,Ot,Ft,et,_t,Se))return Pe(ft,Ot,yt?[tt,Ft,et,_t,Se]:[tt,Ft,et,_t])}function de(We){}function Ne(We,Le){for(let Be=We.length;Be<=Le;Be++)We[Be]=[];return We[Le]}function xe(We,Le){let Be=We.length;for(let tt=Be-1;tt>=0&&!(Le>=We[tt][ee]);Be=tt--);return Be}function Pe(We,Le,Be){for(let tt=We.length;tt>Le;tt--)We[tt]=We[tt-1];We[Le]=Be}function ye(We){let{length:Le}=We,Be=Le;for(let tt=Be-1;tt>=0&&!(We[tt].length>0);Be=tt,tt--);Be<Le&&(We.length=Be)}function H(We,Le){for(let Be=0;Be<Le.length;Be++)z(We,Le[Be])}function Oe(We,Le){return Le===0||We[Le-1].length===1}function Ve(We,Le,Be,tt,vt,et){if(Le===0)return!1;let _t=We[Le-1];return _t.length!==1&&Be===_t[G]&&tt===_t[j]&&vt===_t[Z]&&et===(_t.length===5?_t[ne]:he)}function qe(We,Le,Be){let{generated:tt,source:vt,original:et,name:_t,content:yt}=Be;return vt?(de(et),ae(We,Le,tt.line-1,tt.column,vt,et.line-1,et.column,_t,yt)):ae(We,Le,tt.line-1,tt.column,null,null,null,null,null)}})(I=g.nmd(I),g("./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"),g("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js")),I.exports="default"in(s=I).exports?s.exports.default:s.exports},"./node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.umd.js"(I,e,g){var s;(function(o,l,t){var{create:n,defineProperty:y,getOwnPropertyDescriptor:k,getOwnPropertyNames:A,getPrototypeOf:S}=Object,f=Object.prototype.hasOwnProperty,m=(W,B)=>function(){return B||(0,W[A(W)[0]])((B={exports:{}}).exports,B),B.exports},d=(W,B)=>{for(var U in B)y(W,U,{get:B[U],enumerable:!0})},p=(W,B,U,re)=>{if(B&&typeof B=="object"||typeof B=="function")for(let ce of A(B))f.call(W,ce)||ce===U||y(W,ce,{get:()=>B[ce],enumerable:!(re=k(B,ce))||re.enumerable});return W},b=(W,B,U)=>(U=W!=null?n(S(W)):{},p(!B&&W&&W.__esModule?U:y(U,"default",{value:W,enumerable:!0}),W)),_=(W)=>p(y({},"__esModule",{value:!0}),W),E=m({"umd:@jridgewell/trace-mapping"(W,B){B.exports=t}}),x=m({"umd:@jridgewell/gen-mapping"(W,B){B.exports=l}}),P={};d(P,{default:()=>J}),o.exports=_(P);var w=b(E()),R=b(x()),Y=b(E()),z=X("",-1,-1,"",null,!1),F=[];function X(W,B,U,re,ce,ue){return{source:W,line:B,column:U,name:re,content:ce,ignore:ue}}function le(W,B,U,re,ce){return{map:W,sources:B,source:U,content:re,ignore:ce}}function ee(W,B){return le(W,B,"",null,!1)}function G(W,B,U){return le(null,F,W,B,U)}function j(W){let B=new R.GenMapping({file:W.map.file}),{sources:U,map:re}=W,ce=re.names,ue=(0,Y.decodedMappings)(re);for(let Te=0;Te<ue.length;Te++){let Ae=ue[Te];for(let ae=0;ae<Ae.length;ae++){let de=Ae[ae],Ne=de[0],xe=z;if(de.length!==1&&(xe=Z(U[de[1]],de[2],de[3],de.length===5?ce[de[4]]:""),xe==null))continue;let{column:Pe,line:ye,name:H,content:Oe,source:Ve,ignore:qe}=xe;(0,R.maybeAddSegment)(B,Te,Ne,Ve,ye,Pe,H),Ve&&Oe!=null&&(0,R.setSourceContent)(B,Ve,Oe),qe&&(0,R.setIgnore)(B,Ve,!0)}}return B}function Z(W,B,U,re){if(!W.map)return X(W.source,B,U,re,W.content,W.ignore);let ce=(0,Y.traceSegment)(W.map,B,U);return ce==null?null:ce.length===1?z:Z(W.sources[ce[1]],ce[2],ce[3],ce.length===5?W.map.names[ce[4]]:re)}function ne(W){return Array.isArray(W)?W:[W]}function he(W,B){let U=ne(W).map((ue)=>new w.TraceMap(ue,"")),re=U.pop();for(let ue=0;ue<U.length;ue++)if(U[ue].sources.length>1)throw Error(`Transformation map ${ue} must have exactly one source file.
|
|
20
|
+
${`${sn}:${Qr}:${Ii}`}`);Error.captureStackTrace(Zs,Gs),i.onError(Zs)}return St.loaded=!0,Mr(i,St.exports)}return L.async?Promise.resolve(ln).then(En):En()}let Zd=I.platform()==="win32";function Xo(i,C={},L,V=!1){let ie=V?C:function(ln){let En={fsCache:Dr("JITI_FS_CACHE",Dr("JITI_CACHE",!0)),rebuildFsCache:Dr("JITI_REBUILD_FS_CACHE",!1),moduleCache:Dr("JITI_MODULE_CACHE",Dr("JITI_REQUIRE_CACHE",!0)),debug:Dr("JITI_DEBUG",!1),sourceMaps:Dr("JITI_SOURCE_MAPS",!1),interopDefault:Dr("JITI_INTEROP_DEFAULT",!0),extensions:Yr("JITI_EXTENSIONS",[".js",".mjs",".cjs",".ts",".tsx",".mts",".cts",".mtsx",".ctsx"]),alias:Yr("JITI_ALIAS",{}),nativeModules:Yr("JITI_NATIVE_MODULES",[]),transformModules:Yr("JITI_TRANSFORM_MODULES",[]),tryNative:Yr("JITI_TRY_NATIVE","Bun"in globalThis),esmEvalTempFile:Dr("JITI_ESM_EVAL_TEMP_FILE",!1),jsx:Dr("JITI_JSX",!1),tsconfigPaths:Yr("JITI_TSCONFIG_PATHS",!1,!0)};En.jsx&&En.extensions.push(".jsx",".tsx");let sn={};return ln.cache!==void 0&&(sn.fsCache=ln.cache),ln.requireCache!==void 0&&(sn.moduleCache=ln.requireCache),{...En,...sn,...ln}}(C);typeof i=="string"&&i.startsWith("file://")&&(i=sr(i));let _e=ie.alias&&Object.keys(ie.alias).length>0?Bo(ie.alias||{}):void 0,Ce;if(ie.tsconfigPaths){let{getTsconfig:ln,createPathsMatcher:En}=D("./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"),sn=ln(typeof ie.tsconfigPaths=="string"?ie.tsconfigPaths:Nn(i));sn&&(Ce=En(sn))}let Re=["typescript","jiti",...ie.nativeModules||[]],Qe=new RegExp(`node_modules/(${Re.map((ln)=>Cs(ln)).join("|")})/`),ut=[...ie.transformModules||[]],pt=new RegExp(`node_modules/(${ut.map((ln)=>Cs(ln)).join("|")})/`);i||(i=process.cwd()),!V&&qo(i)&&(i=Lt(i,"_index.js"));let Ct=Vt(i),St=[...ie.extensions].filter((ln)=>ln!==".js"),Zt=L.createRequire(Zd?i.replace(/\//g,"\\"):i),vn={filename:i,url:Ct,opts:ie,alias:_e,resolveTsConfigPaths:Ce,nativeModules:Re,transformModules:ut,isNativeRe:Qe,isTransformRe:pt,additionalExts:St,nativeRequire:Zt,onError:L.onError,parentModule:L.parentModule,parentCache:L.parentCache,nativeImport:L.nativeImport,createRequire:L.createRequire};return V||Bn(vn,"[init]",...[["version:",Id.rE],["module-cache:",ie.moduleCache],["fs-cache:",ie.fsCache],["rebuild-fs-cache:",ie.rebuildFsCache],["interop-defaults:",ie.interopDefault]].flat()),V||Jd(vn),Object.assign(function(ln){return Gs(vn,ln,{async:!1})},{cache:ie.moduleCache?Zt.cache:Object.create(null),extensions:Zt.extensions,main:Zt.main,options:ie,resolve:Object.assign(function(ln,En){return ms(vn,ln,{...En,async:!1})},{paths:Zt.resolve.paths}),transform:(ln)=>Ci(vn,ln),evalModule:(ln,En)=>wi(vn,ln,En),async import(ln,En){let sn=await Gs(vn,ln,{...En,async:!0});return En?.default?sn?.default??sn:sn},esmResolve(ln,En){typeof En=="string"&&(En={parentURL:En});let sn=ms(vn,ln,{parentURL:Ct,...En,async:!0});return!sn||typeof sn!="string"||sn.startsWith("file://")?sn:Vt(sn)}})}})(),Qu.exports=M.default})()});var td=oa(function(fP,ed){(()=>{var u={"./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files lazy recursive"(I){function e(g){return Promise.resolve().then(function(){var s=Error("Cannot find module '"+g+"'");throw s.code="MODULE_NOT_FOUND",s})}e.keys=()=>[],e.resolve=e,e.id="./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files lazy recursive",I.exports=e},"./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files sync recursive"(I){function e(g){var s=Error("Cannot find module '"+g+"'");throw s.code="MODULE_NOT_FOUND",s}e.keys=()=>[],e.resolve=e,e.id="./node_modules/.pnpm/@babel+core@7.29.0/node_modules/@babel/core/lib/config/files sync recursive",I.exports=e},"./node_modules/.pnpm/@babel+plugin-syntax-class-properties@7.12.13_@babel+core@7.29.0/node_modules/@babel/plugin-syntax-class-properties/lib/index.js"(I,e,g){e.A=void 0;var s=(0,g("./node_modules/.pnpm/@babel+helper-plugin-utils@7.28.6/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)((o)=>(o.assertVersion(7),{name:"syntax-class-properties",manipulateOptions(l,t){t.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}}));e.A=s},"./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(I,e,g){var s;(function(o,l,t){var{create:n,defineProperty:y,getOwnPropertyDescriptor:k,getOwnPropertyNames:A,getPrototypeOf:S}=Object,f=Object.prototype.hasOwnProperty,m=(We,Le)=>function(){return Le||(0,We[A(We)[0]])((Le={exports:{}}).exports,Le),Le.exports},d=(We,Le)=>{for(var Be in Le)y(We,Be,{get:Le[Be],enumerable:!0})},p=(We,Le,Be,tt)=>{if(Le&&typeof Le=="object"||typeof Le=="function")for(let vt of A(Le))f.call(We,vt)||vt===Be||y(We,vt,{get:()=>Le[vt],enumerable:!(tt=k(Le,vt))||tt.enumerable});return We},b=(We,Le,Be)=>(Be=We!=null?n(S(We)):{},p(!Le&&We&&We.__esModule?Be:y(Be,"default",{value:We,enumerable:!0}),We)),_=(We)=>p(y({},"__esModule",{value:!0}),We),E=m({"umd:@jridgewell/sourcemap-codec"(We,Le){Le.exports=l}}),x=m({"umd:@jridgewell/trace-mapping"(We,Le){Le.exports=t}}),P={};d(P,{GenMapping:()=>me,addMapping:()=>J,addSegment:()=>q,allMappings:()=>Ae,fromMap:()=>Te,maybeAddMapping:()=>B,maybeAddSegment:()=>W,setIgnore:()=>re,setSourceContent:()=>U,toDecodedMap:()=>ce,toEncodedMap:()=>ue}),o.exports=_(P);var w=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function R(We){return We}function Y(We,Le){return R(We)._indexes[Le]}function z(We,Le){let Be=Y(We,Le);if(Be!==void 0)return Be;let{array:tt,_indexes:vt}=R(We),et=tt.push(Le);return vt[Le]=et-1}function F(We,Le){let Be=Y(We,Le);if(Be===void 0)return;let{array:tt,_indexes:vt}=R(We);for(let et=Be+1;et<tt.length;et++){let _t=tt[et];tt[et-1]=_t,vt[_t]--}vt[Le]=void 0,tt.pop()}var X=b(E()),le=b(x()),ee=0,G=1,j=2,Z=3,ne=4,he=-1,me=class{constructor({file:We,sourceRoot:Le}={}){this._names=new w,this._sources=new w,this._sourcesContent=[],this._mappings=[],this.file=We,this.sourceRoot=Le,this._ignoreList=new w}};function Me(We){return We}function q(We,Le,Be,tt,vt,et,_t,yt){return ae(!1,We,Le,Be,tt,vt,et,_t,yt)}function J(We,Le){return qe(!1,We,Le)}var W=(We,Le,Be,tt,vt,et,_t,yt)=>ae(!0,We,Le,Be,tt,vt,et,_t,yt),B=(We,Le)=>qe(!0,We,Le);function U(We,Le,Be){let{_sources:tt,_sourcesContent:vt}=Me(We);vt[z(tt,Le)]=Be}function re(We,Le,Be=!0){let{_sources:tt,_sourcesContent:vt,_ignoreList:et}=Me(We),_t=z(tt,Le);_t===vt.length&&(vt[_t]=null),Be?z(et,_t):F(et,_t)}function ce(We){let{_mappings:Le,_sources:Be,_sourcesContent:tt,_names:vt,_ignoreList:et}=Me(We);return ye(Le),{version:3,file:We.file||void 0,names:vt.array,sourceRoot:We.sourceRoot||void 0,sources:Be.array,sourcesContent:tt,mappings:Le,ignoreList:et.array}}function ue(We){let Le=ce(We);return Object.assign({},Le,{mappings:(0,X.encode)(Le.mappings)})}function Te(We){let Le=new le.TraceMap(We),Be=new me({file:Le.file,sourceRoot:Le.sourceRoot});return H(Me(Be)._names,Le.names),H(Me(Be)._sources,Le.sources),Me(Be)._sourcesContent=Le.sourcesContent||Le.sources.map(()=>null),Me(Be)._mappings=(0,le.decodedMappings)(Le),Le.ignoreList&&H(Me(Be)._ignoreList,Le.ignoreList),Be}function Ae(We){let Le=[],{_mappings:Be,_sources:tt,_names:vt}=Me(We);for(let et=0;et<Be.length;et++){let _t=Be[et];for(let yt=0;yt<_t.length;yt++){let se=_t[yt],ve={line:et+1,column:se[ee]},Ke,rt,dt;se.length!==1&&(Ke=tt.array[se[G]],rt={line:se[j]+1,column:se[Z]},se.length===5&&(dt=vt.array[se[ne]])),Le.push({generated:ve,source:Ke,original:rt,name:dt})}}return Le}function ae(We,Le,Be,tt,vt,et,_t,yt,se){let{_mappings:ve,_sources:Ke,_sourcesContent:rt,_names:dt}=Me(Le),ft=Ne(ve,Be),Ot=xe(ft,tt);if(!vt){if(We&&Oe(ft,Ot))return;return Pe(ft,Ot,[tt])}de(et),de(_t);let Ft=z(Ke,vt),Se=yt?z(dt,yt):he;if(Ft===rt.length&&(rt[Ft]=se!=null?se:null),!We||!Ve(ft,Ot,Ft,et,_t,Se))return Pe(ft,Ot,yt?[tt,Ft,et,_t,Se]:[tt,Ft,et,_t])}function de(We){}function Ne(We,Le){for(let Be=We.length;Be<=Le;Be++)We[Be]=[];return We[Le]}function xe(We,Le){let Be=We.length;for(let tt=Be-1;tt>=0&&!(Le>=We[tt][ee]);Be=tt--);return Be}function Pe(We,Le,Be){for(let tt=We.length;tt>Le;tt--)We[tt]=We[tt-1];We[Le]=Be}function ye(We){let{length:Le}=We,Be=Le;for(let tt=Be-1;tt>=0&&!(We[tt].length>0);Be=tt,tt--);Be<Le&&(We.length=Be)}function H(We,Le){for(let Be=0;Be<Le.length;Be++)z(We,Le[Be])}function Oe(We,Le){return Le===0||We[Le-1].length===1}function Ve(We,Le,Be,tt,vt,et){if(Le===0)return!1;let _t=We[Le-1];return _t.length!==1&&Be===_t[G]&&tt===_t[j]&&vt===_t[Z]&&et===(_t.length===5?_t[ne]:he)}function qe(We,Le,Be){let{generated:tt,source:vt,original:et,name:_t,content:yt}=Be;return vt?(de(et),ae(We,Le,tt.line-1,tt.column,vt,et.line-1,et.column,_t,yt)):ae(We,Le,tt.line-1,tt.column,null,null,null,null,null)}})(I=g.nmd(I),g("./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"),g("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js")),I.exports="default"in(s=I).exports?s.exports.default:s.exports},"./node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.umd.js"(I,e,g){var s;(function(o,l,t){var{create:n,defineProperty:y,getOwnPropertyDescriptor:k,getOwnPropertyNames:A,getPrototypeOf:S}=Object,f=Object.prototype.hasOwnProperty,m=(W,B)=>function(){return B||(0,W[A(W)[0]])((B={exports:{}}).exports,B),B.exports},d=(W,B)=>{for(var U in B)y(W,U,{get:B[U],enumerable:!0})},p=(W,B,U,re)=>{if(B&&typeof B=="object"||typeof B=="function")for(let ce of A(B))f.call(W,ce)||ce===U||y(W,ce,{get:()=>B[ce],enumerable:!(re=k(B,ce))||re.enumerable});return W},b=(W,B,U)=>(U=W!=null?n(S(W)):{},p(!B&&W&&W.__esModule?U:y(U,"default",{value:W,enumerable:!0}),W)),_=(W)=>p(y({},"__esModule",{value:!0}),W),E=m({"umd:@jridgewell/trace-mapping"(W,B){B.exports=t}}),x=m({"umd:@jridgewell/gen-mapping"(W,B){B.exports=l}}),P={};d(P,{default:()=>J}),o.exports=_(P);var w=b(E()),R=b(x()),Y=b(E()),z=X("",-1,-1,"",null,!1),F=[];function X(W,B,U,re,ce,ue){return{source:W,line:B,column:U,name:re,content:ce,ignore:ue}}function le(W,B,U,re,ce){return{map:W,sources:B,source:U,content:re,ignore:ce}}function ee(W,B){return le(W,B,"",null,!1)}function G(W,B,U){return le(null,F,W,B,U)}function j(W){let B=new R.GenMapping({file:W.map.file}),{sources:U,map:re}=W,ce=re.names,ue=(0,Y.decodedMappings)(re);for(let Te=0;Te<ue.length;Te++){let Ae=ue[Te];for(let ae=0;ae<Ae.length;ae++){let de=Ae[ae],Ne=de[0],xe=z;if(de.length!==1&&(xe=Z(U[de[1]],de[2],de[3],de.length===5?ce[de[4]]:""),xe==null))continue;let{column:Pe,line:ye,name:H,content:Oe,source:Ve,ignore:qe}=xe;(0,R.maybeAddSegment)(B,Te,Ne,Ve,ye,Pe,H),Ve&&Oe!=null&&(0,R.setSourceContent)(B,Ve,Oe),qe&&(0,R.setIgnore)(B,Ve,!0)}}return B}function Z(W,B,U,re){if(!W.map)return X(W.source,B,U,re,W.content,W.ignore);let ce=(0,Y.traceSegment)(W.map,B,U);return ce==null?null:ce.length===1?z:Z(W.sources[ce[1]],ce[2],ce[3],ce.length===5?W.map.names[ce[4]]:re)}function ne(W){return Array.isArray(W)?W:[W]}function he(W,B){let U=ne(W).map((ue)=>new w.TraceMap(ue,"")),re=U.pop();for(let ue=0;ue<U.length;ue++)if(U[ue].sources.length>1)throw Error(`Transformation map ${ue} must have exactly one source file.
|
|
21
21
|
Did you specify these with the most recent transformation maps first?`);let ce=me(re,B,"",0);for(let ue=U.length-1;ue>=0;ue--)ce=ee(U[ue],[ce]);return ce}function me(W,B,U,re){let{resolvedSources:ce,sourcesContent:ue,ignoreList:Te}=W,Ae=re+1;return ee(W,ce.map((ae,de)=>{let Ne={importer:U,depth:Ae,source:ae||"",content:void 0,ignore:void 0},xe=B(Ne.source,Ne),{source:Pe,content:ye,ignore:H}=Ne;return xe?me(new w.TraceMap(xe,Pe),B,Pe,Ae):G(Pe,ye!==void 0?ye:ue?ue[de]:null,H!==void 0?H:!!Te&&Te.includes(de))}))}var Me=b(x()),q=class{constructor(W,B){let U=B.decodedMappings?(0,Me.toDecodedMap)(W):(0,Me.toEncodedMap)(W);this.version=U.version,this.file=U.file,this.mappings=U.mappings,this.names=U.names,this.ignoreList=U.ignoreList,this.sourceRoot=U.sourceRoot,this.sources=U.sources,B.excludeContent||(this.sourcesContent=U.sourcesContent)}toString(){return JSON.stringify(this)}};function J(W,B,U){let re=typeof U=="object"?U:{excludeContent:!!U,decodedMappings:!1},ce=he(W,B);return new q(j(ce),re)}})(I=g.nmd(I),g("./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"),g("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js")),I.exports="default"in(s=I).exports?s.exports.default:s.exports},"./node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"(I){I.exports=function(){let e=/^[\w+.-]+:\/\//,g=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,s=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function o(_){return e.test(_)}function l(_){return _.startsWith("//")}function t(_){return _.startsWith("/")}function n(_){return _.startsWith("file:")}function y(_){return/^[.?#]/.test(_)}function k(_){let E=g.exec(_);return S(E[1],E[2]||"",E[3],E[4]||"",E[5]||"/",E[6]||"",E[7]||"")}function A(_){let E=s.exec(_),x=E[2];return S("file:","",E[1]||"","",t(x)?x:"/"+x,E[3]||"",E[4]||"")}function S(_,E,x,P,w,R,Y){return{scheme:_,user:E,host:x,port:P,path:w,query:R,hash:Y,type:7}}function f(_){if(l(_)){let x=k("http:"+_);return x.scheme="",x.type=6,x}if(t(_)){let x=k("http://foo.com"+_);return x.scheme="",x.host="",x.type=5,x}if(n(_))return A(_);if(o(_))return k(_);let E=k("http://foo.com/"+_);return E.scheme="",E.host="",E.type=_?_.startsWith("?")?3:_.startsWith("#")?2:4:1,E}function m(_){if(_.endsWith("/.."))return _;let E=_.lastIndexOf("/");return _.slice(0,E+1)}function d(_,E){p(E,E.type),_.path==="/"?_.path=E.path:_.path=m(E.path)+_.path}function p(_,E){let x=E<=4,P=_.path.split("/"),w=1,R=0,Y=!1;for(let F=1;F<P.length;F++){let X=P[F];X?(Y=!1,X!=="."&&(X!==".."?(P[w++]=X,R++):R?(Y=!0,R--,w--):x&&(P[w++]=X))):Y=!0}let z="";for(let F=1;F<w;F++)z+="/"+P[F];(!z||Y&&!z.endsWith("/.."))&&(z+="/"),_.path=z}function b(_,E){if(!_&&!E)return"";let x=f(_),P=x.type;if(E&&P!==7){let R=f(E),Y=R.type;switch(P){case 1:x.hash=R.hash;case 2:x.query=R.query;case 3:case 4:d(x,R);case 5:x.user=R.user,x.host=R.host,x.port=R.port;case 6:x.scheme=R.scheme}Y>P&&(P=Y)}p(x,P);let w=x.query+x.hash;switch(P){case 2:case 3:return w;case 4:{let R=x.path.slice(1);return R?y(E||_)&&!y(R)?"./"+R+w:R+w:w||"."}case 5:return x.path+w;default:return x.scheme+"//"+x.user+x.host+x.port+x.path+w}}return b}()},"./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"(I,e,g){var s;(function(o){var{defineProperty:l,getOwnPropertyDescriptor:t,getOwnPropertyNames:n}=Object,y=Object.prototype.hasOwnProperty,k=(q,J,W,B)=>{if(J&&typeof J=="object"||typeof J=="function")for(let U of n(J))y.call(q,U)||U===W||l(q,U,{get:()=>J[U],enumerable:!(B=t(J,U))||B.enumerable});return q},A=(q)=>k(l({},"__esModule",{value:!0}),q),S={};((q,J)=>{for(var W in J)l(q,W,{get:J[W],enumerable:!0})})(S,{decode:()=>ne,decodeGeneratedRanges:()=>ee,decodeOriginalScopes:()=>F,encode:()=>Me,encodeGeneratedRanges:()=>G,encodeOriginalScopes:()=>X}),o.exports=A(S);var f=44,m=59,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=new Uint8Array(64),b=new Uint8Array(128);for(let q=0;q<d.length;q++){let J=d.charCodeAt(q);p[q]=J,b[J]=q}function _(q,J){let W=0,B=0,U=0;do{let ce=q.next();U=b[ce],W|=(31&U)<<B,B+=5}while(32&U);let re=1&W;return W>>>=1,re&&(W=-2147483648|-W),J+W}function E(q,J,W){let B=J-W;B=B<0?-B<<1|1:B<<1;do{let U=31&B;B>>>=5,B>0&&(U|=32),q.write(p[U])}while(B>0);return J}function x(q,J){return!(q.pos>=J)&&q.peek()!==f}var P=16384,w=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode:(q)=>Buffer.from(q.buffer,q.byteOffset,q.byteLength).toString()}:{decode(q){let J="";for(let W=0;W<q.length;W++)J+=String.fromCharCode(q[W]);return J}},R=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(P)}write(q){let{buffer:J}=this;J[this.pos++]=q,this.pos===P&&(this.out+=w.decode(J),this.pos=0)}flush(){let{buffer:q,out:J,pos:W}=this;return W>0?J+w.decode(q.subarray(0,W)):J}},Y=class{constructor(q){this.pos=0,this.buffer=q}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(q){let{buffer:J,pos:W}=this,B=J.indexOf(q,W);return B===-1?J.length:B}},z=[];function F(q){let{length:J}=q,W=new Y(q),B=[],U=[],re=0;for(;W.pos<J;W.pos++){re=_(W,re);let ce=_(W,0);if(!x(W,J)){let ae=U.pop();ae[2]=re,ae[3]=ce;continue}let ue=_(W,0),Te=1&_(W,0)?[re,ce,0,0,ue,_(W,0)]:[re,ce,0,0,ue],Ae=z;if(x(W,J)){Ae=[];do{let ae=_(W,0);Ae.push(ae)}while(x(W,J))}Te.vars=Ae,B.push(Te),U.push(Te)}return B}function X(q){let J=new R;for(let W=0;W<q.length;)W=le(q,W,J,[0]);return J.flush()}function le(q,J,W,B){let U=q[J],{0:re,1:ce,2:ue,3:Te,4:Ae,vars:ae}=U;J>0&&W.write(f),B[0]=E(W,re,B[0]),E(W,ce,0),E(W,Ae,0),E(W,U.length===6?1:0,0),U.length===6&&E(W,U[5],0);for(let de of ae)E(W,de,0);for(J++;J<q.length;){let de=q[J],{0:Ne,1:xe}=de;if(Ne>ue||Ne===ue&&xe>=Te)break;J=le(q,J,W,B)}return W.write(f),B[0]=E(W,ue,B[0]),E(W,Te,0),J}function ee(q){let{length:J}=q,W=new Y(q),B=[],U=[],re=0,ce=0,ue=0,Te=0,Ae=0,ae=0,de=0,Ne=0;do{let xe=W.indexOf(";"),Pe=0;for(;W.pos<xe;W.pos++){if(Pe=_(W,Pe),!x(W,xe)){let Le=U.pop();Le[2]=re,Le[3]=Pe;continue}let ye=_(W,0),H=2&ye,Oe=4&ye,Ve,qe=null,We=z;if(1&ye){let Le=_(W,ce);ue=_(W,ce===Le?ue:0),ce=Le,Ve=[re,Pe,0,0,Le,ue]}else Ve=[re,Pe,0,0];if(Ve.isScope=!!Oe,H){let Le=Te,Be=Ae;Te=_(W,Te);let tt=Le===Te;Ae=_(W,tt?Ae:0),ae=_(W,tt&&Be===Ae?ae:0),qe=[Te,Ae,ae]}if(Ve.callsite=qe,x(W,xe)){We=[];do{de=re,Ne=Pe;let Le=_(W,0),Be;if(Le<-1){Be=[[_(W,0)]];for(let tt=-1;tt>Le;tt--){let vt=de;de=_(W,de),Ne=_(W,de===vt?Ne:0);let et=_(W,0);Be.push([et,de,Ne])}}else Be=[[Le]];We.push(Be)}while(x(W,xe))}Ve.bindings=We,B.push(Ve),U.push(Ve)}re++,W.pos=xe+1}while(W.pos<J);return B}function G(q){if(q.length===0)return"";let J=new R;for(let W=0;W<q.length;)W=j(q,W,J,[0,0,0,0,0,0,0]);return J.flush()}function j(q,J,W,B){let U=q[J],{0:re,1:ce,2:ue,3:Te,isScope:Ae,callsite:ae,bindings:de}=U;if(B[0]<re?(Z(W,B[0],re),B[0]=re,B[1]=0):J>0&&W.write(f),B[1]=E(W,U[1],B[1]),E(W,(U.length===6?1:0)|(ae?2:0)|(Ae?4:0),0),U.length===6){let{4:Ne,5:xe}=U;Ne!==B[2]&&(B[3]=0),B[2]=E(W,Ne,B[2]),B[3]=E(W,xe,B[3])}if(ae){let{0:Ne,1:xe,2:Pe}=U.callsite;Ne!==B[4]?(B[5]=0,B[6]=0):xe!==B[5]&&(B[6]=0),B[4]=E(W,Ne,B[4]),B[5]=E(W,xe,B[5]),B[6]=E(W,Pe,B[6])}if(de)for(let Ne of de){Ne.length>1&&E(W,-Ne.length,0),E(W,Ne[0][0],0);let xe=re,Pe=ce;for(let ye=1;ye<Ne.length;ye++){let H=Ne[ye];xe=E(W,H[1],xe),Pe=E(W,H[2],Pe),E(W,H[0],0)}}for(J++;J<q.length;){let Ne=q[J],{0:xe,1:Pe}=Ne;if(xe>ue||xe===ue&&Pe>=Te)break;J=j(q,J,W,B)}return B[0]<ue?(Z(W,B[0],ue),B[0]=ue,B[1]=0):W.write(f),B[1]=E(W,Te,B[1]),J}function Z(q,J,W){do q.write(m);while(++J<W)}function ne(q){let{length:J}=q,W=new Y(q),B=[],U=0,re=0,ce=0,ue=0,Te=0;do{let Ae=W.indexOf(";"),ae=[],de=!0,Ne=0;for(U=0;W.pos<Ae;){let xe;U=_(W,U),U<Ne&&(de=!1),Ne=U,x(W,Ae)?(re=_(W,re),ce=_(W,ce),ue=_(W,ue),x(W,Ae)?(Te=_(W,Te),xe=[U,re,ce,ue,Te]):xe=[U,re,ce,ue]):xe=[U],ae.push(xe),W.pos++}de||he(ae),B.push(ae),W.pos=Ae+1}while(W.pos<=J);return B}function he(q){q.sort(me)}function me(q,J){return q[0]-J[0]}function Me(q){let J=new R,W=0,B=0,U=0,re=0;for(let ce=0;ce<q.length;ce++){let ue=q[ce];if(ce>0&&J.write(m),ue.length===0)continue;let Te=0;for(let Ae=0;Ae<ue.length;Ae++){let ae=ue[Ae];Ae>0&&J.write(f),Te=E(J,ae[0],Te),ae.length!==1&&(W=E(J,ae[1],W),B=E(J,ae[2],B),U=E(J,ae[3],U),ae.length!==4&&(re=E(J,ae[4],re)))}}return J.flush()}})(I=g.nmd(I)),I.exports="default"in(s=I).exports?s.exports.default:s.exports},"./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"(I,e,g){var s;(function(o,l,t){var{create:n,defineProperty:y,getOwnPropertyDescriptor:k,getOwnPropertyNames:A,getPrototypeOf:S}=Object,f=Object.prototype.hasOwnProperty,m=(we,$e)=>function(){return $e||(0,we[A(we)[0]])(($e={exports:{}}).exports,$e),$e.exports},d=(we,$e)=>{for(var He in $e)y(we,He,{get:$e[He],enumerable:!0})},p=(we,$e,He,De)=>{if($e&&typeof $e=="object"||typeof $e=="function")for(let Ye of A($e))f.call(we,Ye)||Ye===He||y(we,Ye,{get:()=>$e[Ye],enumerable:!(De=k($e,Ye))||De.enumerable});return we},b=(we,$e,He)=>(He=we!=null?n(S(we)):{},p(!$e&&we&&we.__esModule?He:y(He,"default",{value:we,enumerable:!0}),we)),_=(we)=>p(y({},"__esModule",{value:!0}),we),E=m({"umd:@jridgewell/sourcemap-codec"(we,$e){$e.exports=t}}),x=m({"umd:@jridgewell/resolve-uri"(we,$e){$e.exports=l}}),P={};d(P,{AnyMap:()=>Ae,FlattenMap:()=>Ae,GREATEST_LOWER_BOUND:()=>Oe,LEAST_UPPER_BOUND:()=>H,TraceMap:()=>Ve,allGeneratedPositionsFor:()=>et,decodedMap:()=>rt,decodedMappings:()=>Le,eachMapping:()=>_t,encodedMap:()=>dt,encodedMappings:()=>We,generatedPositionFor:()=>vt,isIgnored:()=>ve,originalPositionFor:()=>tt,presortedDecodedMap:()=>Ke,sourceContentFor:()=>se,traceSegment:()=>Be}),o.exports=_(P);var w=b(E()),R=b(x());function Y(we){if(!we)return"";let $e=we.lastIndexOf("/");return we.slice(0,$e+1)}function z(we,$e){let He=Y(we),De=$e?$e+"/":"";return(Ye)=>(0,R.default)(De+(Ye||""),He)}var F=0,X=1,le=2,ee=3,G=4,j=1,Z=2;function ne(we,$e){let He=he(we,0);if(He===we.length)return we;$e||(we=we.slice());for(let De=He;De<we.length;De=he(we,De+1))we[De]=Me(we[De],$e);return we}function he(we,$e){for(let He=$e;He<we.length;He++)if(!me(we[He]))return He;return we.length}function me(we){for(let $e=1;$e<we.length;$e++)if(we[$e][F]<we[$e-1][F])return!1;return!0}function Me(we,$e){return $e||(we=we.slice()),we.sort(q)}function q(we,$e){return we[F]-$e[F]}function J(we,$e){let He=$e.map(()=>[]);for(let De=0;De<we.length;De++){let Ye=we[De];for(let at=0;at<Ye.length;at++){let oe=Ye[at];if(oe.length===1)continue;let fe=oe[X],Fe=oe[le],ge=oe[ee],Ze=He[fe];(Ze[Fe]||(Ze[Fe]=[])).push([ge,De,oe[F]])}}for(let De=0;De<He.length;De++){let Ye=He[De];for(let at=0;at<Ye.length;at++){let oe=Ye[at];oe&&oe.sort(q)}}return He}var W=!1;function B(we,$e,He,De){for(;He<=De;){let Ye=He+(De-He>>1),at=we[Ye][F]-$e;if(at===0)return W=!0,Ye;at<0?He=Ye+1:De=Ye-1}return W=!1,He-1}function U(we,$e,He){for(let De=He+1;De<we.length&&we[De][F]===$e;He=De++);return He}function re(we,$e,He){for(let De=He-1;De>=0&&we[De][F]===$e;He=De--);return He}function ce(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function ue(we,$e,He,De){let{lastKey:Ye,lastNeedle:at,lastIndex:oe}=He,fe=0,Fe=we.length-1;if(De===Ye){if($e===at)return W=oe!==-1&&we[oe][F]===$e,oe;$e>=at?fe=oe===-1?0:oe:Fe=oe}return He.lastKey=De,He.lastNeedle=$e,He.lastIndex=B(we,$e,fe,Fe)}function Te(we){return typeof we=="string"?JSON.parse(we):we}var Ae=function(we,$e){let He=Te(we);if(!("sections"in He))return new Ve(He,$e);let De=[],Ye=[],at=[],oe=[],fe=[];return ae(He,$e,De,Ye,at,oe,fe,0,0,1/0,1/0),Ke({version:3,file:He.file,names:oe,sources:Ye,sourcesContent:at,mappings:De,ignoreList:fe})};function ae(we,$e,He,De,Ye,at,oe,fe,Fe,ge,Ze){let{sections:Xe}=we;for(let Je=0;Je<Xe.length;Je++){let{map:xt,offset:Et}=Xe[Je],Pt=ge,$t=Ze;if(Je+1<Xe.length){let Rt=Xe[Je+1].offset;Pt=Math.min(ge,fe+Rt.line),Pt===ge?$t=Math.min(Ze,Fe+Rt.column):Pt<ge&&($t=Fe+Rt.column)}de(xt,$e,He,De,Ye,at,oe,fe+Et.line,Fe+Et.column,Pt,$t)}}function de(we,$e,He,De,Ye,at,oe,fe,Fe,ge,Ze){let Xe=Te(we);if("sections"in Xe)return ae(...arguments);let Je=new Ve(Xe,$e),xt=De.length,Et=at.length,Pt=Le(Je),{resolvedSources:$t,sourcesContent:Rt,ignoreList:rn}=Je;if(Ne(De,$t),Ne(at,Je.names),Rt)Ne(Ye,Rt);else for(let ht=0;ht<$t.length;ht++)Ye.push(null);if(rn)for(let ht=0;ht<rn.length;ht++)oe.push(rn[ht]+xt);for(let ht=0;ht<Pt.length;ht++){let en=fe+ht;if(en>ge)return;let Jt=xe(He,en),Yt=ht===0?Fe:0,Pn=Pt[ht];for(let dn=0;dn<Pn.length;dn++){let gt=Pn[dn],on=Yt+gt[F];if(en===ge&&on>=Ze)return;if(gt.length===1){Jt.push([on]);continue}let _n=xt+gt[X],Xt=gt[le],Mt=gt[ee];Jt.push(gt.length===4?[on,_n,Xt,Mt]:[on,_n,Xt,Mt,Et+gt[G]])}}}function Ne(we,$e){for(let He=0;He<$e.length;He++)we.push($e[He])}function xe(we,$e){for(let He=we.length;He<=$e;He++)we[He]=[];return we[$e]}var Pe="`line` must be greater than 0 (lines start at line 1)",ye="`column` must be greater than or equal to 0 (columns start at column 0)",H=-1,Oe=1,Ve=class{constructor(we,$e){let He=typeof we=="string";if(!He&&we._decodedMemo)return we;let De=Te(we),{version:Ye,file:at,names:oe,sourceRoot:fe,sources:Fe,sourcesContent:ge}=De;this.version=Ye,this.file=at,this.names=oe||[],this.sourceRoot=fe,this.sources=Fe,this.sourcesContent=ge,this.ignoreList=De.ignoreList||De.x_google_ignoreList||void 0;let Ze=z($e,fe);this.resolvedSources=Fe.map(Ze);let{mappings:Xe}=De;if(typeof Xe=="string")this._encoded=Xe,this._decoded=void 0;else{if(!Array.isArray(Xe))throw De.sections?Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):Error(`invalid source map: ${JSON.stringify(De)}`);this._encoded=void 0,this._decoded=ne(Xe,He)}this._decodedMemo=ce(),this._bySources=void 0,this._bySourceMemos=void 0}};function qe(we){return we}function We(we){var $e,He;return(He=($e=qe(we))._encoded)!=null?He:$e._encoded=(0,w.encode)(qe(we)._decoded)}function Le(we){var $e;return($e=qe(we))._decoded||($e._decoded=(0,w.decode)(qe(we)._encoded))}function Be(we,$e,He){let De=Le(we);if($e>=De.length)return null;let Ye=De[$e],at=Se(Ye,qe(we)._decodedMemo,$e,He,Oe);return at===-1?null:Ye[at]}function tt(we,$e){let{line:He,column:De,bias:Ye}=$e;if(He--,He<0)throw Error(Pe);if(De<0)throw Error(ye);let at=Le(we);if(He>=at.length)return Ot(null,null,null,null);let oe=at[He],fe=Se(oe,qe(we)._decodedMemo,He,De,Ye||Oe);if(fe===-1)return Ot(null,null,null,null);let Fe=oe[fe];if(Fe.length===1)return Ot(null,null,null,null);let{names:ge,resolvedSources:Ze}=we;return Ot(Ze[Fe[X]],Fe[le]+1,Fe[ee],Fe.length===5?ge[Fe[G]]:null)}function vt(we,$e){let{source:He,line:De,column:Ye,bias:at}=$e;return ct(we,He,De,Ye,at||Oe,!1)}function et(we,$e){let{source:He,line:De,column:Ye,bias:at}=$e;return ct(we,He,De,Ye,at||H,!0)}function _t(we,$e){let He=Le(we),{names:De,resolvedSources:Ye}=we;for(let at=0;at<He.length;at++){let oe=He[at];for(let fe=0;fe<oe.length;fe++){let Fe=oe[fe],ge=at+1,Ze=Fe[0],Xe=null,Je=null,xt=null,Et=null;Fe.length!==1&&(Xe=Ye[Fe[1]],Je=Fe[2]+1,xt=Fe[3]),Fe.length===5&&(Et=De[Fe[4]]),$e({generatedLine:ge,generatedColumn:Ze,source:Xe,originalLine:Je,originalColumn:xt,name:Et})}}}function yt(we,$e){let{sources:He,resolvedSources:De}=we,Ye=He.indexOf($e);return Ye===-1&&(Ye=De.indexOf($e)),Ye}function se(we,$e){let{sourcesContent:He}=we;if(He==null)return null;let De=yt(we,$e);return De===-1?null:He[De]}function ve(we,$e){let{ignoreList:He}=we;if(He==null)return!1;let De=yt(we,$e);return De!==-1&&He.includes(De)}function Ke(we,$e){let He=new Ve(ft(we,[]),$e);return qe(He)._decoded=we.mappings,He}function rt(we){return ft(we,Le(we))}function dt(we){return ft(we,We(we))}function ft(we,$e){return{version:we.version,file:we.file,names:we.names,sourceRoot:we.sourceRoot,sources:we.sources,sourcesContent:we.sourcesContent,mappings:$e,ignoreList:we.ignoreList||we.x_google_ignoreList}}function Ot(we,$e,He,De){return{source:we,line:$e,column:He,name:De}}function Ft(we,$e){return{line:we,column:$e}}function Se(we,$e,He,De,Ye){let at=ue(we,De,$e,He);return W?at=(Ye===H?U:re)(we,De,at):Ye===H&&at++,at===-1||at===we.length?-1:at}function Ue(we,$e,He,De,Ye){let at=Se(we,$e,He,De,Oe);if(W||Ye!==H||at++,at===-1||at===we.length)return[];let oe=W?De:we[at][F];W||(at=re(we,oe,at));let fe=U(we,oe,at),Fe=[];for(;at<=fe;at++){let ge=we[at];Fe.push(Ft(ge[j]+1,ge[Z]))}return Fe}function ct(we,$e,He,De,Ye,at){var oe,fe;if(--He<0)throw Error(Pe);if(De<0)throw Error(ye);let{sources:Fe,resolvedSources:ge}=we,Ze=Fe.indexOf($e);if(Ze===-1&&(Ze=ge.indexOf($e)),Ze===-1)return at?[]:Ft(null,null);let Xe=(oe=qe(we))._bySourceMemos||(oe._bySourceMemos=Fe.map(ce)),Je=((fe=qe(we))._bySources||(fe._bySources=J(Le(we),Xe)))[Ze][He];if(Je==null)return at?[]:Ft(null,null);let xt=Xe[Ze];if(at)return Ue(Je,xt,He,De,Ye);let Et=Se(Je,xt,He,De,Ye);if(Et===-1)return Ft(null,null);let Pt=Je[Et];return Ft(Pt[j]+1,Pt[Z])}})(I=g.nmd(I),g("./node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"),g("./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js")),I.exports="default"in(s=I).exports?s.exports.default:s.exports},"./node_modules/.pnpm/babel-plugin-parameter-decorator@1.0.16/node_modules/babel-plugin-parameter-decorator/lib/index.js"(I,e,g){var s=g("path");function o(l){switch(l.parent.type){case"TSTypeReference":case"TSQualifiedName":case"TSExpressionWithTypeArguments":case"TSTypeQuery":return!0;default:return!1}}I.exports=function(l){var t=l.types,n=function(k,A){return function(S){var f=t.callExpression(k.expression,[t.Identifier(S),t.Identifier("undefined"),t.NumericLiteral(A.key)]),m=t.logicalExpression("||",f,t.Identifier(S)),d=t.assignmentExpression("=",t.Identifier(S),m);return t.expressionStatement(d)}},y=function(k,A){return function(S,f){var m=t.callExpression(k.expression,[t.Identifier("".concat(S,".prototype")),t.StringLiteral(f),t.NumericLiteral(A.key)]);return t.expressionStatement(m)}};return{visitor:{Program:function(k,A){var S=(0,s.extname)(A.file.opts.filename);S!==".ts"&&S!==".tsx"||function(){var f=Object.create(null);k.node.body.filter(function(F){var{type:X,declaration:le}=F;switch(X){case"ClassDeclaration":return!0;case"ExportNamedDeclaration":case"ExportDefaultDeclaration":return le&&le.type==="ClassDeclaration";default:return!1}}).map(function(F){return F.type==="ClassDeclaration"?F:F.declaration}).forEach(function(F){F.body.body.forEach(function(X){(X.params||[]).forEach(function(le){(le.decorators||[]).forEach(function(ee){ee.expression.callee?f[ee.expression.callee.name]=ee:f[ee.expression.name]=ee})})})});var m=!0,d=!1,p=void 0;try{for(var b,_=k.get("body")[Symbol.iterator]();!(m=(b=_.next()).done);m=!0){var E=b.value;if(E.node.type==="ImportDeclaration"){if(E.node.specifiers.length===0)continue;var x=!0,P=!1,w=void 0;try{for(var R,Y=function(){var F=R.value,X=E.scope.getBinding(F.local.name);X.referencePaths.length?X.referencePaths.reduce(function(le,ee){return le||o(ee)},!1)&&Object.keys(f).forEach(function(le){var ee=f[le];(ee.expression.arguments||[]).forEach(function(G){G.name===F.local.name&&X.referencePaths.push({parent:ee.expression})})}):f[F.local.name]&&X.referencePaths.push({parent:f[F.local.name]})},z=E.node.specifiers[Symbol.iterator]();!(x=(R=z.next()).done);x=!0)Y()}catch(F){P=!0,w=F}finally{try{x||z.return==null||z.return()}finally{if(P)throw w}}}}}catch(F){d=!0,p=F}finally{try{m||_.return==null||_.return()}finally{if(d)throw p}}}()},Function:function(k){var A="";k.node.id?A=k.node.id.name:k.node.key&&(A=k.node.key.name),(k.get("params")||[]).slice().forEach(function(S){var f=S.node.decorators||[],m=f.length;if(f.slice().forEach(function(p){if(k.type==="ClassMethod"){var b,_=k.parentPath.parentPath,E=k.findParent(function(F){return F.type==="ClassDeclaration"});if(E?b=E.node.id.name:(_.insertAfter(null),b=function(F){var X=F.findParent(function(le){return le.node.type==="AssignmentExpression"});return X.node.right.type==="SequenceExpression"?X.node.right.expressions[1].name:X.node.right.type==="ClassExpression"?X.node.left.name:null}(k)),A==="constructor"){var x=n(p,S)(b);_.insertAfter(x)}else{var P=y(p,S)(b,A);_.insertAfter(P)}}else{var w=k.findParent(function(F){return F.node.type==="VariableDeclarator"}).node.id.name;if(A===w){var R=n(p,S)(w);if(k.parentKey==="body")k.insertAfter(R);else k.findParent(function(F){return F.parentKey==="body"}).insertAfter(R)}else{var Y=k.findParent(function(F){return F.node.type==="CallExpression"}),z=y(p,S)(w,A);Y.insertAfter(z)}}}),m){var d=function(p){switch(p.node.type){case"ObjectPattern":return t.ObjectPattern(p.node.properties);case"AssignmentPattern":return t.AssignmentPattern(p.node.left,p.node.right);case"TSParameterProperty":return t.Identifier(p.node.parameter.name);default:return t.Identifier(p.node.name)}}(S);S.replaceWith(d)}})}}}}},"./node_modules/.pnpm/convert-source-map@2.0.0/node_modules/convert-source-map/index.js"(I,e){var g;function s(l,t){(t=t||{}).hasComment&&(l=function(n){return n.split(",").pop()}(l)),t.encoding==="base64"?l=g(l):t.encoding==="uri"&&(l=decodeURIComponent(l)),(t.isJSON||t.encoding)&&(l=JSON.parse(l)),this.sourcemap=l}function o(l){return new s(l,{isJSON:!0})}Object.defineProperty(e,"commentRegex",{get:function(){return/^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/gm}}),Object.defineProperty(e,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/gm}}),g=typeof Buffer<"u"?typeof Buffer.from=="function"?function(l){return Buffer.from(l,"base64").toString()}:function(l){if(typeof value=="number")throw TypeError("The value to decode must not be of type number.");return new Buffer(l,"base64").toString()}:function(l){return decodeURIComponent(escape(atob(l)))},s.prototype.toJSON=function(l){return JSON.stringify(this.sourcemap,null,l)},typeof Buffer<"u"?typeof Buffer.from=="function"?s.prototype.toBase64=function(){var l=this.toJSON();return Buffer.from(l,"utf8").toString("base64")}:s.prototype.toBase64=function(){var l=this.toJSON();if(typeof l=="number")throw TypeError("The json to encode must not be of type number.");return new Buffer(l,"utf8").toString("base64")}:s.prototype.toBase64=function(){var l=this.toJSON();return btoa(unescape(encodeURIComponent(l)))},s.prototype.toURI=function(){var l=this.toJSON();return encodeURIComponent(l)},s.prototype.toComment=function(l){var t,n,y;return l!=null&&l.encoding==="uri"?(t="",n=this.toURI()):(t=";base64",n=this.toBase64()),y="sourceMappingURL=data:application/json;charset=utf-8"+t+","+n,l!=null&&l.multiline?"/*# "+y+" */":"//# "+y},s.prototype.toObject=function(){return JSON.parse(this.toJSON())},s.prototype.addProperty=function(l,t){if(this.sourcemap.hasOwnProperty(l))throw Error('property "'+l+'" already exists on the sourcemap, use set property instead');return this.setProperty(l,t)},s.prototype.setProperty=function(l,t){return this.sourcemap[l]=t,this},s.prototype.getProperty=function(l){return this.sourcemap[l]},e.fromObject=function(l){return new s(l)},e.fromJSON=function(l){return new s(l,{isJSON:!0})},e.fromURI=function(l){return new s(l,{encoding:"uri"})},e.fromBase64=function(l){return new s(l,{encoding:"base64"})},e.fromComment=function(l){var t;return new s(l=l.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),{encoding:(t=e.commentRegex.exec(l))&&t[4]||"uri",hasComment:!0})},e.fromMapFileComment=function(l,t){if(typeof t=="string")throw Error("String directory paths are no longer supported with `fromMapFileComment`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var n=function(y,k){var A=e.mapFileCommentRegex.exec(y),S=A[1]||A[2];try{return(y=k(S))!=null&&typeof y.catch=="function"?y.catch(f):y}catch(m){f(m)}function f(m){throw Error("An error occurred while trying to read the map file at "+S+`
|
|
22
22
|
`+m.stack)}}(l,t);return n!=null&&typeof n.then=="function"?n.then(o):o(n)},e.fromSource=function(l){var t=l.match(e.commentRegex);return t?e.fromComment(t.pop()):null},e.fromMapFileSource=function(l,t){if(typeof t=="string")throw Error("String directory paths are no longer supported with `fromMapFileSource`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var n=l.match(e.mapFileCommentRegex);return n?e.fromMapFileComment(n.pop(),t):null},e.removeComments=function(l){return l.replace(e.commentRegex,"")},e.removeMapFileComments=function(l){return l.replace(e.mapFileCommentRegex,"")},e.generateMapFileComment=function(l,t){var n="sourceMappingURL="+l;return t&&t.multiline?"/*# "+n+" */":"//# "+n}},"./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(I,e,g){e.formatArgs=function(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+I.exports.humanize(this.diff),!this.useColors)return;let l="color: "+this.color;o.splice(1,0,l,"color: inherit");let t=0,n=0;o[0].replace(/%[a-zA-Z%]/g,(y)=>{y!=="%%"&&(t++,y==="%c"&&(n=t))}),o.splice(n,0,l)},e.save=function(o){try{o?e.storage.setItem("debug",o):e.storage.removeItem("debug")}catch(l){}},e.load=function(){let o;try{o=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch(l){}return!o&&typeof process<"u"&&"env"in process&&(o=process.env.DEBUG),o},e.useColors=function(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let o;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(o=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(o[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(o){}}(),e.destroy=(()=>{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),I.exports=g("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js")(e);let{formatters:s}=I.exports;s.j=function(o){try{return JSON.stringify(o)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}},"./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(I,e,g){I.exports=function(s){function o(n){let y,k,A,S=null;function f(...m){if(!f.enabled)return;let d=f,p=Number(new Date),b=p-(y||p);d.diff=b,d.prev=y,d.curr=p,y=p,m[0]=o.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let _=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(E,x)=>{if(E==="%%")return"%";_++;let P=o.formatters[x];if(typeof P=="function"){let w=m[_];E=P.call(d,w),m.splice(_,1),_--}return E}),o.formatArgs.call(d,m),(d.log||o.log).apply(d,m)}return f.namespace=n,f.useColors=o.useColors(),f.color=o.selectColor(n),f.extend=l,f.destroy=o.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(k!==o.namespaces&&(k=o.namespaces,A=o.enabled(n)),A),set:(m)=>{S=m}}),typeof o.init=="function"&&o.init(f),f}function l(n,y){let k=o(this.namespace+(y===void 0?":":y)+n);return k.log=this.log,k}function t(n,y){let k=0,A=0,S=-1,f=0;for(;k<n.length;)if(A<y.length&&(y[A]===n[k]||y[A]==="*"))y[A]==="*"?(S=A,f=k,A++):(k++,A++);else{if(S===-1)return!1;A=S+1,f++,k=f}for(;A<y.length&&y[A]==="*";)A++;return A===y.length}return o.debug=o,o.default=o,o.coerce=function(n){if(n instanceof Error)return n.stack||n.message;return n},o.disable=function(){let n=[...o.names,...o.skips.map((y)=>"-"+y)].join(",");return o.enable(""),n},o.enable=function(n){o.save(n),o.namespaces=n,o.names=[],o.skips=[];let y=(typeof n=="string"?n:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let k of y)k[0]==="-"?o.skips.push(k.slice(1)):o.names.push(k)},o.enabled=function(n){for(let y of o.skips)if(t(n,y))return!1;for(let y of o.names)if(t(n,y))return!0;return!1},o.humanize=g("./node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"),o.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(s).forEach((n)=>{o[n]=s[n]}),o.names=[],o.skips=[],o.formatters={},o.selectColor=function(n){let y=0;for(let k=0;k<n.length;k++)y=(y<<5)-y+n.charCodeAt(k),y|=0;return o.colors[Math.abs(y)%o.colors.length]},o.enable(o.load()),o}},"./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(I,e,g){typeof process>"u"||process.type==="renderer"||!1||process.__nwjs?I.exports=g("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"):I.exports=g("./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js")},"./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(I,e,g){let s=g("tty"),o=g("util");e.init=function(t){t.inspectOpts={};let n=Object.keys(e.inspectOpts);for(let y=0;y<n.length;y++)t.inspectOpts[n[y]]=e.inspectOpts[n[y]]},e.log=function(...t){return process.stderr.write(o.formatWithOptions(e.inspectOpts,...t)+`
|
|
23
23
|
`)},e.formatArgs=function(t){let{namespace:n,useColors:y}=this;if(y){let k=this.color,A="\x1B[3"+(k<8?k:"8;5;"+k),S=` ${A};1m${n} \x1B[0m`;t[0]=S+t[0].split(`
|
|
@@ -567,4 +567,4 @@ The run_commands tool remains available in plan mode strictly for read-only insp
|
|
|
567
567
|
|
|
568
568
|
Once the user has reviewed your plan and explicitly approved it in a follow-up message, use the switch_to_act_mode tool to switch to act mode and begin implementation. Calling switch_to_act_mode immediately starts execution, so never call it in the same turn you present a plan and never treat the original task request as approval -- end your turn after presenting the plan and wait for the user's response.`,ff=`${Nu}
|
|
569
569
|
|
|
570
|
-
Once you have presented your plan, end your turn and wait for the user's response. You do NOT have the ability to switch to act mode yourself -- the user must do it manually with the Plan/Act toggle once they are satisfied with the plan. If the task requires tools that are only available in act mode, ask the user to "toggle to Act mode" (use those words).`;var Ou=mt({id:je(),temperature:kt().optional(),maxTokens:kt().optional(),contextWindow:kt().optional(),inputPrice:kt().optional(),outputPrice:kt().optional(),supportsImages:xn().optional()}),Ru=mt({models:un(Ou).optional(),openAiBaseUrl:je().optional(),openAiHeaders:Wn(je(),je()).optional(),azureApiVersion:je().optional(),azureIdentity:xn().optional()}),Mu=mt({id:je(),thinkingBudgetTokens:kt().optional()}),Lu=mt({name:je(),baseModelId:je(),thinkingBudgetTokens:kt().optional()}),ju=mt({models:un(Mu).optional(),customModels:un(Lu).optional(),awsRegion:je().optional(),awsUseCrossRegionInference:xn().optional(),awsUseGlobalInference:xn().optional(),awsBedrockUsePromptCache:xn().optional(),awsBedrockEndpoint:je().optional()}),Fu=mt({id:je()}),Bu=mt({models:un(Fu).optional()}),Uu=mt({id:je(),thinkingBudgetTokens:kt().optional()}),$u=mt({models:un(Uu).optional(),vertexProjectId:je().optional(),vertexRegion:je().optional()}),Vu=mt({id:je(),thinkingBudgetTokens:kt().optional(),promptCachingEnabled:xn().optional()}),zu=mt({models:un(Vu).optional(),baseUrl:je().optional()}),Hu=mt({id:je(),thinkingBudgetTokens:kt().optional()}),Wu=mt({models:un(Hu).optional(),baseUrl:je().optional()}),yf=mt({OpenAiCompatible:Ru.optional(),AwsBedrock:ju.optional(),Cline:Bu.optional(),Vertex:$u.optional(),LiteLLM:zu.optional(),Anthropic:Wu.optional()}),qu=mt({id:je()}),Ku=mt({name:je(),url:je(),alwaysEnabled:xn().optional(),headers:Wn(je(),je()).optional()}),So=mt({alwaysEnabled:xn(),name:je(),contents:je()}),xi=mt({bucket:je(),accessKeyId:je(),secretAccessKey:je(),region:je().optional(),endpoint:je().optional(),accountId:je().optional()}),Gu=mt({enabled:xn().optional(),type:Es([qn("s3_access_keys"),qn("r2_access_keys"),qn("azure_access_keys")]).optional(),s3AccessSettings:xi.optional(),r2AccessSettings:xi.optional(),azureAccessSettings:xi.optional()}),Ju=mt({promptUploading:Gu.optional()}),gf=mt({version:je(),providerSettings:yf.optional(),telemetryEnabled:xn().optional(),kanbanEnabled:xn().optional(),mcpMarketplaceEnabled:xn().optional(),allowedMCPServers:un(qu).optional(),remoteMCPServers:un(Ku).optional(),blockPersonalRemoteMCPServers:xn().optional(),yoloModeAllowed:xn().optional(),openTelemetryEnabled:xn().optional(),openTelemetryMetricsExporter:je().optional(),openTelemetryLogsExporter:je().optional(),openTelemetryOtlpProtocol:je().optional(),openTelemetryOtlpEndpoint:je().optional(),openTelemetryOtlpHeaders:Wn(je(),je()).optional(),openTelemetryOtlpMetricsProtocol:je().optional(),openTelemetryOtlpMetricsEndpoint:je().optional(),openTelemetryOtlpMetricsHeaders:Wn(je(),je()).optional(),openTelemetryOtlpLogsProtocol:je().optional(),openTelemetryOtlpLogsEndpoint:je().optional(),openTelemetryOtlpLogsHeaders:Wn(je(),je()).optional(),openTelemetryMetricExportInterval:kt().optional(),openTelemetryOtlpInsecure:xn().optional(),openTelemetryLogBatchSize:kt().optional(),openTelemetryLogBatchTimeout:kt().optional(),openTelemetryLogMaxQueueSize:kt().optional(),enterpriseTelemetry:Ju.optional(),globalRules:un(So).optional(),globalWorkflows:un(So).optional()}),bf=Wn(je(),je());var xf=gn(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth","popular"]),vf=gn(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),Ef=gn(["anthropic","ai-sdk","ai-sdk-community","openai","openai-compatible","openai-r1","gemini","bedrock","custom","fetch","vertex"]);var Zu=["rules","skills","workflows","plugins","hooks"];var U0=new Set(Zu);var Tf=mt({rootPath:je().min(1),hint:je().min(1).optional(),associatedRemoteUrls:un(je().min(1)).optional(),latestGitCommitHash:je().min(1).optional(),latestGitBranchName:je().min(1).optional()}),z0=mt({currentWorkspacePath:je().min(1).optional(),workspaces:Wn(je().min(1),Tf)});var Sf=["current_state","boundary_analysis","interface_proposal"];var Ar=fu((u)=>u instanceof Date?u.toISOString():u,je().datetime()),Ss=gn(["pending","in_progress","blocked","completed"]),Yu=gn(["queued","running","completed","failed","cancelled","interrupted"]),vi=gn(["draft","in_review","finalized"]),_f=mt({agentId:je(),role:gn(["lead","teammate"]),description:je().optional(),status:gn(["idle","running","stopped"])}),K0=mt({agentId:je(),rolePrompt:je(),modelId:je().optional(),maxIterations:kt().optional()});function jn(u){return fu((v)=>v===null?void 0:v,u.optional())}var G0=mt({agentId:je().min(1).describe("Teammate identifier"),rolePrompt:je().min(1).describe("System prompt describing teammate role")}).strict(),J0=mt({agentId:je().min(1).describe("Teammate identifier"),reason:jn(je().min(1)).describe("Optional shutdown reason")}),Z0=mt({}),Pf={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]};var Y0=mt({action:gn(["create","list","claim","complete","block"]),title:jn(je().min(1)).describe("Task title"),description:jn(je().min(1)).describe("Task details"),dependsOn:jn(un(je().describe("Dependency task ID"))).describe("Array of dependency task IDs"),assignee:jn(je().min(1)).describe("Optional assignee"),status:jn(gn(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),taskId:jn(je()).describe("Task ID"),summary:jn(je().min(1)).describe("Completion summary"),reason:jn(je().min(1)).describe("Blocking reason")}).superRefine((u,v)=>{for(let D of Pf[u.action]){if(u[D]!==void 0)continue;v.addIssue({code:"custom",path:[D],message:`Field "${D}" is required when action=${u.action}`})}}),X0=mt({agentId:je().describe("Teammate agent ID"),task:je().min(1).describe("Task instructions for the teammate"),taskId:jn(je()).describe("Optional shared task list ID"),runMode:jn(gn(["sync","async"])).describe("Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later."),continueConversation:jn(xn()).describe("If true, continue the teammate conversation; otherwise start fresh")}),Q0=mt({status:jn(gn(["queued","running","completed","failed","cancelled","interrupted"])).describe("Optional run status filter. Omit to include all statuses."),agentId:jn(je().min(1)).describe("Optional teammate ID filter. Omit to include all teammates."),includeCompleted:jn(xn()).describe("Include completed/failed runs (default true)")}),ev=mt({runId:je().min(1).describe("Run ID"),reason:jn(je().min(1)).describe("Optional cancellation reason")}),tv=mt({runId:jn(je().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),nv=mt({toAgentId:je().min(1).describe("Recipient agent ID"),subject:je().min(1).describe("Message subject"),body:je().min(1).describe("Message body"),taskId:jn(je().min(1)).describe("Optional task ID context")}),rv=mt({subject:je().min(1).describe("Message subject"),body:je().min(1).describe("Message body"),taskId:jn(je().min(1)).describe("Optional task ID context")}),sv=mt({unreadOnly:jn(xn()).describe("Only unread messages for read action (default true)")}),iv=mt({kind:gn(["progress","handoff","blocked","decision","done","error"]),summary:je().min(1).describe("Update summary"),taskId:jn(je().min(1)).describe("Optional task ID context"),evidence:jn(un(je().min(1))).describe("Optional evidence links/snippets"),nextAction:jn(je().min(1)).describe("Planned next step")}),ov=mt({}),av=mt({title:je().describe("Outcome title"),requiredSections:un(je()).default(Sf).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),lv=mt({outcomeId:je().describe("Outcome ID"),section:je().describe("Section name"),sourceRunId:jn(je()).describe("Optional source run ID"),content:je().describe("Section fragment content")}),cv=mt({fragmentId:je().describe("Fragment ID"),approved:xn().describe("Review decision")}),pv=mt({outcomeId:je().describe("Outcome ID")}),uv=mt({}),dv=mt({teamId:je(),teamName:je(),members:un(_f),taskCounts:Wn(Ss,kt()),unreadMessages:kt(),missionLogEntries:kt(),activeRuns:kt(),queuedRuns:kt(),outcomeCounts:Wn(vi,kt())}),Af=mt({id:je(),title:je(),description:je(),status:Ss,createdAt:Ar,updatedAt:Ar,createdBy:je(),assignee:je().optional(),dependsOn:un(je()),summary:je().optional(),isReady:xn(),blockedBy:un(je())}),hv=fo("action",[mt({action:qn("create"),taskId:je(),status:Ss,ignoredFields:un(je()).optional(),note:je().optional()}),mt({action:qn("list"),tasks:un(Af)}),mt({action:qn("claim"),taskId:je(),status:Ss,nextStep:je()}),mt({action:qn("complete"),taskId:je(),status:Ss}),mt({action:qn("block"),taskId:je(),status:Ss})]),mv=mt({agentId:je(),mode:gn(["sync","async"]),status:gn(["dispatched","running","queued","joined"]),dispatched:xn(),message:je(),deduped:xn().optional(),runId:je().optional(),text:je().optional(),iterations:kt().optional()}),Cf=mt({textPreview:je(),iterations:kt(),finishReason:je(),durationMs:kt(),usage:mt({inputTokens:kt(),outputTokens:kt(),cacheReadTokens:kt().optional(),cacheWriteTokens:kt().optional(),totalCost:kt().optional()})}),fv=mt({id:je(),agentId:je(),taskId:je().optional(),status:Yu,messagePreview:je(),priority:kt(),retryCount:kt(),maxRetries:kt(),nextAttemptAt:Ar.optional(),continueConversation:xn().optional(),startedAt:Ar,endedAt:Ar.optional(),leaseOwner:je().optional(),heartbeatAt:Ar.optional(),lastProgressAt:Ar.optional(),lastProgressMessage:je().optional(),currentActivity:je().optional(),error:je().optional(),resultSummary:Cf.optional()}),yv=mt({id:je(),teamId:je(),fromAgentId:je(),toAgentId:je(),subject:je(),body:je(),taskId:je().optional(),sentAt:Ar,readAt:Ar.optional()}),gv=mt({id:je(),teamId:je(),title:je(),status:vi,requiredSections:un(je()),createdBy:je(),createdAt:Ar,finalizedAt:Ar.optional()}),bv=mt({outcomeId:je(),status:vi,requiredSections:un(je())}),xv=mt({agentId:je(),status:je()}),vv=mt({runId:je(),status:Yu}),Ev=mt({id:je(),toAgentId:je()}),Tv=mt({delivered:kt()}),Sv=mt({id:je()}),_v=mt({status:je()}),Pv=mt({fragmentId:je(),status:je()}),Av=mt({outcomeId:je(),status:vi});function Xu(u=process){u.once("disconnect",()=>u.exit(0))}import{existsSync as nr,readFileSync as Ps}from"node:fs";import{builtinModules as Ff,createRequire as Io}from"node:module";import{dirname as qr,extname as $s,isAbsolute as Bf,resolve as wn}from"node:path";import{fileURLToPath as dd}from"node:url";var ko=qr(dd(import.meta.url)),Uf=Io(import.meta.url),$f=wn(ko,"..","..","..","..",".."),Ao=Hf($f),Vf=["@cline/sdk","@cline/agents","@cline/core","@cline/core/hub","@cline/core/hub/daemon-entry","@cline/core/telemetry","@cline/llms","@cline/llms/browser","@cline/shared","@cline/shared/automation","@cline/shared/browser","@cline/shared/storage","@cline/shared/db","@cline/shared/types"],Do=new Set(Ff.flatMap((u)=>[u,u.replace(/^node:/,"")])),Us=new Set(To),zf=["development","node","import","require","default"];function Hf(u){let v={},D={"@cline/sdk":wn(u,"packages/sdk/src/index.ts"),"@cline/agents":wn(u,"packages/agents/src/index.ts"),"@cline/core":wn(u,"packages/core/src/index.ts"),"@cline/llms":wn(u,"packages/llms/src/index.ts"),"@cline/shared":wn(u,"packages/shared/src/index.ts"),"@cline/shared/storage":wn(u,"packages/shared/src/storage/index.ts"),"@cline/shared/db":wn(u,"packages/shared/src/db/index.ts")};for(let[M,I]of Object.entries(D))if(nr(I))v[M]=I;for(let M of["agents","core","llms","shared"]){let I=wn(u,"packages",M),e=wn(I,"package.json");if(!nr(e))continue;try{let g=JSON.parse(Ps(e,"utf8"));if(typeof g.name!=="string"||!g.exports)continue;if(typeof g.exports==="string"){let s=wn(I,g.exports);if(nr(s))v[g.name]=s;continue}if(typeof g.exports!=="object")continue;for(let[s,o]of Object.entries(g.exports)){let l=Wf(I,o);if(!l)continue;let t=s==="."?g.name:`${g.name}/${s.replace(/^\.\//,"")}`;v[t]=l}}catch{}}return v}function Wf(u,v){let D=No(v);if(!D)return null;let M=hd(u,D);for(let I of M)if(nr(I))return I;return null}function No(u,v=new Set){if(typeof u==="string")return u;if(!u||typeof u!=="object")return null;if(v.has(u))return null;v.add(u);let D=u;for(let M of zf){let I=No(D[M],v);if(I)return I}return null}function hd(u,v){let D=v.replace(/^\.\//,""),M=[wn(u,v)];if(D.startsWith("dist/")){let I=D.replace(/^dist\//,"src/").replace(/\.(mjs|cjs|js)$/,"");return[wn(u,`${I}.ts`),wn(u,`${I}.tsx`),wn(u,`${I}.mts`),wn(u,`${I}.cts`),...M]}return M}function qf(u){return Object.fromEntries(Object.entries(u).sort(([v],[D])=>D.length-v.length))}function Ei(u){return!(u.startsWith(".")||u.startsWith("/")||u.startsWith("file:")||u.startsWith("data:")||u.startsWith("http:")||u.startsWith("https:"))}function _s(u){if(u.startsWith("@")){let[v,D]=u.split("/",3);return D?`${v}/${D}`:u}return u.split("/",1)[0]??u}function Kf(u){let v=_s(u);if(u===v)return".";return`.${u.slice(v.length)}`}function md(u){return _s(u).startsWith("@cline/")}function Co(u,v){let D=_s(v),M=qr(u);while(!0){let I=wn(M,"node_modules",D);if(nr(I)||nr(wn(I,"package.json")))return!0;let e=wn(M,"..");if(e===M)return!1;M=e}}function pd(u){return wo(u)!==null}function wo(u){try{return Uf.resolve(u)}catch{}return Gf(u)}function Gf(u){let v=_s(u),D=fd(v);if(!D)return null;let M=wn(D,"package.json");try{let I=JSON.parse(Ps(M,"utf8")),e=Kf(u),g=e==="."&&typeof I.exports==="string"?I.exports:I.exports&&typeof I.exports==="object"&&Object.hasOwn(I.exports,e)?I.exports[e]:void 0,s=No(g)??(e==="."&&typeof I.main==="string"?I.main:null);if(!s)return null;let o=wn(D,s),l=[o,...hd(D,s).filter((t)=>t!==o)];for(let t of l)if(nr(t))return t;return null}catch{return null}}function Jf(){let u=[ko],v=process.env.CLINE_WRAPPER_PATH?.trim();if(v)u.push(qr(qr(v)));let D=process.execPath?.trim();if(D)u.push(qr(D));return[...new Set(u.map((M)=>wn(M)))]}function Zf(u,v){let D=u;while(!0){let M=wn(D,"package.json");if(nr(M))try{if(JSON.parse(Ps(M,"utf8")).name===v)return D}catch{}let I=wn(D,"node_modules",v,"package.json");if(nr(I))return qr(I);let e=wn(D,"..");if(e===D)return null;D=e}}function fd(u){for(let v of Jf()){let D=Zf(v,u);if(D)return D}return null}function Yf(u){let D=qr(u);for(let M=0;M<4;M++){let I=wn(D,"package.json");if(nr(I))try{let g=JSON.parse(Ps(I,"utf8"));return g!=null&&typeof g==="object"&&"cline"in g}catch{return!1}let e=wn(D,"..");if(e===D)return!1;D=e}return!1}function yd(u,v){let D=v.startsWith("file:")?dd(v):Bf(v)?v:wn(qr(u),v);if(nr(D)&&Us.has($s(D)))return D;for(let M of Us){let I=`${D}${M}`;if(nr(I))return I}for(let M of Us){let I=wn(D,`index${M}`);if(nr(I))return I}return null}function gd(u){let v=new Set,D=[/\bimport\s+(?:type\s+)?[^"'`]*?\bfrom\s*["'`]([^"'`]+)["'`]/g,/\bexport\s+[^"'`]*?\bfrom\s*["'`]([^"'`]+)["'`]/g,/\bimport\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/g,/\brequire\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/g];for(let M of D)for(let I of u.matchAll(M)){let e=I[1];if(e)v.add(e)}return[...v]}function Xf(u){return $s(u)!==".ts"}function bd(u,v,D=new Set){if(D.has(u)||!nr(u))return;if(D.add(u),!Us.has($s(u)))return;let M=Ps(u,"utf8"),I=Xf(u);for(let e of gd(M)){if(e.startsWith("node:")||Do.has(e))continue;if(Ei(e)){if(!I)continue;if(Object.hasOwn(Ao,e)||Object.hasOwn(Ao,_s(e))||Co(u,e)||md(e)&&pd(e)||v&&pd(e))continue;throw Error(`Cannot find module '${_s(e)}'`)}let g=yd(u,e);if(g)bd(g,v,D)}}function xd(u,v=new Set,D=new Set){if(v.has(u)||!nr(u))return D;if(v.add(u),!Us.has($s(u)))return D;let M=Ps(u,"utf8");for(let I of gd(M)){if(D.add(I),Ei(I))continue;let e=yd(u,I);if(e)xd(e,v,D)}return D}function Qf(u,v){let D=Io(u),M={},I=xd(u),e=new Set(Vf);for(let[g,s]of Object.entries(Ao)){try{D.resolve(g);continue}catch{}M[g]=s}for(let g of I)if(Ei(g)&&(md(g)||v))e.add(g);for(let g of e){if(Object.hasOwn(M,g)||Co(u,g))continue;let s=wo(g);if(s)M[g]=s}if(!v)return M;for(let g of I){if(!Ei(g)||Object.hasOwn(M,g)||Co(u,g)||g.startsWith("node:")||Do.has(g))continue;let s=wo(g);if(s)M[g]=s}return M}function ey(u){let v=$s(u);return v===".ts"||v===".tsx"||v===".mts"||v===".cts"}var os;function ty(){if(os!==void 0)return os;let u=fd("jiti");if(!u)return os=null,null;let v=wn(u,"dist","babel.cjs");if(!nr(v))return os=null,null;try{let M=Io(v)(v);os=typeof M==="function"?M:null}catch{os=null}return os}var ud;function ny(){return ud??=(async()=>{try{let u=await Promise.resolve().then(() => (sd(),{})),v=Of;if(typeof v!=="function")return null;let D=v(ko,{cache:!1,interopDefault:!1});return(M)=>({code:D.transform(M)})}catch{return null}})(),ud}async function vd(u,v={}){let D=!Yf(u);bd(u,D);let M=Qf(u,D),I=qf(M),e=await Promise.resolve().then(() => (cd(),ld)),g=typeof e==="function"?e:typeof e.default==="function"?e.default:void 0;if(!g)throw Error("Unable to load jiti");let s=Object.entries(I).filter(([,n])=>ey(n)).map(([n])=>n),o=ty()??await ny(),l=o?(n)=>o({...n,interopDefault:!0}):void 0;return await g(u,{alias:I,cache:v.freshModule?!0:v.useCache,requireCache:v.freshModule?!1:v.useCache,esmResolve:!0,interopDefault:!1,nativeModules:[...Do],transformModules:s,tryNative:!1,...l?{transform:l}:{}}).import(u,{})}function Ed(u,v){if(!u)return!0;if(u.providerIds?.length){if(!v?.providerId||!u.providerIds.includes(v.providerId))return!1}if(u.modelIds?.length){if(!v?.modelId||!u.modelIds.includes(v.modelId))return!1}return!0}function iy(u,v){if(!u)return!0;for(let D of v){let M=u[D]?.enabled;if(typeof M==="boolean")return M}return u["*"]?.enabled??!0}function jr(u){return typeof u==="object"&&u!==null}function Td(u){return Array.isArray(u)&&u.every((v)=>typeof v==="string")}function oy(u,v){if(!jr(u))throw Error(`Invalid plugin module: ${v}`);if(typeof u.name!=="string"||!u.name)throw Error(`Invalid plugin name: ${v}`);if(!jr(u.manifest))throw Error(`Invalid plugin manifest: ${v}`);if(Object.hasOwn(u.manifest,"providerIds")&&!Td(u.manifest.providerIds))throw Error(`Invalid plugin manifest.providerIds: ${v}`);if(Object.hasOwn(u.manifest,"modelIds")&&!Td(u.manifest.modelIds))throw Error(`Invalid plugin manifest.modelIds: ${v}`)}function ay(u){if(!jr(u))throw Error("Plugin setup context must be an object");if(u.session!==void 0&&!jr(u.session))throw Error("Plugin setup context session must be an object");if(u.client!==void 0&&!jr(u.client))throw Error("Plugin setup context client must be an object");if(u.user!==void 0&&!jr(u.user))throw Error("Plugin setup context user must be an object");if(u.workspaceInfo!==void 0&&!jr(u.workspaceInfo))throw Error("Plugin setup context workspaceInfo must be an object");if(u.automation!==void 0&&!jr(u.automation))throw Error("Plugin setup context automation must be an object");if(u.automation!==void 0&&typeof u.automation.ingestEvent!=="function")throw Error("Plugin setup context automation.ingestEvent must be a function");if(u.logger!==void 0&&!jr(u.logger))throw Error("Plugin setup context logger must be an object")}var Sd=0,Vs=new Map,Ro=new Map;function ly(u){let v=u instanceof Error?u.message:String(u),D=u instanceof Error?u.stack:void 0;return{message:v,stack:D}}var as=ry?void 0:sy;if(as){let u=()=>{};console.log=u,console.info=u,console.debug=u,console.dir=u,console.table=u,process.stdout.write=(v,...D)=>{let M=D.find((I)=>typeof I==="function");if(M)process.nextTick(M);return!0}}function cy(u){return u instanceof Error&&(u.name==="DataCloneError"||/could not be cloned/i.test(u.message))}function Lo(u){if(as){try{as.postMessage(u)}catch(v){if(!cy(v))throw v;as.postMessage(JSON.parse(JSON.stringify(u)))}return}process.send?.(u)}function Oo(u,v,D,M){Lo({type:"response",id:u,ok:v,result:D,error:M})}function Fr(u,v){Lo({type:"event",name:u,payload:v})}var py="__cline_tool_update",uy="__cline_setup_started";function dy(u){let v={};for(let[D,M]of Object.entries(u)){if(D==="execute"||typeof M==="function")continue;v[D]=M}return JSON.parse(JSON.stringify(v))}function _d(u,v,D){if(!v||v<=0)return Promise.resolve().then(u);return new Promise((M,I)=>{let e=setTimeout(()=>I(Error(`${D} timed out after ${v}ms`)),v);Promise.resolve().then(u).then(M,I).finally(()=>clearTimeout(e))})}globalThis.__clinePluginHost={emitEvent:Fr};globalThis.__clineSessionEnv={cwd:void 0,workspaceInfo:void 0};function jo(u){if(!u||typeof u!=="object")return{};return u}function Ti(u){if(!u||typeof u!=="object")return;let v={...u};if(v.error instanceof Error)v.error={name:v.error.name,message:v.error.message,stack:v.error.stack};return v}function hy(u){let v=(D,M,I)=>{Fr("plugin_log",{level:D,pluginName:u,message:M,metadata:Ti(I)})};return{debug:(D,M)=>v("debug",D,M),log:(D,M)=>v("log",D,M),error:(D,M)=>v("error",D,M)}}function my(u){let v=(I)=>{Fr("plugin_telemetry",{pluginName:u,...I})},D=(I)=>(e,g,s,o,l)=>{v({kind:"metric",metric:I,name:e,value:g,attributes:Ti(s),description:o,required:l})},M=()=>{};return{capture:(I)=>{v({kind:"event",event:I?.event,properties:Ti(I?.properties)})},captureRequired:(I,e)=>{v({kind:"event",event:I,properties:Ti(e),required:!0})},recordCounter:D("counter"),recordHistogram:D("histogram"),recordGauge:D("gauge"),isEnabled:()=>!0,setDistinctId:M,setMetadata:M,updateMetadata:M,setCommonProperties:M,updateCommonProperties:M,flush:async()=>{},dispose:async()=>{}}}function As(u,v){let D=`${u}:${v}`,M=(Ro.get(D)??0)+1;return Ro.set(D,M),`${u}_${v}_${M}`}function fy(u){let v=typeof u.eventType==="string"?u.eventType.trim():"",D=typeof u.source==="string"?u.source.trim():"";if(!v)throw Error("Automation event type contribution requires eventType");if(!D)throw Error("Automation event type contribution requires source");return{...u,eventType:v,source:D,examples:u.examples?[...u.examples]:void 0,metadata:u.metadata?jo(u.metadata):void 0}}function zs(u){let v=Vs.get(u);if(!v)throw Error(`Unknown sandbox plugin id: ${u}`);return v}async function yy(u){let v,D=[];try{let M=await vd(u.pluginPath);if(v=M.default??M[u.exportName],oy(v,u.pluginPath),v.manifest=Eo(v.manifest),!Ed(v.manifest,u.targeting))return{type:"skipped"};if(!iy(u.policy,[v.name,...u.policyNames??[]]))return{type:"policy_disabled",name:v.name};let I={tools:[],commands:[],rules:[],messageBuilders:[],providers:[],automationEventTypes:[],mcpServers:[],shortcuts:[],flags:[]},e={tools:new Map,commands:new Map,rules:new Map,messageBuilders:new Map},g={registerTool:(s)=>{let o=As(u.pluginId,"tool");e.tools.set(o,s.execute),I.tools.push({id:o,name:s.name,description:s.description,inputSchema:s.inputSchema,timeoutMs:s.timeoutMs,retryable:s.retryable,definition:dy(s)})},registerCommand:(s)=>{let o=As(u.pluginId,"command");if(typeof s.handler==="function")e.commands.set(o,s.handler);I.commands.push({id:o,name:s.name,description:s.description})},registerRule:(s)=>{let o=As(u.pluginId,"rule");if(typeof s.content==="function"){e.rules.set(o,s.content),I.rules.push({id:o,ruleId:s.id,source:s.source,hasContentHandler:!0});return}I.rules.push({id:o,ruleId:s.id,content:s.content,source:s.source})},registerMessageBuilder:(s)=>{let o=As(u.pluginId,"builder");e.messageBuilders.set(o,s.build),I.messageBuilders.push({id:o,name:s.name})},registerProvider:(s)=>{I.providers.push({id:As(u.pluginId,"provider"),name:s.name,description:s.description,metadata:jo(s.metadata)})},registerAutomationEventType:(s)=>{I.automationEventTypes.push({id:As(u.pluginId,"automation_event"),...fy(s)})},registerMcpServer:(s)=>{I.mcpServers.push(s)}};if(typeof v.setup==="function"){Fr(uy,{pluginPath:u.pluginPath});try{let s={...u.setupCtxBase,emitEvent:Fr,onDispose:(l)=>{if(typeof l==="function")D.push(l)},...u.telemetryEnabled?{telemetry:my(v.name)}:{},...u.loggerEnabled?{logger:hy(v.name)}:{},...v.manifest.capabilities.includes("automationEvents")?{automation:{ingestEvent:(l)=>{Fr("automation_event",l)}}}:{}};ay(s);let o=v.setup.bind(v);await _d(()=>o(g,s),u.setupTimeoutMs,`Plugin "${v.name}" setup`)}catch(s){return await _d(()=>Ad(v?.name??u.pluginPath,D),u.setupTimeoutMs??Ty,`Plugin "${v.name}" cleanup after failed setup`).catch(()=>{}),{type:"failure",failure:{pluginPath:u.pluginPath,pluginName:v.name,phase:"setup",message:s instanceof Error?s.message:String(s),stack:s instanceof Error?s.stack:void 0}}}}return{type:"loaded",state:{plugin:v,handlers:e,disposers:D},descriptor:{pluginId:u.pluginId,pluginPath:u.pluginPath,name:v.name,manifest:v.manifest,hooks:v.hooks?Object.entries(v.hooks).filter(([,s])=>typeof s==="function").map(([s])=>s):void 0,contributions:I}}}catch(M){return{type:"failure",failure:{pluginPath:u.pluginPath,pluginName:v?.name,phase:"load",message:M instanceof Error?M.message:String(M),stack:M instanceof Error?M.stack:void 0}}}}async function gy(u){if(Vs.clear(),Sd=0,Ro.clear(),u.cwd&&as){let n=u.cwd;process.cwd=()=>n}else if(u.cwd)try{process.chdir(u.cwd)}catch{}let v=globalThis.__clineSessionEnv;if(v)v.cwd=u.cwd,v.workspaceInfo=u.workspaceInfo;let D=[],M=[],I=[],e=[],g=u.exportName||"plugin",s=new Map,o={providerId:u.providerId,modelId:u.modelId},l={session:u.session,client:u.client,user:u.user,workspaceInfo:u.workspaceInfo,cwd:u.cwd},t=await Promise.all((u.pluginPaths||[]).map((n)=>{let y=`plugin_${++Sd}`;return yy({pluginPath:n,pluginId:y,exportName:g,targeting:o,setupCtxBase:l,setupTimeoutMs:u.setupTimeoutMs,policy:u.policy,policyNames:u.policyNames?.[n],loggerEnabled:u.loggerEnabled,telemetryEnabled:u.telemetryEnabled})}));for(let[n,y]of t.entries()){if(y.type==="skipped")continue;if(y.type==="policy_disabled"){e.push({pluginPath:u.pluginPaths?.[n]??"",name:y.name});continue}if(y.type==="failure"){M.push(y.failure);continue}let{descriptor:k,state:A}=y,S=s.get(k.name);if(S!==void 0){let f=D[S];if(!f)s.delete(k.name);else{I.push({type:"duplicate_plugin_override",pluginName:k.name,pluginPath:k.pluginPath,overriddenPluginPath:f.pluginPath,message:`Plugin "${k.name}" from ${k.pluginPath} overrides ${f.pluginPath}`}),Vs.delete(f.pluginId),D.splice(S,1),s.clear();for(let[m,d]of D.entries())s.set(d.name,m)}}Vs.set(k.pluginId,A),s.set(k.name,D.length),D.push(k)}return{plugins:D,failures:M,warnings:I,disabledByPolicy:e}}async function by(u){let D=zs(u.pluginId).plugin.hooks?.[u.hookName];if(typeof D!=="function")return;return await D(u.payload)}var Mo=new Map;async function xy(u){let D=zs(u.pluginId).handlers.tools.get(u.contributionId);if(typeof D!=="function")throw Error("Unknown sandbox tool contribution");let M=u.callId,I=new AbortController;if(u.aborted)I.abort();if(M)Mo.set(M,I);let e={...jo(u.context),signal:I.signal,emitEvent:Fr,emitUpdate:(g)=>{if(M)Fr(py,{callId:M,update:g})}};try{return await D(u.input,e)}finally{if(M)Mo.delete(M)}}async function vy(u){Mo.get(u.callId)?.abort(u.reason?Error(u.reason):void 0)}async function Ey(){for(let u of Vs.values())await Ad(u.plugin.name,u.disposers)}var Ty=3000;async function Ad(u,v){for(let D of v.splice(0).reverse())try{await D()}catch(M){Fr("plugin_log",{level:"error",pluginName:u,message:`onDispose cleanup failed: ${M instanceof Error?M.message:String(M)}`})}}async function Sy(u){let D=zs(u.pluginId).handlers.commands.get(u.contributionId);if(typeof D!=="function")return"";return await D(u.input)}async function _y(u){let D=zs(u.pluginId).handlers.messageBuilders.get(u.contributionId);if(typeof D!=="function")return[];return await D(u.messages)}async function Py(u){let D=zs(u.pluginId).handlers.rules.get(u.contributionId);if(typeof D!=="function")return"";return await D()}var Ay={initialize:gy,invokeHook:by,executeTool:xy,abortToolCall:vy,dispose:Ey,executeCommand:Sy,buildMessages:_y,resolveRuleContent:Py};async function Pd(u){if(!u||u.type!=="call")return;let v=Ay[u.method];if(!v){Oo(u.id,!1,void 0,{message:`Unknown method: ${String(u.method)}`});return}try{let D=await v(u.args||{});Oo(u.id,!0,D)}catch(D){Oo(u.id,!1,void 0,ly(D))}}if(as)as.on("message",Pd),Lo({type:"ready"});else Xu(),process.on("message",Pd);
|
|
570
|
+
Once you have presented your plan, end your turn and wait for the user's response. You do NOT have the ability to switch to act mode yourself -- the user must do it manually with the Plan/Act toggle once they are satisfied with the plan. If the task requires tools that are only available in act mode, ask the user to "toggle to Act mode" (use those words).`;var Ou=mt({id:je(),temperature:kt().optional(),maxTokens:kt().optional(),contextWindow:kt().optional(),inputPrice:kt().optional(),outputPrice:kt().optional(),supportsImages:xn().optional()}),Ru=mt({models:un(Ou).optional(),openAiBaseUrl:je().optional(),openAiHeaders:Wn(je(),je()).optional(),azureApiVersion:je().optional(),azureIdentity:xn().optional()}),Mu=mt({id:je(),thinkingBudgetTokens:kt().optional()}),Lu=mt({name:je(),baseModelId:je(),thinkingBudgetTokens:kt().optional()}),ju=mt({models:un(Mu).optional(),customModels:un(Lu).optional(),awsRegion:je().optional(),awsUseCrossRegionInference:xn().optional(),awsUseGlobalInference:xn().optional(),awsBedrockUsePromptCache:xn().optional(),awsBedrockEndpoint:je().optional()}),Fu=mt({id:je()}),Bu=mt({models:un(Fu).optional()}),Uu=mt({id:je(),thinkingBudgetTokens:kt().optional()}),$u=mt({models:un(Uu).optional(),vertexProjectId:je().optional(),vertexRegion:je().optional()}),Vu=mt({id:je(),thinkingBudgetTokens:kt().optional(),promptCachingEnabled:xn().optional()}),zu=mt({models:un(Vu).optional(),baseUrl:je().optional()}),Hu=mt({id:je(),thinkingBudgetTokens:kt().optional()}),Wu=mt({models:un(Hu).optional(),baseUrl:je().optional()}),yf=mt({OpenAiCompatible:Ru.optional(),AwsBedrock:ju.optional(),Cline:Bu.optional(),Vertex:$u.optional(),LiteLLM:zu.optional(),Anthropic:Wu.optional()}),qu=mt({id:je()}),Ku=mt({name:je(),url:je(),alwaysEnabled:xn().optional(),headers:Wn(je(),je()).optional()}),So=mt({alwaysEnabled:xn(),name:je(),contents:je()}),xi=mt({bucket:je(),accessKeyId:je(),secretAccessKey:je(),region:je().optional(),endpoint:je().optional(),accountId:je().optional()}),Gu=mt({enabled:xn().optional(),type:Es([qn("s3_access_keys"),qn("r2_access_keys"),qn("azure_access_keys")]).optional(),s3AccessSettings:xi.optional(),r2AccessSettings:xi.optional(),azureAccessSettings:xi.optional()}),Ju=mt({promptUploading:Gu.optional()}),gf=mt({version:je(),providerSettings:yf.optional(),telemetryEnabled:xn().optional(),kanbanEnabled:xn().optional(),mcpMarketplaceEnabled:xn().optional(),allowedMCPServers:un(qu).optional(),remoteMCPServers:un(Ku).optional(),blockPersonalRemoteMCPServers:xn().optional(),yoloModeAllowed:xn().optional(),openTelemetryEnabled:xn().optional(),openTelemetryMetricsExporter:je().optional(),openTelemetryLogsExporter:je().optional(),openTelemetryOtlpProtocol:je().optional(),openTelemetryOtlpEndpoint:je().optional(),openTelemetryOtlpHeaders:Wn(je(),je()).optional(),openTelemetryOtlpMetricsProtocol:je().optional(),openTelemetryOtlpMetricsEndpoint:je().optional(),openTelemetryOtlpMetricsHeaders:Wn(je(),je()).optional(),openTelemetryOtlpLogsProtocol:je().optional(),openTelemetryOtlpLogsEndpoint:je().optional(),openTelemetryOtlpLogsHeaders:Wn(je(),je()).optional(),openTelemetryMetricExportInterval:kt().optional(),openTelemetryOtlpInsecure:xn().optional(),openTelemetryLogBatchSize:kt().optional(),openTelemetryLogBatchTimeout:kt().optional(),openTelemetryLogMaxQueueSize:kt().optional(),enterpriseTelemetry:Ju.optional(),globalRules:un(So).optional(),globalWorkflows:un(So).optional()}),bf=Wn(je(),je());var xf=gn(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth","popular"]),vf=gn(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),Ef=gn(["anthropic","ai-sdk","ai-sdk-community","openai","openai-compatible","openai-r1","gemini","bedrock","custom","fetch","vertex"]);var Zu=["rules","skills","workflows","plugins","hooks"];var $0=new Set(Zu);var Tf=mt({rootPath:je().min(1),hint:je().min(1).optional(),associatedRemoteUrls:un(je().min(1)).optional(),latestGitCommitHash:je().min(1).optional(),latestGitBranchName:je().min(1).optional()}),H0=mt({currentWorkspacePath:je().min(1).optional(),workspaces:Wn(je().min(1),Tf)});var Sf=["current_state","boundary_analysis","interface_proposal"];var Ar=fu((u)=>u instanceof Date?u.toISOString():u,je().datetime()),Ss=gn(["pending","in_progress","blocked","completed"]),Yu=gn(["queued","running","completed","failed","cancelled","interrupted"]),vi=gn(["draft","in_review","finalized"]),_f=mt({agentId:je(),role:gn(["lead","teammate"]),description:je().optional(),status:gn(["idle","running","stopped"])}),G0=mt({agentId:je(),rolePrompt:je(),modelId:je().optional(),maxIterations:kt().optional()});function jn(u){return fu((v)=>v===null?void 0:v,u.optional())}var J0=mt({agentId:je().min(1).describe("Teammate identifier"),rolePrompt:je().min(1).describe("System prompt describing teammate role")}).strict(),Z0=mt({agentId:je().min(1).describe("Teammate identifier"),reason:jn(je().min(1)).describe("Optional shutdown reason")}),Y0=mt({}),Pf={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]};var X0=mt({action:gn(["create","list","claim","complete","block"]),title:jn(je().min(1)).describe("Task title"),description:jn(je().min(1)).describe("Task details"),dependsOn:jn(un(je().describe("Dependency task ID"))).describe("Array of dependency task IDs"),assignee:jn(je().min(1)).describe("Optional assignee"),status:jn(gn(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),taskId:jn(je()).describe("Task ID"),summary:jn(je().min(1)).describe("Completion summary"),reason:jn(je().min(1)).describe("Blocking reason")}).superRefine((u,v)=>{for(let D of Pf[u.action]){if(u[D]!==void 0)continue;v.addIssue({code:"custom",path:[D],message:`Field "${D}" is required when action=${u.action}`})}}),Q0=mt({agentId:je().describe("Teammate agent ID"),task:je().min(1).describe("Task instructions for the teammate"),taskId:jn(je()).describe("Optional shared task list ID"),runMode:jn(gn(["sync","async"])).describe("Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later."),continueConversation:jn(xn()).describe("If true, continue the teammate conversation; otherwise start fresh")}),ev=mt({status:jn(gn(["queued","running","completed","failed","cancelled","interrupted"])).describe("Optional run status filter. Omit to include all statuses."),agentId:jn(je().min(1)).describe("Optional teammate ID filter. Omit to include all teammates."),includeCompleted:jn(xn()).describe("Include completed/failed runs (default true)")}),tv=mt({runId:je().min(1).describe("Run ID"),reason:jn(je().min(1)).describe("Optional cancellation reason")}),nv=mt({runId:jn(je().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),rv=mt({toAgentId:je().min(1).describe("Recipient agent ID"),subject:je().min(1).describe("Message subject"),body:je().min(1).describe("Message body"),taskId:jn(je().min(1)).describe("Optional task ID context")}),sv=mt({subject:je().min(1).describe("Message subject"),body:je().min(1).describe("Message body"),taskId:jn(je().min(1)).describe("Optional task ID context")}),iv=mt({unreadOnly:jn(xn()).describe("Only unread messages for read action (default true)")}),ov=mt({kind:gn(["progress","handoff","blocked","decision","done","error"]),summary:je().min(1).describe("Update summary"),taskId:jn(je().min(1)).describe("Optional task ID context"),evidence:jn(un(je().min(1))).describe("Optional evidence links/snippets"),nextAction:jn(je().min(1)).describe("Planned next step")}),av=mt({}),lv=mt({title:je().describe("Outcome title"),requiredSections:un(je()).default(Sf).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),cv=mt({outcomeId:je().describe("Outcome ID"),section:je().describe("Section name"),sourceRunId:jn(je()).describe("Optional source run ID"),content:je().describe("Section fragment content")}),pv=mt({fragmentId:je().describe("Fragment ID"),approved:xn().describe("Review decision")}),uv=mt({outcomeId:je().describe("Outcome ID")}),dv=mt({}),hv=mt({teamId:je(),teamName:je(),members:un(_f),taskCounts:Wn(Ss,kt()),unreadMessages:kt(),missionLogEntries:kt(),activeRuns:kt(),queuedRuns:kt(),outcomeCounts:Wn(vi,kt())}),Af=mt({id:je(),title:je(),description:je(),status:Ss,createdAt:Ar,updatedAt:Ar,createdBy:je(),assignee:je().optional(),dependsOn:un(je()),summary:je().optional(),isReady:xn(),blockedBy:un(je())}),mv=fo("action",[mt({action:qn("create"),taskId:je(),status:Ss,ignoredFields:un(je()).optional(),note:je().optional()}),mt({action:qn("list"),tasks:un(Af)}),mt({action:qn("claim"),taskId:je(),status:Ss,nextStep:je()}),mt({action:qn("complete"),taskId:je(),status:Ss}),mt({action:qn("block"),taskId:je(),status:Ss})]),fv=mt({agentId:je(),mode:gn(["sync","async"]),status:gn(["dispatched","running","queued","joined"]),dispatched:xn(),message:je(),deduped:xn().optional(),runId:je().optional(),text:je().optional(),iterations:kt().optional()}),Cf=mt({textPreview:je(),iterations:kt(),finishReason:je(),durationMs:kt(),usage:mt({inputTokens:kt(),outputTokens:kt(),cacheReadTokens:kt().optional(),cacheWriteTokens:kt().optional(),totalCost:kt().optional()})}),yv=mt({id:je(),agentId:je(),taskId:je().optional(),status:Yu,messagePreview:je(),priority:kt(),retryCount:kt(),maxRetries:kt(),nextAttemptAt:Ar.optional(),continueConversation:xn().optional(),startedAt:Ar,endedAt:Ar.optional(),leaseOwner:je().optional(),heartbeatAt:Ar.optional(),lastProgressAt:Ar.optional(),lastProgressMessage:je().optional(),currentActivity:je().optional(),error:je().optional(),resultSummary:Cf.optional()}),gv=mt({id:je(),teamId:je(),fromAgentId:je(),toAgentId:je(),subject:je(),body:je(),taskId:je().optional(),sentAt:Ar,readAt:Ar.optional()}),bv=mt({id:je(),teamId:je(),title:je(),status:vi,requiredSections:un(je()),createdBy:je(),createdAt:Ar,finalizedAt:Ar.optional()}),xv=mt({outcomeId:je(),status:vi,requiredSections:un(je())}),vv=mt({agentId:je(),status:je()}),Ev=mt({runId:je(),status:Yu}),Tv=mt({id:je(),toAgentId:je()}),Sv=mt({delivered:kt()}),_v=mt({id:je()}),Pv=mt({status:je()}),Av=mt({fragmentId:je(),status:je()}),Cv=mt({outcomeId:je(),status:vi});function Xu(u=process){u.once("disconnect",()=>u.exit(0))}import{existsSync as nr,readFileSync as Ps}from"node:fs";import{builtinModules as Ff,createRequire as Io}from"node:module";import{dirname as qr,extname as $s,isAbsolute as Bf,resolve as wn}from"node:path";import{fileURLToPath as dd}from"node:url";var ko=qr(dd(import.meta.url)),Uf=Io(import.meta.url),$f=wn(ko,"..","..","..","..",".."),Ao=Hf($f),Vf=["@cline/sdk","@cline/agents","@cline/core","@cline/core/hub","@cline/core/hub/daemon-entry","@cline/core/telemetry","@cline/llms","@cline/llms/browser","@cline/shared","@cline/shared/automation","@cline/shared/browser","@cline/shared/storage","@cline/shared/db","@cline/shared/types"],Do=new Set(Ff.flatMap((u)=>[u,u.replace(/^node:/,"")])),Us=new Set(To),zf=["development","node","import","require","default"];function Hf(u){let v={},D={"@cline/sdk":wn(u,"packages/sdk/src/index.ts"),"@cline/agents":wn(u,"packages/agents/src/index.ts"),"@cline/core":wn(u,"packages/core/src/index.ts"),"@cline/llms":wn(u,"packages/llms/src/index.ts"),"@cline/shared":wn(u,"packages/shared/src/index.ts"),"@cline/shared/storage":wn(u,"packages/shared/src/storage/index.ts"),"@cline/shared/db":wn(u,"packages/shared/src/db/index.ts")};for(let[M,I]of Object.entries(D))if(nr(I))v[M]=I;for(let M of["agents","core","llms","shared"]){let I=wn(u,"packages",M),e=wn(I,"package.json");if(!nr(e))continue;try{let g=JSON.parse(Ps(e,"utf8"));if(typeof g.name!=="string"||!g.exports)continue;if(typeof g.exports==="string"){let s=wn(I,g.exports);if(nr(s))v[g.name]=s;continue}if(typeof g.exports!=="object")continue;for(let[s,o]of Object.entries(g.exports)){let l=Wf(I,o);if(!l)continue;let t=s==="."?g.name:`${g.name}/${s.replace(/^\.\//,"")}`;v[t]=l}}catch{}}return v}function Wf(u,v){let D=No(v);if(!D)return null;let M=hd(u,D);for(let I of M)if(nr(I))return I;return null}function No(u,v=new Set){if(typeof u==="string")return u;if(!u||typeof u!=="object")return null;if(v.has(u))return null;v.add(u);let D=u;for(let M of zf){let I=No(D[M],v);if(I)return I}return null}function hd(u,v){let D=v.replace(/^\.\//,""),M=[wn(u,v)];if(D.startsWith("dist/")){let I=D.replace(/^dist\//,"src/").replace(/\.(mjs|cjs|js)$/,"");return[wn(u,`${I}.ts`),wn(u,`${I}.tsx`),wn(u,`${I}.mts`),wn(u,`${I}.cts`),...M]}return M}function qf(u){return Object.fromEntries(Object.entries(u).sort(([v],[D])=>D.length-v.length))}function Ei(u){return!(u.startsWith(".")||u.startsWith("/")||u.startsWith("file:")||u.startsWith("data:")||u.startsWith("http:")||u.startsWith("https:"))}function _s(u){if(u.startsWith("@")){let[v,D]=u.split("/",3);return D?`${v}/${D}`:u}return u.split("/",1)[0]??u}function Kf(u){let v=_s(u);if(u===v)return".";return`.${u.slice(v.length)}`}function md(u){return _s(u).startsWith("@cline/")}function Co(u,v){let D=_s(v),M=qr(u);while(!0){let I=wn(M,"node_modules",D);if(nr(I)||nr(wn(I,"package.json")))return!0;let e=wn(M,"..");if(e===M)return!1;M=e}}function pd(u){return wo(u)!==null}function wo(u){try{return Uf.resolve(u)}catch{}return Gf(u)}function Gf(u){let v=_s(u),D=fd(v);if(!D)return null;let M=wn(D,"package.json");try{let I=JSON.parse(Ps(M,"utf8")),e=Kf(u),g=e==="."&&typeof I.exports==="string"?I.exports:I.exports&&typeof I.exports==="object"&&Object.hasOwn(I.exports,e)?I.exports[e]:void 0,s=No(g)??(e==="."&&typeof I.main==="string"?I.main:null);if(!s)return null;let o=wn(D,s),l=[o,...hd(D,s).filter((t)=>t!==o)];for(let t of l)if(nr(t))return t;return null}catch{return null}}function Jf(){let u=[ko],v=process.env.CLINE_WRAPPER_PATH?.trim();if(v)u.push(qr(qr(v)));let D=process.execPath?.trim();if(D)u.push(qr(D));return[...new Set(u.map((M)=>wn(M)))]}function Zf(u,v){let D=u;while(!0){let M=wn(D,"package.json");if(nr(M))try{if(JSON.parse(Ps(M,"utf8")).name===v)return D}catch{}let I=wn(D,"node_modules",v,"package.json");if(nr(I))return qr(I);let e=wn(D,"..");if(e===D)return null;D=e}}function fd(u){for(let v of Jf()){let D=Zf(v,u);if(D)return D}return null}function Yf(u){let D=qr(u);for(let M=0;M<4;M++){let I=wn(D,"package.json");if(nr(I))try{let g=JSON.parse(Ps(I,"utf8"));return g!=null&&typeof g==="object"&&"cline"in g}catch{return!1}let e=wn(D,"..");if(e===D)return!1;D=e}return!1}function yd(u,v){let D=v.startsWith("file:")?dd(v):Bf(v)?v:wn(qr(u),v);if(nr(D)&&Us.has($s(D)))return D;for(let M of Us){let I=`${D}${M}`;if(nr(I))return I}for(let M of Us){let I=wn(D,`index${M}`);if(nr(I))return I}return null}function gd(u){let v=new Set,D=[/\bimport\s+(?:type\s+)?[^"'`]*?\bfrom\s*["'`]([^"'`]+)["'`]/g,/\bexport\s+[^"'`]*?\bfrom\s*["'`]([^"'`]+)["'`]/g,/\bimport\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/g,/\brequire\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/g];for(let M of D)for(let I of u.matchAll(M)){let e=I[1];if(e)v.add(e)}return[...v]}function Xf(u){return $s(u)!==".ts"}function bd(u,v,D=new Set){if(D.has(u)||!nr(u))return;if(D.add(u),!Us.has($s(u)))return;let M=Ps(u,"utf8"),I=Xf(u);for(let e of gd(M)){if(e.startsWith("node:")||Do.has(e))continue;if(Ei(e)){if(!I)continue;if(Object.hasOwn(Ao,e)||Object.hasOwn(Ao,_s(e))||Co(u,e)||md(e)&&pd(e)||v&&pd(e))continue;throw Error(`Cannot find module '${_s(e)}'`)}let g=yd(u,e);if(g)bd(g,v,D)}}function xd(u,v=new Set,D=new Set){if(v.has(u)||!nr(u))return D;if(v.add(u),!Us.has($s(u)))return D;let M=Ps(u,"utf8");for(let I of gd(M)){if(D.add(I),Ei(I))continue;let e=yd(u,I);if(e)xd(e,v,D)}return D}function Qf(u,v){let D=Io(u),M={},I=xd(u),e=new Set(Vf);for(let[g,s]of Object.entries(Ao)){try{D.resolve(g);continue}catch{}M[g]=s}for(let g of I)if(Ei(g)&&(md(g)||v))e.add(g);for(let g of e){if(Object.hasOwn(M,g)||Co(u,g))continue;let s=wo(g);if(s)M[g]=s}if(!v)return M;for(let g of I){if(!Ei(g)||Object.hasOwn(M,g)||Co(u,g)||g.startsWith("node:")||Do.has(g))continue;let s=wo(g);if(s)M[g]=s}return M}function ey(u){let v=$s(u);return v===".ts"||v===".tsx"||v===".mts"||v===".cts"}var os;function ty(){if(os!==void 0)return os;let u=fd("jiti");if(!u)return os=null,null;let v=wn(u,"dist","babel.cjs");if(!nr(v))return os=null,null;try{let M=Io(v)(v);os=typeof M==="function"?M:null}catch{os=null}return os}var ud;function ny(){return ud??=(async()=>{try{let u=await Promise.resolve().then(() => (sd(),{})),v=Of;if(typeof v!=="function")return null;let D=v(ko,{cache:!1,interopDefault:!1});return(M)=>({code:D.transform(M)})}catch{return null}})(),ud}async function vd(u,v={}){let D=!Yf(u);bd(u,D);let M=Qf(u,D),I=qf(M),e=await Promise.resolve().then(() => (cd(),ld)),g=typeof e==="function"?e:typeof e.default==="function"?e.default:void 0;if(!g)throw Error("Unable to load jiti");let s=Object.entries(I).filter(([,n])=>ey(n)).map(([n])=>n),o=ty()??await ny(),l=o?(n)=>o({...n,interopDefault:!0}):void 0;return await g(u,{alias:I,cache:v.freshModule?!0:v.useCache,requireCache:v.freshModule?!1:v.useCache,esmResolve:!0,interopDefault:!1,nativeModules:[...Do],transformModules:s,tryNative:!1,...l?{transform:l}:{}}).import(u,{})}function Ed(u,v){if(!u)return!0;if(u.providerIds?.length){if(!v?.providerId||!u.providerIds.includes(v.providerId))return!1}if(u.modelIds?.length){if(!v?.modelId||!u.modelIds.includes(v.modelId))return!1}return!0}function iy(u,v){if(!u)return!0;for(let D of v){let M=u[D]?.enabled;if(typeof M==="boolean")return M}return u["*"]?.enabled??!0}function jr(u){return typeof u==="object"&&u!==null}function Td(u){return Array.isArray(u)&&u.every((v)=>typeof v==="string")}function oy(u,v){if(!jr(u))throw Error(`Invalid plugin module: ${v}`);if(typeof u.name!=="string"||!u.name)throw Error(`Invalid plugin name: ${v}`);if(!jr(u.manifest))throw Error(`Invalid plugin manifest: ${v}`);if(Object.hasOwn(u.manifest,"providerIds")&&!Td(u.manifest.providerIds))throw Error(`Invalid plugin manifest.providerIds: ${v}`);if(Object.hasOwn(u.manifest,"modelIds")&&!Td(u.manifest.modelIds))throw Error(`Invalid plugin manifest.modelIds: ${v}`)}function ay(u){if(!jr(u))throw Error("Plugin setup context must be an object");if(u.session!==void 0&&!jr(u.session))throw Error("Plugin setup context session must be an object");if(u.client!==void 0&&!jr(u.client))throw Error("Plugin setup context client must be an object");if(u.user!==void 0&&!jr(u.user))throw Error("Plugin setup context user must be an object");if(u.workspaceInfo!==void 0&&!jr(u.workspaceInfo))throw Error("Plugin setup context workspaceInfo must be an object");if(u.automation!==void 0&&!jr(u.automation))throw Error("Plugin setup context automation must be an object");if(u.automation!==void 0&&typeof u.automation.ingestEvent!=="function")throw Error("Plugin setup context automation.ingestEvent must be a function");if(u.logger!==void 0&&!jr(u.logger))throw Error("Plugin setup context logger must be an object")}var Sd=0,Vs=new Map,Ro=new Map;function ly(u){let v=u instanceof Error?u.message:String(u),D=u instanceof Error?u.stack:void 0;return{message:v,stack:D}}var as=ry?void 0:sy;if(as){let u=()=>{};console.log=u,console.info=u,console.debug=u,console.dir=u,console.table=u,process.stdout.write=(v,...D)=>{let M=D.find((I)=>typeof I==="function");if(M)process.nextTick(M);return!0}}function cy(u){return u instanceof Error&&(u.name==="DataCloneError"||/could not be cloned/i.test(u.message))}function Lo(u){if(as){try{as.postMessage(u)}catch(v){if(!cy(v))throw v;as.postMessage(JSON.parse(JSON.stringify(u)))}return}process.send?.(u)}function Oo(u,v,D,M){Lo({type:"response",id:u,ok:v,result:D,error:M})}function Fr(u,v){Lo({type:"event",name:u,payload:v})}var py="__cline_tool_update",uy="__cline_setup_started";function dy(u){let v={};for(let[D,M]of Object.entries(u)){if(D==="execute"||typeof M==="function")continue;v[D]=M}return JSON.parse(JSON.stringify(v))}function _d(u,v,D){if(!v||v<=0)return Promise.resolve().then(u);return new Promise((M,I)=>{let e=setTimeout(()=>I(Error(`${D} timed out after ${v}ms`)),v);Promise.resolve().then(u).then(M,I).finally(()=>clearTimeout(e))})}globalThis.__clinePluginHost={emitEvent:Fr};globalThis.__clineSessionEnv={cwd:void 0,workspaceInfo:void 0};function jo(u){if(!u||typeof u!=="object")return{};return u}function Ti(u){if(!u||typeof u!=="object")return;let v={...u};if(v.error instanceof Error)v.error={name:v.error.name,message:v.error.message,stack:v.error.stack};return v}function hy(u){let v=(D,M,I)=>{Fr("plugin_log",{level:D,pluginName:u,message:M,metadata:Ti(I)})};return{debug:(D,M)=>v("debug",D,M),log:(D,M)=>v("log",D,M),error:(D,M)=>v("error",D,M)}}function my(u){let v=(I)=>{Fr("plugin_telemetry",{pluginName:u,...I})},D=(I)=>(e,g,s,o,l)=>{v({kind:"metric",metric:I,name:e,value:g,attributes:Ti(s),description:o,required:l})},M=()=>{};return{capture:(I)=>{v({kind:"event",event:I?.event,properties:Ti(I?.properties)})},captureRequired:(I,e)=>{v({kind:"event",event:I,properties:Ti(e),required:!0})},recordCounter:D("counter"),recordHistogram:D("histogram"),recordGauge:D("gauge"),isEnabled:()=>!0,setDistinctId:M,setMetadata:M,updateMetadata:M,setCommonProperties:M,updateCommonProperties:M,flush:async()=>{},dispose:async()=>{}}}function As(u,v){let D=`${u}:${v}`,M=(Ro.get(D)??0)+1;return Ro.set(D,M),`${u}_${v}_${M}`}function fy(u){let v=typeof u.eventType==="string"?u.eventType.trim():"",D=typeof u.source==="string"?u.source.trim():"";if(!v)throw Error("Automation event type contribution requires eventType");if(!D)throw Error("Automation event type contribution requires source");return{...u,eventType:v,source:D,examples:u.examples?[...u.examples]:void 0,metadata:u.metadata?jo(u.metadata):void 0}}function zs(u){let v=Vs.get(u);if(!v)throw Error(`Unknown sandbox plugin id: ${u}`);return v}async function yy(u){let v,D=[];try{let M=await vd(u.pluginPath);if(v=M.default??M[u.exportName],oy(v,u.pluginPath),v.manifest=Eo(v.manifest),!Ed(v.manifest,u.targeting))return{type:"skipped"};if(!iy(u.policy,[v.name,...u.policyNames??[]]))return{type:"policy_disabled",name:v.name};let I={tools:[],commands:[],rules:[],messageBuilders:[],providers:[],automationEventTypes:[],mcpServers:[],shortcuts:[],flags:[]},e={tools:new Map,commands:new Map,rules:new Map,messageBuilders:new Map},g={registerTool:(s)=>{let o=As(u.pluginId,"tool");e.tools.set(o,s.execute),I.tools.push({id:o,name:s.name,description:s.description,inputSchema:s.inputSchema,timeoutMs:s.timeoutMs,retryable:s.retryable,definition:dy(s)})},registerCommand:(s)=>{let o=As(u.pluginId,"command");if(typeof s.handler==="function")e.commands.set(o,s.handler);I.commands.push({id:o,name:s.name,description:s.description})},registerRule:(s)=>{let o=As(u.pluginId,"rule");if(typeof s.content==="function"){e.rules.set(o,s.content),I.rules.push({id:o,ruleId:s.id,source:s.source,hasContentHandler:!0});return}I.rules.push({id:o,ruleId:s.id,content:s.content,source:s.source})},registerMessageBuilder:(s)=>{let o=As(u.pluginId,"builder");e.messageBuilders.set(o,s.build),I.messageBuilders.push({id:o,name:s.name})},registerProvider:(s)=>{I.providers.push({id:As(u.pluginId,"provider"),name:s.name,description:s.description,metadata:jo(s.metadata)})},registerAutomationEventType:(s)=>{I.automationEventTypes.push({id:As(u.pluginId,"automation_event"),...fy(s)})},registerMcpServer:(s)=>{I.mcpServers.push(s)}};if(typeof v.setup==="function"){Fr(uy,{pluginPath:u.pluginPath});try{let s={...u.setupCtxBase,emitEvent:Fr,onDispose:(l)=>{if(typeof l==="function")D.push(l)},...u.telemetryEnabled?{telemetry:my(v.name)}:{},...u.loggerEnabled?{logger:hy(v.name)}:{},...v.manifest.capabilities.includes("automationEvents")?{automation:{ingestEvent:(l)=>{Fr("automation_event",l)}}}:{}};ay(s);let o=v.setup.bind(v);await _d(()=>o(g,s),u.setupTimeoutMs,`Plugin "${v.name}" setup`)}catch(s){return await _d(()=>Ad(v?.name??u.pluginPath,D),u.setupTimeoutMs??Ty,`Plugin "${v.name}" cleanup after failed setup`).catch(()=>{}),{type:"failure",failure:{pluginPath:u.pluginPath,pluginName:v.name,phase:"setup",message:s instanceof Error?s.message:String(s),stack:s instanceof Error?s.stack:void 0}}}}return{type:"loaded",state:{plugin:v,handlers:e,disposers:D},descriptor:{pluginId:u.pluginId,pluginPath:u.pluginPath,name:v.name,manifest:v.manifest,hooks:v.hooks?Object.entries(v.hooks).filter(([,s])=>typeof s==="function").map(([s])=>s):void 0,contributions:I}}}catch(M){return{type:"failure",failure:{pluginPath:u.pluginPath,pluginName:v?.name,phase:"load",message:M instanceof Error?M.message:String(M),stack:M instanceof Error?M.stack:void 0}}}}async function gy(u){if(Vs.clear(),Sd=0,Ro.clear(),u.cwd&&as){let n=u.cwd;process.cwd=()=>n}else if(u.cwd)try{process.chdir(u.cwd)}catch{}let v=globalThis.__clineSessionEnv;if(v)v.cwd=u.cwd,v.workspaceInfo=u.workspaceInfo;let D=[],M=[],I=[],e=[],g=u.exportName||"plugin",s=new Map,o={providerId:u.providerId,modelId:u.modelId},l={session:u.session,client:u.client,user:u.user,workspaceInfo:u.workspaceInfo,cwd:u.cwd},t=await Promise.all((u.pluginPaths||[]).map((n)=>{let y=`plugin_${++Sd}`;return yy({pluginPath:n,pluginId:y,exportName:g,targeting:o,setupCtxBase:l,setupTimeoutMs:u.setupTimeoutMs,policy:u.policy,policyNames:u.policyNames?.[n],loggerEnabled:u.loggerEnabled,telemetryEnabled:u.telemetryEnabled})}));for(let[n,y]of t.entries()){if(y.type==="skipped")continue;if(y.type==="policy_disabled"){e.push({pluginPath:u.pluginPaths?.[n]??"",name:y.name});continue}if(y.type==="failure"){M.push(y.failure);continue}let{descriptor:k,state:A}=y,S=s.get(k.name);if(S!==void 0){let f=D[S];if(!f)s.delete(k.name);else{I.push({type:"duplicate_plugin_override",pluginName:k.name,pluginPath:k.pluginPath,overriddenPluginPath:f.pluginPath,message:`Plugin "${k.name}" from ${k.pluginPath} overrides ${f.pluginPath}`}),Vs.delete(f.pluginId),D.splice(S,1),s.clear();for(let[m,d]of D.entries())s.set(d.name,m)}}Vs.set(k.pluginId,A),s.set(k.name,D.length),D.push(k)}return{plugins:D,failures:M,warnings:I,disabledByPolicy:e}}async function by(u){let D=zs(u.pluginId).plugin.hooks?.[u.hookName];if(typeof D!=="function")return;return await D(u.payload)}var Mo=new Map;async function xy(u){let D=zs(u.pluginId).handlers.tools.get(u.contributionId);if(typeof D!=="function")throw Error("Unknown sandbox tool contribution");let M=u.callId,I=new AbortController;if(u.aborted)I.abort();if(M)Mo.set(M,I);let e={...jo(u.context),signal:I.signal,emitEvent:Fr,emitUpdate:(g)=>{if(M)Fr(py,{callId:M,update:g})}};try{return await D(u.input,e)}finally{if(M)Mo.delete(M)}}async function vy(u){Mo.get(u.callId)?.abort(u.reason?Error(u.reason):void 0)}async function Ey(){for(let u of Vs.values())await Ad(u.plugin.name,u.disposers)}var Ty=3000;async function Ad(u,v){for(let D of v.splice(0).reverse())try{await D()}catch(M){Fr("plugin_log",{level:"error",pluginName:u,message:`onDispose cleanup failed: ${M instanceof Error?M.message:String(M)}`})}}async function Sy(u){let D=zs(u.pluginId).handlers.commands.get(u.contributionId);if(typeof D!=="function")return"";return await D(u.input)}async function _y(u){let D=zs(u.pluginId).handlers.messageBuilders.get(u.contributionId);if(typeof D!=="function")return[];return await D(u.messages)}async function Py(u){let D=zs(u.pluginId).handlers.rules.get(u.contributionId);if(typeof D!=="function")return"";return await D()}var Ay={initialize:gy,invokeHook:by,executeTool:xy,abortToolCall:vy,dispose:Ey,executeCommand:Sy,buildMessages:_y,resolveRuleContent:Py};async function Pd(u){if(!u||u.type!=="call")return;let v=Ay[u.method];if(!v){Oo(u.id,!1,void 0,{message:`Unknown method: ${String(u.method)}`});return}try{let D=await v(u.args||{});Oo(u.id,!0,D)}catch(D){Oo(u.id,!1,void 0,ly(D))}}if(as)as.on("message",Pd),Lo({type:"ready"});else Xu(),process.on("message",Pd);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./Chat-isxvWEr4.js";export{e as Mermaid};
|