panoma 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/app/BUILD-INFO.json +2 -2
  2. package/app/apps/web/.next-bundle/BUILD_ID +1 -1
  3. package/app/apps/web/.next-bundle/app-build-manifest.json +131 -131
  4. package/app/apps/web/.next-bundle/app-path-routes-manifest.json +28 -28
  5. package/app/apps/web/.next-bundle/build-manifest.json +2 -2
  6. package/app/apps/web/.next-bundle/prerender-manifest.json +3 -3
  7. package/app/apps/web/.next-bundle/server/app/(app)/agents/page_client-reference-manifest.js +1 -1
  8. package/app/apps/web/.next-bundle/server/app/(app)/ai/page_client-reference-manifest.js +1 -1
  9. package/app/apps/web/.next-bundle/server/app/(app)/bridge/page_client-reference-manifest.js +1 -1
  10. package/app/apps/web/.next-bundle/server/app/(app)/copies/page_client-reference-manifest.js +1 -1
  11. package/app/apps/web/.next-bundle/server/app/(app)/credentials/page_client-reference-manifest.js +1 -1
  12. package/app/apps/web/.next-bundle/server/app/(app)/disk/page_client-reference-manifest.js +1 -1
  13. package/app/apps/web/.next-bundle/server/app/(app)/hidden/page_client-reference-manifest.js +1 -1
  14. package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/page_client-reference-manifest.js +1 -1
  15. package/app/apps/web/.next-bundle/server/app/(app)/packages/page_client-reference-manifest.js +1 -1
  16. package/app/apps/web/.next-bundle/server/app/(app)/page.js +1 -1
  17. package/app/apps/web/.next-bundle/server/app/(app)/page_client-reference-manifest.js +1 -1
  18. package/app/apps/web/.next-bundle/server/app/(app)/runs/[id]/page_client-reference-manifest.js +1 -1
  19. package/app/apps/web/.next-bundle/server/app/(app)/runs/page_client-reference-manifest.js +1 -1
  20. package/app/apps/web/.next-bundle/server/app/(app)/search/page_client-reference-manifest.js +1 -1
  21. package/app/apps/web/.next-bundle/server/app/(app)/twin/look/page_client-reference-manifest.js +1 -1
  22. package/app/apps/web/.next-bundle/server/app/(app)/twin/page_client-reference-manifest.js +1 -1
  23. package/app/apps/web/.next-bundle/server/app/(app)/unsaved/page_client-reference-manifest.js +1 -1
  24. package/app/apps/web/.next-bundle/server/app/_not-found/page_client-reference-manifest.js +1 -1
  25. package/app/apps/web/.next-bundle/server/app/api/accounts/route_client-reference-manifest.js +1 -1
  26. package/app/apps/web/.next-bundle/server/app/api/agent/consult/route_client-reference-manifest.js +1 -1
  27. package/app/apps/web/.next-bundle/server/app/api/agent/context/route_client-reference-manifest.js +1 -1
  28. package/app/apps/web/.next-bundle/server/app/api/agent/journal/route_client-reference-manifest.js +1 -1
  29. package/app/apps/web/.next-bundle/server/app/api/agent/keys/route_client-reference-manifest.js +1 -1
  30. package/app/apps/web/.next-bundle/server/app/api/agent/log/route_client-reference-manifest.js +1 -1
  31. package/app/apps/web/.next-bundle/server/app/api/agent/mcp/route_client-reference-manifest.js +1 -1
  32. package/app/apps/web/.next-bundle/server/app/api/agent/notes/route_client-reference-manifest.js +1 -1
  33. package/app/apps/web/.next-bundle/server/app/api/agent/tasks/[id]/route_client-reference-manifest.js +1 -1
  34. package/app/apps/web/.next-bundle/server/app/api/agent/tasks/route_client-reference-manifest.js +1 -1
  35. package/app/apps/web/.next-bundle/server/app/api/ai/route_client-reference-manifest.js +1 -1
  36. package/app/apps/web/.next-bundle/server/app/api/assets/route_client-reference-manifest.js +1 -1
  37. package/app/apps/web/.next-bundle/server/app/api/assignments/launch/route_client-reference-manifest.js +1 -1
  38. package/app/apps/web/.next-bundle/server/app/api/assignments/route_client-reference-manifest.js +1 -1
  39. package/app/apps/web/.next-bundle/server/app/api/catalog/route_client-reference-manifest.js +1 -1
  40. package/app/apps/web/.next-bundle/server/app/api/check/route_client-reference-manifest.js +1 -1
  41. package/app/apps/web/.next-bundle/server/app/api/consultations/route_client-reference-manifest.js +1 -1
  42. package/app/apps/web/.next-bundle/server/app/api/describe/route_client-reference-manifest.js +1 -1
  43. package/app/apps/web/.next-bundle/server/app/api/disk/route_client-reference-manifest.js +1 -1
  44. package/app/apps/web/.next-bundle/server/app/api/enrich/route_client-reference-manifest.js +1 -1
  45. package/app/apps/web/.next-bundle/server/app/api/environment/route_client-reference-manifest.js +1 -1
  46. package/app/apps/web/.next-bundle/server/app/api/hooks/route_client-reference-manifest.js +1 -1
  47. package/app/apps/web/.next-bundle/server/app/api/ingest/route_client-reference-manifest.js +1 -1
  48. package/app/apps/web/.next-bundle/server/app/api/md/apply/route_client-reference-manifest.js +1 -1
  49. package/app/apps/web/.next-bundle/server/app/api/md/context/route_client-reference-manifest.js +1 -1
  50. package/app/apps/web/.next-bundle/server/app/api/md/inspect/route_client-reference-manifest.js +1 -1
  51. package/app/apps/web/.next-bundle/server/app/api/md/repair/route_client-reference-manifest.js +1 -1
  52. package/app/apps/web/.next-bundle/server/app/api/md/review/route_client-reference-manifest.js +1 -1
  53. package/app/apps/web/.next-bundle/server/app/api/north/route_client-reference-manifest.js +1 -1
  54. package/app/apps/web/.next-bundle/server/app/api/notes/route_client-reference-manifest.js +1 -1
  55. package/app/apps/web/.next-bundle/server/app/api/open/route_client-reference-manifest.js +1 -1
  56. package/app/apps/web/.next-bundle/server/app/api/project/route_client-reference-manifest.js +1 -1
  57. package/app/apps/web/.next-bundle/server/app/api/rescan/route_client-reference-manifest.js +1 -1
  58. package/app/apps/web/.next-bundle/server/app/api/roots/route_client-reference-manifest.js +1 -1
  59. package/app/apps/web/.next-bundle/server/app/api/runs/[id]/route_client-reference-manifest.js +1 -1
  60. package/app/apps/web/.next-bundle/server/app/api/runs/route_client-reference-manifest.js +1 -1
  61. package/app/apps/web/.next-bundle/server/app/api/scale/route_client-reference-manifest.js +1 -1
  62. package/app/apps/web/.next-bundle/server/app/api/search/route_client-reference-manifest.js +1 -1
  63. package/app/apps/web/.next-bundle/server/app/api/secrets/route_client-reference-manifest.js +1 -1
  64. package/app/apps/web/.next-bundle/server/app/api/tasks/route_client-reference-manifest.js +1 -1
  65. package/app/apps/web/.next-bundle/server/app/api/today/route_client-reference-manifest.js +1 -1
  66. package/app/apps/web/.next-bundle/server/app/api/twin/assign/route_client-reference-manifest.js +1 -1
  67. package/app/apps/web/.next-bundle/server/app/api/twin/classify/route_client-reference-manifest.js +1 -1
  68. package/app/apps/web/.next-bundle/server/app/api/twin/critique/route_client-reference-manifest.js +1 -1
  69. package/app/apps/web/.next-bundle/server/app/api/twin/design/route_client-reference-manifest.js +1 -1
  70. package/app/apps/web/.next-bundle/server/app/api/twin/distill/route_client-reference-manifest.js +1 -1
  71. package/app/apps/web/.next-bundle/server/app/api/twin/look/route_client-reference-manifest.js +1 -1
  72. package/app/apps/web/.next-bundle/server/app/api/twin/mine/route_client-reference-manifest.js +1 -1
  73. package/app/apps/web/.next-bundle/server/app/api/twin/score/route_client-reference-manifest.js +1 -1
  74. package/app/apps/web/.next-bundle/server/app/api/twin/shot/route_client-reference-manifest.js +1 -1
  75. package/app/apps/web/.next-bundle/server/app/api/twin/sources/route_client-reference-manifest.js +1 -1
  76. package/app/apps/web/.next-bundle/server/app/api/twin/synthesize/route_client-reference-manifest.js +1 -1
  77. package/app/apps/web/.next-bundle/server/app/api/twin/taste/route_client-reference-manifest.js +1 -1
  78. package/app/apps/web/.next-bundle/server/app/api/twin/verdicts/route_client-reference-manifest.js +1 -1
  79. package/app/apps/web/.next-bundle/server/app/api/watch/route_client-reference-manifest.js +1 -1
  80. package/app/apps/web/.next-bundle/server/app/icon/[id]/route_client-reference-manifest.js +1 -1
  81. package/app/apps/web/.next-bundle/server/app-paths-manifest.json +28 -28
  82. package/app/apps/web/.next-bundle/server/chunks/2930.js +1 -1
  83. package/app/apps/web/.next-bundle/server/chunks/3677.js +1 -1
  84. package/app/apps/web/.next-bundle/server/functions-config-manifest.json +3 -3
  85. package/app/apps/web/.next-bundle/server/middleware-manifest.json +5 -5
  86. package/app/apps/web/.next-bundle/server/pages/500.html +1 -1
  87. package/app/apps/web/.next-bundle/server/pages-manifest.json +1 -1
  88. package/app/apps/web/.next-bundle/server/server-reference-manifest.json +1 -1
  89. package/app/apps/web/.next-bundle/static/chunks/7911-ef388a0052b1e0f6.js +1 -0
  90. package/app/apps/web/.next-bundle/static/chunks/app/(app)/{page-f4dd3e5acee2bfb4.js → page-bd415d39f80a6370.js} +1 -1
  91. package/npm-shrinkwrap.json +2 -2
  92. package/package.json +1 -1
  93. package/app/apps/web/.next-bundle/static/chunks/7911-d549c69e290b1f96.js +0 -1
  94. /package/app/apps/web/.next-bundle/static/{D8knSMGGk6yOk_0w3z22h → MxyyXPIWuSeoVRswq6wUi}/_buildManifest.js +0 -0
  95. /package/app/apps/web/.next-bundle/static/{D8knSMGGk6yOk_0w3z22h → MxyyXPIWuSeoVRswq6wUi}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9415],{236:(e,t,a)=>{"use strict";a.d(t,{K:()=>o,t:()=>r});var n=a(9763),s=a(4963),i=a(5595),l=a(179);function r(){let[e,t]=(0,s.useState)();return(0,s.useEffect)(()=>{let e=!0;return fetch("/api/watch").then(e=>e.json()).then(a=>{e&&t(a)}).catch(()=>void 0),()=>{e=!1}},[]),e}function o(e){let{failure:t}=e,a=(0,l.kj)();return(0,n.jsxs)("section",{className:"catalog-down",role:"alert",children:[(0,n.jsxs)("h2",{children:[(0,n.jsx)(i.z1N,{"aria-hidden":!0}),a("catalog.down.title")]}),(0,n.jsx)("p",{children:a("catalog.down.body",{path:t.path})}),(0,n.jsx)("p",{className:"catalog-down__detail",children:(0,n.jsx)("code",{children:a("catalog.down.detail",{detail:t.detail})})})]})}},2922:(e,t,a)=>{"use strict";a.d(t,{q:()=>u});var n=a(9763),s=a(4963),i=a(5595),l=a(2574),r=a(7911),o=a(6859),c=a(8010),d=a(8384),h=a(5035);function u(e){var t,a;let{projectId:u,path:p,locale:f,onOpenChange:x,closed:j,compact:g}=e,{remote:b,editors:y,apps:v,agents:w}=(0,d.b)(),[k,N]=(0,s.useState)(!1),[_,S]=(0,s.useState)("ready"),[C,M]=(0,s.useState)(null),[T,O]=(0,h.F)("open:preferred-destination","app:claude-app"),P=(0,s.useRef)(null);if((0,s.useEffect)(()=>{j&&N(!1)},[j]),(0,c.y)(P,k,()=>N(!1)),b)return null;async function A(e){N(!1),S("opening"),M(null);let t=await (0,o.A)({id:u,tool:e.tool,with:e.target},(0,r.t)(f,"open.unreachable"));t.ok?(S("open"),setTimeout(()=>S("ready"),2e3)):(S("ready"),M(t.message))}let I=[...y.map(e=>{var t;return{key:"editor:".concat(e.id),tool:"editor",target:e.id,name:e.name,icon:null!=(t=l.L[e.id])?t:i.mUU}}),...v.map(e=>{var t;return{key:"app:".concat(e.id),tool:"app",target:e.id,name:e.name,sub:"catalog.appSub",icon:null!=(t=l.L[e.id])?t:i.mUU}}),...w.filter(e=>!e.broken).map(e=>{var t;return{key:"agent:".concat(e.id),tool:"agent",target:e.id,name:e.name,sub:"catalog.agentSub",icon:null!=(t=l.L[e.id])?t:i.Jhl}}),{key:"terminal",tool:"terminal",name:(0,r.t)(f,"catalog.terminal"),sub:"catalog.terminalSub",icon:i.Jhl},{key:"folder",tool:"folder",name:(0,r.t)(f,"catalog.folder"),sub:"catalog.folderSub",icon:i.mUU}],R=null!=(a=null!=(t=I.find(e=>e.key===T))?t:I.find(e=>"app:claude-app"===e.key))?a:I[0],D=R.icon;return(0,n.jsxs)("div",{className:g?"open-menu open-menu--compact":"open-menu",ref:P,children:[(0,n.jsxs)("div",{className:"open-menu__split",children:[(0,n.jsxs)("button",{type:"button",className:"open-menu__primary",onClick:()=>void A(R),disabled:"opening"===_,title:"".concat(R.name," \xb7 ").concat(p),children:[(0,n.jsx)(D,{"aria-hidden":!0}),"opening"===_?(0,r.t)(f,"open.busy"):"open"===_?(0,r.t)(f,"open.done"):(0,r.t)(f,"open.openWith",{name:R.name})]}),I.length>1&&(0,n.jsx)("button",{type:"button",className:"open-menu__toggle","aria-label":(0,r.t)(f,"open.moreDestinations"),"aria-expanded":k,"aria-haspopup":"menu",onClick:()=>{let e=!k;N(e),null==x||x(e)},children:(0,n.jsx)(i.zKo,{"aria-hidden":!0})})]}),k&&(0,n.jsx)("div",{className:"open-menu__list",role:"menu",children:I.map((e,t)=>{let a=e.icon,s=e.key===R.key,l=I[t-1],o=void 0!==l&&m(l)!==m(e);return(0,n.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":s,className:"open-menu__item".concat(o?" is-first-of-group":"").concat(s?" is-default":""),onClick:()=>{O(e.key),A(e)},children:[(0,n.jsx)(a,{"aria-hidden":!0}),(0,n.jsxs)("span",{className:"open-menu__item-copy",children:[(0,n.jsx)("span",{children:e.name}),(e.sub||s)&&(0,n.jsxs)("small",{children:[e.sub&&(0,r.t)(f,e.sub),e.sub&&s&&" \xb7 ",s&&(0,n.jsx)("b",{children:(0,r.t)(f,"open.defaultDestination")})]})]}),s&&(0,n.jsx)(i.mmf,{className:"open-menu__default-check","aria-hidden":!0})]},e.key)})}),C&&(0,n.jsx)("span",{className:"open-menu__error",children:C})]})}function m(e){return"editor"===e.tool||"app"===e.tool?"app":"folder"===e.tool?"finder":"terminal"}},3385:(e,t,a)=>{"use strict";a.d(t,{ProjectStore:()=>el});var n=a(9763),s=a(1723),i=a.n(s),l=a(7244),r=a(4963),o=a(5595),c=a(3570),d=a(7911);let h=new Set(["flutter","react native","expo","android","ios","swift","kotlin","dart"]),u=new Set(["next.js","react","vue","nuxt","svelte","sveltekit","angular","astro","remix / react router","solidjs","vite","tailwind css","shadcn/ui","electron","tauri"]),m=new Set(["express","fastify","nestjs","hono","django","flask","fastapi","ruby on rails","laravel","symfony","sinatra","gin","echo","fiber","axum","actix web"]),p=new Set(["mcp"]),f=new Set(["html","css","scss"]),x=new Set(["python","go","rust","ruby","php","java","c#","elixir"]),j=new Set(["dart","swift","kotlin","objective-c"]),g=new Set(["postgresql","mysql","mongodb","redis","mariadb"]),b=new Set(["vercel","netlify","cloudflare workers"]);var y=a(179),v=a(4204);function w(e){let{id:t,name:a}=e,s=(0,y.kj)(),[i,l]=(0,r.useState)("ready");async function o(){l("opening");try{let e=await fetch("/api/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t,tool:"editor"})});l(e.ok?"ready":"error")}catch(e){l("error")}}return(0,n.jsx)("button",{type:"button",onClick:o,disabled:"opening"===i,title:s("today.openNamed",{name:a}),className:"shrink-0 rounded-md border border-edge bg-surface px-2.5 py-1 text-xs font-semibold text-chalk transition hover:border-edge-bright hover:bg-raised disabled:opacity-60",children:s("opening"===i?"today.opening":"error"===i?"today.openFailed":"today.resume")})}function k(e){var t,a,s,l;let{report:c}=e,d=(0,y.kj)(),h=(0,y.Ym)(),{summary:u}=c,[m,p]=(0,r.useState)(!1),f=c.critic,x=(null!=(a=null==f?void 0:f.lookFindings)?a:0)+(null!=(s=null==f?void 0:f.reviewFindings)?s:0),j=u.commits>0||u.proposals>0||u.born>0||u.touchedProjects>0||x>0,g=c.since?d("today.since",{when:(0,v.KW)(c.since,h)}):d("today.last24h");return j?(0,n.jsxs)("section",{className:"brief","aria-label":d("today.title"),children:[(0,n.jsxs)("button",{type:"button",className:"brief__line",onClick:()=>p(!m),"aria-expanded":m,children:[(0,n.jsx)(o.efr,{"aria-hidden":!0}),(0,n.jsx)("strong",{children:d("today.title")}),(0,n.jsxs)("span",{className:"brief__facts",children:[u.proposals>0&&(0,n.jsx)("span",{className:"brief__decision",children:d(1===u.proposals?"today.waitingOne":"today.waitingMany",{n:u.proposals})}),u.commits>0&&(0,n.jsxs)("span",{children:[d(1===u.touchedProjects?"today.inProjectsOne":"today.inProjectsMany",{c:d(1===u.commits?"today.commitOne":"today.commitMany",{n:u.commits}),n:u.touchedProjects}),u.byAgents>0&&" ".concat(d("today.fromAgents",{n:u.byAgents}))]}),u.born>0&&(0,n.jsx)("span",{children:d(1===u.born?"today.bornOne":"today.bornMany",{n:u.born})}),x>0&&(0,n.jsx)("span",{className:"brief__decision",children:d(1===x?"today.criticOne":"today.criticMany",{n:x})})]}),(0,n.jsx)("span",{className:"brief__when",children:g}),(0,n.jsx)(o.bv7,{className:"brief__arrow","aria-hidden":!0})]}),m&&(0,n.jsxs)("div",{className:"brief__detail",children:[c.proposals.length>0&&(0,n.jsxs)("div",{className:"brief__decisions",children:[(0,n.jsx)("p",{className:"brief__label",children:d("proposals.waiting")}),(0,n.jsx)("ul",{children:c.proposals.slice(0,4).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsxs)(i(),{href:"/runs/".concat(e.id),children:[e.pkgName,e.a?" → ".concat(e.a):""]}),(0,n.jsx)("span",{className:"brief__where",children:d("today.inProject",{project:e.project})}),e.repeats>1&&(0,n.jsx)("span",{className:"brief__attempts",children:d("today.attempts",{n:e.repeats})}),(0,n.jsxs)("span",{className:"brief__meta",children:[d(e.verified?"proposals.testsGreen":"proposals.unverified")," \xb7 ",(0,v.KW)(e.when,h)]})]},e.id))})]}),(null!=(l=null==f||null==(t=f.where)?void 0:t.length)?l:0)>0&&(0,n.jsxs)("div",{className:"brief__decisions",children:[(0,n.jsx)("p",{className:"brief__label",children:d("today.criticWhere")}),(0,n.jsx)("ul",{children:f.where.slice(0,4).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)(i(),{href:"/p/".concat(e.slug,"#assignments"),children:e.name}),(0,n.jsx)("span",{className:"brief__meta",children:d(1===e.findings?"today.criticFindingOne":"today.criticFindingMany",{n:e.findings})})]},e.slug))})]}),c.projects.length>0&&(0,n.jsx)("ul",{className:"brief__projects",children:c.projects.slice(0,5).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(i(),{href:"/p/".concat(e.slug),children:e.name}),e.commits[0]&&(0,n.jsxs)("p",{className:"brief__subject",children:[e.commits[0].subject,e.commits[0].agent&&(0,n.jsx)("span",{className:"brief__agent",children:e.commits[0].agent})]}),(0,n.jsxs)("p",{className:"brief__meta",children:[e.commits.length>0&&(0,n.jsxs)(n.Fragment,{children:[d(1===e.commits.length?"today.commitOne":"today.commitMany",{n:e.commits.length})," \xb7 ",(0,v.KW)(e.commits[0].at,h)]}),e.agents.length>0&&(0,n.jsxs)(n.Fragment,{children:[e.commits.length>0&&" \xb7 ",e.agents.map(e=>d("today.agentNoted",{name:e.name,n:e.activities})).join(", ")]})]})]}),(0,n.jsx)(w,{id:e.id,name:e.name})]},e.slug))}),c.born.length>0&&(0,n.jsxs)("p",{className:"brief__born",children:[d("today.born")," ",c.born.slice(0,4).map((e,t)=>(0,n.jsxs)("span",{children:[t>0&&", ",(0,n.jsx)(i(),{href:"/p/".concat(e.slug),children:e.name})]},e.slug))]})]})]}):(0,n.jsxs)("p",{className:"brief brief--quiet",children:[(0,n.jsx)(o.efr,{"aria-hidden":!0}),(0,n.jsx)("span",{children:d("today.nothing",{period:g})})]})}var N=a(236);function _(){let e=(0,y.kj)(),t=(0,N.t)();return(null==t?void 0:t.catalog)?(0,n.jsx)(N.K,{failure:t.catalog}):(null==t?void 0:t.active)!==!1?null:(0,n.jsxs)("p",{className:"brief brief--alert",role:"status",children:[(0,n.jsx)(o.z1N,{"aria-hidden":!0}),(0,n.jsx)("span",{children:e("watch.off")})]})}function S(e){let{total:t}=e,a=(0,y.kj)(),s=(0,l.useRouter)(),[,i]=(0,r.useTransition)(),[c,d]=(0,r.useState)(null),[h,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(""),[f,x]=(0,r.useState)(!1),[j,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(null),[w,k]=(0,r.useState)(null),N=(0,r.useCallback)(async()=>{try{var e;let t=await fetch("/api/roots"),a=await t.json();d(null!=(e=a.roots)?e:[])}catch(e){d([])}},[]);(0,r.useEffect)(()=>{N()},[N]);let[_,S]=(0,r.useState)(null);async function M(e,t){if(!f&&t.trim()){x(!0),k(null);try{var n,l,r;let o=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,path:t.trim()})}),c=await o.json().catch(()=>({}));if(!o.ok)return void k({text:null!=(n=c.error)?n:a("sites.failed"),bad:!0});if(p(""),await N(),"add"===e){let e=null!=(l=c.found)?l:0;k({text:a(1===e?"sites.addedOne":"sites.addedMany",{n:e}),bad:!1}),i(()=>s.refresh())}else k({text:a("sites.removed",{n:null!=(r=c.removed)?r:0}),bad:!1}),i(()=>s.refresh())}catch(e){k({text:a("task.unreachable"),bad:!0})}finally{x(!1)}}}async function T(){if(!j&&!f){g(!0),k(null);try{var e,t;let n=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"search"})}),s=await n.json();v(null!=(e=s.candidates)?e:[]),0===(null!=(t=s.candidates)?t:[]).length&&k({text:a("sites.searchNone"),bad:!1})}catch(e){k({text:a("task.unreachable"),bad:!0})}finally{g(!1)}}}if(!c||0===c.length)return null;let O=c.map(e=>C(e.path));return(0,n.jsxs)("div",{className:"sites",children:[(0,n.jsxs)("button",{type:"button",className:"sites__line",onClick:()=>u(!h),"aria-expanded":h,children:[(0,n.jsx)(o.gBk,{"aria-hidden":!0}),(0,n.jsx)("span",{children:a(1===t?"sites.summaryOne":"sites.summaryMany",{n:t,where:O.slice(0,2).join(", "),extra:O.length>2?" ".concat(a("sites.andMore",{n:O.length-2})):""})}),(0,n.jsx)("span",{className:"sites__action",children:a(h?"sites.close":"sites.manage")})]}),h&&(0,n.jsxs)("div",{className:"sites__detail",children:[(0,n.jsx)("ul",{children:c.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{title:e.path,children:C(e.path)}),(0,n.jsxs)("span",{children:[a(1===e.projects?"sites.countOne":"sites.countMany",{n:e.projects}),!e.exists&&" \xb7 ".concat(a("sites.missing"))]}),_===e.path?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",onClick:()=>{S(null),M("remove",e.path)},disabled:f,className:"text-fail",children:a("sites.removeConfirm",{n:e.projects})}),(0,n.jsx)("button",{type:"button",onClick:()=>S(null),disabled:f,children:a("accounts.cancel")})]}):(0,n.jsx)("button",{type:"button",onClick:()=>S(e.path),disabled:f,children:a("sites.remove")})]},e.path))}),(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),M("add",m)},children:[(0,n.jsx)("input",{value:m,onChange:e=>p(e.target.value),placeholder:a("sites.placeholder"),"aria-label":a("sites.fieldLabel"),spellCheck:!1}),(0,n.jsxs)("button",{type:"submit",disabled:f||!m.trim(),children:[(0,n.jsx)(o.K0m,{"aria-hidden":!0}),a(f?"sites.adding":"sites.add")]})]}),(0,n.jsxs)("div",{className:"sites__search",children:[(0,n.jsxs)("button",{type:"button",onClick:T,disabled:j||f,children:[(0,n.jsx)(o.JJh,{"aria-hidden":!0}),a(j?"sites.searching":"sites.search")]}),(0,n.jsx)("span",{children:a("sites.searchHint")})]}),b&&b.length>0&&(0,n.jsx)("ul",{className:"sites__candidates",children:b.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{title:e.path,children:C(e.path)}),(0,n.jsx)("span",{children:a(1===e.projects?"sites.countOne":"sites.countMany",{n:e.projects})}),(0,n.jsx)("button",{type:"button",onClick:()=>{v(t=>(null!=t?t:[]).filter(t=>t.path!==e.path)),M("add",e.path)},disabled:f,children:a("sites.add")})]},e.path))}),(0,n.jsx)("p",{className:"sites__note",children:a("sites.note")}),w&&(0,n.jsx)("p",{className:w.bad?"sites__error":"sites__note",children:w.text})]})]})}function C(e){return e.replace(/^\/Users\/[^/]+/,"~")}var M=a(5035),T=a(8010),O=a(7558);let P="#0e0f11",A="#5c6169",I="#8b9098",R="#e7e8ea",D="#ffffff",E='"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';function F(e){return String(Math.max(0,Math.trunc(e)))}function U(e){return e>=75?"#2eaa63":e>=50?"#e4a30b":"#ea5a58"}function W(e,t,a,n,s,i){e.beginPath(),e.moveTo(t+i,a),e.arcTo(t+n,a,t+n,a+s,i),e.arcTo(t+n,a+s,t,a+s,i),e.arcTo(t,a+s,t,a,i),e.arcTo(t,a,t+n,a,i),e.closePath()}function L(e){return new Promise(t=>{let a=new Image;a.onload=()=>t(a),a.onerror=()=>t(null),a.src=e})}function H(e){let{data:t,discreet:a,onClose:s}=e,i=(0,y.kj)(),l=(0,y.Ym)(),h=(0,r.useRef)(null),u=(0,r.useRef)(null),m=(0,r.useRef)(null);(0,T.y)(u,!0,s),(0,O.r)(u,!0),(0,r.useEffect)(()=>{let e=requestAnimationFrame(()=>{var e;return null==(e=m.current)?void 0:e.focus()});return()=>cancelAnimationFrame(e)},[]);let[p,f]=(0,M.F)("share:user","","compartir:usuario"),[x,j]=(0,M.F)("share:language",l,"compartir:idioma"),[g,b]=(0,r.useState)(!a),[v,w]=(0,r.useState)(!1),[k,N]=(0,r.useState)("idle"),[_,S]=(0,r.useState)("idle"),C=(0,r.useCallback)((e,t)=>(0,d.t)(x,e,t),[x]),H=(0,r.useCallback)(async()=>{let e=h.current;if(!e)return;let a=await L("/assets/brand/panoma.svg"),n=function(e,t,a){let n=Math.max(0,Math.trunc(t));if(n<=8&&e.length>=n)return e.slice(0,n);let s=e.slice(0,Math.min(7,n)),i=Math.max(0,n-s.length);return i>0?[...s,a(i)]:s}(g?(await Promise.all(t.featuredProjects.slice(0,8).map(async e=>({...e,loadedIcon:await L(e.icon)})))).flatMap(e=>{let{loadedIcon:t,...a}=e;return t?[{...a,icon:t}]:[]}):t.featuredProjects.slice(0,8).map((e,t)=>({name:C("store.hidden",{n:t+1}),health:e.health,icon:null,concealed:!0})),t.projects,e=>({name:C("share.more",{n:e}),health:0,icon:a,panomaMark:!0,summary:!0}));!function(e,t){var a,n,s;let i=e.getContext("2d");if(!i)return;e.width=1600,e.height=900,i.fillStyle=D,i.fillRect(0,0,1600,900),i.strokeStyle=R,i.lineWidth=2,i.strokeRect(1,1,1598,898),function(e,t,a,n){if(t)try{e.drawImage(t,t.naturalWidth*(280/1024),t.naturalHeight*(222/1024),.515625*t.naturalWidth,t.naturalHeight*(586/1024),82,66,60,66)}catch(e){}e.fillStyle=P,e.font="650 42px ".concat(E),e.fillText("panoma",a+66+22,n+48)}(i,t.logo,82,66),i.font="500 25px ".concat(E),i.fillStyle=I,i.textAlign="right",i.fillText(t.domain,1518,105),i.textAlign="left",i.fillStyle=P,function(e,t,a,n){let s=n;for(e.font="650 ".concat(s,"px ").concat(E);s>62&&e.measureText(t).width>1436;)s-=2,e.font="650 ".concat(s,"px ").concat(E)}(i,t.texts.title,1436,t.featuredProjects.length>0?86:102),i.fillText(t.texts.title,82,t.featuredProjects.length>0?278:350),t.featuredProjects.length>0&&function(e,t,a,n,s){let i=t.slice(0,8),l=1436/i.length,r=398,o=Math.min(122,l-28);e.fillStyle=I,e.font="600 18px ".concat(E),e.fillText(s.health.toUpperCase(),a,n),function(e,t,a,n){let s=[[n.healthGood,"#2eaa63"],[n.healthReview,"#e4a30b"],[n.healthAttention,"#ea5a58"]];e.font="550 17px ".concat(E);let i=t-(s.map(t=>{let[a]=t;return 14+e.measureText(a).width}).reduce((e,t)=>e+t,0)+28*(s.length-1));for(let[t,n]of s)e.fillStyle=n,e.beginPath(),e.arc(i+5,a-6,5,0,2*Math.PI),e.fill(),e.fillStyle=A,e.fillText(t,i+16,a),i+=14+e.measureText(t).width+28}(e,1600-a,n,s),i.forEach((t,n)=>{let s=a+l*n+l/2,i=s-37;if(e.save(),W(e,i,r,74,74,18),e.clip(),e.fillStyle=D,e.fill(),t.concealed){var c,d=e,h=i,u=r,m=74,p=n;d.fillStyle="#111316",d.fillRect(h,u,74,m),d.save(),d.strokeStyle="rgba(255, 255, 255, 0.085)",d.lineWidth=1.5;let t=null!=(c=[0,7,-5,12][p%4])?c:0;for(let e=-m;e<2*m;e+=17)d.beginPath(),d.moveTo(h+e+t,u+m),d.lineTo(h+e+m+t,u),d.stroke();d.restore(),d.save(),d.shadowColor="rgba(255, 255, 255, 0.12)",d.shadowBlur=6,d.fillStyle="#f4f4f2",W(d,h+(m-44)/2,u+(m-10)/2,44,10,6),d.fill(),d.restore(),d.fillStyle="rgba(77, 81, 88, 0.7)";for(let e=0;e<4;e+=1)W(d,h+m/2-11+7*e,u+m/2-2,2,4,1),d.fill()}else if(t.icon)try{t.panomaMark&&t.icon instanceof HTMLImageElement?function(e,t,a,n,s,i,l){let r=document.createElement("canvas");r.width=Math.round(88),r.height=Math.round(100);let o=r.getContext("2d");o&&(o.drawImage(t,t.naturalWidth*(280/1024),t.naturalHeight*(222/1024),.515625*t.naturalWidth,t.naturalHeight*(586/1024),0,0,r.width,r.height),o.globalCompositeOperation="source-in",o.fillStyle=l,o.fillRect(0,0,r.width,r.height),e.drawImage(r,a,n,s,i))}(e,t.icon,i+15,r+11,44,50,t.summary?P:U(t.health)):e.drawImage(t.icon,i,r,74,74)}catch(e){}if(e.restore(),e.strokeStyle=R,e.lineWidth=1.5,W(e,i,r,74,74,18),e.stroke(),e.fillStyle=P,e.font="600 21px ".concat(E),e.textAlign="center",e.fillText(function(e,t,a){if(e.measureText(t).width<=a)return t;let n=t;for(;n.length>1&&e.measureText("".concat(n,"…")).width>a;)n=n.slice(0,-1);return"".concat(n,"…")}(e,t.name,l-16),s,r+104),t.summary){e.textAlign="left";return}let f=s-o/2,x=r+128;e.fillStyle=R,W(e,f,x,o,10,5),e.fill(),e.fillStyle=U(t.health),W(e,f,x,Math.max(10,o*(Math.min(100,Math.max(0,t.health))/100)),10,5),e.fill(),e.fillStyle=U(t.health),e.font="650 19px ".concat(E),e.fillText("".concat(t.health,"/100"),s,r+171),e.textAlign="left"})}(i,t.featuredProjects,82,348,t.texts);let l=t.featuredProjects.length>0?655:505;a=i,n=82,s=l,a.strokeStyle=R,a.lineWidth=1.5,a.beginPath(),a.moveTo(82,s),a.lineTo(n+1436,s),a.stroke(),function(e,t,a,n){let s=[[F(t.projects),t.texts.projects],[F(t.commits),t.texts.commits],[F(t.technologies),t.texts.technologies]];null!==t.agents&&s.push(["".concat(t.agents,"%"),t.texts.agents]);let i=1436/s.length;s.forEach((t,s)=>{let[l,r]=t,o=a+i*s;s>0&&(e.strokeStyle=R,e.lineWidth=1.5,e.beginPath(),e.moveTo(o-34,n-10),e.lineTo(o-34,n+79),e.stroke()),e.fillStyle=P,e.font="650 54px ".concat(E),e.fillText(l,o,n+45),e.fillStyle=I,e.font="500 22px ".concat(E),e.fillText(r,o,n+78)})}(i,t,82,l+51),t.user&&(i.fillStyle=A,i.font="550 27px ".concat(E),i.fillText(t.user,82,839)),i.fillStyle=I,i.font="500 23px ".concat(E),i.textAlign="right",i.fillText(t.texts.localFirst,1518,839),i.textAlign="left"}(e,{...t,logo:a,featuredProjects:n,user:p.trim()?p.trim().replace(/^@?/,"@"):void 0,domain:K,texts:{title:C("share.titulo",{n:t.projects}),projects:C("share.proyectos"),technologies:C("share.tecnologias"),commits:C("share.commits"),agents:C("share.agentes"),health:C("share.salud"),healthGood:C("share.saludBien"),healthReview:C("share.saludRevisar"),healthAttention:C("share.saludAtencion"),localFirst:C("share.local")}})},[g,t,C,p]);async function G(){let e=await z(h.current);e&&J(e)}async function Z(){try{await navigator.clipboard.writeText(V(t,C)),w(!0),setTimeout(()=>w(!1),1800)}catch(e){}}async function Y(){N("preparing");let e=await z(h.current);if(!e)return void N("failed");let a=V(t,C),n=new File([e],B,{type:"image/png"});if(function(e){if("function"!=typeof navigator.share||"function"!=typeof navigator.canShare)return!1;try{return navigator.canShare({files:[e]})}catch(e){return!1}}(n))try{await navigator.share({files:[n],text:a,title:"Panoma"}),N("idle");return}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return void N("idle")}let s=await q(e);s||J(e),N(s?"copied":"downloaded"),window.setTimeout(()=>N("idle"),2600)}async function $(){S("preparing");let e=function(e){if(!e)return null;try{let t=e.toDataURL("image/png"),a=t.slice(t.indexOf(",")+1),n=window.atob(a),s=new Uint8Array(n.length);for(let e=0;e<n.length;e+=1)s[e]=n.charCodeAt(e);return new Blob([s],{type:"image/png"})}catch(e){return null}}(h.current);if(!e)return void S("failed");let a=q(e);var n=V(t,C);let s=document.createElement("a");s.href="https://x.com/intent/post?text=".concat(encodeURIComponent(n)),s.target="_blank",s.rel="noreferrer noopener",s.click();let i=await a;i||J(e),S(i?"copied":"downloaded"),window.setTimeout(()=>S("idle"),2600)}return(0,r.useEffect)(()=>{H()},[H]),(0,n.jsxs)("div",{className:"share",role:"dialog","aria-modal":"true","aria-label":i("share.abrir"),children:[(0,n.jsxs)("div",{className:"share__box",ref:u,children:[(0,n.jsxs)("header",{children:[(0,n.jsx)("h2",{children:i("share.abrir")}),(0,n.jsx)("button",{ref:m,type:"button",onClick:s,"aria-label":i("share.cerrar"),children:(0,n.jsx)(o.fZH,{"aria-hidden":!0})})]}),(0,n.jsx)("canvas",{ref:h,className:"share__canvas",width:1600,height:900,role:"img","aria-label":i("share.preview")}),(0,n.jsxs)("div",{className:"share__options",children:[(0,n.jsxs)("div",{className:"share__language",children:[(0,n.jsx)("span",{children:i("share.idioma")}),(0,n.jsxs)("div",{role:"group","aria-label":i("share.idioma"),children:[(0,n.jsx)("button",{type:"button",className:"es"===x?"is-active":void 0,"aria-pressed":"es"===x,onClick:()=>j("es"),children:"Espa\xf1ol"}),(0,n.jsx)("button",{type:"button",className:"en"===x?"is-active":void 0,"aria-pressed":"en"===x,onClick:()=>j("en"),children:"English"})]})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("span",{children:i("share.usuario")}),(0,n.jsx)("input",{value:p,onChange:e=>f(e.target.value),placeholder:i("share.usuarioVacio"),spellCheck:!1,maxLength:40})]}),(0,n.jsx)("button",{type:"button",className:"share__visibility".concat(g?"":" is-private"),onClick:()=>b(e=>!e),"aria-pressed":!g,"aria-label":i(g?"store.hideNames":"store.showNames"),title:i(g?"store.hideNames":"store.showNames"),children:g?(0,n.jsx)(o.bZk,{"aria-hidden":!0}):(0,n.jsx)(o.EgV,{"aria-hidden":!0})})]}),(0,n.jsx)("p",{className:"share__note",children:i("share.nota")}),(0,n.jsxs)("footer",{children:[(0,n.jsxs)("button",{type:"button",className:"share__primary",onClick:G,children:[(0,n.jsx)(o.Dho,{"aria-hidden":!0}),i("share.descargar")]}),(0,n.jsx)("button",{type:"button",onClick:Z,children:i(v?"share.textoCopiado":"share.copiarTexto")}),(0,n.jsxs)("button",{type:"button",onClick:Y,disabled:"preparing"===k,children:[(0,n.jsx)(o.XcM,{"aria-hidden":!0}),i("share.image.".concat(k))]}),(0,n.jsxs)("button",{type:"button",onClick:$,disabled:"preparing"===_,children:[(0,n.jsx)(c.vIh,{"aria-hidden":!0}),i("share.x.".concat(_))]})]})]}),(0,n.jsx)("button",{type:"button",className:"share__backdrop",onClick:s,"aria-label":i("share.cerrar")})]})}let K="panoma.ai",B="panoma-projects.png";function z(e){return new Promise(t=>{if(!e)return void t(null);e.toBlob(t,"image/png")})}function J(e){let t=URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.download=B,a.click(),URL.revokeObjectURL(t)}async function q(e){var t;if("undefined"==typeof ClipboardItem||"function"!=typeof(null==(t=navigator.clipboard)?void 0:t.write))return!1;try{return await navigator.clipboard.write([new ClipboardItem({"image/png":e})]),!0}catch(e){return!1}}function V(e,t){return t("share.texto",{n:e.projects,domain:K})}var G=a(2922),Z=a(5018),Y=a(8337);let $={typescript:{icon:c.cyb,color:"#3178c6"},"next.js":{icon:c.wlC,color:"#111111"},nextjs:{icon:c.wlC,color:"#111111"},react:{icon:c.GWR,color:"#149eca"},flutter:{icon:c.FuR,color:"#02569b"},dart:{icon:c.A7B,color:"#0175c2"},"node.js":{icon:c.h$$,color:"#5fa04e"},nodejs:{icon:c.h$$,color:"#5fa04e"},python:{icon:c.ptC,color:"#3776ab"},rust:{icon:c.xZd,color:"#111111"},go:{icon:c.ZRx,color:"#00add8"},vue:{icon:c.Zmg,color:"#42b883"},"vue.js":{icon:c.Zmg,color:"#42b883"},svelte:{icon:c.Qmm,color:"#ff3e00"},swift:{icon:c.cp,color:"#f05138"},kotlin:{icon:c.sjH,color:"#7f52ff"},ruby:{icon:c.LfU,color:"#cc342d"},php:{icon:c.XeU,color:"#777bb4"},express:{icon:c.t5I,color:"#111111"},tailwind:{icon:c.IR8,color:"#06b6d4"},tailwindcss:{icon:c.IR8,color:"#06b6d4"},docker:{icon:c.tih,color:"#2496ed"},postgresql:{icon:c.$Wy,color:"#4169e1"},supabase:{icon:c.lLb,color:"#3ecf8e"},firebase:{icon:c.iWE,color:"#ffca28"}},X=["all","attention","favorites","not-mine","web","mobile","backend","tools","ai","other"],Q={all:"filter.all",attention:"filter.attention",favorites:"filter.favorites","not-mine":"filter.notMine",web:"filter.web",mobile:"filter.mobile",backend:"filter.backend",tools:"filter.tools",ai:"filter.ai",other:"filter.other"};function ee(e){let{name:t,onOpen:a}=e,s=(0,y.kj)();return(0,n.jsx)("button",{type:"button",className:"open-handle",title:s("catalog.openHandle",{name:t}),"aria-label":s("catalog.openHandle",{name:t}),onClick:e=>{e.stopPropagation(),a()},onDoubleClick:e=>e.stopPropagation(),children:(0,n.jsx)(o.OvC,{"aria-hidden":!0})})}function et(){let e=(0,y.kj)();return(0,n.jsx)("span",{className:"opening-spinner",role:"status","aria-label":e("catalog.opening")})}function ea(e){var t;return null!=(t=e.proposedRuns)?t:0}function en(e){return ea(e)>0||e.risks.length>0||e.vulnCount>0||e.outdatedDeps>0||!!e.depsUnresolved}function es(e){return"A"===e||"B"===e?"good":"C"===e?"warn":"bad"}function ei(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,"~")}function el(e){var t,a;let{projects:s,report:c}=e,d=(0,l.useRouter)(),v=(0,y.kj)(),{query:w,setQuery:N}=(0,Z.S)(),[C,T]=(0,M.F)("filter","all","filtro"),O=X.includes(C)?C:"all",[P,A]=(0,M.F)("sort","recent","orden"),[I,R]=(0,M.F)("view","grid","vista"),[D,E]=(0,M.F)("discreet",!1,"discreto"),[F,U]=(0,r.useState)(!1),[W,L]=(0,M.F)("favorites",[],"favoritos"),K=(0,r.useMemo)(()=>new Set(W),[W]),[B,z]=(0,r.useState)(null!=(a=null==(t=s[0])?void 0:t.id)?a:null),J=(0,r.useRef)(!1),q=(0,r.useRef)(null),[V,G]=(0,r.useState)(null),[$,ee]=(0,r.useState)(null),et=s[0],ea=(0,r.useMemo)(()=>s.filter(en).length,[s]),es=(0,r.useMemo)(()=>s.filter(e=>K.has(e.id)).length,[K,s]),ei=(0,r.useMemo)(()=>{let e=(0,Y.A)(w.trim());return s.filter(t=>{let a=!e||(0,Y.A)([t.name,t.description,t.primaryLanguage,...t.technologies.flatMap(e=>[e.name,e.version]),...t.agents.map(e=>e.name)].filter(Boolean).join(" ")).includes(e),n="all"===O||("attention"===O?en(t):"favorites"===O?K.has(t.id):"not-mine"===O?"foreign"===t.originKind||"forked"===t.originKind||"template"===t.originKind:(function(e){var t;let a=new Set,n=(null!=(t=e.primaryLanguage)?t:"").toLowerCase();for(let t of e.technologies){let e=t.name.toLowerCase();"model"===t.kind&&a.add("ai"),h.has(e)&&a.add("mobile"),(u.has(e)||b.has(e))&&a.add("web"),(m.has(e)||g.has(e))&&a.add("backend"),p.has(e)&&a.add("tools")}return j.has(n)&&a.add("mobile"),f.has(n)&&a.add("web"),x.has(n)&&a.add("backend"),0===a.size&&/\b(cli|tool|tools|runner|script|scripts|terminal|bot|daemon|agent)\b/.test(e.name.toLowerCase())&&a.add("tools"),0===a.size&&e.technologies.some(e=>"runtime"===e.kind&&["node.js","deno","bun"].includes(e.name.toLowerCase()))&&a.add("backend"),0===a.size&&a.add("other"),a})(t).has(O));return a&&n}).sort((e,t)=>{let a=Number(K.has(t.id))-Number(K.has(e.id));return 0!==a?a:"name"===P?e.name.localeCompare(t.name,"es"):"health"===P?t.healthScore-e.healthScore:(t.lastCommitAt?Date.parse(t.lastCommitAt):0)-(e.lastCommitAt?Date.parse(e.lastCommitAt):0)})},[K,O,s,w,P]),el=(0,r.useMemo)(()=>ei.findIndex(e=>e.id===B),[ei,B]),ed=-1===el?null:ei[el];(0,r.useEffect)(()=>{if(J.current)return;let e=ei[0];e&&e.id!==B&&z(e.id)},[ei,B]);let eh=(0,r.useCallback)(e=>{J.current=!0,z(e),G(null)},[]),[eu,em]=(0,r.useTransition)(),[ef,ex]=(0,r.useState)(null),ej=(0,r.useCallback)(e=>{ex(e.id),em(()=>d.push("/p/".concat(e.slug)))},[d]),eg=(0,r.useCallback)(()=>{var e;let t=null==(e=q.current)?void 0:e.querySelectorAll("[data-index]"),a=null==t?void 0:t[0];if(!a)return 1;let n=a.offsetTop,s=0;for(let e of t){if(e.offsetTop!==n)break;s+=1}return Math.max(1,s)},[]);function eb(e){var t,a;if(0===ei.length)return;let n=ei.findIndex(e=>e.id===B),s=-1===n?0:Math.min(ei.length-1,Math.max(0,n+e)),i=ei[s];i&&(eh(i.id),null==(a=q.current)||null==(t=a.querySelector('[data-index="'.concat(s,'"]')))||t.focus())}async function ey(e){var t,a,n;let i;G(null);try{i=await fetch("/api/project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ocultar",id:e})})}catch(e){G(v("project.unreachable"));return}if(!i.ok)return void G(null!=(a=(await i.json().catch(()=>({}))).error)?a:v("project.actionFailed"));B===e&&eh(null),ee({id:e,name:null!=(n=null==(t=s.find(t=>t.id===e))?void 0:t.name)?n:""}),d.refresh()}async function ev(e){G(null);try{let a=await fetch("/api/project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mostrar",id:e})});if(!a.ok){var t;let e=await a.json().catch(()=>({}));G(null!=(t=e.error)?t:v("project.actionFailed"));return}}catch(e){G(v("project.unreachable"));return}ee(null),d.refresh()}let ew={attention:ea,favorites:es};return et?(0,n.jsx)("main",{id:"app-main",tabIndex:-1,className:"app-main catalog-screen",children:(0,n.jsxs)("div",{className:"catalog-screen__inner",children:[(0,n.jsx)(k,{report:c}),(0,n.jsx)(_,{}),$&&(0,n.jsxs)("p",{className:"brief brief--dismissed",role:"status",children:[(0,n.jsx)(o.EgV,{"aria-hidden":!0}),(0,n.jsx)("span",{children:v("store.justHidden",{name:$.name})}),(0,n.jsx)("button",{type:"button",onClick:()=>void ev($.id),children:v("store.undoHide")}),(0,n.jsx)(i(),{href:"/hidden",children:v("store.seeHidden")})]}),(0,n.jsxs)("div",{className:"catalog-bar",children:[(0,n.jsxs)("h1",{children:[v("catalog.title"),(0,n.jsx)("span",{children:ei.length===s.length?v(1===s.length?"catalog.countOne":"catalog.count",{n:s.length}):"".concat(ei.length," / ").concat(s.length)})]}),(0,n.jsxs)("div",{className:"catalog-bar__tools",children:[(0,n.jsx)("p",{className:"catalog-hint",children:v("catalog.hint")}),(0,n.jsxs)("label",{className:"catalog-sort",children:[(0,n.jsx)("span",{className:"sr-only",children:v("store.sortLabel")}),(0,n.jsxs)("select",{value:P,onChange:e=>A(e.target.value),children:[(0,n.jsx)("option",{value:"recent",children:v("store.sortRecent")}),(0,n.jsx)("option",{value:"name",children:v("store.sortName")}),(0,n.jsx)("option",{value:"health",children:v("store.sortHealth")})]})]}),(0,n.jsx)("button",{type:"button",className:"catalog-tool".concat(D?" is-active":""),onClick:()=>E(!D),"aria-pressed":D,title:v(D?"store.showNames":"store.hideNames"),children:D?(0,n.jsx)(o.EgV,{"aria-hidden":!0}):(0,n.jsx)(o.bZk,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",className:"catalog-tool",onClick:()=>U(!0),"aria-label":v("share.abrir"),title:v("share.abrir"),children:(0,n.jsx)(o.XcM,{"aria-hidden":!0})}),(0,n.jsxs)("div",{className:"view-switch",role:"group","aria-label":v("store.viewAria"),children:[(0,n.jsx)("button",{type:"button",onClick:()=>R("list"),className:"list"===I?"is-active":void 0,"aria-label":v("store.viewList"),"aria-pressed":"list"===I,children:(0,n.jsx)(o.$mg,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",onClick:()=>R("grid"),className:"grid"===I?"is-active":void 0,"aria-label":v("store.viewGrid"),"aria-pressed":"grid"===I,children:(0,n.jsx)(o.ENP,{"aria-hidden":!0})})]})]})]}),(0,n.jsx)("div",{className:"catalog-filters",role:"group","aria-label":v("store.filterAria"),children:X.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>T(e),className:O===e?"is-active":void 0,"aria-pressed":O===e,children:[v(Q[e]),ew[e]?(0,n.jsx)("span",{children:ew[e]}):null]},e))}),(0,n.jsx)(er,{project:et,discreet:D,index:Math.max(0,s.findIndex(e=>e.id===et.id))}),(0,n.jsx)(S,{total:s.length}),F&&(0,n.jsx)(H,{data:function(e){let t=e.reduce((e,t)=>{var a;return e+(null!=(a=t.gitCommitCount)?a:0)},0),a=new Set(e.flatMap(e=>e.technologies.map(e=>e.name))),n=e.reduce((e,t)=>e+t.agents.reduce((e,t)=>e+t.commits,0),0);return{projects:e.length,technologies:a.size,commits:t,agents:t>0&&n>0?Math.min(100,Math.round(n/t*100)):null,featuredProjects:e.filter(e=>e.hasIcon).slice(0,8).map(e=>({name:e.name,health:e.healthScore,icon:"/icon/".concat(e.id)}))}}(s),discreet:D,onClose:()=>U(!1)}),(0,n.jsxs)("div",{className:"catalog-split","data-open":ed?"true":"false",children:[(0,n.jsx)("div",{className:"catalog-body",children:ei.length>0?(0,n.jsxs)(n.Fragment,{children:["list"===I&&(0,n.jsxs)("div",{className:"catalog-columns","aria-hidden":!0,children:[(0,n.jsx)("span",{children:v("catalog.colProject")}),(0,n.jsx)("span",{children:v("catalog.colHealth")}),(0,n.jsx)("span",{children:v("catalog.colStack")}),(0,n.jsx)("span",{children:v("catalog.colActivity")})]}),(0,n.jsx)("div",{ref:q,role:"listbox","aria-label":v("catalog.rowsAria"),className:"catalog-rows catalog-rows--".concat(I),onKeyDown:function(e){let t="grid"===I?eg():1,a={ArrowDown:t,ArrowUp:-t,..."grid"===I?{ArrowRight:1,ArrowLeft:-1}:{}}[e.key];if(void 0!==a){e.preventDefault(),eb(a);return}if("Home"===e.key||"End"===e.key){e.preventDefault(),eb("Home"===e.key?-ei.length:ei.length);return}"Escape"===e.key&&B&&(e.preventDefault(),eh(null))},children:ei.map((e,t)=>{let a={project:e,index:t,selected:e.id===B,tabbable:t===(-1===el?0:el),favorite:K.has(e.id),opening:eu&&ef===e.id,discreet:D,onSelect:()=>eh(e.id),onOpen:()=>ej(e)};return"list"===I?(0,n.jsx)(eo,{...a},e.id):(0,n.jsx)(ec,{...a},e.id)})})]}):(0,n.jsxs)("div",{className:"catalog-empty",role:"status",children:[(0,n.jsx)(o.ENP,{"aria-hidden":!0}),(0,n.jsx)("h2",{children:v("store.noResults")}),(0,n.jsx)("p",{children:v("store.noResultsBody")}),(0,n.jsx)("button",{type:"button",onClick:()=>{T("all"),N(""),window.location.search&&d.replace("/",{scroll:!1})},children:v("store.clearFilters")})]})}),ed&&(0,n.jsx)(ep,{project:ed,discreet:D,index:Math.max(0,ei.findIndex(e=>e.id===ed.id)),favorite:K.has(ed.id),onFavorite:()=>{var e;return e=ed.id,void L(K.has(e)?W.filter(t=>t!==e):[...W,e])},onHide:()=>ey(ed.id),onClose:()=>eh(null),error:V},ed.id)]})]})}):null}function er(e){let{project:t,discreet:a,index:s}=e,i=(0,y.kj)(),l=(0,y.Ym)(),r=a?i("store.hidden",{n:s+1}):t.name;return(0,n.jsxs)("section",{className:"resume-strip","aria-label":i("store.resume"),children:[(0,n.jsx)(o.cyc,{"aria-hidden":!0}),(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:r}),(0,n.jsx)("span",{children:t.lastCommitSubject||function(e,t){if(e.description)return e.description;let a=e.technologies.find(e=>"framework"===e.kind||"language"===e.kind);return a?t("store.builtWith",{tech:a.name}):t("store.detected")}(t,i)})]}),(0,n.jsx)("span",{className:"resume-strip__when",children:(0,v.Pp)(t.lastCommitAt,l)}),(0,n.jsx)(G.q,{projectId:t.id,path:t.root,locale:l,compact:!0})]})}function eo(e){let{project:t,index:a,selected:s,tabbable:i,favorite:l,opening:r,discreet:c,onSelect:h,onOpen:u}=e,m=(0,y.kj)(),p=(0,y.Ym)(),f=ea(t);return(0,n.jsxs)("div",{id:"catalog-".concat(t.id),role:"option","aria-selected":s,"aria-busy":r,tabIndex:i?0:-1,"data-index":a,className:"catalog-row",title:c?m("store.hidden",{n:a+1}):t.root,onClick:h,onDoubleClick:u,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())," "===e.key&&(e.preventDefault(),h())},children:[(0,n.jsxs)("span",{className:"catalog-row__identity",children:[c?(0,n.jsx)(ed,{size:"row",variant:a}):(0,n.jsx)(v.hV,{locale:p,name:t.name,src:t.hasIcon?"/icon/".concat(t.id):null,size:40,tone:"neutral"}),(0,n.jsxs)("span",{className:"catalog-row__names",children:[(0,n.jsxs)("span",{className:"catalog-row__name",children:[(0,n.jsx)("span",{children:c?m("store.hidden",{n:a+1}):t.name}),l&&(0,n.jsx)(o.K7t,{className:"catalog-row__star","aria-hidden":!0}),f>0&&(0,n.jsxs)("span",{className:"waiting-badge",title:m(1===f?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:f}),children:[(0,n.jsx)("span",{"aria-hidden":!0,children:f}),(0,n.jsx)("span",{className:"sr-only",children:m(1===f?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:f})})]}),t.risks.length>0&&(0,n.jsx)(o.Dco,{className:"risk-mark",title:t.risks.map(e=>(0,d.P3)(m,e)).join(" \xb7 ")})]}),!c&&(0,n.jsxs)("span",{className:"catalog-row__path",children:[ei(t.root),t.copyCount>0&&(0,n.jsxs)("span",{title:m("store.alsoCopiesTitle"),children:[" ",m("store.alsoCopies",{n:t.copyCount})]})]})]})]}),(0,n.jsx)(eh,{score:t.healthScore,grade:t.healthGrade}),(0,n.jsx)(eu,{technologies:t.technologies}),(0,n.jsxs)("span",{className:"catalog-row__activity",children:[(0,n.jsx)(em,{state:t.state}),(0,v.Pp)(t.lastCommitAt,p)]}),(0,n.jsx)("span",{className:"catalog-row__handle",children:r?(0,n.jsx)(et,{}):(0,n.jsx)(ee,{name:c?m("store.hidden",{n:a+1}):t.name,onOpen:u})})]})}function ec(e){let{project:t,index:a,selected:s,tabbable:i,favorite:l,opening:r,discreet:c,onSelect:h,onOpen:u}=e,m=(0,y.Ym)(),p=(0,y.kj)();return(0,n.jsxs)("div",{id:"catalog-".concat(t.id),role:"option","aria-selected":s,"aria-busy":r,tabIndex:i?0:-1,"data-index":a,className:"catalog-tile",title:c?p("store.hidden",{n:a+1}):t.root,onClick:h,onDoubleClick:u,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())," "===e.key&&(e.preventDefault(),h())},children:[(0,n.jsx)(eh,{score:t.healthScore,grade:t.healthGrade}),(0,n.jsx)("span",{className:"catalog-tile__handle",children:r?(0,n.jsx)(et,{}):(0,n.jsx)(ee,{name:c?p("store.hidden",{n:a+1}):t.name,onOpen:u})}),c?(0,n.jsx)(ed,{size:"tile",variant:a}):(0,n.jsx)(v.hV,{locale:m,name:t.name,src:t.hasIcon?"/icon/".concat(t.id):null,size:54,tone:"neutral"}),(0,n.jsxs)("span",{className:"catalog-tile__name",children:[l&&(0,n.jsx)(o.K7t,{"aria-hidden":!0}),(0,n.jsx)("span",{children:c?p("store.hidden",{n:a+1}):t.name})]}),(0,n.jsxs)("span",{className:"catalog-tile__meta",children:[(0,n.jsx)(em,{state:t.state}),(0,v.Pp)(t.lastCommitAt,m),t.risks.length>0&&(0,n.jsx)(o.Dco,{className:"risk-mark",title:t.risks.map(e=>(0,d.P3)(p,e)).join(" \xb7 ")})]})]})}function ed(e){let{size:t,variant:a}=e;return(0,n.jsx)("span",{className:"catalog-private-mark catalog-private-mark--".concat(t),"data-variant":a%4,"aria-hidden":!0,children:(0,n.jsx)("span",{className:"catalog-private-mark__seal"})})}function eh(e){let{score:t,grade:a}=e,s=(0,y.kj)(),i=2*Math.PI*11,l=Math.max(0,Math.min(100,t))/100*i;return(0,n.jsxs)("span",{className:"health-dial health-dial--".concat(es(a)),title:s("catalog.healthOf",{n:t}),children:[(0,n.jsxs)("svg",{viewBox:"0 0 26 26","aria-hidden":!0,children:[(0,n.jsx)("circle",{className:"health-dial__track",cx:"13",cy:"13",r:11}),(0,n.jsx)("circle",{className:"health-dial__arc",cx:"13",cy:"13",r:11,strokeDasharray:"".concat(l," ").concat(i)})]}),(0,n.jsx)("span",{children:t})]})}function eu(e){let{technologies:t}=e,a=t.find(e=>"framework"===e.kind||"language"===e.kind);if(!a)return(0,n.jsx)("span",{className:"stack-mark stack-mark--empty",children:"—"});let s=$[a.name.toLowerCase()],i=null==s?void 0:s.icon;return(0,n.jsxs)("span",{className:"stack-mark",children:[i?(0,n.jsx)(i,{"aria-hidden":!0,style:{color:s.color}}):null,(0,n.jsx)("span",{children:a.name})]})}function em(e){let{state:t}=e,a=(0,y.kj)();return(0,n.jsx)("span",{className:"state-dot state-dot--".concat(t),title:a(ef(t)),children:(0,n.jsx)("span",{className:"sr-only",children:a(ef(t))})})}function ep(e){var t,a;let{project:s,discreet:l,index:r,favorite:c,onFavorite:h,onHide:u,onClose:m,error:p}=e,f=(0,y.kj)(),x=(0,y.Ym)(),j=ea(s),g=es(s.healthGrade),b=l?f("store.hidden",{n:r+1}):s.name,w=!1===s.gitVersioned?f("catalog.noGit"):s.gitRemoteUrl?f("catalog.remote"):f("catalog.localOnly"),k="foreign"===s.originKind?f("origin.foreign"):"forked"===s.originKind?f("origin.forked"):"template"===s.originKind?f("origin.template"):null;return(0,n.jsxs)("aside",{className:"detail-panel","aria-label":f("catalog.detailsOf",{name:b}),children:[(0,n.jsxs)("header",{className:"detail-panel__head",children:[l?(0,n.jsx)(ed,{size:"row",variant:r}):(0,n.jsx)(v.hV,{locale:x,name:s.name,src:s.hasIcon?"/icon/".concat(s.id):null,size:38,tone:"neutral"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{children:b}),!l&&(0,n.jsx)("p",{title:s.root,children:ei(s.root)})]}),(0,n.jsx)("button",{type:"button",onClick:m,"aria-label":f("catalog.close"),children:(0,n.jsx)(o.fZH,{"aria-hidden":!0})})]}),(0,n.jsx)("div",{className:"detail-panel__open",children:(0,n.jsx)(G.q,{projectId:s.id,path:s.root,locale:x})}),(0,n.jsxs)("section",{className:"detail-health detail-health--".concat(g),children:[(0,n.jsxs)("p",{children:[(0,n.jsx)(em,{state:s.state}),f("catalog.colHealth")]}),(0,n.jsxs)("p",{className:"detail-health__score",children:[(0,n.jsx)("strong",{children:s.healthScore}),(0,n.jsx)("span",{children:"/100"})]}),(0,n.jsx)("span",{className:"detail-health__meter",children:(0,n.jsx)("span",{style:{width:"".concat(Math.max(0,Math.min(100,s.healthScore)),"%")}})})]}),(0,n.jsxs)("dl",{className:"detail-facts",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.colStack")}),(0,n.jsx)("dd",{children:(0,n.jsx)(eu,{technologies:s.technologies})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.colActivity")}),(0,n.jsx)("dd",{children:(0,v.Pp)(s.lastCommitAt,x)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.commits")}),(0,n.jsx)("dd",{children:null!=(t=s.gitCommitCount)?t:"—"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.repository")}),(0,n.jsx)("dd",{children:w})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.size")}),(0,n.jsx)("dd",{children:(0,v.z3)(s.sourceBytes)})]}),k&&(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.origin")}),(0,n.jsx)("dd",{title:null!=(a=s.originStartedBy)?a:void 0,children:k})]})]}),en(s)&&(0,n.jsxs)("section",{className:"detail-review",children:[(0,n.jsx)("h3",{children:f("catalog.needsReview")}),j>0&&(0,n.jsxs)(i(),{href:"/p/".concat(s.slug,"#propuestas"),className:"detail-review__waiting",children:[(0,n.jsx)(o.V83,{"aria-hidden":!0}),(0,n.jsx)("span",{children:f(1===j?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:j})})]}),(0,n.jsxs)("ul",{children:[s.risks.map(e=>(0,n.jsx)("li",{className:"is-danger",children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#unsaved"),title:f("catalog.reviewUnsaved"),children:(0,d.P3)(f,e)})},e.code)),s.vulnCount>0&&(0,n.jsx)("li",{className:"is-danger",children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#security"),title:f("catalog.reviewSecurity"),children:1===s.vulnCount?f("store.noticeOne"):f("store.noticesMany",{n:s.vulnCount})})}),s.outdatedDeps>0&&(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#dependencies"),title:f("catalog.reviewDeps"),children:f("store.depsBehindRatio",{n:s.outdatedDeps,total:s.directDeps||0})})}),s.depsUnresolved&&(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#dependencies"),title:f("project.depsUncheckedWhy",{file:s.depsUnresolved}),children:f("store.depsUnchecked")})})]})]}),p&&(0,n.jsx)("p",{className:"detail-panel__error",role:"alert",children:p}),(0,n.jsxs)("footer",{className:"detail-panel__foot",children:[(0,n.jsxs)(i(),{href:"/p/".concat(s.slug),children:[f("catalog.fullDetail")," ",(0,n.jsx)(o.OvC,{"aria-hidden":!0})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("button",{type:"button",onClick:h,"aria-label":c?f("store.favoriteRemove",{name:s.name}):f("store.favoriteAdd",{name:s.name}),"aria-pressed":c,children:c?(0,n.jsx)(o.K7t,{"aria-hidden":!0}):(0,n.jsx)(o.sdO,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",onClick:u,"aria-label":f("store.hideNamed",{name:s.name}),children:(0,n.jsx)(o.EgV,{"aria-hidden":!0})})]})]})]})}function ef(e){return"active"===e?"state.active":"paused"===e?"state.paused":"dormant"===e?"state.dormant":"state.no-git"}},5035:(e,t,a)=>{"use strict";a.d(t,{F:()=>s});var n=a(4963);function s(e,t,a){let[s,i]=(0,n.useState)(t);return(0,n.useEffect)(()=>{try{let t=window.localStorage.getItem("panoma:".concat(e));if(null!==t)return void i(JSON.parse(t));if(!a)return;let n=window.localStorage.getItem("panoma:".concat(a));if(null===n)return;i(JSON.parse(n)),window.localStorage.setItem("panoma:".concat(e),n),window.localStorage.removeItem("panoma:".concat(a))}catch(e){}},[e,a]),[s,function(t){i(t);try{window.localStorage.setItem("panoma:".concat(e),JSON.stringify(t))}catch(e){}}]}},5805:(e,t,a)=>{Promise.resolve().then(a.bind(a,3385))},6859:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(9733);async function s(e,t){let a=await (0,n.B)("/api/open",{id:e.id,tool:e.tool,...e.with?{with:e.with}:{}},t,e=>[e.error,e.hint].filter(Boolean).join(" "));return a.ok?{ok:!0}:{ok:!1,message:a.message}}}},e=>{e.O(0,[6587,3052,2583,1723,7911,4517,5465,9643,4737,7358],()=>e(e.s=5805)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9415],{236:(e,t,a)=>{"use strict";a.d(t,{K:()=>o,t:()=>r});var n=a(9763),s=a(4963),i=a(5595),l=a(179);function r(){let[e,t]=(0,s.useState)();return(0,s.useEffect)(()=>{let e=!0;return fetch("/api/watch").then(e=>e.json()).then(a=>{e&&t(a)}).catch(()=>void 0),()=>{e=!1}},[]),e}function o(e){let{failure:t}=e,a=(0,l.kj)();return(0,n.jsxs)("section",{className:"catalog-down",role:"alert",children:[(0,n.jsxs)("h2",{children:[(0,n.jsx)(i.z1N,{"aria-hidden":!0}),a("catalog.down.title")]}),(0,n.jsx)("p",{children:a("catalog.down.body",{path:t.path})}),(0,n.jsx)("p",{className:"catalog-down__detail",children:(0,n.jsx)("code",{children:a("catalog.down.detail",{detail:t.detail})})})]})}},2922:(e,t,a)=>{"use strict";a.d(t,{q:()=>u});var n=a(9763),s=a(4963),i=a(5595),l=a(2574),r=a(7911),o=a(6859),c=a(8010),d=a(8384),h=a(5035);function u(e){var t,a;let{projectId:u,path:p,locale:f,onOpenChange:x,closed:j,compact:g}=e,{remote:b,editors:y,apps:v,agents:w}=(0,d.b)(),[k,N]=(0,s.useState)(!1),[_,S]=(0,s.useState)("ready"),[C,M]=(0,s.useState)(null),[T,O]=(0,h.F)("open:preferred-destination","app:claude-app"),P=(0,s.useRef)(null);if((0,s.useEffect)(()=>{j&&N(!1)},[j]),(0,c.y)(P,k,()=>N(!1)),b)return null;async function A(e){N(!1),S("opening"),M(null);let t=await (0,o.A)({id:u,tool:e.tool,with:e.target},(0,r.t)(f,"open.unreachable"));t.ok?(S("open"),setTimeout(()=>S("ready"),2e3)):(S("ready"),M(t.message))}let I=[...y.map(e=>{var t;return{key:"editor:".concat(e.id),tool:"editor",target:e.id,name:e.name,icon:null!=(t=l.L[e.id])?t:i.mUU}}),...v.map(e=>{var t;return{key:"app:".concat(e.id),tool:"app",target:e.id,name:e.name,sub:"catalog.appSub",icon:null!=(t=l.L[e.id])?t:i.mUU}}),...w.filter(e=>!e.broken).map(e=>{var t;return{key:"agent:".concat(e.id),tool:"agent",target:e.id,name:e.name,sub:"catalog.agentSub",icon:null!=(t=l.L[e.id])?t:i.Jhl}}),{key:"terminal",tool:"terminal",name:(0,r.t)(f,"catalog.terminal"),sub:"catalog.terminalSub",icon:i.Jhl},{key:"folder",tool:"folder",name:(0,r.t)(f,"catalog.folder"),sub:"catalog.folderSub",icon:i.mUU}],R=null!=(a=null!=(t=I.find(e=>e.key===T))?t:I.find(e=>"app:claude-app"===e.key))?a:I[0],D=R.icon;return(0,n.jsxs)("div",{className:g?"open-menu open-menu--compact":"open-menu",ref:P,children:[(0,n.jsxs)("div",{className:"open-menu__split",children:[(0,n.jsxs)("button",{type:"button",className:"open-menu__primary",onClick:()=>void A(R),disabled:"opening"===_,title:"".concat(R.name," \xb7 ").concat(p),children:[(0,n.jsx)(D,{"aria-hidden":!0}),"opening"===_?(0,r.t)(f,"open.busy"):"open"===_?(0,r.t)(f,"open.done"):(0,r.t)(f,"open.openWith",{name:R.name})]}),I.length>1&&(0,n.jsx)("button",{type:"button",className:"open-menu__toggle","aria-label":(0,r.t)(f,"open.moreDestinations"),"aria-expanded":k,"aria-haspopup":"menu",onClick:()=>{let e=!k;N(e),null==x||x(e)},children:(0,n.jsx)(i.zKo,{"aria-hidden":!0})})]}),k&&(0,n.jsx)("div",{className:"open-menu__list",role:"menu",children:I.map((e,t)=>{let a=e.icon,s=e.key===R.key,l=I[t-1],o=void 0!==l&&m(l)!==m(e);return(0,n.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":s,className:"open-menu__item".concat(o?" is-first-of-group":"").concat(s?" is-default":""),onClick:()=>{O(e.key),A(e)},children:[(0,n.jsx)(a,{"aria-hidden":!0}),(0,n.jsxs)("span",{className:"open-menu__item-copy",children:[(0,n.jsx)("span",{children:e.name}),(e.sub||s)&&(0,n.jsxs)("small",{children:[e.sub&&(0,r.t)(f,e.sub),e.sub&&s&&" \xb7 ",s&&(0,n.jsx)("b",{children:(0,r.t)(f,"open.defaultDestination")})]})]}),s&&(0,n.jsx)(i.mmf,{className:"open-menu__default-check","aria-hidden":!0})]},e.key)})}),C&&(0,n.jsx)("span",{className:"open-menu__error",children:C})]})}function m(e){return"editor"===e.tool||"app"===e.tool?"app":"folder"===e.tool?"finder":"terminal"}},3385:(e,t,a)=>{"use strict";a.d(t,{ProjectStore:()=>el});var n=a(9763),s=a(1723),i=a.n(s),l=a(7244),r=a(4963),o=a(5595),c=a(3570),d=a(7911);let h=new Set(["flutter","react native","expo","android","ios","swift","kotlin","dart"]),u=new Set(["next.js","react","vue","nuxt","svelte","sveltekit","angular","astro","remix / react router","solidjs","vite","tailwind css","shadcn/ui","electron","tauri"]),m=new Set(["express","fastify","nestjs","hono","django","flask","fastapi","ruby on rails","laravel","symfony","sinatra","gin","echo","fiber","axum","actix web"]),p=new Set(["mcp"]),f=new Set(["html","css","scss"]),x=new Set(["python","go","rust","ruby","php","java","c#","elixir"]),j=new Set(["dart","swift","kotlin","objective-c"]),g=new Set(["postgresql","mysql","mongodb","redis","mariadb"]),b=new Set(["vercel","netlify","cloudflare workers"]);var y=a(179),v=a(4204);function w(e){let{id:t,name:a}=e,s=(0,y.kj)(),[i,l]=(0,r.useState)("ready");async function o(){l("opening");try{let e=await fetch("/api/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t,tool:"editor"})});l(e.ok?"ready":"error")}catch(e){l("error")}}return(0,n.jsx)("button",{type:"button",onClick:o,disabled:"opening"===i,title:s("today.openNamed",{name:a}),className:"shrink-0 rounded-md border border-edge bg-surface px-2.5 py-1 text-xs font-semibold text-chalk transition hover:border-edge-bright hover:bg-raised disabled:opacity-60",children:s("opening"===i?"today.opening":"error"===i?"today.openFailed":"today.resume")})}function k(e){var t,a,s,l;let{report:c}=e,d=(0,y.kj)(),h=(0,y.Ym)(),{summary:u}=c,[m,p]=(0,r.useState)(!1),f=c.critic,x=(null!=(a=null==f?void 0:f.lookFindings)?a:0)+(null!=(s=null==f?void 0:f.reviewFindings)?s:0),j=u.commits>0||u.proposals>0||u.born>0||u.touchedProjects>0||x>0,g=c.since?d("today.since",{when:(0,v.KW)(c.since,h)}):d("today.last24h");return j?(0,n.jsxs)("section",{className:"brief","aria-label":d("today.title"),children:[(0,n.jsxs)("button",{type:"button",className:"brief__line",onClick:()=>p(!m),"aria-expanded":m,children:[(0,n.jsx)(o.efr,{"aria-hidden":!0}),(0,n.jsx)("strong",{children:d("today.title")}),(0,n.jsxs)("span",{className:"brief__facts",children:[u.proposals>0&&(0,n.jsx)("span",{className:"brief__decision",children:d(1===u.proposals?"today.waitingOne":"today.waitingMany",{n:u.proposals})}),u.commits>0&&(0,n.jsxs)("span",{children:[d(1===u.touchedProjects?"today.inProjectsOne":"today.inProjectsMany",{c:d(1===u.commits?"today.commitOne":"today.commitMany",{n:u.commits}),n:u.touchedProjects}),u.byAgents>0&&" ".concat(d("today.fromAgents",{n:u.byAgents}))]}),u.born>0&&(0,n.jsx)("span",{children:d(1===u.born?"today.bornOne":"today.bornMany",{n:u.born})}),x>0&&(0,n.jsx)("span",{className:"brief__decision",children:d(1===x?"today.criticOne":"today.criticMany",{n:x})})]}),(0,n.jsx)("span",{className:"brief__when",children:g}),(0,n.jsx)(o.bv7,{className:"brief__arrow","aria-hidden":!0})]}),m&&(0,n.jsxs)("div",{className:"brief__detail",children:[c.proposals.length>0&&(0,n.jsxs)("div",{className:"brief__decisions",children:[(0,n.jsx)("p",{className:"brief__label",children:d("proposals.waiting")}),(0,n.jsx)("ul",{children:c.proposals.slice(0,4).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsxs)(i(),{href:"/runs/".concat(e.id),children:[e.pkgName,e.a?" → ".concat(e.a):""]}),(0,n.jsx)("span",{className:"brief__where",children:d("today.inProject",{project:e.project})}),e.repeats>1&&(0,n.jsx)("span",{className:"brief__attempts",children:d("today.attempts",{n:e.repeats})}),(0,n.jsxs)("span",{className:"brief__meta",children:[d(e.verified?"proposals.testsGreen":"proposals.unverified")," \xb7 ",(0,v.KW)(e.when,h)]})]},e.id))})]}),(null!=(l=null==f||null==(t=f.where)?void 0:t.length)?l:0)>0&&(0,n.jsxs)("div",{className:"brief__decisions",children:[(0,n.jsx)("p",{className:"brief__label",children:d("today.criticWhere")}),(0,n.jsx)("ul",{children:f.where.slice(0,4).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)(i(),{href:"/p/".concat(e.slug,"#assignments"),children:e.name}),(0,n.jsx)("span",{className:"brief__meta",children:d(1===e.findings?"today.criticFindingOne":"today.criticFindingMany",{n:e.findings})})]},e.slug))})]}),c.projects.length>0&&(0,n.jsx)("ul",{className:"brief__projects",children:c.projects.slice(0,5).map(e=>(0,n.jsxs)("li",{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(i(),{href:"/p/".concat(e.slug),children:e.name}),e.commits[0]&&(0,n.jsxs)("p",{className:"brief__subject",children:[e.commits[0].subject,e.commits[0].agent&&(0,n.jsx)("span",{className:"brief__agent",children:e.commits[0].agent})]}),(0,n.jsxs)("p",{className:"brief__meta",children:[e.commits.length>0&&(0,n.jsxs)(n.Fragment,{children:[d(1===e.commits.length?"today.commitOne":"today.commitMany",{n:e.commits.length})," \xb7 ",(0,v.KW)(e.commits[0].at,h)]}),e.agents.length>0&&(0,n.jsxs)(n.Fragment,{children:[e.commits.length>0&&" \xb7 ",e.agents.map(e=>d("today.agentNoted",{name:e.name,n:e.activities})).join(", ")]})]})]}),(0,n.jsx)(w,{id:e.id,name:e.name})]},e.slug))}),c.born.length>0&&(0,n.jsxs)("p",{className:"brief__born",children:[d("today.born")," ",c.born.slice(0,4).map((e,t)=>(0,n.jsxs)("span",{children:[t>0&&", ",(0,n.jsx)(i(),{href:"/p/".concat(e.slug),children:e.name})]},e.slug))]})]})]}):(0,n.jsxs)("p",{className:"brief brief--quiet",children:[(0,n.jsx)(o.efr,{"aria-hidden":!0}),(0,n.jsx)("span",{children:d("today.nothing",{period:g})})]})}var N=a(236);function _(){let e=(0,y.kj)(),t=(0,N.t)();return(null==t?void 0:t.catalog)?(0,n.jsx)(N.K,{failure:t.catalog}):(null==t?void 0:t.active)!==!1?null:(0,n.jsxs)("p",{className:"brief brief--alert",role:"status",children:[(0,n.jsx)(o.z1N,{"aria-hidden":!0}),(0,n.jsx)("span",{children:e("watch.off")})]})}function S(e){let{total:t}=e,a=(0,y.kj)(),s=(0,l.useRouter)(),[,i]=(0,r.useTransition)(),[c,d]=(0,r.useState)(null),[h,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(""),[f,x]=(0,r.useState)(!1),[j,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(null),[w,k]=(0,r.useState)(null),N=(0,r.useCallback)(async()=>{try{var e;let t=await fetch("/api/roots"),a=await t.json();d(null!=(e=a.roots)?e:[])}catch(e){d([])}},[]);(0,r.useEffect)(()=>{N()},[N]);let[_,S]=(0,r.useState)(null);async function M(e,t){if(!f&&t.trim()){x(!0),k(null);try{var n,l,r;let o=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,path:t.trim()})}),c=await o.json().catch(()=>({}));if(!o.ok)return void k({text:null!=(n=c.error)?n:a("sites.failed"),bad:!0});if(p(""),await N(),"add"===e){let e=null!=(l=c.found)?l:0;k({text:a(1===e?"sites.addedOne":"sites.addedMany",{n:e}),bad:!1}),i(()=>s.refresh())}else k({text:a("sites.removed",{n:null!=(r=c.removed)?r:0}),bad:!1}),i(()=>s.refresh())}catch(e){k({text:a("task.unreachable"),bad:!0})}finally{x(!1)}}}async function T(){if(!j&&!f){g(!0),k(null);try{var e,t;let n=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"search"})}),s=await n.json();v(null!=(e=s.candidates)?e:[]),0===(null!=(t=s.candidates)?t:[]).length&&k({text:a("sites.searchNone"),bad:!1})}catch(e){k({text:a("task.unreachable"),bad:!0})}finally{g(!1)}}}if(!c||0===c.length)return null;let O=c.map(e=>C(e.path));return(0,n.jsxs)("div",{className:"sites",children:[(0,n.jsxs)("button",{type:"button",className:"sites__line",onClick:()=>u(!h),"aria-expanded":h,children:[(0,n.jsx)(o.gBk,{"aria-hidden":!0}),(0,n.jsx)("span",{children:a(1===t?"sites.summaryOne":"sites.summaryMany",{n:t,where:O.slice(0,2).join(", "),extra:O.length>2?" ".concat(a("sites.andMore",{n:O.length-2})):""})}),(0,n.jsx)("span",{className:"sites__action",children:a(h?"sites.close":"sites.manage")})]}),h&&(0,n.jsxs)("div",{className:"sites__detail",children:[(0,n.jsx)("ul",{children:c.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{title:e.path,children:C(e.path)}),(0,n.jsxs)("span",{children:[a(1===e.projects?"sites.countOne":"sites.countMany",{n:e.projects}),!e.exists&&" \xb7 ".concat(a("sites.missing"))]}),_===e.path?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",onClick:()=>{S(null),M("remove",e.path)},disabled:f,className:"text-fail",children:a("sites.removeConfirm",{n:e.projects})}),(0,n.jsx)("button",{type:"button",onClick:()=>S(null),disabled:f,children:a("accounts.cancel")})]}):(0,n.jsx)("button",{type:"button",onClick:()=>S(e.path),disabled:f,children:a("sites.remove")})]},e.path))}),(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),M("add",m)},children:[(0,n.jsx)("input",{value:m,onChange:e=>p(e.target.value),placeholder:a("sites.placeholder"),"aria-label":a("sites.fieldLabel"),spellCheck:!1}),(0,n.jsxs)("button",{type:"submit",disabled:f||!m.trim(),children:[(0,n.jsx)(o.K0m,{"aria-hidden":!0}),a(f?"sites.adding":"sites.add")]})]}),(0,n.jsxs)("div",{className:"sites__search",children:[(0,n.jsxs)("button",{type:"button",onClick:T,disabled:j||f,children:[(0,n.jsx)(o.JJh,{"aria-hidden":!0}),a(j?"sites.searching":"sites.search")]}),(0,n.jsx)("span",{children:a("sites.searchHint")})]}),b&&b.length>0&&(0,n.jsx)("ul",{className:"sites__candidates",children:b.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{title:e.path,children:C(e.path)}),(0,n.jsx)("span",{children:a(1===e.projects?"sites.countOne":"sites.countMany",{n:e.projects})}),(0,n.jsx)("button",{type:"button",onClick:()=>{v(t=>(null!=t?t:[]).filter(t=>t.path!==e.path)),M("add",e.path)},disabled:f,children:a("sites.add")})]},e.path))}),(0,n.jsx)("p",{className:"sites__note",children:a("sites.note")}),w&&(0,n.jsx)("p",{className:w.bad?"sites__error":"sites__note",children:w.text})]})]})}function C(e){return e.replace(/^\/Users\/[^/]+/,"~")}var M=a(5035),T=a(8010),O=a(7558);let P="#0e0f11",A="#5c6169",I="#8b9098",R="#e7e8ea",D="#ffffff",E='"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';function F(e){return String(Math.max(0,Math.trunc(e)))}function U(e){return e>=75?"#2eaa63":e>=50?"#e4a30b":"#ea5a58"}function W(e,t,a,n,s,i){e.beginPath(),e.moveTo(t+i,a),e.arcTo(t+n,a,t+n,a+s,i),e.arcTo(t+n,a+s,t,a+s,i),e.arcTo(t,a+s,t,a,i),e.arcTo(t,a,t+n,a,i),e.closePath()}function L(e){return new Promise(t=>{let a=new Image;a.onload=()=>t(a),a.onerror=()=>t(null),a.src=e})}function H(e){let{data:t,discreet:a,onClose:s}=e,i=(0,y.kj)(),l=(0,y.Ym)(),h=(0,r.useRef)(null),u=(0,r.useRef)(null),m=(0,r.useRef)(null);(0,T.y)(u,!0,s),(0,O.r)(u,!0),(0,r.useEffect)(()=>{let e=requestAnimationFrame(()=>{var e;return null==(e=m.current)?void 0:e.focus()});return()=>cancelAnimationFrame(e)},[]);let[p,f]=(0,M.F)("share:user","","compartir:usuario"),[x,j]=(0,M.F)("share:language",l,"compartir:idioma"),[g,b]=(0,r.useState)(!a),[v,w]=(0,r.useState)(!1),[k,N]=(0,r.useState)("idle"),[_,S]=(0,r.useState)("idle"),C=(0,r.useCallback)((e,t)=>(0,d.t)(x,e,t),[x]),H=(0,r.useCallback)(async()=>{let e=h.current;if(!e)return;let a=await L("/assets/brand/panoma.svg"),n=function(e,t,a){let n=Math.max(0,Math.trunc(t));if(n<=8&&e.length>=n)return e.slice(0,n);let s=e.slice(0,Math.min(7,n)),i=Math.max(0,n-s.length);return i>0?[...s,a(i)]:s}(g?(await Promise.all(t.featuredProjects.slice(0,8).map(async e=>({...e,loadedIcon:await L(e.icon)})))).flatMap(e=>{let{loadedIcon:t,...a}=e;return t?[{...a,icon:t}]:[]}):t.featuredProjects.slice(0,8).map((e,t)=>({name:C("store.hidden",{n:t+1}),health:e.health,icon:null,concealed:!0})),t.projects,e=>({name:C("share.more",{n:e}),health:0,icon:a,panomaMark:!0,summary:!0}));!function(e,t){var a,n,s;let i=e.getContext("2d");if(!i)return;e.width=1600,e.height=900,i.fillStyle=D,i.fillRect(0,0,1600,900),i.strokeStyle=R,i.lineWidth=2,i.strokeRect(1,1,1598,898),function(e,t,a,n){if(t)try{e.drawImage(t,t.naturalWidth*(280/1024),t.naturalHeight*(222/1024),.515625*t.naturalWidth,t.naturalHeight*(586/1024),82,66,60,66)}catch(e){}e.fillStyle=P,e.font="650 42px ".concat(E),e.fillText("panoma",a+66+22,n+48)}(i,t.logo,82,66),i.font="500 25px ".concat(E),i.fillStyle=I,i.textAlign="right",i.fillText(t.domain,1518,105),i.textAlign="left",i.fillStyle=P,function(e,t,a,n){let s=n;for(e.font="650 ".concat(s,"px ").concat(E);s>62&&e.measureText(t).width>1436;)s-=2,e.font="650 ".concat(s,"px ").concat(E)}(i,t.texts.title,1436,t.featuredProjects.length>0?86:102),i.fillText(t.texts.title,82,t.featuredProjects.length>0?278:350),t.featuredProjects.length>0&&function(e,t,a,n,s){let i=t.slice(0,8),l=1436/i.length,r=398,o=Math.min(122,l-28);e.fillStyle=I,e.font="600 18px ".concat(E),e.fillText(s.health.toUpperCase(),a,n),function(e,t,a,n){let s=[[n.healthGood,"#2eaa63"],[n.healthReview,"#e4a30b"],[n.healthAttention,"#ea5a58"]];e.font="550 17px ".concat(E);let i=t-(s.map(t=>{let[a]=t;return 14+e.measureText(a).width}).reduce((e,t)=>e+t,0)+28*(s.length-1));for(let[t,n]of s)e.fillStyle=n,e.beginPath(),e.arc(i+5,a-6,5,0,2*Math.PI),e.fill(),e.fillStyle=A,e.fillText(t,i+16,a),i+=14+e.measureText(t).width+28}(e,1600-a,n,s),i.forEach((t,n)=>{let s=a+l*n+l/2,i=s-37;if(e.save(),W(e,i,r,74,74,18),e.clip(),e.fillStyle=D,e.fill(),t.concealed){var c,d=e,h=i,u=r,m=74,p=n;d.fillStyle="#111316",d.fillRect(h,u,74,m),d.save(),d.strokeStyle="rgba(255, 255, 255, 0.085)",d.lineWidth=1.5;let t=null!=(c=[0,7,-5,12][p%4])?c:0;for(let e=-m;e<2*m;e+=17)d.beginPath(),d.moveTo(h+e+t,u+m),d.lineTo(h+e+m+t,u),d.stroke();d.restore(),d.save(),d.shadowColor="rgba(255, 255, 255, 0.12)",d.shadowBlur=6,d.fillStyle="#f4f4f2",W(d,h+(m-44)/2,u+(m-10)/2,44,10,6),d.fill(),d.restore(),d.fillStyle="rgba(77, 81, 88, 0.7)";for(let e=0;e<4;e+=1)W(d,h+m/2-11+7*e,u+m/2-2,2,4,1),d.fill()}else if(t.icon)try{t.panomaMark&&t.icon instanceof HTMLImageElement?function(e,t,a,n,s,i,l){let r=document.createElement("canvas");r.width=Math.round(88),r.height=Math.round(100);let o=r.getContext("2d");o&&(o.drawImage(t,t.naturalWidth*(280/1024),t.naturalHeight*(222/1024),.515625*t.naturalWidth,t.naturalHeight*(586/1024),0,0,r.width,r.height),o.globalCompositeOperation="source-in",o.fillStyle=l,o.fillRect(0,0,r.width,r.height),e.drawImage(r,a,n,s,i))}(e,t.icon,i+15,r+11,44,50,t.summary?P:U(t.health)):e.drawImage(t.icon,i,r,74,74)}catch(e){}if(e.restore(),e.strokeStyle=R,e.lineWidth=1.5,W(e,i,r,74,74,18),e.stroke(),e.fillStyle=P,e.font="600 21px ".concat(E),e.textAlign="center",e.fillText(function(e,t,a){if(e.measureText(t).width<=a)return t;let n=t;for(;n.length>1&&e.measureText("".concat(n,"…")).width>a;)n=n.slice(0,-1);return"".concat(n,"…")}(e,t.name,l-16),s,r+104),t.summary){e.textAlign="left";return}let f=s-o/2,x=r+128;e.fillStyle=R,W(e,f,x,o,10,5),e.fill(),e.fillStyle=U(t.health),W(e,f,x,Math.max(10,o*(Math.min(100,Math.max(0,t.health))/100)),10,5),e.fill(),e.fillStyle=U(t.health),e.font="650 19px ".concat(E),e.fillText("".concat(t.health,"/100"),s,r+171),e.textAlign="left"})}(i,t.featuredProjects,82,348,t.texts);let l=t.featuredProjects.length>0?655:505;a=i,n=82,s=l,a.strokeStyle=R,a.lineWidth=1.5,a.beginPath(),a.moveTo(82,s),a.lineTo(n+1436,s),a.stroke(),function(e,t,a,n){let s=[[F(t.projects),t.texts.projects],[F(t.commits),t.texts.commits],[F(t.technologies),t.texts.technologies]];null!==t.agents&&s.push(["".concat(t.agents,"%"),t.texts.agents]);let i=1436/s.length;s.forEach((t,s)=>{let[l,r]=t,o=a+i*s;s>0&&(e.strokeStyle=R,e.lineWidth=1.5,e.beginPath(),e.moveTo(o-34,n-10),e.lineTo(o-34,n+79),e.stroke()),e.fillStyle=P,e.font="650 54px ".concat(E),e.fillText(l,o,n+45),e.fillStyle=I,e.font="500 22px ".concat(E),e.fillText(r,o,n+78)})}(i,t,82,l+51),t.user&&(i.fillStyle=A,i.font="550 27px ".concat(E),i.fillText(t.user,82,839)),i.fillStyle=I,i.font="500 23px ".concat(E),i.textAlign="right",i.fillText(t.texts.localFirst,1518,839),i.textAlign="left"}(e,{...t,logo:a,featuredProjects:n,user:p.trim()?p.trim().replace(/^@?/,"@"):void 0,domain:K,texts:{title:C("share.titulo",{n:t.projects}),projects:C("share.proyectos"),technologies:C("share.tecnologias"),commits:C("share.commits"),agents:C("share.agentes"),health:C("share.salud"),healthGood:C("share.saludBien"),healthReview:C("share.saludRevisar"),healthAttention:C("share.saludAtencion"),localFirst:C("share.local")}})},[g,t,C,p]);async function G(){let e=await z(h.current);e&&J(e)}async function Z(){try{await navigator.clipboard.writeText(V(t,C)),w(!0),setTimeout(()=>w(!1),1800)}catch(e){}}async function Y(){N("preparing");let e=await z(h.current);if(!e)return void N("failed");let a=V(t,C),n=new File([e],B,{type:"image/png"});if(function(e){if("function"!=typeof navigator.share||"function"!=typeof navigator.canShare)return!1;try{return navigator.canShare({files:[e]})}catch(e){return!1}}(n))try{await navigator.share({files:[n],text:a,title:"Panoma"}),N("idle");return}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return void N("idle")}let s=await q(e);s||J(e),N(s?"copied":"downloaded"),window.setTimeout(()=>N("idle"),2600)}async function $(){S("preparing");let e=function(e){if(!e)return null;try{let t=e.toDataURL("image/png"),a=t.slice(t.indexOf(",")+1),n=window.atob(a),s=new Uint8Array(n.length);for(let e=0;e<n.length;e+=1)s[e]=n.charCodeAt(e);return new Blob([s],{type:"image/png"})}catch(e){return null}}(h.current);if(!e)return void S("failed");let a=q(e);var n=V(t,C);let s=document.createElement("a");s.href="https://x.com/intent/post?text=".concat(encodeURIComponent(n)),s.target="_blank",s.rel="noreferrer noopener",s.click();let i=await a;i||J(e),S(i?"copied":"downloaded"),window.setTimeout(()=>S("idle"),2600)}return(0,r.useEffect)(()=>{H()},[H]),(0,n.jsxs)("div",{className:"share",role:"dialog","aria-modal":"true","aria-label":i("share.abrir"),children:[(0,n.jsxs)("div",{className:"share__box",ref:u,children:[(0,n.jsxs)("header",{children:[(0,n.jsx)("h2",{children:i("share.abrir")}),(0,n.jsx)("button",{ref:m,type:"button",onClick:s,"aria-label":i("share.cerrar"),children:(0,n.jsx)(o.fZH,{"aria-hidden":!0})})]}),(0,n.jsx)("canvas",{ref:h,className:"share__canvas",width:1600,height:900,role:"img","aria-label":i("share.preview")}),(0,n.jsxs)("div",{className:"share__options",children:[(0,n.jsxs)("div",{className:"share__language",children:[(0,n.jsx)("span",{children:i("share.idioma")}),(0,n.jsxs)("div",{role:"group","aria-label":i("share.idioma"),children:[(0,n.jsx)("button",{type:"button",className:"es"===x?"is-active":void 0,"aria-pressed":"es"===x,onClick:()=>j("es"),children:"Espa\xf1ol"}),(0,n.jsx)("button",{type:"button",className:"en"===x?"is-active":void 0,"aria-pressed":"en"===x,onClick:()=>j("en"),children:"English"})]})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("span",{children:i("share.usuario")}),(0,n.jsx)("input",{value:p,onChange:e=>f(e.target.value),placeholder:i("share.usuarioVacio"),spellCheck:!1,maxLength:40})]}),(0,n.jsx)("button",{type:"button",className:"share__visibility".concat(g?"":" is-private"),onClick:()=>b(e=>!e),"aria-pressed":!g,"aria-label":i(g?"store.hideNames":"store.showNames"),title:i(g?"store.hideNames":"store.showNames"),children:g?(0,n.jsx)(o.bZk,{"aria-hidden":!0}):(0,n.jsx)(o.EgV,{"aria-hidden":!0})})]}),(0,n.jsx)("p",{className:"share__note",children:i("share.nota")}),(0,n.jsxs)("footer",{children:[(0,n.jsxs)("button",{type:"button",className:"share__primary",onClick:G,children:[(0,n.jsx)(o.Dho,{"aria-hidden":!0}),i("share.descargar")]}),(0,n.jsx)("button",{type:"button",onClick:Z,children:i(v?"share.textoCopiado":"share.copiarTexto")}),(0,n.jsxs)("button",{type:"button",onClick:Y,disabled:"preparing"===k,children:[(0,n.jsx)(o.XcM,{"aria-hidden":!0}),i("share.image.".concat(k))]}),(0,n.jsxs)("button",{type:"button",onClick:$,disabled:"preparing"===_,children:[(0,n.jsx)(c.vIh,{"aria-hidden":!0}),i("share.x.".concat(_))]})]})]}),(0,n.jsx)("button",{type:"button",className:"share__backdrop",onClick:s,"aria-label":i("share.cerrar")})]})}let K="panoma.ai",B="panoma-projects.png";function z(e){return new Promise(t=>{if(!e)return void t(null);e.toBlob(t,"image/png")})}function J(e){let t=URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.download=B,a.click(),URL.revokeObjectURL(t)}async function q(e){var t;if("undefined"==typeof ClipboardItem||"function"!=typeof(null==(t=navigator.clipboard)?void 0:t.write))return!1;try{return await navigator.clipboard.write([new ClipboardItem({"image/png":e})]),!0}catch(e){return!1}}function V(e,t){return t("share.texto",{n:e.projects,domain:K})}var G=a(2922),Z=a(5018),Y=a(8337);let $={typescript:{icon:c.cyb,color:"#3178c6"},"next.js":{icon:c.wlC,color:"#111111"},nextjs:{icon:c.wlC,color:"#111111"},react:{icon:c.GWR,color:"#149eca"},flutter:{icon:c.FuR,color:"#02569b"},dart:{icon:c.A7B,color:"#0175c2"},"node.js":{icon:c.h$$,color:"#5fa04e"},nodejs:{icon:c.h$$,color:"#5fa04e"},python:{icon:c.ptC,color:"#3776ab"},rust:{icon:c.xZd,color:"#111111"},go:{icon:c.ZRx,color:"#00add8"},vue:{icon:c.Zmg,color:"#42b883"},"vue.js":{icon:c.Zmg,color:"#42b883"},svelte:{icon:c.Qmm,color:"#ff3e00"},swift:{icon:c.cp,color:"#f05138"},kotlin:{icon:c.sjH,color:"#7f52ff"},ruby:{icon:c.LfU,color:"#cc342d"},php:{icon:c.XeU,color:"#777bb4"},express:{icon:c.t5I,color:"#111111"},tailwind:{icon:c.IR8,color:"#06b6d4"},tailwindcss:{icon:c.IR8,color:"#06b6d4"},docker:{icon:c.tih,color:"#2496ed"},postgresql:{icon:c.$Wy,color:"#4169e1"},supabase:{icon:c.lLb,color:"#3ecf8e"},firebase:{icon:c.iWE,color:"#ffca28"}},X=["all","attention","favorites","not-mine","web","mobile","backend","tools","ai","other"],Q={all:"filter.all",attention:"filter.attention",favorites:"filter.favorites","not-mine":"filter.notMine",web:"filter.web",mobile:"filter.mobile",backend:"filter.backend",tools:"filter.tools",ai:"filter.ai",other:"filter.other"};function ee(e){let{name:t,onOpen:a}=e,s=(0,y.kj)();return(0,n.jsx)("button",{type:"button",className:"open-handle",title:s("catalog.openHandle",{name:t}),"aria-label":s("catalog.openHandle",{name:t}),onClick:e=>{e.stopPropagation(),a()},onDoubleClick:e=>e.stopPropagation(),children:(0,n.jsx)(o.OvC,{"aria-hidden":!0})})}function et(){let e=(0,y.kj)();return(0,n.jsx)("span",{className:"opening-spinner",role:"status","aria-label":e("catalog.opening")})}function ea(e){var t;return null!=(t=e.proposedRuns)?t:0}function en(e){return ea(e)>0||e.risks.length>0||e.vulnCount>0||e.outdatedDeps>0||!!e.depsUnresolved}function es(e){return"A"===e||"B"===e?"good":"C"===e?"warn":"bad"}function ei(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,"~")}function el(e){var t,a;let{projects:s,report:c}=e,d=(0,l.useRouter)(),v=(0,y.kj)(),{query:w,setQuery:N}=(0,Z.S)(),[C,T]=(0,M.F)("filter","all","filtro"),O=X.includes(C)?C:"all",[P,A]=(0,M.F)("sort","recent","orden"),[I,R]=(0,M.F)("view","grid","vista"),[D,E]=(0,M.F)("discreet",!1,"discreto"),[F,U]=(0,r.useState)(!1),[W,L]=(0,M.F)("favorites",[],"favoritos"),K=(0,r.useMemo)(()=>new Set(W),[W]),[B,z]=(0,r.useState)(null!=(a=null==(t=s[0])?void 0:t.id)?a:null),J=(0,r.useRef)(!1),q=(0,r.useRef)(null),[V,G]=(0,r.useState)(null),[$,ee]=(0,r.useState)(null),et=s[0],ea=(0,r.useMemo)(()=>s.filter(en).length,[s]),es=(0,r.useMemo)(()=>s.filter(e=>K.has(e.id)).length,[K,s]),ei=(0,r.useMemo)(()=>{let e=(0,Y.A)(w.trim());return s.filter(t=>{let a=!e||(0,Y.A)([t.name,t.description,t.primaryLanguage,...t.technologies.flatMap(e=>[e.name,e.version]),...t.agents.map(e=>e.name)].filter(Boolean).join(" ")).includes(e),n="all"===O||("attention"===O?en(t):"favorites"===O?K.has(t.id):"not-mine"===O?"foreign"===t.originKind||"forked"===t.originKind||"template"===t.originKind:(function(e){var t;let a=new Set,n=(null!=(t=e.primaryLanguage)?t:"").toLowerCase();for(let t of e.technologies){let e=t.name.toLowerCase();"model"===t.kind&&a.add("ai"),h.has(e)&&a.add("mobile"),(u.has(e)||b.has(e))&&a.add("web"),(m.has(e)||g.has(e))&&a.add("backend"),p.has(e)&&a.add("tools")}return j.has(n)&&a.add("mobile"),f.has(n)&&a.add("web"),x.has(n)&&a.add("backend"),0===a.size&&/\b(cli|tool|tools|runner|script|scripts|terminal|bot|daemon|agent)\b/.test(e.name.toLowerCase())&&a.add("tools"),0===a.size&&e.technologies.some(e=>"runtime"===e.kind&&["node.js","deno","bun"].includes(e.name.toLowerCase()))&&a.add("backend"),0===a.size&&a.add("other"),a})(t).has(O));return a&&n}).sort((e,t)=>{let a=Number(K.has(t.id))-Number(K.has(e.id));return 0!==a?a:"name"===P?e.name.localeCompare(t.name,"es"):"health"===P?t.healthScore-e.healthScore:(t.lastCommitAt?Date.parse(t.lastCommitAt):0)-(e.lastCommitAt?Date.parse(e.lastCommitAt):0)})},[K,O,s,w,P]),el=(0,r.useMemo)(()=>ei.findIndex(e=>e.id===B),[ei,B]),ed=-1===el?null:ei[el];(0,r.useEffect)(()=>{if(J.current)return;let e=ei[0];e&&e.id!==B&&z(e.id)},[ei,B]);let eh=(0,r.useCallback)(e=>{J.current=!0,z(e),G(null)},[]),[eu,em]=(0,r.useTransition)(),[ef,ex]=(0,r.useState)(null),ej=(0,r.useCallback)(e=>{ex(e.id),em(()=>d.push("/p/".concat(e.slug)))},[d]),eg=(0,r.useCallback)(()=>{var e;let t=null==(e=q.current)?void 0:e.querySelectorAll("[data-index]"),a=null==t?void 0:t[0];if(!a)return 1;let n=a.offsetTop,s=0;for(let e of t){if(e.offsetTop!==n)break;s+=1}return Math.max(1,s)},[]);function eb(e){var t,a;if(0===ei.length)return;let n=ei.findIndex(e=>e.id===B),s=-1===n?0:Math.min(ei.length-1,Math.max(0,n+e)),i=ei[s];i&&(eh(i.id),null==(a=q.current)||null==(t=a.querySelector('[data-index="'.concat(s,'"]')))||t.focus())}async function ey(e){var t,a,n;let i;G(null);try{i=await fetch("/api/project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ocultar",id:e})})}catch(e){G(v("project.unreachable"));return}if(!i.ok)return void G(null!=(a=(await i.json().catch(()=>({}))).error)?a:v("project.actionFailed"));B===e&&eh(null),ee({id:e,name:null!=(n=null==(t=s.find(t=>t.id===e))?void 0:t.name)?n:""}),d.refresh()}async function ev(e){G(null);try{let a=await fetch("/api/project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"mostrar",id:e})});if(!a.ok){var t;let e=await a.json().catch(()=>({}));G(null!=(t=e.error)?t:v("project.actionFailed"));return}}catch(e){G(v("project.unreachable"));return}ee(null),d.refresh()}let ew={attention:ea,favorites:es};return et?(0,n.jsx)("main",{id:"app-main",tabIndex:-1,className:"app-main catalog-screen",children:(0,n.jsxs)("div",{className:"catalog-screen__inner",children:[(0,n.jsx)(k,{report:c}),(0,n.jsx)(_,{}),$&&(0,n.jsxs)("p",{className:"brief brief--dismissed",role:"status",children:[(0,n.jsx)(o.EgV,{"aria-hidden":!0}),(0,n.jsx)("span",{children:v("store.justHidden",{name:$.name})}),(0,n.jsx)("button",{type:"button",onClick:()=>void ev($.id),children:v("store.undoHide")}),(0,n.jsx)(i(),{href:"/hidden",children:v("store.seeHidden")})]}),(0,n.jsxs)("div",{className:"catalog-bar",children:[(0,n.jsxs)("h1",{children:[v("catalog.title"),(0,n.jsx)("span",{children:ei.length===s.length?v(1===s.length?"catalog.countOne":"catalog.count",{n:s.length}):"".concat(ei.length," / ").concat(s.length)})]}),(0,n.jsxs)("div",{className:"catalog-bar__tools",children:[(0,n.jsx)("p",{className:"catalog-hint",children:v("catalog.hint")}),(0,n.jsxs)("label",{className:"catalog-sort",children:[(0,n.jsx)("span",{className:"sr-only",children:v("store.sortLabel")}),(0,n.jsxs)("select",{value:P,onChange:e=>A(e.target.value),children:[(0,n.jsx)("option",{value:"recent",children:v("store.sortRecent")}),(0,n.jsx)("option",{value:"name",children:v("store.sortName")}),(0,n.jsx)("option",{value:"health",children:v("store.sortHealth")})]})]}),(0,n.jsx)("button",{type:"button",className:"catalog-tool".concat(D?" is-active":""),onClick:()=>E(!D),"aria-pressed":D,title:v(D?"store.showNames":"store.hideNames"),children:D?(0,n.jsx)(o.EgV,{"aria-hidden":!0}):(0,n.jsx)(o.bZk,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",className:"catalog-tool",onClick:()=>U(!0),"aria-label":v("share.abrir"),title:v("share.abrir"),children:(0,n.jsx)(o.XcM,{"aria-hidden":!0})}),(0,n.jsxs)("div",{className:"view-switch",role:"group","aria-label":v("store.viewAria"),children:[(0,n.jsx)("button",{type:"button",onClick:()=>R("list"),className:"list"===I?"is-active":void 0,"aria-label":v("store.viewList"),"aria-pressed":"list"===I,children:(0,n.jsx)(o.$mg,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",onClick:()=>R("grid"),className:"grid"===I?"is-active":void 0,"aria-label":v("store.viewGrid"),"aria-pressed":"grid"===I,children:(0,n.jsx)(o.ENP,{"aria-hidden":!0})})]})]})]}),(0,n.jsx)("div",{className:"catalog-filters",role:"group","aria-label":v("store.filterAria"),children:X.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>T(e),className:O===e?"is-active":void 0,"aria-pressed":O===e,children:[v(Q[e]),ew[e]?(0,n.jsx)("span",{children:ew[e]}):null]},e))}),(0,n.jsx)(er,{project:et,discreet:D,index:Math.max(0,s.findIndex(e=>e.id===et.id))}),(0,n.jsx)(S,{total:s.length}),F&&(0,n.jsx)(H,{data:function(e){let t=e.reduce((e,t)=>{var a;return e+(null!=(a=t.gitCommitCount)?a:0)},0),a=new Set(e.flatMap(e=>e.technologies.map(e=>e.name))),n=e.reduce((e,t)=>e+t.agents.reduce((e,t)=>e+t.commits,0),0);return{projects:e.length,technologies:a.size,commits:t,agents:t>0&&n>0?Math.min(100,Math.round(n/t*100)):null,featuredProjects:e.filter(e=>e.hasIcon).slice(0,8).map(e=>({name:e.name,health:e.healthScore,icon:"/icon/".concat(e.id)}))}}(s),discreet:D,onClose:()=>U(!1)}),(0,n.jsxs)("div",{className:"catalog-split","data-open":ed?"true":"false",children:[(0,n.jsx)("div",{className:"catalog-body",children:ei.length>0?(0,n.jsxs)(n.Fragment,{children:["list"===I&&(0,n.jsxs)("div",{className:"catalog-columns","aria-hidden":!0,children:[(0,n.jsx)("span",{children:v("catalog.colProject")}),(0,n.jsx)("span",{children:v("catalog.colHealth")}),(0,n.jsx)("span",{children:v("catalog.colStack")}),(0,n.jsx)("span",{children:v("catalog.colActivity")})]}),(0,n.jsx)("div",{ref:q,role:"listbox","aria-label":v("catalog.rowsAria"),className:"catalog-rows catalog-rows--".concat(I),onKeyDown:function(e){let t="grid"===I?eg():1,a={ArrowDown:t,ArrowUp:-t,..."grid"===I?{ArrowRight:1,ArrowLeft:-1}:{}}[e.key];if(void 0!==a){e.preventDefault(),eb(a);return}if("Home"===e.key||"End"===e.key){e.preventDefault(),eb("Home"===e.key?-ei.length:ei.length);return}"Escape"===e.key&&B&&(e.preventDefault(),eh(null))},children:ei.map((e,t)=>{let a={project:e,index:t,selected:e.id===B,tabbable:t===(-1===el?0:el),favorite:K.has(e.id),opening:eu&&ef===e.id,discreet:D,onSelect:()=>eh(e.id),onOpen:()=>ej(e)};return"list"===I?(0,n.jsx)(eo,{...a},e.id):(0,n.jsx)(ec,{...a},e.id)})})]}):(0,n.jsxs)("div",{className:"catalog-empty",role:"status",children:[(0,n.jsx)(o.ENP,{"aria-hidden":!0}),(0,n.jsx)("h2",{children:v("store.noResults")}),(0,n.jsx)("p",{children:v("store.noResultsBody")}),(0,n.jsx)("button",{type:"button",onClick:()=>{T("all"),N(""),window.location.search&&d.replace("/",{scroll:!1})},children:v("store.clearFilters")})]})}),ed&&(0,n.jsx)(ep,{project:ed,discreet:D,index:Math.max(0,ei.findIndex(e=>e.id===ed.id)),favorite:K.has(ed.id),onFavorite:()=>{var e;return e=ed.id,void L(K.has(e)?W.filter(t=>t!==e):[...W,e])},onHide:()=>ey(ed.id),onClose:()=>eh(null),error:V},ed.id)]})]})}):null}function er(e){let{project:t,discreet:a,index:s}=e,i=(0,y.kj)(),l=(0,y.Ym)(),r=a?i("store.hidden",{n:s+1}):t.name;return(0,n.jsxs)("section",{className:"resume-strip","aria-label":i("store.resume"),children:[(0,n.jsx)(o.cyc,{"aria-hidden":!0}),(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:r}),(0,n.jsx)("span",{children:t.lastCommitSubject||function(e,t){if(e.description)return e.description;let a=e.technologies.find(e=>"framework"===e.kind||"language"===e.kind);return a?t("store.builtWith",{tech:a.name}):t("store.detected")}(t,i)})]}),(0,n.jsx)("span",{className:"resume-strip__when",children:(0,v.Pp)(t.lastCommitAt,l)}),(0,n.jsx)(G.q,{projectId:t.id,path:t.root,locale:l,compact:!0})]})}function eo(e){let{project:t,index:a,selected:s,tabbable:i,favorite:l,opening:r,discreet:c,onSelect:h,onOpen:u}=e,m=(0,y.kj)(),p=(0,y.Ym)(),f=ea(t);return(0,n.jsxs)("div",{id:"catalog-".concat(t.id),role:"option","aria-selected":s,"aria-busy":r,tabIndex:i?0:-1,"data-index":a,className:"catalog-row",title:c?m("store.hidden",{n:a+1}):t.root,onClick:h,onDoubleClick:u,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())," "===e.key&&(e.preventDefault(),h())},children:[(0,n.jsxs)("span",{className:"catalog-row__identity",children:[c?(0,n.jsx)(ed,{size:"row",variant:a}):(0,n.jsx)(v.hV,{locale:p,name:t.name,src:t.hasIcon?"/icon/".concat(t.id):null,size:40,tone:"neutral"}),(0,n.jsxs)("span",{className:"catalog-row__names",children:[(0,n.jsxs)("span",{className:"catalog-row__name",children:[(0,n.jsx)("span",{children:c?m("store.hidden",{n:a+1}):t.name}),l&&(0,n.jsx)(o.K7t,{className:"catalog-row__star","aria-hidden":!0}),f>0&&(0,n.jsxs)("span",{className:"waiting-badge",title:m(1===f?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:f}),children:[(0,n.jsx)("span",{"aria-hidden":!0,children:f}),(0,n.jsx)("span",{className:"sr-only",children:m(1===f?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:f})})]}),t.risks.length>0&&(0,n.jsx)(o.Dco,{className:"risk-mark",title:t.risks.map(e=>(0,d.P3)(m,e)).join(" \xb7 ")})]}),!c&&(0,n.jsxs)("span",{className:"catalog-row__path",children:[ei(t.root),t.copyCount>0&&(0,n.jsxs)("span",{title:m("store.alsoCopiesTitle"),children:[" ",m("store.alsoCopies",{n:t.copyCount})]})]})]})]}),(0,n.jsx)(eh,{score:t.healthScore,grade:t.healthGrade}),(0,n.jsx)(eu,{technologies:t.technologies}),(0,n.jsxs)("span",{className:"catalog-row__activity",children:[(0,n.jsx)(em,{state:t.state}),(0,v.Pp)(t.lastCommitAt,p)]}),(0,n.jsx)("span",{className:"catalog-row__handle",children:r?(0,n.jsx)(et,{}):(0,n.jsx)(ee,{name:c?m("store.hidden",{n:a+1}):t.name,onOpen:u})})]})}function ec(e){let{project:t,index:a,selected:s,tabbable:i,favorite:l,opening:r,discreet:c,onSelect:h,onOpen:u}=e,m=(0,y.Ym)(),p=(0,y.kj)();return(0,n.jsxs)("div",{id:"catalog-".concat(t.id),role:"option","aria-selected":s,"aria-busy":r,tabIndex:i?0:-1,"data-index":a,className:"catalog-tile",title:c?p("store.hidden",{n:a+1}):t.root,onClick:h,onDoubleClick:u,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())," "===e.key&&(e.preventDefault(),h())},children:[(0,n.jsx)(eh,{score:t.healthScore,grade:t.healthGrade}),(0,n.jsx)("span",{className:"catalog-tile__handle",children:r?(0,n.jsx)(et,{}):(0,n.jsx)(ee,{name:c?p("store.hidden",{n:a+1}):t.name,onOpen:u})}),c?(0,n.jsx)(ed,{size:"tile",variant:a}):(0,n.jsx)(v.hV,{locale:m,name:t.name,src:t.hasIcon?"/icon/".concat(t.id):null,size:54,tone:"neutral"}),(0,n.jsxs)("span",{className:"catalog-tile__name",children:[l&&(0,n.jsx)(o.K7t,{"aria-hidden":!0}),(0,n.jsx)("span",{children:c?p("store.hidden",{n:a+1}):t.name}),!c&&t.copyCount>0&&(0,n.jsx)(o.Zs_,{title:p("store.alsoCopiesMark",{n:t.copyCount})})]}),(0,n.jsxs)("span",{className:"catalog-tile__meta",children:[(0,n.jsx)(em,{state:t.state}),(0,v.Pp)(t.lastCommitAt,m),t.risks.length>0&&(0,n.jsx)(o.Dco,{className:"risk-mark",title:t.risks.map(e=>(0,d.P3)(p,e)).join(" \xb7 ")})]})]})}function ed(e){let{size:t,variant:a}=e;return(0,n.jsx)("span",{className:"catalog-private-mark catalog-private-mark--".concat(t),"data-variant":a%4,"aria-hidden":!0,children:(0,n.jsx)("span",{className:"catalog-private-mark__seal"})})}function eh(e){let{score:t,grade:a}=e,s=(0,y.kj)(),i=2*Math.PI*11,l=Math.max(0,Math.min(100,t))/100*i;return(0,n.jsxs)("span",{className:"health-dial health-dial--".concat(es(a)),title:s("catalog.healthOf",{n:t}),children:[(0,n.jsxs)("svg",{viewBox:"0 0 26 26","aria-hidden":!0,children:[(0,n.jsx)("circle",{className:"health-dial__track",cx:"13",cy:"13",r:11}),(0,n.jsx)("circle",{className:"health-dial__arc",cx:"13",cy:"13",r:11,strokeDasharray:"".concat(l," ").concat(i)})]}),(0,n.jsx)("span",{children:t})]})}function eu(e){let{technologies:t}=e,a=t.find(e=>"framework"===e.kind||"language"===e.kind);if(!a)return(0,n.jsx)("span",{className:"stack-mark stack-mark--empty",children:"—"});let s=$[a.name.toLowerCase()],i=null==s?void 0:s.icon;return(0,n.jsxs)("span",{className:"stack-mark",children:[i?(0,n.jsx)(i,{"aria-hidden":!0,style:{color:s.color}}):null,(0,n.jsx)("span",{children:a.name})]})}function em(e){let{state:t}=e,a=(0,y.kj)();return(0,n.jsx)("span",{className:"state-dot state-dot--".concat(t),title:a(ef(t)),children:(0,n.jsx)("span",{className:"sr-only",children:a(ef(t))})})}function ep(e){var t,a;let{project:s,discreet:l,index:r,favorite:c,onFavorite:h,onHide:u,onClose:m,error:p}=e,f=(0,y.kj)(),x=(0,y.Ym)(),j=ea(s),g=es(s.healthGrade),b=l?f("store.hidden",{n:r+1}):s.name,w=!1===s.gitVersioned?f("catalog.noGit"):s.gitRemoteUrl?f("catalog.remote"):f("catalog.localOnly"),k="foreign"===s.originKind?f("origin.foreign"):"forked"===s.originKind?f("origin.forked"):"template"===s.originKind?f("origin.template"):null;return(0,n.jsxs)("aside",{className:"detail-panel","aria-label":f("catalog.detailsOf",{name:b}),children:[(0,n.jsxs)("header",{className:"detail-panel__head",children:[l?(0,n.jsx)(ed,{size:"row",variant:r}):(0,n.jsx)(v.hV,{locale:x,name:s.name,src:s.hasIcon?"/icon/".concat(s.id):null,size:38,tone:"neutral"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{children:b}),!l&&(0,n.jsx)("p",{title:s.root,children:ei(s.root)})]}),(0,n.jsx)("button",{type:"button",onClick:m,"aria-label":f("catalog.close"),children:(0,n.jsx)(o.fZH,{"aria-hidden":!0})})]}),(0,n.jsx)("div",{className:"detail-panel__open",children:(0,n.jsx)(G.q,{projectId:s.id,path:s.root,locale:x})}),(0,n.jsxs)("section",{className:"detail-health detail-health--".concat(g),children:[(0,n.jsxs)("p",{children:[(0,n.jsx)(em,{state:s.state}),f("catalog.colHealth")]}),(0,n.jsxs)("p",{className:"detail-health__score",children:[(0,n.jsx)("strong",{children:s.healthScore}),(0,n.jsx)("span",{children:"/100"})]}),(0,n.jsx)("span",{className:"detail-health__meter",children:(0,n.jsx)("span",{style:{width:"".concat(Math.max(0,Math.min(100,s.healthScore)),"%")}})})]}),(0,n.jsxs)("dl",{className:"detail-facts",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.colStack")}),(0,n.jsx)("dd",{children:(0,n.jsx)(eu,{technologies:s.technologies})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.colActivity")}),(0,n.jsx)("dd",{children:(0,v.Pp)(s.lastCommitAt,x)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.commits")}),(0,n.jsx)("dd",{children:null!=(t=s.gitCommitCount)?t:"—"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.repository")}),(0,n.jsx)("dd",{children:w})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.size")}),(0,n.jsx)("dd",{children:(0,v.z3)(s.sourceBytes)})]}),k&&(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{children:f("catalog.origin")}),(0,n.jsx)("dd",{title:null!=(a=s.originStartedBy)?a:void 0,children:k})]})]}),en(s)&&(0,n.jsxs)("section",{className:"detail-review",children:[(0,n.jsx)("h3",{children:f("catalog.needsReview")}),j>0&&(0,n.jsxs)(i(),{href:"/p/".concat(s.slug,"#propuestas"),className:"detail-review__waiting",children:[(0,n.jsx)(o.V83,{"aria-hidden":!0}),(0,n.jsx)("span",{children:f(1===j?"store.proposalsWaitingOne":"store.proposalsWaitingMany",{n:j})})]}),(0,n.jsxs)("ul",{children:[s.risks.map(e=>(0,n.jsx)("li",{className:"is-danger",children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#unsaved"),title:f("catalog.reviewUnsaved"),children:(0,d.P3)(f,e)})},e.code)),s.vulnCount>0&&(0,n.jsx)("li",{className:"is-danger",children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#security"),title:f("catalog.reviewSecurity"),children:1===s.vulnCount?f("store.noticeOne"):f("store.noticesMany",{n:s.vulnCount})})}),s.outdatedDeps>0&&(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#dependencies"),title:f("catalog.reviewDeps"),children:f("store.depsBehindRatio",{n:s.outdatedDeps,total:s.directDeps||0})})}),s.depsUnresolved&&(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:"/p/".concat(s.slug,"#dependencies"),title:f("project.depsUncheckedWhy",{file:s.depsUnresolved}),children:f("store.depsUnchecked")})})]})]}),p&&(0,n.jsx)("p",{className:"detail-panel__error",role:"alert",children:p}),(0,n.jsxs)("footer",{className:"detail-panel__foot",children:[(0,n.jsxs)(i(),{href:"/p/".concat(s.slug),children:[f("catalog.fullDetail")," ",(0,n.jsx)(o.OvC,{"aria-hidden":!0})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("button",{type:"button",onClick:h,"aria-label":c?f("store.favoriteRemove",{name:s.name}):f("store.favoriteAdd",{name:s.name}),"aria-pressed":c,children:c?(0,n.jsx)(o.K7t,{"aria-hidden":!0}):(0,n.jsx)(o.sdO,{"aria-hidden":!0})}),(0,n.jsx)("button",{type:"button",onClick:u,"aria-label":f("store.hideNamed",{name:s.name}),children:(0,n.jsx)(o.EgV,{"aria-hidden":!0})})]})]})]})}function ef(e){return"active"===e?"state.active":"paused"===e?"state.paused":"dormant"===e?"state.dormant":"state.no-git"}},5035:(e,t,a)=>{"use strict";a.d(t,{F:()=>s});var n=a(4963);function s(e,t,a){let[s,i]=(0,n.useState)(t);return(0,n.useEffect)(()=>{try{let t=window.localStorage.getItem("panoma:".concat(e));if(null!==t)return void i(JSON.parse(t));if(!a)return;let n=window.localStorage.getItem("panoma:".concat(a));if(null===n)return;i(JSON.parse(n)),window.localStorage.setItem("panoma:".concat(e),n),window.localStorage.removeItem("panoma:".concat(a))}catch(e){}},[e,a]),[s,function(t){i(t);try{window.localStorage.setItem("panoma:".concat(e),JSON.stringify(t))}catch(e){}}]}},5805:(e,t,a)=>{Promise.resolve().then(a.bind(a,3385))},6859:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(9733);async function s(e,t){let a=await (0,n.B)("/api/open",{id:e.id,tool:e.tool,...e.with?{with:e.with}:{}},t,e=>[e.error,e.hint].filter(Boolean).join(" "));return a.ok?{ok:!0}:{ok:!1,message:a.message}}}},e=>{e.O(0,[6587,3052,2583,1723,7911,4517,5465,9643,4737,7358],()=>e(e.s=5805)),_N_E=e.O()}]);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "panoma",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "panoma",
9
- "version": "0.1.3",
9
+ "version": "0.1.4",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.71.0",
12
12
  "ignore": "^6.0.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "panoma",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "description": "The local catalog of your projects: everything on your disk, ready to pick up — by you or by your agents.",