@minimalcorp/tsunagi 0.6.0 → 0.6.2

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 (55) hide show
  1. package/.next/standalone/apps/web/.next/BUILD_ID +1 -1
  2. package/.next/standalone/apps/web/.next/build-manifest.json +3 -3
  3. package/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/apps/web/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/apps/web/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/apps/web/.next/server/app/_not-found.html +1 -1
  13. package/.next/standalone/apps/web/.next/server/app/_not-found.rsc +2 -2
  14. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  15. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  17. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/.next/standalone/apps/web/.next/server/app/index.html +1 -1
  21. package/.next/standalone/apps/web/.next/server/app/index.rsc +2 -2
  22. package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  23. package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +2 -2
  24. package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  25. package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +2 -2
  26. package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  27. package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/apps/web/.next/server/app/settings.html +1 -1
  30. package/.next/standalone/apps/web/.next/server/app/settings.rsc +2 -2
  31. package/.next/standalone/apps/web/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  32. package/.next/standalone/apps/web/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  33. package/.next/standalone/apps/web/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  34. package/.next/standalone/apps/web/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  35. package/.next/standalone/apps/web/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  36. package/.next/standalone/apps/web/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  37. package/.next/standalone/apps/web/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0~zpobw._.js +4 -4
  39. package/.next/standalone/apps/web/.next/server/chunks/ssr/_11t..8m._.js +1 -1
  40. package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
  41. package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
  42. package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
  43. package/.next/standalone/apps/web/.next/server/server-reference-manifest.js +1 -1
  44. package/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  45. package/.next/standalone/apps/web/.next/static/chunks/0-pc.c0c9k~wo.js +1 -0
  46. package/.next/standalone/apps/web/.next/static/chunks/0r7~dv84r3hs2.js +6 -0
  47. package/.next/standalone/apps/web/.next/static/chunks/11kcvpd_x5al3.css +4 -0
  48. package/npm-shrinkwrap.json +76 -72
  49. package/package.json +1 -1
  50. package/.next/standalone/apps/web/.next/static/chunks/0k40f3q-emtpq.js +0 -6
  51. package/.next/standalone/apps/web/.next/static/chunks/0wg~4f4ytbgwu.js +0 -1
  52. package/.next/standalone/apps/web/.next/static/chunks/10fqyxhxwwdyy.css +0 -4
  53. /package/.next/standalone/apps/web/.next/static/{cyJwJnHI5QJBS5yCGq9h6 → kYNehCiN1HXZgc-ACiFjO}/_buildManifest.js +0 -0
  54. /package/.next/standalone/apps/web/.next/static/{cyJwJnHI5QJBS5yCGq9h6 → kYNehCiN1HXZgc-ACiFjO}/_clientMiddlewareManifest.js +0 -0
  55. /package/.next/standalone/apps/web/.next/static/{cyJwJnHI5QJBS5yCGq9h6 → kYNehCiN1HXZgc-ACiFjO}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[5498,93886,a=>{"use strict";function b(a){return"success"===a||"error"===a||"running"!==a&&"idle"!==a&&void 0}function c(a){let b=a.tabs??[];if(0===b.length||b.some(a=>"running"===a.status))return null;if(b.some(a=>"waiting"===a.status))return"waiting";let c=b.filter(a=>a.unread);return c.some(a=>"error"===a.status)?"error":c.some(a=>"success"===a.status)?"success":null}a.s(["activityKind",0,function(a){return(a.tabs??[]).some(a=>"running"===a.status)?"running":c(a)},"hasUnreadResult",0,function(a){return null!==c(a)},"unreadForStatus",0,b,"unreadKind",0,c],5498);var d=a.i(72131),e=a.i(91399),f=a.i(88381),g=a.i(13425);let h=null;a.s(["useLiveTasks",0,function(a={}){let[c,i]=(0,d.useState)(()=>h??[]),[j,k]=(0,d.useState)(null!==h),[l,m]=(0,d.useState)(!0),n=(0,d.useRef)(a),o=(0,d.useRef)(c);(0,d.useEffect)(()=>{n.current=a,o.current=c}),(0,d.useEffect)(()=>{j&&(h=c)},[c,j]);let p=(0,d.useCallback)(async()=>{m(!0);try{let a=await fetch((0,e.apiUrl)("/api/tasks"));if(!a.ok)throw Error("Failed to fetch tasks");let b=await a.json();i(b.data.tasks),k(!0)}catch(a){console.error("Failed to load tasks:",a)}finally{m(!1)}},[]);(0,d.useEffect)(()=>{p()},[p]);let q=(0,d.useMemo)(()=>c.flatMap(a=>(a.tabs??[]).map(a=>a.tab_id)),[c]);return(0,g.useTabStatusEvents)(q,(a,c)=>{let d=b(c);i(b=>b.map(b=>({...b,tabs:(b.tabs??[]).map(b=>b.tab_id===a?{...b,status:c,...void 0!==d&&{unread:d}}:b)})))}),(0,f.useTaskEvents)({onTaskCreated:(a,b)=>{i(b=>b.some(b=>b.id===a.id)?b:[...b,a]),n.current.onTaskCreated?.(a,b)},onTaskUpdated:a=>{i(b=>b.map(b=>b.id===a.id?a:b)),n.current.onTaskUpdated?.(a)},onTaskDeleted:a=>{let b=o.current.find(b=>b.id===a);i(b=>b.filter(b=>b.id!==a)),n.current.onTaskDeleted?.(a,b)},onTaskTabsChanged:a=>{i(b=>b.map(b=>b.id===a.id?a:b))},onTasksReordered:a=>{let b=new Map(a.map(({id:a,order:b})=>[a,b]));i(a=>a.map(a=>{let c=b.get(a.id);return void 0===c||c===a.order?a:{...a,order:c}}))}}),{tasks:c,setTasks:i,isLoading:l,hasLoaded:j,reload:p}}],93886)},63588,a=>{"use strict";let b=(0,a.i(60137).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);a.s(["MessageSquare",0,b],63588)},62722,a=>{"use strict";let b=(0,a.i(60137).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);a.s(["XCircle",0,b],62722)},88381,a=>{"use strict";var b=a.i(72131),c=a.i(34592);a.s(["useTaskEvents",0,function(a){let d=(0,b.useRef)(a);(0,b.useLayoutEffect)(()=>{d.current=a}),(0,b.useEffect)(()=>{let a=(0,c.getSharedSocket)(),b=({task:a,warnings:b})=>{d.current.onTaskCreated(a,b??[])},e=({task:a})=>{d.current.onTaskUpdated(a)},f=({taskId:a})=>{d.current.onTaskDeleted(a)},g=({task:a})=>{d.current.onTaskTabsChanged?.(a)},h=({orders:a})=>{d.current.onTasksReordered?.(a)};return a.on("task:created",b),a.on("task:updated",e),a.on("task:deleted",f),a.on("task:tabs-changed",g),a.on("tasks:reordered",h),()=>{a.off("task:created",b),a.off("task:updated",e),a.off("task:deleted",f),a.off("task:tabs-changed",g),a.off("tasks:reordered",h)}},[])}])},13425,a=>{"use strict";var b=a.i(72131),c=a.i(34592);a.s(["useTabStatusEvents",0,function(a,d){let e=(0,b.useRef)(new Map),f=(0,b.useRef)(d);(0,b.useEffect)(()=>{f.current=d}),(0,b.useEffect)(()=>{let a=(0,c.getSharedSocket)(),b=({sessionId:a,status:b})=>{let c=function(a){switch(a){case"running":return"running";case"waiting":return"waiting";case"success":return"success";case"failure":case"error":return"error";case"idle":return"idle";default:return null}}(b);null!==c&&f.current(a,c)};return a.on("status-changed",b),()=>{a.off("status-changed",b)}},[]),(0,b.useEffect)(()=>{(0,c.syncRoomSubscriptions)(e.current,a.map(a=>`tab:${a}`))},[a]),(0,b.useEffect)(()=>{let a=e.current;return()=>{(0,c.clearRoomSubscriptions)(a)}},[])}])},96221,a=>{"use strict";var b=a.i(4650);a.s(["Loader2",()=>b.default])},65151,a=>{"use strict";let b=(0,a.i(60137).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["Circle",0,b],65151)},71684,a=>{"use strict";var b=a.i(72131);let c="tsunagi:sidebar-tasks",d={shown:[],hidden:[],hintSeen:!1},e=new Set,f=null,g=d;function h(){let a=function(){try{return localStorage.getItem(c)}catch{return null}}();if(a===f)return g;f=a;try{let b=a?JSON.parse(a):{};g={shown:Array.isArray(b.shown)?b.shown:[],hidden:Array.isArray(b.hidden)?b.hidden:Object.keys(b.dismissed??{}),hintSeen:!0===b.hintSeen}}catch{g=d}return g}function i(){return d}function j(a){e.add(a);let b=b=>{(b.key===c||null===b.key)&&a()};return window.addEventListener("storage",b),()=>{e.delete(a),window.removeEventListener("storage",b)}}function k(a){let b=h(),d=a(b);if(d!==b){try{localStorage.setItem(c,JSON.stringify(d))}catch{f=null,g=d}e.forEach(a=>a())}}a.s(["useSidebarTaskList",0,function(){return{state:(0,b.useSyncExternalStore)(j,h,i),update:k}}])},27006,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(67453),f=a.i(65151);let g=(0,a.i(60137).default)("list-x",[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"m15.5 9.5 5 5",key:"ytk86i"}],["path",{d:"m20.5 9.5-5 5",key:"17o44f"}]]);var h=a.i(96221),i=a.i(63588),j=a.i(62722),k=a.i(5498),l=a.i(93886),m=a.i(71684),n=a.i(84991),o=a.i(2840),p=a.i(187),q=a.i(760);let r=(0,p.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function s({className:a,variant:b="default",render:c,...d}){var e;return e={defaultTagName:"span",props:(0,n.mergeProps)({className:(0,q.cn)(r({variant:b}),a)},d),render:c,state:{slot:"badge",variant:b}},(0,o.useRenderElement)(e.defaultTagName??"div",e,e)}var t=a.i(39524),u=a.i(90002),v=a.i(26807),w=a.i(81560);function x({children:a,canSwipe:c,open:e,onOpenChange:f,onRemove:g,hint:h=!1,onHintEnd:i,onMouseEnter:j}){let k=(0,d.useRef)(null),l=(0,d.useRef)(null),m=(0,d.useRef)(null),n=(0,d.useRef)(!1),[o,p]=(0,d.useState)(null),[r,s]=(0,d.useState)(!1),t=o??(e?-64:0),u=h&&null===o&&!e&&!r;(0,d.useEffect)(()=>{if(!e)return;let a=a=>{k.current?.contains(a.target)||f(!1)};return document.addEventListener("pointerdown",a),()=>document.removeEventListener("pointerdown",a)},[e,f]);let v=a=>{let b=l.current;if(!b)return g();s(!0),b.animate([{transform:`translateX(${a}px)`},{transform:"translateX(-100%)"}],{duration:200,easing:"ease-out",fill:"forwards"}).finished.then(g,g)};return(0,b.jsxs)("div",{ref:k,className:"relative touch-pan-y select-none overflow-hidden rounded-md",onPointerDown:a=>{n.current=!1,r||0!==a.button||(m.current={pointerId:a.pointerId,startX:a.clientX,startY:a.clientY,base:e?-64:0,dragging:!1,locked:!c(a.timeStamp)})},onPointerMove:a=>{let b=m.current;if(!b||b.pointerId!==a.pointerId)return;let c=a.clientX-b.startX,d=a.clientY-b.startY;if(!b.dragging){if(8>Math.abs(c)&&8>Math.abs(d))return;if(Math.abs(d)>=Math.abs(c)){m.current=null;return}if(b.dragging=!0,b.locked)return;h&&i?.(),a.currentTarget.setPointerCapture(a.pointerId)}b.locked||p(Math.min(0,Math.max(-a.currentTarget.offsetWidth,b.base+c)))},onPointerUp:a=>{let b=m.current;if(m.current=null,!b||b.pointerId!==a.pointerId||!b.dragging||(n.current=!0,b.locked))return;let c=-Math.min(0,b.base+a.clientX-b.startX);p(null),c>.6*a.currentTarget.offsetWidth?v(-c):f(c>32)},onPointerCancel:()=>{m.current=null,p(null)},onPointerEnter:a=>"mouse"===a.pointerType&&j?.(),onClickCapture:a=>{if(n.current){n.current=!1,a.preventDefault(),a.stopPropagation();return}e&&!a.target.closest("[data-swipe-action]")&&(a.preventDefault(),a.stopPropagation(),f(!1))},children:[(0!==t||u||r)&&(0,b.jsx)("div",{className:"absolute inset-0 flex justify-end bg-destructive",children:(0,b.jsx)("button",{type:"button","data-swipe-action":!0,tabIndex:e?0:-1,"aria-label":"Remove from list",title:"Remove from list",onClick:()=>v(t),style:{width:r?"100%":Math.max(64,-t)},className:(0,q.cn)("flex items-center pl-5 text-white",null===o&&"transition-[width] duration-200 ease-out"),children:(0,b.jsx)(w.Trash2,{className:"size-3.5"})})}),(0,b.jsx)("div",{ref:l,style:{transform:u?void 0:`translateX(${t}px)`},className:(0,q.cn)("relative bg-background dark:bg-card",null===o&&"transition-transform duration-200 ease-out",u&&"animate-swipe-hint"),onAnimationEnd:a=>a.target===a.currentTarget&&i?.(),children:a})]})}let y={waiting:0,error:1,success:2,running:3},z={running:{icon:h.Loader2,className:"text-primary animate-spin",label:"Running"},waiting:{icon:i.MessageSquare,className:"text-warning",label:"Waiting for your input"},error:{icon:j.XCircle,className:"text-destructive",label:"Failed"},success:{icon:e.CheckCircle2,className:"text-success",label:"Finished"}},A={icon:f.Circle,className:"text-muted-foreground",label:"Idle"},B={success:{className:"bg-unread-success",label:"Finished, not opened yet"},error:{className:"bg-unread-error",label:"Failed, not opened yet"},waiting:{className:"bg-unread-waiting",label:"Waiting for your input"}};function C(a){return"running"===a||"waiting"===a}function D(a,b){let c=new Set(b.map(a=>a.id)),d=a.shown.filter(a=>c.has(a)),e=a.hidden.filter(a=>c.has(a)),f=new Set(e);for(let a of b)f.has(a.id)||(0,k.activityKind)(a)&&!d.includes(a.id)&&d.push(a.id);return d.length===a.shown.length&&d.every((b,c)=>b===a.shown[c])&&e.length===a.hidden.length?a:{...a,shown:d,hidden:e}}function E(a){let b=window.matchMedia("(hover: hover)");return b.addEventListener("change",a),()=>b.removeEventListener("change",a)}function F({currentTaskId:a}){let e=(0,c.useRouter)(),{tasks:f,isLoading:h}=(0,l.useLiveTasks)(),{state:i,update:j}=(0,m.useSidebarTaskList)(),n=(0,d.useMemo)(()=>h?i:D(i,f),[h,i,f]);(0,d.useEffect)(()=>{n!==i&&j(a=>D(a,f))},[n,i,f,j]);let o=(0,d.useRef)(new Map),p=(0,d.useRef)(new Map);(0,d.useEffect)(()=>{for(let a of f){let b=(0,k.activityKind)(a);C(o.current.get(a.id)??null)&&!C(b)&&p.current.set(a.id,performance.now()),o.current.set(a.id,b)}},[f]);let{active:r,done:w}=(0,d.useMemo)(()=>{let b=new Map(f.map(a=>[a.id,a])),c=[],d=[];for(let e of n.shown){let f=b.get(e);if(!f)continue;let g=(0,k.activityKind)(f);g&&(f.id!==a||"success"!==g&&"error"!==g)?c.push({task:f,kind:g}):d.push(f)}let e=(a,b)=>a.order-b.order||a.createdAt.localeCompare(b.createdAt);return c.sort((a,b)=>y[a.kind]-y[b.kind]||e(a.task,b.task)),d.sort(e),{active:c,done:d}},[f,n.shown,a]),G=(0,d.useMemo)(()=>[...r.map(({task:a})=>a),...w],[r,w]),H=G.filter(a=>!C((0,k.activityKind)(a))),[I,J]=(0,d.useState)(null),[K,L]=(0,d.useState)(null),M=(0,d.useSyncExternalStore)(E,()=>window.matchMedia("(hover: hover)").matches,()=>!0),[N,O]=(0,d.useState)(null),P=n.hintSeen?null:M?H.some(a=>a.id===N)?N:null:H[0]?.id??null,Q=(a,b)=>!C((0,k.activityKind)(a))&&b-(p.current.get(a.id)??0)>=3e3,R=a=>{j(b=>({...b,shown:b.shown.filter(b=>!a.includes(b)),hidden:[...b.hidden,...a.filter(a=>!b.hidden.includes(a))]}))},S=c=>{var d;let f=c.id===a,g=C((0,k.activityKind)(c)),h=(d=c.tabs)&&0!==d.length?d.some(a=>"running"===a.status)?"running":d.some(a=>"waiting"===a.status)?"waiting":d.some(a=>"error"===a.status)?"error":d.every(a=>"success"===a.status)?"success":null:null,{icon:i,className:l,label:m}=h?z[h]:A,o=(0,k.unreadKind)(c);return f&&"waiting"!==o&&(o=null),(0,b.jsx)("li",{children:(0,b.jsxs)(x,{canSwipe:a=>Q(c,a),open:I===c.id&&!g,onOpenChange:a=>J(b=>a?c.id:b===c.id?null:b),onRemove:()=>R([c.id]),hint:P===c.id,onHintEnd:()=>j(a=>({...a,hintSeen:!0})),onMouseEnter:()=>!n.hintSeen&&!g&&O(a=>a??c.id),children:[o&&(0,b.jsx)("span",{role:"img","aria-label":B[o].label,title:B[o].label,className:(0,q.cn)("absolute left-0 top-1.5 bottom-1.5 z-10 w-[3px] rounded-r-[3px]",B[o].className)}),(0,b.jsxs)("button",{type:"button",onClick:()=>e.replace(`/tasks/${c.id}`),"aria-current":f?"page":void 0,className:(0,q.cn)("flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent",f&&"bg-accent"),children:[(0,b.jsx)("span",{role:"img","aria-label":m,title:m,className:"mt-0.5 shrink-0",children:(0,b.jsx)(i,{className:(0,q.cn)("size-3.5",l)})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,b.jsx)("span",{className:"block truncate text-sm text-foreground",title:c.title,children:c.title}),(0,b.jsxs)("span",{className:"block truncate text-xs text-muted-foreground",children:[c.owner,"/",c.repo]})]})]})]})},c.id)},T=(a,c)=>c.length>0&&(0,b.jsxs)("section",{children:[(0,b.jsxs)("h2",{className:"px-2 pb-1 pt-2 text-xs font-medium text-muted-foreground",children:[a," ",(0,b.jsx)("span",{className:"tabular-nums",children:c.length})]}),(0,b.jsx)("ul",{className:"space-y-0.5",children:c.map(S)})]});return(0,b.jsxs)("aside",{className:"hidden md:flex w-64 shrink-0 flex-col border-r border-border bg-background dark:bg-card",children:[(0,b.jsxs)("div",{className:"flex h-8 shrink-0 box-content items-center gap-2 border-b border-border bg-card p-4",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Tasks"}),(0,b.jsx)(s,{variant:"secondary",children:G.length}),(0,b.jsx)(t.Button,{variant:"ghost",size:"icon",className:"ml-auto text-muted-foreground hover:text-foreground","aria-label":"Clear list",title:"Clear list",disabled:0===H.length,onClick:a=>{let b=G.filter(b=>Q(b,a.timeStamp)).map(a=>a.id);b.length>0&&L(b)},children:(0,b.jsx)(g,{})})]}),0===G.length?(0,b.jsx)("p",{className:"p-4 text-center text-xs text-muted-foreground",children:"No tasks"}):(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-2 pb-2",children:[T("Active",r.map(({task:a})=>a)),T("Done",w)]}),(0,b.jsx)(u.Dialog,{open:null!==K,onOpenChange:a=>!a.open&&L(null),title:"Clear list",maxWidth:"md",showCloseButton:!1,children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("p",{className:"text-foreground",children:["Remove ",K?.length," task",K?.length===1?"":"s"," from this list?"]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"Running or waiting tasks stay. The tasks themselves are not deleted. Removed tasks stay hidden until you show them again from the task page."}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(v.DialogClose,{render:(0,b.jsx)(t.Button,{variant:"outline",className:"cursor-pointer"}),children:"Cancel"}),(0,b.jsx)(t.Button,{variant:"destructive",className:"cursor-pointer",onClick:()=>{K&&R(K),L(null)},children:"Clear"})]})]})})]})}a.s(["default",0,function({children:a}){let{id:d}=(0,c.useParams)();return(0,b.jsxs)("div",{className:"h-screen flex bg-background",children:[(0,b.jsx)(F,{currentTaskId:d}),(0,b.jsx)("div",{className:"flex-1 min-w-0",children:a})]})}],27006)}];
