require(`./paths-BvlJvmRS.cjs`);const e=require(`./logger-BYbgqzvt.cjs`),t=require(`./proxy-env-DHDz8MfA.cjs`);let n=require(`undici`);const r=Symbol.for(`openclaw.proxyFetch.proxyUrl`);function i(e){let t=null,i=()=>(t||=new n.ProxyAgent(e),t),a=((e,t)=>(0,n.fetch)(e,{...t,dispatcher:i()}));return Object.defineProperty(a,r,{value:e,enumerable:!1,configurable:!1,writable:!1}),a}function a(e){let t=e?.[r];return typeof t==`string`&&t.trim()||void 0}function o(){if(t.t(`https`))try{let e=new n.EnvHttpProxyAgent;return((t,r)=>(0,n.fetch)(t,{...r,dispatcher:e}))}catch(t){e.i(`Proxy env var set but agent creation failed — falling back to direct fetch: ${t instanceof Error?t.message:String(t)}`);return}}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
