import{J as e,L as t,aN as n,aS as r,bA as i,bC as a,bE as o,bG as s,bH as c,bM as l,bP as u,bR as d,bT as f,bZ as p,by as m,c1 as h,t as g,u as _,v,w as y,x as b,y as x}from"./index-Cqd4rp-B.js";import{b as S}from"./route-block-DVyt-3Cw.js";const C={bg:`orange-50 dark:orange-900/20`,"rounded-xl":``,"p-4":``,flex:`~ col gap-3`},w={"text-xl":``,"font-semibold":``,text:`orange-700 dark:orange-500`},T={underline:``,href:`https://docs.anthropic.com/en/api/openai-sdk`},E=`anthropic`;var D=d({__name:`anthropic`,setup(d){let{t:S}=t(),D=n(),O=e(),{providers:k}=r(O),A=u(()=>O.getProviderMetadata(E)),j=u({get:()=>k.value[E]?.apiKey||``,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=u({get:()=>k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});l(()=>{k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=k.value[E]?.apiKey||``,M.value=k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`}),i([j,M],()=>{k.value[E]={...k.value[E],apiKey:j.value,baseUrl:M.value||`https://api.anthropic.com/v1/`}});function N(){k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}}return(e,t)=>(a(),c(p(g),{"provider-name":A.value?.localizedName||`Anthropic | Claude`,"provider-icon":A.value?.icon,"on-back":()=>p(D).back()},{default:f(()=>[o(`div`,C,[o(`h2`,w,h(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),o(`p`,null,[s(h(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),o(`a`,T,h(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),s(`, `+h(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),t[2]||=o(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),s(` `+h(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),o(`p`,null,[s(h(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),t[3]||=o(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),s(` `+h(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),m(p(_),null,{default:f(()=>[m(p(v),{title:p(S)(`settings.pages.providers.common.section.basic.title`),description:p(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:f(()=>[m(p(b),{modelValue:j.value,"onUpdate:modelValue":t[0]||=e=>j.value=e,"provider-name":A.value?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),m(p(x),{title:p(S)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[m(p(y),{modelValue:M.value,"onUpdate:modelValue":t[1]||=e=>M.value=e,placeholder:`https://api.anthropic.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`]))}});typeof S==`function`&&S(D);var O=D;export{O as default}; |