1
+ module.exports=[5498,93886,a=>{"use strict";function b(a){return"success"===a||"error"===a||"running"!==a&&"idle"!==a&&void 0}function c(a){let b=a.tabs??[];if(0===b.length||b.some(a=>"running"===a.status))return null;if(b.some(a=>"waiting"===a.status))return"waiting";let c=b.filter(a=>a.unread);return c.some(a=>"error"===a.status)?"error":c.some(a=>"success"===a.status)?"success":null}a.s(["activityKind",0,function(a){return(a.tabs??[]).some(a=>"running"===a.status)?"running":c(a)},"hasUnreadResult",0,function(a){return null!==c(a)},"unreadForStatus",0,b,"unreadKind",0,c],5498);var d=a.i(72131),e=a.i(91399),f=a.i(88381),g=a.i(13425);let h=null;a.s(["useLiveTasks",0,function(a={}){let[c,i]=(0,d.useState)(()=>h??[]),[j,k]=(0,d.useState)(null!==h),[l,m]=(0,d.useState)(!0),n=(0,d.useRef)(a),o=(0,d.useRef)(c);(0,d.useEffect)(()=>{n.current=a,o.current=c}),(0,d.useEffect)(()=>{j&&(h=c)},[c,j]);let p=(0,d.useCallback)(async()=>{m(!0);try{let a=await fetch((0,e.apiUrl)("/api/tasks"));if(!a.ok)throw Error("Failed to fetch tasks");let b=await a.json();i(b.data.tasks),k(!0)}catch(a){console.error("Failed to load tasks:",a)}finally{m(!1)}},[]);(0,d.useEffect)(()=>{p()},[p]);let q=(0,d.useMemo)(()=>c.flatMap(a=>(a.tabs??[]).map(a=>a.tab_id)),[c]);return(0,g.useTabStatusEvents)(q,(a,c)=>{let d=b(c);i(b=>b.map(b=>({...b,tabs:(b.tabs??[]).map(b=>b.tab_id===a?{...b,status:c,...void 0!==d&&{unread:d}}:b)})))}),(0,f.useTaskEvents)({onTaskCreated:(a,b)=>{i(b=>b.some(b=>b.id===a.id)?b:[...b,a]),n.current.onTaskCreated?.(a,b)},onTaskUpdated:a=>{i(b=>b.map(b=>b.id===a.id?a:b)),n.current.onTaskUpdated?.(a)},onTaskDeleted:a=>{let b=o.current.find(b=>b.id===a);i(b=>b.filter(b=>b.id!==a)),n.current.onTaskDeleted?.(a,b)},onTaskTabsChanged:a=>{i(b=>b.map(b=>b.id===a.id?a:b))},onTasksReordered:a=>{let b=new Map(a.map(({id:a,order:b})=>[a,b]));i(a=>a.map(a=>{let c=b.get(a.id);return void 0===c||c===a.order?a:{...a,order:c}}))}}),{tasks:c,setTasks:i,isLoading:l,hasLoaded:j,reload:p}}],93886)},63588,a=>{"use strict";let b=(0,a.i(60137).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);a.s(["MessageSquare",0,b],63588)},62722,a=>{"use strict";let b=(0,a.i(60137).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);a.s(["XCircle",0,b],62722)},88381,a=>{"use strict";var b=a.i(72131),c=a.i(34592);a.s(["useTaskEvents",0,function(a){let d=(0,b.useRef)(a);(0,b.useLayoutEffect)(()=>{d.current=a}),(0,b.useEffect)(()=>{let a=(0,c.getSharedSocket)(),b=({task:a,warnings:b})=>{d.current.onTaskCreated(a,b??[])},e=({task:a})=>{d.current.onTaskUpdated(a)},f=({taskId:a})=>{d.current.onTaskDeleted(a)},g=({task:a})=>{d.current.onTaskTabsChanged?.(a)},h=({orders:a})=>{d.current.onTasksReordered?.(a)};return a.on("task:created",b),a.on("task:updated",e),a.on("task:deleted",f),a.on("task:tabs-changed",g),a.on("tasks:reordered",h),()=>{a.off("task:created",b),a.off("task:updated",e),a.off("task:deleted",f),a.off("task:tabs-changed",g),a.off("tasks:reordered",h)}},[])}])},13425,a=>{"use strict";var b=a.i(72131),c=a.i(34592);a.s(["useTabStatusEvents",0,function(a,d){let e=(0,b.useRef)(new Map),f=(0,b.useRef)(d);(0,b.useEffect)(()=>{f.current=d}),(0,b.useEffect)(()=>{let a=(0,c.getSharedSocket)(),b=({sessionId:a,status:b})=>{let c=function(a){switch(a){case"running":return"running";case"waiting":return"waiting";case"success":return"success";case"failure":case"error":return"error";case"idle":return"idle";default:return null}}(b);null!==c&&f.current(a,c)};return a.on("status-changed",b),()=>{a.off("status-changed",b)}},[]),(0,b.useEffect)(()=>{(0,c.syncRoomSubscriptions)(e.current,a.map(a=>`tab:${a}`))},[a]),(0,b.useEffect)(()=>{let a=e.current;return()=>{(0,c.clearRoomSubscriptions)(a)}},[])}])},96221,a=>{"use strict";var b=a.i(4650);a.s(["Loader2",()=>b.default])},65151,a=>{"use strict";let b=(0,a.i(60137).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["Circle",0,b],65151)},71684,a=>{"use strict";var b=a.i(72131);let c="tsunagi:sidebar-tasks",d={shown:[],hidden:[],hintSeen:!1},e=new Set,f=null,g=d;function h(){let a=function(){try{return localStorage.getItem(c)}catch{return null}}();if(a===f)return g;f=a;try{let b=a?JSON.parse(a):{};g={shown:Array.isArray(b.shown)?b.shown:[],hidden:Array.isArray(b.hidden)?b.hidden:Object.keys(b.dismissed??{}),hintSeen:!0===b.hintSeen}}catch{g=d}return g}function i(){return d}function j(a){e.add(a);let b=b=>{(b.key===c||null===b.key)&&a()};return window.addEventListener("storage",b),()=>{e.delete(a),window.removeEventListener("storage",b)}}function k(a){let b=h(),d=a(b);if(d!==b){try{localStorage.setItem(c,JSON.stringify(d))}catch{f=null,g=d}e.forEach(a=>a())}}a.s(["useSidebarTaskList",0,function(){return{state:(0,b.useSyncExternalStore)(j,h,i),update:k}}])},27006,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(67453),f=a.i(65151);let g=(0,a.i(60137).default)("list-x",[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"m15.5 9.5 5 5",key:"ytk86i"}],["path",{d:"m20.5 9.5-5 5",key:"17o44f"}]]);var h=a.i(96221),i=a.i(63588),j=a.i(62722),k=a.i(5498),l=a.i(93886),m=a.i(71684),n=a.i(84991),o=a.i(2840),p=a.i(187),q=a.i(760);let r=(0,p.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function s({className:a,variant:b="default",render:c,...d}){var e;return e={defaultTagName:"span",props:(0,n.mergeProps)({className:(0,q.cn)(r({variant:b}),a)},d),render:c,state:{slot:"badge",variant:b}},(0,o.useRenderElement)(e.defaultTagName??"div",e,e)}var t=a.i(39524),u=a.i(90002),v=a.i(26807),w=a.i(81560);function x({children:a,open:c,onOpenChange:e,onRemove:f,hint:g=!1,onHintEnd:h,onMouseEnter:i}){let j=(0,d.useRef)(null),k=(0,d.useRef)(null),l=(0,d.useRef)(null),m=(0,d.useRef)(!1),[n,o]=(0,d.useState)(null),[p,r]=(0,d.useState)(!1),s=n??(c?-64:0),t=g&&null===n&&!c&&!p;(0,d.useEffect)(()=>{if(!c)return;let a=a=>{j.current?.contains(a.target)||e(!1)};return document.addEventListener("pointerdown",a),()=>document.removeEventListener("pointerdown",a)},[c,e]);let u=a=>{let b=k.current;if(!b)return f();r(!0),b.animate([{transform:`translateX(${a}px)`},{transform:"translateX(-100%)"}],{duration:200,easing:"ease-out",fill:"forwards"}).finished.then(f,f)};return(0,b.jsxs)("div",{ref:j,className:"relative touch-pan-y select-none overflow-hidden rounded-md",onPointerDown:a=>{m.current=!1,p||0!==a.button||(l.current={pointerId:a.pointerId,startX:a.clientX,startY:a.clientY,base:c?-64:0,dragging:!1})},onPointerMove:a=>{let b=l.current;if(!b||b.pointerId!==a.pointerId)return;let c=a.clientX-b.startX,d=a.clientY-b.startY;if(!b.dragging){if(8>Math.abs(c)&&8>Math.abs(d))return;if(Math.abs(d)>=Math.abs(c)){l.current=null;return}b.dragging=!0,g&&h?.(),a.currentTarget.setPointerCapture(a.pointerId)}o(Math.min(0,Math.max(-a.currentTarget.offsetWidth,b.base+c)))},onPointerUp:a=>{let b=l.current;if(l.current=null,!b||b.pointerId!==a.pointerId||!b.dragging)return;m.current=!0;let c=-Math.min(0,b.base+a.clientX-b.startX);o(null),c>.6*a.currentTarget.offsetWidth?u(-c):e(c>32)},onPointerCancel:()=>{l.current=null,o(null)},onPointerEnter:a=>"mouse"===a.pointerType&&i?.(),onClickCapture:a=>{if(m.current){m.current=!1,a.preventDefault(),a.stopPropagation();return}c&&!a.target.closest("[data-swipe-action]")&&(a.preventDefault(),a.stopPropagation(),e(!1))},children:[(0!==s||t||p)&&(0,b.jsx)("div",{className:"absolute inset-0 flex justify-end bg-destructive",children:(0,b.jsx)("button",{type:"button","data-swipe-action":!0,tabIndex:c?0:-1,"aria-label":"Remove from list",title:"Remove from list",onClick:()=>u(s),style:{width:p?"100%":Math.max(64,-s)},className:(0,q.cn)("flex items-center pl-5 text-white",null===n&&"transition-[width] duration-200 ease-out"),children:(0,b.jsx)(w.Trash2,{className:"size-3.5"})})}),(0,b.jsx)("div",{ref:k,style:{transform:t?void 0:`translateX(${s}px)`},className:(0,q.cn)("relative bg-background dark:bg-card",null===n&&"transition-transform duration-200 ease-out",t&&"animate-swipe-hint"),onAnimationEnd:a=>a.target===a.currentTarget&&h?.(),children:a})]})}let y={waiting:0,error:1,success:2,running:3},z={running:{icon:h.Loader2,className:"text-primary animate-spin",label:"Running"},waiting:{icon:i.MessageSquare,className:"text-warning",label:"Waiting for your input"},error:{icon:j.XCircle,className:"text-destructive",label:"Failed"},success:{icon:e.CheckCircle2,className:"text-success",label:"Finished"}},A={icon:f.Circle,className:"text-muted-foreground",label:"Idle"},B={success:{className:"bg-unread-success",label:"Finished, not opened yet"},error:{className:"bg-unread-error",label:"Failed, not opened yet"},waiting:{className:"bg-unread-waiting",label:"Waiting for your input"}};function C(a,b){let c=new Set(b.map(a=>a.id)),d=a.shown.filter(a=>c.has(a)),e=a.hidden.filter(a=>c.has(a)),f=new Set(e);for(let a of b)f.has(a.id)||(0,k.activityKind)(a)&&!d.includes(a.id)&&d.push(a.id);return d.length===a.shown.length&&d.every((b,c)=>b===a.shown[c])&&e.length===a.hidden.length?a:{...a,shown:d,hidden:e}}function D(a){let b=window.matchMedia("(hover: hover)");return b.addEventListener("change",a),()=>b.removeEventListener("change",a)}function E({currentTaskId:a}){let e=(0,c.useRouter)(),{tasks:f,isLoading:h}=(0,l.useLiveTasks)(),{state:i,update:j}=(0,m.useSidebarTaskList)(),n=(0,d.useMemo)(()=>h?i:C(i,f),[h,i,f]);(0,d.useEffect)(()=>{n!==i&&j(a=>C(a,f))},[n,i,f,j]);let{active:o,done:p}=(0,d.useMemo)(()=>{let b=new Map(f.map(a=>[a.id,a])),c=[],d=[];for(let e of n.shown){let f=b.get(e);if(!f)continue;let g=(0,k.activityKind)(f);g&&(f.id!==a||"success"!==g&&"error"!==g)?c.push({task:f,kind:g}):d.push(f)}let e=(a,b)=>a.order-b.order||a.createdAt.localeCompare(b.createdAt);return c.sort((a,b)=>y[a.kind]-y[b.kind]||e(a.task,b.task)),d.sort(e),{active:c,done:d}},[f,n.shown,a]),r=(0,d.useMemo)(()=>[...o.map(({task:a})=>a),...p],[o,p]),[w,F]=(0,d.useState)(null),[G,H]=(0,d.useState)(null),I=(0,d.useSyncExternalStore)(D,()=>window.matchMedia("(hover: hover)").matches,()=>!0),[J,K]=(0,d.useState)(null),L=n.hintSeen?null:I?r.some(a=>a.id===J)?J:null:r[0]?.id??null,M=a=>{j(b=>({...b,shown:b.shown.filter(b=>!a.includes(b)),hidden:[...b.hidden,...a.filter(a=>!b.hidden.includes(a))]}))},N=c=>{var d;let f=c.id===a,g=(d=c.tabs)&&0!==d.length?d.some(a=>"running"===a.status)?"running":d.some(a=>"waiting"===a.status)?"waiting":d.some(a=>"error"===a.status)?"error":d.every(a=>"success"===a.status)?"success":null:null,{icon:h,className:i,label:l}=g?z[g]:A,m=(0,k.unreadKind)(c);return f&&"waiting"!==m&&(m=null),(0,b.jsx)("li",{children:(0,b.jsxs)(x,{open:w===c.id,onOpenChange:a=>F(b=>a?c.id:b===c.id?null:b),onRemove:()=>M([c.id]),hint:L===c.id,onHintEnd:()=>j(a=>({...a,hintSeen:!0})),onMouseEnter:()=>!n.hintSeen&&K(a=>a??c.id),children:[m&&(0,b.jsx)("span",{role:"img","aria-label":B[m].label,title:B[m].label,className:(0,q.cn)("absolute left-0 top-1.5 bottom-1.5 z-10 w-[3px] rounded-r-[3px]",B[m].className)}),(0,b.jsxs)("button",{type:"button",onClick:()=>e.replace(`/tasks/${c.id}`),"aria-current":f?"page":void 0,className:(0,q.cn)("flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent",f&&"bg-accent"),children:[(0,b.jsx)("span",{role:"img","aria-label":l,title:l,className:"mt-0.5 shrink-0",children:(0,b.jsx)(h,{className:(0,q.cn)("size-3.5",i)})}),(0,b.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,b.jsx)("span",{className:"block truncate text-sm text-foreground",title:c.title,children:c.title}),(0,b.jsxs)("span",{className:"block truncate text-xs text-muted-foreground",children:[c.owner,"/",c.repo]})]})]})]})},c.id)},O=(a,c)=>c.length>0&&(0,b.jsxs)("section",{children:[(0,b.jsxs)("h2",{className:"px-2 pb-1 pt-2 text-xs font-medium text-muted-foreground",children:[a," ",(0,b.jsx)("span",{className:"tabular-nums",children:c.length})]}),(0,b.jsx)("ul",{className:"space-y-0.5",children:c.map(N)})]});return(0,b.jsxs)("aside",{className:"hidden md:flex w-64 shrink-0 flex-col border-r border-border bg-background dark:bg-card",children:[(0,b.jsxs)("div",{className:"flex h-8 shrink-0 box-content items-center gap-2 border-b border-border bg-card p-4",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Tasks"}),(0,b.jsx)(s,{variant:"secondary",children:r.length}),(0,b.jsx)(t.Button,{variant:"ghost",size:"icon",className:"ml-auto text-muted-foreground hover:text-foreground","aria-label":"Clear list",title:"Clear list",disabled:0===r.length,onClick:()=>{r.length>0&&H(r.map(a=>a.id))},children:(0,b.jsx)(g,{})})]}),0===r.length?(0,b.jsx)("p",{className:"p-4 text-center text-xs text-muted-foreground",children:"No tasks"}):(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-2 pb-2",children:[O("Active",o.map(({task:a})=>a)),O("Done",p)]}),(0,b.jsx)(u.Dialog,{open:null!==G,onOpenChange:a=>!a.open&&H(null),title:"Clear list",maxWidth:"md",showCloseButton:!1,children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("p",{className:"text-foreground",children:["Remove ",G?.length," task",G?.length===1?"":"s"," from this list?"]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"The tasks themselves are not deleted. Removed tasks stay hidden until you show them again from the task page."}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,b.jsx)(v.DialogClose,{render:(0,b.jsx)(t.Button,{variant:"outline",className:"cursor-pointer"}),children:"Cancel"}),(0,b.jsx)(t.Button,{variant:"destructive",className:"cursor-pointer",onClick:()=>{G&&M(G),H(null)},children:"Clear"})]})]})})]})}a.s(["default",0,function({children:a}){let{id:d}=(0,c.useParams)();return(0,b.jsxs)("div",{className:"h-screen flex bg-background",children:[(0,b.jsx)(E,{currentTaskId:d}),(0,b.jsx)("div",{className:"flex-1 min-w-0",children:a})]})}],27006)}];
2
2
 
