1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[3243],{27106(e,t,r){var n=r(79015),s=r(10816),a=r(65311),i=r(89077),l=r(51571),c=r(51579),u=r(12824);function o(e){let[t,r]=(0,a.useState)(null),[s,i]=(0,a.useState)(null);return(0,n.jsx)(u.ab,{actionsContainer:t,titleStatusContainer:s,children:(0,n.jsxs)(l.Ni,{children:[(0,n.jsx)(l.Ni.Title,{children:(0,n.jsxs)("span",{className:"inline-flex max-w-full min-w-0 items-center gap-2 align-middle",children:[(0,n.jsx)("span",{className:"truncate",children:e.title}),(0,n.jsx)("span",{ref:i,className:"inline-flex min-w-0 shrink-0 items-center"})]})}),(0,n.jsx)(l.Ni.Actions,{children:(0,n.jsx)("div",{ref:r,className:"flex flex-wrap items-center justify-end gap-2"})}),(0,n.jsx)(l.Ni.Content,{children:(0,n.jsx)("div",{className:"flex h-full min-h-0 w-full flex-col gap-4",children:e.children})})]})})}function f(e){let{routePath:t,defaultSettings:r,defaultSection:l,getSectionContent:u,getSectionMeta:f,extraArgs:d,loadingMessage:m="Loading settings...",resolveSettings:y}=e,{t:h}=(0,i.Bd)(),{data:p,isLoading:x}=(0,c.b)(),g=(0,s.g)({from:t}),b=g?.section??l,N=f(b),k=(0,a.useMemo)(()=>{let e=(0,c.n)(p?.data,r);return y?y(e,p?.data):e},[p?.data,r,y]);if(x)return(0,n.jsx)(o,{title:h(N.titleKey),children:(0,n.jsx)("div",{className:"text-muted-foreground flex min-h-40 items-center justify-center text-sm",children:h(m)})});let v=u(b,k,...d??[]);return(0,n.jsx)(o,{title:h(N.titleKey),children:v})}r.d(t,{R:()=>f})},51579(e,t,r){var n=r(43866),s=r(76612);function a(){return(0,n.I)({queryKey:["system-options"],queryFn:s.y,staleTime:3e5})}function i(e,t){if(!e)return t;let r={...t},n=[];return e.forEach(e=>{if(e.key in t){let s=function(e,t){if("boolean"==typeof t)return{success:!0,value:"true"===e||"1"===e};if("number"==typeof t){let r=e.trim();if(""===r)return{success:!1,error:"Empty string for number field",fallback:t};let n=Number(r);return Number.isNaN(n)?{success:!1,error:`Invalid number: "${e}"`,fallback:t}:{success:!0,value:n}}if(Array.isArray(t))try{let r=JSON.parse(e);if(!Array.isArray(r))return{success:!1,error:"Expected array but got non-array JSON",fallback:t};if(t.length>0){let e=typeof t[0],n=r.find(t=>typeof t!==e);if(void 0!==n)return{success:!1,error:`Array element type mismatch: expected ${e}, got ${typeof n}`,fallback:t}}return{success:!0,value:r}}catch(e){return{success:!1,error:`JSON parse failed: ${e instanceof Error?e.message:String(e)}`,fallback:t}}return{success:!0,value:e}}(e.value,t[e.key]);s.success?r[e.key]=s.value:(r[e.key]=s.fallback,n.push({key:e.key,error:s.error}))}}),n.length,r}r.d(t,{b:()=>a,n:()=>i})},37302(e,t,r){r.r(t),r.d(t,{component:()=>l});var n=r(79015),s=r(27106),a=r(57867);let i={"theme.frontend":"default",Notice:"",SystemName:"New API",Logo:"",Footer:"",About:"",HomePageContent:"",ServerAddress:"","legal.user_agreement":"","legal.privacy_policy":"",HeaderNavModules:"",SidebarModulesAdmin:""},l=function(){return(0,n.jsx)(s.R,{routePath:"/_authenticated/system-settings/site/$section",defaultSettings:i,defaultSection:a.O0,getSectionContent:a.ob,getSectionMeta:a.gk})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.