(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,788699,360200,e=>{"use strict";let r=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["default",0,r],360200),e.s(["Pencil",0,r],788699)},450240,e=>{"use strict";var r=e.i(843476),t=e.i(286536),s=e.i(77705),a=e.i(271645),i=e.i(950594);let o=a.forwardRef(({className:e,groupClassName:o,disabled:n,...l},u)=>{let[d,p]=a.useState(!1);return(0,r.jsxs)(i.InputGroup,{className:o,children:[(0,r.jsx)(i.InputGroupInput,{...l,ref:u,type:d?"text":"password",disabled:n,className:e}),(0,r.jsx)(i.InputGroupAddon,{align:"inline-end",children:(0,r.jsx)(i.InputGroupButton,{size:"icon-xs",disabled:n,"aria-label":d?"Hide password":"Show password",onClick:()=>p(e=>!e),children:d?(0,r.jsx)(s.EyeOff,{}):(0,r.jsx)(t.Eye,{})})})]})});o.displayName="PasswordInput",e.s(["PasswordInput",0,o])},190702,e=>{"use strict";e.s(["parseErrorMessage",0,e=>{if(!e)return"An unknown error occurred";if("string"==typeof e)return e;if(e.message)try{let r=JSON.parse(e.message);if(r.error&&r.error.message)return r.error.message;return"string"==typeof r?r:JSON.stringify(r,null,2)}catch(r){return e.message}if(e.response&&e.response.data){if("string"==typeof e.response.data)return e.response.data;if(e.response.data.message)return e.response.data.message;if(e.response.data.error)return"string"==typeof e.response.data.error?e.response.data.error:e.response.data.error.message||JSON.stringify(e.response.data.error)}return String(e)}])},823429,e=>{"use strict";let r=(0,e.i(475254).default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);e.s(["default",0,r])},221345,e=>{"use strict";let r=(0,e.i(475254).default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);e.s(["Link",0,r],221345)},688511,e=>{"use strict";var r=e.i(823429);e.s(["Edit",()=>r.default])},700514,e=>{"use strict";var r=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,t]=(0,r.useState)("http://localhost:4000");return(0,r.useEffect)(()=>{{let{protocol:e,host:r}=window.location;t(`${e}//${r}`)}},[]),e}])},153472,e=>{"use strict";var r,t,s=e.i(266027),a=e.i(954616),i=e.i(912598),o=e.i(243652),n=e.i(135214),l=e.i(602869),u=e.i(431703),d=((r={}).GENERAL_SETTINGS="general_settings",r),p=((t={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",t.MAXIMUM_SPEND_LOGS_CLEANUP_BATCH_SIZE="maximum_spend_logs_cleanup_batch_size",t.MAXIMUM_SPEND_LOGS_CLEANUP_MAX_BATCHES="maximum_spend_logs_cleanup_max_batches",t.MAXIMUM_SPEND_LOGS_CLEANUP_RUN_BUDGET="maximum_spend_logs_cleanup_run_budget",t.MAXIMUM_SPEND_LOGS_CLEANUP_BATCH_TIMEOUT="maximum_spend_logs_cleanup_batch_timeout",t);let c=async(e,r)=>{try{let t=l.proxyBaseUrl?`${l.proxyBaseUrl}/config/list?config_type=${r}`:`/config/list?config_type=${r}`,s=await fetch(t,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),r=(0,u.deriveErrorMessage)(e);throw(0,l.handleError)(r),Error(r)}return await s.json()}catch(e){throw console.error(`Failed to get proxy config for ${r}:`,e),e}},f=(0,o.createQueryKeys)("proxyConfig"),_=async(e,r)=>{try{let t=l.proxyBaseUrl?`${l.proxyBaseUrl}/config/field/delete`:"/config/field/delete",s=await fetch(t,{method:"POST",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok){let e=await s.json(),r=(0,u.deriveErrorMessage)(e);throw(0,l.handleError)(r),Error(r)}return await s.json()}catch(e){throw console.error(`Failed to delete proxy config field ${r.field_name}:`,e),e}};e.s(["ConfigType",()=>d,"GeneralSettingsFieldName",()=>p,"proxyConfigKeys",0,f,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,n.default)(),r=(0,i.useQueryClient)();return(0,a.useMutation)({mutationFn:async r=>{if(!e)throw Error("Access token is required");return await _(e,r)},onSuccess:()=>{r.invalidateQueries({queryKey:f.all})}})},"useProxyConfig",0,e=>{let{accessToken:r}=(0,n.default)();return(0,s.useQuery)({queryKey:f.list({filters:{configType:e}}),queryFn:async()=>await c(r,e),enabled:!!r})}])}]);