"use strict";exports.id=8514,exports.ids=[8514],exports.modules={28514:(a,b,c)=>{c.d(b,{J8:()=>q,Pq:()=>n,e3:()=>o,getSecret:()=>m,listSecretKeys:()=>p});var d=c(73024),e=c(76760),f=c.n(e),g=c(77598),h=c(73652);let i=f().join((0,h._)(),"secrets");function j(a,b,c){return f().join(i,a,function(a,b){if("global"===a)return"_";if(!b)throw Error("project-scope secrets require rootId");return/^[a-f0-9]{8,64}$/.test(b)?b:(0,g.createHash)("sha1").update(b).digest("hex").slice(0,16)}(a,c),`${b}.json`)}async function k(a){try{let b=await d.promises.readFile(a,"utf8"),c=JSON.parse(b);if(1!==c.version||!c.values||"object"!=typeof c.values)return{version:1,values:{}};return{version:1,values:c.values}}catch{return{version:1,values:{}}}}async function l(a,b){await d.promises.mkdir(f().dirname(a),{recursive:!0}),await d.promises.writeFile(a,JSON.stringify(b,null,2)+"\n",{encoding:"utf8",mode:384});try{await d.promises.chmod(a,384)}catch{}}async function m(a,b,c,d){let e=await k(j(a,b,d));return Object.prototype.hasOwnProperty.call(e.values,c)?e.values[c]:null}async function n(a,b,c,d,e){let f=j(a,b,e),g=await k(f);g.values[c]=d,await l(f,g)}async function o(a,b,c,d){let e=j(a,b,d),f=await k(e);c in f.values&&(delete f.values[c],await l(e,f))}async function p(a,b,c){return Object.keys((await k(j(a,b,c))).values).sort()}async function q(a,b,c){let e=j(a,b,c);try{await d.promises.unlink(e)}catch{}}}};