module.exports=[22301,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),this.name="InvariantError"}}},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},20858,a=>{"use strict";var b=a.i(44673);let c={passing:"bg-green-100 text-green-800 ring-green-600/20",blocked:"bg-red-100 text-red-800 ring-red-600/20",skipped:"bg-yellow-100 text-yellow-800 ring-yellow-600/20",planned:"bg-gray-100 text-gray-700 ring-gray-500/20",writable:"bg-gray-200 text-gray-800 ring-gray-500/20",written:"bg-blue-50 text-blue-700 ring-blue-600/20",unknown:"bg-gray-50 text-gray-500 ring-gray-400/20",neutral:"bg-gray-100 text-gray-700 ring-gray-500/20"};a.s(["Badge",0,function({variant:a="neutral",className:d="",children:e,...f}){let g=["inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium ring-1 ring-inset",c[a],d].filter(Boolean).join(" ");return(0,b.jsx)("span",{className:g,...f,children:e})}])},68406,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},97568,a=>{"use strict";let b={src:a.i(68406).default,width:256,height:256};a.s(["default",0,b])},21318,a=>{"use strict";var b=a.i(44673),c=a.i(2649),d=a.i(20858);function e({project:a}){let f=1===a.activePlanCount?"active plan":"active plans";return(0,b.jsxs)(c.default,{href:`/p/${a.name}/`,"data-project-name":a.name,className:"block rounded-lg border border-gray-200 bg-white p-5 transition-shadow hover:shadow-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h2",{className:"truncate text-base font-semibold text-gray-900",children:a.name}),(0,b.jsx)("p",{className:"mt-1 truncate text-xs text-gray-500",children:a.path})]}),a.hasInProgress?(0,b.jsx)(d.Badge,{variant:"written","data-testid":"in-progress-badge",children:"in progress"}):null]}),(0,b.jsxs)("div",{className:"mt-4 flex items-center justify-between text-sm text-gray-600",children:[(0,b.jsxs)("span",{children:[a.activePlanCount," ",f]}),(0,b.jsxs)("span",{className:"text-xs text-gray-400",children:["last seen ",function(a){let b=new Date(a).getTime();if(Number.isNaN(b))return"unknown";let c=Math.floor((Date.now()-b)/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);if(e<30)return`${e}d ago`;let f=Math.floor(e/30);return`${f}mo ago`}(a.lastSeenAt)]})]})]})}function f({projects:a}){return 0===a.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center text-center text-gray-500","data-testid":"project-grid-empty",children:[(0,b.jsx)("h1",{className:"text-lg font-semibold text-gray-700",children:"No projects registered yet"}),(0,b.jsxs)("p",{className:"mt-2 max-w-md text-sm",children:["Run"," ",(0,b.jsx)("code",{className:"rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs",children:"indusk init"})," ","inside a project to register it. Already-registered projects move to the front via"," ",(0,b.jsx)("code",{className:"rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs",children:"indusk update"}),"."]})]}):(0,b.jsxs)("div",{className:"mx-auto max-w-5xl p-2",children:[(0,b.jsx)("div",{className:"mb-4 flex items-end justify-between",children:(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Projects"}),(0,b.jsxs)("p",{className:"text-sm text-gray-500",children:["Every project registered in"," ",(0,b.jsx)("code",{className:"font-mono text-xs",children:"~/.indusk/projects.json"}),"."]})]})}),(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3","data-testid":"project-grid",children:a.map(a=>(0,b.jsx)(e,{project:a},a.name))})]})}var g=a.i(42717),h=a.i(765);async function i(){let a=(0,h.readRegistryProjects)(),c=await Promise.all(a.map(async a=>{let b=await (0,g.readActivePlans)(a.path).catch(()=>[]);return{name:a.name,path:a.path,lastSeenAt:a.lastSeenAt,activePlanCount:b.length,hasInProgress:b.some(a=>"in-progress"===a.status)}}));return(0,b.jsx)(f,{projects:c})}a.s(["default",0,i],21318)},77862,a=>{a.n(a.i(21318))}];

//# sourceMappingURL=%5Broot-of-the-server%5D__0l06j2e._.js.map