function H(h,B={}){const j=[];if(h instanceof URL)throw new TypeError("Watch URLs are not supported yet");else if(Buffer.isBuffer(h))h=h.toString();else if(typeof h!=="string")throw new TypeError("Expected path to be a string or Buffer");let z=null;if(typeof B==="string")B={encoding:B};return D.watch(h,B||{},(A,S)=>{if(j.push({eventType:A,filename:S}),z){const q=z;z=null,q()}}),{async*[Symbol.asyncIterator](){let A=!1;while(!A){while(j.length){let S=j.shift();if(S.eventType==="close"){A=!0;break}if(S.eventType==="error")throw A=!0,S.filename;yield S}await new Promise((S)=>z=S)}}}}var D=Bun.fs(),C="::bunternal::",G={[C]:(h)=>{var B={[C]:function(j,z,A){var S;try{S=h.apply(D,A),A=void 0}catch(q){A=void 0,z(q);return}j(S)}}[C];return async function(...j){return await new Promise((z,A)=>{process.nextTick(B,z,A,j)})}}}[C],I=G(D.accessSync),J=G(D.appendFileSync),K=G(D.closeSync),L=G(D.copyFileSync),w=G(D.existsSync),F=G(D.chownSync),M=G(D.chmodSync),b=G(D.fchmodSync),N=G(D.fchownSync),O=G(D.fstatSync),P=G(D.fsyncSync),Q=G(D.ftruncateSync),U=G(D.futimesSync),V=G(D.lchmodSync),X=G(D.lchownSync),Y=G(D.linkSync),Z=G(D.lstatSync),_=G(D.mkdirSync),$=G(D.mkdtempSync),T=G(D.openSync),u=G(D.readSync),W=G(D.writeSync),k=G(D.readdirSync),d=G(D.readFileSync),c=G(D.writeFileSync),R=G(D.readlinkSync),E=G(D.realpathSync),x=G(D.renameSync),v=G(D.statSync),a=G(D.symlinkSync),y=G(D.truncateSync),l=G(D.unlinkSync),p=G(D.utimesSync),m=G(D.lutimesSync),n=G(D.rmSync),t=G(D.rmdirSync),o=(h,B,j)=>{return new Promise((z,A)=>{try{var S=D.writevSync(h,B,j)}catch(q){A(q);return}z({bytesWritten:S,buffers:B})})},g=(h,B,j)=>{return new Promise((z,A)=>{try{var S=D.readvSync(h,B,j)}catch(q){A(q);return}z({bytesRead:S,buffers:B})})},r={access:I,appendFile:J,close:K,copyFile:L,exists:w,chown:F,chmod:M,fchmod:b,fchown:N,fstat:O,fsync:P,ftruncate:Q,futimes:U,lchmod:V,lchown:X,link:Y,lstat:Z,mkdir:_,mkdtemp:$,open:T,read:u,write:W,readdir:k,readFile:d,writeFile:c,readlink:R,realpath:E,rename:x,stat:v,symlink:a,truncate:y,unlink:l,utimes:p,lutimes:m,rm:n,rmdir:t,watch:H,writev:o,readv:g,constants,[Symbol.for("CommonJS")]:0};export{o as writev,c as writeFile,W as write,H as watch,p as utimes,l as unlink,y as truncate,a as symlink,v as stat,t as rmdir,n as rm,x as rename,E as realpath,g as readv,R as readlink,k as readdir,d as readFile,u as read,T as open,$ as mkdtemp,_ as mkdir,m as lutimes,Z as lstat,Y as link,X as lchown,V as lchmod,U as futimes,Q as ftruncate,P as fsync,O as fstat,N as fchown,b as fchmod,w as exists,r as default,L as copyFile,K as close,F as chown,M as chmod,J as appendFile,I as access};