import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dV as a,dW as o,dZ as s,d_ as c,e5 as l,e7 as u,ee as d,ef as f,em as p,eq as m,g as h,h as g,i as _,j as v,k as y,l as b,y as x}from"./index-B9WIljdS.js";import{b as S}from"./route-block-gWR0cCIm.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=t({__name:`anthropic`,setup(t){let{t:S}=e(),D=n(),O=x(),{providers:k}=r(O),A=i(()=>O.getProviderMetadata(E)),j=i({get:()=>k.value[E]?.apiKey||``,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=i({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/`}),d([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)=>(u(),o(p(h),{"provider-name":A.value?.localizedName||`Anthropic | Claude`,"provider-icon":A.value?.icon,"on-back":()=>p(D).back()},{default:f(()=>[a(`div`,C,[a(`h2`,w,m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),a(`p`,null,[s(m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),a(`a`,T,m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),s(`, `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),t[2]||=a(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),s(` `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),a(`p`,null,[s(m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),t[3]||=a(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),s(` `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),c(p(g),null,{default:f(()=>[c(p(_),{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(()=>[c(p(y),{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`]),c(p(b),{title:p(S)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[c(p(v),{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}; |