import{Gc as _,Ic as v}from"./cli-0.5.12-y66stscm.mjs";import{Ne as Z,Oe as P}from"./cli-0.5.12-am3j4jcx.mjs";import{Pt as Y,Tt as A,rt as X,tt as K}from"./cli-0.5.12-zc0qwdy2.mjs";import{qV as V,tV as C}from"./cli-0.5.12-f5pfjvdk.mjs";import{BZ as H,DZ as Q}from"./cli-0.5.12-c6whkxmz.mjs";import{EZ as W}from"./cli-0.5.12-w3hy6c60.mjs";import{Mca as L,Nca as U}from"./cli-0.5.12-vp5smcs1.mjs";import{Yna as B,aoa as M}from"./cli-0.5.12-xzeb7mtb.mjs";function x({children:q}){let{bindings:D}=X(),F=J.useRef(null),E=J.useRef(new Map),G=J.useRef(new Set).current;return H(V,{bindings:D,pendingChordRef:F,pendingChord:null,setPendingChord:()=>{},activeContexts:G,registerActiveContext:()=>{},unregisterActiveContext:()=>{},handlerRegistryRef:E,children:q})}function y(q){if(!("message"in q))return 1;let D=q.message.content;return Array.isArray(D)?D.length:1}async function b(q,D,F,{columns:E,verbose:G=!1,chunkSize:I=40,onProgress:$}={}){let T=(w)=>_(H(Y,{children:H(x,{children:H(Z,{messages:q,tools:D,commands:[],verbose:G,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:"export",screen:"prompt",streamingToolUses:[],showAllInTranscript:!0,isLoading:!1,renderRange:w})})}),E),N=I;for(let w of q)N+=y(w);for(let w=0;w<N;w+=I){let O=await T([w,w+I]);if(L(O).trim()==="")break;await F(O),$?.(w+I)}}async function l(q,D=[],F){let E=[];return await b(q,D,(G)=>void E.push(L(G)),{columns:F}),E.join("")}var J;var j=M(()=>{U();P();C();K();A();v();Q();J=B(W(),1)});
export{l as Ib,j as Jb};
