import{so as e}from"./auth-profiles-qXC1L8hs.js";import{d as t,l as n}from"./types.secrets-D4tbc3Wq.js";function r(e){return e instanceof Error&&e.message.trim().length>0?e.message:String(e)}async function i(i){let a=i.defaults??i.config.secrets?.defaults,{ref:o}=t({value:i.value,defaults:a});if(o)try{return await e(o,{config:i.config,env:i.env??process.env})}catch(e){throw Error(`${i.path}: failed to resolve SecretRef "${o.source}:${o.provider}:${o.id}": ${r(e)}`,{cause:e})}return n(i.value)}export{i as t};