3
3
  //# sourceMappingURL=_11t..8m._.js.map
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/03~yq9q893hmn.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/cyJwJnHI5QJBS5yCGq9h6/_buildManifest.js",
11
- "static/cyJwJnHI5QJBS5yCGq9h6/_ssgManifest.js",
12
- "static/cyJwJnHI5QJBS5yCGq9h6/_clientMiddlewareManifest.js"
10
+ "static/kYNehCiN1HXZgc-ACiFjO/_buildManifest.js",
11
+ "static/kYNehCiN1HXZgc-ACiFjO/_ssgManifest.js",
12
+ "static/kYNehCiN1HXZgc-ACiFjO/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/14tyifilnj_k5.js",
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="font-sans inter_b2991b2-module__9mH_6q__variable"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/10fqyxhxwwdyy.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/14tyifilnj_k5.js"/><script src="/_next/static/chunks/02i7dfk78~t~2.js" async=""></script><script src="/_next/static/chunks/0ibllnu3qqge2.js" async=""></script><script src="/_next/static/chunks/0.76ju_ex-wmx.js" async=""></script><script src="/_next/static/chunks/turbopack-0i5dxy28w4s._.js" async=""></script><script src="/_next/static/chunks/11qlw_akft1w9.js" async=""></script><script src="/_next/static/chunks/0nucsyd1g6g0i.js" async=""></script><script src="/_next/static/chunks/05802kvs1cqcr.js" async=""></script><script src="/_next/static/chunks/12kb1a2dj8aui.js" async=""></script><script src="/_next/static/chunks/148ko75-ihlmp.js" async=""></script><script src="/_next/static/chunks/0x1o~ag8m099..js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>繋</title><meta name="description" content="AI時代の統合開発マネージャー - Claude と人間のシームレスな協働開発を実現"/><link rel="icon" href="/icon.png?icon.0fkix7.hkmsz4.png" sizes="1024x1024" type="image/png"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/14tyifilnj_k5.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[627,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"ThemeProvider\"]\n3:I[44142,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"UpdateStatusProvider\"]\n4:I[39756,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"default\"]\n5:I[37457,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"default\"]\n6:I[57787,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"ConnectionStatus\"]\n7:I[29024,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"ToastProvider\"]\n8:I[67570,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"EditorSessionProvider\"]\n9:I[97367,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"OutletBoundary\"]\na:\"$Sreact.suspense\"\nd:I[97367,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"ViewportBoundary\"]\nf:I[97367,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"MetadataBoundary\"]\n11:I[68027,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"default\",1]\n:HL[\"/_next/static/chunks/10fqyxhxwwdyy.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/10fqyxhxwwdyy.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/11qlw_akft1w9.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/05802kvs1cqcr.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/_next/static/chunks/12kb1a2dj8aui.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-4\",{\"src\":\"/_next/static/chunks/148ko75-ihlmp.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-5\",{\"src\":\"/_next/static/chunks/0x1o~ag8m099..js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"font-sans inter_b2991b2-module__9mH_6q__variable\",\"children\":[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L6\",null,{}],[\"$\",\"$L7\",null,{}],[\"$\",\"$L8\",null,{}]]}]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:0:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$a\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@b\"}]}]]}],{},null,false,null]},null,false,\"$@c\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$a\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L10\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$11\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/10fqyxhxwwdyy.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"cyJwJnHI5QJBS5yCGq9h6\"}\n"])</script><script>self.__next_f.push([1,"12:[]\nc:\"$W12\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"13:I[27201,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"IconMark\"]\nb:null\n10:[[\"$\",\"title\",\"0\",{\"children\":\"繋\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"AI時代の統合開発マネージャー - Claude と人間のシームレスな協働開発を実現\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.png?icon.0fkix7.hkmsz4.png\",\"sizes\":\"1024x1024\",\"type\":\"image/png\"}],[\"$\",\"$L13\",\"3\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="font-sans inter_b2991b2-module__9mH_6q__variable"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/11kcvpd_x5al3.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/14tyifilnj_k5.js"/><script src="/_next/static/chunks/02i7dfk78~t~2.js" async=""></script><script src="/_next/static/chunks/0ibllnu3qqge2.js" async=""></script><script src="/_next/static/chunks/0.76ju_ex-wmx.js" async=""></script><script src="/_next/static/chunks/turbopack-0i5dxy28w4s._.js" async=""></script><script src="/_next/static/chunks/11qlw_akft1w9.js" async=""></script><script src="/_next/static/chunks/0nucsyd1g6g0i.js" async=""></script><script src="/_next/static/chunks/05802kvs1cqcr.js" async=""></script><script src="/_next/static/chunks/12kb1a2dj8aui.js" async=""></script><script src="/_next/static/chunks/148ko75-ihlmp.js" async=""></script><script src="/_next/static/chunks/0x1o~ag8m099..js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>繋</title><meta name="description" content="AI時代の統合開発マネージャー - Claude と人間のシームレスな協働開発を実現"/><link rel="icon" href="/icon.png?icon.0fkix7.hkmsz4.png" sizes="1024x1024" type="image/png"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/14tyifilnj_k5.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[627,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"ThemeProvider\"]\n3:I[44142,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"UpdateStatusProvider\"]\n4:I[39756,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"default\"]\n5:I[37457,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"default\"]\n6:I[57787,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"ConnectionStatus\"]\n7:I[29024,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"ToastProvider\"]\n8:I[67570,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"EditorSessionProvider\"]\n9:I[97367,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"OutletBoundary\"]\na:\"$Sreact.suspense\"\nd:I[97367,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"ViewportBoundary\"]\nf:I[97367,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"MetadataBoundary\"]\n11:I[68027,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"default\",1]\n:HL[\"/_next/static/chunks/11kcvpd_x5al3.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/11kcvpd_x5al3.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/11qlw_akft1w9.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/05802kvs1cqcr.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/_next/static/chunks/12kb1a2dj8aui.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-4\",{\"src\":\"/_next/static/chunks/148ko75-ihlmp.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-5\",{\"src\":\"/_next/static/chunks/0x1o~ag8m099..js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"font-sans inter_b2991b2-module__9mH_6q__variable\",\"children\":[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L6\",null,{}],[\"$\",\"$L7\",null,{}],[\"$\",\"$L8\",null,{}]]}]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:0:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:0:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$a\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@b\"}]}]]}],{},null,false,null]},null,false,\"$@c\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$a\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L10\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$11\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/11kcvpd_x5al3.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"kYNehCiN1HXZgc-ACiFjO\"}\n"])</script><script>self.__next_f.push([1,"12:[]\nc:\"$W12\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"13:I[27201,[\"/_next/static/chunks/11qlw_akft1w9.js\",\"/_next/static/chunks/0nucsyd1g6g0i.js\",\"/_next/static/chunks/05802kvs1cqcr.js\",\"/_next/static/chunks/12kb1a2dj8aui.js\",\"/_next/static/chunks/148ko75-ihlmp.js\",\"/_next/static/chunks/0x1o~ag8m099..js\"],\"IconMark\"]\nb:null\n10:[[\"$\",\"title\",\"0\",{\"children\":\"繋\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"AI時代の統合開発マネージャー - Claude と人間のシームレスな協働開発を実現\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.png?icon.0fkix7.hkmsz4.png\",\"sizes\":\"1024x1024\",\"type\":\"image/png\"}],[\"$\",\"$L13\",\"3\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/14tyifilnj_k5.js"/><script src="/_next/static/chunks/02i7dfk78~t~2.js" async=""></script><script src="/_next/static/chunks/0ibllnu3qqge2.js" async=""></script><script src="/_next/static/chunks/0.76ju_ex-wmx.js" async=""></script><script src="/_next/static/chunks/turbopack-0i5dxy28w4s._.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/148ko75-ihlmp.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/14tyifilnj_k5.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"cyJwJnHI5QJBS5yCGq9h6\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/14tyifilnj_k5.js"/><script src="/_next/static/chunks/02i7dfk78~t~2.js" async=""></script><script src="/_next/static/chunks/0ibllnu3qqge2.js" async=""></script><script src="/_next/static/chunks/0.76ju_ex-wmx.js" async=""></script><script src="/_next/static/chunks/turbopack-0i5dxy28w4s._.js" async=""></script><script src="/_next/static/chunks/01xlw8hd842-c.js" async=""></script><script src="/_next/static/chunks/148ko75-ihlmp.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/14tyifilnj_k5.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/01xlw8hd842-c.js\",\"/_next/static/chunks/148ko75-ihlmp.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"kYNehCiN1HXZgc-ACiFjO\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"LPKX3xtEXAUmAe1gxWY3OHo3JwLz00b2uOX1b6FqMIU=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"k+JHlfkvQi/ZDxnixi44B7cniSs/Yr9z4qkWQct06Ps=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "LPKX3xtEXAUmAe1gxWY3OHo3JwLz00b2uOX1b6FqMIU="
4
+ "encryptionKey": "k+JHlfkvQi/ZDxnixi44B7cniSs/Yr9z4qkWQct06Ps="
5
5
  }
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,45139,801,e=>{"use strict";function t(e){return"success"===e||"error"===e||"running"!==e&&"idle"!==e&&void 0}function r(e){let t=e.tabs??[];if(0===t.length||t.some(e=>"running"===e.status))return null;if(t.some(e=>"waiting"===e.status))return"waiting";let r=t.filter(e=>e.unread);return r.some(e=>"error"===e.status)?"error":r.some(e=>"success"===e.status)?"success":null}e.s(["activityKind",0,function(e){return(e.tabs??[]).some(e=>"running"===e.status)?"running":r(e)},"hasUnreadResult",0,function(e){return null!==r(e)},"unreadForStatus",0,t,"unreadKind",0,r],45139);var n=e.i(71645),s=e.i(70935),a=e.i(2576),i=e.i(71698);let l=null;e.s(["useLiveTasks",0,function(e={}){let[r,o]=(0,n.useState)(()=>l??[]),[u,d]=(0,n.useState)(null!==l),[c,h]=(0,n.useState)(!0),f=(0,n.useRef)(e),m=(0,n.useRef)(r);(0,n.useEffect)(()=>{f.current=e,m.current=r}),(0,n.useEffect)(()=>{u&&(l=r)},[r,u]);let g=(0,n.useCallback)(async()=>{h(!0);try{let e=await fetch((0,s.apiUrl)("/api/tasks"));if(!e.ok)throw Error("Failed to fetch tasks");let t=await e.json();o(t.data.tasks),d(!0)}catch(e){console.error("Failed to load tasks:",e)}finally{h(!1)}},[]);(0,n.useEffect)(()=>{g()},[g]);let p=(0,n.useMemo)(()=>r.flatMap(e=>(e.tabs??[]).map(e=>e.tab_id)),[r]);return(0,i.useTabStatusEvents)(p,(e,r)=>{let n=t(r);o(t=>t.map(t=>({...t,tabs:(t.tabs??[]).map(t=>t.tab_id===e?{...t,status:r,...void 0!==n&&{unread:n}}:t)})))}),(0,a.useTaskEvents)({onTaskCreated:(e,t)=>{o(t=>t.some(t=>t.id===e.id)?t:[...t,e]),f.current.onTaskCreated?.(e,t)},onTaskUpdated:e=>{o(t=>t.map(t=>t.id===e.id?e:t)),f.current.onTaskUpdated?.(e)},onTaskDeleted:e=>{let t=m.current.find(t=>t.id===e);o(t=>t.filter(t=>t.id!==e)),f.current.onTaskDeleted?.(e,t)},onTaskTabsChanged:e=>{o(t=>t.map(t=>t.id===e.id?e:t))},onTasksReordered:e=>{let t=new Map(e.map(({id:e,order:t})=>[e,t]));o(e=>e.map(e=>{let r=t.get(e.id);return void 0===r||r===e.order?e:{...e,order:r}}))}}),{tasks:r,setTasks:o,isLoading:c,hasLoaded:u,reload:g}}],801)},86311,e=>{"use strict";let t=(0,e.i(75254).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",0,t],86311)},73884,e=>{"use strict";let t=(0,e.i(75254).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],73884)},2576,e=>{"use strict";var t=e.i(71645),r=e.i(95008);e.s(["useTaskEvents",0,function(e){let n=(0,t.useRef)(e);(0,t.useLayoutEffect)(()=>{n.current=e}),(0,t.useEffect)(()=>{let e=(0,r.getSharedSocket)(),t=({task:e,warnings:t})=>{n.current.onTaskCreated(e,t??[])},s=({task:e})=>{n.current.onTaskUpdated(e)},a=({taskId:e})=>{n.current.onTaskDeleted(e)},i=({task:e})=>{n.current.onTaskTabsChanged?.(e)},l=({orders:e})=>{n.current.onTasksReordered?.(e)};return e.on("task:created",t),e.on("task:updated",s),e.on("task:deleted",a),e.on("task:tabs-changed",i),e.on("tasks:reordered",l),()=>{e.off("task:created",t),e.off("task:updated",s),e.off("task:deleted",a),e.off("task:tabs-changed",i),e.off("tasks:reordered",l)}},[])}])},71698,e=>{"use strict";var t=e.i(71645),r=e.i(95008);e.s(["useTabStatusEvents",0,function(e,n){let s=(0,t.useRef)(new Map),a=(0,t.useRef)(n);(0,t.useEffect)(()=>{a.current=n}),(0,t.useEffect)(()=>{let e=(0,r.getSharedSocket)(),t=({sessionId:e,status:t})=>{let r=function(e){switch(e){case"running":return"running";case"waiting":return"waiting";case"success":return"success";case"failure":case"error":return"error";case"idle":return"idle";default:return null}}(t);null!==r&&a.current(e,r)};return e.on("status-changed",t),()=>{e.off("status-changed",t)}},[]),(0,t.useEffect)(()=>{(0,r.syncRoomSubscriptions)(s.current,e.map(e=>`tab:${e}`))},[e]),(0,t.useEffect)(()=>{let e=s.current;return()=>{(0,r.clearRoomSubscriptions)(e)}},[])}])},31278,e=>{"use strict";var t=e.i(17521);e.s(["Loader2",()=>t.default])},18566,(e,t,r)=>{t.exports=e.r(76562)},95468,e=>{"use strict";var t=e.i(23287);e.s(["CheckCircle2",()=>t.default])},27612,e=>{"use strict";let t=(0,e.i(75254).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],27612)},14683,e=>{"use strict";let t=(0,e.i(75254).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",0,t],14683)},22508,e=>{"use strict";var t=e.i(71645);let r="tsunagi:sidebar-tasks",n={shown:[],hidden:[],hintSeen:!1},s=new Set,a=null,i=n;function l(){let e=function(){try{return localStorage.getItem(r)}catch{return null}}();if(e===a)return i;a=e;try{let t=e?JSON.parse(e):{};i={shown:Array.isArray(t.shown)?t.shown:[],hidden:Array.isArray(t.hidden)?t.hidden:Object.keys(t.dismissed??{}),hintSeen:!0===t.hintSeen}}catch{i=n}return i}function o(){return n}function u(e){s.add(e);let t=t=>{(t.key===r||null===t.key)&&e()};return window.addEventListener("storage",t),()=>{s.delete(e),window.removeEventListener("storage",t)}}function d(e){let t=l(),n=e(t);if(n!==t){try{localStorage.setItem(r,JSON.stringify(n))}catch{a=null,i=n}s.forEach(e=>e())}}e.s(["useSidebarTaskList",0,function(){return{state:(0,t.useSyncExternalStore)(u,l,o),update:d}}])},22770,e=>{"use strict";var t=e.i(18050),r=e.i(18566),n=e.i(71645),s=e.i(95468),a=e.i(14683);let i=(0,e.i(75254).default)("list-x",[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"m15.5 9.5 5 5",key:"ytk86i"}],["path",{d:"m20.5 9.5-5 5",key:"17o44f"}]]);var l=e.i(31278),o=e.i(86311),u=e.i(73884),d=e.i(45139),c=e.i(801),h=e.i(22508),f=e.i(19805),m=e.i(27601),g=e.i(25913),p=e.i(52088);let v=(0,g.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function b({className:e,variant:t="default",render:r,...n}){var s;return s={defaultTagName:"span",props:(0,f.mergeProps)({className:(0,p.cn)(v({variant:t}),e)},n),render:r,state:{slot:"badge",variant:t}},(0,m.useRenderElement)(s.defaultTagName??"div",s,s)}var x=e.i(85902),k=e.i(68995),y=e.i(69068),w=e.i(27612);function j({children:e,open:r,onOpenChange:s,onRemove:a,hint:i=!1,onHintEnd:l,onMouseEnter:o}){let u=(0,n.useRef)(null),d=(0,n.useRef)(null),c=(0,n.useRef)(null),h=(0,n.useRef)(!1),[f,m]=(0,n.useState)(null),[g,v]=(0,n.useState)(!1),b=f??(r?-64:0),x=i&&null===f&&!r&&!g;(0,n.useEffect)(()=>{if(!r)return;let e=e=>{u.current?.contains(e.target)||s(!1)};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[r,s]);let k=e=>{let t=d.current;if(!t)return a();v(!0),t.animate([{transform:`translateX(${e}px)`},{transform:"translateX(-100%)"}],{duration:200,easing:"ease-out",fill:"forwards"}).finished.then(a,a)};return(0,t.jsxs)("div",{ref:u,className:"relative touch-pan-y select-none overflow-hidden rounded-md",onPointerDown:e=>{h.current=!1,g||0!==e.button||(c.current={pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,base:r?-64:0,dragging:!1})},onPointerMove:e=>{let t=c.current;if(!t||t.pointerId!==e.pointerId)return;let r=e.clientX-t.startX,n=e.clientY-t.startY;if(!t.dragging){if(8>Math.abs(r)&&8>Math.abs(n))return;if(Math.abs(n)>=Math.abs(r)){c.current=null;return}t.dragging=!0,i&&l?.(),e.currentTarget.setPointerCapture(e.pointerId)}m(Math.min(0,Math.max(-e.currentTarget.offsetWidth,t.base+r)))},onPointerUp:e=>{let t=c.current;if(c.current=null,!t||t.pointerId!==e.pointerId||!t.dragging)return;h.current=!0;let r=-Math.min(0,t.base+e.clientX-t.startX);m(null),r>.6*e.currentTarget.offsetWidth?k(-r):s(r>32)},onPointerCancel:()=>{c.current=null,m(null)},onPointerEnter:e=>"mouse"===e.pointerType&&o?.(),onClickCapture:e=>{if(h.current){h.current=!1,e.preventDefault(),e.stopPropagation();return}r&&!e.target.closest("[data-swipe-action]")&&(e.preventDefault(),e.stopPropagation(),s(!1))},children:[(0!==b||x||g)&&(0,t.jsx)("div",{className:"absolute inset-0 flex justify-end bg-destructive",children:(0,t.jsx)("button",{type:"button","data-swipe-action":!0,tabIndex:r?0:-1,"aria-label":"Remove from list",title:"Remove from list",onClick:()=>k(b),style:{width:g?"100%":Math.max(64,-b)},className:(0,p.cn)("flex items-center pl-5 text-white",null===f&&"transition-[width] duration-200 ease-out"),children:(0,t.jsx)(w.Trash2,{className:"size-3.5"})})}),(0,t.jsx)("div",{ref:d,style:{transform:x?void 0:`translateX(${b}px)`},className:(0,p.cn)("relative bg-background dark:bg-card",null===f&&"transition-transform duration-200 ease-out",x&&"animate-swipe-hint"),onAnimationEnd:e=>e.target===e.currentTarget&&l?.(),children:e})]})}let N={waiting:0,error:1,success:2,running:3},S={running:{icon:l.Loader2,className:"text-primary animate-spin",label:"Running"},waiting:{icon:o.MessageSquare,className:"text-warning",label:"Waiting for your input"},error:{icon:u.XCircle,className:"text-destructive",label:"Failed"},success:{icon:s.CheckCircle2,className:"text-success",label:"Finished"}},T={icon:a.Circle,className:"text-muted-foreground",label:"Idle"},C={success:{className:"bg-unread-success",label:"Finished, not opened yet"},error:{className:"bg-unread-error",label:"Failed, not opened yet"},waiting:{className:"bg-unread-waiting",label:"Waiting for your input"}};function M(e,t){let r=new Set(t.map(e=>e.id)),n=e.shown.filter(e=>r.has(e)),s=e.hidden.filter(e=>r.has(e)),a=new Set(s);for(let e of t)a.has(e.id)||(0,d.activityKind)(e)&&!n.includes(e.id)&&n.push(e.id);return n.length===e.shown.length&&n.every((t,r)=>t===e.shown[r])&&s.length===e.hidden.length?e:{...e,shown:n,hidden:s}}function E(e){let t=window.matchMedia("(hover: hover)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function R({currentTaskId:e}){let s=(0,r.useRouter)(),{tasks:a,isLoading:l}=(0,c.useLiveTasks)(),{state:o,update:u}=(0,h.useSidebarTaskList)(),f=(0,n.useMemo)(()=>l?o:M(o,a),[l,o,a]);(0,n.useEffect)(()=>{f!==o&&u(e=>M(e,a))},[f,o,a,u]);let{active:m,done:g}=(0,n.useMemo)(()=>{let t=new Map(a.map(e=>[e.id,e])),r=[],n=[];for(let s of f.shown){let a=t.get(s);if(!a)continue;let i=(0,d.activityKind)(a);i&&(a.id!==e||"success"!==i&&"error"!==i)?r.push({task:a,kind:i}):n.push(a)}let s=(e,t)=>e.order-t.order||e.createdAt.localeCompare(t.createdAt);return r.sort((e,t)=>N[e.kind]-N[t.kind]||s(e.task,t.task)),n.sort(s),{active:r,done:n}},[a,f.shown,e]),v=(0,n.useMemo)(()=>[...m.map(({task:e})=>e),...g],[m,g]),[w,L]=(0,n.useState)(null),[I,P]=(0,n.useState)(null),A=(0,n.useSyncExternalStore)(E,()=>window.matchMedia("(hover: hover)").matches,()=>!0),[X,z]=(0,n.useState)(null),D=f.hintSeen?null:A?v.some(e=>e.id===X)?X:null:v[0]?.id??null,U=e=>{u(t=>({...t,shown:t.shown.filter(t=>!e.includes(t)),hidden:[...t.hidden,...e.filter(e=>!t.hidden.includes(e))]}))},F=r=>{var n;let a=r.id===e,i=(n=r.tabs)&&0!==n.length?n.some(e=>"running"===e.status)?"running":n.some(e=>"waiting"===e.status)?"waiting":n.some(e=>"error"===e.status)?"error":n.every(e=>"success"===e.status)?"success":null:null,{icon:l,className:o,label:c}=i?S[i]:T,h=(0,d.unreadKind)(r);return a&&"waiting"!==h&&(h=null),(0,t.jsx)("li",{children:(0,t.jsxs)(j,{open:w===r.id,onOpenChange:e=>L(t=>e?r.id:t===r.id?null:t),onRemove:()=>U([r.id]),hint:D===r.id,onHintEnd:()=>u(e=>({...e,hintSeen:!0})),onMouseEnter:()=>!f.hintSeen&&z(e=>e??r.id),children:[h&&(0,t.jsx)("span",{role:"img","aria-label":C[h].label,title:C[h].label,className:(0,p.cn)("absolute left-0 top-1.5 bottom-1.5 z-10 w-[3px] rounded-r-[3px]",C[h].className)}),(0,t.jsxs)("button",{type:"button",onClick:()=>s.replace(`/tasks/${r.id}`),"aria-current":a?"page":void 0,className:(0,p.cn)("flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent",a&&"bg-accent"),children:[(0,t.jsx)("span",{role:"img","aria-label":c,title:c,className:"mt-0.5 shrink-0",children:(0,t.jsx)(l,{className:(0,p.cn)("size-3.5",o)})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate text-sm text-foreground",title:r.title,children:r.title}),(0,t.jsxs)("span",{className:"block truncate text-xs text-muted-foreground",children:[r.owner,"/",r.repo]})]})]})]})},r.id)},K=(e,r)=>r.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsxs)("h2",{className:"px-2 pb-1 pt-2 text-xs font-medium text-muted-foreground",children:[e," ",(0,t.jsx)("span",{className:"tabular-nums",children:r.length})]}),(0,t.jsx)("ul",{className:"space-y-0.5",children:r.map(F)})]});return(0,t.jsxs)("aside",{className:"hidden md:flex w-64 shrink-0 flex-col border-r border-border bg-background dark:bg-card",children:[(0,t.jsxs)("div",{className:"flex h-8 shrink-0 box-content items-center gap-2 border-b border-border bg-card p-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Tasks"}),(0,t.jsx)(b,{variant:"secondary",children:v.length}),(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"ml-auto text-muted-foreground hover:text-foreground","aria-label":"Clear list",title:"Clear list",disabled:0===v.length,onClick:()=>{v.length>0&&P(v.map(e=>e.id))},children:(0,t.jsx)(i,{})})]}),0===v.length?(0,t.jsx)("p",{className:"p-4 text-center text-xs text-muted-foreground",children:"No tasks"}):(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto px-2 pb-2",children:[K("Active",m.map(({task:e})=>e)),K("Done",g)]}),(0,t.jsx)(k.Dialog,{open:null!==I,onOpenChange:e=>!e.open&&P(null),title:"Clear list",maxWidth:"md",showCloseButton:!1,children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("p",{className:"text-foreground",children:["Remove ",I?.length," task",I?.length===1?"":"s"," from this list?"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"The tasks themselves are not deleted. Removed tasks stay hidden until you show them again from the task page."}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(y.DialogClose,{render:(0,t.jsx)(x.Button,{variant:"outline",className:"cursor-pointer"}),children:"Cancel"}),(0,t.jsx)(x.Button,{variant:"destructive",className:"cursor-pointer",onClick:()=>{I&&U(I),P(null)},children:"Clear"})]})]})})]})}e.s(["default",0,function({children:e}){let{id:n}=(0,r.useParams)();return(0,t.jsxs)("div",{className:"h-screen flex bg-background",children:[(0,t.jsx)(R,{currentTaskId:n}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:e})]})}],22770)}]);
@@ -0,0 +1,6 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let o=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:n}=e,r=e.protocol||"",a=e.pathname||"",i=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||s.test(r))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${r}${u}${a}${c}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return o}});let r=e.r(18967),a=e.r(52817);function o(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,a.hasBasePath)(n.pathname)}catch(e){return!1}}},84508,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},22016,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return v},useLinkStatus:function(){return b}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let o=e.r(90809),s=e.r(18050),i=o._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550);e.r(33525);let p=e.r(88540),m=e.r(91949),g=e.r(73668),h=e.r(9396);function v(t){var n,r;let a,o,v,[b,y]=(0,i.useOptimistic)(m.IDLE_LINK_STATUS),S=(0,i.useRef)(null),{href:E,as:R,children:C,prefetch:k=null,passHref:w,replace:T,shallow:O,scroll:I,onClick:N,onMouseEnter:j,onTouchStart:M,legacyBehavior:P=!1,onNavigate:L,transitionTypes:A,ref:D,unstable_dynamicOnHover:_,...F}=t;a=C,P&&("string"==typeof a||"number"==typeof a)&&(a=(0,s.jsx)("a",{children:a}));let U=i.default.useContext(u.AppRouterContext),B=!1!==k,z=!1!==k?null===(r=k)||"auto"===r?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,H="string"==typeof(n=R||E)?n:(0,l.formatUrl)(n);if(P){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=i.default.Children.only(a)}let V=P?o&&"object"==typeof o&&o.ref:D,W=i.default.useCallback(e=>(null!==U&&(S.current=(0,m.mountLinkInstance)(e,H,U,z,B,y)),()=>{S.current&&((0,m.unmountLinkForCurrentNavigation)(S.current),S.current=null),(0,m.unmountPrefetchableInstance)(e)}),[B,H,U,z,y]),K={ref:(0,c.useMergedRef)(W,V),onClick(t){P||"function"!=typeof N||N(t),P&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!U||t.defaultPrevented||function(t,n,r,a,o,s,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(n)){a&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);i.default.startTransition(()=>{d(n,a?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,r.current,l)})}}(t,H,S,T,I,L,A)},onMouseEnter(e){P||"function"!=typeof j||j(e),P&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),U&&B&&(0,m.onNavigationIntent)(e.currentTarget,!0===_)},onTouchStart:function(e){P||"function"!=typeof M||M(e),P&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),U&&B&&(0,m.onNavigationIntent)(e.currentTarget,!0===_)}};return(0,d.isAbsoluteUrl)(H)?K.href=H:P&&!w&&("a"!==o.type||"href"in o.props)||(K.href=(0,f.addBasePath)(H)),v=P?i.default.cloneElement(o,K):(0,s.jsx)("a",{...F,...K,children:a}),(0,s.jsx)(x.Provider,{value:b,children:v})}e.r(84508);let x=(0,i.createContext)(m.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(x);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},97099,e=>{"use strict";var t,n,r,a=e.i(18050),o=e.i(71645),s=e.i(18566),i=e.i(22016),l=e.i(471),u=e.i(75254);let c=(0,u.default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),d=(0,u.default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);var f=e.i(77705);let p=(0,u.default)("folder-x",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]]);var m=e.i(88699);let g=(0,u.default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);var h=e.i(27612),v=e.i(70935),x=e.i(30627),b=e.i(37870),y=e.i(76165),S=e.i(51846),E=e.i(2576),R=e.i(22508),C=e.i(37727),k=e.i(31278);let w=(0,u.default)("circle-pause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);var T=e.i(63209);let O=(0,u.default)("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var I=e.i(95468),N=e.i(73884),j=e.i(86311),M=e.i(68995),P=e.i(85902),L=e.i(93355),A=e.i(64691);function D({entry:e}){if(!e||"idle"===e.terminal)return(0,a.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,a.jsx)(w,{className:"w-3 h-3"}),(0,a.jsx)("span",{children:"idle"})]});if("connecting"===e.terminal)return(0,a.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,a.jsx)(k.Loader2,{className:"w-3 h-3 animate-spin"}),(0,a.jsx)("span",{children:"connecting"})]});if("error"===e.terminal)return(0,a.jsxs)("div",{className:"flex items-center gap-1 text-xs text-destructive",children:[(0,a.jsx)(T.AlertCircle,{className:"w-3 h-3"}),(0,a.jsx)("span",{children:"error"})]});if("exited"===e.terminal||"paused"===e.terminal)return(0,a.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,a.jsx)(O,{className:"w-3 h-3"}),(0,a.jsx)("span",{children:e.terminal})]});switch(e.claude){case"running":return(0,a.jsxs)("div",{className:"flex items-center gap-1 text-xs text-primary",children:[(0,a.jsx)(k.Loader2,{className:"w-3 h-3 animate-spin"}),(0,a.jsx)("span",{children:"running"})]});case"waiting":return(0,a.jsxs)("div",{className:"flex items-center gap-1 text-xs text-warning",children:[(0,a.jsx)(j.MessageSquare,{className:"w-3 h-3"}),(0,a.jsx)("span",{children:"waiting"})]});case"success":return(0,a.jsxs)("div",{className:"flex items-center gap-1 text-xs text-success",children:[(0,a.jsx)(I.CheckCircle2,{className:"w-3 h-3"}),(0,a.jsx)("span",{children:"success"})]});case"failure":case"error":return(0,a.jsxs)("div",{className:"flex items-center gap-1 text-xs text-destructive",children:[(0,a.jsx)(N.XCircle,{className:"w-3 h-3"}),(0,a.jsx)("span",{children:"failure"===e.claude?"failure":"error"})]});default:return(0,a.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,a.jsx)(w,{className:"w-3 h-3"}),(0,a.jsx)("span",{children:"idle"})]})}}function _({tabs:e,activeTabId:t,onTabChange:n,onTabCreateTerminal:r,onTabCreateClaude:s,claudeOption:i,codexOption:l,onTabCreateCodex:u,localLlmOption:c,onTabCreateLocalLlm:d,onTabDelete:f,tabStatusMap:p}){let[m,h]=(0,o.useState)(null),v=new Map,x=0;for(let t of e)"terminal"===t.mode&&(x+=1,v.set(t.tab_id,x));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(M.ConfirmDialog,{open:null!==m,onOpenChange:e=>{e.open||h(null)},title:"Delete Tab",message:m?.isRunning?"This tab is running. Are you sure you want to delete it?":"Delete this tab?",confirmLabel:"Delete",cancelLabel:"Cancel",onConfirm:()=>{m&&f(m.tabId)},variant:"danger"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-border pb-1",children:[e.map(e=>{let r=t===e.tab_id,o=p?.get(e.tab_id),s=(o?.claude==="running"||o?.claude==="waiting")&&(o?.terminal==="connected"||o?.terminal===null);return(0,a.jsxs)("div",{onClick:()=>n(e.tab_id),className:`
2
+ relative flex items-center gap-2 px-4 pt-1 pb-2 h-10 flex-shrink-0 transition-colors cursor-pointer
3
+ ${r?"text-primary":s?"text-primary-light":"text-muted-foreground hover:text-foreground"}
4
+ `,children:[(0,a.jsx)("div",{className:"font-medium flex items-center gap-2",children:"terminal"===e.mode?(0,a.jsxs)("span",{className:"text-xs",children:["terminal ",v.get(e.tab_id)]}):(0,a.jsxs)(a.Fragment,{children:["codex"===e.mode&&(0,a.jsx)("span",{title:"Codex",children:(0,a.jsx)(L.CodexIcon,{className:"w-3 h-3"})}),("local"===e.mode||"ollama"===e.mode||"lmstudio"===e.mode)&&(0,a.jsx)("span",{title:(0,A.localLlmTabLabel)(c?.provider??null),children:(0,a.jsx)(L.LocalLlmTabIcon,{provider:c?.provider??null,className:"w-3 h-3"})}),(0,a.jsx)(D,{entry:o})]})}),(0,a.jsx)(P.Button,{variant:"ghost",size:"icon-xs",onClick:t=>{t.stopPropagation(),h({tabId:e.tab_id,isRunning:s})},children:(0,a.jsx)(C.X,{className:"w-4 h-4"})}),r&&(0,a.jsx)("span",{className:"absolute inset-x-0 -bottom-1 h-0.5 bg-primary"})]},e.tab_id)}),(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0 ml-auto",children:[(0,a.jsx)("div",{className:"w-px self-stretch bg-theme"}),r&&(0,a.jsx)(P.Button,{size:"icon",onClick:r,title:"Open terminal",children:(0,a.jsx)(g,{className:"w-4 h-4"})}),(0,a.jsx)("span",{title:i?.disabledReason??"Claude Code",children:(0,a.jsx)(P.Button,{size:"icon",onClick:s,disabled:!!i?.disabledReason,children:(0,a.jsx)(L.ClaudeIcon,{className:"w-4 h-4"})})}),l&&(0,a.jsx)("span",{title:l.disabledReason??"Codex",children:(0,a.jsx)(P.Button,{size:"icon",onClick:u,disabled:!!l.disabledReason,children:(0,a.jsx)(L.CodexIcon,{className:"w-4 h-4"})})}),c&&(0,a.jsx)("span",{title:c.disabledReason??`${(0,A.localLlmTabLabel)(c.provider)}: ${c.model}`,children:(0,a.jsx)(P.Button,{size:"icon",onClick:d,disabled:!!c.disabledReason,children:(0,a.jsx)(L.LocalLlmTabIcon,{provider:c.provider,className:"w-4 h-4"})})})]})]})]})}var F=e.i(88784);let U=(0,u.default)("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);var B=e.i(627);let z="tsunagi:task-view-mode",H="tsunagi:editor-submit-on-send",V="(min-width: 1024px)",W=new Set;function K(e){return W.add(e),window.addEventListener("storage",e),()=>{W.delete(e),window.removeEventListener("storage",e)}}function $(e){try{return localStorage.getItem(e)}catch{return null}}function G(e,t){try{localStorage.setItem(e,t)}catch{}W.forEach(e=>e())}function Y(e){let t=window.matchMedia(V);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function q(){let e=$(z);return"split"===e||"editor"===e?e:"terminal"}var J=e.i(50213),X=e.i(49611);let Q="u">typeof navigator&&/Mac/.test(navigator.platform),Z="tsunagi-draft",ee="__none__";function et(e){return`inmemory://${Z}/${e}.md`}function en({draftId:e,draftIds:t,canSend:n,onSend:r}){let{effectiveTheme:s}=(0,B.useTheme)(),{submitOnSend:i,setSubmitOnSend:l}={submitOnSend:(0,o.useSyncExternalStore)(K,()=>"true"===$(H),()=>!1),setSubmitOnSend:(0,o.useCallback)(e=>G(H,String(e)),[])},[u,c]=(0,o.useState)(null),d=(0,o.useRef)(null),[f,p]=(0,o.useState)(!0),m=null===e;function g(){let e=d.current,t=e?.getModel();if(!e||!t||!n)return;let a=t.getValue();""===a.trim()||r(a,i)&&(e.executeEdits("send",[{range:t.getFullModelRange(),text:""}]),e.pushUndoStop())}let h=(0,o.useRef)(g);(0,o.useLayoutEffect)(()=>{h.current=g}),(0,o.useEffect)(()=>(0,X.registerFocusTarget)("editor",()=>d.current?.focus()),[]),(0,o.useEffect)(()=>{if(!u)return;let n=new Set([...t,e??ee].map(et));for(let e of u.editor.getModels())e.uri.authority===Z&&(n.has(e.uri.toString())||e.dispose())},[u,t,e]);let v=(0,o.useMemo)(()=>({...J.MONACO_INDENT_OPTIONS,...J.MONACO_IME_OPTIONS,minimap:{enabled:!1},lineNumbers:"on",wordWrap:"on",fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,readOnly:m}),[m]);return(0,a.jsxs)("div",{className:"flex flex-col h-full min-h-0 overflow-hidden",children:[(0,a.jsx)("div",{className:"flex-1 min-h-0",children:(0,a.jsx)(F.Editor,{height:"100%",defaultLanguage:"markdown",defaultValue:"",path:et(e??ee),keepCurrentModel:!0,onMount:(e,t)=>{d.current=e,c(t);let n=()=>p(""===e.getValue().trim());n(),e.onDidChangeModelContent(n),e.onDidChangeModel(n),e.onDidFocusEditorText(()=>(0,X.setPaneFocusTarget)("editor")),e.onKeyDown(e=>{e.keyCode===t.KeyCode.Enter&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.stopPropagation(),h.current())}),"editor"===(0,X.getFocusTarget)()&&(e.layout(),e.focus())},options:v,theme:"dark"===s?"vs-dark":"vs-light"})}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-x-3 gap-y-2 p-2 border-t border-border flex-shrink-0",children:[(0,a.jsxs)("span",{className:"mr-auto text-xs text-muted-foreground",children:[Q?"Cmd+Enter":"Ctrl+Enter"," で送信"]}),(0,a.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-foreground cursor-pointer select-none",title:"ON: 送信後に Enter を押して確定します。OFF: テキストを入力するだけで確定しません",children:[(0,a.jsx)("input",{type:"checkbox",checked:i,onChange:e=>l(e.target.checked),className:"size-3.5 accent-primary"}),"送信後にEnter"]}),(0,a.jsxs)(P.Button,{size:"sm",onClick:g,disabled:!(n&&!f),children:[(0,a.jsx)(U,{className:"w-4 h-4"}),"送信"]})]})]})}let er=(0,u.default)("columns-2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]),ea=(0,u.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);var eo=e.i(20535),es=e.i(52088);let ei=[{mode:"terminal",label:"Terminal only",icon:eo.SquareTerminal},{mode:"split",label:"Terminal and editor",icon:er},{mode:"editor",label:"Editor only",icon:ea}];function el({mode:e,canSplit:t,onChange:n}){let r=t?ei:ei.filter(e=>"split"!==e.mode);return(0,a.jsx)("div",{className:"flex shrink-0 items-center rounded-md border border-input",role:"group","aria-label":"View mode",children:r.map(({mode:t,label:r,icon:o})=>(0,a.jsx)(P.Button,{variant:"ghost",size:"icon-xs",title:r,"aria-label":r,"aria-pressed":e===t,onClick:()=>n(t),className:(0,es.cn)("rounded-none first:rounded-l-md last:rounded-r-md",e===t?"bg-accent text-foreground":"text-muted-foreground"),children:(0,a.jsx)(o,{className:"size-3.5"})},t))})}var eu=e.i(71698),ec=e.i(67211),ed=e.i(38078),ef=e.i(81671),ep=e.i(28962);let em=(0,o.forwardRef)(function({task:e,tabs:t,activeTabId:n,onTabChange:r,onTabCreate:s,onTabDelete:i,onTodosUpdated:l,onAgentStatusChange:u},c){let d,f,{mode:p,canSplit:m,setMode:h}=(d=(0,o.useSyncExternalStore)(K,q,()=>"terminal"),f=(0,o.useSyncExternalStore)(Y,()=>window.matchMedia(V).matches,()=>!0),{mode:"split"!==d||f?d:"terminal",canSplit:f,setMode:(0,o.useCallback)(e=>G(z,e),[])}),v=t.length>0,x=v?p:"terminal",[b,y]=(0,o.useState)(null),[S,E]=(0,o.useState)(()=>new Set(n?[n]:[]));(0,o.useEffect)(()=>{n&&E(e=>{if(e.has(n))return e;let t=new Set(e);return t.add(n),t})},[n]);let[R,C]=(0,o.useState)(()=>new Map(t.map(e=>[e.tab_id,{terminal:null,claude:e.status}])));(0,o.useEffect)(()=>{C(e=>{let n=!1,r=new Map(e);for(let e of t)r.has(e.tab_id)||(r.set(e.tab_id,{terminal:null,claude:e.status}),n=!0);return n?r:e})},[t]);let k=(0,o.useRef)(S);(0,o.useEffect)(()=>{k.current=S},[S]);let w=(0,o.useMemo)(()=>t.map(e=>e.tab_id),[t]);(0,eu.useTabStatusEvents)(w,(e,t)=>{k.current.has(e)||(C(n=>{let r=n.get(e);if(!r||null!==r.terminal||r.claude===t)return n;let a=new Map(n);return a.set(e,{terminal:null,claude:t}),a}),u?.(e,t))});let T=(0,o.useRef)(new Map);(0,o.useEffect)(()=>(0,X.registerFocusTarget)("terminal",()=>{n&&T.current.get(n)?.focus()}),[n]),(0,o.useEffect)(()=>()=>(0,X.setPaneFocusTarget)("terminal"),[]),(0,o.useEffect)(()=>{"split"!==x&&(0,X.setPaneFocusTarget)(x),(0,X.restoreFocus)()},[x,n]);let O=(0,o.useCallback)((e,t,n)=>{C(r=>{let a=new Map(r);return a.set(e,{terminal:t,claude:n}),a}),u?.(e,n)},[u]);(0,o.useImperativeHandle)(c,()=>({sendInput:(e,t)=>{let n=T.current.get(e);n?.sendInput(t)}}));let I=(0,o.useCallback)(e=>{E(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n}),r(e)},[r]),N=(0,o.useCallback)(async e=>{let t=await s(e);t&&E(e=>{let n=new Set(e);return n.add(t),n})},[s]),j=(0,o.useCallback)(()=>N("terminal"),[N]),M=(0,o.useCallback)(()=>N("claude"),[N]),D=(0,o.useCallback)(()=>N("codex"),[N]),F=(0,o.useCallback)(()=>N("local"),[N]),U=(0,ef.useAgentAvailability)(),B={disabledReason:(0,ep.agentDisabledReason)("Claude Code",U?.find(e=>"claude"===e.agent))},H={disabledReason:(0,ep.agentDisabledReason)("Codex",U?.find(e=>"codex"===e.agent))},{settings:W}=(0,ed.useOllamaSettings)(),{settings:$}=(0,ed.useLmStudioSettings)(),{settings:J}=(0,ed.useLocalLlmSettings)(),Q=J?.active?.model??"",Z=W?.enabled||$?.enabled?{provider:J?.active?.provider??null,model:Q,disabledReason:B.disabledReason??(Q?void 0:"ローカルLLMのモデルが未設定です(Settings で設定)")}:void 0,ee=(0,o.useCallback)(e=>{E(t=>{let n=new Set(t);return n.delete(e),n}),C(t=>{let n=new Map(t);return n.delete(e),n}),T.current.delete(e),i(e)},[i]),et="editor"===x,er=(0,o.useMemo)(()=>t.map(e=>e.tab_id),[t]);return(0,a.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,a.jsx)("div",{className:"px-4 pt-4 flex-shrink-0",children:(0,a.jsx)(_,{tabs:t,activeTabId:n,onTabChange:I,onTabCreateTerminal:j,onTabCreateClaude:M,claudeOption:B,codexOption:H,onTabCreateCodex:D,localLlmOption:Z,onTabCreateLocalLlm:F,onTabDelete:ee,tabStatusMap:R})}),(0,a.jsxs)("div",{className:"flex-1 min-h-0 mx-4 mb-4 mt-2 flex flex-col overflow-hidden rounded-lg border border-border bg-card dark:rounded-none dark:border-0",children:[v&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 border-b border-border flex-shrink-0",children:[(0,a.jsx)("div",{ref:y,className:"flex flex-1 min-w-0 items-center gap-2"}),(0,a.jsx)(el,{mode:x,canSplit:m,onChange:h})]}),(0,a.jsxs)("div",{className:"flex-1 min-h-0 relative flex",children:[(0,a.jsxs)("div",{className:(0,es.cn)("min-w-0",et?"absolute inset-0":"relative flex-1 basis-0"),children:[t.map(t=>{let r=S.has(t.tab_id),o=t.tab_id===n;return r?(0,a.jsx)("div",{className:"absolute inset-0 flex flex-col",style:{visibility:o&&!et?"visible":"hidden",pointerEvents:o&&!et?"auto":"none"},children:(0,a.jsx)(ec.TerminalView,{ref:e=>{e?T.current.set(t.tab_id,e):T.current.delete(t.tab_id)},tabId:t.tab_id,isActive:o,cwd:e.worktreePath,launchAgent:"terminal"!==t.mode,mode:t.mode,className:"h-full overflow-hidden",initialTodos:t.todos,initialAgentStatus:t.status,onTodosUpdated:l,onStatusChange:O,toolbarContainer:b})},t.tab_id):null}),0===t.length&&(0,a.jsxs)("div",{className:(0,es.cn)("h-full flex flex-col items-center justify-center gap-4 px-4",et&&"invisible"),children:[(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"起動するタブを選んでください"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[(0,a.jsx)("span",{title:B.disabledReason,children:(0,a.jsxs)(P.Button,{onClick:M,disabled:!!B.disabledReason,children:[(0,a.jsx)(L.ClaudeIcon,{className:"w-4 h-4"}),"Claude Code"]})}),H&&(0,a.jsx)("span",{title:H.disabledReason,children:(0,a.jsxs)(P.Button,{variant:"outline",onClick:D,disabled:!!H.disabledReason,children:[(0,a.jsx)(L.CodexIcon,{className:"w-4 h-4"}),"Codex"]})}),Z&&(0,a.jsx)("span",{title:Z.disabledReason??`${(0,A.localLlmTabLabel)(Z.provider)}: ${Z.model}`,children:(0,a.jsxs)(P.Button,{variant:"outline",onClick:()=>void F(),disabled:!!Z.disabledReason,children:[(0,a.jsx)(L.LocalLlmTabIcon,{provider:Z.provider,className:"w-4 h-4"}),(0,A.localLlmTabLabel)(Z.provider)]})}),(0,a.jsxs)(P.Button,{variant:"outline",onClick:j,children:[(0,a.jsx)(g,{className:"w-4 h-4"}),"Terminal"]})]})]}),t.length>0&&!n&&(0,a.jsx)("div",{className:(0,es.cn)("h-full flex items-center justify-center text-muted-foreground text-sm",et&&"invisible"),children:"Select a tab to view terminal"})]}),"terminal"!==x&&(0,a.jsx)("div",{className:(0,es.cn)("flex-1 basis-0 min-w-0 relative",!et&&"border-l border-border"),children:(0,a.jsx)("div",{className:"absolute inset-0 flex flex-col",children:(0,a.jsx)(en,{draftId:n??null,draftIds:er,canSend:!!n&&R.get(n)?.terminal==="connected",onSend:(e,t)=>!!n&&(T.current.get(n)?.sendText(e,t)??!1)})})})]})]})]})});var eg=e.i(99059);e.s([],38727),e.i(38727),e.i(47167);var eh=e.i(67805);let ev=o.createContext(void 0);function ex(e){let t=o.useContext(ev);if(void 0===t&&!e)throw Error((0,eh.default)(33));return t}let eb=o.createContext(void 0);function ey(e){let t=o.useContext(eb);if(void 0===t&&!e)throw Error((0,eh.default)(36));return t}var eS=e.i(27601),eE=e.i(83590);let eR=o.forwardRef(function(e,t){let{className:n,render:r,...a}=e,{store:o}=ey(),{arrowRef:s,side:i,align:l,arrowUncentered:u,arrowStyles:c}=ex(),d=o.useState("open");return(0,eS.useRenderElement)("div",e,{ref:[s,t],stateAttributesMapping:eE.popupStateMapping,state:{open:d,side:i,align:l,uncentered:u},props:{style:c,"aria-hidden":!0,...a}})});var eC=e.i(84759);let ek=o.createContext(void 0);function ew(e=!0){let t=o.useContext(ek);if(void 0===t&&!e)throw Error((0,eh.default)(25));return t}var eT=e.i(3404);let eO={...eE.popupStateMapping,...eC.transitionStatusMapping},eI=o.forwardRef(function(e,t){let{className:n,render:r,...a}=e,{store:o}=ey(),s=o.useState("open"),i=o.useState("mounted"),l=o.useState("transitionStatus"),u=o.useState("lastOpenChangeReason"),c=ew();return(0,eS.useRenderElement)("div",e,{ref:c?.backdropRef?[t,c.backdropRef]:t,state:{open:s,transitionStatus:l},stateAttributesMapping:eO,props:[{role:"presentation",hidden:!i,style:{pointerEvents:u===eT.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},a]})});var eN=e.i(76477),ej=e.i(94349);let eM=o.createContext(void 0);var eP=e.i(26292),eL=e.i(91730),eA=e.i(19805),eD=e.i(57666);function e_(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:a,store:s,typingRef:i,itemRef:l,itemMetadata:u}=e,{events:c}=s.useState("floatingTreeRoot"),d=ew(!0),f=void 0!==d;return o.useMemo(()=>({id:r,role:"menuitem",tabIndex:n?0:-1,onKeyDown(e){" "===e.key&&i?.current&&e.preventDefault()},onMouseMove(e){a&&c.emit("itemhover",{nodeId:a,target:e.currentTarget})},onClick(e){t&&c.emit("close",{domEvent:e,reason:eT.REASONS.itemPress})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&1>=Math.abs(e.clientX-t.x)&&1>=Math.abs(e.clientY-t.y)||f&&!eD.isMac&&2===e.button)return}l.current&&s.context.allowMouseUpTriggerRef.current&&(!f||2===e.button)&&(!u||"regular-item"===u.type)&&l.current.click()}}),[t,n,r,c,a,s,i,l,d,f,u])}let eF={type:"regular-item"};function eU(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:a,store:s,typingRef:i=s.context.typingRef,nativeButton:l,itemMetadata:u,nodeId:c}=e,d=o.useRef(null),{getButtonProps:f,buttonRef:p}=(0,eL.useButton)({disabled:n,focusableWhenDisabled:!0,native:l,composite:!0}),m=e_({closeOnClick:t,highlighted:r,id:a,nodeId:c,store:s,typingRef:i,itemRef:d,itemMetadata:u}),g=o.useCallback(e=>(0,eA.mergeProps)(m,{onMouseEnter(){"submenu-trigger"===u.type&&u.setActive()}},e,f),[m,f,u]),h=(0,eP.useMergedRefs)(d,p);return o.useMemo(()=>({getItemProps:g,itemRef:h}),[g,h])}var eB=e.i(977);let ez=o.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}}),eH=((t={})[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t);function eV(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:a,index:s}=e,{register:i,unregister:l,subscribeMapChange:u,elementsRef:c,labelsRef:d,nextIndexRef:f}=o.useContext(ez),p=o.useRef(-1),[m,g]=o.useState(s??(a===eH.GuessFromOrder?()=>{if(-1===p.current){let e=f.current;f.current+=1,p.current=e}return p.current}:-1)),h=o.useRef(null),v=o.useCallback(e=>{if(h.current=e,-1!==m&&null!==e&&(c.current[m]=e,d)){let n=void 0!==t;d.current[m]=n?t:r?.current?.textContent??e.textContent}},[m,c,d,t,r]);return(0,eB.useIsoLayoutEffect)(()=>{if(null!=s)return;let e=h.current;if(e)return i(e,n),()=>{l(e)}},[s,i,l,n]),(0,eB.useIsoLayoutEffect)(()=>{if(null==s)return u(e=>{let t=h.current?e.get(h.current)?.index:null;null!=t&&g(t)})},[s,u,g]),o.useMemo(()=>({ref:v,index:m}),[m,v])}var eW=e.i(89879);let eK=((n={}).checked="data-checked",n.unchecked="data-unchecked",n.disabled="data-disabled",n.highlighted="data-highlighted",n),e$={checked:e=>e?{[eK.checked]:""}:{[eK.unchecked]:""},...eC.transitionStatusMapping};var eG=e.i(5963);let eY=o.forwardRef(function(e,t){let{render:n,className:r,id:s,label:i,nativeButton:l=!1,disabled:u=!1,closeOnClick:c=!1,checked:d,defaultChecked:f,onCheckedChange:p,...m}=e,g=eV({label:i}),h=ex(!0),v=(0,eW.useBaseUiId)(s),{store:x}=ey(),b=x.useState("isActive",g.index),y=x.useState("itemProps"),[S,E]=(0,ej.useControlled)({controlled:d,default:f??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:R,itemRef:C}=eU({closeOnClick:c,disabled:u,highlighted:b,id:v,store:x,nativeButton:l,nodeId:h?.nodeId,itemMetadata:eF}),k=o.useMemo(()=>({disabled:u,highlighted:b,checked:S}),[u,b,S]),w=(0,eN.useStableCallback)(e=>{let t={...(0,eG.createChangeEventDetails)(eT.REASONS.itemPress,e.nativeEvent),preventUnmountOnClose:()=>{}};p?.(!S,t),t.isCanceled||E(e=>!e)}),T=(0,eS.useRenderElement)("div",e,{state:k,stateAttributesMapping:e$,props:[y,{role:"menuitemcheckbox","aria-checked":S,onClick:w},m,R],ref:[C,t,g.ref]});return(0,a.jsx)(eM.Provider,{value:k,children:T})});var eq=e.i(88841),eJ=e.i(89269);let eX=o.forwardRef(function(e,t){let{render:n,className:r,keepMounted:a=!1,...s}=e,i=function(){let e=o.useContext(eM);if(void 0===e)throw Error((0,eh.default)(30));return e}(),l=o.useRef(null),{transitionStatus:u,setMounted:c}=(0,eq.useTransitionStatus)(i.checked);(0,eJ.useOpenChangeComplete)({open:i.checked,ref:l,onComplete(){i.checked||c(!1)}});let d={checked:i.checked,disabled:i.disabled,highlighted:i.highlighted,transitionStatus:u};return(0,eS.useRenderElement)("span",e,{state:d,ref:[t,l],stateAttributesMapping:e$,props:{"aria-hidden":!0,...s},enabled:a||i.checked})}),eQ=o.createContext(void 0),eZ=o.forwardRef(function(e,t){let{render:n,className:r,...s}=e,[i,l]=o.useState(void 0),u=o.useMemo(()=>({setLabelId:l}),[l]),c=(0,eS.useRenderElement)("div",e,{ref:t,props:{role:"group","aria-labelledby":i,...s}});return(0,a.jsx)(eQ.Provider,{value:u,children:c})}),e0=o.forwardRef(function(e,t){let{className:n,render:r,id:a,...s}=e,i=(0,eW.useBaseUiId)(a),{setLabelId:l}=function(){let e=o.useContext(eQ);if(void 0===e)throw Error((0,eh.default)(31));return e}();return(0,eB.useIsoLayoutEffect)(()=>(l(i),()=>{l(void 0)}),[l,i]),(0,eS.useRenderElement)("div",e,{ref:t,props:{id:i,role:"presentation",...s}})}),e1=o.forwardRef(function(e,t){let{render:n,className:r,id:a,label:o,nativeButton:s=!1,disabled:i=!1,closeOnClick:l=!0,...u}=e,c=eV({label:o}),d=ex(!0),f=(0,eW.useBaseUiId)(a),{store:p}=ey(),m=p.useState("isActive",c.index),g=p.useState("itemProps"),{getItemProps:h,itemRef:v}=eU({closeOnClick:l,disabled:i,highlighted:m,id:f,store:p,nativeButton:s,nodeId:d?.nodeId,itemMetadata:eF});return(0,eS.useRenderElement)("div",e,{state:{disabled:i,highlighted:m},props:[g,u,h],ref:[v,t,c.ref]})}),e2=o.forwardRef(function(e,t){let{render:n,className:r,id:a,label:s,closeOnClick:i=!1,...l}=e,u=o.useRef(null),c=eV({label:s}),d=ex(!0),f=d?.nodeId,p=(0,eW.useBaseUiId)(a),{store:m}=ey(),g=m.useState("isActive",c.index),h=m.useState("itemProps"),v=m.context.typingRef,{getButtonProps:x,buttonRef:b}=(0,eL.useButton)({native:!1,composite:!0}),y=e_({closeOnClick:i,highlighted:g,id:p,nodeId:f,store:m,typingRef:v,itemRef:u}),S=o.useMemo(()=>({highlighted:g}),[g]);return(0,eS.useRenderElement)("a",e,{state:S,props:[h,l,function(e){return(0,eA.mergeProps)(y,e,x)}],ref:[u,b,t,c.ref]})});var e5=e.i(88306),e8=e.i(61896),e3=e.i(60752),e4=e.i(92238),e6=e.i(18847);let e9={...eE.popupStateMapping,...eC.transitionStatusMapping},e7=o.forwardRef(function(e,t){let{render:n,className:r,finalFocus:s,...i}=e,{store:l}=ey(),{side:u,align:c}=ex(),d=null!=(0,e3.useToolbarRootContext)(!0),f=l.useState("open"),p=l.useState("transitionStatus"),m=l.useState("popupProps"),g=l.useState("mounted"),h=l.useState("instantType"),v=l.useState("activeTriggerElement"),x=l.useState("parent"),b=l.useState("lastOpenChangeReason"),y=l.useState("rootId"),S=l.useState("floatingRootContext"),E=l.useState("floatingTreeRoot"),R=l.useState("closeDelay"),C=l.useState("activeTriggerElement"),k="context-menu"===x.type;(0,eJ.useOpenChangeComplete)({open:f,ref:l.context.popupRef,onComplete(){f&&l.context.onOpenChangeComplete?.(!0)}}),o.useEffect(()=>{function e(e){l.setOpen(!1,(0,eG.createChangeEventDetails)(e.reason,e.domEvent))}return E.events.on("close",e),()=>{E.events.off("close",e)}},[E.events,l]);let w=l.useState("hoverEnabled"),T=l.useState("disabled");(0,e8.useHoverFloatingInteraction)(S,{enabled:w&&!T&&!k&&"menubar"!==x.type,closeDelay:R});let O={transitionStatus:p,side:u,align:c,open:f,nested:"menu"===x.type,instant:h},I=o.useCallback(e=>{l.set("popupElement",e)},[l]),N=(0,eS.useRenderElement)("div",e,{state:O,ref:[t,l.context.popupRef,I],stateAttributesMapping:e9,props:[m,{onKeyDown(e){d&&e4.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,e6.getDisabledMountTransitionStyles)(p),i,{"data-rootownerid":y}]}),j=void 0===x.type||k;return(v||"menubar"===x.type&&b!==eT.REASONS.outsidePress)&&(j=!0),(0,a.jsx)(e5.FloatingFocusManager,{context:S,modal:k,disabled:!g,returnFocus:void 0===s?j:s,initialFocus:"menu"!==x.type,restoreFocus:!0,externalTree:"menubar"!==x.type?E:void 0,previousFocusableElement:C,nextFocusableElement:void 0===x.type?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===x.type?l.context.beforeContentFocusGuardRef:void 0,children:N})});var te=e.i(37692);let tt=o.createContext(void 0),tn=o.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:o}=ey();return o.useState("mounted")||n?(0,a.jsx)(tt.Provider,{value:n,children:(0,a.jsx)(te.FloatingPortal,{ref:t,...r})}):null});var tr=e.i(58130),ta=e.i(66745),to=e.i(51665),ts=e.i(56590),ti=e.i(30628);function tl(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,i=(0,eN.useStableCallback)(s),l=o.useRef(0),u=(0,ti.useRefWithInit)(tc).current,c=(0,ti.useRefWithInit)(tu).current,[d,f]=o.useState(0),p=o.useRef(d),m=(0,eN.useStableCallback)((e,t)=>{c.set(e,t??null),p.current+=1,f(p.current)}),g=(0,eN.useStableCallback)(e=>{c.delete(e),p.current+=1,f(p.current)}),h=o.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(td).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,d]);(0,eB.useIsoLayoutEffect)(()=>{if("function"!=typeof MutationObserver||0===h.size)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(p.current+=1,f(p.current))});return h.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[h]),(0,eB.useIsoLayoutEffect)(()=>{p.current===d&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),l.current=h.size),i(h)},[i,h,n,r,d]),(0,eB.useIsoLayoutEffect)(()=>()=>{n.current=[]},[n]),(0,eB.useIsoLayoutEffect)(()=>()=>{r&&(r.current=[])},[r]);let v=(0,eN.useStableCallback)(e=>(u.add(e),()=>{u.delete(e)}));(0,eB.useIsoLayoutEffect)(()=>{u.forEach(e=>e(h))},[u,h]);let x=o.useMemo(()=>({register:m,unregister:g,subscribeMapChange:v,elementsRef:n,labelsRef:r,nextIndexRef:l}),[m,g,v,n,r,l]);return(0,a.jsx)(ez.Provider,{value:x,children:t})}function tu(){return new Map}function tc(){return new Set}function td(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var tf=e.i(36893),tp=e.i(7335),tm=e.i(67569),tg=e.i(77817);let th=o.forwardRef(function(e,t){let{anchor:n,positionMethod:r="absolute",className:s,render:i,side:l,align:u,sideOffset:c=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:h=!1,collisionAvoidance:v=tp.DROPDOWN_COLLISION_AVOIDANCE,...x}=e,{store:b}=ey(),y=function(){let e=o.useContext(tt);if(void 0===e)throw Error((0,eh.default)(32));return e}(),S=ew(!0),E=b.useState("parent"),R=b.useState("floatingRootContext"),C=b.useState("floatingTreeRoot"),k=b.useState("mounted"),w=b.useState("open"),T=b.useState("modal"),O=b.useState("activeTriggerElement"),I=b.useState("transitionStatus"),N=b.useState("positionerElement"),j=b.useState("instantType"),M=b.useState("hasViewport"),P=b.useState("lastOpenChangeReason"),L=b.useState("floatingNodeId"),A=b.useState("floatingParentNodeId"),D=R.useState("domReferenceElement"),_=o.useRef(null),F=(0,tg.useAnimationsFinished)(N,!1,!1),U=n,B=c,z=d,H=u,V=v;"context-menu"===E.type&&(U=n??E.context?.anchor,H=H??"start",l||"center"===H||(z=e.alignOffset??2,B=e.sideOffset??-5));let W=l,K=H;"menu"===E.type?(W=W??"inline-end",K=K??"start",V=e.collisionAvoidance??tp.POPUP_COLLISION_AVOIDANCE):"menubar"===E.type&&(W=W??"bottom",K=K??"start");let $="context-menu"===E.type,G=(0,ts.useAnchorPositioning)({anchor:U,floatingRootContext:R,positionMethod:S?"fixed":r,mounted:k,side:W,sideOffset:B,align:K,alignOffset:z,arrowPadding:$?0:m,collisionBoundary:f,collisionPadding:p,sticky:g,nodeId:L,keepMounted:y,disableAnchorTracking:h,collisionAvoidance:V,shiftCrossAxis:$&&!("side"in V&&"flip"===V.side),externalTree:C,adaptiveOrigin:M?tm.adaptiveOrigin:void 0}),Y=o.useMemo(()=>{let e={};return w||(e.pointerEvents="none"),{role:"presentation",hidden:!k,style:{...G.positionerStyles,...e}}},[w,k,G.positionerStyles]);o.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===L&&b.set("hoverEnabled",!1),e.nodeId!==L&&e.parentNodeId===b.select("floatingParentNodeId")&&b.setOpen(!1,(0,eG.createChangeEventDetails)(eT.REASONS.siblingOpen)))}return C.events.on("menuopenchange",e),()=>{C.events.off("menuopenchange",e)}},[b,C.events,L]),o.useEffect(()=>{if(null!=b.select("floatingParentNodeId"))return C.events.on("menuopenchange",e),()=>{C.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==b.select("floatingParentNodeId"))return;let t=e.reason??eT.REASONS.siblingOpen;b.setOpen(!1,(0,eG.createChangeEventDetails)(t))}},[C.events,b]);let q=(0,ta.useTimeout)();o.useEffect(()=>{w||q.clear()},[w,q]),o.useEffect(()=>{function e(e){if(w&&e.nodeId===b.select("floatingParentNodeId"))if(e.target&&O&&O!==e.target){let e=b.select("closeDelay");e>0?q.isStarted()||q.start(e,()=>{b.setOpen(!1,(0,eG.createChangeEventDetails)(eT.REASONS.siblingOpen))}):b.setOpen(!1,(0,eG.createChangeEventDetails)(eT.REASONS.siblingOpen))}else q.clear()}return C.events.on("itemhover",e),()=>{C.events.off("itemhover",e)}},[C.events,w,O,b,q]),o.useEffect(()=>{let e={open:w,nodeId:L,parentNodeId:A,reason:b.select("lastOpenChangeReason")};C.events.emit("menuopenchange",e)},[C.events,w,b,L,A]),(0,eB.useIsoLayoutEffect)(()=>{let e=_.current;if(D&&(_.current=D),e&&D&&D!==e){b.set("instantType",void 0);let e=new AbortController;return F(()=>{b.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[D,F,b]);let J={open:w,side:G.side,align:G.align,anchorHidden:G.anchorHidden,nested:"menu"===E.type,instant:j},X=o.useMemo(()=>({side:G.side,align:G.align,arrowRef:G.arrowRef,arrowUncentered:G.arrowUncentered,arrowStyles:G.arrowStyles,nodeId:G.context.nodeId}),[G.side,G.align,G.arrowRef,G.arrowUncentered,G.arrowStyles,G.context.nodeId]),Q=(0,eS.useRenderElement)("div",e,{state:J,stateAttributesMapping:eE.popupStateMapping,ref:[t,b.useStateSetter("positionerElement")],props:[Y,(0,e6.getDisabledMountTransitionStyles)(I),x]}),Z=k&&"menu"!==E.type&&("menubar"!==E.type&&T&&P!==eT.REASONS.triggerHover||"menubar"===E.type&&E.context.modal),ee=null;return"menubar"===E.type?ee=E.context.contentElement:void 0===E.type&&(ee=O),(0,a.jsxs)(ev.Provider,{value:X,children:[Z&&(0,a.jsx)(tf.InternalBackdrop,{ref:"context-menu"===E.type||"nested-context-menu"===E.type?E.context.internalBackdropRef:null,inert:(0,tr.inertValue)(!w),cutout:ee}),(0,a.jsx)(to.FloatingNode,{id:L,children:(0,a.jsx)(tl,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:Q})})]})}),tv=o.createContext(void 0),tx=o.memo(o.forwardRef(function(e,t){let{render:n,className:r,value:s,defaultValue:i,onValueChange:l,disabled:u=!1,...c}=e,[d,f]=(0,ej.useControlled)({controlled:s,default:i,name:"MenuRadioGroup"}),p=(0,eN.useStableCallback)(l),m=(0,eN.useStableCallback)((e,t)=>{p?.(e,t),t.isCanceled||f(e)}),g=(0,eS.useRenderElement)("div",e,{state:{disabled:u},ref:t,props:{role:"group","aria-disabled":u||void 0,...c}}),h=o.useMemo(()=>({value:d,setValue:m,disabled:u}),[d,m,u]);return(0,a.jsx)(tv.Provider,{value:h,children:g})})),tb=o.createContext(void 0),ty=o.forwardRef(function(e,t){let{render:n,className:r,id:s,label:i,nativeButton:l=!1,disabled:u=!1,closeOnClick:c=!1,value:d,...f}=e,p=eV({label:i}),m=ex(!0),g=(0,eW.useBaseUiId)(s),{store:h}=ey(),v=h.useState("isActive",p.index),x=h.useState("itemProps"),{value:b,setValue:y,disabled:S}=function(){let e=o.useContext(tv);if(void 0===e)throw Error((0,eh.default)(34));return e}(),E=S||u,R=b===d,{getItemProps:C,itemRef:k}=eU({closeOnClick:c,disabled:E,highlighted:v,id:g,store:h,nativeButton:l,nodeId:m?.nodeId,itemMetadata:eF}),w=o.useMemo(()=>({disabled:E,highlighted:v,checked:R}),[E,v,R]),T=(0,eN.useStableCallback)(e=>{y(d,{...(0,eG.createChangeEventDetails)(eT.REASONS.itemPress,e.nativeEvent),preventUnmountOnClose:()=>{}})}),O=(0,eS.useRenderElement)("div",e,{state:w,stateAttributesMapping:e$,props:[x,{role:"menuitemradio","aria-checked":R,onClick:T},f,C],ref:[k,t,p.ref]});return(0,a.jsx)(tb.Provider,{value:w,children:O})}),tS=o.forwardRef(function(e,t){let{render:n,className:r,keepMounted:a=!1,...s}=e,i=function(){let e=o.useContext(tb);if(void 0===e)throw Error((0,eh.default)(35));return e}(),l=o.useRef(null),{transitionStatus:u,setMounted:c}=(0,eq.useTransitionStatus)(i.checked);(0,eJ.useOpenChangeComplete)({open:i.checked,ref:l,onComplete(){i.checked||c(!1)}});let d={checked:i.checked,disabled:i.disabled,highlighted:i.highlighted,transitionStatus:u};return(0,eS.useRenderElement)("span",e,{state:d,stateAttributesMapping:e$,ref:[t,l],props:{"aria-hidden":!0,...s},enabled:a||i.checked})});var tE=e.i(83799),tR=e.i(58509),tC=e.i(66196),tk=e.i(17514),tw=e.i(3851),tT=e.i(33605),tO=e.i(89633),tI=e.i(29315),tN=e.i(231),tj=e.i(90219),tM=e.i(47857),tP=e.i(82033),tL=e.i(43801),tA=e.i(98442),tD=e.i(494);function t_(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function tF(e,t){return t_(t,e===tD.ARROW_UP||e===tD.ARROW_DOWN,e===tD.ARROW_LEFT||e===tD.ARROW_RIGHT)}function tU(e,t,n){return t_(t,e===tD.ARROW_DOWN,n?e===tD.ARROW_LEFT:e===tD.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}var tB=e.i(26665),tz=e.i(6157);let tH=o.createContext(null);function tV(e){let t=o.useContext(tH);if(null===t&&!e)throw Error((0,eh.default)(5));return t}var tW=e.i(79144),tK=e.i(50091),t$=e.i(83921),tG=e.i(98263),tY=e.i(89429),tq=e.i(628),tJ=e.i(69375);let tX={...tq.popupStoreSelectors,disabled:(0,t$.createSelector)(e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled),modal:(0,t$.createSelector)(e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0)),allowMouseEnter:(0,t$.createSelector)(e=>e.allowMouseEnter),stickIfOpen:(0,t$.createSelector)(e=>e.stickIfOpen),parent:(0,t$.createSelector)(e=>e.parent),rootId:(0,t$.createSelector)(e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId),activeIndex:(0,t$.createSelector)(e=>e.activeIndex),isActive:(0,t$.createSelector)((e,t)=>e.activeIndex===t),hoverEnabled:(0,t$.createSelector)(e=>e.hoverEnabled),instantType:(0,t$.createSelector)(e=>e.instantType),lastOpenChangeReason:(0,t$.createSelector)(e=>e.openChangeReason),floatingTreeRoot:(0,t$.createSelector)(e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:(0,t$.createSelector)(e=>e.floatingNodeId),floatingParentNodeId:(0,t$.createSelector)(e=>e.floatingParentNodeId),itemProps:(0,t$.createSelector)(e=>e.itemProps),closeDelay:(0,t$.createSelector)(e=>e.closeDelay),hasViewport:(0,t$.createSelector)(e=>e.hasViewport),keyboardEventRelay:(0,t$.createSelector)(e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0)};class tQ extends tG.ReactStore{constructor(e){super({...{...(0,tq.createInitialPopupStoreState)(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new tY.FloatingTreeStore,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:tk.EMPTY_OBJECT,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1},...e},{positionerRef:o.createRef(),popupRef:o.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:o.createRef(),beforeContentFocusGuardRef:o.createRef(),onOpenChangeComplete:void 0,triggerElements:new tJ.PopupTriggerMap},tX),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");this.unsubscribeParentListener=e.store.subscribe(()=>{let a=e.store.select("rootId"),o=e.store.select("floatingTreeRoot"),s=e.store.select("keyboardEventRelay");(t!==a||n!==o||r!==s)&&(t=a,n=o,r=s,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){let n=(0,ti.useRefWithInit)(()=>new tQ(t)).current;return e??n}unsubscribeParentListener=null}var tZ=e.i(58642);let t0=o.createContext(void 0);function t1(){return o.useContext(t0)}let t2=(0,tw.fastComponent)(function(e){let t,n,{children:r,open:s,onOpenChange:i,onOpenChangeComplete:l,defaultOpen:u=!1,disabled:c=!1,modal:d,loopFocus:f=!0,orientation:p="vertical",actionsRef:m,closeParentOnEsc:g=!1,handle:h,triggerId:v,defaultTriggerId:x=null,highlightItemOnHover:b=!0}=e,y=ew(!0),S=ey(!0),E=tV(!0),R=t1(),C=o.useMemo(()=>R&&S?{type:"menu",store:S.store}:E?{type:"menubar",context:E}:y&&!S?{type:"context-menu",context:y}:{type:void 0},[y,S,E,R]),k=tQ.useStore(h?.store,{open:u,openProp:s,activeTriggerId:x,triggerIdProp:v,parent:C});(0,tR.useOnFirstRender)(()=>{void 0===s&&!1===k.state.open&&!0===u&&k.update({open:!0,activeTriggerId:x})}),k.useControlledProp("openProp",s),k.useControlledProp("triggerIdProp",v),k.useContextCallback("onOpenChangeComplete",l);let w=k.useState("floatingTreeRoot"),T=(0,to.useFloatingNodeId)(w),O=(0,to.useFloatingParentNodeId)();(0,eB.useIsoLayoutEffect)(()=>{y&&!S?k.update({parent:{type:"context-menu",context:y},floatingNodeId:T,floatingParentNodeId:O}):S&&k.update({floatingNodeId:T,floatingParentNodeId:O})},[y,S,T,O,k]);let I=k.useState("open"),N=k.useState("activeTriggerElement"),j=k.useState("positionerElement"),M=k.useState("hoverEnabled"),P=k.useState("modal"),L=k.useState("disabled"),A=k.useState("lastOpenChangeReason"),D=k.useState("parent"),_=k.useState("activeIndex"),F=k.useState("payload"),U=k.useState("floatingParentNodeId"),B=o.useRef(null),z=null!=U;k.useSyncedValues({disabled:c,modal:void 0===D.type?d:void 0,rootId:(0,tE.useId)()});let{openMethod:H,triggerProps:V}=(0,tK.useOpenInteractionType)(I);(0,tZ.useImplicitActiveTrigger)(k);let{forceUnmount:W}=(0,tZ.useOpenStateTransitions)(I,k,()=>{k.update({allowMouseEnter:!1,stickIfOpen:!0})}),K=o.useRef("context-menu"!==D.type),$=(0,ta.useTimeout)();o.useEffect(()=>{if(I||(B.current=null),"context-menu"===D.type){if(!I){$.clear(),K.current=!1;return}$.start(500,()=>{K.current=!0})}},[$,I,D.type]),(0,tC.useScrollLock)(I&&P&&A!==eT.REASONS.triggerHover&&"touch"!==H,j),(0,eB.useIsoLayoutEffect)(()=>{I||M||k.set("hoverEnabled",!0)},[I,M,k]);let G=o.useRef(!0),Y=(0,ta.useTimeout)(),q=(0,eN.useStableCallback)((e,n)=>{let r=n.reason;if(I===e&&n.trigger===N&&A===r||(n.preventUnmountOnClose=()=>{k.set("preventUnmountingOnClose",!0)},e||null!=n.trigger||(n.trigger=N??void 0),i?.(e,n),n.isCanceled))return;let a={open:e,nativeEvent:n.event,reason:n.reason,nested:z};t?.emit("openchange",a);let o=n.event;if(!1===e&&o?.type==="click"&&"touch"===o.pointerType&&!G.current)return;if(!e&&null!==_){let e=k.context.itemDomElements.current[_];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}e&&r===eT.REASONS.triggerFocus?(G.current=!1,Y.start(300,()=>{G.current=!0})):(G.current=!0,Y.clear());let s=(r===eT.REASONS.triggerPress||r===eT.REASONS.itemPress)&&0===o.detail&&o?.isTrusted,l=!e&&(r===eT.REASONS.escapeKey||null==r),u={open:e,openChangeReason:r};B.current=n.event??null;let c=n.trigger?.id??null;(c||e)&&(u.activeTriggerId=c,u.activeTriggerElement=n.trigger??null),k.update(u),"menubar"===D.type&&(r===eT.REASONS.triggerFocus||r===eT.REASONS.focusOut||r===eT.REASONS.triggerHover||r===eT.REASONS.listNavigation||r===eT.REASONS.siblingOpen)?k.set("instantType","group"):s||l?k.set("instantType",s?"click":"dismiss"):k.set("instantType",void 0)}),J=o.useCallback(e=>{let t=(0,eG.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{k.set("preventUnmountingOnClose",!0)},t},[k]),X=o.useCallback(()=>{k.setOpen(!1,J(eT.REASONS.imperativeAction))},[k,J]);o.useImperativeHandle(m,()=>({unmount:W,close:X}),[W,X]),"context-menu"===D.type&&(n=D.context),o.useImperativeHandle(n?.positionerRef,()=>j,[j]),o.useImperativeHandle(n?.actionsRef,()=>({setOpen:q}),[q]);let Q=(0,tz.useSyncedFloatingRootContext)({popupStore:k,onOpenChange:q});t=Q.context.events,o.useEffect(()=>{let e=({open:e,eventDetails:t})=>q(e,t);return t.on("setOpen",e),()=>{t?.off("setOpen",e)}},[t,q]);let Z=(0,tT.useDismiss)(Q,{enabled:!L,bubbles:{escapeKey:g&&"menu"===D.type},outsidePress:()=>"context-menu"!==D.type||B.current?.type==="contextmenu"||K.current,externalTree:z?w:void 0}),ee=(0,tB.useRole)(Q,{role:"menu"}),et=(0,tW.useDirection)(),en=o.useCallback(e=>{k.select("activeIndex")!==e&&k.set("activeIndex",e)},[k]),er=function(e,t){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),a=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{listRef:l,activeIndex:u,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:m=!1,nested:g=!1,rtl:h=!1,virtual:v=!1,focusItemOnOpen:x="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:y=!0,disabledIndices:S,orientation:E="vertical",parentOrientation:R,cols:C=1,id:k,resetOnPointerLeave:w=!0,externalTree:T}=t,O=(0,tM.getFloatingFocusElement)(a),I=(0,tN.useValueAsRef)(O),N=(0,to.useFloatingParentNodeId)(),j=(0,to.useFloatingTree)(T);(0,eB.useIsoLayoutEffect)(()=>{i.current.orientation=E},[i,E]);let M=(0,tM.isTypeableCombobox)(s),P=o.useRef(x),L=o.useRef(f??-1),A=o.useRef(null),D=o.useRef(!0),_=(0,eN.useStableCallback)(e=>{c(-1===L.current?null:L.current,e)}),F=o.useRef(_),U=o.useRef(!!a),B=o.useRef(r),z=o.useRef(!1),H=o.useRef(!1),V=(0,tN.useValueAsRef)(S),W=(0,tN.useValueAsRef)(r),K=(0,tN.useValueAsRef)(f),$=(0,tN.useValueAsRef)(w),G=(0,eN.useStableCallback)(()=>{function e(e){v?j?.events.emit("virtualfocus",e):(0,tA.enqueueFocus)(e,{sync:z.current,preventScroll:!0})}let t=l.current[L.current],n=H.current;t&&e(t),(z.current?e=>e():requestAnimationFrame)(()=>{let r=l.current[L.current]||t;!r||(t||e(r),q&&(n||!D.current)&&r.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,eB.useIsoLayoutEffect)(()=>{d&&(r&&a?(L.current=f??-1,P.current&&null!=f&&(H.current=!0,_())):U.current&&(L.current=-1,F.current()))},[d,r,a,f,_]),(0,eB.useIsoLayoutEffect)(()=>{if(d){if(!r){z.current=!1;return}if(a)if(null==u){if(z.current=!1,null!=K.current)return;if(U.current&&(L.current=-1,G()),(!B.current||!U.current)&&P.current&&(null!=A.current||!0===P.current&&null==A.current)){let e=0,t=()=>{null==l.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(L.current=null==A.current||tU(A.current,E,h)||g?(0,tL.getMinListIndex)(l):(0,tL.getMaxListIndex)(l),A.current=null,_())};t()}}else(0,tL.isIndexOutOfListBounds)(l,u)||(L.current=u,G(),H.current=!1)}},[d,r,a,u,K,g,l,E,h,_,G,V]),(0,eB.useIsoLayoutEffect)(()=>{if(!d||a||!j||v||!U.current)return;let e=j.nodesRef.current,t=e.find(e=>e.id===N)?.context?.elements.floating,n=(0,tM.activeElement)((0,tj.ownerDocument)(a)),r=e.some(e=>e.context&&(0,tM.contains)(e.context.elements.floating,n));t&&!r&&D.current&&t.focus({preventScroll:!0})},[d,a,j,N,v]),(0,eB.useIsoLayoutEffect)(()=>{F.current=_,B.current=r,U.current=!!a}),(0,eB.useIsoLayoutEffect)(()=>{r||(A.current=null,P.current=x)},[r,x]);let Y=null!=u,q=o.useMemo(()=>{function e(e){if(!W.current)return;let t=l.current.indexOf(e.currentTarget);-1!==t&&L.current!==t&&(L.current=t,_(e))}return{onFocus(t){z.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){z.current=!0,H.current=!1,b&&e(t)},onPointerLeave(e){if(!W.current||!D.current||"touch"===e.pointerType)return;z.current=!0;let t=e.relatedTarget;if(!(!b||l.current.includes(t))&&$.current&&((0,tA.enqueueFocus)(null,{sync:!0}),L.current=-1,_(e),!v)){let e=I.current,t=(0,tM.activeElement)((0,tj.ownerDocument)(e));e&&(0,tM.contains)(e,t)&&e.focus({preventScroll:!0})}}}},[W,I,b,l,_,$,v]),J=o.useCallback(()=>R??j?.nodesRef.current.find(e=>e.id===N)?.context?.dataRef?.current.orientation,[N,j,R]),X=(0,eN.useStableCallback)(e=>{var t;let a,o;if(D.current=!1,z.current=!0,229===e.which||!W.current&&e.currentTarget===I.current)return;if(g&&(t=e.key,a=h?t===tD.ARROW_RIGHT:t===tD.ARROW_LEFT,o=t===tD.ARROW_UP,"both"===E||"horizontal"===E&&C&&C>1?"Escape"===t:t_(E,a,o))){tF(e.key,J())||(0,tP.stopEvent)(e),n.setOpen(!1,(0,eG.createChangeEventDetails)(eT.REASONS.listNavigation,e.nativeEvent)),(0,tI.isHTMLElement)(s)&&(v?j?.events.emit("virtualfocus",s):s.focus());return}let i=L.current,u=(0,tL.getMinListIndex)(l,S),c=(0,tL.getMaxListIndex)(l,S);if(M||("Home"===e.key&&((0,tP.stopEvent)(e),L.current=u,_(e)),"End"===e.key&&((0,tP.stopEvent)(e),L.current=c,_(e))),C>1){let t=Array.from({length:l.current.length},()=>({width:1,height:1})),n=(0,tL.createGridCellMap)(t,C,!1),r=n.findIndex(e=>null!=e&&!(0,tL.isListIndexDisabled)(l,e,S)),a=n.reduce((e,t,n)=>null==t||(0,tL.isListIndexDisabled)(l,t,S)?e:n,-1),o=n[(0,tL.getGridNavigatedIndex)({current:n.map(e=>null!=e?l.current[e]:null)},{event:e,orientation:E,loopFocus:m,rtl:h,cols:C,disabledIndices:(0,tL.getGridCellIndices)([...("function"!=typeof S?S:null)||l.current.map((e,t)=>(0,tL.isListIndexDisabled)(l,t,S)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:(0,tL.getGridCellIndexOfCorner)(L.current>c?u:L.current,t,n,C,e.key===tD.ARROW_DOWN?"bl":e.key===(h?tD.ARROW_LEFT:tD.ARROW_RIGHT)?"tr":"tl"),stopEvent:!0})];if(null!=o&&(L.current=o,_(e)),"both"===E)return}if(tF(e.key,E)){if((0,tP.stopEvent)(e),r&&!v&&(0,tM.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){L.current=tU(e.key,E,h)?u:c,_(e);return}tU(e.key,E,h)?m?i>=c?p&&i!==l.current.length?L.current=-1:(z.current=!1,L.current=u):L.current=(0,tL.findNonDisabledListIndex)(l,{startingIndex:i,disabledIndices:S}):L.current=Math.min(c,(0,tL.findNonDisabledListIndex)(l,{startingIndex:i,disabledIndices:S})):m?i<=u?p&&-1!==i?L.current=l.current.length:(z.current=!1,L.current=c):L.current=(0,tL.findNonDisabledListIndex)(l,{startingIndex:i,decrement:!0,disabledIndices:S}):L.current=Math.max(u,(0,tL.findNonDisabledListIndex)(l,{startingIndex:i,decrement:!0,disabledIndices:S})),(0,tL.isIndexOutOfListBounds)(l,L.current)&&(L.current=-1),_(e)}}),Q=o.useMemo(()=>v&&r&&Y&&{"aria-activedescendant":`${k}-${u}`},[v,r,Y,k,u]),Z=o.useMemo(()=>({"aria-orientation":"both"===E?void 0:E,...!M?Q:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&r&&!v){let t=(0,tM.getTarget)(e.nativeEvent);if(t&&!(0,tM.contains)(I.current,t))return;(0,tP.stopEvent)(e),n.setOpen(!1,(0,eG.createChangeEventDetails)(eT.REASONS.focusOut,e.nativeEvent)),(0,tI.isHTMLElement)(s)&&s.focus();return}X(e)},onPointerMove(){D.current=!0}}),[Q,X,I,E,M,n,r,v,s]),ee=o.useMemo(()=>{function e(e){"auto"===x&&(0,tP.isVirtualClick)(e.nativeEvent)&&(P.current=!v)}function t(e){P.current=x,"auto"===x&&(0,tP.isVirtualPointerEvent)(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(e){var t,r;let a=n.select("open");D.current=!1;let o=e.key.startsWith("Arrow"),s=(t=e.key,r=J(),t_(r,h?t===tD.ARROW_LEFT:t===tD.ARROW_RIGHT,t===tD.ARROW_DOWN)),i=tF(e.key,E),u=(g?s:i)||"Enter"===e.key||""===e.key.trim();if(v&&a)return X(e);if(a||y||!o){if(u){let t=tF(e.key,J());A.current=g&&t?null:e.key}if(g){s&&((0,tP.stopEvent)(e),a?(L.current=(0,tL.getMinListIndex)(l,V.current),_(e)):n.setOpen(!0,(0,eG.createChangeEventDetails)(eT.REASONS.listNavigation,e.nativeEvent,e.currentTarget)));return}i&&(null!=K.current&&(L.current=K.current),(0,tP.stopEvent)(e),!a&&y?n.setOpen(!0,(0,eG.createChangeEventDetails)(eT.REASONS.listNavigation,e.nativeEvent,e.currentTarget)):X(e),a&&_(e))}},onFocus(e){n.select("open")&&!v&&(L.current=-1,_(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[X,V,x,l,g,_,n,y,E,J,h,K,v]),et=o.useMemo(()=>({...Q,...ee}),[Q,ee]);return o.useMemo(()=>d?{reference:et,floating:Z,item:q,trigger:ee}:{},[d,et,Z,ee,q])}(Q,{enabled:!L,listRef:k.context.itemDomElements,activeIndex:_,nested:void 0!==D.type,loopFocus:f,orientation:p,parentOrientation:"menubar"===D.type?D.context.orientation:void 0,rtl:"rtl"===et,disabledIndices:tk.EMPTY_ARRAY,onNavigate:en,openOnArrowKeyDown:"context-menu"!==D.type,externalTree:z?w:void 0,focusItemOnHover:b}),ea=o.useCallback(e=>{k.context.typingRef.current=e},[k]),eo=function(e,t){let n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,a=n.useState("open"),{listRef:s,elementsRef:i,activeIndex:l,onMatch:u,onTypingChange:c,enabled:d=!0,resetMs:f=750,selectedIndex:p=null}=t,m=(0,ta.useTimeout)(),g=o.useRef(""),h=o.useRef(p??l??-1),v=o.useRef(null);(0,eB.useIsoLayoutEffect)(()=>{(a||null===p)&&(m.clear(),v.current=null,""!==g.current&&(g.current=""))},[a,p,m]),(0,eB.useIsoLayoutEffect)(()=>{a&&""===g.current&&(h.current=p??l??-1)},[a,p,l]);let x=(0,eN.useStableCallback)(e=>{e?r.current.typing||(r.current.typing=e,c?.(e)):r.current.typing&&(r.current.typing=e,c?.(e))}),b=(0,eN.useStableCallback)(e=>{function t(e,n,r=0){if(0===e.length)return -1;let a=(r%e.length+e.length)%e.length,o=n.toLocaleLowerCase();for(let t=0;t<e.length;t+=1){let n=(a+t)%e.length,r=e[n];if(r?.toLocaleLowerCase().startsWith(o)&&function(e){let t=i?.current[e];return!t||(0,tL.isElementVisible)(t)}(n))return n}return -1}let n=s.current;if(g.current.length>0&&" "===e.key&&((0,tP.stopEvent)(e),x(!0)),g.current.length>0&&" "!==g.current[0]&&-1===t(n,g.current)&&" "!==e.key&&x(!1),null==n||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;a&&" "!==e.key&&((0,tP.stopEvent)(e),x(!0));let r=""===g.current;r&&(h.current=p??l??-1),n.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&g.current===e.key&&(g.current="",h.current=v.current),g.current+=e.key,m.start(f,()=>{g.current="",h.current=v.current,x(!1)});let o=r?p??l??-1:h.current,c=t(n,g.current,(o??0)+1);-1!==c?(u?.(c),v.current=c):" "!==e.key&&(g.current="",x(!1))}),y=(0,eN.useStableCallback)(e=>{let t=e.relatedTarget,r=n.select("domReferenceElement"),a=n.select("floatingElement"),o=(0,tM.contains)(r,t),s=(0,tM.contains)(a,t);o||s||(m.clear(),g.current="",h.current=v.current,x(!1))}),S=o.useMemo(()=>({onKeyDown:b,onBlur:y}),[b,y]),E=o.useMemo(()=>({onKeyDown:b,onBlur:y}),[b,y]);return o.useMemo(()=>d?{reference:S,floating:E}:{},[d,S,E])}(Q,{listRef:k.context.itemLabels,elementsRef:k.context.itemDomElements,activeIndex:_,resetMs:tp.TYPEAHEAD_RESET_MS,onMatch:e=>{I&&e!==_&&k.set("activeIndex",e)},onTypingChange:ea}),{getReferenceProps:es,getFloatingProps:ei,getItemProps:el,getTriggerProps:eu}=(0,tO.useInteractions)([Z,ee,er,eo]),ec=o.useMemo(()=>{let e=(0,eA.mergeProps)(es(),{onMouseMove(){k.set("allowMouseEnter",!0)}},V);return delete e.role,e},[es,k,V]),ed=o.useMemo(()=>{let e=eu();if(!e)return e;let t=(0,eA.mergeProps)(e,V);return delete t.role,delete t["aria-controls"],t},[eu,V]),ef=o.useMemo(()=>ei({onMouseMove(){k.set("allowMouseEnter",!0),"menu"===D.type&&k.set("hoverEnabled",!1)},onClick(){k.select("hoverEnabled")&&k.set("hoverEnabled",!1)},onKeyDown(e){let t=k.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}}),[ei,D.type,k]),ep=o.useMemo(()=>el(),[el]);k.useSyncedValues({floatingRootContext:Q,activeTriggerProps:ec,inactiveTriggerProps:ed,popupProps:ef,itemProps:ep});let em=o.useMemo(()=>({store:k,parent:C}),[k,C]),eg=(0,a.jsx)(eb.Provider,{value:em,children:"function"==typeof r?r({payload:F}):r});return void 0===D.type||"context-menu"===D.type?(0,a.jsx)(to.FloatingTree,{externalTree:w,children:eg}):eg});var t5=e.i(74080),t8=e.i(37287),t3=e.i(4012),t4=e.i(32652);let t6=eD.isMac&&eD.isSafari;var t9=e.i(97254),t7=e.i(59266),ne=e.i(54694);function nt(e){let{render:t,className:n,state:r=tk.EMPTY_OBJECT,props:a=tk.EMPTY_ARRAY,refs:s=tk.EMPTY_ARRAY,metadata:i,stateAttributesMapping:l,tag:u="div",...c}=e,{compositeProps:d,compositeRef:f}=function(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=(0,ne.useCompositeRootContext)(),{ref:a,index:s}=eV(e),i=n===s,l=o.useRef(null),u=(0,eP.useMergedRefs)(a,l);return{compositeProps:o.useMemo(()=>({tabIndex:i?0:-1,onFocus(){r(s)},onMouseMove(){let e=l.current;if(!t||!e)return;let n=e.hasAttribute("disabled")||"true"===e.ariaDisabled;i||n||e.focus()}}),[i,r,s,t]),compositeRef:u,index:s}}({metadata:i});return(0,eS.useRenderElement)(u,e,{state:r,ref:[...s,f],props:[d,...a,c],stateAttributesMapping:l})}var nn=e.i(72408);let nr=(0,tw.fastComponentRef)(function(e,t){let n,r,s,{render:i,className:l,disabled:u=!1,nativeButton:c=!0,id:d,openOnHover:f,delay:p=100,closeDelay:m=0,handle:g,payload:h,...v}=e,x=ey(!0),b=g?.store??x?.store;if(!b)throw Error((0,eh.default)(85));let y=(0,eW.useBaseUiId)(d),S=b.useState("isTriggerActive",y),E=b.useState("floatingRootContext"),R=b.useState("isOpenedByTrigger",y),C=o.useRef(null),k=(n=ew(!0),r=ey(!0),s=tV(!0),o.useMemo(()=>s?{type:"menubar",context:s}:n&&!r?{type:"context-menu",context:n}:{type:void 0},[n,r,s])),w=(0,ne.useCompositeRootContext)(!0),T=(0,to.useFloatingTree)(),O=o.useMemo(()=>T??new tY.FloatingTreeStore,[T]),I=(0,to.useFloatingNodeId)(O),N=(0,to.useFloatingParentNodeId)(),{registerTrigger:j,isMountedByThisTrigger:M}=(0,tZ.useTriggerDataForwarding)(y,C,b,{payload:h,closeDelay:m,parent:k,floatingTreeRoot:O,floatingNodeId:I,floatingParentNodeId:N,keyboardEventRelay:w?.relayKeyboardEvent}),P="menubar"===k.type,L=b.useState("disabled"),A=u||L||P&&k.context.disabled,{getButtonProps:D,buttonRef:_}=(0,eL.useButton)({disabled:A,native:c});o.useEffect(()=>{R||void 0!==k.type||(b.context.allowMouseUpTriggerRef.current=!1)},[b,R,k.type]);let F=o.useRef(null),U=(0,ta.useTimeout)(),B=(0,eN.useStableCallback)(e=>{if(!F.current)return;U.clear(),b.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if((0,tM.contains)(F.current,t)||(0,tM.contains)(b.select("positionerElement"),t)||t===F.current||null!=t&&function e(t){return(0,tI.isHTMLElement)(t)&&t.hasAttribute("data-rootownerid")?t.getAttribute("data-rootownerid")??void 0:(0,tI.isLastTraversableNode)(t)?void 0:e((0,tI.getParentNode)(t))}(t)===b.select("rootId"))return;let n=function(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if("none"===n.content&&"none"===r.content)return t;let a=parseFloat(n.width)||0,o=parseFloat(n.height)||0,s=parseFloat(r.width)||0,i=parseFloat(r.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,i),c=l-t.width,d=u-t.height;return{left:t.left-c/2,right:t.right+c/2,top:t.top-d/2,bottom:t.bottom+d/2}}(F.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||O.events.emit("close",{domEvent:e,reason:eT.REASONS.cancelOpen})});o.useEffect(()=>{R&&b.select("lastOpenChangeReason")===eT.REASONS.triggerHover&&(0,tj.ownerDocument)(F.current).addEventListener("mouseup",B,{once:!0})},[R,B,b]);let z=P&&k.context.hasSubmenuOpen,H=f??z,V=(0,t9.useHoverReferenceInteraction)(E,{enabled:H&&!A&&"context-menu"!==k.type&&(!P||z&&!M),handleClose:(0,t8.safePolygon)({blockPointerEvents:!P}),mouseOnly:!0,move:!1,restMs:void 0===k.type?p:void 0,delay:{close:m},triggerElementRef:C,externalTree:O,isActiveTrigger:S}),W=function(e,t){let n=(0,ta.useTimeout)(),[r,a]=o.useState(!1);return(0,eB.useIsoLayoutEffect)(()=>{e&&"trigger-hover"===t?(a(!0),n.start(tp.PATIENT_CLICK_THRESHOLD,()=>{a(!1)})):e||(n.clear(),a(!1))},[e,t,n]),r}(R,b.select("lastOpenChangeReason")),K=(0,t3.useClick)(E,{enabled:!A&&"context-menu"!==k.type,event:R&&P?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===k.type&&W}),$=function(e,t={}){let n="rootStore"in e?e.rootStore:e,{events:r,dataRef:a}=n.context,{enabled:s=!0,delay:i}=t,l=o.useRef(!1),u=o.useRef(null),c=(0,ta.useTimeout)(),d=o.useRef(!0);o.useEffect(()=>{let e=n.select("domReferenceElement");if(!s)return;let t=(0,tI.getWindow)(e);function r(){let e=n.select("domReferenceElement");!n.select("open")&&(0,tI.isHTMLElement)(e)&&e===(0,tM.activeElement)((0,tj.ownerDocument)(e))&&(l.current=!0)}function a(){d.current=!0}function o(){d.current=!1}return t.addEventListener("blur",r),t6&&(t.addEventListener("keydown",a,!0),t.addEventListener("pointerdown",o,!0)),()=>{t.removeEventListener("blur",r),t6&&(t.removeEventListener("keydown",a,!0),t.removeEventListener("pointerdown",o,!0))}},[n,s]),o.useEffect(()=>{if(s)return r.on("openchange",e),()=>{r.off("openchange",e)};function e(e){if(e.reason===eT.REASONS.triggerPress||e.reason===eT.REASONS.escapeKey){let e=n.select("domReferenceElement");(0,tI.isElement)(e)&&(u.current=e,l.current=!0)}}},[r,s,n]);let f=o.useMemo(()=>({onMouseLeave(){l.current=!1,u.current=null},onFocus(e){let t=e.currentTarget;if(l.current){if(u.current===t)return;l.current=!1,u.current=null}let r=(0,tM.getTarget)(e.nativeEvent);if((0,tI.isElement)(r)){if(t6&&!e.relatedTarget){if(!d.current&&!(0,tM.isTypeableElement)(r))return}else if(!(0,tM.matchesFocusVisible)(r))return}let a=(0,tM.isTargetInsideEnabledTrigger)(e.relatedTarget,n.context.triggerElements),{nativeEvent:o,currentTarget:s}=e,f="function"==typeof i?i():i;n.select("open")&&a||0===f||void 0===f?n.setOpen(!0,(0,eG.createChangeEventDetails)(eT.REASONS.triggerFocus,o,s)):c.start(f,()=>{l.current||n.setOpen(!0,(0,eG.createChangeEventDetails)(eT.REASONS.triggerFocus,o,s))})},onBlur(e){l.current=!1,u.current=null;let t=e.relatedTarget,r=e.nativeEvent,o=(0,tI.isElement)(t)&&t.hasAttribute((0,t4.createAttribute)("focus-guard"))&&"outside"===t.getAttribute("data-type");c.start(0,()=>{let e=n.select("domReferenceElement"),s=(0,tM.activeElement)(e?e.ownerDocument:document);if(!t&&s===e||(0,tM.contains)(a.current.floatingContext?.refs.floating.current,s)||(0,tM.contains)(e,s)||o)return;let i=t??s;(0,tM.isTargetInsideEnabledTrigger)(i,n.context.triggerElements)||n.setOpen(!1,(0,eG.createChangeEventDetails)(eT.REASONS.triggerFocus,r))})}}),[a,n,c,i]);return o.useMemo(()=>s?{reference:f,trigger:f}:{},[s,f])}(E,{enabled:!A&&z}),G=function(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,a=o.useRef(!1);return o.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!r||"close"===n&&r)&&(a.current=!0,(0,tj.ownerDocument)(e.currentTarget).addEventListener("click",()=>{a.current=!1},{once:!0}))},onClick:e=>{a.current&&(a.current=!1,e.preventBaseUIHandler())}}:tk.EMPTY_OBJECT,[t,n,r])}({open:R,enabled:P,mouseDownAction:"open"}),Y=(0,tO.useInteractions)([K,$]),q={disabled:A,open:R},J=b.useState("triggerProps",M),X=[F,t,_,j,C],Q=[Y.getReferenceProps(),V??tk.EMPTY_OBJECT,J,{"aria-haspopup":"menu",id:y,onMouseDown:e=>{b.select("open")||(U.start(200,()=>{b.context.allowMouseUpTriggerRef.current=!0}),(0,tj.ownerDocument)(e.currentTarget).addEventListener("mouseup",B,{once:!0}))}},P?{role:"menuitem"}:{},G,v,D],Z=o.useRef(null),ee=(0,eN.useStableCallback)(e=>{t5.flushSync(()=>{b.setOpen(!1,(0,eG.createChangeEventDetails)(eT.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,t7.getTabbableBeforeElement)(Z.current);t?.focus()}),et=(0,eN.useStableCallback)(e=>{let t=b.select("positionerElement");if(t&&(0,t7.isOutsideEvent)(e,t))b.context.beforeContentFocusGuardRef.current?.focus();else{t5.flushSync(()=>{b.setOpen(!1,(0,eG.createChangeEventDetails)(eT.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,t7.getTabbableAfterElement)(b.context.triggerFocusTargetRef.current||C.current);for(;null!==n&&(0,tM.contains)(t,n);){let e=n;if((n=(0,t7.getNextTabbable)(n))===e)break}n?.focus()}}),en=(0,eS.useRenderElement)("button",e,{enabled:!P,stateAttributesMapping:eE.pressableTriggerOpenStateMapping,state:q,ref:X,props:Q});return P?(0,a.jsx)(nt,{tag:"button",render:i,className:l,state:q,refs:X,props:Q,stateAttributesMapping:eE.pressableTriggerOpenStateMapping}):R?(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(nn.FocusGuard,{ref:Z,onFocus:ee},`${y}-pre-focus-guard`),(0,a.jsx)(o.Fragment,{children:en},y),(0,a.jsx)(nn.FocusGuard,{ref:b.context.triggerFocusTargetRef,onFocus:et},`${y}-post-focus-guard`)]}):(0,a.jsx)(o.Fragment,{children:en},y)});var na=e.i(12666);let no=((r={}).popupWidth="--popup-width",r.popupHeight="--popup-height",r),ns={activationDirection:e=>e?{"data-activation-direction":e}:null},ni=o.forwardRef(function(e,t){let{render:n,className:r,children:a,...o}=e,{store:s}=ey(),{side:i}=ex(),l=s.useState("instantType"),{children:u,state:c}=(0,na.usePopupViewport)({store:s,side:i,cssVars:no,children:a}),d={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:l};return(0,eS.useRenderElement)("div",e,{state:d,ref:t,props:[o,{children:u}],stateAttributesMapping:ns})}),nl=o.forwardRef(function(e,t){let{className:n,render:r,orientation:a="horizontal",...o}=e;return(0,eS.useRenderElement)("div",e,{state:{orientation:a},ref:t,props:[{role:"separator","aria-orientation":a},o]})}),nu=o.forwardRef(function(e,t){let{render:n,className:r,label:a,id:s,nativeButton:i=!1,openOnHover:l=!0,delay:u=100,closeDelay:c=0,disabled:d=!1,...f}=e,p=eV(),m=ex(),{store:g}=ey(),h=(0,eW.useBaseUiId)(s),v=g.useState("open"),x=g.useState("floatingRootContext"),b=g.useState("floatingTreeRoot"),y=(0,tZ.useTriggerRegistration)(h,g),S=o.useCallback(e=>{let t=y(e);return null!==e&&g.select("open")&&null==g.select("activeTriggerId")&&g.update({activeTriggerId:h,activeTriggerElement:e,closeDelay:c}),t},[y,c,g,h]),E=o.useRef(null),R=o.useCallback(e=>{E.current=e,g.set("activeTriggerElement",e)},[g]),C=t1();if(!C?.parentMenu)throw Error((0,eh.default)(37));g.useSyncedValue("closeDelay",c);let k=C.parentMenu,w=k.useState("itemProps"),T=k.useState("isActive",p.index),O=o.useMemo(()=>({type:"submenu-trigger",setActive(){k.set("activeIndex",p.index)}}),[k,p.index]),I=g.useState("disabled"),N=d||I,{getItemProps:j,itemRef:M}=eU({closeOnClick:!1,disabled:N,highlighted:T,id:h,store:g,typingRef:k.context.typingRef,nativeButton:i,itemMetadata:O,nodeId:m?.nodeId}),P=g.useState("hoverEnabled"),L=k.useState("allowMouseEnter"),A=(0,t9.useHoverReferenceInteraction)(x,{enabled:P&&l&&!N,handleClose:(0,t8.safePolygon)({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:u,delay:L?{open:u,close:c}:0,triggerElementRef:E,externalTree:b}),D=(0,t3.useClick)(x,{enabled:!N,event:"mousedown",toggle:!l,ignoreMouse:l,stickIfOpen:!1}),_=(0,tO.useInteractions)([D]),F=g.useState("triggerProps",!0);return delete F.id,(0,eS.useRenderElement)("div",e,{state:{disabled:N,highlighted:T,open:v},stateAttributesMapping:eE.triggerOpenStateMapping,props:[_.getReferenceProps(),A,F,w,{tabIndex:v||T?0:-1,onBlur(){T&&k.set("activeIndex",null)}},f,j],ref:[t,p.ref,M,S,R]})});class nc{constructor(){this.store=new tQ}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,eh.default)(83,e));this.store.setOpen(!0,(0,eG.createChangeEventDetails)("imperative-action",void 0,t))}close(){this.store.setOpen(!1,(0,eG.createChangeEventDetails)("imperative-action",void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,eR,"Backdrop",0,eI,"CheckboxItem",0,eY,"CheckboxItemIndicator",0,eX,"Group",0,eZ,"GroupLabel",0,e0,"Handle",0,nc,"Item",0,e1,"LinkItem",0,e2,"Popup",0,e7,"Portal",0,tn,"Positioner",0,th,"RadioGroup",0,tx,"RadioItem",0,ty,"RadioItemIndicator",0,tS,"Root",0,t2,"Separator",0,nl,"SubmenuRoot",0,function(e){let t=ey().store,n=o.useMemo(()=>({parentMenu:t}),[t]);return(0,a.jsx)(t0.Provider,{value:n,children:(0,a.jsx)(t2,{...e})})},"SubmenuTrigger",0,nu,"Trigger",0,nr,"Viewport",0,ni,"createHandle",0,function(){return new nc}],30250);var nd=e.i(30250),nd=nd;function nf({...e}){return(0,a.jsx)(nd.Root,{"data-slot":"dropdown-menu",...e})}function np({...e}){return(0,a.jsx)(nd.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function nm({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:o,...s}){return(0,a.jsx)(nd.Portal,{children:(0,a.jsx)(nd.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:(0,a.jsx)(nd.Popup,{"data-slot":"dropdown-menu-content",className:(0,es.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",o),...s})})})}function ng({className:e,inset:t,variant:n="default",...r}){return(0,a.jsx)(nd.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:(0,es.cn)("group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function nh({className:e,...t}){return(0,a.jsx)(nd.Separator,{"data-slot":"dropdown-menu-separator",className:(0,es.cn)("-mx-1 my-1 h-px bg-border/50",e),...t})}e.i(46349),e.i(78784),e.s(["default",0,function({params:e}){let{id:t}=(0,o.use)(e),n=(0,s.useRouter)(),r=(0,y.useToast)(),[u,C]=(0,o.useState)(null),[k,w]=(0,o.useState)(!0),[T,O]=(0,o.useState)([]),[I,N]=(0,o.useState)(),[j,L]=(0,o.useState)(!0),[A,D]=(0,o.useState)(!1),[_,F]=(0,o.useState)(!1),[U,B]=(0,o.useState)(!0),{state:z,update:H}=(0,R.useSidebarTaskList)(),V=z.hidden.includes(t),W=(0,o.useRef)(null);(0,S.useDocumentTitle)(u?.title),(0,E.useTaskEvents)({onTaskCreated:()=>{},onTaskUpdated:e=>{e.id===t&&C(e)},onTaskDeleted:e=>{e===t&&(r.info("Task deleted",u?.title??void 0),n.push("/"))}});let K=(0,o.useCallback)(()=>{fetch((0,v.apiUrl)(`/api/tasks/${t}/read`),{method:"POST"}).catch(()=>{})},[t]),$=(0,o.useCallback)((e,t)=>{("success"===t||"failure"===t||"error"===t)&&K()},[K]),G=(0,o.useRef)(null),Y=(0,o.useCallback)(async()=>{if(null!==G.current&&G.current!==t&&B(!0),G.current=t,U){L(!0);try{let e=await fetch((0,v.apiUrl)(`/api/tasks/${t}`));if(!e.ok)throw Error("Failed to fetch task");let n=await e.json(),r=n.data.task,a=r.tabs||[];C(r),w(n.data.worktreeExists),O(a),a.length>0&&N(a[0].tab_id),K()}catch(e){console.error("Failed to load data:",e)}finally{L(!1),B(!1)}}},[t,U,K]);(0,o.useEffect)(()=>{Y()},[t,Y]);let q=async(e,t)=>{let n=r.loading("Updating task...");try{let a=await fetch((0,v.apiUrl)(`/api/tasks/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw Error("Failed to update task");let o=await a.json();return C(o.data.task),r.success(n,"Successfully updated task"),{success:!0}}catch(t){console.error("Failed to update task:",t);let e=t instanceof Error?t.message:"Failed to update task";return r.error(n,"Failed to update task",e),{success:!1,errors:[{field:"global",message:"Failed to update task"}]}}},J=async(e="claude")=>{try{let n=await fetch((0,v.apiUrl)(`/api/tasks/${t}/tabs`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e})});if(!n.ok)throw Error("Failed to create tab");let r=(await n.json()).data.tab;return O(e=>e.some(e=>e.tab_id===r.tab_id)?e:[...e,r]),N(r.tab_id),r.tab_id}catch(e){console.error("Failed to create tab:",e);return}},X=async e=>{try{if(!(await fetch((0,v.apiUrl)(`/api/tasks/${t}/tabs/${e}`),{method:"DELETE"})).ok)throw Error("Failed to delete tab");if(O(t=>t.filter(t=>t.tab_id!==e)),I===e){let t=T.filter(t=>t.tab_id!==e);N(t[0]?.tab_id)}}catch(e){console.error("Failed to delete tab:",e)}},Q=async()=>{if(!u)return;let e=r.loading("Opening terminal...",u.worktreePath);try{if(!(await fetch((0,v.apiUrl)("/api/commands/open"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({commandType:"terminal",owner:u.owner,repo:u.repo,branch:u.branch})})).ok)throw Error("Command execution failed");r.success(e,"Successfully opened terminal",u.worktreePath)}catch(n){let t=n instanceof Error?n.message:"Unknown error";r.error(e,"Failed to open terminal",t)}},Z=async()=>{if(!u)return;let e=r.loading("Opening VS Code...",u.worktreePath);try{if(!(await fetch((0,v.apiUrl)("/api/commands/open"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({commandType:"vscode",owner:u.owner,repo:u.repo,branch:u.branch})})).ok)throw Error("Command execution failed");r.success(e,"Successfully opened VS Code",u.worktreePath)}catch(n){let t=n instanceof Error?n.message:"Unknown error";r.error(e,"Failed to open VS Code",t)}};return j&&!u?(0,a.jsx)("div",{className:"h-screen flex items-center justify-center bg-background",children:(0,a.jsx)(b.LoadingSpinner,{size:"lg",message:"Loading task..."})}):u?(0,a.jsxs)("div",{className:"h-screen flex flex-col bg-background",children:[(0,a.jsx)("div",{className:"sticky top-0 z-50 p-4 border-b border-border bg-card",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)(i.default,{href:"/",className:(0,es.cn)((0,P.buttonVariants)({variant:"ghost"}),"text-primary font-medium hover:bg-primary/10 hover:text-foreground"),children:[(0,a.jsx)(l.ArrowLeft,{className:"w-4 h-4"}),"Back to Board"]}),(0,a.jsxs)("div",{className:"absolute left-1/2 -translate-x-1/2 max-w-[50vw] flex items-center gap-1",children:[(0,a.jsx)("h1",{className:"min-w-0 truncate text-base font-semibold text-foreground",children:u.title}),V&&(0,a.jsx)(P.Button,{variant:"ghost",size:"icon",className:"hidden md:inline-flex shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Hidden from sidebar. Click to show",title:"Hidden from sidebar. Click to show",onClick:()=>H(e=>({...e,hidden:e.hidden.filter(e=>e!==t),shown:e.shown.includes(t)?e.shown:[...e.shown,t]})),children:(0,a.jsx)(f.EyeOff,{})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(eg.UpdateIndicator,{}),(0,a.jsxs)(nf,{children:[(0,a.jsx)(np,{render:(0,a.jsx)(P.Button,{variant:"ghost",size:"icon-lg",className:"text-primary hover:bg-primary/10 hover:text-foreground",title:"Task menu"}),children:(0,a.jsx)(d,{className:"w-5 h-5"})}),(0,a.jsxs)(nm,{align:"end",children:[(0,a.jsxs)(ng,{onClick:()=>D(!0),children:[(0,a.jsx)(m.Pencil,{className:"w-4 h-4"}),"Detail / Edit"]}),k&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(nh,{}),(0,a.jsxs)(ng,{onClick:Q,children:[(0,a.jsx)(g,{className:"w-4 h-4"}),"Open Terminal"]}),(0,a.jsxs)(ng,{onClick:Z,children:[(0,a.jsx)(c,{className:"w-4 h-4"}),"Open VS Code"]})]}),(0,a.jsx)(nh,{}),(0,a.jsxs)(ng,{className:"text-destructive focus:text-destructive",onClick:()=>F(!0),children:[(0,a.jsx)(h.Trash2,{className:"w-4 h-4"}),"Delete"]})]})]})]})]})}),(0,a.jsx)("div",{className:"flex-1 flex flex-col min-h-0",children:(0,a.jsx)("div",{className:"bg-background dark:bg-card flex flex-col flex-1 min-h-0",children:k?(0,a.jsx)(em,{ref:W,task:u,tabs:T,activeTabId:I,onTabChange:N,onTabCreate:J,onTabDelete:X,onAgentStatusChange:$}):(0,a.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 p-6 text-center",children:[(0,a.jsx)(p,{className:"size-10 text-muted-foreground"}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("p",{className:"font-medium text-foreground",children:"Worktree not found"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground break-all",children:u.worktreePath})]}),(0,a.jsxs)(P.Button,{variant:"destructive",onClick:()=>F(!0),children:[(0,a.jsx)(h.Trash2,{className:"w-4 h-4"}),"Delete Task"]})]})})}),(0,a.jsx)(x.LazyTaskDialog,{mode:"edit",isOpen:A,onClose:()=>D(!1),task:u,onUpdate:q}),(0,a.jsx)(M.ConfirmDialog,{open:_,onOpenChange:e=>F(e.open),title:"Delete Task",message:`Delete task "${u.title}"?
5
+
6
+ This will also delete the worktree and branch.`,confirmLabel:"Delete",cancelLabel:"Cancel",onConfirm:()=>{if(!u)return;let e=r.loading("Deleting task...",u.title);fetch((0,v.apiUrl)(`/api/tasks/${u.id}`),{method:"DELETE"}).then(()=>{r.success(e,"Successfully deleted task",u.title)}).catch(t=>{let n=t instanceof Error?t.message:"Unknown error";r.error(e,"Failed to delete task",n)}),n.push("/")},variant:"danger"})]}):(0,a.jsx)("div",{className:"h-screen flex items-center justify-center bg-background",children:(0,a.jsx)("div",{className:"text-center text-foreground",children:"Task not found"})})}],97099)}]);