forge-openclaw-plugin 0.3.17 → 0.3.18

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 (143) hide show
  1. package/dist/assets/{action-bar-D3CEYlj4.js → action-bar-BAZevCEA.js} +1 -1
  2. package/dist/assets/{activity-page-Ce1pHIu5.js → activity-page-CnT_hnCU.js} +1 -1
  3. package/dist/assets/{ai-surface-workspace-DEliwOjF.js → ai-surface-workspace-GPZzIIut.js} +1 -1
  4. package/dist/assets/artifacts-page-Bqjp0L-L.js +2 -0
  5. package/dist/assets/{atlas-panel-VZOnJa1c.js → atlas-panel-B95nrYpZ.js} +1 -1
  6. package/dist/assets/{board-DprRipIG.js → board-CGgOvBP9.js} +1 -1
  7. package/dist/assets/{calendar-page-Zstsn4uG.js → calendar-page-mlr94wIS.js} +1 -1
  8. package/dist/assets/{calendar-rules-BGIBuEDk.js → calendar-rules-DdxPmBZJ.js} +1 -1
  9. package/dist/assets/{calendar-week-toolbar-DXFkMkbq.js → calendar-week-toolbar-Cu8V6zv1.js} +1 -1
  10. package/dist/assets/{charts-C5S0-BL7.js → charts-Cdtn55ol.js} +1 -1
  11. package/dist/assets/{companion-sync-lab-page-DIPPLFKt.js → companion-sync-lab-page-CJI5jf8W.js} +1 -1
  12. package/dist/assets/{daily-metrics-dashboard-CG-OOCJz.js → daily-metrics-dashboard-CXESx7bU.js} +1 -1
  13. package/dist/assets/{define-workbench-box-BEEdtBkQ.js → define-workbench-box-Dbl9W7oE.js} +1 -1
  14. package/dist/assets/{entity-link-multiselect-BfDAROHB.js → entity-link-multiselect-DZ_jAjs4.js} +1 -1
  15. package/dist/assets/{entity-note-count-link-BGOiaash.js → entity-note-count-link-FOK_qhcC.js} +1 -1
  16. package/dist/assets/{entity-notes-surface-DPsJwqQa.js → entity-notes-surface-Dq9dFKjD.js} +1 -1
  17. package/dist/assets/{execution-board-Dg-2GSKv.js → execution-board-D9hkXKC2.js} +1 -1
  18. package/dist/assets/{faceted-token-search-DV7MSVYb.js → faceted-token-search-BeShxjkc.js} +1 -1
  19. package/dist/assets/{flagship-signal-deck-D3wVL3bC.js → flagship-signal-deck-DZx_HEH9.js} +1 -1
  20. package/dist/assets/{floating-action-menu-BUs382px.js → floating-action-menu-CFrgvQJi.js} +1 -1
  21. package/dist/assets/{forms-ByKjodjN.js → forms-DhEGHkFR.js} +1 -1
  22. package/dist/assets/{generic-node-view-BY5dbPXJ.js → generic-node-view-C1kLClIm.js} +1 -1
  23. package/dist/assets/{goal-detail-page-MYr6j2B4.js → goal-detail-page-BhMrnVQs.js} +1 -1
  24. package/dist/assets/{goal-dialog-nkdME5Uy.js → goal-dialog-BlZHh3dw.js} +1 -1
  25. package/dist/assets/{goals-page-BsFeBzU1.js → goals-page-CesC8IkZ.js} +1 -1
  26. package/dist/assets/{graph-CHVj0Z7n.js → graph-U1J6VkbG.js} +1 -1
  27. package/dist/assets/{habits-page-wO461EVU.js → habits-page-DHxZSThT.js} +1 -1
  28. package/dist/assets/{health-boxes-BphMeSJj.js → health-boxes-BZjIqiiG.js} +1 -1
  29. package/dist/assets/index-CHbe1sy1.css +1 -0
  30. package/dist/assets/{index-gmPaoLN-.js → index-Dj8q65se.js} +2 -2
  31. package/dist/assets/{inline-note-fields-BvQwmMAv.js → inline-note-fields-DpmCMAJf.js} +1 -1
  32. package/dist/assets/{insight-flow-dialog-H_eaOmst.js → insight-flow-dialog-DNIe0sts.js} +1 -1
  33. package/dist/assets/{insights-page-DINYe3cB.js → insights-page-D_N_MWGu.js} +1 -1
  34. package/dist/assets/{kanban-boxes-oACOTDYG.js → kanban-boxes-DTDG5UEJ.js} +1 -1
  35. package/dist/assets/{kanban-page-BGLXH91f.js → kanban-page-DEvIY5IW.js} +1 -1
  36. package/dist/assets/{knowledge-graph-page-VfMvw5jL.js → knowledge-graph-page-CvXSnnG5.js} +1 -1
  37. package/dist/assets/{life-force-page-DQPb6UL-.js → life-force-page-CgvUrqQb.js} +1 -1
  38. package/dist/assets/{life-force-workspace-BJ1aI3JE.js → life-force-workspace-BNeMbRHf.js} +1 -1
  39. package/dist/assets/{maps-CvEHVkBk.js → maps-Dk9tZqTA.js} +1 -1
  40. package/dist/assets/{metric-tile-CbEe19Gd.js → metric-tile-DAhX60rg.js} +1 -1
  41. package/dist/assets/{motion-BibSzp57.js → motion-DeJZhOSA.js} +1 -1
  42. package/dist/assets/{movement-boxes-dtDYhw5c.js → movement-boxes-BOqU18NH.js} +1 -1
  43. package/dist/assets/{movement-page-BhmwCHjs.js → movement-page-DCDeUynh.js} +1 -1
  44. package/dist/assets/{note-markdown-CG8u2d6p.js → note-markdown-Cxj84-0j.js} +1 -1
  45. package/dist/assets/{note-tags-input-D_conqDO.js → note-tags-input-CP0-EPpE.js} +1 -1
  46. package/dist/assets/{notes-boxes-BLKucFqW.js → notes-boxes-C7WPT7mf.js} +1 -1
  47. package/dist/assets/{notes-page-CafVxWjb.js → notes-page-Dll8PIks.js} +1 -1
  48. package/dist/assets/{open-in-graph-button-DFQ4r6SN.js → open-in-graph-button-BHl16hJP.js} +1 -1
  49. package/dist/assets/{orbit-map-DsEl3ori.js → orbit-map-De0qpMpY.js} +1 -1
  50. package/dist/assets/{overview-page-BffcX-pM.js → overview-page-C1RX7dcq.js} +1 -1
  51. package/dist/assets/{page-hero-U603l9rQ.js → page-hero-DYmFM6-q.js} +1 -1
  52. package/dist/assets/pill-cluster-ClkmFVFT.js +1 -0
  53. package/dist/assets/{preference-entity-handoff-button-cPrTpHsV.js → preference-entity-handoff-button-1XXtBsUF.js} +1 -1
  54. package/dist/assets/{preferences-page-DQjFIOmt.js → preferences-page-OwfPIQwe.js} +1 -1
  55. package/dist/assets/{project-collections-B9OGHGqm.js → project-collections-DfmkBk9d.js} +1 -1
  56. package/dist/assets/{project-detail-page-r1Sw2kcO.js → project-detail-page-BC_MNaca.js} +1 -1
  57. package/dist/assets/{project-dialog-B2_PcXAf.js → project-dialog-BuZdXECa.js} +1 -1
  58. package/dist/assets/{project-management-hierarchy-page-qLNG8hsh.js → project-management-hierarchy-page-AhEHe60K.js} +1 -1
  59. package/dist/assets/{project-management-section-nav-DFUlmMEB.js → project-management-section-nav-CnaseOqL.js} +1 -1
  60. package/dist/assets/{projects-boxes-BA7_XaqX.js → projects-boxes-D0zM8PfY.js} +1 -1
  61. package/dist/assets/{projects-page-B6ggXWFw.js → projects-page-ltrWfLrA.js} +1 -1
  62. package/dist/assets/{psyche-behaviors-page-ByWpXlLq.js → psyche-behaviors-page-CPurgDg6.js} +1 -1
  63. package/dist/assets/{psyche-flashcards-page-B9nSc0mk.js → psyche-flashcards-page-DnUSe-bb.js} +1 -1
  64. package/dist/assets/{psyche-goal-map-page-BQU7qI88.js → psyche-goal-map-page-uWocO7kZ.js} +1 -1
  65. package/dist/assets/{psyche-graph-DCeP7r2b.js → psyche-graph-BDszV3UN.js} +1 -1
  66. package/dist/assets/{psyche-metrics-page-DD2lOP-J.js → psyche-metrics-page-CIJLJTPy.js} +1 -1
  67. package/dist/assets/{psyche-mode-guide-page-DbtZgnjr.js → psyche-mode-guide-page-uC8L4WvH.js} +1 -1
  68. package/dist/assets/{psyche-modes-page-3zFJWFQf.js → psyche-modes-page-CtBeRA_3.js} +1 -1
  69. package/dist/assets/{psyche-page-D5vXYkfB.js → psyche-page-Ds3QDsin.js} +1 -1
  70. package/dist/assets/{psyche-patterns-page-BneAAeKS.js → psyche-patterns-page-Cvq5WshW.js} +1 -1
  71. package/dist/assets/{psyche-questionnaire-builder-page-BH1la5C9.js → psyche-questionnaire-builder-page-Cg5Upe6z.js} +1 -1
  72. package/dist/assets/{psyche-questionnaire-detail-page-DYav634P.js → psyche-questionnaire-detail-page-D4jEnNoh.js} +1 -1
  73. package/dist/assets/{psyche-questionnaire-run-detail-page-9VaijhJm.js → psyche-questionnaire-run-detail-page-CWoZEY31.js} +1 -1
  74. package/dist/assets/{psyche-questionnaire-run-page-e1T6k_dS.js → psyche-questionnaire-run-page-Yg_VG2vq.js} +1 -1
  75. package/dist/assets/{psyche-questionnaires-page-Dyv367z9.js → psyche-questionnaires-page-BqeOJRj7.js} +1 -1
  76. package/dist/assets/{psyche-report-detail-page-hqxHIXw2.js → psyche-report-detail-page-BtcMQ7mk.js} +1 -1
  77. package/dist/assets/{psyche-reports-page-DhIfcGbt.js → psyche-reports-page-tagvW0To.js} +1 -1
  78. package/dist/assets/{psyche-schemas-Cg51Ztxz.js → psyche-schemas-CvRSkI_u.js} +1 -1
  79. package/dist/assets/{psyche-schemas-beliefs-page-Dgb5o9vx.js → psyche-schemas-beliefs-page-4NL3415v.js} +1 -1
  80. package/dist/assets/{psyche-screen-time-page-D6MnJGNa.js → psyche-screen-time-page-Bc5AwZHQ.js} +1 -1
  81. package/dist/assets/{psyche-self-observation-page-C1Vyezbv.js → psyche-self-observation-page-CUrUYbQ_.js} +1 -1
  82. package/dist/assets/{psyche-values-page-B_JWVw1Q.js → psyche-values-page-BshT2sXE.js} +1 -1
  83. package/dist/assets/{question-flow-dialog-yMYVk998.js → question-flow-dialog-CPyXCqA-.js} +1 -1
  84. package/dist/assets/{report-chain-fields-D4NM9a6I.js → report-chain-fields-C0UMLpze.js} +1 -1
  85. package/dist/assets/{rewards-page-B5-bcL4R.js → rewards-page-D9BzsNPW.js} +1 -1
  86. package/dist/assets/{scheduling-rules-editor-De72IUax.js → scheduling-rules-editor-DiA6KkQ4.js} +1 -1
  87. package/dist/assets/{schema-badge-jX28kUa6.js → schema-badge-DURw2eYH.js} +1 -1
  88. package/dist/assets/{schemas-BlFy-uPR.js → schemas-D_z2C8l1.js} +1 -1
  89. package/dist/assets/{select-menu-BXv1rsVc.js → select-menu-BUB8__Nx.js} +1 -1
  90. package/dist/assets/{settings-agents-page-DN_np10S.js → settings-agents-page-Kk98Whcf.js} +1 -1
  91. package/dist/assets/{settings-bin-page-BM5BpK_i.js → settings-bin-page-BnJ-mgy2.js} +1 -1
  92. package/dist/assets/{settings-calendar-page-Cg0gSSFs.js → settings-calendar-page-CdhlUnUW.js} +3 -3
  93. package/dist/assets/{settings-data-page-Dwmp2rLy.js → settings-data-page-BvvuZNbb.js} +1 -1
  94. package/dist/assets/{settings-logs-page-DQNM21Re.js → settings-logs-page-CrzkXxtZ.js} +1 -1
  95. package/dist/assets/{settings-mobile-page-DQdiRa-a.js → settings-mobile-page-Dl582NK6.js} +1 -1
  96. package/dist/assets/{settings-models-page-CAEPpuHF.js → settings-models-page-COoBw28S.js} +1 -1
  97. package/dist/assets/{settings-page-Cl2KiCFg.js → settings-page-DqnlOCgo.js} +1 -1
  98. package/dist/assets/{settings-rewards-page-DoIUumhe.js → settings-rewards-page-Cw5QSTjy.js} +1 -1
  99. package/dist/assets/{settings-section-nav-D_N87IG0.js → settings-section-nav-C1NcWveT.js} +1 -1
  100. package/dist/assets/{settings-users-page-CPesR62N.js → settings-users-page-0opvepcM.js} +1 -1
  101. package/dist/assets/{settings-wiki-page-BxMQM5Vi.js → settings-wiki-page-CkpnUkiZ.js} +1 -1
  102. package/dist/assets/{sleep-page-DUYmQKrg.js → sleep-page-DrS1zs3B.js} +1 -1
  103. package/dist/assets/{sports-page-Bzi5TF9T.js → sports-page-EVnB_zjB.js} +1 -1
  104. package/dist/assets/{state-BFyKSULP.js → state-DWw8Jay_.js} +1 -1
  105. package/dist/assets/{strategies-page-C-T2MZx4.js → strategies-page-COhyv_SH.js} +1 -1
  106. package/dist/assets/{strategy-detail-page-3tYuSZu-.js → strategy-detail-page-BaCVkvIu.js} +1 -1
  107. package/dist/assets/{strategy-dialog-BWm4slo4.js → strategy-dialog-DvlPo9WV.js} +1 -1
  108. package/dist/assets/{surface-BJObZeRw.js → surface-Dg5fauKP.js} +1 -1
  109. package/dist/assets/{table-CTLroJKN.js → table-CWVROEBP.js} +1 -1
  110. package/dist/assets/{task-detail-page-ZZOXSpSF.js → task-detail-page-3IeMYIXl.js} +1 -1
  111. package/dist/assets/{task-dialog-2wy0xI7f.js → task-dialog-B7ZT4KE5.js} +1 -1
  112. package/dist/assets/{timebox-planning-dialog-C6h0Hp71.js → timebox-planning-dialog-DoZzpEBp.js} +1 -1
  113. package/dist/assets/{today-boxes-B_TdgSDz.js → today-boxes-BbUNpb16.js} +1 -1
  114. package/dist/assets/today-page-adKXN2g1.js +1 -0
  115. package/dist/assets/{training-load-page-B78e1-o-.js → training-load-page-DTYbu9f0.js} +1 -1
  116. package/dist/assets/{ui-uo_bNP7c.js → ui-CdEDMtXF.js} +1 -1
  117. package/dist/assets/{use-anchored-overlay-position-BSxFX6Hi.js → use-anchored-overlay-position-Cracjgo6.js} +1 -1
  118. package/dist/assets/{use-psyche-focus-target-1GLkhYiv.js → use-psyche-focus-target-DvRgu-94.js} +1 -1
  119. package/dist/assets/{user-badge-C4eZu1e_.js → user-badge-B8hYK6NU.js} +1 -1
  120. package/dist/assets/{user-select-field-CmKwcbZt.js → user-select-field-akGHK-2t.js} +1 -1
  121. package/dist/assets/{utility-widgets-B06wQFrd.js → utility-widgets-D4KsKxLT.js} +2 -2
  122. package/dist/assets/{vendor-B7FKSwHK.js → vendor-y_uz1Wft.js} +1 -1
  123. package/dist/assets/{vitals-page-BC7QFsm2.js → vitals-page-Cjcxh-kO.js} +1 -1
  124. package/dist/assets/{weekly-review-page-BjNsNoWj.js → weekly-review-page-CR57efzH.js} +1 -1
  125. package/dist/assets/{weight-loss-page-BOahGY9r.js → weight-loss-page-Bk7YkB7b.js} +1 -1
  126. package/dist/assets/{wiki-article-markdown-DO47HnZf.js → wiki-article-markdown-um6gpmGQ.js} +1 -1
  127. package/dist/assets/{wiki-editor-page-OWRUHl4O.js → wiki-editor-page-DdP5hvjZ.js} +3 -3
  128. package/dist/assets/{wiki-ingest-history-page-CuHpg2lZ.js → wiki-ingest-history-page-DSTndduq.js} +1 -1
  129. package/dist/assets/{wiki-ingest-modal-EZ3kX-vA.js → wiki-ingest-modal-PNW3CJ-o.js} +1 -1
  130. package/dist/assets/{wiki-page-BPV3HIgu.js → wiki-page-CsJlPyQ6.js} +1 -1
  131. package/dist/assets/{workbench-flow-page-C53KueEz.js → workbench-flow-page-DFtIKgNe.js} +1 -1
  132. package/dist/assets/{workbench-page-DJ7nT2JQ.js → workbench-page-DEpKjMEv.js} +1 -1
  133. package/dist/assets/{workout-detail-page-Dhyu0q7o.js → workout-detail-page-BwfEhxA_.js} +2 -2
  134. package/dist/index.html +8 -8
  135. package/dist/server/apps/api/migrations/073_artifact_entity_links_repair.sql +24 -0
  136. package/openclaw.plugin.json +1 -1
  137. package/package.json +1 -1
  138. package/server/migrations/073_artifact_entity_links_repair.sql +24 -0
  139. package/skills/forge-openclaw/entity_conversation_playbooks.md +9 -6
  140. package/dist/assets/artifacts-page-BgyFVIVM.js +0 -2
  141. package/dist/assets/index-CSd8ylsy.css +0 -1
  142. package/dist/assets/pill-cluster-BYVFNppV.js +0 -1
  143. package/dist/assets/today-page-Dipns9tl.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as a,j as g,E as Ce,F as Je,G as Qe,H as et,_ as tt,J as nt,K as _,L as Se,N as rt,O as ot,P as at}from"./vendor-B7FKSwHK.js";function O(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ue(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Re(...e){return t=>{let n=!1;const r=e.map(o=>{const i=ue(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():ue(e[o],null)}}}}function I(...e){return a.useCallback(Re(...e),e)}function it(e,t){const n=a.createContext(t),r=i=>{const{children:c,...s}=i,d=a.useMemo(()=>s,Object.values(s));return g.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function o(i){const c=a.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function st(e,t=[]){let n=[];function r(i,c){const s=a.createContext(c),d=n.length;n=[...n,c];const l=v=>{var E;const{scope:h,children:p,...R}=v,u=((E=h==null?void 0:h[e])==null?void 0:E[d])||s,m=a.useMemo(()=>R,Object.values(R));return g.jsx(u.Provider,{value:m,children:p})};l.displayName=i+"Provider";function f(v,h){var u;const p=((u=h==null?void 0:h[e])==null?void 0:u[d])||s,R=a.useContext(p);if(R)return R;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${i}\``)}return[l,f]}const o=()=>{const i=n.map(c=>a.createContext(c));return function(s){const d=(s==null?void 0:s[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:d}}),[s,d])}};return o.scopeName=e,[r,ct(o,...t)]}function ct(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((s,{useScope:d,scopeName:l})=>{const v=d(i)[`__scope${l}`];return{...s,...v}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var j=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},ut=Ce[" useId ".trim().toString()]||(()=>{}),lt=0;function q(e){const[t,n]=a.useState(ut());return j(()=>{n(r=>r??String(lt++))},[e]),e||(t?`radix-${t}`:"")}var dt=Ce[" useInsertionEffect ".trim().toString()]||j;function ft({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=vt({defaultProp:t,onChange:n}),s=e!==void 0,d=s?e:o;{const f=a.useRef(e!==void 0);a.useEffect(()=>{const v=f.current;v!==s&&console.warn(`${r} is changing from ${v?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const l=a.useCallback(f=>{var v;if(s){const h=mt(f)?f(e):f;h!==e&&((v=c.current)==null||v.call(c,h))}else i(f)},[s,e,i,c]);return[d,l]}function vt({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return dt(()=>{i.current=t},[t]),a.useEffect(()=>{var c;o.current!==n&&((c=i.current)==null||c.call(i,n),o.current=n)},[n,o]),[n,r,i]}function mt(e){return typeof e=="function"}function we(e){const t=gt(e),n=a.forwardRef((r,o)=>{const{children:i,...c}=r,s=a.Children.toArray(i),d=s.find(pt);if(d){const l=d.props.children,f=s.map(v=>v===d?a.Children.count(l)>1?a.Children.only(null):a.isValidElement(l)?l.props.children:null:v);return g.jsx(t,{...c,ref:o,children:a.isValidElement(l)?a.cloneElement(l,void 0,f):null})}return g.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function gt(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n;if(a.isValidElement(o)){const c=yt(o),s=Et(i,o.props);return o.type!==a.Fragment&&(s.ref=r?Re(r,c):c),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ht=Symbol("radix.slottable");function pt(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ht}function Et(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const d=i(...s);return o(...s),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function yt(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=bt.reduce((e,t)=>{const n=we(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:c,...s}=o,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ct(e,t){e&&Je.flushSync(()=>e.dispatchEvent(t))}function B(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function St(e,t=globalThis==null?void 0:globalThis.document){const n=B(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Rt="DismissableLayer",re="dismissableLayer.update",wt="dismissableLayer.pointerDownOutside",Pt="dismissableLayer.focusOutside",le,Pe=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ne=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...d}=e,l=a.useContext(Pe),[f,v]=a.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=a.useState({}),R=I(t,y=>v(y)),u=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),E=u.indexOf(m),b=f?u.indexOf(f):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=E,w=xt(y=>{const T=y.target,L=[...l.branches].some(W=>W.contains(T));!S||L||(o==null||o(y),c==null||c(y),y.defaultPrevented||s==null||s())},h),P=Ot(y=>{const T=y.target;[...l.branches].some(W=>W.contains(T))||(i==null||i(y),c==null||c(y),y.defaultPrevented||s==null||s())},h);return St(y=>{b===l.layers.size-1&&(r==null||r(y),!y.defaultPrevented&&s&&(y.preventDefault(),s()))},h),a.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(le=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),de(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=le)}},[f,h,n,l]),a.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),de())},[f,l]),a.useEffect(()=>{const y=()=>p({});return document.addEventListener(re,y),()=>document.removeEventListener(re,y)},[]),g.jsx(D.div,{...d,ref:R,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,P.onFocusCapture),onBlurCapture:O(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,w.onPointerDownCapture)})});Ne.displayName=Rt;var Nt="DismissableLayerBranch",Dt=a.forwardRef((e,t)=>{const n=a.useContext(Pe),r=a.useRef(null),o=I(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(D.div,{...e,ref:o})});Dt.displayName=Nt;function xt(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let d=function(){De(wt,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ot(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&De(Pt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function de(){const e=new CustomEvent(re);document.dispatchEvent(e)}function De(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ct(o,i):o.dispatchEvent(i)}var J="focusScope.autoFocusOnMount",Q="focusScope.autoFocusOnUnmount",fe={bubbles:!1,cancelable:!0},Tt="FocusScope",xe=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[s,d]=a.useState(null),l=B(o),f=B(i),v=a.useRef(null),h=I(t,u=>d(u)),p=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let u=function(C){if(p.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:x(v.current,{select:!0})},m=function(C){if(p.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||x(v.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&x(s)};document.addEventListener("focusin",u),document.addEventListener("focusout",m);const b=new MutationObserver(E);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",m),b.disconnect()}}},[r,s,p.paused]),a.useEffect(()=>{if(s){me.add(p);const u=document.activeElement;if(!s.contains(u)){const E=new CustomEvent(J,fe);s.addEventListener(J,l),s.dispatchEvent(E),E.defaultPrevented||(At(_t(Oe(s)),{select:!0}),document.activeElement===u&&x(s))}return()=>{s.removeEventListener(J,l),setTimeout(()=>{const E=new CustomEvent(Q,fe);s.addEventListener(Q,f),s.dispatchEvent(E),E.defaultPrevented||x(u??document.body,{select:!0}),s.removeEventListener(Q,f),me.remove(p)},0)}}},[s,l,f,p]);const R=a.useCallback(u=>{if(!n&&!r||p.paused)return;const m=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,E=document.activeElement;if(m&&E){const b=u.currentTarget,[C,S]=It(b);C&&S?!u.shiftKey&&E===S?(u.preventDefault(),n&&x(C,{select:!0})):u.shiftKey&&E===C&&(u.preventDefault(),n&&x(S,{select:!0})):E===b&&u.preventDefault()}},[n,r,p.paused]);return g.jsx(D.div,{tabIndex:-1,...c,ref:h,onKeyDown:R})});xe.displayName=Tt;function At(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(x(r,{select:t}),document.activeElement!==n)return}function It(e){const t=Oe(e),n=ve(t,e),r=ve(t.reverse(),e);return[n,r]}function Oe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ve(e,t){for(const n of e)if(!Lt(n,{upTo:t}))return n}function Lt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mt(e){return e instanceof HTMLInputElement&&"select"in e}function x(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mt(e)&&t&&e.select()}}var me=Ft();function Ft(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ge(e,t),e.unshift(t)},remove(t){var n;e=ge(e,t),(n=e[0])==null||n.resume()}}}function ge(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _t(e){return e.filter(t=>t.tagName!=="A")}var kt="Portal",Te=a.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=a.useState(!1);j(()=>i(!0),[]);const c=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return c?Qe.createPortal(g.jsx(D.div,{...r,ref:t}),c):null});Te.displayName=kt;function Wt(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var X=e=>{const{present:t,children:n}=e,r=jt(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),i=I(r.ref,Bt(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:i}):null};X.displayName="Presence";function jt(e){const[t,n]=a.useState(),r=a.useRef(null),o=a.useRef(e),i=a.useRef("none"),c=e?"mounted":"unmounted",[s,d]=Wt(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const l=$(r.current);i.current=s==="mounted"?l:"none"},[s]),j(()=>{const l=r.current,f=o.current;if(f!==e){const h=i.current,p=$(l);e?d("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?d("UNMOUNT"):d(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),j(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,v=p=>{const u=$(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&u&&(d("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=p=>{p.target===t&&(i.current=$(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:a.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function $(e){return(e==null?void 0:e.animationName)||"none"}function Bt(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ee=0;function Ut(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??he()),document.body.insertAdjacentElement("beforeend",e[1]??he()),ee++,()=>{ee===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ee--}},[])}function he(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G="right-scroll-bar-position",Y="width-before-scroll-bar",$t="with-scroll-bars-hidden",Vt="--removed-body-scroll-bar-size",Ae=et(),te=function(){},z=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:te,onWheelCapture:te,onTouchMoveCapture:te}),o=r[0],i=r[1],c=e.forwardProps,s=e.children,d=e.className,l=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,p=e.noRelative,R=e.noIsolation,u=e.inert,m=e.allowPinchZoom,E=e.as,b=E===void 0?"div":E,C=e.gapMode,S=tt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,P=nt([n,t]),y=_(_({},S),o);return a.createElement(a.Fragment,null,f&&a.createElement(w,{sideCar:Ae,removeScrollBar:l,shards:v,noRelative:p,noIsolation:R,inert:u,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:C}),c?a.cloneElement(a.Children.only(s),_(_({},y),{ref:P})):a.createElement(b,_({},y,{className:d,ref:P}),s))});z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};z.classNames={fullWidth:Y,zeroRight:G};var Kt={left:0,top:0,right:0,gap:0},ne=function(e){return parseInt(e||"",10)||0},Gt=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ne(n),ne(r),ne(o)]},Yt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kt;var t=Gt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ht=Se(),k="data-scroll-locked",Xt=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
1
+ import{r as a,j as g,E as Ce,F as Je,G as Qe,H as et,_ as tt,J as nt,K as _,L as Se,N as rt,O as ot,P as at}from"./vendor-y_uz1Wft.js";function O(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ue(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Re(...e){return t=>{let n=!1;const r=e.map(o=>{const i=ue(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():ue(e[o],null)}}}}function I(...e){return a.useCallback(Re(...e),e)}function it(e,t){const n=a.createContext(t),r=i=>{const{children:c,...s}=i,d=a.useMemo(()=>s,Object.values(s));return g.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function o(i){const c=a.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function st(e,t=[]){let n=[];function r(i,c){const s=a.createContext(c),d=n.length;n=[...n,c];const l=v=>{var E;const{scope:h,children:p,...R}=v,u=((E=h==null?void 0:h[e])==null?void 0:E[d])||s,m=a.useMemo(()=>R,Object.values(R));return g.jsx(u.Provider,{value:m,children:p})};l.displayName=i+"Provider";function f(v,h){var u;const p=((u=h==null?void 0:h[e])==null?void 0:u[d])||s,R=a.useContext(p);if(R)return R;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${i}\``)}return[l,f]}const o=()=>{const i=n.map(c=>a.createContext(c));return function(s){const d=(s==null?void 0:s[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:d}}),[s,d])}};return o.scopeName=e,[r,ct(o,...t)]}function ct(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((s,{useScope:d,scopeName:l})=>{const v=d(i)[`__scope${l}`];return{...s,...v}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var j=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},ut=Ce[" useId ".trim().toString()]||(()=>{}),lt=0;function q(e){const[t,n]=a.useState(ut());return j(()=>{n(r=>r??String(lt++))},[e]),e||(t?`radix-${t}`:"")}var dt=Ce[" useInsertionEffect ".trim().toString()]||j;function ft({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=vt({defaultProp:t,onChange:n}),s=e!==void 0,d=s?e:o;{const f=a.useRef(e!==void 0);a.useEffect(()=>{const v=f.current;v!==s&&console.warn(`${r} is changing from ${v?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const l=a.useCallback(f=>{var v;if(s){const h=mt(f)?f(e):f;h!==e&&((v=c.current)==null||v.call(c,h))}else i(f)},[s,e,i,c]);return[d,l]}function vt({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return dt(()=>{i.current=t},[t]),a.useEffect(()=>{var c;o.current!==n&&((c=i.current)==null||c.call(i,n),o.current=n)},[n,o]),[n,r,i]}function mt(e){return typeof e=="function"}function we(e){const t=gt(e),n=a.forwardRef((r,o)=>{const{children:i,...c}=r,s=a.Children.toArray(i),d=s.find(pt);if(d){const l=d.props.children,f=s.map(v=>v===d?a.Children.count(l)>1?a.Children.only(null):a.isValidElement(l)?l.props.children:null:v);return g.jsx(t,{...c,ref:o,children:a.isValidElement(l)?a.cloneElement(l,void 0,f):null})}return g.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function gt(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n;if(a.isValidElement(o)){const c=yt(o),s=Et(i,o.props);return o.type!==a.Fragment&&(s.ref=r?Re(r,c):c),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ht=Symbol("radix.slottable");function pt(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ht}function Et(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const d=i(...s);return o(...s),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function yt(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=bt.reduce((e,t)=>{const n=we(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:c,...s}=o,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ct(e,t){e&&Je.flushSync(()=>e.dispatchEvent(t))}function B(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function St(e,t=globalThis==null?void 0:globalThis.document){const n=B(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Rt="DismissableLayer",re="dismissableLayer.update",wt="dismissableLayer.pointerDownOutside",Pt="dismissableLayer.focusOutside",le,Pe=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ne=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...d}=e,l=a.useContext(Pe),[f,v]=a.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=a.useState({}),R=I(t,y=>v(y)),u=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),E=u.indexOf(m),b=f?u.indexOf(f):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=E,w=xt(y=>{const T=y.target,L=[...l.branches].some(W=>W.contains(T));!S||L||(o==null||o(y),c==null||c(y),y.defaultPrevented||s==null||s())},h),P=Ot(y=>{const T=y.target;[...l.branches].some(W=>W.contains(T))||(i==null||i(y),c==null||c(y),y.defaultPrevented||s==null||s())},h);return St(y=>{b===l.layers.size-1&&(r==null||r(y),!y.defaultPrevented&&s&&(y.preventDefault(),s()))},h),a.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(le=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),de(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=le)}},[f,h,n,l]),a.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),de())},[f,l]),a.useEffect(()=>{const y=()=>p({});return document.addEventListener(re,y),()=>document.removeEventListener(re,y)},[]),g.jsx(D.div,{...d,ref:R,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,P.onFocusCapture),onBlurCapture:O(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,w.onPointerDownCapture)})});Ne.displayName=Rt;var Nt="DismissableLayerBranch",Dt=a.forwardRef((e,t)=>{const n=a.useContext(Pe),r=a.useRef(null),o=I(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(D.div,{...e,ref:o})});Dt.displayName=Nt;function xt(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let d=function(){De(wt,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ot(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&De(Pt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function de(){const e=new CustomEvent(re);document.dispatchEvent(e)}function De(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ct(o,i):o.dispatchEvent(i)}var J="focusScope.autoFocusOnMount",Q="focusScope.autoFocusOnUnmount",fe={bubbles:!1,cancelable:!0},Tt="FocusScope",xe=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[s,d]=a.useState(null),l=B(o),f=B(i),v=a.useRef(null),h=I(t,u=>d(u)),p=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let u=function(C){if(p.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:x(v.current,{select:!0})},m=function(C){if(p.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||x(v.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&x(s)};document.addEventListener("focusin",u),document.addEventListener("focusout",m);const b=new MutationObserver(E);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",m),b.disconnect()}}},[r,s,p.paused]),a.useEffect(()=>{if(s){me.add(p);const u=document.activeElement;if(!s.contains(u)){const E=new CustomEvent(J,fe);s.addEventListener(J,l),s.dispatchEvent(E),E.defaultPrevented||(At(_t(Oe(s)),{select:!0}),document.activeElement===u&&x(s))}return()=>{s.removeEventListener(J,l),setTimeout(()=>{const E=new CustomEvent(Q,fe);s.addEventListener(Q,f),s.dispatchEvent(E),E.defaultPrevented||x(u??document.body,{select:!0}),s.removeEventListener(Q,f),me.remove(p)},0)}}},[s,l,f,p]);const R=a.useCallback(u=>{if(!n&&!r||p.paused)return;const m=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,E=document.activeElement;if(m&&E){const b=u.currentTarget,[C,S]=It(b);C&&S?!u.shiftKey&&E===S?(u.preventDefault(),n&&x(C,{select:!0})):u.shiftKey&&E===C&&(u.preventDefault(),n&&x(S,{select:!0})):E===b&&u.preventDefault()}},[n,r,p.paused]);return g.jsx(D.div,{tabIndex:-1,...c,ref:h,onKeyDown:R})});xe.displayName=Tt;function At(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(x(r,{select:t}),document.activeElement!==n)return}function It(e){const t=Oe(e),n=ve(t,e),r=ve(t.reverse(),e);return[n,r]}function Oe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ve(e,t){for(const n of e)if(!Lt(n,{upTo:t}))return n}function Lt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mt(e){return e instanceof HTMLInputElement&&"select"in e}function x(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mt(e)&&t&&e.select()}}var me=Ft();function Ft(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ge(e,t),e.unshift(t)},remove(t){var n;e=ge(e,t),(n=e[0])==null||n.resume()}}}function ge(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _t(e){return e.filter(t=>t.tagName!=="A")}var kt="Portal",Te=a.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=a.useState(!1);j(()=>i(!0),[]);const c=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return c?Qe.createPortal(g.jsx(D.div,{...r,ref:t}),c):null});Te.displayName=kt;function Wt(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var X=e=>{const{present:t,children:n}=e,r=jt(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),i=I(r.ref,Bt(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:i}):null};X.displayName="Presence";function jt(e){const[t,n]=a.useState(),r=a.useRef(null),o=a.useRef(e),i=a.useRef("none"),c=e?"mounted":"unmounted",[s,d]=Wt(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const l=$(r.current);i.current=s==="mounted"?l:"none"},[s]),j(()=>{const l=r.current,f=o.current;if(f!==e){const h=i.current,p=$(l);e?d("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?d("UNMOUNT"):d(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),j(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,v=p=>{const u=$(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&u&&(d("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=p=>{p.target===t&&(i.current=$(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:a.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function $(e){return(e==null?void 0:e.animationName)||"none"}function Bt(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ee=0;function Ut(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??he()),document.body.insertAdjacentElement("beforeend",e[1]??he()),ee++,()=>{ee===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ee--}},[])}function he(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G="right-scroll-bar-position",Y="width-before-scroll-bar",$t="with-scroll-bars-hidden",Vt="--removed-body-scroll-bar-size",Ae=et(),te=function(){},z=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:te,onWheelCapture:te,onTouchMoveCapture:te}),o=r[0],i=r[1],c=e.forwardProps,s=e.children,d=e.className,l=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,p=e.noRelative,R=e.noIsolation,u=e.inert,m=e.allowPinchZoom,E=e.as,b=E===void 0?"div":E,C=e.gapMode,S=tt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,P=nt([n,t]),y=_(_({},S),o);return a.createElement(a.Fragment,null,f&&a.createElement(w,{sideCar:Ae,removeScrollBar:l,shards:v,noRelative:p,noIsolation:R,inert:u,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:C}),c?a.cloneElement(a.Children.only(s),_(_({},y),{ref:P})):a.createElement(b,_({},y,{className:d,ref:P}),s))});z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};z.classNames={fullWidth:Y,zeroRight:G};var Kt={left:0,top:0,right:0,gap:0},ne=function(e){return parseInt(e||"",10)||0},Gt=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ne(n),ne(r),ne(o)]},Yt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kt;var t=Gt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ht=Se(),k="data-scroll-locked",Xt=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat($t,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -1 +1 @@
1
- import{r as l}from"./vendor-B7FKSwHK.js";function B(a,i,n){return Math.min(n,Math.max(i,a))}function F(a,i,n){const d=(n==null?void 0:n.offset)??8,c=(n==null?void 0:n.margin)??12,w=(n==null?void 0:n.preferredMaxHeight)??320,o=(n==null?void 0:n.minHeight)??160,[b,f]=l.useState(null),s=l.useCallback(()=>{const r=a.current;if(!r||typeof window>"u"){f(null);return}const t=r.getBoundingClientRect(),e=window.visualViewport,g=(e==null?void 0:e.width)??window.innerWidth,H=(e==null?void 0:e.height)??window.innerHeight,u=(e==null?void 0:e.offsetLeft)??0,m=(e==null?void 0:e.offsetTop)??0,L=Math.min(t.width,g-c*2),M=u+g-c-L,y=B(t.left,u+c,M),h=m+H-t.bottom-d-c,v=t.top-m-d-c,x=h<o&&v>h,A=Math.max(o,x?v:h),E=Math.min(w,A),z=x?Math.max(m+c,t.top-d-E):t.bottom+d;f({position:"fixed",left:y,top:z,width:L,maxHeight:E})},[a,c,o,d,w]);return l.useEffect(()=>{if(!i||typeof window>"u"){f(null);return}let r=0;const t=()=>{r===0&&(r=window.requestAnimationFrame(()=>{r=0,s()}))};s();const e=window.visualViewport;return window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),e==null||e.addEventListener("resize",t),e==null||e.addEventListener("scroll",t),()=>{r!==0&&window.cancelAnimationFrame(r),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0),e==null||e.removeEventListener("resize",t),e==null||e.removeEventListener("scroll",t)}},[i,s]),b}export{F as u};
1
+ import{r as l}from"./vendor-y_uz1Wft.js";function B(a,i,n){return Math.min(n,Math.max(i,a))}function F(a,i,n){const d=(n==null?void 0:n.offset)??8,c=(n==null?void 0:n.margin)??12,w=(n==null?void 0:n.preferredMaxHeight)??320,o=(n==null?void 0:n.minHeight)??160,[b,f]=l.useState(null),s=l.useCallback(()=>{const r=a.current;if(!r||typeof window>"u"){f(null);return}const t=r.getBoundingClientRect(),e=window.visualViewport,g=(e==null?void 0:e.width)??window.innerWidth,H=(e==null?void 0:e.height)??window.innerHeight,u=(e==null?void 0:e.offsetLeft)??0,m=(e==null?void 0:e.offsetTop)??0,L=Math.min(t.width,g-c*2),M=u+g-c-L,y=B(t.left,u+c,M),h=m+H-t.bottom-d-c,v=t.top-m-d-c,x=h<o&&v>h,A=Math.max(o,x?v:h),E=Math.min(w,A),z=x?Math.max(m+c,t.top-d-E):t.bottom+d;f({position:"fixed",left:y,top:z,width:L,maxHeight:E})},[a,c,o,d,w]);return l.useEffect(()=>{if(!i||typeof window>"u"){f(null);return}let r=0;const t=()=>{r===0&&(r=window.requestAnimationFrame(()=>{r=0,s()}))};s();const e=window.visualViewport;return window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),e==null||e.addEventListener("resize",t),e==null||e.addEventListener("scroll",t),()=>{r!==0&&window.cancelAnimationFrame(r),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0),e==null||e.removeEventListener("resize",t),e==null||e.removeEventListener("scroll",t)}},[i,s]),b}export{F as u};
@@ -1 +1 @@
1
- import{r as n}from"./vendor-B7FKSwHK.js";function t(e){return e.replaceAll("\\","\\\\").replaceAll('"','\\"')}function i(e){n.useEffect(()=>{if(!e||typeof document>"u")return;const o=window.requestAnimationFrame(()=>{const r=document.querySelector(`[data-psyche-focus-id="${t(e)}"]`);r&&r.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})});return()=>window.cancelAnimationFrame(o)},[e])}function s(e){return e?"border-[color-mix(in_srgb,var(--info)_34%,var(--ui-border-subtle)_66%)] bg-[color-mix(in_srgb,var(--info)_12%,var(--ui-surface-1)_88%)] shadow-[var(--ui-shadow-soft)]":""}export{s as p,i as u};
1
+ import{r as n}from"./vendor-y_uz1Wft.js";function t(e){return e.replaceAll("\\","\\\\").replaceAll('"','\\"')}function i(e){n.useEffect(()=>{if(!e||typeof document>"u")return;const o=window.requestAnimationFrame(()=>{const r=document.querySelector(`[data-psyche-focus-id="${t(e)}"]`);r&&r.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})});return()=>window.cancelAnimationFrame(o)},[e])}function s(e){return e?"border-[color-mix(in_srgb,var(--info)_34%,var(--ui-border-subtle)_66%)] bg-[color-mix(in_srgb,var(--info)_12%,var(--ui-surface-1)_88%)] shadow-[var(--ui-shadow-soft)]":""}export{s as p,i as u};
@@ -1 +1 @@
1
- import{j as a,b3 as d,bJ as x}from"./vendor-B7FKSwHK.js";import{j as t,c as s}from"./index-gmPaoLN-.js";function c({user:r,compact:i=!1,size:n,className:o}){if(!r)return a.jsx(t,{size:n??(i?"sm":"md"),className:s("border-[var(--ui-border-subtle)] bg-[var(--ui-surface-1)] text-[var(--ui-ink-soft)]",o),children:"Unassigned"});const e=r.kind==="bot"?d:x;return a.jsxs(t,{size:n??(i?"sm":"md"),className:s("max-w-full gap-1.5 border",r.kind==="bot"?"border-[color-mix(in_srgb,var(--info)_24%,transparent)] bg-[var(--ui-info-soft)] text-[color-mix(in_srgb,var(--info)_78%,var(--ui-ink-strong)_22%)]":"border-[color-mix(in_srgb,var(--warning)_24%,transparent)] bg-[var(--ui-warning-soft)] text-[color-mix(in_srgb,var(--warning)_78%,var(--ui-ink-strong)_22%)]",n==="xs"&&"gap-1",o),children:[a.jsx(e,{className:s(n==="xs"?"size-3":"size-3.5","shrink-0")}),a.jsx("span",{className:"truncate",children:r.displayName}),a.jsx("span",{className:"text-[var(--ui-ink-faint)]",children:r.kind})]})}export{c as U};
1
+ import{j as a,b3 as d,bJ as x}from"./vendor-y_uz1Wft.js";import{j as t,c as s}from"./index-Dj8q65se.js";function c({user:r,compact:i=!1,size:n,className:o}){if(!r)return a.jsx(t,{size:n??(i?"sm":"md"),className:s("border-[var(--ui-border-subtle)] bg-[var(--ui-surface-1)] text-[var(--ui-ink-soft)]",o),children:"Unassigned"});const e=r.kind==="bot"?d:x;return a.jsxs(t,{size:n??(i?"sm":"md"),className:s("max-w-full gap-1.5 border",r.kind==="bot"?"border-[color-mix(in_srgb,var(--info)_24%,transparent)] bg-[var(--ui-info-soft)] text-[color-mix(in_srgb,var(--info)_78%,var(--ui-ink-strong)_22%)]":"border-[color-mix(in_srgb,var(--warning)_24%,transparent)] bg-[var(--ui-warning-soft)] text-[color-mix(in_srgb,var(--warning)_78%,var(--ui-ink-strong)_22%)]",n==="xs"&&"gap-1",o),children:[a.jsx(e,{className:s(n==="xs"?"size-3":"size-3.5","shrink-0")}),a.jsx("span",{className:"truncate",children:r.displayName}),a.jsx("span",{className:"text-[var(--ui-ink-faint)]",children:r.kind})]})}export{c as U};
@@ -1 +1 @@
1
- import{j as t}from"./vendor-B7FKSwHK.js";function d({value:a,users:i,onChange:s,label:l="Owner",defaultLabel:r="Default Forge owner",help:n}){return t.jsxs("label",{className:"grid gap-2",children:[t.jsx("span",{className:"text-sm font-medium text-white",children:l}),n?t.jsx("span",{className:"text-xs leading-5 text-white/52",children:n}):null,t.jsxs("select",{value:a??"",onChange:e=>s(e.target.value||null),className:"min-h-10 rounded-[var(--radius-control)] border border-white/10 bg-white/[0.04] px-3 py-2 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.3)]",children:[t.jsx("option",{value:"",children:r}),i.map(e=>t.jsxs("option",{value:e.id,children:[e.displayName," · ",e.kind]},e.id))]})]})}export{d as U};
1
+ import{j as t}from"./vendor-y_uz1Wft.js";function d({value:a,users:i,onChange:s,label:l="Owner",defaultLabel:r="Default Forge owner",help:n}){return t.jsxs("label",{className:"grid gap-2",children:[t.jsx("span",{className:"text-sm font-medium text-white",children:l}),n?t.jsx("span",{className:"text-xs leading-5 text-white/52",children:n}):null,t.jsxs("select",{value:a??"",onChange:e=>s(e.target.value||null),className:"min-h-10 rounded-[var(--radius-control)] border border-white/10 bg-white/[0.04] px-3 py-2 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.3)]",children:[t.jsx("option",{value:"",children:r}),i.map(e=>t.jsxs("option",{value:e.id,children:[e.displayName," · ",e.kind]},e.id))]})]})}export{d as U};
@@ -1,3 +1,3 @@
1
- import{r as c,j as e,b9 as P,cZ as T,aV as L,c_ as Q,cQ as U,aS as v,cq as $}from"./vendor-B7FKSwHK.js";import{j as E,k as N}from"./state-BFyKSULP.js";import{c as w,aj as z,cu as _}from"./index-gmPaoLN-.js";import{c as f,a as u,n as m,m as j,j as g}from"./generic-node-view-BY5dbPXJ.js";function O(t){const i=new Date(t.getFullYear(),t.getMonth(),1),r=(i.getDay()+6)%7,n=new Date(i);return n.setDate(n.getDate()-r),Array.from({length:35},(a,s)=>{const l=new Date(n);return l.setDate(n.getDate()+s),l})}function R(t,i){return typeof window>"u"?i:window.localStorage.getItem(t)??i}function A(t,i){typeof window>"u"||window.localStorage.setItem(t,i)}function C({compact:t}){const[i,r]=c.useState(()=>new Date);return c.useEffect(()=>{const n=window.setInterval(()=>r(new Date),3e4);return()=>window.clearInterval(n)},[]),e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white/45",children:[e.jsx(P,{className:"size-4"}),e.jsx("span",{className:"text-[12px] uppercase tracking-[0.16em]",children:"Local time"})]}),e.jsx("div",{className:w("font-display text-white",t?"text-3xl":"text-5xl"),children:new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(i)}),e.jsx("div",{className:"text-sm text-white/58",children:new Intl.DateTimeFormat(void 0,{weekday:"long",month:"long",day:"numeric"}).format(i)})]})}function W({compact:t}){const i=new Date,r=c.useMemo(()=>O(i),[i]),n=t?["M","T","W","T","F","S","S"]:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];return e.jsxs("div",{className:"grid gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-white",children:[e.jsx(L,{className:"size-4 text-[var(--primary)]"}),new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}).format(i)]}),e.jsx("div",{className:"text-[12px] text-white/45",children:t?"Mini":"Month view"})]}),e.jsxs("div",{className:"grid grid-cols-7 gap-1.5",children:[n.map(a=>e.jsx("div",{className:"text-center text-[11px] uppercase tracking-[0.14em] text-white/35",children:a},a)),r.map(a=>{const s=a.getMonth()===i.getMonth(),l=a.toDateString()===i.toDateString();return e.jsx("div",{className:w("flex min-h-9 items-center justify-center rounded-xl text-sm",l?"bg-[var(--primary)] text-slate-950":s?"bg-white/[0.04] text-white/78":"bg-transparent text-white/24"),children:a.getDate()},a.toISOString())})]})]})}function D({surfaceId:t}){const i=`forge.utility.spotify.${t}`,[r,n]=c.useState(()=>R(i,"https://open.spotify.com/"));return c.useEffect(()=>{A(i,r)},[i,r]),e.jsxs("div",{className:"grid h-full gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(Q,{className:"size-4 text-[var(--secondary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Spotify link"})]}),e.jsx("input",{value:r,onChange:a=>n(a.target.value),className:"w-full rounded-2xl border border-white/10 bg-white/[0.04] px-3 py-2.5 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",placeholder:"Paste a playlist, album, or artist URL"}),e.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(78,222,163,0.14)] px-3 py-2 text-sm font-medium text-[var(--secondary)] transition hover:bg-[rgba(78,222,163,0.22)]",children:["Open Spotify",e.jsx(U,{className:"size-4"})]})]})}function F({compact:t}){const[i,r]=c.useState(null),[n,a]=c.useState("Locating…");return c.useEffect(()=>{if(typeof navigator>"u"||!navigator.geolocation){a("Location unavailable");return}let s=!1;return navigator.geolocation.getCurrentPosition(async l=>{try{const p=await(await fetch(`https://api.open-meteo.com/v1/forecast?latitude=${l.coords.latitude}&longitude=${l.coords.longitude}&current=temperature_2m,weather_code`)).json();if(s||!p.current)return;r({temperature:Number(p.current.temperature_2m??0),weatherCode:Number(p.current.weather_code??0)}),a("Live")}catch{s||a("Weather unavailable")}},()=>{s||a("Permission denied")},{maximumAge:3e5,timeout:6e3}),()=>{s=!0}},[]),e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(T,{className:"size-4 text-[var(--tertiary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Weather"})]}),i?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:w("font-display text-white",t?"text-3xl":"text-5xl"),children:[Math.round(i.temperature),"°"]}),e.jsxs("div",{className:"text-sm text-white/58",children:["Code ",i.weatherCode," · ",n]})]}):e.jsx("div",{className:"text-sm text-white/58",children:n})]})}function I({compact:t,defaultUserId:i}){const r=E(),n=c.useRef(null),a=c.useRef(null),[s,l]=c.useState(""),[d,p]=c.useState(""),k=N({mutationFn:async()=>z({contentMarkdown:`# ${s.trim()||"Quick note"}
1
+ import{r as c,j as e,b9 as P,c_ as T,aV as L,c$ as Q,cR as $,aS as v,cs as U}from"./vendor-y_uz1Wft.js";import{j as E,k as N}from"./state-DWw8Jay_.js";import{c as w,aj as z,cu as R}from"./index-Dj8q65se.js";import{c as f,a as u,n as m,m as j,j as g}from"./generic-node-view-C1kLClIm.js";function _(t){const i=new Date(t.getFullYear(),t.getMonth(),1),r=(i.getDay()+6)%7,n=new Date(i);return n.setDate(n.getDate()-r),Array.from({length:35},(a,s)=>{const l=new Date(n);return l.setDate(n.getDate()+s),l})}function O(t,i){return typeof window>"u"?i:window.localStorage.getItem(t)??i}function A(t,i){typeof window>"u"||window.localStorage.setItem(t,i)}function C({compact:t}){const[i,r]=c.useState(()=>new Date);return c.useEffect(()=>{const n=window.setInterval(()=>r(new Date),3e4);return()=>window.clearInterval(n)},[]),e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white/45",children:[e.jsx(P,{className:"size-4"}),e.jsx("span",{className:"text-[12px] uppercase tracking-[0.16em]",children:"Local time"})]}),e.jsx("div",{className:w("font-display text-white",t?"text-3xl":"text-5xl"),children:new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(i)}),e.jsx("div",{className:"text-sm text-white/58",children:new Intl.DateTimeFormat(void 0,{weekday:"long",month:"long",day:"numeric"}).format(i)})]})}function W({compact:t}){const i=new Date,r=c.useMemo(()=>_(i),[i]),n=t?["M","T","W","T","F","S","S"]:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];return e.jsxs("div",{className:"grid gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-white",children:[e.jsx(L,{className:"size-4 text-[var(--primary)]"}),new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}).format(i)]}),e.jsx("div",{className:"text-[12px] text-white/45",children:t?"Mini":"Month view"})]}),e.jsxs("div",{className:"grid grid-cols-7 gap-1.5",children:[n.map(a=>e.jsx("div",{className:"text-center text-[11px] uppercase tracking-[0.14em] text-white/35",children:a},a)),r.map(a=>{const s=a.getMonth()===i.getMonth(),l=a.toDateString()===i.toDateString();return e.jsx("div",{className:w("flex min-h-9 items-center justify-center rounded-xl text-sm",l?"bg-[var(--primary)] text-slate-950":s?"bg-white/[0.04] text-white/78":"bg-transparent text-white/24"),children:a.getDate()},a.toISOString())})]})]})}function D({surfaceId:t}){const i=`forge.utility.spotify.${t}`,[r,n]=c.useState(()=>O(i,"https://open.spotify.com/"));return c.useEffect(()=>{A(i,r)},[i,r]),e.jsxs("div",{className:"grid h-full gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(Q,{className:"size-4 text-[var(--secondary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Spotify link"})]}),e.jsx("input",{value:r,onChange:a=>n(a.target.value),className:"w-full rounded-2xl border border-white/10 bg-white/[0.04] px-3 py-2.5 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",placeholder:"Paste a playlist, album, or artist URL"}),e.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(78,222,163,0.14)] px-3 py-2 text-sm font-medium text-[var(--secondary)] transition hover:bg-[rgba(78,222,163,0.22)]",children:["Open Spotify",e.jsx($,{className:"size-4"})]})]})}function F({compact:t}){const[i,r]=c.useState(null),[n,a]=c.useState("Locating…");return c.useEffect(()=>{if(typeof navigator>"u"||!navigator.geolocation){a("Location unavailable");return}let s=!1;return navigator.geolocation.getCurrentPosition(async l=>{try{const p=await(await fetch(`https://api.open-meteo.com/v1/forecast?latitude=${l.coords.latitude}&longitude=${l.coords.longitude}&current=temperature_2m,weather_code`)).json();if(s||!p.current)return;r({temperature:Number(p.current.temperature_2m??0),weatherCode:Number(p.current.weather_code??0)}),a("Live")}catch{s||a("Weather unavailable")}},()=>{s||a("Permission denied")},{maximumAge:3e5,timeout:6e3}),()=>{s=!0}},[]),e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(T,{className:"size-4 text-[var(--tertiary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Weather"})]}),i?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:w("font-display text-white",t?"text-3xl":"text-5xl"),children:[Math.round(i.temperature),"°"]}),e.jsxs("div",{className:"text-sm text-white/58",children:["Code ",i.weatherCode," · ",n]})]}):e.jsx("div",{className:"text-sm text-white/58",children:n})]})}function I({compact:t,defaultUserId:i}){const r=E(),n=c.useRef(null),a=c.useRef(null),[s,l]=c.useState(""),[d,p]=c.useState(""),k=N({mutationFn:async()=>z({contentMarkdown:`# ${s.trim()||"Quick note"}
2
2
 
3
- ${d.trim()}`,author:"Forge quick capture",userId:i??null,links:[]}),onSuccess:async()=>{l(""),p(""),await r.invalidateQueries({queryKey:["notes-index"]})}}),S=N({mutationFn:async()=>_({title:s.trim()||"Quick capture",contentMarkdown:d.trim(),summary:d.trim().slice(0,180),author:"Forge quick capture"}),onSuccess:async()=>{l(""),p(""),await r.invalidateQueries({queryKey:["wiki-pages"]})}});function x(o,M=o){const h=a.current;if(!h)return;const y=h.selectionStart??0,b=h.selectionEnd??0,V=d.slice(y,b),q=`${d.slice(0,y)}${o}${V}${M}${d.slice(b)}`;p(q),requestAnimationFrame(()=>{h.focus(),h.selectionStart=y+o.length,h.selectionEnd=b+o.length})}return e.jsxs("div",{className:"grid h-full min-h-0 gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(v,{className:"size-4 text-[var(--primary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Quick capture"})]}),e.jsx("input",{ref:n,value:s,onChange:o=>l(o.target.value),className:"w-full rounded-2xl border border-white/10 bg-white/[0.04] px-3 py-2.5 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",placeholder:"Title"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:[{label:"B",action:()=>x("**")},{label:"I",action:()=>x("_")},{label:"H1",action:()=>x("# ","")},{label:"[]",action:()=>x("- [ ] ","")}].map(o=>e.jsx("button",{type:"button",className:"inline-flex min-h-8 items-center justify-center rounded-xl bg-white/[0.05] px-2.5 text-[12px] font-semibold text-white/72 transition hover:bg-white/[0.08] hover:text-white",onClick:o.action,children:o.label},o.label))}),e.jsx("textarea",{ref:a,value:d,onChange:o=>p(o.target.value),className:w("min-h-0 w-full rounded-[20px] border border-white/10 bg-white/[0.04] px-3 py-3 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",t?"h-28":"h-40"),placeholder:"Write a quick note or rough wiki draft"}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(192,193,255,0.16)] px-3 py-2 text-sm font-medium text-[var(--primary)] transition hover:bg-[rgba(192,193,255,0.24)] disabled:opacity-50",disabled:!d.trim()||k.isPending,onClick:()=>k.mutate(),children:[e.jsx($,{className:"size-4"}),"Save as note"]}),e.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(255,185,95,0.16)] px-3 py-2 text-sm font-medium text-[var(--tertiary)] transition hover:bg-[rgba(255,185,95,0.24)] disabled:opacity-50",disabled:!d.trim()||S.isPending,onClick:()=>S.mutate(),children:[e.jsx(v,{className:"size-4"}),"Save as wiki"]})]})]})}const K={id:"surface:utility:time",surfaceId:"utility",routePath:null,title:"Clock",icon:"timer",description:"Live local time widget.",category:"Utilities",tags:["utility","clock"],inputs:[],params:[],output:[u({label:"Current time",description:"Formatted local time string published by the clock widget."}),m({key:"clock",label:"Clock state",description:"Structured clock state including the current ISO timestamp.",modelName:"ForgeClockState"})],tools:[],NodeView:f({title:"Clock",description:"Live local time widget.",inputs:[],params:[],output:[u({label:"Current time",description:"Formatted local time string published by the clock widget."}),m({key:"clock",label:"Clock state",description:"Structured clock state including the current ISO timestamp.",modelName:"ForgeClockState"})],tools:[]}),WebView:C,execute:t=>g(t,{clock:{now:t.context.now}},new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(new Date(t.context.now)))};C.workbench=K;const G={id:"surface:utility:mini-calendar",surfaceId:"utility",routePath:null,title:"Mini calendar",icon:"calendar",description:"Compact month calendar widget.",category:"Utilities",tags:["utility","calendar"],inputs:[],params:[],output:[u({label:"Month view",description:"Summary of the compact month calendar widget."}),m({key:"calendarView",label:"Calendar view",description:"Structured mini-calendar state including the current month anchor.",modelName:"ForgeMiniCalendarView"})],tools:[],NodeView:f({title:"Mini calendar",description:"Compact month calendar widget.",inputs:[],params:[],output:[u({label:"Month view",description:"Summary of the compact month calendar widget."}),m({key:"calendarView",label:"Calendar view",description:"Structured mini-calendar state including the current month anchor.",modelName:"ForgeMiniCalendarView"})],tools:[]}),WebView:W,execute:t=>g(t,{calendarView:{now:t.context.now}},"Compact month calendar")};W.workbench=G;const B={id:"surface:utility:spotify",surfaceId:"utility",routePath:null,title:"Spotify",icon:"music",description:"Pinned music link widget.",category:"Utilities",tags:["utility","spotify"],inputs:[{key:"surfaceId",label:"Surface id",kind:"text",required:!1}],params:[],output:[u({label:"Spotify link",description:"Summary of the pinned music link widget."}),m({key:"spotifyLink",label:"Spotify state",description:"Structured Spotify widget state and pinned surface context.",modelName:"ForgeSpotifyWidgetState"})],tools:[],NodeView:f({title:"Spotify",description:"Pinned music link widget.",inputs:[{key:"surfaceId",label:"Surface id",kind:"text"}],params:[],output:[u({label:"Spotify link",description:"Summary of the pinned music link widget."}),m({key:"spotifyLink",label:"Spotify state",description:"Structured Spotify widget state and pinned surface context.",modelName:"ForgeSpotifyWidgetState"})],tools:[]}),WebView:D,execute:t=>g(t,{spotifyLink:{surfaceId:t.inputs.surfaceId??null}},"Pinned Spotify link")};D.workbench=B;const H={id:"surface:utility:weather",surfaceId:"utility",routePath:null,title:"Weather",icon:"weather",description:"Location-aware weather widget.",category:"Utilities",tags:["utility","weather"],inputs:[],params:[],output:[u({label:"Weather summary",description:"Summary of the weather widget state."}),m({key:"weather",label:"Weather payload",description:"Structured weather widget payload.",modelName:"ForgeWeatherWidgetState"})],tools:[],NodeView:f({title:"Weather",description:"Location-aware weather widget.",inputs:[],params:[],output:[u({label:"Weather summary",description:"Summary of the weather widget state."}),m({key:"weather",label:"Weather payload",description:"Structured weather widget payload.",modelName:"ForgeWeatherWidgetState"})],tools:[]}),WebView:F,execute:t=>g(t,{weather:null},"Weather widget")};F.workbench=H;const Y={id:"surface:utility:quick-capture",surfaceId:"utility",routePath:null,title:"Quick capture",icon:"capture",description:"Draft a quick note or wiki page.",category:"Capture",tags:["capture","notes"],inputs:[{key:"defaultUserId",label:"Default user id",kind:"text",required:!1}],params:[],output:[u({label:"Draft summary",description:"Summary of the quick-capture draft state."}),m({key:"draft",label:"Draft context",description:"Structured quick-capture draft context.",modelName:"ForgeQuickCaptureDraft"})],tools:[j("Create a Forge evidence note from captured markdown.")],NodeView:f({title:"Quick capture",description:"Draft a quick note or wiki page.",inputs:[{key:"defaultUserId",label:"Default user id",kind:"text"}],params:[],output:[u({label:"Draft summary",description:"Summary of the quick-capture draft state."}),m({key:"draft",label:"Draft context",description:"Structured quick-capture draft context.",modelName:"ForgeQuickCaptureDraft"})],tools:[j("Create a Forge evidence note from captured markdown.")]}),WebView:I,execute:t=>g(t,{draft:{defaultUserId:t.inputs.defaultUserId??null}},"Quick capture can draft notes and wiki pages.")};I.workbench=Y;export{W as M,I as Q,D as S,C as T,F as W};
3
+ ${d.trim()}`,author:"Forge quick capture",userId:i??null,links:[]}),onSuccess:async()=>{l(""),p(""),await r.invalidateQueries({queryKey:["notes-index"]})}}),S=N({mutationFn:async()=>R({title:s.trim()||"Quick capture",contentMarkdown:d.trim(),summary:d.trim().slice(0,180),author:"Forge quick capture"}),onSuccess:async()=>{l(""),p(""),await r.invalidateQueries({queryKey:["wiki-pages"]})}});function x(o,M=o){const h=a.current;if(!h)return;const y=h.selectionStart??0,b=h.selectionEnd??0,V=d.slice(y,b),q=`${d.slice(0,y)}${o}${V}${M}${d.slice(b)}`;p(q),requestAnimationFrame(()=>{h.focus(),h.selectionStart=y+o.length,h.selectionEnd=b+o.length})}return e.jsxs("div",{className:"grid h-full min-h-0 gap-3 rounded-[20px] bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(v,{className:"size-4 text-[var(--primary)]"}),e.jsx("span",{className:"text-sm font-semibold",children:"Quick capture"})]}),e.jsx("input",{ref:n,value:s,onChange:o=>l(o.target.value),className:"w-full rounded-2xl border border-white/10 bg-white/[0.04] px-3 py-2.5 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",placeholder:"Title"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:[{label:"B",action:()=>x("**")},{label:"I",action:()=>x("_")},{label:"H1",action:()=>x("# ","")},{label:"[]",action:()=>x("- [ ] ","")}].map(o=>e.jsx("button",{type:"button",className:"inline-flex min-h-8 items-center justify-center rounded-xl bg-white/[0.05] px-2.5 text-[12px] font-semibold text-white/72 transition hover:bg-white/[0.08] hover:text-white",onClick:o.action,children:o.label},o.label))}),e.jsx("textarea",{ref:a,value:d,onChange:o=>p(o.target.value),className:w("min-h-0 w-full rounded-[20px] border border-white/10 bg-white/[0.04] px-3 py-3 text-sm text-white outline-none transition focus:border-[rgba(192,193,255,0.35)]",t?"h-28":"h-40"),placeholder:"Write a quick note or rough wiki draft"}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(192,193,255,0.16)] px-3 py-2 text-sm font-medium text-[var(--primary)] transition hover:bg-[rgba(192,193,255,0.24)] disabled:opacity-50",disabled:!d.trim()||k.isPending,onClick:()=>k.mutate(),children:[e.jsx(U,{className:"size-4"}),"Save as note"]}),e.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-2xl bg-[rgba(255,185,95,0.16)] px-3 py-2 text-sm font-medium text-[var(--tertiary)] transition hover:bg-[rgba(255,185,95,0.24)] disabled:opacity-50",disabled:!d.trim()||S.isPending,onClick:()=>S.mutate(),children:[e.jsx(v,{className:"size-4"}),"Save as wiki"]})]})]})}const K={id:"surface:utility:time",surfaceId:"utility",routePath:null,title:"Clock",icon:"timer",description:"Live local time widget.",category:"Utilities",tags:["utility","clock"],inputs:[],params:[],output:[u({label:"Current time",description:"Formatted local time string published by the clock widget."}),m({key:"clock",label:"Clock state",description:"Structured clock state including the current ISO timestamp.",modelName:"ForgeClockState"})],tools:[],NodeView:f({title:"Clock",description:"Live local time widget.",inputs:[],params:[],output:[u({label:"Current time",description:"Formatted local time string published by the clock widget."}),m({key:"clock",label:"Clock state",description:"Structured clock state including the current ISO timestamp.",modelName:"ForgeClockState"})],tools:[]}),WebView:C,execute:t=>g(t,{clock:{now:t.context.now}},new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(new Date(t.context.now)))};C.workbench=K;const G={id:"surface:utility:mini-calendar",surfaceId:"utility",routePath:null,title:"Mini calendar",icon:"calendar",description:"Compact month calendar widget.",category:"Utilities",tags:["utility","calendar"],inputs:[],params:[],output:[u({label:"Month view",description:"Summary of the compact month calendar widget."}),m({key:"calendarView",label:"Calendar view",description:"Structured mini-calendar state including the current month anchor.",modelName:"ForgeMiniCalendarView"})],tools:[],NodeView:f({title:"Mini calendar",description:"Compact month calendar widget.",inputs:[],params:[],output:[u({label:"Month view",description:"Summary of the compact month calendar widget."}),m({key:"calendarView",label:"Calendar view",description:"Structured mini-calendar state including the current month anchor.",modelName:"ForgeMiniCalendarView"})],tools:[]}),WebView:W,execute:t=>g(t,{calendarView:{now:t.context.now}},"Compact month calendar")};W.workbench=G;const B={id:"surface:utility:spotify",surfaceId:"utility",routePath:null,title:"Spotify",icon:"music",description:"Pinned music link widget.",category:"Utilities",tags:["utility","spotify"],inputs:[{key:"surfaceId",label:"Surface id",kind:"text",required:!1}],params:[],output:[u({label:"Spotify link",description:"Summary of the pinned music link widget."}),m({key:"spotifyLink",label:"Spotify state",description:"Structured Spotify widget state and pinned surface context.",modelName:"ForgeSpotifyWidgetState"})],tools:[],NodeView:f({title:"Spotify",description:"Pinned music link widget.",inputs:[{key:"surfaceId",label:"Surface id",kind:"text"}],params:[],output:[u({label:"Spotify link",description:"Summary of the pinned music link widget."}),m({key:"spotifyLink",label:"Spotify state",description:"Structured Spotify widget state and pinned surface context.",modelName:"ForgeSpotifyWidgetState"})],tools:[]}),WebView:D,execute:t=>g(t,{spotifyLink:{surfaceId:t.inputs.surfaceId??null}},"Pinned Spotify link")};D.workbench=B;const H={id:"surface:utility:weather",surfaceId:"utility",routePath:null,title:"Weather",icon:"weather",description:"Location-aware weather widget.",category:"Utilities",tags:["utility","weather"],inputs:[],params:[],output:[u({label:"Weather summary",description:"Summary of the weather widget state."}),m({key:"weather",label:"Weather payload",description:"Structured weather widget payload.",modelName:"ForgeWeatherWidgetState"})],tools:[],NodeView:f({title:"Weather",description:"Location-aware weather widget.",inputs:[],params:[],output:[u({label:"Weather summary",description:"Summary of the weather widget state."}),m({key:"weather",label:"Weather payload",description:"Structured weather widget payload.",modelName:"ForgeWeatherWidgetState"})],tools:[]}),WebView:F,execute:t=>g(t,{weather:null},"Weather widget")};F.workbench=H;const Y={id:"surface:utility:quick-capture",surfaceId:"utility",routePath:null,title:"Quick capture",icon:"capture",description:"Draft a quick note or wiki page.",category:"Capture",tags:["capture","notes"],inputs:[{key:"defaultUserId",label:"Default user id",kind:"text",required:!1}],params:[],output:[u({label:"Draft summary",description:"Summary of the quick-capture draft state."}),m({key:"draft",label:"Draft context",description:"Structured quick-capture draft context.",modelName:"ForgeQuickCaptureDraft"})],tools:[j("Create a Forge evidence note from captured markdown.")],NodeView:f({title:"Quick capture",description:"Draft a quick note or wiki page.",inputs:[{key:"defaultUserId",label:"Default user id",kind:"text"}],params:[],output:[u({label:"Draft summary",description:"Summary of the quick-capture draft state."}),m({key:"draft",label:"Draft context",description:"Structured quick-capture draft context.",modelName:"ForgeQuickCaptureDraft"})],tools:[j("Create a Forge evidence note from captured markdown.")]}),WebView:I,execute:t=>g(t,{draft:{defaultUserId:t.inputs.defaultUserId??null}},"Quick capture can draft notes and wiki pages.")};I.workbench=Y;export{W as M,I as Q,D as S,C as T,F as W};
@@ -1079,4 +1079,4 @@ Make sure your charset is UTF-8`);u=(u>>>8&255)*192+(u&255),i.put(u,13)}},Tp=n,T
1079
1079
  The chosen QR Code version cannot contain this amount of data.
1080
1080
  Minimum version required to store current data is: `+W+`.
1081
1081
  `);const G=k(D,N,Z),ue=e.getSymbolSize(D),q=new i(ue);return S(q,D),M(q),b(q,D),E(q,N,0),D>=7&&w(q,D),A(q,G),isNaN(P)&&(P=c.getBestMask(q,E.bind(null,q,N))),c.applyMask(P,q),E(q,N,P),{modules:q,version:D,errorCorrectionLevel:N,maskPattern:P,segments:Z}}return lp.create=function(D,N){if(typeof D>"u"||D==="")throw new Error("No input text");let P=t.M,Z,W;return typeof N<"u"&&(P=t.from(N.errorCorrectionLevel,t.M),Z=g.from(N.version),W=c.from(N.maskPattern),N.toSJISFunc&&e.setToSJISFunction(N.toSJISFunc)),C(D,Z,P,W)},lp}var xp={},Op={},uT;function a5(){return uT||(uT=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(u){return[u,u]}))),i.length===6&&i.push("F","F");const o=parseInt(i.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+i.slice(0,6).join("")}}e.getOptions=function(i){i||(i={}),i.color||(i.color={});const o=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,u=i.width&&i.width>=21?i.width:void 0,c=i.scale||4;return{width:u,scale:u?4:c,margin:o,color:{dark:t(i.color.dark||"#000000ff"),light:t(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},e.getScale=function(i,o){return o.width&&o.width>=i+o.margin*2?o.width/(i+o.margin*2):o.scale},e.getImageWidth=function(i,o){const u=e.getScale(i,o);return Math.floor((i+o.margin*2)*u)},e.qrToImageData=function(i,o,u){const c=o.modules.size,f=o.modules.data,h=e.getScale(c,u),g=Math.floor((c+u.margin*2)*h),p=u.margin*h,m=[u.color.light,u.color.dark];for(let v=0;v<g;v++)for(let S=0;S<g;S++){let M=(v*g+S)*4,b=u.color.light;if(v>=p&&S>=p&&v<g-p&&S<g-p){const w=Math.floor((v-p)/h),E=Math.floor((S-p)/h);b=m[f[w*c+E]?1:0]}i[M++]=b.r,i[M++]=b.g,i[M++]=b.b,i[M]=b.a}}})(Op)),Op}var sT;function E$(){return sT||(sT=1,(function(e){const t=a5();function n(o,u,c){o.clearRect(0,0,u.width,u.height),u.style||(u.style={}),u.height=c,u.width=c,u.style.height=c+"px",u.style.width=c+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(u,c,f){let h=f,g=c;typeof h>"u"&&(!c||!c.getContext)&&(h=c,c=void 0),c||(g=i()),h=t.getOptions(h);const p=t.getImageWidth(u.modules.size,h),m=g.getContext("2d"),v=m.createImageData(p,p);return t.qrToImageData(v.data,u,h),n(m,g,p),m.putImageData(v,0,0),g},e.renderToDataURL=function(u,c,f){let h=f;typeof h>"u"&&(!c||!c.getContext)&&(h=c,c=void 0),h||(h={});const g=e.render(u,c,h),p=h.type||"image/png",m=h.rendererOpts||{};return g.toDataURL(p,m.quality)}})(xp)),xp}var Cp={},cT;function x$(){if(cT)return Cp;cT=1;const e=a5();function t(o,u){const c=o.a/255,f=u+'="'+o.hex+'"';return c<1?f+" "+u+'-opacity="'+c.toFixed(2).slice(1)+'"':f}function n(o,u,c){let f=o+u;return typeof c<"u"&&(f+=" "+c),f}function i(o,u,c){let f="",h=0,g=!1,p=0;for(let m=0;m<o.length;m++){const v=Math.floor(m%u),S=Math.floor(m/u);!v&&!g&&(g=!0),o[m]?(p++,m>0&&v>0&&o[m-1]||(f+=g?n("M",v+c,.5+S+c):n("m",h,0),h=0,g=!1),v+1<u&&o[m+1]||(f+=n("h",p),p=0)):h++}return f}return Cp.render=function(u,c,f){const h=e.getOptions(c),g=u.modules.size,p=u.modules.data,m=g+h.margin*2,v=h.color.light.a?"<path "+t(h.color.light,"fill")+' d="M0 0h'+m+"v"+m+'H0z"/>':"",S="<path "+t(h.color.dark,"stroke")+' d="'+i(p,g,h.margin)+'"/>',M='viewBox="0 0 '+m+" "+m+'"',w='<svg xmlns="http://www.w3.org/2000/svg" '+(h.width?'width="'+h.width+'" height="'+h.width+'" ':"")+M+' shape-rendering="crispEdges">'+v+S+`</svg>
1082
- `;return typeof f=="function"&&f(null,w),w},Cp}var fT;function O$(){if(fT)return ko;fT=1;const e=l$(),t=T$(),n=E$(),i=x$();function o(u,c,f,h,g){const p=[].slice.call(arguments,1),m=p.length,v=typeof p[m-1]=="function";if(!v&&!e())throw new Error("Callback required as last argument");if(v){if(m<2)throw new Error("Too few arguments provided");m===2?(g=f,f=c,c=h=void 0):m===3&&(c.getContext&&typeof g>"u"?(g=h,h=void 0):(g=h,h=f,f=c,c=void 0))}else{if(m<1)throw new Error("Too few arguments provided");return m===1?(f=c,c=h=void 0):m===2&&!c.getContext&&(h=f,f=c,c=void 0),new Promise(function(S,M){try{const b=t.create(f,h);S(u(b,c,h))}catch(b){M(b)}})}try{const S=t.create(f,h);g(null,u(S,c,h))}catch(S){g(S)}}return ko.create=t.create,ko.toCanvas=o.bind(null,n.render),ko.toDataURL=o.bind(null,n.renderToDataURL),ko.toString=o.bind(null,function(u,c,f){return i.render(u,f)}),ko}var C$=O$();const wQ=Zt(C$);export{BG as $,mz as A,HN as B,IG as C,Zt as D,A$ as E,tE as F,V$ as G,TG as H,R$ as I,MG as J,Gc as K,xG as L,z$ as M,wG as N,EG as O,OG as P,nC as Q,x1 as R,NG as S,w8 as T,lQ as U,FG as V,VG as W,YG as X,$G as Y,PG as Z,fN as _,An as a,pF as a$,HG as a0,Nz as a1,uQ as a2,xz as a3,sQ as a4,rQ as a5,ZS as a6,Mu as a7,oQ as a8,aQ as a9,SG as aA,_G as aB,WT as aC,PY as aD,IF as aE,aG as aF,FF as aG,bG as aH,eV as aI,Qn as aJ,vG as aK,eG as aL,rV as aM,JY as aN,NV as aO,sV as aP,bF as aQ,aF as aR,tF as aS,JF as aT,eF as aU,cY as aV,nG as aW,Q$ as aX,vV as aY,SF as aZ,MF as a_,iQ as aa,cQ as ab,fQ as ac,qG as ad,Dz as ae,tQ as af,nQ as ag,eQ as ah,WG as ai,JG as aj,ZG as ak,t3 as al,KG as am,jG as an,UG as ao,GG as ap,XG as aq,QG as ar,dQ as as,gQ as at,hQ as au,pQ as av,yQ as aw,mQ as ax,vQ as ay,bQ as az,ET as b,uG as b$,qF as b0,LY as b1,mG as b2,rY as b3,J$ as b4,uV as b5,iF as b6,R1 as b7,RF as b8,tG as b9,vF as bA,EY as bB,F$ as bC,KF as bD,hV as bE,MY as bF,dY as bG,gY as bH,cG as bI,sG as bJ,U$ as bK,Lu as bL,j$ as bM,SY as bN,bY as bO,P$ as bP,uk as bQ,B$ as bR,I$ as bS,D$ as bT,$$ as bU,oV as bV,zV as bW,Z$ as bX,dF as bY,Y$ as bZ,H$ as b_,fF as ba,aY as bb,hY as bc,nF as bd,dG as be,AV as bf,gG as bg,lG as bh,yV as bi,QV as bj,$F as bk,KV as bl,zk as bm,EV as bn,eY as bo,lY as bp,jV as bq,YY as br,lV as bs,mV as bt,fG as bu,AY as bv,nY as bw,yF as bx,fY as by,gV as bz,SE as c,YF as c$,UF as c0,kV as c1,KY as c2,qV as c3,lF as c4,jF as c5,CY as c6,rG as c7,qY as c8,AF as c9,nV as cA,TV as cB,CV as cC,GF as cD,WF as cE,bV as cF,_V as cG,JV as cH,BV as cI,wF as cJ,QF as cK,OV as cL,ZY as cM,_F as cN,K$ as cO,QY as cP,FY as cQ,cV as cR,zY as cS,xV as cT,W$ as cU,X$ as cV,FV as cW,HV as cX,GY as cY,DY as cZ,WV as c_,VY as ca,_Y as cb,uF as cc,xY as cd,iG as ce,oF as cf,VF as cg,PV as ch,aV as ci,TF as cj,LF as ck,GV as cl,jY as cm,kF as cn,XV as co,BY as cp,xF as cq,SQ as cr,$V as cs,oG as ct,TY as cu,vY as cv,pY as cw,WY as cx,_Q as cy,mY as cz,wS as d,UY as d0,DF as d1,G$ as d2,YV as d3,sF as d4,ZV as d5,OF as d6,yG as d7,IY as d8,wY as d9,EF as dA,tV as dB,pG as dC,$Y as dD,cF as dE,yY as dF,tY as dG,dV as dH,XY as dI,hG as dJ,DV as dK,SV as dL,XF as dM,iY as dN,fV as dO,RV as dP,zF as dQ,VV as dR,uY as dS,NF as da,rF as db,wV as dc,ZF as dd,iV as de,pV as df,HF as dg,MV as dh,OY as di,RY as dj,wQ as dk,sY as dl,gF as dm,LV as dn,CF as dp,kY as dq,BF as dr,NY as ds,HY as dt,hF as du,PF as dv,IV as dw,oY as dx,mF as dy,UV as dz,Bc as e,CG as f,_E as g,CN as h,kG as i,Te as j,DG as k,wE as l,UN as m,zt as n,Ur as o,Rr as p,RG as q,U as r,N$ as s,AG as t,LG as u,K1 as v,q$ as w,r9 as x,rl as y,zG as z};
1082
+ `;return typeof f=="function"&&f(null,w),w},Cp}var fT;function O$(){if(fT)return ko;fT=1;const e=l$(),t=T$(),n=E$(),i=x$();function o(u,c,f,h,g){const p=[].slice.call(arguments,1),m=p.length,v=typeof p[m-1]=="function";if(!v&&!e())throw new Error("Callback required as last argument");if(v){if(m<2)throw new Error("Too few arguments provided");m===2?(g=f,f=c,c=h=void 0):m===3&&(c.getContext&&typeof g>"u"?(g=h,h=void 0):(g=h,h=f,f=c,c=void 0))}else{if(m<1)throw new Error("Too few arguments provided");return m===1?(f=c,c=h=void 0):m===2&&!c.getContext&&(h=f,f=c,c=void 0),new Promise(function(S,M){try{const b=t.create(f,h);S(u(b,c,h))}catch(b){M(b)}})}try{const S=t.create(f,h);g(null,u(S,c,h))}catch(S){g(S)}}return ko.create=t.create,ko.toCanvas=o.bind(null,n.render),ko.toDataURL=o.bind(null,n.renderToDataURL),ko.toString=o.bind(null,function(u,c,f){return i.render(u,f)}),ko}var C$=O$();const wQ=Zt(C$);export{BG as $,mz as A,HN as B,IG as C,Zt as D,A$ as E,tE as F,V$ as G,TG as H,R$ as I,MG as J,Gc as K,xG as L,z$ as M,wG as N,EG as O,OG as P,nC as Q,x1 as R,NG as S,w8 as T,lQ as U,FG as V,VG as W,YG as X,$G as Y,PG as Z,fN as _,An as a,pF as a$,HG as a0,Nz as a1,uQ as a2,xz as a3,sQ as a4,rQ as a5,ZS as a6,Mu as a7,oQ as a8,aQ as a9,SG as aA,_G as aB,WT as aC,PY as aD,IF as aE,aG as aF,FF as aG,bG as aH,eV as aI,Qn as aJ,vG as aK,eG as aL,rV as aM,JY as aN,NV as aO,sV as aP,bF as aQ,aF as aR,tF as aS,JF as aT,eF as aU,cY as aV,nG as aW,Q$ as aX,vV as aY,SF as aZ,MF as a_,iQ as aa,cQ as ab,fQ as ac,qG as ad,Dz as ae,tQ as af,nQ as ag,eQ as ah,WG as ai,JG as aj,ZG as ak,t3 as al,KG as am,jG as an,UG as ao,GG as ap,XG as aq,QG as ar,dQ as as,gQ as at,hQ as au,pQ as av,yQ as aw,mQ as ax,vQ as ay,bQ as az,ET as b,WY as b$,qF as b0,LY as b1,mG as b2,rY as b3,J$ as b4,uV as b5,iF as b6,R1 as b7,RF as b8,tG as b9,vF as bA,EY as bB,F$ as bC,KF as bD,hV as bE,MY as bF,dY as bG,gY as bH,cG as bI,sG as bJ,U$ as bK,Lu as bL,j$ as bM,SY as bN,bY as bO,P$ as bP,uk as bQ,B$ as bR,I$ as bS,D$ as bT,$$ as bU,oV as bV,zV as bW,Z$ as bX,dF as bY,Y$ as bZ,H$ as b_,fF as ba,aY as bb,hY as bc,nF as bd,dG as be,AV as bf,gG as bg,lG as bh,yV as bi,QV as bj,$F as bk,KV as bl,zk as bm,EV as bn,eY as bo,lY as bp,jV as bq,YY as br,lV as bs,mV as bt,fG as bu,AY as bv,nY as bw,yF as bx,fY as by,gV as bz,SE as c,WV as c$,uF as c0,rG as c1,wY as c2,uG as c3,UF as c4,kV as c5,KY as c6,qV as c7,lF as c8,jF as c9,mY as cA,nV as cB,TV as cC,CV as cD,GF as cE,WF as cF,bV as cG,_V as cH,JV as cI,BV as cJ,wF as cK,QF as cL,OV as cM,ZY as cN,_F as cO,K$ as cP,QY as cQ,FY as cR,cV as cS,zY as cT,xV as cU,W$ as cV,X$ as cW,FV as cX,HV as cY,GY as cZ,DY as c_,CY as ca,qY as cb,AF as cc,VY as cd,_Y as ce,xY as cf,iG as cg,oF as ch,VF as ci,PV as cj,aV as ck,TF as cl,LF as cm,GV as cn,jY as co,kF as cp,XV as cq,BY as cr,xF as cs,SQ as ct,$V as cu,oG as cv,TY as cw,vY as cx,pY as cy,_Q as cz,wS as d,YF as d0,UY as d1,DF as d2,G$ as d3,YV as d4,sF as d5,ZV as d6,OF as d7,yG as d8,IY as d9,EF as dA,tV as dB,pG as dC,$Y as dD,cF as dE,yY as dF,tY as dG,dV as dH,XY as dI,hG as dJ,DV as dK,SV as dL,XF as dM,iY as dN,fV as dO,RV as dP,zF as dQ,VV as dR,uY as dS,NF as da,rF as db,wV as dc,ZF as dd,iV as de,pV as df,HF as dg,MV as dh,OY as di,RY as dj,wQ as dk,sY as dl,gF as dm,LV as dn,CF as dp,kY as dq,BF as dr,NY as ds,HY as dt,hF as du,PF as dv,IV as dw,oY as dx,mF as dy,UV as dz,Bc as e,CG as f,_E as g,CN as h,kG as i,Te as j,DG as k,wE as l,UN as m,zt as n,Ur as o,Rr as p,RG as q,U as r,N$ as s,AG as t,LG as u,K1 as v,q$ as w,r9 as x,rl as y,zG as z};
@@ -1 +1 @@
1
- import{j as e}from"./vendor-B7FKSwHK.js";import{i as x}from"./state-BFyKSULP.js";import{P as w}from"./page-hero-U603l9rQ.js";import{d as j,L as f,e as b,C as u,j as m,c as N,bo as M,c2 as k}from"./index-gmPaoLN-.js";import{S as c,f as C,m as R,M as p,D}from"./daily-metrics-dashboard-CG-OOCJz.js";import"./motion-BibSzp57.js";import"./ui-uo_bNP7c.js";import"./board-DprRipIG.js";import"./forms-ByKjodjN.js";import"./charts-C5S0-BL7.js";const S=["restingHeartRate","heartRateVariabilitySDNN","vo2Max","oxygenSaturation","bodyMass","stepCount"];function y(t,a){return a.map(i=>({...i,metrics:t.filter(s=>s.category===i.category)}))}function V(t){return t}function B({metrics:t}){if(!t.summary.hasData||t.metrics.length===0)return null;const a=y(t.metrics,t.summary.categoryBreakdown),i=t.metrics.find(r=>r.metric==="devrageSwearCount")??null,s=t.metrics.find(r=>r.metric==="swearingMessagePercent")??null,d=t.metrics.find(r=>r.metric==="devrageAverageMaxCumulativeRage")??null,n=t.metrics.find(r=>r.metric==="devrageMaxCumulativeRage")??null;return e.jsxs("section",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/38",children:"Psyche metrics"}),e.jsx("div",{className:"mt-1 text-2xl font-semibold text-white",children:"Conversation tone alongside body signals"})]}),e.jsxs(m,{className:"bg-amber-200/10 text-amber-50",children:[t.summary.trackedDays," tracked days"]})]}),e.jsx(D,{swearMetric:i,percentMetric:s,averageRageMetric:d,maxRageMetric:n,compact:!0}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-4",children:[e.jsx(c,{title:"Devrage count",description:"Daily user-message swear count from stored conversation history.",metric:i}),e.jsx(c,{title:"Swearing rate",description:"Share of scanned user messages that contained at least one tracked swear.",metric:s}),e.jsx(c,{title:"Average rage peak",description:"Average per-thread peak after swears add and clean messages cool the score down.",metric:d}),e.jsx(c,{title:"Max rage peak",description:"Highest cumulative thread score reached on the latest tracked day.",metric:n})]}),e.jsx(p,{groups:a})]})}function U(){var h;const t=j(),a=x({queryKey:["forge-vitals-view",...t.selectedUserIds],queryFn:async()=>(await M(t.selectedUserIds)).vitals}),i=x({queryKey:["forge-psyche-metrics-vitals-view"],queryFn:async()=>(await k()).metrics});if(a.isLoading)return e.jsx(f,{title:"Loading body signals",description:"Reading recent HealthKit body metrics, recovery signals, and daily aggregates."});if(a.isError||!a.data)return e.jsx(b,{error:a.error??new Error("Vitals data unavailable"),onRetry:()=>void a.refetch()});const s=a.data,d=s.metrics.map(V),n=S.map(o=>d.find(l=>l.metric===o)??null),r=s.summary.categoryBreakdown,v=y(d,r),g=!i.isError&&((h=i.data)!=null&&h.summary.hasData)?i.data:null;return e.jsxs("div",{className:"mx-auto grid w-full max-w-[1380px] gap-5",children:[e.jsx(w,{title:"Vitals",description:"Forge now keeps a daily body-signals layer across recovery, cardio fitness, breathing, composition, temperature, and activity. Use this surface to spot drift early, not just admire numbers late.",badge:`${s.summary.metricCount} live metrics`}),e.jsxs("section",{className:"grid gap-4 xl:grid-cols-4",children:[e.jsx(c,{title:"Recovery pulse",description:"Resting heart rate and HRV are the fastest read on load, stress, and whether today needs a gentler edge.",metric:n[0]??n[1]}),e.jsx(c,{title:"Cardio engine",description:"VO2 max and walking heart rate show whether baseline fitness is improving or whether your effort is costing more than usual.",metric:n[2]}),e.jsx(c,{title:"Breath and oxygen",description:"Respiratory rate and oxygen saturation help catch nights or stretches where recovery quality starts to slip.",metric:n[3]}),e.jsx(c,{title:"Body composition",description:"Mass and composition stay close to the daily story so progress is visible without flattening everything into weight alone.",metric:n[4]})]}),e.jsxs("section",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(340px,0.9fr)]",children:[e.jsxs(u,{className:"overflow-hidden rounded-[30px] border-white/8 bg-[radial-gradient(circle_at_top_left,rgba(108,99,255,0.16),transparent_36%),linear-gradient(180deg,rgba(15,19,38,0.98),rgba(9,13,28,0.98))] p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/40",children:"Coverage"}),e.jsxs("div",{className:"text-2xl font-semibold text-white",children:[s.summary.trackedDays," tracked days across ",s.summary.metricCount," metrics"]}),e.jsx("div",{className:"max-w-3xl text-sm leading-6 text-white/58",children:"The companion is compressing HealthKit into daily signal bands, so what you see here is designed for decisions: how your recovery is trending, where your physiology is changing, and which body systems are actually being observed consistently."})]}),e.jsxs(m,{className:"bg-white/[0.08] text-white/72",children:["Latest snapshot ",C(s.summary.latestDateKey)]})]}),e.jsx("div",{className:"mt-5 grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:r.map(o=>{const l=R(o.category);return e.jsxs("div",{className:N("rounded-[22px] border bg-white/[0.03] p-4",l.ring),children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(m,{className:l.badge,children:o.category}),e.jsxs("div",{className:"text-xs text-white/44",children:[o.coverageDays," days"]})]}),e.jsx("div",{className:"mt-3 text-2xl font-semibold text-white",children:o.metricCount}),e.jsxs("div",{className:"mt-1 text-sm text-white/58",children:["active metric",o.metricCount===1?"":"s"]})]},o.category)})})]}),e.jsx(u,{className:"rounded-[30px] border-white/8 bg-[linear-gradient(180deg,rgba(13,19,37,0.96),rgba(10,14,30,0.96))] p-6",children:e.jsxs("div",{className:"grid gap-3",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/40",children:"Daily interpretation"}),e.jsx("div",{className:"text-lg font-semibold text-white",children:"Body signals should feel operational, not medical-chart dead."}),e.jsxs("div",{className:"grid gap-3 text-sm leading-6 text-white/58",children:[e.jsx("div",{children:"Lower resting heart rate paired with stable or rising HRV usually means recovery is holding."}),e.jsx("div",{children:"Rising walking heart rate, falling HRV, or a jump in respiratory rate usually means you are carrying more load than the calendar admits."}),e.jsx("div",{children:"Composition and temperature metrics move slower, but they make the fast signals easier to trust because you can see the surrounding body context."})]}),e.jsxs("div",{className:"mt-2 rounded-[22px] border border-white/8 bg-white/[0.035] p-4 text-sm text-white/70",children:[s.summary.latestMetricCount," metrics updated on the latest tracked day."]})]})})]}),e.jsx(p,{groups:v}),g?e.jsx(B,{metrics:g}):null]})}export{U as VitalsPage};
1
+ import{j as e}from"./vendor-y_uz1Wft.js";import{i as x}from"./state-DWw8Jay_.js";import{P as w}from"./page-hero-DYmFM6-q.js";import{d as j,L as f,e as b,C as u,j as m,c as N,bo as M,c2 as k}from"./index-Dj8q65se.js";import{S as c,f as C,m as R,M as p,D}from"./daily-metrics-dashboard-CXESx7bU.js";import"./motion-DeJZhOSA.js";import"./ui-CdEDMtXF.js";import"./board-CGgOvBP9.js";import"./forms-DhEGHkFR.js";import"./charts-Cdtn55ol.js";const S=["restingHeartRate","heartRateVariabilitySDNN","vo2Max","oxygenSaturation","bodyMass","stepCount"];function y(t,a){return a.map(i=>({...i,metrics:t.filter(s=>s.category===i.category)}))}function V(t){return t}function B({metrics:t}){if(!t.summary.hasData||t.metrics.length===0)return null;const a=y(t.metrics,t.summary.categoryBreakdown),i=t.metrics.find(r=>r.metric==="devrageSwearCount")??null,s=t.metrics.find(r=>r.metric==="swearingMessagePercent")??null,d=t.metrics.find(r=>r.metric==="devrageAverageMaxCumulativeRage")??null,n=t.metrics.find(r=>r.metric==="devrageMaxCumulativeRage")??null;return e.jsxs("section",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/38",children:"Psyche metrics"}),e.jsx("div",{className:"mt-1 text-2xl font-semibold text-white",children:"Conversation tone alongside body signals"})]}),e.jsxs(m,{className:"bg-amber-200/10 text-amber-50",children:[t.summary.trackedDays," tracked days"]})]}),e.jsx(D,{swearMetric:i,percentMetric:s,averageRageMetric:d,maxRageMetric:n,compact:!0}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-4",children:[e.jsx(c,{title:"Devrage count",description:"Daily user-message swear count from stored conversation history.",metric:i}),e.jsx(c,{title:"Swearing rate",description:"Share of scanned user messages that contained at least one tracked swear.",metric:s}),e.jsx(c,{title:"Average rage peak",description:"Average per-thread peak after swears add and clean messages cool the score down.",metric:d}),e.jsx(c,{title:"Max rage peak",description:"Highest cumulative thread score reached on the latest tracked day.",metric:n})]}),e.jsx(p,{groups:a})]})}function U(){var h;const t=j(),a=x({queryKey:["forge-vitals-view",...t.selectedUserIds],queryFn:async()=>(await M(t.selectedUserIds)).vitals}),i=x({queryKey:["forge-psyche-metrics-vitals-view"],queryFn:async()=>(await k()).metrics});if(a.isLoading)return e.jsx(f,{title:"Loading body signals",description:"Reading recent HealthKit body metrics, recovery signals, and daily aggregates."});if(a.isError||!a.data)return e.jsx(b,{error:a.error??new Error("Vitals data unavailable"),onRetry:()=>void a.refetch()});const s=a.data,d=s.metrics.map(V),n=S.map(o=>d.find(l=>l.metric===o)??null),r=s.summary.categoryBreakdown,v=y(d,r),g=!i.isError&&((h=i.data)!=null&&h.summary.hasData)?i.data:null;return e.jsxs("div",{className:"mx-auto grid w-full max-w-[1380px] gap-5",children:[e.jsx(w,{title:"Vitals",description:"Forge now keeps a daily body-signals layer across recovery, cardio fitness, breathing, composition, temperature, and activity. Use this surface to spot drift early, not just admire numbers late.",badge:`${s.summary.metricCount} live metrics`}),e.jsxs("section",{className:"grid gap-4 xl:grid-cols-4",children:[e.jsx(c,{title:"Recovery pulse",description:"Resting heart rate and HRV are the fastest read on load, stress, and whether today needs a gentler edge.",metric:n[0]??n[1]}),e.jsx(c,{title:"Cardio engine",description:"VO2 max and walking heart rate show whether baseline fitness is improving or whether your effort is costing more than usual.",metric:n[2]}),e.jsx(c,{title:"Breath and oxygen",description:"Respiratory rate and oxygen saturation help catch nights or stretches where recovery quality starts to slip.",metric:n[3]}),e.jsx(c,{title:"Body composition",description:"Mass and composition stay close to the daily story so progress is visible without flattening everything into weight alone.",metric:n[4]})]}),e.jsxs("section",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(340px,0.9fr)]",children:[e.jsxs(u,{className:"overflow-hidden rounded-[30px] border-white/8 bg-[radial-gradient(circle_at_top_left,rgba(108,99,255,0.16),transparent_36%),linear-gradient(180deg,rgba(15,19,38,0.98),rgba(9,13,28,0.98))] p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/40",children:"Coverage"}),e.jsxs("div",{className:"text-2xl font-semibold text-white",children:[s.summary.trackedDays," tracked days across ",s.summary.metricCount," metrics"]}),e.jsx("div",{className:"max-w-3xl text-sm leading-6 text-white/58",children:"The companion is compressing HealthKit into daily signal bands, so what you see here is designed for decisions: how your recovery is trending, where your physiology is changing, and which body systems are actually being observed consistently."})]}),e.jsxs(m,{className:"bg-white/[0.08] text-white/72",children:["Latest snapshot ",C(s.summary.latestDateKey)]})]}),e.jsx("div",{className:"mt-5 grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:r.map(o=>{const l=R(o.category);return e.jsxs("div",{className:N("rounded-[22px] border bg-white/[0.03] p-4",l.ring),children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(m,{className:l.badge,children:o.category}),e.jsxs("div",{className:"text-xs text-white/44",children:[o.coverageDays," days"]})]}),e.jsx("div",{className:"mt-3 text-2xl font-semibold text-white",children:o.metricCount}),e.jsxs("div",{className:"mt-1 text-sm text-white/58",children:["active metric",o.metricCount===1?"":"s"]})]},o.category)})})]}),e.jsx(u,{className:"rounded-[30px] border-white/8 bg-[linear-gradient(180deg,rgba(13,19,37,0.96),rgba(10,14,30,0.96))] p-6",children:e.jsxs("div",{className:"grid gap-3",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/40",children:"Daily interpretation"}),e.jsx("div",{className:"text-lg font-semibold text-white",children:"Body signals should feel operational, not medical-chart dead."}),e.jsxs("div",{className:"grid gap-3 text-sm leading-6 text-white/58",children:[e.jsx("div",{children:"Lower resting heart rate paired with stable or rising HRV usually means recovery is holding."}),e.jsx("div",{children:"Rising walking heart rate, falling HRV, or a jump in respiratory rate usually means you are carrying more load than the calendar admits."}),e.jsx("div",{children:"Composition and temperature metrics move slower, but they make the fast signals easier to trust because you can see the surrounding body context."})]}),e.jsxs("div",{className:"mt-2 rounded-[22px] border border-white/8 bg-white/[0.035] p-4 text-sm text-white/70",children:[s.summary.latestMetricCount," metrics updated on the latest tracked day."]})]})})]}),e.jsx(p,{groups:v}),g?e.jsx(B,{metrics:g}):null]})}export{U as VitalsPage};
@@ -1 +1 @@
1
- import{j as e}from"./vendor-B7FKSwHK.js";import{j as p,i as f,k as g}from"./state-BFyKSULP.js";import{F as j}from"./flagship-signal-deck-D3wVL3bC.js";import{u as k,S as b,e as v,C as w,j as h,B as N,eK as R,i as $,eL as S}from"./index-gmPaoLN-.js";import{P as z}from"./page-hero-U603l9rQ.js";import"./motion-BibSzp57.js";import"./ui-uo_bNP7c.js";import"./board-DprRipIG.js";import"./forms-ByKjodjN.js";const o="font-label text-[11px] uppercase tracking-[0.18em] text-[var(--ui-ink-faint)]",d="overflow-hidden rounded-[20px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-2)]",x="text-sm leading-6 text-[var(--ui-ink-soft)]";function P({data:s}){const m=Math.max(1,...s.map(i=>i.xp)),t=s.length>0?Math.max(4,Math.min(18,280/s.length-4)):8,c=s.length>1?Math.max(1,(300-s.length*t)/(s.length-1)):0;return e.jsx("div",{className:"mt-4 aspect-[16/9] min-h-56 w-full min-w-0 overflow-hidden rounded-[18px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-2)] p-3",children:e.jsxs("svg",{viewBox:"0 0 340 200",role:"img","aria-label":"Weekly review XP chart",className:"h-full w-full",children:[e.jsx("g",{stroke:"var(--ui-border-subtle)",strokeWidth:"1",children:[45,85,125,165].map(i=>e.jsx("line",{x1:"20",x2:"320",y1:i,y2:i},i))}),s.map((i,r)=>{const l=20+r*(t+c),n=Math.max(2,i.xp/m*128);return e.jsxs("g",{children:[e.jsx("rect",{x:l,y:168-n,width:t,height:n,rx:"5",fill:"var(--primary)"}),r===0||r===s.length-1||r%3===0?e.jsx("text",{x:l+t/2,y:"192",fill:"var(--ui-ink-faint)",fontSize:"10",textAnchor:"middle",children:i.label}):null]},`${i.label}-${r}`)})]})})}function K(){var u;const{t:s}=k(),m=p(),t=f({queryKey:["forge-weekly-review"],queryFn:S}),c=g({mutationFn:R,onSuccess:async()=>{await Promise.all([m.invalidateQueries({queryKey:["forge-weekly-review"]}),m.invalidateQueries({queryKey:["forge-xp-metrics"]}),m.invalidateQueries({queryKey:["forge-reward-ledger"]}),$(m),m.invalidateQueries({queryKey:["activity-archive"]})])}}),i=(u=t.data)==null?void 0:u.review;if(t.isLoading)return e.jsx(b,{});if(t.isError)return e.jsx(v,{eyebrow:s("common.weeklyReview.heroEyebrow"),error:t.error,onRetry:()=>void t.refetch()});if(!i)return e.jsx(v,{eyebrow:s("common.weeklyReview.heroEyebrow"),error:new Error("Forge returned an empty weekly review payload."),onRetry:()=>void t.refetch()});const r=i.wins[0]??null,l=i.calibration.find(a=>a.mode==="recover")??i.calibration[0]??null,n=i.calibration.find(a=>a.mode==="accelerate")??i.calibration[0]??null,y=[{id:"week",label:"This week",title:`${i.momentumSummary.totalXp} XP with ${i.momentumSummary.focusHours} focus hours`,detail:`Peak window: ${i.momentumSummary.peakWindow}. Efficiency score is holding at ${i.momentumSummary.efficiencyScore}.`,badge:i.windowLabel},{id:"wins",label:"Wins",title:(r==null?void 0:r.title)??s("common.weeklyReview.noWin"),detail:(r==null?void 0:r.summary)??s("common.weeklyReview.noWinDetail"),badge:r?`+${r.rewardXp} xp`:`${i.wins.length} wins`},{id:"recovery",label:"Recovery",title:(l==null?void 0:l.title)??s("common.weeklyReview.noRecovery"),detail:(l==null?void 0:l.note)??s("common.weeklyReview.noRecoveryDetail"),badge:(l==null?void 0:l.mode)??"maintain"},{id:"next-intent",label:"Next intent",title:(n==null?void 0:n.title)??i.reward.title,detail:(n==null?void 0:n.note)??i.reward.summary,badge:`+${i.reward.rewardXp} xp`}];return e.jsxs("div",{className:"grid gap-5",children:[e.jsx(z,{title:"Weekly Review",description:`${i.windowLabel}. ${s("common.weeklyReview.heroDescription")}`,badge:`${i.momentumSummary.totalXp} xp`}),e.jsxs("section",{className:"grid gap-5 xl:grid-cols-[minmax(0,1.2fr)_minmax(0,0.8fr)]",children:[e.jsxs("div",{className:"grid gap-5",children:[e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionMomentum")}),e.jsx(P,{data:i.chart}),e.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-3",children:[e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"XP"}),e.jsx("div",{className:"mt-2 text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.totalXp})]}),e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"Focus hours"}),e.jsx("div",{className:"mt-2 text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.focusHours})]}),e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"Peak window"}),e.jsx("div",{className:"mt-2 break-words text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.peakWindow})]})]})]}),e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionGoals")}),e.jsx("div",{className:"mt-4 grid gap-3",children:i.calibration.map(a=>e.jsxs("div",{className:`${d} p-4`,children:[e.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-words font-medium text-[var(--ui-ink-strong)]",children:a.title}),e.jsx(h,{className:"max-w-[9rem] shrink-0 self-start",children:a.mode})]}),e.jsx("div",{className:`mt-3 break-words ${x}`,children:a.note})]},a.id))})]})]}),e.jsxs("div",{className:"grid gap-5",children:[e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionWins")}),e.jsx("div",{className:"mt-4 grid gap-3",children:i.wins.map(a=>e.jsxs("div",{className:`${d} p-4`,children:[e.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-words font-medium text-[var(--ui-ink-strong)]",children:a.title}),e.jsxs(h,{tone:"signal",className:"max-w-[8rem] shrink-0 self-start",children:["+",a.rewardXp," xp"]})]}),e.jsx("div",{className:`mt-2 break-words ${x}`,children:a.summary})]},a.id))})]}),e.jsxs(w,{children:[e.jsx("h2",{className:"break-words font-display text-3xl text-[var(--ui-ink-strong)]",children:i.reward.title}),e.jsx("p",{className:`mt-3 leading-7 ${x}`,children:i.reward.summary}),e.jsxs("div",{className:`mt-4 ${d} p-4`,children:[e.jsx("div",{className:o,children:s("common.weeklyReview.completionBonus")}),e.jsxs("div",{className:"mt-2 text-3xl text-[var(--primary)]",children:["+",i.reward.rewardXp," XP"]})]}),e.jsx(N,{className:"mt-4 w-full",disabled:i.completion.finalized,pending:c.isPending,pendingLabel:s("common.weeklyReview.finalizePending"),onClick:async()=>{await c.mutateAsync()},children:i.completion.finalized?s("common.weeklyReview.finalized"):s("common.weeklyReview.finalize")}),e.jsx("div",{className:`mt-3 ${x}`,children:i.completion.finalized?`${s("common.weeklyReview.finalizedDetail")} ${i.completion.finalizedBy?`By ${i.completion.finalizedBy}. `:""}${i.completion.finalizedAt?new Date(i.completion.finalizedAt).toLocaleString():""}`.trim():i.reward.summary})]})]})]}),e.jsx(j,{eyebrow:s("common.weeklyReview.summaryEyebrow"),title:s("common.weeklyReview.summaryTitle"),description:s("common.weeklyReview.summaryDescription"),items:y})]})}export{K as WeeklyReviewPage};
1
+ import{j as e}from"./vendor-y_uz1Wft.js";import{j as p,i as f,k as g}from"./state-DWw8Jay_.js";import{F as j}from"./flagship-signal-deck-DZx_HEH9.js";import{u as k,S as b,e as v,C as w,j as h,B as N,eK as R,i as $,eL as S}from"./index-Dj8q65se.js";import{P as z}from"./page-hero-DYmFM6-q.js";import"./motion-DeJZhOSA.js";import"./ui-CdEDMtXF.js";import"./board-CGgOvBP9.js";import"./forms-DhEGHkFR.js";const o="font-label text-[11px] uppercase tracking-[0.18em] text-[var(--ui-ink-faint)]",d="overflow-hidden rounded-[20px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-2)]",x="text-sm leading-6 text-[var(--ui-ink-soft)]";function P({data:s}){const m=Math.max(1,...s.map(i=>i.xp)),t=s.length>0?Math.max(4,Math.min(18,280/s.length-4)):8,c=s.length>1?Math.max(1,(300-s.length*t)/(s.length-1)):0;return e.jsx("div",{className:"mt-4 aspect-[16/9] min-h-56 w-full min-w-0 overflow-hidden rounded-[18px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-2)] p-3",children:e.jsxs("svg",{viewBox:"0 0 340 200",role:"img","aria-label":"Weekly review XP chart",className:"h-full w-full",children:[e.jsx("g",{stroke:"var(--ui-border-subtle)",strokeWidth:"1",children:[45,85,125,165].map(i=>e.jsx("line",{x1:"20",x2:"320",y1:i,y2:i},i))}),s.map((i,r)=>{const l=20+r*(t+c),n=Math.max(2,i.xp/m*128);return e.jsxs("g",{children:[e.jsx("rect",{x:l,y:168-n,width:t,height:n,rx:"5",fill:"var(--primary)"}),r===0||r===s.length-1||r%3===0?e.jsx("text",{x:l+t/2,y:"192",fill:"var(--ui-ink-faint)",fontSize:"10",textAnchor:"middle",children:i.label}):null]},`${i.label}-${r}`)})]})})}function K(){var u;const{t:s}=k(),m=p(),t=f({queryKey:["forge-weekly-review"],queryFn:S}),c=g({mutationFn:R,onSuccess:async()=>{await Promise.all([m.invalidateQueries({queryKey:["forge-weekly-review"]}),m.invalidateQueries({queryKey:["forge-xp-metrics"]}),m.invalidateQueries({queryKey:["forge-reward-ledger"]}),$(m),m.invalidateQueries({queryKey:["activity-archive"]})])}}),i=(u=t.data)==null?void 0:u.review;if(t.isLoading)return e.jsx(b,{});if(t.isError)return e.jsx(v,{eyebrow:s("common.weeklyReview.heroEyebrow"),error:t.error,onRetry:()=>void t.refetch()});if(!i)return e.jsx(v,{eyebrow:s("common.weeklyReview.heroEyebrow"),error:new Error("Forge returned an empty weekly review payload."),onRetry:()=>void t.refetch()});const r=i.wins[0]??null,l=i.calibration.find(a=>a.mode==="recover")??i.calibration[0]??null,n=i.calibration.find(a=>a.mode==="accelerate")??i.calibration[0]??null,y=[{id:"week",label:"This week",title:`${i.momentumSummary.totalXp} XP with ${i.momentumSummary.focusHours} focus hours`,detail:`Peak window: ${i.momentumSummary.peakWindow}. Efficiency score is holding at ${i.momentumSummary.efficiencyScore}.`,badge:i.windowLabel},{id:"wins",label:"Wins",title:(r==null?void 0:r.title)??s("common.weeklyReview.noWin"),detail:(r==null?void 0:r.summary)??s("common.weeklyReview.noWinDetail"),badge:r?`+${r.rewardXp} xp`:`${i.wins.length} wins`},{id:"recovery",label:"Recovery",title:(l==null?void 0:l.title)??s("common.weeklyReview.noRecovery"),detail:(l==null?void 0:l.note)??s("common.weeklyReview.noRecoveryDetail"),badge:(l==null?void 0:l.mode)??"maintain"},{id:"next-intent",label:"Next intent",title:(n==null?void 0:n.title)??i.reward.title,detail:(n==null?void 0:n.note)??i.reward.summary,badge:`+${i.reward.rewardXp} xp`}];return e.jsxs("div",{className:"grid gap-5",children:[e.jsx(z,{title:"Weekly Review",description:`${i.windowLabel}. ${s("common.weeklyReview.heroDescription")}`,badge:`${i.momentumSummary.totalXp} xp`}),e.jsxs("section",{className:"grid gap-5 xl:grid-cols-[minmax(0,1.2fr)_minmax(0,0.8fr)]",children:[e.jsxs("div",{className:"grid gap-5",children:[e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionMomentum")}),e.jsx(P,{data:i.chart}),e.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-3",children:[e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"XP"}),e.jsx("div",{className:"mt-2 text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.totalXp})]}),e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"Focus hours"}),e.jsx("div",{className:"mt-2 text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.focusHours})]}),e.jsxs("div",{className:`${d} p-4`,children:[e.jsx("div",{className:o,children:"Peak window"}),e.jsx("div",{className:"mt-2 break-words text-2xl text-[var(--ui-ink-strong)]",children:i.momentumSummary.peakWindow})]})]})]}),e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionGoals")}),e.jsx("div",{className:"mt-4 grid gap-3",children:i.calibration.map(a=>e.jsxs("div",{className:`${d} p-4`,children:[e.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-words font-medium text-[var(--ui-ink-strong)]",children:a.title}),e.jsx(h,{className:"max-w-[9rem] shrink-0 self-start",children:a.mode})]}),e.jsx("div",{className:`mt-3 break-words ${x}`,children:a.note})]},a.id))})]})]}),e.jsxs("div",{className:"grid gap-5",children:[e.jsxs(w,{children:[e.jsx("div",{className:o,children:s("common.weeklyReview.sectionWins")}),e.jsx("div",{className:"mt-4 grid gap-3",children:i.wins.map(a=>e.jsxs("div",{className:`${d} p-4`,children:[e.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1 break-words font-medium text-[var(--ui-ink-strong)]",children:a.title}),e.jsxs(h,{tone:"signal",className:"max-w-[8rem] shrink-0 self-start",children:["+",a.rewardXp," xp"]})]}),e.jsx("div",{className:`mt-2 break-words ${x}`,children:a.summary})]},a.id))})]}),e.jsxs(w,{children:[e.jsx("h2",{className:"break-words font-display text-3xl text-[var(--ui-ink-strong)]",children:i.reward.title}),e.jsx("p",{className:`mt-3 leading-7 ${x}`,children:i.reward.summary}),e.jsxs("div",{className:`mt-4 ${d} p-4`,children:[e.jsx("div",{className:o,children:s("common.weeklyReview.completionBonus")}),e.jsxs("div",{className:"mt-2 text-3xl text-[var(--primary)]",children:["+",i.reward.rewardXp," XP"]})]}),e.jsx(N,{className:"mt-4 w-full",disabled:i.completion.finalized,pending:c.isPending,pendingLabel:s("common.weeklyReview.finalizePending"),onClick:async()=>{await c.mutateAsync()},children:i.completion.finalized?s("common.weeklyReview.finalized"):s("common.weeklyReview.finalize")}),e.jsx("div",{className:`mt-3 ${x}`,children:i.completion.finalized?`${s("common.weeklyReview.finalizedDetail")} ${i.completion.finalizedBy?`By ${i.completion.finalizedBy}. `:""}${i.completion.finalizedAt?new Date(i.completion.finalizedAt).toLocaleString():""}`.trim():i.reward.summary})]})]})]}),e.jsx(j,{eyebrow:s("common.weeklyReview.summaryEyebrow"),title:s("common.weeklyReview.summaryTitle"),description:s("common.weeklyReview.summaryDescription"),items:y})]})}export{K as WeeklyReviewPage};