module.exports=[50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},67910,e=>{"use strict";var t=e.i(74533);e.s(["execWithStdin",0,function(e,r,i,s){return new Promise((n,o)=>{let a=(0,t.spawn)(e,r,{stdio:["pipe","pipe","pipe"],timeout:s?.timeout}),c="",l="";a.stdout.on("data",e=>{c+=e}),a.stderr.on("data",e=>{l+=e}),a.on("error",o),a.stdin.on("error",o),a.on("close",e=>{0===e?n({stdout:c,stderr:l}):o(Error(`Exit ${e}: ${l}`))}),a.stdin.write(i),a.stdin.end()})}])},22742,e=>{"use strict";var t=e.i(2157),r=e.i(50227),i=e.i(60526),s=e.i(67910);e.s(["WindowsDpapiSecretClient",0,class{secretsDir;psBinary;constructor(e,s){this.secretsDir=e??(0,r.join)((0,i.homedir)(),".personal-agent","secrets"),this.psBinary=s??"powershell.exe",(0,t.mkdirSync)(this.secretsDir,{recursive:!0})}filePath(e){if(/[/\\]/.test(e))throw Error(`Invalid secret name: ${e}`);return(0,r.join)(this.secretsDir,`${e}.dpapi`)}async has(e){return(0,t.existsSync)(this.filePath(e))}async get(e){let r=this.filePath(e);if(!(0,t.existsSync)(r))return null;let i=(0,t.readFileSync)(r,"utf-8").trim(),{stdout:n}=await (0,s.execWithStdin)(this.psBinary,["-NoProfile","-NonInteractive","-Command","$enc = [System.Console]::In.ReadToEnd().Trim(); $ss = ConvertTo-SecureString $enc; $bstr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($ss); try { [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($bstr) }; finally { [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($bstr) }"],i,{timeout:1e4});return n.trimEnd()}async set(e,r){let i=this.filePath(e),{stdout:n}=await (0,s.execWithStdin)(this.psBinary,["-NoProfile","-NonInteractive","-Command","$plain = [System.Console]::In.ReadToEnd(); $ss = ConvertTo-SecureString $plain -AsPlainText -Force; ConvertFrom-SecureString $ss"],r,{timeout:1e4});(0,t.writeFileSync)(i,n.trim(),"utf-8")}async delete(e){let r=this.filePath(e);(0,t.existsSync)(r)&&(0,t.unlinkSync)(r)}}])}];

//# sourceMappingURL=%5Broot-of-the-server%5D__02gp4s0._.js.map