import{_ as c}from"./Badge.vue_vue_type_script_setup_true_lang-CRZ9-o3u.js";import{n as q,d as V,w as A,x as L,y as H,z as Y,E as F}from"./registry-DyIszw9-.js";import{_ as b,a as v,b as y,c as _}from"./CardContent.vue_vue_type_script_setup_true_lang-DPd7KJ8I.js";import{_ as I}from"./PageHeader.vue_vue_type_script_setup_true_lang-Cr1rE6nR.js";import{_ as O}from"./SettingsTabBar.vue_vue_type_script_setup_true_lang-DBToUWT9.js";import{d as U,aT as a,W as u,a3 as n,bK as o,Q as j,u as p,a2 as i,bh as l,X as e,U as h,F as S,b2 as E,r as M}from"./vendor-reka-Edfq1EPl.js";import"./vendor/inertia-CR4tWtMT.js";import"./LocaleSwitcher.vue_vue_type_script_setup_true_lang-4M-c0Clb.js";import"./HorizontalTabNavigation.vue_vue_type_script_setup_true_lang-CsRrMj9y.js";const W={key:0,class:"mb-4 rounded-lg border border-destructive/50 bg-destructive/10 p-3"},K={class:"grid grid-cols-1 gap-3 lg:grid-cols-2"},Q={class:"w-full text-sm"},R={class:"divide-y"},G={class:"flex items-center justify-between py-1.5"},X={class:"font-mono text-xs"},J={class:"flex items-center justify-between py-1.5"},Z={class:"font-mono text-xs"},ee={class:"flex items-center justify-between py-1.5"},te={class:"flex items-center justify-between py-1.5"},se={class:"flex items-center justify-between py-1.5"},ne={class:"font-mono text-xs"},oe={class:"flex items-center justify-between py-1.5"},le={class:"font-mono text-xs"},ie={class:"flex items-center justify-between py-1.5"},de={class:"flex items-center justify-between py-1.5"},ae={class:"flex items-center justify-between py-1.5"},re={class:"w-full text-sm"},ue={class:"divide-y"},fe={class:"flex items-center justify-between py-1.5"},ce={class:"font-mono text-xs"},me={class:"flex items-center justify-between py-1.5"},xe={class:"font-mono text-xs"},be={class:"flex items-center justify-between py-1.5"},ve={class:"font-mono text-xs"},ye={class:"flex items-center justify-between py-1.5"},_e={class:"font-mono text-xs"},ge={class:"flex items-center justify-between py-1.5"},pe={class:"font-mono text-xs"},he={class:"flex items-center justify-between py-1.5"},we={class:"mt-3 border-t pt-3"},je={class:"text-muted-foreground"},ze={key:0,class:"mt-2 flex flex-wrap gap-1"},ke={class:"w-full text-sm"},$e={class:"divide-y"},De={class:"flex items-center justify-between py-1.5"},Ce={class:"font-mono text-xs"},Se={class:"flex items-center justify-between py-1.5"},Ee={class:"font-mono text-xs"},Me={class:"w-full text-sm"},Be={class:"divide-y"},Te={class:"flex items-center justify-between py-1.5"},Ne={class:"font-mono text-xs"},Pe={key:0,class:"flex items-center justify-between py-1.5"},qe={class:"font-mono text-xs"},Ve={key:1,class:"flex items-center justify-between py-1.5"},Ae={class:"font-mono text-xs"},Le={key:2,class:"flex items-center justify-between py-1.5"},He={class:"font-mono text-xs"},Ye={class:"w-full text-sm"},Fe={class:"divide-y"},Ie={class:"flex items-center justify-between py-1.5"},Oe={class:"font-mono text-xs"},Ue={class:"flex items-center justify-between py-1.5"},We={class:"font-mono text-xs"},Ke={class:"w-full text-sm"},Qe={class:"divide-y"},Re={class:"flex items-center justify-between py-1.5"},Ge={class:"font-mono text-xs"},Xe={key:0,class:"flex items-center justify-between py-1.5"},Je={key:1,class:"flex items-center justify-between py-1.5"},Ze={class:"flex items-center justify-between py-1.5"},et={class:"w-full text-sm"},tt={class:"divide-y"},st={class:"flex items-center justify-between py-1.5"},nt={class:"font-mono text-xs"},ot={class:"flex items-center justify-between py-1.5"},lt={class:"font-mono text-xs"},it={class:"flex items-center justify-between py-1.5"},dt={class:"font-mono text-xs font-semibold"},at={class:"w-full text-sm"},rt={class:"divide-y"},ut={class:"flex-1 font-medium"},ft={class:"w-24 font-mono text-xs text-muted-foreground"},ct={class:"w-40 text-xs text-muted-foreground"},mt=["href"],xt={key:1},kt=U({__name:"Index",props:{environment:{},php:{},server:{},database:{},cacheAndSession:{},queue:{},storage:{},modules:{}},setup(s){const{t:B}=q(),f=s,z=M(!1),k=M(!1);function x(r){if(r===0)return"0 B";const t=["B","KB","MB","GB","TB"],d=Math.floor(Math.log(r)/Math.log(1024));return`${(r/Math.pow(1024,d)).toFixed(2)} ${t[d]}`}function g(r){const t=["| Key | Value |","|---|---|"];for(const[d,m]of r)t.push(`| ${d} | ${m} |`);return t.join(`
`)}function T(){const r=f.environment,t=f.php,d=f.server,m=f.database,C=f.cacheAndSession,w=f.queue,$=f.storage;return[`# Application Health
`,`## Environment
${g([["Laravel version",r.laravel_version],["Builder version",r.builder_version],["Environment",r.app_env],["Debug mode",r.debug_mode?"Enabled":"Disabled"],["Timezone",r.app_timezone],["Locale",r.app_locale],["Config cached",r.config_cached?"Yes":"No"],["Routes cached",r.routes_cached?"Yes":"No"],["Events cached",r.events_cached?"Yes":"No"]])}`,`## PHP
${g([["Version",t.version],["Memory limit",t.memory_limit],["Upload max size",t.upload_max_size],["Post max size",t.post_max_size],["Max execution time",`${t.max_execution}s`],["OPcache",t.opcache_enabled?"Enabled":"Disabled"],["Extensions",t.extensions.join(", ")]])}`,`## Server
${g([["Web server",d.software],["Operating system",d.os]])}`,`## Database
${g([["Driver",m.driver],...m.version?[["Version",m.version]]:[],...m.name?[["Database",m.name]]:[],...m.size!==null?[["Size",x(m.size)]]:[]])}`,`## Cache & Session
${g([["Cache driver",C.cache_driver],["Session driver",C.session_driver]])}`,`## Queue
${g([["Driver",w.driver],...w.pending!==null?[["Pending jobs",String(w.pending)]]:[],...w.failed!==null?[["Failed jobs",String(w.failed)]]:[],["Horizon",w.horizon?"Installed":"Not installed"]])}`,`## Storage
${g([["Application storage",x($.app_size)],["Log file size",x($.log_size)],["Total",x($.app_size+$.log_size)]])}`,`## Modules
| Module | Version | Author |
|---|---|---|
${f.modules.map(D=>`| ${D.label} | ${D.version??"—"} | ${D.author??"—"} |`).join(`
`)}`].join(`

`)}function N(){navigator.clipboard.writeText(T()).then(()=>{k.value=!0,setTimeout(()=>{k.value=!1},2e3)})}const P=f.environment.app_env==="production"&&f.environment.debug_mode;return(r,t)=>(a(),u("div",null,[n(I,{title:p(B)("builder.nav.health")},{actions:o(()=>[n(V,{variant:"outline",size:"sm",onClick:N},{default:o(()=>[k.value?(a(),j(p(A),{key:0,class:"mr-1.5 h-3.5 w-3.5 text-green-600"})):(a(),j(p(L),{key:1,class:"mr-1.5 h-3.5 w-3.5"})),i(" "+l(k.value?"Copied!":"Copy"),1)]),_:1})]),_:1},8,["title"]),n(O),p(P)?(a(),u("div",W,[...t[1]||(t[1]=[e("p",{class:"text-sm font-medium text-destructive"}," Debug mode is enabled in a production environment. This may expose sensitive application information. ",-1)])])):h("",!0),e("div",K,[n(_,null,{default:o(()=>[n(b,{class:"p-4 pb-2"},{default:o(()=>[n(v,{class:"text-sm font-semibold"},{default:o(()=>[...t[2]||(t[2]=[i("Environment",-1)])]),_:1})]),_:1}),n(y,{class:"px-4 pb-4 pt-0"},{default:o(()=>[e("table",Q,[e("tbody",R,[e("tr",G,[t[3]||(t[3]=e("td",{class:"text-muted-foreground"},"Laravel version",-1)),e("td",X,l(s.environment.laravel_version),1)]),e("tr",J,[t[4]||(t[4]=e("td",{class:"text-muted-foreground"},"Builder version",-1)),e("td",Z,l(s.environment.builder_version),1)]),e("tr",ee,[t[5]||(t[5]=e("td",{class:"text-muted-foreground"},"Environment",-1)),e("td",null,[n(c,{variant:s.environment.app_env==="production"?"default":"secondary",class:"text-xs"},{default:o(()=>[i(l(s.environment.app_env),1)]),_:1},8,["variant"])])]),e("tr",te,[t[6]||(t[6]=e("td",{class:"text-muted-foreground"},"Debug mode",-1)),e("td",null,[n(c,{variant:s.environment.debug_mode?"destructive":"secondary",class:"text-xs"},{default:o(()=>[i(l(s.environment.debug_mode?"Enabled":"Disabled"),1)]),_:1},8,["variant"])])]),e("tr",se,[t[7]||(t[7]=e("td",{class:"text-muted-foreground"},"Timezone",-1)),e("td",ne,l(s.environment.app_timezone),1)]),e("tr",oe,[t[8]||(t[8]=e("td",{class:"text-muted-foreground"},"Locale",-1)),e("td",le,l(s.environment.app_locale),1)]),e("tr",ie,[t[9]||(t[9]=e("td",{class:"text-muted-foreground"},"Config cached",-1)),e("td",null,[n(c,{variant:s.environment.config_cached?"default":"outline",class:"text-xs"},{default:o(()=>[i(l(s.environment.config_cached?"Yes":"No"),1)]),_:1},8,["variant"])])]),e("tr",de,[t[10]||(t[10]=e("td",{class:"text-muted-foreground"},"Routes cached",-1)),e("td",null,[n(c,{variant:s.environment.routes_cached?"default":"outline",class:"text-xs"},{default:o(()=>[i(l(s.environment.routes_cached?"Yes":"No"),1)]),_:1},8,["variant"])])]),e("tr",ae,[t[11]||(t[11]=e("td",{class:"text-muted-foreground"},"Events cached",-1)),e("td",null,[n(c,{variant:s.environment.events_cached?"default":"outline",class:"text-xs"},{default:o(()=>[i(l(s.environment.events_cached?"Yes":"No"),1)]),_:1},8,["variant"])])])])])]),_:1})]),_:1}),n(_,null,{default:o(()=>[n(b,{class:"p-4 pb-2"},{default:o(()=>[n(v,{class:"text-sm font-semibold"},{default:o(()=>[...t[12]||(t[12]=[i("PHP",-1)])]),_:1})]),_:1}),n(y,{class:"px-4 pb-4 pt-0"},{default:o(()=>[e("table",re,[e("tbody",ue,[e("tr",fe,[t[13]||(t[13]=e("td",{class:"text-muted-foreground"},"PHP version",-1)),e("td",ce,l(s.php.version),1)]),e("tr",me,[t[14]||(t[14]=e("td",{class:"text-muted-foreground"},"Memory limit",-1)),e("td",xe,l(s.php.memory_limit),1)]),e("tr",be,[t[15]||(t[15]=e("td",{class:"text-muted-foreground"},"Upload max size",-1)),e("td",ve,l(s.php.upload_max_size),1)]),e("tr",ye,[t[16]||(t[16]=e("td",{class:"text-muted-foreground"},"Post max size",-1)),e("td",_e,l(s.php.post_max_size),1)]),e("tr",ge,[t[17]||(t[17]=e("td",{class:"text-muted-foreground"},"Max execution time",-1)),e("td",pe,l(s.php.max_execution)+"s",1)]),e("tr",he,[t[18]||(t[18]=e("td",{class:"text-muted-foreground"},"OPcache",-1)),e("td",null,[n(c,{variant:s.php.opcache_enabled?"default":"secondary",class:"text-xs"},{default:o(()=>[i(l(s.php.opcache_enabled?"Enabled":"Disabled"),1)]),_:1},8,["variant"])])])])]),e("div",we,[e("button",{type:"button",class:"flex w-full items-center justify-between text-sm",onClick:t[0]||(t[0]=d=>z.value=!z.value)},[e("span",je," Loaded extensions ("+l(s.php.extensions.length)+") ",1),z.value?(a(),j(p(H),{key:0,class:"h-4 w-4 text-muted-foreground"})):(a(),j(p(Y),{key:1,class:"h-4 w-4 text-muted-foreground"}))]),z.value?(a(),u("div",ze,[(a(!0),u(S,null,E(s.php.extensions,d=>(a(),j(c,{key:d,variant:"outline",class:"font-mono text-xs"},{default:o(()=>[i(l(d),1)]),_:2},1024))),128))])):h("",!0)])]),_:1})]),_:1}),n(_,null,{default:o(()=>[n(b,{class:"p-4 pb-2"},{default:o(()=>[n(v,{class:"text-sm font-semibold"},{default:o(()=>[...t[19]||(t[19]=[i("Server",-1)])]),_:1})]),_:1}),n(y,{class:"px-4 pb-4 pt-0"},{default:o(()=>[e("table",ke,[e("tbody",$e,[e("tr",De,[t[20]||(t[20]=e("td",{class:"text-muted-foreground"},"Web server",-1)),e("td",Ce,l(s.server.software),1)]),e("tr",Se,[t[21]||(t[21]=e("td",{class:"text-muted-foreground"},"Operating system",-1)),e("td",Ee,l(s.server.os),1)])])])]),_:1})]),_:1}),n(_,null,{default:o(()=>[n(b,{class:"p-4 pb-2"},{default:o(()=>[n(v,{class:"text-sm font-semibold"},{default:o(()=>[...t[22]||(t[22]=[i("Database",-1)])]),_:1})]),_:1}),n(y,{class:"px-4 pb-4 pt-0"},{default:o(()=>[e("table",Me,[e("tbody",Be,[e("tr",Te,[t[23]||(t[23]=e("td",{class:"text-muted-foreground"},"Driver",-1)),e("td",Ne,l(s.database.driver),1)]),s.database.version?(a(),u("tr",Pe,[t[24]||(t[24]=e("td",{class:"text-muted-foreground"},"Version",-1)),e("td",qe,l(s.database.version),1)])):h("",!0),s.database.name?(a(),u("tr",Ve,[t[25]||(t[25]=e("td",{class:"text-muted-foreground"},"Database",-1)),e("td",Ae,l(s.database.name),1)])):h("",!0),s.database.size!==null?(a(),u("tr",Le,[t[26]||(t[26]=e("td",{class:"text-muted-foreground"},"Database size",-1)),e("td",He,l(x(s.database.size)),1)])):h("",!0)])])]),_:1})]),_:1}),n(_,null,{default:o(()=>[n(b,{class:"p-4 pb-2"},{default:o(()=>[n(v,{class:"text-sm font-semibold"},{default:o(()=>[...t[27]||(t[27]=[i("Cache & Session",-1)])]),_:1})]),_:1}),n(y,{class:"px-4 pb-4 pt-0"},{default:o(()=>[e("table",Ye,[e("tbody",Fe,[e("tr",Ie,[t[28]||(t[28]=e("td",{class:"text-muted-foreground"},"Cache driver",-1)),e("td",Oe,l(s.cacheAndSession.cache_driver),1)]),e("tr",Ue,[t[29]||(t[29]=e("td",{class:"text-muted-foreground"},"Session driver",-1)),e("td",We,l(s.cacheAndSession.session_driver),1)])])])]),_:1})]),_:1}),n(_,null,{default:o(()=>[n(b,{class:"p-4 pb-2"},{default:o(()=>[n(v,{class:"text-sm font-semibold"},{default:o(()=>[...t[30]||(t[30]=[i("Queue",-1)])]),_:1})]),_:1}),n(y,{class:"px-4 pb-4 pt-0"},{default:o(()=>[e("table",Ke,[e("tbody",Qe,[e("tr",Re,[t[31]||(t[31]=e("td",{class:"text-muted-foreground"},"Driver",-1)),e("td",Ge,l(s.queue.driver),1)]),s.queue.pending!==null?(a(),u("tr",Xe,[t[32]||(t[32]=e("td",{class:"text-muted-foreground"},"Pending jobs",-1)),e("td",null,[n(c,{variant:"secondary",class:"font-mono text-xs"},{default:o(()=>[i(l(s.queue.pending),1)]),_:1})])])):h("",!0),s.queue.failed!==null?(a(),u("tr",Je,[t[33]||(t[33]=e("td",{class:"text-muted-foreground"},"Failed jobs",-1)),e("td",null,[n(c,{variant:s.queue.failed>0?"destructive":"secondary",class:"font-mono text-xs"},{default:o(()=>[i(l(s.queue.failed),1)]),_:1},8,["variant"])])])):h("",!0),e("tr",Ze,[t[34]||(t[34]=e("td",{class:"text-muted-foreground"},"Horizon",-1)),e("td",null,[n(c,{variant:s.queue.horizon?"default":"outline",class:"text-xs"},{default:o(()=>[i(l(s.queue.horizon?"Installed":"Not installed"),1)]),_:1},8,["variant"])])])])])]),_:1})]),_:1}),n(_,null,{default:o(()=>[n(b,{class:"p-4 pb-2"},{default:o(()=>[n(v,{class:"text-sm font-semibold"},{default:o(()=>[...t[35]||(t[35]=[i("Storage",-1)])]),_:1})]),_:1}),n(y,{class:"px-4 pb-4 pt-0"},{default:o(()=>[e("table",et,[e("tbody",tt,[e("tr",st,[t[36]||(t[36]=e("td",{class:"text-muted-foreground"},"Application storage",-1)),e("td",nt,l(x(s.storage.app_size)),1)]),e("tr",ot,[t[37]||(t[37]=e("td",{class:"text-muted-foreground"},"Log file size",-1)),e("td",lt,l(x(s.storage.log_size)),1)]),e("tr",it,[t[38]||(t[38]=e("td",{class:"text-muted-foreground"},"Total",-1)),e("td",dt,l(x(s.storage.app_size+s.storage.log_size)),1)])])])]),_:1})]),_:1}),n(_,null,{default:o(()=>[n(b,{class:"p-4 pb-2"},{default:o(()=>[n(v,{class:"text-sm font-semibold"},{default:o(()=>[...t[39]||(t[39]=[i("Installed modules",-1)])]),_:1})]),_:1}),n(y,{class:"px-4 pb-4 pt-0"},{default:o(()=>[e("table",at,[t[40]||(t[40]=e("thead",null,[e("tr",{class:"flex items-center gap-4 pb-1.5 text-xs font-medium text-muted-foreground"},[e("th",{class:"flex-1 text-left font-medium"},"Module"),e("th",{class:"w-24 text-left font-medium"},"Version"),e("th",{class:"w-40 text-left font-medium"},"Author")])],-1)),e("tbody",rt,[(a(!0),u(S,null,E(s.modules,d=>(a(),u("tr",{key:d.key,class:"flex items-center gap-4 py-1.5"},[e("td",ut,l(d.label),1),e("td",ft,l(d.version??"—"),1),e("td",ct,[d.author_url?(a(),u("a",{key:0,href:d.author_url,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1 hover:text-foreground hover:underline"},[i(l(d.author??"—")+" ",1),n(p(F),{class:"h-3 w-3"})],8,mt)):(a(),u("span",xt,l(d.author??"—"),1))])]))),128))])])]),_:1})]),_:1})])]))}});export{kt as default};
