super-time-tracker-ui 0.1.24 → 0.1.30
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.
- package/dist/standalone/next-output/BUILD_ID +1 -1
- package/dist/standalone/next-output/app-path-routes-manifest.json +1 -0
- package/dist/standalone/next-output/build-manifest.json +3 -3
- package/dist/standalone/next-output/routes-manifest.json +6 -0
- package/dist/standalone/next-output/server/app/_global-error.html +1 -1
- package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/page.js +2 -2
- package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page.js +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/reporting/page.js +1 -1
- package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/settings/notifications/page/build-manifest.json +17 -0
- package/dist/standalone/next-output/server/app/settings/notifications/page/next-font-manifest.json +11 -0
- package/dist/standalone/next-output/server/app/settings/notifications/page/react-loadable-manifest.json +1 -0
- package/dist/standalone/next-output/server/app/settings/notifications/page/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/settings/notifications/page.js +16 -0
- package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/settings/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/sheets/page.js +1 -1
- package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/today/page.js +1 -1
- package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app-paths-manifest.json +1 -0
- package/dist/standalone/next-output/server/chunks/_0y.amf.._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_09d~8qe.js +4 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0-0rjzr._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__01xqr3d._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__06o_2e_._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0_b2z9m._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0_wxrlk._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0dvku3t._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0gi2idc._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0hx9602._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0k~hq1g._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0wtu388._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__06tjg41._.js → [root-of-the-server]__0x6yv3u._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0yrs18n._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0-hc~ba._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_002dssm._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_00aklen._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_00x~ete._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_08dnxqq._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0agxxbf._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0c0txs~._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0cm4hy2._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0l6-7m4._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0y3ypyx._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_0r_7~d.._.js → _10n~~xo._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/_13crob-._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_13y76jr._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_settings_notifications_page_actions_0p_s-jo.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_today-focus-view_tsx_0~eac-w._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +1 -1
- package/dist/standalone/next-output/server/middleware-build-manifest.js +3 -3
- package/dist/standalone/next-output/server/middleware-manifest.json +1 -1
- package/dist/standalone/next-output/server/next-font-manifest.js +1 -1
- package/dist/standalone/next-output/server/next-font-manifest.json +4 -0
- package/dist/standalone/next-output/server/pages/500.html +1 -1
- package/dist/standalone/next-output/static/chunks/00rjs5ywh4_np.css +3 -0
- package/dist/standalone/next-output/static/chunks/{0r_p~8b~slwz6.js → 03d24rbiv.lx7.js} +1 -1
- package/dist/standalone/next-output/static/chunks/041fttxys-zjw.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0uqa2icli2jfg.js → 055~9w5b9lao5.js} +1 -1
- package/dist/standalone/next-output/static/chunks/09mbpw08eiqwx.js +1 -0
- package/dist/standalone/next-output/static/chunks/0ate7k1rcitu0.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0jmzwpfmnsd3v.js → 0bw3uow4-~3fr.js} +1 -1
- package/dist/standalone/next-output/static/chunks/0d2d-s..s8cfz.js +1 -0
- package/dist/standalone/next-output/static/chunks/{01f_tq~9x~8zv.js → 0h72~3~6gq3fn.js} +1 -1
- package/dist/standalone/next-output/static/chunks/{0p-_potvb-of4.js → 0hhu330gm_fnl.js} +1 -1
- package/dist/standalone/next-output/static/chunks/0ls_5qyf15z5_.js +1 -0
- package/dist/standalone/next-output/static/chunks/0n0.21h11yrv2.js +1 -0
- package/dist/standalone/next-output/static/chunks/0sywv5h95uodq.js +1 -0
- package/dist/standalone/next-output/static/chunks/0x5_m1_cuacap.js +1 -0
- package/dist/standalone/next-output/static/chunks/0xccil3r~k_7n.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0nkl588xh~5.i.js → 0znvz4n7decra.js} +5 -5
- package/dist/standalone/next-output/static/chunks/{0lik.lmxlumgs.js → 0~z41.7~3tpw3.js} +1 -1
- package/dist/standalone/next-output/static/chunks/14oa3e0hktvxi.js +1 -0
- package/dist/standalone/next-output/static/chunks/15ixzo9s2kj_o.js +1 -0
- package/dist/standalone/package.json +1 -1
- package/package.json +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__08321hx._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0c.ljsw._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d6d7oj._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0ddge-d._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0jx47wg._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0px9gk1._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0qfxx_p._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0v7ghh2._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0xenuid._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0~t0puh._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_08iak5j._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_09-_33p._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0a899fn._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0ceu~9f._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0i4.n_a._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0ks2fqx._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0n4osnj._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0st.s39._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0u8~h8i._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0ybsqe1._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_11d2qve._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_138a8mc._.js +0 -3
- package/dist/standalone/next-output/static/chunks/0.--_5xgw~jq3.js +0 -1
- package/dist/standalone/next-output/static/chunks/00~ilmka-h85i.js +0 -1
- package/dist/standalone/next-output/static/chunks/06u43x9tl391w.js +0 -1
- package/dist/standalone/next-output/static/chunks/0beicab6wjk6i.js +0 -1
- package/dist/standalone/next-output/static/chunks/0d_y_tcdl.atr.js +0 -1
- package/dist/standalone/next-output/static/chunks/0pad.4ycu.c9a.js +0 -1
- package/dist/standalone/next-output/static/chunks/0wwa4vyavaj9y.js +0 -1
- package/dist/standalone/next-output/static/chunks/145wpjuqytc0-.js +0 -1
- package/dist/standalone/next-output/static/chunks/16mdccb8.20ou.css +0 -3
- package/dist/standalone/next-output/static/chunks/16unuw80qbxmx.js +0 -1
- package/dist/standalone/next-output/static/chunks/170g.yxigj5~6.js +0 -1
- package/dist/standalone/next-output/static/chunks/18c9gg_1a7.0p.js +0 -1
- /package/dist/standalone/next-output/static/{wZOpAni2OS7_9AC_2kAVd → Ohbr2ePvonj7GxdJPkXBY}/_buildManifest.js +0 -0
- /package/dist/standalone/next-output/static/{wZOpAni2OS7_9AC_2kAVd → Ohbr2ePvonj7GxdJPkXBY}/_clientMiddlewareManifest.js +0 -0
- /package/dist/standalone/next-output/static/{wZOpAni2OS7_9AC_2kAVd → Ohbr2ePvonj7GxdJPkXBY}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[19702,a=>{"use strict";a.s(["ACTIVE_SHEET_COOKIE_NAME",0,"stt-active-sheet","ACTIVE_SHEET_STORAGE_KEY",0,"super-time-tracker-active-sheet","COMPACT_LISTS_STORAGE_KEY",0,"super-time-tracker-compact-lists","DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME",0,"stt-default-sheet-fixed-name","DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY",0,"super-time-tracker-default-sheet-fixed-name","DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME",0,"stt-default-sheet-session-mode","DEFAULT_SHEET_SESSION_MODE_DEFAULT",0,"last_viewed","DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY",0,"super-time-tracker-default-sheet-session-mode","SHEET_TAG_FILTERS_STORAGE_KEY",0,"super-time-tracker-sheet-tag-filters"])},85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},57077,a=>{"use strict";var b=a.i(7048);a.s(["persist_ui_preference",0,function(a,c){a.read()!==c&&(a.write(c),a.notify(),(0,b.notify_settings_saved)())}])},14945,a=>{"use strict";a.s(["get_entry_list_sort_options",0,function(){return[{value:"newest",label:"Newest"},{value:"oldest",label:"Oldest"},{value:"duration",label:"Duration"},{value:"description",label:"Description"}]}])},27623,a=>{"use strict";var b=a.i(39752);a.s(["SettingRadioGroup",0,function({name:a,legend:c,description:d,value:e,options:f,disabled:g=!1,on_change:h}){var i;return(0,b.jsxs)("fieldset",{className:"m-0 border-0 p-0",children:[(0,b.jsx)("legend",{className:"m-0 mb-1 text-[0.95rem] font-semibold",children:c}),void 0!==d?(0,b.jsx)("p",{className:"m-0 mb-2 text-[0.8rem] leading-snug text-muted",children:d}):null,(0,b.jsx)("div",{className:(i=f.length)<=2||i<=4?"grid grid-cols-1 gap-1.5 sm:grid-cols-2":"grid grid-cols-1 gap-1.5 sm:grid-cols-2 lg:grid-cols-3",children:f.map(c=>{let d=c.value===e;return(0,b.jsxs)("label",{className:`flex h-full cursor-pointer flex-col gap-2 rounded-md border px-2.5 py-2 transition-colors duration-150 ${d?"border-accent-border bg-accent-soft":"border-panel-border hover:bg-surface-hover"}`,children:[(0,b.jsxs)("span",{className:"flex items-start gap-2",children:[(0,b.jsx)("input",{type:"radio",className:"mt-0.5 shrink-0",name:a,value:c.value,checked:d,disabled:g,onChange:()=>h(c.value)}),(0,b.jsx)("span",{className:"text-[0.9rem] font-semibold leading-snug",children:c.label})]}),void 0!==c.description?(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:c.description}):null]},c.value)})})]})}],27623)}];
|
|
1
|
+
module.exports=[19702,a=>{"use strict";a.s(["ACTIVE_SHEET_COOKIE_NAME",0,"stt-active-sheet","ACTIVE_SHEET_STORAGE_KEY",0,"super-time-tracker-active-sheet","COMPACT_LISTS_STORAGE_KEY",0,"super-time-tracker-compact-lists","DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME",0,"stt-default-sheet-fixed-name","DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY",0,"super-time-tracker-default-sheet-fixed-name","DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME",0,"stt-default-sheet-session-mode","DEFAULT_SHEET_SESSION_MODE_DEFAULT",0,"last_viewed","DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY",0,"super-time-tracker-default-sheet-session-mode","SHEET_TAG_FILTERS_STORAGE_KEY",0,"super-time-tracker-sheet-tag-filters"])},85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:a=>a.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},57077,a=>{"use strict";var b=a.i(7048);a.s(["persist_ui_preference",0,function(a,c){a.read()!==c&&(a.write(c),a.notify(),(0,b.notify_settings_saved)())}])},14945,a=>{"use strict";a.s(["get_entry_list_sort_options",0,function(){return[{value:"newest",label:"Newest"},{value:"oldest",label:"Oldest"},{value:"duration",label:"Duration"},{value:"description",label:"Description"}]}])},27623,a=>{"use strict";var b=a.i(39752);a.s(["SettingRadioGroup",0,function({name:a,legend:c,description:d,value:e,options:f,disabled:g=!1,on_change:h}){var i;return(0,b.jsxs)("fieldset",{className:"m-0 border-0 p-0",children:[(0,b.jsx)("legend",{className:"m-0 mb-1 text-[0.95rem] font-semibold",children:c}),void 0!==d?(0,b.jsx)("p",{className:"m-0 mb-2 text-[0.8rem] leading-snug text-muted",children:d}):null,(0,b.jsx)("div",{className:(i=f.length)<=2||i<=4?"grid grid-cols-1 gap-1.5 sm:grid-cols-2":"grid grid-cols-1 gap-1.5 sm:grid-cols-2 lg:grid-cols-3",children:f.map(c=>{let d=c.value===e;return(0,b.jsxs)("label",{className:`flex h-full cursor-pointer flex-col gap-2 rounded-md border px-2.5 py-2 transition-colors duration-150 ${d?"border-accent-border bg-accent-soft":"border-panel-border hover:bg-surface-hover"}`,children:[(0,b.jsxs)("span",{className:"flex items-start gap-2",children:[(0,b.jsx)("input",{type:"radio",className:"mt-0.5 shrink-0",name:a,value:c.value,checked:d,disabled:g,onChange:()=>h(c.value)}),(0,b.jsx)("span",{className:"text-[0.9rem] font-semibold leading-snug",children:c.label})]}),void 0!==c.description?(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:c.description}):null]},c.value)})})]})}],27623)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_13crob-._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:a=>a.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},59659,5796,a=>{"use strict";var b=a.i(87281);function c(){}function d(){(0,b.is_greedy_cloud_sync_enabled)()&&c()}a.i(63577),a.i(51652),a.i(74365),Promise.resolve(),a.s(["schedule_tracker_db_cloud_sync",0,d],5796),a.s(["push_tracker_db_cloud_after_change",0,function(){(0,b.is_greedy_cloud_sync_enabled)()?d():c()}],59659)},19325,a=>{"use strict";var b=a.i(39752),c=a.i(82508),d=a.i(34542),e=a.i(59659),f=a.i(53030),g=a.i(89969);a.s(["BackupRestoreSetting",0,function({db_path:a}){let h=(0,c.useRouter)(),{confirm:i}=(0,f.use_confirm_dialog)(),j=(0,d.useRef)(null),[k,l]=(0,d.useState)(null),[m,n]=(0,d.useState)(null),[o,p]=(0,d.useState)(!1),[q,r]=(0,d.useState)(!1),s=async()=>{p(!0),l(null),n(null);try{let a=await fetch("/api/backup");if(!a.ok){let b=await a.json();throw Error(b.error??"Download failed")}let b=await a.blob(),c=URL.createObjectURL(b),d=document.createElement("a");d.href=c,d.download="db.json",d.click(),URL.revokeObjectURL(c),n("Backup downloaded.")}catch(a){l(a instanceof Error?a.message:String(a))}finally{p(!1)}},t=async a=>{let b=a.target.files?.[0];if((a.target.value="",void 0!==b)&&await i({title:"Restore backup?",message:"This will replace your current time tracker data with the uploaded backup file. This cannot be undone.",confirmLabel:"Restore",variant:"danger"})){r(!0),l(null),n(null);try{let a,c=await b.text();try{a=JSON.parse(c)}catch{throw Error("Invalid backup file: file is not valid JSON.")}let d=await fetch("/api/backup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!d.ok){let a=await d.json();throw Error(a.error??"Restore failed")}n("Backup restored. Opening tracker…"),(0,e.push_tracker_db_cloud_after_change)(),h.push("/"),h.refresh()}catch(a){l(a instanceof Error?a.message:String(a))}finally{r(!1)}}},u=o||q;return(0,b.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Backup and restore"}),(0,b.jsx)("p",{className:"m-0 text-[0.8rem] leading-snug text-muted",children:"Download a copy of your database or replace it with a previously saved backup file."})]}),(0,b.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-mono text-[0.65rem] leading-snug text-muted",title:a,children:a}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"button",className:(0,g.get_button_class_name)("ghost","small"),disabled:u,onClick:()=>void s(),children:o?"Downloading…":"Download backup"}),(0,b.jsx)("button",{type:"button",className:(0,g.get_button_class_name)("danger","small"),disabled:u,onClick:()=>{j.current?.click()},children:q?"Restoring…":"Restore from file"}),(0,b.jsx)("input",{ref:j,type:"file",accept:"application/json,.json",className:"hidden",onChange:a=>void t(a)})]}),null!==m?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:m}):null,null!==k?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:k}):null]})}],19325)},23470,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(89969);function e(a){let b=a.replaceAll('"','""');return`"${b}"`}function f(a){return a.replaceAll("|","\\|").replaceAll("\n"," ")}a.s(["DbExportSetting",0,function({db:a}){let[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),k=(0,c.useMemo)(()=>a.sheets.reduce((a,b)=>a+b.entries.length,0),[a.sheets]),l=b=>{j(null),h(null);try{var c,d,g,i,k,l;let j,m,n,o,p="json"===b?(c=a,JSON.stringify(c,null,2)):"csv"===b?(j=a.sheets.flatMap(a=>a.entries.map(b=>{let c=new Date(b.start).toISOString(),d=null===b.end?"":new Date(b.end).toISOString(),f=null===b.end?"":String(Math.max(0,b.end-b.start)/6e4),g=b.notes.map(a=>a.text).join(" | ");return[a.name,String(b.id),b.description,b.tags.join(" "),c,d,f,String(b.notes.length),g].map(e).join(",")})),["sheet_name,entry_id,description,tags,start_iso,end_iso,duration_minutes,note_count,notes",...j].join("\n")):function(a){let b=[],c=new Date().toISOString(),d=a.sheets.reduce((a,b)=>a+b.entries.length,0);for(let e of(b.push("# super-time-tracker export"),b.push(""),b.push(`- Exported at: ${c}`),b.push(`- Active sheet: ${a.activeSheetName??"none"}`),b.push(`- Sheets: ${a.sheets.length}`),b.push(`- Entries: ${d}`),b.push(""),a.sheets)){if(b.push(`## ${e.name}`),b.push(""),b.push(`- Active entry ID: ${e.activeEntryID??"none"}`),b.push(`- Entries: ${e.entries.length}`),b.push(""),0===e.entries.length){b.push("_No entries_"),b.push("");continue}for(let a of(b.push("| ID | Description | Tags | Start | End | Duration | Notes |"),b.push("| --- | --- | --- | --- | --- | --- | --- |"),e.entries)){let c=new Date(a.start).toISOString(),d=null===a.end?"running":new Date(a.end).toISOString(),e=null===a.end?"running":`${Math.max(0,a.end-a.start)/6e4} min`,g=0===a.tags.length?"-":a.tags.map(a=>`@${a}`).join(" "),h=0===a.notes.length?"-":a.notes.map(a=>a.text).join(" / ");b.push(`| ${a.id} | ${f(a.description)} | ${f(g)} | ${c} | ${d} | ${e} | ${f(h)} |`)}b.push("")}return b.join("\n")}(a),q=`super-time-tracker-export.${(d=b,"json"===d?"json":"csv"===d?"csv":"md")}`,r=(g=b,"json"===g?"application/json":"csv"===g?"text/csv;charset=utf-8":"text/markdown;charset=utf-8");i=q,k=p,l=r,m=new Blob([k],{type:l}),n=URL.createObjectURL(m),(o=document.createElement("a")).href=n,o.download=i,o.click(),URL.revokeObjectURL(n),h(`Downloaded ${q}`)}catch(a){j(a instanceof Error?a.message:String(a))}};return(0,b.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Database export"}),(0,b.jsxs)("p",{className:"m-0 text-[0.8rem] leading-snug text-muted",children:[a.sheets.length," sheets and ",k," entries ready to export."]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("ghost","small"),onClick:()=>l("json"),children:"Export JSON"}),(0,b.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("ghost","small"),onClick:()=>l("csv"),children:"Export CSV"}),(0,b.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("ghost","small"),onClick:()=>l("markdown"),children:"Export Markdown"})]}),null!==g?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:g}):null,null!==i?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:i}):null]})}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_13y76jr._.js.map
|
package/dist/standalone/next-output/server/chunks/ssr/components_today-focus-view_tsx_0~eac-w._.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[85133,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508),e=a.i(34542),f=a.i(76767),g=a.i(33664),h=a.i(86663);let i=[{value:"all",label:"All sheets"},{value:"pinned",label:"Pinned"}];function j({sheet_names:a,on_toggle_pin:c}){let d=(0,e.useSyncExternalStore)(g.today_scope_preference.subscribe,g.today_scope_preference.get_snapshot,g.today_scope_preference.get_server_snapshot),f=(0,e.useSyncExternalStore)(h.subscribe_pinned_sheet_names,h.get_pinned_sheet_names_snapshot,h.get_pinned_sheet_names_server_snapshot),k=new Set(f);return(0,b.jsxs)("div",{className:"flex w-full max-w-2xl flex-col gap-3",children:[(0,b.jsx)("div",{role:"group","aria-label":"Today scope",className:"flex flex-wrap gap-2",children:i.map(a=>{let c=d===a.value;return(0,b.jsx)("button",{type:"button",className:`cursor-pointer rounded-full border px-3 py-1.5 text-[0.85rem] font-semibold transition-colors duration-150 ${c?"border-accent bg-accent-soft text-foreground":"border-panel-border bg-panel text-muted hover:border-accent hover:text-foreground"}`,"aria-pressed":c,onClick:()=>{var b;return b=a.value,void(g.today_scope_preference.read()!==b&&(g.today_scope_preference.write(b),g.today_scope_preference.notify()))},children:a.label},a.value)})}),"pinned"===d?(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[0===f.length?(0,b.jsx)("p",{className:"m-0 text-[0.85rem] text-muted",children:"Pin sheets from the Sheets page or below to filter today's view."}):null,(0,b.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-2 p-0","aria-label":"Pinned sheets",children:a.map(a=>{let d=k.has(a);return(0,b.jsx)("li",{children:(0,b.jsxs)("button",{type:"button",className:`cursor-pointer rounded-full border px-2.5 py-1 text-[0.8rem] font-medium transition-colors duration-150 ${d?"border-accent bg-accent-soft text-foreground":"border-panel-border bg-surface-raised text-muted hover:text-foreground"}`,"aria-pressed":d,onClick:()=>c(a),children:[d?"★ ":"☆ ",a]})},a)})})]}):null]})}var k=a.i(98790),l=a.i(68070),m=a.i(50803),n=a.i(48174),o=a.i(85752),p=a.i(68225),q=a.i(14679);a.i(57377);var r=a.i(115),s=a.i(39744),t=a.i(62082),u=a.i(61566),v=a.i(17603),w=a.i(26336),x=a.i(65162),y=a.i(20537);let z="rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text";function A({label:a,tracked_ms:c,target_ms:d,progress_percent:e,duration_format:f}){return(0,b.jsxs)("article",{className:"rounded-md border border-panel-border bg-background px-3 py-2.5",children:[(0,b.jsx)("p",{className:"m-0 text-[0.75rem] font-semibold uppercase tracking-[0.04em] text-muted",children:a}),(0,b.jsxs)("p",{className:"m-0 mt-1 font-mono text-[0.95rem] font-semibold text-accent",children:[(0,o.format_duration)(c,f)," /"," ",(0,o.format_duration)(d,f)]}),(0,b.jsx)("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-accent-soft",children:(0,b.jsx)("div",{className:"h-full rounded-full bg-accent transition-[width] duration-300",style:{width:`${e}%`}})})]})}function B({entry:a,is_pending:d,duration_format:g,time_format:h,on_check_out:i}){let[j,k]=(0,e.useState)(()=>Date.now()-new Date(a.start)),l=(0,w.use_check_out_action)(a=>{i(a)});(0,e.useEffect)(()=>{k(Date.now()-new Date(a.start));let b=window.setInterval(()=>{k(Date.now()-new Date(a.start))},1e3);return()=>{window.clearInterval(b)}},[a.start]);let m=(0,f.format_time)(a.start,h);return(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-3 shadow-sm",children:(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:a.sheetName}),(0,b.jsx)("p",{className:"m-0 mt-1 truncate text-[0.95rem] font-medium",children:a.description||"Untitled entry"}),(0,b.jsxs)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:["Since ",m]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[(0,b.jsx)("span",{className:"font-mono text-[0.92rem] font-semibold text-accent",children:(0,o.format_duration)(j,g)}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("button",{type:"button",className:"cursor-pointer rounded border border-danger-border bg-danger-soft px-2 py-1 text-[0.74rem] font-semibold text-danger disabled:cursor-not-allowed disabled:opacity-55",disabled:d,onClick:()=>{l()},children:"Check out"}),(0,b.jsx)("button",{type:"button",className:"cursor-pointer rounded border border-danger-border bg-danger-soft px-2 py-1 text-[0.74rem] font-semibold text-danger disabled:cursor-not-allowed disabled:opacity-55",disabled:d,onClick:()=>{let a=(0,u.prompt_check_out_at)();null!==a&&l({at:a})},title:"Check out at specific time",children:"@"}),(0,b.jsx)(c.default,{href:"/",className:"text-[0.75rem] font-semibold text-accent no-underline hover:underline",onClick:()=>(0,q.navigate_to_tracker_sheet)(a.sheetName),children:"Open"})]})]})]})})}function C({suggestion:a,is_pending:c,is_pinned:d,time_format:e,on_toggle_pin:g,on_start:h}){return(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-3 shadow-sm",children:(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:a.sheetName}),(0,b.jsx)("button",{type:"button",className:"cursor-pointer rounded border border-panel-border bg-background px-1.5 py-0.5 text-[0.68rem] font-semibold text-muted hover:bg-surface-hover hover:text-foreground",onClick:()=>g(a.sheetName),title:d?"Unpin sheet":"Pin sheet",children:d?"Pinned":"Pin"})]}),(0,b.jsx)("p",{className:"m-0 mt-1 truncate text-[0.95rem] font-medium",children:a.suggestedDescription||"Untitled entry"}),(0,b.jsxs)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:["Yesterday at ",(0,f.format_time)(a.lastLoggedAt,e)]}),a.suggestedTags.length>0?(0,b.jsx)("ul",{className:"m-0 mt-2 flex list-none flex-wrap gap-1.5 p-0",children:a.suggestedTags.map(a=>(0,b.jsx)("li",{className:z,children:(0,n.format_display_tag)(a)},a))}):null]}),(0,b.jsx)("button",{type:"button",className:"cursor-pointer rounded border border-accent-border bg-accent px-2.5 py-1.5 text-[0.76rem] font-semibold text-accent-text-on disabled:cursor-not-allowed disabled:opacity-55",disabled:c,onClick:()=>{h()},children:"Start task"})]})})}function D({entry:a,duration_format:d,time_format:e,show_sheet_name:g}){let h=(0,f.format_time)(a.start,e),i=null===a.end?"now":(0,f.format_time)(a.end,e);return(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-3 shadow-sm",children:(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[g?(0,b.jsx)("p",{className:"m-0 mb-1 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:a.sheetName}):null,(0,b.jsx)("p",{className:"m-0 text-[0.95rem] font-medium",children:a.description}),(0,b.jsxs)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:[h," → ",i]}),a.tags.length>0?(0,b.jsx)("ul",{className:"m-0 mt-2 flex list-none flex-wrap gap-1.5 p-0",children:a.tags.map(a=>(0,b.jsx)("li",{className:z,children:(0,n.format_display_tag)(a)},a))}):null]}),(0,b.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[(0,b.jsx)("span",{className:"font-mono text-[0.9rem] font-semibold text-accent",children:(0,o.format_duration)(a.todayDurationMs,d)}),(0,b.jsx)(c.default,{href:"/",className:"text-[0.8rem] font-semibold text-accent no-underline hover:underline",onClick:()=>(0,q.navigate_to_tracker_sheet)(a.sheetName),children:"Open sheet"})]})]})})}a.s(["TodayFocusView",0,function({initial_data:a}){let f=(0,d.useRouter)(),i=(0,x.use_duration_format)(),n=(0,y.use_time_format)(),q=(0,e.useSyncExternalStore)(s.daily_focus_target_minutes_preference.subscribe,s.daily_focus_target_minutes_preference.get_snapshot,s.daily_focus_target_minutes_preference.get_server_snapshot),u=(0,e.useSyncExternalStore)(t.weekly_focus_target_minutes_preference.subscribe,t.weekly_focus_target_minutes_preference.get_snapshot,t.weekly_focus_target_minutes_preference.get_server_snapshot),[w,z]=(0,e.useState)(a),[E,F]=(0,e.useState)(null),[G,H]=(0,e.useState)(!1);(0,e.useEffect)(()=>{z(a)},[a]);let I=(0,e.useSyncExternalStore)(g.today_scope_preference.subscribe,g.today_scope_preference.get_snapshot,g.today_scope_preference.get_server_snapshot),J=(0,e.useSyncExternalStore)(h.subscribe_pinned_sheet_names,h.get_pinned_sheet_names_snapshot,h.get_pinned_sheet_names_server_snapshot),K=(0,e.useMemo)(()=>"all"===I?null:new Set(J),[I,J]),L=(0,e.useMemo)(()=>null===K?w.runningEntries:w.runningEntries.filter(a=>K.has(a.sheetName)),[K,w.runningEntries]),M=(0,e.useMemo)(()=>{var a;return null===K?w.todayEntries:(a=w.todayEntries,a.filter(a=>K.has(a.sheetName)))},[K,w.todayEntries]),N=(0,e.useMemo)(()=>null===K?w.startDaySuggestions:w.startDaySuggestions.filter(a=>K.has(a.sheetName)),[K,w.startDaySuggestions]),O=(0,e.useMemo)(()=>M.reduce((a,b)=>a+b.todayDurationMs,0),[M]),P=async a=>{H(!0),F(null);try{await a(),f.refresh()}catch(a){F(a instanceof Error?a.message:String(a))}finally{H(!1)}},Q=6e4*Number.parseInt(q,10),R=6e4*Number.parseInt(u,10),S=Math.min(100,Q>0?Math.round(w.focusStatus.todayTrackedMs/Q*100):0),T=Math.min(100,R>0?Math.round(w.focusStatus.weekTrackedMs/R*100):0);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(k.TrackerTopbar,{breadcrumb:{current:"Today"}}),(0,b.jsxs)("main",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-6 px-5 pb-12 pt-6",children:[(0,b.jsxs)("header",{className:"flex w-full flex-col gap-2 text-center",children:[(0,b.jsx)("h1",{className:"m-0 text-[1.5rem] font-[650] tracking-tight",children:"Today"}),(0,b.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:"Running timers and time logged today."})]}),null!==E?(0,b.jsx)("p",{className:"m-0 w-full rounded-md border border-danger-border bg-danger-soft px-3 py-2 text-[0.85rem] text-danger",children:E}):null,(0,b.jsx)(j,{sheet_names:w.sheetNames,on_toggle_pin:v.toggle_pinned_sheet_name}),(0,b.jsxs)("section",{className:"w-full rounded-md border border-panel-border bg-panel p-4 shadow-sm","aria-label":"Focus goals progress",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Focus goals"}),(0,b.jsx)(c.default,{href:"/settings/goals",className:"text-[0.78rem] font-semibold text-accent no-underline hover:underline",children:"Edit goals"})]}),(0,b.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-2 min-[620px]:grid-cols-2",children:[(0,b.jsx)(A,{label:"Daily",tracked_ms:w.focusStatus.todayTrackedMs,target_ms:Q,progress_percent:S,duration_format:i}),(0,b.jsx)(A,{label:"Weekly",tracked_ms:w.focusStatus.weekTrackedMs,target_ms:R,progress_percent:T,duration_format:i})]})]}),(0,b.jsxs)("section",{className:"w-full rounded-md border border-panel-border bg-panel p-4 shadow-sm","aria-label":"Today total",children:[(0,b.jsxs)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:["Tracked today","pinned"===I?" (pinned)":""]}),(0,b.jsx)("p",{className:"m-0 mt-1 font-mono text-[1.75rem] font-semibold text-accent",children:(0,o.format_duration)(O,i)})]}),(0,b.jsxs)("section",{className:"flex w-full flex-col gap-3","aria-label":"Running timers",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Running now"}),(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:0===L.length?"No active timers":1===L.length?"1 timer":`${L.length} timers`})]}),0===L.length?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"No running timers for the selected scope."}):(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:L.map(a=>(0,b.jsx)(B,{entry:a,is_pending:G,duration_format:i,time_format:n,on_check_out:b=>P(async()=>{await (0,r.post_tracker_action)("/api/out",(0,l.build_check_out_request_payload)(a.sheetName,b)),(0,p.finish_running_pomodoro_timer)()})},`${a.sheetName}-${a.id}`))})]}),(0,b.jsxs)("section",{className:"flex w-full flex-col gap-3","aria-label":"Start day suggestions",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Start day"}),(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Suggested first task from yesterday"})]}),0===N.length?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"No yesterday history yet for the selected scope."}):(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:N.map(a=>(0,b.jsx)(C,{suggestion:a,is_pending:G,is_pinned:J.includes(a.sheetName),time_format:n,on_toggle_pin:v.toggle_pinned_sheet_name,on_start:()=>P(()=>(0,r.post_tracker_action)("/api/in",{sheetName:a.sheetName,description:(0,m.build_resume_description)(a.suggestedDescription,a.suggestedTags)}))},`${a.sheetName}-${a.lastLoggedAt}`))})]}),(0,b.jsxs)("section",{className:"flex w-full flex-col gap-3","aria-label":"Today's entries",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Today's entries"}),(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:0===M.length?"None":1===M.length?"1 entry":`${M.length} entries`})]}),0===M.length?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"pinned"===I&&0===J.length?"Pin at least one sheet to see today’s activity.":"No time logged today for the selected scope."}):(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:M.map(a=>(0,b.jsx)(D,{entry:a,duration_format:i,time_format:n,show_sheet_name:"all"===I||J.length>1},`${a.sheetName}-${a.id}`))})]})]})]})}],85133)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=components_today-focus-view_tsx_0~eac-w._.js.map
|
package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[12584,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(34542),e=a.i(30354),f=a.i(89969),g=a.i(69749),h=a.i(98831),i=a.i(40420),j=a.i(6962),k=a.i(45273),l=a.i(54393);function m({known_tags:a,on_submit:c,is_pending:n}){let[o,p]=(0,d.useState)(""),[q,r]=(0,d.useState)(""),[s,t]=(0,d.useState)(null),[u,v]=(0,d.useState)(!1),w=(0,d.useSyncExternalStore)(i.entry_suggestion_provider_preference.subscribe,i.entry_suggestion_provider_preference.get_snapshot,i.entry_suggestion_provider_preference.get_server_snapshot),x=(0,d.useSyncExternalStore)(k.openai_api_key_preference.subscribe,k.openai_api_key_preference.get_snapshot,k.openai_api_key_preference.get_server_snapshot),y=(0,d.useSyncExternalStore)(h.claude_api_key_preference.subscribe,h.claude_api_key_preference.get_snapshot,h.claude_api_key_preference.get_server_snapshot),z=(0,d.useSyncExternalStore)(j.google_ai_api_key_preference.subscribe,j.google_ai_api_key_preference.get_snapshot,j.google_ai_api_key_preference.get_server_snapshot),A="openai"===w?x:"claude"===w?y:"google_ai"===w?z:"",B="none"!==w&&A.trim().length>0,C=async()=>{if(B){v(!0),t(null);try{let a=await (0,l.request_ai_entry_description_suggestion)({provider:w,api_key:A,context:o,notes:""});p(a)}catch(a){t(a instanceof Error?a.message:String(a))}finally{v(!1)}}};return(0,b.jsxs)("form",{className:"flex flex-col gap-2 border border-panel-border bg-panel p-[1.1rem] shadow-sm",onSubmit:a=>{a.preventDefault();let b=o.trim();if(0===b.length)return;let d=q.trim();c({description:b,...d.length>0?{at:d}:{}}),p(""),r("")},children:[(0,b.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-description",children:"What are you working on?"}),(0,b.jsxs)("div",{className:`grid gap-2 max-[860px]:grid-cols-1 ${B?"grid-cols-[minmax(0,1fr)_auto_auto]":"grid-cols-[minmax(0,1fr)_auto]"}`,children:[(0,b.jsx)(e.TagAutocompleteInput,{id:"check-in-description",value:o,known_tags:a,placeholder:"e.g. crafting something @design",disabled:n,autoFocus:!0,on_change:p}),B?(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost"),disabled:n||u,onClick:()=>void C(),title:"Suggest description with AI",children:u?"Suggesting…":"Suggest"}):null,(0,b.jsx)("button",{type:"submit",className:(0,f.get_button_class_name)("primary"),disabled:n||0===o.trim().length,children:"Check in"})]}),null!==s?(0,b.jsx)("p",{className:"m-0 text-[0.8rem] text-danger",children:s}):null,(0,b.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-at",children:["Start time"," ",(0,b.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,b.jsx)("input",{id:"check-in-at",className:(0,g.get_input_class_name)(),value:q,onChange:a=>r(a.target.value),placeholder:"e.g. 30 minutes ago",disabled:n})]})}var n=a.i(14244);let o=(0,d.forwardRef)(function({known_tags:a,is_pending:c,on_submit:e,trailing:g},h){let i="true"===(0,d.useSyncExternalStore)(n.check_in_form_collapsed_preference.subscribe,n.check_in_form_collapsed_preference.get_snapshot,n.check_in_form_collapsed_preference.get_server_snapshot),[j,k]=(0,d.useState)(!i);return((0,d.useImperativeHandle)(h,()=>({expand_and_focus:()=>{k(!0),window.requestAnimationFrame(()=>{let a=document.getElementById("check-in-description");a instanceof HTMLElement&&a.focus()})}}),[]),i&&!j)?(0,b.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-3",children:[(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("primary"),disabled:c,onClick:()=>k(!0),children:"Check in"}),g]}):(0,b.jsx)(m,{known_tags:a,is_pending:c,on_submit:a=>{e(a),i&&k(!1)}})});var p=a.i(75654),q=a.i(85752),r=a.i(50762),s=a.i(39744),t=a.i(13870),u=a.i(16777),v=a.i(18558),w=a.i(80805),x=a.i(9818),y=a.i(72327),z=a.i(40395),A=a.i(76121),B=a.i(62082),C=a.i(64617),D=a.i(65162);function E({on_check_in_shortcut:a,has_running_timer:c=!1}){let e=(0,D.use_duration_format)(),f=(0,d.useSyncExternalStore)(y.focus_nudges_enabled_preference.subscribe,y.focus_nudges_enabled_preference.get_snapshot,y.focus_nudges_enabled_preference.get_server_snapshot),g=(0,d.useSyncExternalStore)(s.daily_focus_target_minutes_preference.subscribe,s.daily_focus_target_minutes_preference.get_snapshot,s.daily_focus_target_minutes_preference.get_server_snapshot),h=(0,d.useSyncExternalStore)(B.weekly_focus_target_minutes_preference.subscribe,B.weekly_focus_target_minutes_preference.get_snapshot,B.weekly_focus_target_minutes_preference.get_server_snapshot),i=(0,d.useSyncExternalStore)(z.no_log_reminder_minutes_preference.subscribe,z.no_log_reminder_minutes_preference.get_snapshot,z.no_log_reminder_minutes_preference.get_server_snapshot),j=(0,d.useSyncExternalStore)(A.overwork_alert_hours_preference.subscribe,A.overwork_alert_hours_preference.get_snapshot,A.overwork_alert_hours_preference.get_server_snapshot),k=(0,d.useSyncExternalStore)(t.focus_goal_scope_preference.subscribe,t.focus_goal_scope_preference.get_snapshot,t.focus_goal_scope_preference.get_server_snapshot),l=(0,d.useSyncExternalStore)(u.focus_goal_sheet_name_preference.subscribe,u.focus_goal_sheet_name_preference.get_snapshot,u.focus_goal_sheet_name_preference.get_server_snapshot),m=(0,d.useSyncExternalStore)(v.focus_goal_tag_name_preference.subscribe,v.focus_goal_tag_name_preference.get_snapshot,v.focus_goal_tag_name_preference.get_server_snapshot),n=(0,d.useSyncExternalStore)(w.focus_goals_per_sheet_preference.subscribe,w.focus_goals_per_sheet_preference.get_snapshot,w.focus_goals_per_sheet_preference.get_server_snapshot),o=(0,d.useSyncExternalStore)(x.focus_goals_per_tag_preference.subscribe,x.focus_goals_per_tag_preference.get_snapshot,x.focus_goals_per_tag_preference.get_server_snapshot),[p,H]=(0,d.useState)(null),[I,J]=(0,d.useState)(null);(0,d.useEffect)(()=>{let a=()=>{try{let a=window.localStorage.getItem(C.POMODORO_STORAGE_KEY);if(null===a)return null;let b=JSON.parse(a).state;if(void 0===b||"running"!==b.status||null===b.deadline_at_ms)return null;let c=Math.max(0,b.deadline_at_ms-Date.now()),d=Math.floor(c/6e4),e=Math.floor(c%6e4/1e3);return{phase_label:"work"===b.phase?"Focus":"short_break"===b.phase?"Short break":"Long break",remaining_label:`${d.toString().padStart(2,"0")}:${e.toString().padStart(2,"0")}`}}catch{return null}};J(a());let b=window.setInterval(()=>{J(a())},1e3);return()=>{window.clearInterval(b)}},[]),(0,d.useEffect)(()=>{if("true"!==f)return;let a=!1,b=async()=>{try{var b,c,d;let e=new URLSearchParams;e.set("scope",(b=k,c=l,d=m,"sheet"===b&&0===c.length||"tag"===b&&0===d.length?"global":b)),"sheet"===k&&l.length>0&&e.set("sheet",l),"tag"===k&&m.length>0&&e.set("tag",m);let f=await fetch(`/api/focus-nudges/status?${e.toString()}`);if(!f.ok)return;let g=await f.json();a||H(g)}catch{}};b();let c=window.setInterval(()=>{b()},6e4);return()=>{a=!0,window.clearInterval(c)}},[f,k,l,m]);let K=(0,d.useMemo)(()=>{if("true"!==f||null===p)return null;let{daily_minutes:a,weekly_minutes:b}=function(a){if("sheet"===a.scope&&a.sheet_name.length>0){let b=(0,r.parse_focus_goals_by_name)(a.per_sheet_json)[a.sheet_name];return void 0===b?{daily_minutes:null,weekly_minutes:null}:{daily_minutes:b.daily??a.global_daily,weekly_minutes:b.weekly??a.global_weekly}}if("tag"===a.scope&&a.tag_name.length>0){let b=(0,r.parse_focus_goals_by_name)(a.per_tag_json)[a.tag_name];return void 0===b?{daily_minutes:null,weekly_minutes:null}:{daily_minutes:b.daily??a.global_daily,weekly_minutes:b.weekly??a.global_weekly}}return{daily_minutes:a.global_daily,weekly_minutes:a.global_weekly}}({scope:k,sheet_name:l,tag_name:m,per_sheet_json:n,per_tag_json:o,global_daily:g,global_weekly:h});if(null===a||null===b)return{kind:"alert",tone:"info",title:F("daily",k,l,m),detail:"No goals configured yet for this scope. Set daily and weekly targets in Goal settings."};let d=6e4*Number.parseInt(a,10),s=6e4*Number.parseInt(b,10),t=36e5*Number.parseInt(j,10),u=Number.parseInt(i,10);return null!==p.activeTimerDurationMs&&p.activeTimerDurationMs>=t?{kind:"alert",tone:"warning",title:"Overwork alert",detail:`Current session is ${(0,q.format_duration)(p.activeTimerDurationMs,e)}. Consider a short break.`}:!c&&null!==p.minutesSinceLastLog&&p.minutesSinceLastLog>=u?{kind:"alert",tone:"warning",title:"Gentle reminder",detail:`No time logged for ${p.minutesSinceLastLog} min. Start a timer when you are back on task.`,show_check_in_shortcut:!0}:p.todayTrackedMs<d?{kind:"progress",scope:"daily",title:F("daily",k,l,m),tracked_ms:p.todayTrackedMs,target_ms:d}:p.weekTrackedMs<s?{kind:"progress",scope:"weekly",title:F("weekly",k,l,m),tracked_ms:p.weekTrackedMs,target_ms:s}:{kind:"alert",tone:"success",title:"Targets met",detail:"Daily and weekly focus goals are on track."}},[g,e,f,j,c,k,l,m,n,o,i,p,h]);if(null===K)return null;if("progress"===K.kind)return(0,b.jsx)(G,{scope:K.scope,title:K.title,tracked_ms:K.tracked_ms,target_ms:K.target_ms,duration_format:e,active_pomodoro:I});let L="warning"===K.tone?"mb-4 rounded-md border border-danger-border bg-danger-soft px-3 py-2.5 text-danger-text":"success"===K.tone?"mb-4 rounded-md border border-accent-border bg-accent-soft px-3 py-2.5 text-accent":"mb-4 rounded-md border border-panel-border bg-panel px-3 py-2.5 text-foreground";return(0,b.jsxs)("section",{className:L,"aria-live":"polite","aria-atomic":"true",children:[(0,b.jsx)("p",{className:"m-0 text-[0.85rem] font-semibold",children:K.title}),(0,b.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,b.jsx)("p",{className:"m-0 text-[0.82rem] leading-relaxed",children:K.detail}),K.show_check_in_shortcut&&void 0!==a?(0,b.jsx)("button",{type:"button",className:"cursor-pointer rounded border border-current bg-transparent px-2 py-1 text-[0.75rem] font-semibold",onClick:a,children:"Check in"}):null]})]})}function F(a,b,c,d){let e="daily"===a?"Relevant goal":"Weekly goal";return"sheet"===b&&c.length>0?`${e} \xb7 ${c}`:"tag"===b&&d.length>0?`${e} \xb7 @${d}`:e}function G({scope:a,title:d,tracked_ms:e,target_ms:f,duration_format:g,active_pomodoro:h}){let i=f>0?Math.min(100,e/f*100):0,j=Math.max(0,f-e);return(0,b.jsxs)("section",{className:"mb-4 rounded-md border border-panel-border bg-panel px-4 py-3 shadow-sm","aria-label":d,"aria-live":"polite",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:d}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[null!==h?(0,b.jsxs)("p",{className:"m-0 rounded border border-panel-border bg-surface-raised px-2 py-1 font-mono text-[0.72rem] font-semibold text-accent",children:["Pomodoro ",h.phase_label," · ",h.remaining_label]}):null,"daily"===a?(0,b.jsx)(c.default,{href:"/settings/goals#focus-goals-nudges",className:"inline-flex h-6 w-6 items-center justify-center rounded border border-panel-border text-muted no-underline hover:bg-surface-hover hover:text-foreground","aria-label":"Open daily focus target settings",title:"Daily focus target settings",children:(0,b.jsx)(p.SettingsIcon,{})}):null,(0,b.jsxs)("p",{className:"m-0 font-mono text-[0.78rem] font-semibold text-accent",children:[Math.round(i),"%"]})]})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-baseline justify-between gap-3",children:[(0,b.jsxs)("p",{className:"m-0 font-mono text-[1.35rem] font-semibold leading-none text-foreground",children:[(0,q.format_duration)(e,g),(0,b.jsxs)("span",{className:"ml-1 text-[0.85rem] font-medium text-muted",children:["/ ",(0,q.format_duration)(f,g)]})]}),(0,b.jsxs)("p",{className:"m-0 text-[0.78rem] text-muted",children:[(0,q.format_duration)(j,g)," left ","daily"===a?"today":"this week"]})]}),(0,b.jsx)("div",{className:"mt-3 h-1.5 w-full overflow-hidden rounded-full bg-accent-soft",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(i),children:(0,b.jsx)("div",{className:"h-full rounded-full bg-accent transition-[width] duration-300",style:{width:`${i}%`}})})]})}var H=a.i(82508),I=a.i(7386);function J(a,b,c){if(0===a.length)return null;let d=a.findIndex(a=>a.name===b),e=((-1===d?0:d)+("next"===c?1:-1)+a.length)%a.length;return a[e]?.name??null}var K=a.i(89711),L=a.i(26336),M=a.i(89184);function N({sheets:a,active_sheet_name:c,active_entry:e,is_pending:f,check_in_form_ref:g,active_entry_panel_ref:h,on_select_sheet:i,on_check_out:j}){let k=(0,H.useRouter)(),[l,m]=(0,d.useState)(!1),n=(0,L.use_check_out_action)(j),o=(0,d.useMemo)(()=>{let b=null!==e;return[{id:"help",label:"?",description:"Show keyboard shortcuts",key:"?",modifiers:["shift"],action:()=>{m(a=>!a)}},{id:"check-in",label:"C",description:"Check in (focus description)",key:"c",is_available:()=>!f&&!b,action:()=>{g.current?.expand_and_focus()}},{id:"check-out",label:"O",description:"Check out",key:"o",is_available:()=>!f&&b,action:()=>{n()}},{id:"edit-entry",label:"E",description:"Edit active entry",key:"e",is_available:()=>!f&&b,action:()=>{h.current?.start_edit()}},{id:"add-note",label:"N",description:"Add note to active entry",key:"n",is_available:()=>!f&&b,action:()=>{h.current?.start_add_note()}},{id:"pomodoro",label:"P",description:"Open Pomodoro",key:"p",is_available:()=>!f,action:()=>{k.push("/pomodoro")}},{id:"previous-sheet",label:"[",description:"Previous sheet",key:"[",is_available:()=>!f&&a.length>1,action:()=>{let b=J(a,c,"previous");null!==b&&b!==c&&i(b)}},{id:"next-sheet",label:"]",description:"Next sheet",key:"]",is_available:()=>!f&&a.length>1,action:()=>{let b=J(a,c,"next");null!==b&&b!==c&&i(b)}}]},[e,h,c,g,n,f,i,k,a]);return((0,M.use_document_keyboard_shortcuts)(o),l)?(0,b.jsx)(I.KeyboardShortcutsDialog,{sections:[...(0,K.get_app_keyboard_shortcut_sections)(),{title:"Tracker",entries:[{label:"C",description:"Check in (focus description)"},{label:"O",description:"Check out"},{label:"E",description:"Edit active entry description"},{label:"N",description:"Add note to active entry"},{label:"P",description:"Open Pomodoro"},{label:"[",description:"Previous sheet"},{label:"]",description:"Next sheet"}]}],on_close:()=>m(!1)}):null}var O=a.i(48174),P=a.i(56924);function Q(a){let b=[],c=new Set;for(let d of({})[a]??[])try{let a=(0,P.normalize_stored_tag)(d);c.has(a)||(c.add(a),b.push(a))}catch{continue}return b}var R=a.i(4845);function S(a){return(0,R.get_stable_sheet_tag_filter_snapshot)(a,Q(a))}function T(){return R.EMPTY_SHEET_TAG_FILTER}var U=a.i(5479),V=a.i(72958),W=a.i(19702);function X(a,b){let c={};0===b.length?delete c[a]:c[a]=b;try{window.localStorage.setItem(W.SHEET_TAG_FILTERS_STORAGE_KEY,JSON.stringify(c)),(0,V.schedule_ui_preferences_cloud_sync)()}catch{}(0,U.notify_sheet_tag_filters_subscribers)()}function Y(a,b){try{return(0,P.normalize_stored_tag)(a)===(0,P.normalize_stored_tag)(b)}catch{return!1}}var Z=a.i(78702);function $(){return(0,d.useSyncExternalStore)(Z.tag_filter_mode_preference.subscribe,Z.tag_filter_mode_preference.get_snapshot,Z.tag_filter_mode_preference.get_server_snapshot)}function _({sheet_name:a,sheet_tags:c}){let e=$(),g=(0,d.useSyncExternalStore)(U.subscribe_sheet_tag_filters,()=>S(a),T);if((0,d.useEffect)(()=>{!function(a,b){let c=Q(a);if(0===c.length)return;let d=c.filter(a=>b.some(b=>Y(a,b)));d.length!==c.length&&X(a,d)}(a,c.map(a=>a.name))},[a,c]),0===c.length)return null;let h=g.length>0;return(0,b.jsxs)("div",{role:"group","aria-label":"Filter by tag",className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,b.jsx)("h2",{className:"m-0 shrink-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em]",children:"Filter by tag"}),(0,b.jsx)("p",{className:"m-0 shrink-0 text-[0.8rem] text-muted",children:"any"===e?"Show entries that include any selected tag.":"Show entries that include every selected tag."}),(0,b.jsxs)("div",{className:"ml-auto flex min-w-0 flex-wrap justify-end gap-1",children:[c.map(c=>{let d=g.some(a=>Y(a,c.name));return(0,b.jsxs)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost","small")} ${d?"border-accent-border bg-accent-soft text-foreground":""}`,"aria-pressed":d,onClick:()=>{var b;let d,e;return b=c.name,d=(0,P.normalize_stored_tag)(b),void((e=Q(a)).some(a=>Y(a,d))?X(a,e.filter(a=>!Y(a,d))):X(a,[...e,d]))},children:[(0,O.format_display_tag)(c.name),(0,b.jsxs)("span",{className:"ml-1 font-normal text-muted",children:["(",c.entryCount,")"]})]},c.name)}),h?(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),onClick:()=>X(a,[]),children:"Clear filter"}):null]})]})}let aa="inline-flex shrink-0 cursor-pointer items-center gap-1.5";function ab({checked:a,disabled:c=!1,indeterminate:e=!1,nested:f=!1,on_change:g,label:h,aria_label:i,className:j}){let k=(0,d.useRef)(null);(0,d.useEffect)(()=>{null!==k.current&&(k.current.indeterminate=e)},[e]);let l=void 0===j?aa:`${aa} ${j}`,m=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("input",{ref:k,type:"checkbox",className:"peer absolute m-0 h-px w-px overflow-hidden opacity-0",checked:a,disabled:c,"aria-label":f&&void 0===h?i:void 0,onChange:g}),(0,b.jsx)("span",{className:'relative block h-[0.85rem] w-[0.85rem] shrink-0 rounded-[0.2rem] border border-panel-border bg-input-bg box-border transition-[background-color,border-color] duration-150 peer-checked:border-accent peer-checked:bg-accent peer-indeterminate:border-accent peer-indeterminate:bg-accent peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-input-focus-border peer-focus-visible:outline-offset-1 peer-disabled:cursor-not-allowed peer-disabled:opacity-55 after:absolute after:left-1/2 after:top-[44%] after:hidden after:h-[0.28rem] after:w-[0.45rem] after:-translate-x-1/2 after:-translate-y-[60%] after:rotate-[-45deg] after:border-b-[1.5px] after:border-l-[1.5px] after:border-accent-text-on after:content-[""] peer-checked:after:block peer-indeterminate:after:top-1/2 peer-indeterminate:after:block peer-indeterminate:after:h-[1.5px] peer-indeterminate:after:w-[0.45rem] peer-indeterminate:after:-translate-x-1/2 peer-indeterminate:after:-translate-y-1/2 peer-indeterminate:after:rotate-0 peer-indeterminate:after:border-0 peer-indeterminate:after:bg-accent-text-on',"aria-hidden":"true"})]});return f?(0,b.jsx)("span",{className:l,children:m}):(0,b.jsxs)("label",{className:l,children:[m,void 0!==h?(0,b.jsx)("span",{className:"select-none text-[0.8rem] leading-tight text-muted",children:h}):null]})}var ac=a.i(53030),ad=a.i(92558),ae=a.i(56720),af=a.i(51934);function ag({selected_count:a,total_count:c,all_selected:e,some_selected:h,selected_entries:i,sheets:j,is_pending:k,on_toggle_all:l,on_move:m,on_delete:n,on_clear:o}){let[p,q]=(0,d.useState)(""),r=i.some(a=>a.isActive),s=j.filter(a=>(!r||!a.hasActiveEntry)&&i.some(b=>b.sheetName!==a.name));return(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-md border border-accent-border bg-accent-soft px-3 py-2",children:[(0,b.jsx)(ab,{className:"shrink-0",checked:e,indeterminate:h,disabled:k,aria_label:e?"Deselect all entries":"Select all entries",on_change:l}),(0,b.jsxs)("p",{className:"m-0 shrink-0 text-[0.85rem] font-semibold",children:[a,(0,b.jsx)("span",{className:"text-muted",children:` of ${c} selected`})]}),(0,b.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("select",{className:`${(0,g.get_input_class_name)("compact")} min-w-32`,value:p,disabled:k||0===s.length,"aria-label":"Move to sheet",onChange:a=>q(a.target.value),children:[(0,b.jsx)("option",{value:"",children:"Move to…"}),s.map(a=>(0,b.jsx)("option",{value:a.name,children:a.name},a.name))]}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),disabled:k||0===p.trim().length||0===s.length,onClick:()=>{let a=p.trim();0!==a.length&&(m(a),q(""))},children:"Move"})]}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("danger","small"),disabled:k,onClick:n,children:"Delete"}),(0,b.jsx)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost","small")} shrink-0`,disabled:k,"aria-label":"Clear selection",title:"Clear selection",onClick:o,children:"✕"})]})]})}var ah=a.i(14945),ai=a.i(79918),aj=a.i(57077);function ak(){return(0,d.useSyncExternalStore)(ai.entry_list_sort_preference.subscribe,ai.entry_list_sort_preference.get_snapshot,ai.entry_list_sort_preference.get_server_snapshot)}let al=(0,ah.get_entry_list_sort_options)();function am({is_pending:a=!1}){let c=ak();return(0,b.jsxs)("fieldset",{className:"m-0 flex flex-wrap items-center gap-x-2 gap-y-1.5 border-0 p-0",children:[(0,b.jsx)("legend",{className:"sr-only",children:"Order entries by"}),(0,b.jsx)("span",{className:"shrink-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Order by"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1",role:"group","aria-label":"Order entries by",children:al.map(d=>{let e=c===d.value;return(0,b.jsx)("button",{type:"button",className:e?(0,f.get_button_class_name)("primary","small"):(0,f.get_button_class_name)("ghost","small"),disabled:a,"aria-pressed":e,onClick:()=>(0,aj.persist_ui_preference)(ai.entry_list_sort_preference,d.value),children:d.label},d.value)})})]})}var an=a.i(76767),ao=a.i(20872);function ap(a){return`${a.sheetName}-${a.id}`}var aq=a.i(28339),ar=a.i(96359),as=a.i(20537);function at({title:a,entries:c,sheets:e,known_tags:f,total_ms:g,empty_message:m,is_pending:n,show_sheet_name:o=!0,header_extra:p,on_delete:r,on_edit:s,on_move:t,on_move_many:u,on_delete_many:v,on_edit_note:w,on_add_note:x,on_resume:y}){let{confirm:z}=(0,ac.use_confirm_dialog)(),A=(0,aq.use_confirm_destructive_actions)(),B=(0,as.use_time_format)(),C=(0,D.use_duration_format)(),[E,F]=(0,d.useState)(null),[G,H]=(0,d.useState)(()=>new Set),[I,J]=(0,d.useState)(null),[K,L]=(0,d.useState)(null),[M,N]=(0,d.useState)({}),P=(0,d.useSyncExternalStore)(i.entry_suggestion_provider_preference.subscribe,i.entry_suggestion_provider_preference.get_snapshot,i.entry_suggestion_provider_preference.get_server_snapshot),Q=(0,d.useSyncExternalStore)(k.openai_api_key_preference.subscribe,k.openai_api_key_preference.get_snapshot,k.openai_api_key_preference.get_server_snapshot),R=(0,d.useSyncExternalStore)(h.claude_api_key_preference.subscribe,h.claude_api_key_preference.get_snapshot,h.claude_api_key_preference.get_server_snapshot),S=(0,d.useSyncExternalStore)(j.google_ai_api_key_preference.subscribe,j.google_ai_api_key_preference.get_snapshot,j.google_ai_api_key_preference.get_server_snapshot),T="openai"===P?Q:"claude"===P?R:"google_ai"===P?S:"",U="none"!==P&&T.trim().length>0,V=c.map(a=>ap(a)),W=c.filter(a=>G.has(ap(a))),X=c.length>0&&W.length===c.length,Y=W.length>0&&W.length<c.length;(0,d.useEffect)(()=>{H(a=>{let b=new Set(V),c=new Set([...a].filter(a=>b.has(a)));return c.size===a.size?a:c})},[V.join("|")]);let Z=()=>{X?H(new Set):H(new Set(V))},$=()=>{H(new Set)},_=async()=>{let a,b,c;0!==W.length&&(!A||await z((a=W.length,b=W.some(a=>a.isActive),c=1===a?"1 entry":`${a} entries`,{title:1===a?"Delete entry?":"Delete entries?",message:`Permanently delete ${c}?${b?" This will stop the active timer.":""}`,confirmLabel:"Delete",variant:"danger"})))&&(v(W),$())},aa=W.length>0,ah=async a=>{if(!U)return;let b=ap(a);J(b),L(null);try{let c=a.notes.map(a=>a.text).join("\n"),d=await (0,l.request_ai_entry_description_suggestion)({provider:P,api_key:T,context:a.description,notes:c});N(a=>({...a,[b]:d})),F(b)}catch(a){L(a instanceof Error?a.message:String(a))}finally{J(null)}};return(0,ar.use_escape_to_cancel)($,aa&&null===E),(0,b.jsxs)("section",{className:"min-w-0",children:[(0,b.jsx)("header",{className:"mb-3 flex flex-col gap-2 border-b border-panel-border pb-2.5 compact:mb-2 compact:pb-1.5",children:aa?(0,b.jsx)(ag,{selected_count:W.length,total_count:c.length,all_selected:X,some_selected:Y,selected_entries:W,sheets:e,is_pending:n,on_toggle_all:Z,on_move:a=>{u(W,a),$()},on_delete:()=>void _(),on_clear:$}):(0,b.jsxs)(b.Fragment,{children:[p,(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2.5",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[c.length>0?(0,b.jsx)(ab,{className:"shrink-0",checked:X,indeterminate:Y,disabled:n,aria_label:"Select all entries",on_change:Z}):null,(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em]",children:a}),(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:0===c.length?null:1===c.length?"1 entry":`${c.length} entries`})]}),(0,b.jsxs)("p",{className:"m-0 font-mono text-[0.85rem] text-muted max-[640px]:w-full",children:[(0,q.format_duration)(g,C)," total"]})]}),(0,b.jsx)(am,{is_pending:n}),null!==K?(0,b.jsx)("p",{className:"m-0 text-[0.8rem] text-danger",children:K}):null]})}),0===c.length?(0,b.jsx)("p",{className:"m-0 text-muted",children:m}):(0,b.jsx)(b.Fragment,{children:(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col p-0",children:c.map(a=>{let c=ap(a),d=E===c,g=G.has(c);return d?(0,b.jsx)("li",{className:"block border-b border-panel-border py-2.5 last:border-b-0 compact:py-1.5",children:(0,b.jsx)(af.EntryEditForm,{entry:a,known_tags:f,is_pending:n,initial_description_override:M[c],on_cancel:()=>{F(null),N(a=>{if(!(c in a))return a;let b={...a};return delete b[c],b})},on_save:b=>{s(a,b),F(null),N(a=>{if(!(c in a))return a;let b={...a};return delete b[c],b})}})},c):(0,b.jsxs)("li",{className:`group relative flex flex-col gap-0 border-b border-panel-border px-2 py-2.5 transition-colors duration-150 last:border-b-0 hover:bg-surface-hover compact:py-1.5 ${g?"bg-accent-soft hover:bg-accent-soft":""}`,children:[(0,b.jsxs)("div",{className:"flex w-full min-w-0 flex-col items-start gap-2.5 min-[700px]:flex-row min-[700px]:items-center compact:gap-1.5",children:[(0,b.jsxs)("label",{className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 has-disabled:cursor-not-allowed","aria-label":`Select entry ${a.description||"Untitled entry"}`,children:[(0,b.jsx)(ab,{nested:!0,className:`shrink-0 pr-1 transition-opacity duration-150 compact:pr-0.5 ${g||aa?"opacity-100":"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`,checked:g,disabled:n,on_change:()=>{H(a=>{let b=new Set(a);return b.has(c)?b.delete(c):b.add(c),b})}}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-semibold leading-snug compact:text-[0.9rem] compact:leading-tight",children:a.description||"Untitled entry"}),(0,b.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-1 text-[0.8rem] text-muted compact:mt-px compact:gap-0.5 compact:text-[0.72rem]",children:[o?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:a.sheetName}),(0,b.jsx)("span",{children:"·"})]}):null,(0,b.jsxs)("span",{children:["#",a.id]}),(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{className:"whitespace-nowrap",children:[(0,an.format_time)(a.start,B),null===a.end?" → now":` → ${(0,an.format_time)(a.end,B)}`]}),a.tags.length>0?(0,b.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1 p-0",children:a.tags.map(a=>(0,b.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,O.format_display_tag)(a)},a))}):null]})]})]}),(0,b.jsxs)("div",{className:"flex w-full shrink-0 flex-row items-center justify-between gap-2 min-[700px]:w-auto min-[700px]:justify-end max-[860px]:flex-wrap compact:gap-1.5",children:[(0,b.jsx)("p",{className:`m-0 whitespace-nowrap text-right font-mono text-[0.9rem] text-muted compact:text-[0.8rem] ${a.isActive?"text-accent":""}`,children:(0,q.format_duration)(a.durationMs,C)}),(0,b.jsx)(ad.EntryActionsMenu,{current_sheet_name:a.sheetName,sheets:e,is_pending:n||I===c,on_edit:()=>{F(c),N(a=>{if(!(c in a))return a;let b={...a};return delete b[c],b})},on_revise_description_ai:U?()=>void ah(a):void 0,can_revise_description_ai:U,on_add_note:b=>x(a,b),on_resume:()=>y(a),entry_is_active:a.isActive,on_move:b=>t(a,b),on_delete:async()=>{(!A||await z((0,ao.get_delete_entry_confirm_dialog)(a)))&&r(a)}})]})]}),a.notes.length>0?(0,b.jsx)("div",{className:"w-full pt-1 pl-[calc(0.85rem+0.5rem+0.35rem)] compact:pt-0.5 compact:pl-[calc(0.85rem+0.35rem+0.2rem)]",children:(0,b.jsx)(ae.EntryNotesList,{notes:a.notes,variant:"inline",is_pending:n,on_edit_note:(b,c)=>w(a,b,c)})}):null]},c)})})})]})}var au=a.i(34435);let av="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function aw({sheet_name:a,is_pending:c,can_delete:e,on_rename:f,on_delete:g}){let[h,i]=(0,d.useState)(!1),j=(0,d.useRef)(null);(0,d.useEffect)(()=>{if(!h)return;let a=a=>{null===j.current||j.current.contains(a.target)||i(!1)};return document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a)}},[h]);let k=()=>{i(!1)};return(0,b.jsxs)("div",{className:"relative shrink-0 self-center",ref:j,children:[(0,b.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":`Actions for sheet ${a}`,"aria-expanded":h,"aria-haspopup":"menu",disabled:c,onClick:()=>i(a=>!a),children:(0,b.jsx)(au.HamburgerIcon,{})}),h?(0,b.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:av,role:"menuitem",disabled:c,onClick:()=>{k(),f()},children:"Rename"})}),(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${av} text-danger`,role:"menuitem",disabled:c||!e,title:e?void 0:"Cannot delete the last sheet",onClick:()=>{k(),g()},children:"Delete sheet"})})]}):null]})}function ax({sheets:a,db_path:c,on_select:e,on_create:h,on_rename:i,on_delete:j,is_pending:k}){let{confirm:l}=(0,ac.use_confirm_dialog)(),m=(0,aq.use_confirm_destructive_actions)(),n=a.length>1,[o,p]=(0,d.useState)(!1),[q,r]=(0,d.useState)(""),[s,t]=(0,d.useState)(null),[u,v]=(0,d.useState)(""),w=()=>{p(!1),r("")},x=()=>{t(null),v("")};(0,ar.use_escape_to_cancel)(x,null!==s),(0,ar.use_escape_to_cancel)(w,o);let y=a=>{if(a.preventDefault(),null===s)return;let b=u.trim();0===b.length||b===s||i(s,b),x()};return(0,b.jsxs)("aside",{className:"flex min-w-0 flex-col gap-3 max-[860px]:min-w-0",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Sheets"}),(0,b.jsx)("ul",{className:"m-0 flex min-h-0 flex-1 list-none flex-col gap-1.5 p-0",children:a.map(a=>(0,b.jsx)("li",{className:"min-w-0",children:s===a.name?(0,b.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-1.5",onSubmit:y,children:[(0,b.jsx)("input",{className:(0,g.get_input_class_name)("compact"),value:u,onChange:a=>v(a.target.value),disabled:k,autoFocus:!0}),(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)("button",{type:"submit",className:`${(0,f.get_button_class_name)("ghost")} flex-1`,disabled:k||0===u.trim().length,children:"Save"}),(0,b.jsx)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost")} flex-1`,disabled:k,onClick:x,children:"Cancel"})]})]}):(0,b.jsxs)("div",{className:"flex min-w-0 items-stretch gap-1",children:[(0,b.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 rounded-md border border-transparent bg-transparent px-2.5 py-2 text-left transition-[background-color,color] duration-150 hover:bg-surface-hover",disabled:k&&!a.isActive,onClick:()=>e(a.name),children:[(0,b.jsx)("span",{className:`min-w-0 flex-1 truncate font-semibold ${a.isActive||a.hasActiveEntry?"text-accent":""}`,children:a.name}),(0,b.jsx)("span",{className:`shrink-0 text-xs whitespace-nowrap ${a.hasActiveEntry?"text-accent":"text-muted"}`,children:a.hasActiveEntry?"● active":`${a.entryCount} entries`})]}),(0,b.jsx)(aw,{sheet_name:a.name,is_pending:k,can_delete:n,on_rename:()=>{var b;t(b=a.name),v(b)},on_delete:async()=>{var b,c,d;let e;(!m||await l((b=a.name,c=a.entryCount,d=a.hasActiveEntry,e=0===c?"":` This will delete ${c} ${1===c?"entry":"entries"}.`,{title:"Delete sheet?",message:`Delete "${b}"?${e}${d?" This will stop the active timer.":""}`,confirmLabel:"Delete sheet",variant:"danger"})))&&j(a.name)}})]})},a.name))}),o?(0,b.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-2",onSubmit:a=>{a.preventDefault();let b=q.trim();0!==b.length&&(h(b),w())},children:[(0,b.jsx)("input",{className:(0,g.get_input_class_name)("compact"),value:q,onChange:a=>r(a.target.value),placeholder:"New sheet name",disabled:k,autoFocus:!0}),(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)("button",{type:"submit",className:`${(0,f.get_button_class_name)("ghost")} flex-1`,disabled:k||0===q.trim().length,children:"Add"}),(0,b.jsx)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost")} flex-1`,disabled:k,onClick:w,children:"Cancel"})]})]}):(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost"),disabled:k,onClick:()=>p(!0),children:"Add sheet"}),(0,b.jsx)("p",{className:"mt-auto shrink-0 overflow-wrap-anywhere border-t border-panel-border pt-3 font-mono text-[0.65rem] leading-snug text-muted",title:c,children:c})]})}var ay=a.i(78509),az=a.i(18734);let aA=(0,d.forwardRef)(function({active_entry:a,sheets:c,known_tags:e,is_pending:f,on_check_out:g,on_delete:h,on_edit:i,on_move:j,on_add_note:k,on_edit_note:l,on_delete_note:m},n){let{confirm:o}=(0,ac.use_confirm_dialog)(),p=(0,aq.use_confirm_destructive_actions)(),q=(0,d.useRef)(null);return((0,d.useImperativeHandle)(n,()=>({start_edit:()=>{q.current?.start_edit()},start_add_note:()=>{q.current?.start_add_note()}})),null===a)?null:(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted whitespace-nowrap truncate",children:["Sheet ",a.sheetName]}),(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),(0,az.is_pomodoro_task_entry)(a)?(0,b.jsx)("span",{className:"shrink-0 rounded-full border border-panel-border bg-surface-raised px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-foreground",children:"Pomodoro"}):null,(0,b.jsx)("div",{className:"ml-auto",children:(0,b.jsx)(ad.EntryActionsMenu,{current_sheet_name:a.sheetName,sheets:c,is_pending:f,on_edit:()=>q.current?.start_edit(),on_show_add_note_form:()=>q.current?.start_add_note(),on_move:j,on_delete:async()=>{(!p||await o((0,ao.get_delete_entry_confirm_dialog)(a)))&&h()}})})]}),(0,b.jsx)(ay.ActiveEntryPanel,{ref:q,entry:a,sheets:c,known_tags:e,in_bar:!0,is_pending:f,on_check_out:g,on_delete:h,on_edit:i,on_move:j,on_add_note:k,on_edit_note:l,on_delete_note:m},`${a.sheetName}-${a.id}`)]})});var aB=a.i(6128),aC=a.i(34747);let aD="super-time-tracker";function aE({active_entry:a}){let b="true"===(0,d.useSyncExternalStore)(aB.timer_in_title_preference.subscribe,aB.timer_in_title_preference.get_snapshot,aB.timer_in_title_preference.get_server_snapshot),c=(0,D.use_duration_format)(),e=(0,aC.use_timer_show_seconds)(),[f,g]=(0,d.useState)(a?.durationMs??0);return(0,d.useEffect)(()=>{if(null===a)return void g(0);g(a.durationMs);let b=window.setInterval(()=>{g(Date.now()-new Date(a.start).getTime())},1e3);return()=>window.clearInterval(b)},[a]),(0,d.useEffect)(()=>{if(!b||null===a){document.title=aD;return}let d=a.description.trim()||"Tracking",g=(0,q.format_duration)(f,c,e);return document.title=`${g} — ${d}`,()=>{document.title=aD}},[a,c,f,e,b]),null}var aF=a.i(98790),aG=a.i(50803),aH=a.i(68225),aI=a.i(84365),aJ=a.i(73297),aK=a.i(57377),aL=a.i(115);function aM(a){}var aN=a.i(35822);a.s(["TrackerApp",0,function({initial_state:a}){let[e,g]=(0,d.useState)(a),[h,i]=(0,d.useState)(null),[j,k]=(0,d.useState)(!1),[l,m]=(0,d.useState)(!1),n=(0,d.useRef)(a);(0,d.useEffect)(()=>{aM(a)},[a]);let p=async a=>{k(!0),i(null);try{let b=await a(),c=null!==e.activeEntry&&null===b.activeEntry;aM(b),g(b),c&&(0,aH.finish_running_pomodoro_timer)()}catch(a){i(a instanceof Error?a.message:String(a))}finally{k(!1)}},q=e.activeSheetName??e.sheets.find(a=>a.isActive)?.name??"main",r=$(),s=ak(),t="true"===(0,d.useSyncExternalStore)(aN.clear_tag_filters_on_sheet_change_preference.subscribe,aN.clear_tag_filters_on_sheet_change_preference.get_snapshot,aN.clear_tag_filters_on_sheet_change_preference.get_server_snapshot),u=(0,d.useRef)(null),v=(0,d.useRef)(null),w=(0,d.useRef)(null);(0,d.useEffect)(()=>{if(!t||null===u.current||u.current===q){u.current=q;return}X(q,[]),u.current=q},[q,t]);let x=(0,d.useSyncExternalStore)(U.subscribe_sheet_tag_filters,()=>S(q),T),y=(0,d.useMemo)(()=>(function(a){let b=new Map;for(let c of a){let a=new Set;for(let d of c.tags)try{let c=(0,P.normalize_stored_tag)(d);if(a.has(c))continue;a.add(c),b.set(c,(b.get(c)??0)+1)}catch{continue}}return[...b.entries()].map(([a,b])=>({name:a,entryCount:b})).sort((a,b)=>a.name.localeCompare(b.name))})(e.activeSheetEntries),[e.activeSheetEntries]),z=(0,d.useMemo)(()=>{if(l)return[];let a=[...function(a,b,c="all"){return 0===b.length?a:a.filter(a=>(function(a,b,c="all"){return 0===b.length||("any"===c?b.some(b=>a.tags.some(a=>Y(a,b))):b.every(b=>a.tags.some(a=>Y(a,b))))})(a,b,c))}(e.activeSheetEntries,x,r)];switch(s){case"oldest":return a.sort((a,b)=>new Date(a.start).getTime()-new Date(b.start).getTime());case"duration":return a.sort((a,b)=>b.durationMs-a.durationMs);case"description":return a.sort((a,b)=>{let c=a.description.trim()||"Untitled entry",d=b.description.trim()||"Untitled entry";return c.localeCompare(d)});default:return a.sort((a,b)=>new Date(b.start).getTime()-new Date(a.start).getTime())}},[e.activeSheetEntries,x,r,s,l]),A=(0,d.useMemo)(()=>(0,aI.get_serialized_entries_total_ms)(z),[z]),B=l?`Loading entries for "${q}"…`:x.length>0?"any"===r?`No entries on sheet "${q}" match any selected tag.`:`No entries on sheet "${q}" match all selected tags.`:`No entries on sheet "${q}".`,C=a=>{let b;if(a===q&&!l)return;n.current=e;let c=(b=e.runningEntries.find(b=>b.sheetName===a)??null,{...e,activeSheetName:a,sheets:e.sheets.map(b=>({...b,isActive:b.name===a})),activeEntry:b,activeSheetEntries:e.activeSheetEntries,activeSheetTotalMs:e.activeSheetTotalMs});aM(c),g(c),m(!0),i(null),(0,aL.post_tracker_action)("/api/sheet",{name:a}).then(a=>{aM(a),g(a)}).catch(a=>{i(a instanceof Error?a.message:String(a)),g(n.current)}).finally(()=>{m(!1)})},D=(a,b,c)=>(0,aK.patch_tracker_action)("/api/entry",{sheetName:a,entryId:b,...c});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aE,{active_entry:e.activeEntry}),(0,b.jsx)(N,{sheets:e.sheets,active_sheet_name:q,active_entry:e.activeEntry,is_pending:j,check_in_form_ref:v,active_entry_panel_ref:w,on_select_sheet:C,on_check_out:a=>p(()=>(0,aL.post_tracker_action)("/api/out",{sheetName:q,...void 0!==a?{at:a}:{}}))}),(0,b.jsx)("div",{className:"relative z-1",children:(0,b.jsx)(aF.TrackerTopbar,{})}),(0,b.jsxs)("div",{className:"mx-auto max-w-[1120px] px-4 pb-10 pt-4 sm:px-5 sm:pt-5",children:[null!==h?(0,b.jsx)("p",{className:"mb-4 border border-danger-border bg-danger-soft px-3 py-2.5 text-danger-text",children:h}):null,(0,b.jsx)(E,{has_running_timer:null!==e.runningEntry,on_check_in_shortcut:()=>{v.current?.expand_and_focus()}}),(0,b.jsxs)("div",{className:"grid grid-cols-[minmax(14rem,18rem)_minmax(0,1fr)] items-stretch border border-panel-border bg-panel shadow-sm max-[960px]:grid-cols-1",children:[(0,b.jsx)("div",{className:"flex min-h-0 min-w-0 flex-col border-r border-panel-border p-4 max-[860px]:border-r-0 max-[860px]:border-b",children:(0,b.jsx)(ax,{sheets:e.sheets,db_path:e.dbPath,is_pending:j,on_select:C,on_create:a=>p(()=>(0,aL.post_tracker_action)("/api/sheet",{name:a})),on_rename:(a,b)=>p(()=>(0,aK.patch_tracker_action)("/api/sheet",{name:a,newName:b})),on_delete:a=>p(()=>(0,aL.post_tracker_action)("/api/sheet",{name:a,delete:!0}))})}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,b.jsxs)("section",{className:"flex min-w-0 flex-col gap-4 border-b border-panel-border border-l-4 border-l-accent p-4",children:[null===e.activeEntry?(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-panel-border bg-background px-3 py-2",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Quick action"}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[0.9rem] font-medium",children:"Jump into Pomodoro without leaving the tracker."})]}),(0,b.jsxs)(c.default,{href:"/pomodoro",className:`${(0,f.get_button_class_name)("primary")} inline-flex min-w-40 flex-col items-center justify-center whitespace-nowrap text-center`,"aria-label":"Open Pomodoro timer",children:[(0,b.jsx)("span",{className:"text-white text-[0.9rem] leading-none",children:"Start Pomodoro"}),(0,b.jsx)("span",{className:"text-white mt-1 text-[0.72rem] font-medium leading-none opacity-85",children:"Focus timer"})]})]}):null,(0,b.jsx)(aA,{ref:w,active_entry:e.activeEntry,sheets:e.sheets,known_tags:e.knownTags,is_pending:j,on_check_out:a=>p(()=>(0,aL.post_tracker_action)("/api/out",{sheetName:q,...void 0!==a?{at:a}:{}})),on_delete:()=>p(()=>(0,aL.post_tracker_action)("/api/entry",{sheetName:q,entryId:e.activeEntry?.id})),on_edit:a=>p(()=>D(q,e.activeEntry?.id??0,a)),on_move:a=>p(()=>(0,aL.post_tracker_action)("/api/entry/move",{sheetName:q,entryId:e.activeEntry?.id,targetSheetName:a})),on_add_note:(a,b)=>p(()=>(0,aL.post_tracker_action)("/api/note",{text:a,...void 0!==b?{at:b}:{},sheetName:q,entryId:e.activeEntry?.id})),on_edit_note:(a,b)=>p(()=>(0,aK.patch_tracker_action)("/api/note",{sheetName:q,entryId:e.activeEntry?.id,timestamp:a,text:b})),on_delete_note:a=>p(()=>(0,aJ.delete_tracker_action)("/api/note",{sheetName:q,entryId:e.activeEntry?.id,timestamp:a}))}),null===e.activeEntry?(0,b.jsx)(o,{ref:v,known_tags:e.knownTags,is_pending:j,trailing:(0,b.jsx)("p",{className:"m-0 text-[0.85rem] leading-tight text-muted",children:"Not tracking"}),on_submit:a=>p(()=>(0,aL.post_tracker_action)("/api/in",{...a,sheetName:q}))}):null]}),(0,b.jsx)("section",{className:"flex min-w-0 flex-col gap-4 p-4",children:(0,b.jsx)(at,{title:"Entries",entries:z,sheets:e.sheets,known_tags:e.knownTags,total_ms:A,empty_message:B,is_pending:j,show_sheet_name:!1,header_extra:(0,b.jsx)(_,{sheet_name:q,sheet_tags:y}),on_delete:a=>p(()=>(0,aL.post_tracker_action)("/api/entry",{sheetName:a.sheetName,entryId:a.id})),on_edit:(a,b)=>p(()=>D(a.sheetName,a.id,b)),on_move:(a,b)=>p(()=>(0,aL.post_tracker_action)("/api/entry/move",{sheetName:a.sheetName,entryId:a.id,targetSheetName:b})),on_move_many:(a,b)=>p(()=>(0,aL.post_tracker_action)("/api/entry/move-bulk",{entries:a.map(a=>({sheetName:a.sheetName,entryId:a.id})),targetSheetName:b})),on_delete_many:a=>p(()=>(0,aL.post_tracker_action)("/api/entry/delete-bulk",{entries:a.map(a=>({sheetName:a.sheetName,entryId:a.id}))})),on_edit_note:(a,b,c)=>p(()=>(0,aK.patch_tracker_action)("/api/note",{sheetName:a.sheetName,entryId:a.id,timestamp:b,text:c})),on_add_note:(a,b)=>p(()=>(0,aL.post_tracker_action)("/api/note",{sheetName:a.sheetName,entryId:a.id,text:b})),on_resume:a=>p(()=>(0,aL.post_tracker_action)("/api/in",{description:(0,aG.build_resume_description)(a.description,a.tags),sheetName:a.sheetName}))})})]})]})]})]})}],12584)}];
|
|
1
|
+
module.exports=[12584,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(34542),e=a.i(30354),f=a.i(89969),g=a.i(69749),h=a.i(98831),i=a.i(40420),j=a.i(6962),k=a.i(45273),l=a.i(30004);async function m(a){if("none"===a.provider)throw Error("AI suggestion provider is disabled");let b="true"===l.debug_logging_preference.read(),c=Date.now(),d={provider:a.provider,context:a.context,notes:a.notes,debug_logging:b};b&&console.info("[ai-suggestion] client request start",{provider:a.provider,context_length:a.context.length,notes_length:a.notes.length});try{let e=await fetch("/api/entry/suggest-description",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...d,api_key:a.api_key})});if(!e.ok){let d=await e.json().catch(()=>({}));throw b&&console.warn("[ai-suggestion] client request failed",{provider:a.provider,status:e.status,elapsed_ms:Date.now()-c,error:d.error??"Failed to suggest description"}),Error(d.error??"Failed to suggest description")}let f=await e.json(),g=f.description?.trim()??"";if(0===g.length)throw Error("Suggestion was empty");return b&&console.info("[ai-suggestion] client request success",{provider:a.provider,elapsed_ms:Date.now()-c,description_length:g.length}),g}catch(d){throw b&&console.error("[ai-suggestion] client request error",{provider:a.provider,elapsed_ms:Date.now()-c,error:d instanceof Error?d.message:String(d)}),d}}function n(a){}function o({known_tags:a,on_submit:c,is_pending:l}){let[p,q]=(0,d.useState)([]),[r,s]=(0,d.useState)(""),[t,u]=(0,d.useState)(""),[v,w]=(0,d.useState)(""),[x,y]=(0,d.useState)(null),[z,A]=(0,d.useState)(!1),B=(0,d.useSyncExternalStore)(i.entry_suggestion_provider_preference.subscribe,i.entry_suggestion_provider_preference.get_snapshot,i.entry_suggestion_provider_preference.get_server_snapshot),C=(0,d.useSyncExternalStore)(k.openai_api_key_preference.subscribe,k.openai_api_key_preference.get_snapshot,k.openai_api_key_preference.get_server_snapshot),D=(0,d.useSyncExternalStore)(h.claude_api_key_preference.subscribe,h.claude_api_key_preference.get_snapshot,h.claude_api_key_preference.get_server_snapshot),E=(0,d.useSyncExternalStore)(j.google_ai_api_key_preference.subscribe,j.google_ai_api_key_preference.get_snapshot,j.google_ai_api_key_preference.get_server_snapshot),F="openai"===B?C:"claude"===B?D:"google_ai"===B?E:"",G="none"!==B&&F.trim().length>0;(0,d.useEffect)(()=>{q([])},[]);let H=(0,d.useMemo)(()=>p.find(a=>a.id===r)??null,[p,r]),I=async()=>{if(G){A(!0),y(null);try{let a=await m({provider:B,api_key:F,context:t,notes:""});u(a)}catch(a){y(a instanceof Error?a.message:String(a))}finally{A(!1)}}};return(0,b.jsxs)("form",{className:"flex flex-col gap-2 border border-panel-border bg-panel p-[1.1rem] shadow-sm",onSubmit:a=>{a.preventDefault();let b=t.trim();if(0===b.length)return;let d=v.trim();c({description:b,...d.length>0?{at:d}:{}}),u(""),w("")},children:[(0,b.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-description",children:"What are you working on?"}),(0,b.jsxs)("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto_auto]",children:[(0,b.jsxs)("select",{className:(0,g.get_input_class_name)(),value:r,disabled:l||0===p.length,onChange:a=>{let b=a.target.value;s(b);let c=p.find(a=>a.id===b)??null;null!==c&&u(c.description)},children:[(0,b.jsx)("option",{value:"",children:0===p.length?"No templates":"Use a template…"}),p.map(a=>(0,b.jsx)("option",{value:a.id,children:a.name},a.id))]}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost"),disabled:l||0===t.trim().length,onClick:()=>{let a=t.trim();if(0===a.length)return;let b=a.slice(0,40),c=window.prompt("Template name",b.length>0?b:"New template");if(null===c)return;let d=c.trim();if(0===d.length)return;let e="u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`,f=[...p,{id:e,name:d,description:a}];q(f),s(e),n(f)},children:"Save template"}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost"),disabled:l||null===H,onClick:()=>{if(null===H)return;let a=p.filter(a=>a.id!==H.id);q(a),s(""),n(a)},children:"Delete template"})]}),(0,b.jsxs)("div",{className:`grid gap-2 max-[860px]:grid-cols-1 ${G?"grid-cols-[minmax(0,1fr)_auto_auto]":"grid-cols-[minmax(0,1fr)_auto]"}`,children:[(0,b.jsx)(e.TagAutocompleteInput,{id:"check-in-description",value:t,known_tags:a,placeholder:"e.g. crafting something @design",disabled:l,autoFocus:!0,on_change:u}),G?(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost"),disabled:l||z,onClick:()=>void I(),title:"Suggest description with AI",children:z?"Suggesting…":"Suggest"}):null,(0,b.jsx)("button",{type:"submit",className:(0,f.get_button_class_name)("primary"),disabled:l||0===t.trim().length,children:"Check in"})]}),null!==x?(0,b.jsx)("p",{className:"m-0 text-[0.8rem] text-danger",children:x}):null,(0,b.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-at",children:["Start time"," ",(0,b.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,b.jsx)("input",{id:"check-in-at",className:(0,g.get_input_class_name)(),value:v,onChange:a=>w(a.target.value),placeholder:"e.g. 30 minutes ago",disabled:l})]})}var p=a.i(14244);let q=(0,d.forwardRef)(function({known_tags:a,is_pending:c,on_submit:e,trailing:g},h){let i="true"===(0,d.useSyncExternalStore)(p.check_in_form_collapsed_preference.subscribe,p.check_in_form_collapsed_preference.get_snapshot,p.check_in_form_collapsed_preference.get_server_snapshot),[j,k]=(0,d.useState)(!i);return((0,d.useImperativeHandle)(h,()=>({expand_and_focus:()=>{k(!0),window.requestAnimationFrame(()=>{let a=document.getElementById("check-in-description");a instanceof HTMLElement&&a.focus()})}}),[]),i&&!j)?(0,b.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-3",children:[(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("primary"),disabled:c,onClick:()=>k(!0),children:"Check in"}),g]}):(0,b.jsx)(o,{known_tags:a,is_pending:c,on_submit:a=>{e(a),i&&k(!1)}})});var r=a.i(75654),s=a.i(85752),t=a.i(50762),u=a.i(39744),v=a.i(13870),w=a.i(16777),x=a.i(18558),y=a.i(80805),z=a.i(9818),A=a.i(72327),B=a.i(40395),C=a.i(76121),D=a.i(62082),E=a.i(64617),F=a.i(65162);function G({on_check_in_shortcut:a,has_running_timer:c=!1}){let e=(0,F.use_duration_format)(),f=(0,d.useSyncExternalStore)(A.focus_nudges_enabled_preference.subscribe,A.focus_nudges_enabled_preference.get_snapshot,A.focus_nudges_enabled_preference.get_server_snapshot),g=(0,d.useSyncExternalStore)(u.daily_focus_target_minutes_preference.subscribe,u.daily_focus_target_minutes_preference.get_snapshot,u.daily_focus_target_minutes_preference.get_server_snapshot),h=(0,d.useSyncExternalStore)(D.weekly_focus_target_minutes_preference.subscribe,D.weekly_focus_target_minutes_preference.get_snapshot,D.weekly_focus_target_minutes_preference.get_server_snapshot),i=(0,d.useSyncExternalStore)(B.no_log_reminder_minutes_preference.subscribe,B.no_log_reminder_minutes_preference.get_snapshot,B.no_log_reminder_minutes_preference.get_server_snapshot),j=(0,d.useSyncExternalStore)(C.overwork_alert_hours_preference.subscribe,C.overwork_alert_hours_preference.get_snapshot,C.overwork_alert_hours_preference.get_server_snapshot),k=(0,d.useSyncExternalStore)(v.focus_goal_scope_preference.subscribe,v.focus_goal_scope_preference.get_snapshot,v.focus_goal_scope_preference.get_server_snapshot),l=(0,d.useSyncExternalStore)(w.focus_goal_sheet_name_preference.subscribe,w.focus_goal_sheet_name_preference.get_snapshot,w.focus_goal_sheet_name_preference.get_server_snapshot),m=(0,d.useSyncExternalStore)(x.focus_goal_tag_name_preference.subscribe,x.focus_goal_tag_name_preference.get_snapshot,x.focus_goal_tag_name_preference.get_server_snapshot),n=(0,d.useSyncExternalStore)(y.focus_goals_per_sheet_preference.subscribe,y.focus_goals_per_sheet_preference.get_snapshot,y.focus_goals_per_sheet_preference.get_server_snapshot),o=(0,d.useSyncExternalStore)(z.focus_goals_per_tag_preference.subscribe,z.focus_goals_per_tag_preference.get_snapshot,z.focus_goals_per_tag_preference.get_server_snapshot),[p,q]=(0,d.useState)(null),[r,J]=(0,d.useState)(null);(0,d.useEffect)(()=>{let a=()=>{try{let a=window.localStorage.getItem(E.POMODORO_STORAGE_KEY);if(null===a)return null;let b=JSON.parse(a).state;if(void 0===b||"running"!==b.status||null===b.deadline_at_ms)return null;let c=Math.max(0,b.deadline_at_ms-Date.now()),d=Math.floor(c/6e4),e=Math.floor(c%6e4/1e3);return{phase_label:"work"===b.phase?"Focus":"short_break"===b.phase?"Short break":"Long break",remaining_label:`${d.toString().padStart(2,"0")}:${e.toString().padStart(2,"0")}`}}catch{return null}},b=window.setTimeout(()=>{J(a())},0),c=window.setInterval(()=>{J(a())},1e3);return()=>{window.clearTimeout(b),window.clearInterval(c)}},[]),(0,d.useEffect)(()=>{if("true"!==f)return;let a=!1,b=async()=>{try{var b,c,d;let e=new URLSearchParams;e.set("scope",(b=k,c=l,d=m,"sheet"===b&&0===c.length||"tag"===b&&0===d.length?"global":b)),"sheet"===k&&l.length>0&&e.set("sheet",l),"tag"===k&&m.length>0&&e.set("tag",m);let f=await fetch(`/api/focus-nudges/status?${e.toString()}`);if(!f.ok)return;let g=await f.json();a||q(g)}catch{}};b();let c=window.setInterval(()=>{b()},6e4);return()=>{a=!0,window.clearInterval(c)}},[f,k,l,m]);let K=(0,d.useMemo)(()=>{if("true"!==f||null===p)return null;let{daily_minutes:a,weekly_minutes:b}=function(a){if("sheet"===a.scope&&a.sheet_name.length>0){let b=(0,t.parse_focus_goals_by_name)(a.per_sheet_json)[a.sheet_name];return void 0===b?{daily_minutes:null,weekly_minutes:null}:{daily_minutes:b.daily??a.global_daily,weekly_minutes:b.weekly??a.global_weekly}}if("tag"===a.scope&&a.tag_name.length>0){let b=(0,t.parse_focus_goals_by_name)(a.per_tag_json)[a.tag_name];return void 0===b?{daily_minutes:null,weekly_minutes:null}:{daily_minutes:b.daily??a.global_daily,weekly_minutes:b.weekly??a.global_weekly}}return{daily_minutes:a.global_daily,weekly_minutes:a.global_weekly}}({scope:k,sheet_name:l,tag_name:m,per_sheet_json:n,per_tag_json:o,global_daily:g,global_weekly:h});if(null===a||null===b)return{kind:"alert",tone:"info",title:H("daily",k,l,m),detail:"No goals configured yet for this scope. Set daily and weekly targets in Goal settings."};let d=6e4*Number.parseInt(a,10),q=6e4*Number.parseInt(b,10),r=36e5*Number.parseInt(j,10),u=Number.parseInt(i,10);return null!==p.activeTimerDurationMs&&p.activeTimerDurationMs>=r?{kind:"alert",tone:"warning",title:"Overwork alert",detail:`Current session is ${(0,s.format_duration)(p.activeTimerDurationMs,e)}. Consider a short break.`}:!c&&null!==p.minutesSinceLastLog&&p.minutesSinceLastLog>=u?{kind:"alert",tone:"warning",title:"Gentle reminder",detail:`No time logged for ${p.minutesSinceLastLog} min. Start a timer when you are back on task.`,show_check_in_shortcut:!0}:p.todayTrackedMs<d?{kind:"progress",scope:"daily",title:H("daily",k,l,m),tracked_ms:p.todayTrackedMs,target_ms:d}:p.weekTrackedMs<q?{kind:"progress",scope:"weekly",title:H("weekly",k,l,m),tracked_ms:p.weekTrackedMs,target_ms:q}:{kind:"alert",tone:"success",title:"Targets met",detail:"Daily and weekly focus goals are on track."}},[g,e,f,j,c,k,l,m,n,o,i,p,h]);if(null===K)return null;if("progress"===K.kind)return(0,b.jsx)(I,{scope:K.scope,title:K.title,tracked_ms:K.tracked_ms,target_ms:K.target_ms,duration_format:e,active_pomodoro:r});let L="warning"===K.tone?"mb-4 rounded-md border border-danger-border bg-danger-soft px-3 py-2.5 text-danger-text":"success"===K.tone?"mb-4 rounded-md border border-accent-border bg-accent-soft px-3 py-2.5 text-accent":"mb-4 rounded-md border border-panel-border bg-panel px-3 py-2.5 text-foreground";return(0,b.jsxs)("section",{className:L,"aria-live":"polite","aria-atomic":"true",children:[(0,b.jsx)("p",{className:"m-0 text-[0.85rem] font-semibold",children:K.title}),(0,b.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,b.jsx)("p",{className:"m-0 text-[0.82rem] leading-relaxed",children:K.detail}),K.show_check_in_shortcut&&void 0!==a?(0,b.jsx)("button",{type:"button",className:"cursor-pointer rounded border border-current bg-transparent px-2 py-1 text-[0.75rem] font-semibold",onClick:a,children:"Check in"}):null]})]})}function H(a,b,c,d){let e="daily"===a?"Relevant goal":"Weekly goal";return"sheet"===b&&c.length>0?`${e} \xb7 ${c}`:"tag"===b&&d.length>0?`${e} \xb7 @${d}`:e}function I({scope:a,title:d,tracked_ms:e,target_ms:f,duration_format:g,active_pomodoro:h}){let i=f>0?Math.min(100,e/f*100):0,j=Math.max(0,f-e);return(0,b.jsx)("section",{className:"mb-4 rounded-md border border-panel-border bg-panel px-4 py-3 shadow-sm","aria-label":d,"aria-live":"polite",children:(0,b.jsxs)("div",{className:"flex flex-wrap items-stretch justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:d}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:["daily"===a?(0,b.jsx)(c.default,{href:"/settings/goals#focus-goals-nudges",className:"inline-flex h-6 w-6 items-center justify-center rounded border border-panel-border text-muted no-underline hover:bg-surface-hover hover:text-foreground","aria-label":"Open daily focus target settings",title:"Daily focus target settings",children:(0,b.jsx)(r.SettingsIcon,{})}):null,(0,b.jsxs)("p",{className:"m-0 font-mono text-[0.78rem] font-semibold text-accent",children:[Math.round(i),"%"]})]})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-baseline justify-between gap-3",children:[(0,b.jsxs)("p",{className:"m-0 font-mono text-[1.35rem] font-semibold leading-none text-foreground",children:[(0,s.format_duration)(e,g),(0,b.jsxs)("span",{className:"ml-1 text-[0.85rem] font-medium text-muted",children:["/ ",(0,s.format_duration)(f,g)]})]}),(0,b.jsxs)("p",{className:"m-0 text-[0.78rem] text-muted",children:[(0,s.format_duration)(j,g)," left ","daily"===a?"today":"this week"]})]}),(0,b.jsx)("div",{className:"mt-3 h-1.5 w-full overflow-hidden rounded-full bg-accent-soft",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(i),children:(0,b.jsx)("div",{className:"h-full rounded-full bg-accent transition-[width] duration-300",style:{width:`${i}%`}})})]}),null!==h?(0,b.jsxs)("aside",{className:"min-w-52 rounded-md border border-panel-border bg-surface-raised px-3 py-2.5",children:[(0,b.jsx)("p",{className:"m-0 text-[0.68rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Active Pomodoro"}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[0.82rem] font-semibold text-foreground",children:h.phase_label}),(0,b.jsx)("p",{className:"m-0 mt-1 font-mono text-[1.25rem] font-semibold leading-none text-accent",children:h.remaining_label})]}):null]})})}var J=a.i(82508),K=a.i(7386);function L(a,b,c){if(0===a.length)return null;let d=a.findIndex(a=>a.name===b),e=((-1===d?0:d)+("next"===c?1:-1)+a.length)%a.length;return a[e]?.name??null}var M=a.i(89711),N=a.i(26336),O=a.i(89184);function P({sheets:a,active_sheet_name:c,active_entry:e,is_pending:f,check_in_form_ref:g,active_entry_panel_ref:h,on_select_sheet:i,on_check_out:j}){let k=(0,J.useRouter)(),[l,m]=(0,d.useState)(!1),n=(0,N.use_check_out_action)(j),o=(0,d.useMemo)(()=>{let b=null!==e;return[{id:"help",label:"?",description:"Show keyboard shortcuts",key:"?",modifiers:["shift"],action:()=>{m(a=>!a)}},{id:"check-in",label:"C",description:"Check in (focus description)",key:"c",is_available:()=>!f&&!b,action:()=>{g.current?.expand_and_focus()}},{id:"check-out",label:"O",description:"Check out",key:"o",is_available:()=>!f&&b,action:()=>{n()}},{id:"edit-entry",label:"E",description:"Edit active entry",key:"e",is_available:()=>!f&&b,action:()=>{h.current?.start_edit()}},{id:"add-note",label:"N",description:"Add note to active entry",key:"n",is_available:()=>!f&&b,action:()=>{h.current?.start_add_note()}},{id:"pomodoro",label:"P",description:"Open Pomodoro",key:"p",is_available:()=>!f,action:()=>{k.push("/pomodoro")}},{id:"previous-sheet",label:"[",description:"Previous sheet",key:"[",is_available:()=>!f&&a.length>1,action:()=>{let b=L(a,c,"previous");null!==b&&b!==c&&i(b)}},{id:"next-sheet",label:"]",description:"Next sheet",key:"]",is_available:()=>!f&&a.length>1,action:()=>{let b=L(a,c,"next");null!==b&&b!==c&&i(b)}}]},[e,h,c,g,n,f,i,k,a]);return((0,O.use_document_keyboard_shortcuts)(o),l)?(0,b.jsx)(K.KeyboardShortcutsDialog,{sections:[...(0,M.get_app_keyboard_shortcut_sections)(),{title:"Tracker",entries:[{label:"C",description:"Check in (focus description)"},{label:"O",description:"Check out"},{label:"E",description:"Edit active entry description"},{label:"N",description:"Add note to active entry"},{label:"P",description:"Open Pomodoro"},{label:"[",description:"Previous sheet"},{label:"]",description:"Next sheet"}]}],on_close:()=>m(!1)}):null}var Q=a.i(48174),R=a.i(56924);function S(a){let b=[],c=new Set;for(let d of({})[a]??[])try{let a=(0,R.normalize_stored_tag)(d);c.has(a)||(c.add(a),b.push(a))}catch{continue}return b}var T=a.i(4845);function U(a){return(0,T.get_stable_sheet_tag_filter_snapshot)(a,S(a))}function V(){return T.EMPTY_SHEET_TAG_FILTER}var W=a.i(5479),X=a.i(72958),Y=a.i(19702);function Z(a,b){let c={};0===b.length?delete c[a]:c[a]=b;try{window.localStorage.setItem(Y.SHEET_TAG_FILTERS_STORAGE_KEY,JSON.stringify(c)),(0,X.schedule_ui_preferences_cloud_sync)()}catch{}(0,W.notify_sheet_tag_filters_subscribers)()}function $(a,b){try{return(0,R.normalize_stored_tag)(a)===(0,R.normalize_stored_tag)(b)}catch{return!1}}var _=a.i(78702);function aa(){return(0,d.useSyncExternalStore)(_.tag_filter_mode_preference.subscribe,_.tag_filter_mode_preference.get_snapshot,_.tag_filter_mode_preference.get_server_snapshot)}function ab({sheet_name:a,sheet_tags:c}){let e=aa(),g=(0,d.useSyncExternalStore)(W.subscribe_sheet_tag_filters,()=>U(a),V);if((0,d.useEffect)(()=>{!function(a,b){let c=S(a);if(0===c.length)return;let d=c.filter(a=>b.some(b=>$(a,b)));d.length!==c.length&&Z(a,d)}(a,c.map(a=>a.name))},[a,c]),0===c.length)return null;let h=g.length>0;return(0,b.jsxs)("div",{role:"group","aria-label":"Filter by tag",className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,b.jsx)("h2",{className:"m-0 shrink-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em]",children:"Filter by tag"}),(0,b.jsx)("p",{className:"m-0 shrink-0 text-[0.8rem] text-muted",children:"any"===e?"Show entries that include any selected tag.":"Show entries that include every selected tag."}),(0,b.jsxs)("div",{className:"ml-auto flex min-w-0 flex-wrap justify-end gap-1",children:[c.map(c=>{let d=g.some(a=>$(a,c.name));return(0,b.jsxs)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost","small")} ${d?"border-accent-border bg-accent-soft text-foreground":""}`,"aria-pressed":d,onClick:()=>{var b;let d,e;return b=c.name,d=(0,R.normalize_stored_tag)(b),void((e=S(a)).some(a=>$(a,d))?Z(a,e.filter(a=>!$(a,d))):Z(a,[...e,d]))},children:[(0,Q.format_display_tag)(c.name),(0,b.jsxs)("span",{className:"ml-1 font-normal text-muted",children:["(",c.entryCount,")"]})]},c.name)}),h?(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),onClick:()=>Z(a,[]),children:"Clear filter"}):null]})]})}let ac="inline-flex shrink-0 cursor-pointer items-center gap-1.5";function ad({checked:a,disabled:c=!1,indeterminate:e=!1,nested:f=!1,on_change:g,label:h,aria_label:i,className:j}){let k=(0,d.useRef)(null);(0,d.useEffect)(()=>{null!==k.current&&(k.current.indeterminate=e)},[e]);let l=void 0===j?ac:`${ac} ${j}`,m=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("input",{ref:k,type:"checkbox",className:"peer absolute m-0 h-px w-px overflow-hidden opacity-0",checked:a,disabled:c,"aria-label":f&&void 0===h?i:void 0,onChange:g}),(0,b.jsx)("span",{className:'relative block h-[0.85rem] w-[0.85rem] shrink-0 rounded-[0.2rem] border border-panel-border bg-input-bg box-border transition-[background-color,border-color] duration-150 peer-checked:border-accent peer-checked:bg-accent peer-indeterminate:border-accent peer-indeterminate:bg-accent peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-input-focus-border peer-focus-visible:outline-offset-1 peer-disabled:cursor-not-allowed peer-disabled:opacity-55 after:absolute after:left-1/2 after:top-[44%] after:hidden after:h-[0.28rem] after:w-[0.45rem] after:-translate-x-1/2 after:-translate-y-[60%] after:rotate-[-45deg] after:border-b-[1.5px] after:border-l-[1.5px] after:border-accent-text-on after:content-[""] peer-checked:after:block peer-indeterminate:after:top-1/2 peer-indeterminate:after:block peer-indeterminate:after:h-[1.5px] peer-indeterminate:after:w-[0.45rem] peer-indeterminate:after:-translate-x-1/2 peer-indeterminate:after:-translate-y-1/2 peer-indeterminate:after:rotate-0 peer-indeterminate:after:border-0 peer-indeterminate:after:bg-accent-text-on',"aria-hidden":"true"})]});return f?(0,b.jsx)("span",{className:l,children:m}):(0,b.jsxs)("label",{className:l,children:[m,void 0!==h?(0,b.jsx)("span",{className:"select-none text-[0.8rem] leading-tight text-muted",children:h}):null]})}var ae=a.i(53030),af=a.i(34435),ag=a.i(96359);let ah="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function ai({current_sheet_name:a,sheets:c,is_pending:e,on_edit:f,on_add_note:g,on_show_add_note_form:h,on_revise_description_ai:i,can_revise_description_ai:j=!1,on_resume:k,entry_is_active:l=!1,on_delete:m,on_move:n}){let o=c.find(b=>b.name===a),p=l||o?.hasActiveEntry===!0&&!l,q=c.filter(b=>b.name!==a),[r,s]=(0,d.useState)(!1),t=(0,d.useRef)(null);(0,d.useEffect)(()=>{if(!r)return;let a=a=>{null===t.current||t.current.contains(a.target)||s(!1)};return document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a)}},[r]);let u=()=>{s(!1)};return(0,ag.use_escape_to_cancel)(u,r),(0,b.jsxs)("div",{className:"relative shrink-0",ref:t,children:[(0,b.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":"Entry actions","aria-expanded":r,"aria-haspopup":"menu",disabled:e,onClick:()=>s(a=>!a),children:(0,b.jsx)(af.HamburgerIcon,{})}),r?(0,b.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:ah,role:"menuitem",disabled:e,onClick:()=>{u(),f()},children:"Edit times"})}),void 0!==h||void 0!==g?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:ah,role:"menuitem",disabled:e,onClick:()=>{if(u(),void 0!==h)return void h();let a=function(){let a=window.prompt("Add note","");if(null===a)return null;let b=a.trim();return 0===b.length?null:b}();null!==a&&void 0!==g&&g(a)},children:"Add note"})}):null,void 0!==i?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:ah,role:"menuitem",disabled:e||!j,title:j?"Revise with AI":"Configure provider and key in Settings → AI suggestions",onClick:()=>{u(),i()},children:"Revise description with AI"})}):null,void 0!==k?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:ah,role:"menuitem",disabled:e||p,title:p?l?"This entry is already active":"Another entry is active on this sheet":void 0,onClick:()=>{u(),k()},children:"Resume"})}):null,(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("p",{className:"m-0 px-2.5 py-0.5 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Move to sheet"})}),0===q.length?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:ah,role:"menuitem",disabled:!0,children:"No other sheets"})}):q.map(a=>(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${ah} pl-4`,role:"menuitem",disabled:e||a.hasActiveEntry,title:a.hasActiveEntry?"That sheet already has an active entry":void 0,onClick:()=>{u(),n(a.name)},children:a.name})},a.name)),(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${ah} text-danger`,role:"menuitem",disabled:e,onClick:()=>{u(),m()},children:"Delete"})})]}):null]})}function aj({rotated:a=!1,className:c=""}){return(0,b.jsx)("svg",{className:`h-3 w-3 shrink-0 transition-transform duration-150 ${a?"rotate-90":""} ${c}`.trim(),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,b.jsx)("path",{d:"m9 18 6-6-6-6"})})}var ak=a.i(76767);function al({initial_text:a,is_pending:c,inline:e=!1,on_save:h,on_cancel:i}){let[j,k]=(0,d.useState)(a);(0,ag.use_escape_to_cancel)(i);let l=Math.min(6,Math.max(2,a.split("\n").length)),m=e?`${(0,g.get_input_class_name)()} min-h-10 w-full resize-y text-xs leading-snug`:`${(0,g.get_input_class_name)()} min-h-10 w-full resize-y text-[0.85rem] leading-snug`;return(0,b.jsxs)("form",{className:"flex w-full flex-col gap-1.5",onSubmit:a=>{a.preventDefault();let b=j.trim();0!==b.length&&h(b)},onClick:a=>a.stopPropagation(),children:[(0,b.jsx)("textarea",{className:m,value:j,rows:l,disabled:c,onChange:a=>k(a.target.value)}),(0,b.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost"),disabled:c,onClick:i,children:"Cancel"}),(0,b.jsx)("button",{type:"submit",className:(0,f.get_button_class_name)("ghost"),disabled:c||0===j.trim().length,children:"Save"})]})]})}function am(){return(0,b.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M12 20h9"}),(0,b.jsx)("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}function an(){return(0,b.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M3 6h18"}),(0,b.jsx)("path",{d:"M8 6V4h8v2"}),(0,b.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),(0,b.jsx)("path",{d:"M10 11v6"}),(0,b.jsx)("path",{d:"M14 11v6"})]})}var ao=a.i(20537);let ap="inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border-0 bg-transparent p-0 text-muted hover:bg-surface-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55";function aq({notes:a,variant:c="panel",in_bar:e=!1,is_pending:f=!1,on_edit_note:g,on_delete_note:h}){let i=(0,ao.use_time_format)(),[j,k]=(0,d.useState)(null),[l,m]=(0,d.useState)("panel"===c&&!e);if(0===a.length)return null;let n=[...a].sort((a,b)=>new Date(a.timestamp).getTime()-new Date(b.timestamp).getTime()),o="inline"===c,p="panel"===c&&e,q=l||null!==j,r=o?`${a.length} ${1===a.length?"note":"notes"}`:`Notes (${a.length})`,s=[o?"m-0 w-full p-0":"border-t border-accent-border pt-3.5",e&&!o?"border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))]":"",p&&q?"flex min-h-0 flex-1 flex-col":p?"flex shrink-0 flex-col":""].filter(Boolean).join(" "),t=q?"mt-1.5":"hidden",u=o?`m-0 flex list-none flex-col gap-1.5 overflow-visible p-0 compact:gap-0.5 ${t}`:p?`m-0 grid min-h-0 flex-1 list-none auto-rows-fr grid-cols-2 gap-2 p-0 max-[860px]:grid-cols-1 ${t}`:`m-0 grid list-none grid-cols-2 gap-2 p-0 max-[860px]:grid-cols-1 ${t}`,v=o?"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-ghost-bg px-2 py-1.5 compact:rounded-none compact:px-1.5 compact:py-1":p?"flex min-h-0 flex-col justify-center gap-0.5 rounded-sm border border-panel-border bg-[color-mix(in_srgb,var(--panel)_55%,var(--background))] px-2.5 py-2":"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-[color-mix(in_srgb,var(--panel)_55%,var(--background))] px-2.5 py-2",w=a=>void 0===g&&void 0===h?null:(0,b.jsxs)("div",{className:"flex shrink-0 gap-0.5",children:[void 0!==g?(0,b.jsx)("button",{type:"button",className:ap,"aria-label":"Edit note",title:"Edit note",disabled:f,onClick:b=>{var c;b.stopPropagation(),c=a.timestamp,m(!0),k(c)},children:(0,b.jsx)(am,{})}):null,void 0!==h?(0,b.jsx)("button",{type:"button",className:`${ap} hover:text-danger`,"aria-label":"Delete note",title:"Delete note",disabled:f,onClick:b=>{var c;b.stopPropagation(),j===(c=a.timestamp)&&k(null),h?.(c)},children:(0,b.jsx)(an,{})}):null]});return(0,b.jsxs)("section",{className:s,"aria-label":"Entry notes",children:[(0,b.jsxs)("button",{type:"button",className:o?"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 font-inherit text-xs font-medium normal-case tracking-normal text-muted hover:text-foreground":"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent px-0 py-0.5 font-inherit text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted hover:text-foreground","aria-expanded":q,onClick:a=>{a.stopPropagation(),null===j&&m(a=>!a)},children:[(0,b.jsx)(aj,{rotated:q}),(0,b.jsx)("span",{children:r})]}),(0,b.jsx)("ul",{className:u,children:n.map((a,c)=>{let d=j===a.timestamp;return(0,b.jsx)("li",{className:v,children:d?(0,b.jsx)(al,{initial_text:a.text,inline:o,is_pending:f,on_cancel:()=>k(null),on_save:b=>{var c;return c=a.timestamp,void(g?.(c,b),k(null))}}):o?(0,b.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,b.jsxs)("p",{className:"m-0 flex min-w-0 flex-1 items-baseline gap-1.5 text-xs leading-snug text-foreground compact:text-[0.72rem]",children:[(0,b.jsx)("time",{className:"shrink-0 font-mono text-[0.68rem] text-muted",dateTime:a.timestamp,children:(0,ak.format_time)(a.timestamp,i)}),(0,b.jsx)("span",{className:"min-w-0 overflow-wrap-anywhere whitespace-pre-wrap",children:a.text})]}),w(a)]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,b.jsx)("time",{className:"font-mono text-[0.72rem] text-muted",dateTime:a.timestamp,children:(0,ak.format_time)(a.timestamp,i)}),w(a)]}),(0,b.jsx)("p",{className:"m-0 overflow-wrap-anywhere text-[0.9rem] leading-snug whitespace-pre-wrap",children:a.text})]})},`${a.timestamp}-${c}`)})})]})}var ar=a.i(93301);function as(a){return(0,ar.format)(new Date(a),"MMM d, h:mm a")}var at=a.i(50803);function au({entry:a,known_tags:c,is_pending:h,initial_description_override:i,in_active_panel:j=!1,times_only:k=!1,start_only:l=!1,on_save:m,on_cancel:n}){let o=(0,d.useMemo)(()=>i??(0,at.build_resume_description)(a.description,a.tags),[a.description,a.id,a.tags,i]),[p,q]=(0,d.useState)(o),[r,s]=(0,d.useState)(""),[t,u]=(0,d.useState)("");(0,d.useEffect)(()=>{q(i??(0,at.build_resume_description)(a.description,a.tags)),s(""),u("")},[a.description,a.id,a.sheetName,a.tags,i]),(0,ag.use_escape_to_cancel)(n);let v=a.isActive?"still running":as(a.end??a.start),w=k?r.trim().length>0||!l&&t.trim().length>0:p.trim()!==o.trim()||r.trim().length>0||!l&&t.trim().length>0;return(0,b.jsxs)("form",{className:`flex flex-col gap-3 rounded-[0.65rem] border border-panel-border bg-input-bg p-3 ${j?"mt-2":""}`,onSubmit:a=>{a.preventDefault();let b=p.trim(),c=r.trim(),d=t.trim(),e={};k||b===o.trim()||(e.description=b),c.length>0&&(e.start=c),!l&&d.length>0&&(e.end=d),(void 0!==e.description||void 0!==e.start||void 0!==e.end)&&m(e)},children:[(0,b.jsx)("p",{className:"m-0 text-[0.85rem] font-semibold",children:k?"Edit times":"Edit entry"}),k?null:(0,b.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-description-${a.id}`,children:[(0,b.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Description"}),(0,b.jsx)(e.TagAutocompleteInput,{id:`entry-description-${a.id}`,value:p,known_tags:c,placeholder:"e.g. crafting something @design",disabled:h,autoFocus:j,on_change:q})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("p",{className:"m-0 text-[0.8rem] font-semibold text-muted",children:"Times (optional)"}),(0,b.jsxs)("div",{className:`grid gap-2.5 max-[860px]:grid-cols-1 ${l?"grid-cols-1":"grid-cols-2"}`,children:[(0,b.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-start-${a.id}`,children:[(0,b.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Start"}),(0,b.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",as(a.start)]}),(0,b.jsx)("input",{id:`entry-start-${a.id}`,className:(0,g.get_input_class_name)("compact"),value:r,onChange:a=>s(a.target.value),placeholder:"e.g. 10am, 30 minutes ago",disabled:h,autoFocus:k&&j})]}),l?null:(0,b.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-end-${a.id}`,children:[(0,b.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"End"}),(0,b.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",v]}),(0,b.jsx)("input",{id:`entry-end-${a.id}`,className:(0,g.get_input_class_name)("compact"),value:t,onChange:a=>u(a.target.value),placeholder:a.isActive?"e.g. now, 5 minutes ago":"e.g. 11:30am",disabled:h})]})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"submit",className:(0,f.get_button_class_name)("primary","small"),disabled:h||!w,children:"Save"}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),disabled:h,onClick:n,children:"Cancel"})]})]})}function av({selected_count:a,total_count:c,all_selected:e,some_selected:h,selected_entries:i,sheets:j,is_pending:k,on_toggle_all:l,on_move:m,on_delete:n,on_clear:o}){let[p,q]=(0,d.useState)(""),r=i.some(a=>a.isActive),s=j.filter(a=>(!r||!a.hasActiveEntry)&&i.some(b=>b.sheetName!==a.name));return(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-md border border-accent-border bg-accent-soft px-3 py-2",children:[(0,b.jsx)(ad,{className:"shrink-0",checked:e,indeterminate:h,disabled:k,aria_label:e?"Deselect all entries":"Select all entries",on_change:l}),(0,b.jsxs)("p",{className:"m-0 shrink-0 text-[0.85rem] font-semibold",children:[a,(0,b.jsx)("span",{className:"text-muted",children:` of ${c} selected`})]}),(0,b.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("select",{className:`${(0,g.get_input_class_name)("compact")} min-w-32`,value:p,disabled:k||0===s.length,"aria-label":"Move to sheet",onChange:a=>q(a.target.value),children:[(0,b.jsx)("option",{value:"",children:"Move to…"}),s.map(a=>(0,b.jsx)("option",{value:a.name,children:a.name},a.name))]}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),disabled:k||0===p.trim().length||0===s.length,onClick:()=>{let a=p.trim();0!==a.length&&(m(a),q(""))},children:"Move"})]}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("danger","small"),disabled:k,onClick:n,children:"Delete"}),(0,b.jsx)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost","small")} shrink-0`,disabled:k,"aria-label":"Clear selection",title:"Clear selection",onClick:o,children:"✕"})]})]})}var aw=a.i(14945),ax=a.i(79918),ay=a.i(57077);function az(){return(0,d.useSyncExternalStore)(ax.entry_list_sort_preference.subscribe,ax.entry_list_sort_preference.get_snapshot,ax.entry_list_sort_preference.get_server_snapshot)}let aA=(0,aw.get_entry_list_sort_options)();function aB({is_pending:a=!1}){let c=az();return(0,b.jsxs)("fieldset",{className:"m-0 flex flex-wrap items-center gap-x-2 gap-y-1.5 border-0 p-0",children:[(0,b.jsx)("legend",{className:"sr-only",children:"Order entries by"}),(0,b.jsx)("span",{className:"shrink-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Order by"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1",role:"group","aria-label":"Order entries by",children:aA.map(d=>{let e=c===d.value;return(0,b.jsx)("button",{type:"button",className:e?(0,f.get_button_class_name)("primary","small"):(0,f.get_button_class_name)("ghost","small"),disabled:a,"aria-pressed":e,onClick:()=>(0,ay.persist_ui_preference)(ax.entry_list_sort_preference,d.value),children:d.label},d.value)})})]})}function aC(a){let b=a.description.trim()||"Untitled entry",c=a.isActive?" This will stop the active timer.":"";return{title:"Delete entry?",message:`Delete "${b}" on sheet "${a.sheetName}"?${c}`,confirmLabel:"Delete",variant:"danger"}}function aD(a){return`${a.sheetName}-${a.id}`}var aE=a.i(32297);function aF(){return"true"===(0,d.useSyncExternalStore)(aE.confirm_destructive_actions_preference.subscribe,aE.confirm_destructive_actions_preference.get_snapshot,aE.confirm_destructive_actions_preference.get_server_snapshot)}function aG({title:a,entries:c,sheets:e,known_tags:f,total_ms:g,empty_message:l,is_pending:n,show_sheet_name:o=!0,header_extra:p,on_delete:q,on_edit:r,on_move:t,on_move_many:u,on_delete_many:v,on_edit_note:w,on_add_note:x,on_resume:y}){let{confirm:z}=(0,ae.use_confirm_dialog)(),A=aF(),B=(0,ao.use_time_format)(),C=(0,F.use_duration_format)(),[D,E]=(0,d.useState)(null),[G,H]=(0,d.useState)(()=>new Set),[I,J]=(0,d.useState)(null),[K,L]=(0,d.useState)(null),[M,N]=(0,d.useState)({}),O=(0,d.useSyncExternalStore)(i.entry_suggestion_provider_preference.subscribe,i.entry_suggestion_provider_preference.get_snapshot,i.entry_suggestion_provider_preference.get_server_snapshot),P=(0,d.useSyncExternalStore)(k.openai_api_key_preference.subscribe,k.openai_api_key_preference.get_snapshot,k.openai_api_key_preference.get_server_snapshot),R=(0,d.useSyncExternalStore)(h.claude_api_key_preference.subscribe,h.claude_api_key_preference.get_snapshot,h.claude_api_key_preference.get_server_snapshot),S=(0,d.useSyncExternalStore)(j.google_ai_api_key_preference.subscribe,j.google_ai_api_key_preference.get_snapshot,j.google_ai_api_key_preference.get_server_snapshot),T="openai"===O?P:"claude"===O?R:"google_ai"===O?S:"",U="none"!==O&&T.trim().length>0,V=c.map(a=>aD(a)),W=c.filter(a=>G.has(aD(a))),X=c.length>0&&W.length===c.length,Y=W.length>0&&W.length<c.length;(0,d.useEffect)(()=>{H(a=>{let b=new Set(V),c=new Set([...a].filter(a=>b.has(a)));return c.size===a.size?a:c})},[V.join("|")]);let Z=()=>{X?H(new Set):H(new Set(V))},$=()=>{H(new Set)},_=async()=>{let a,b,c;0!==W.length&&(!A||await z((a=W.length,b=W.some(a=>a.isActive),c=1===a?"1 entry":`${a} entries`,{title:1===a?"Delete entry?":"Delete entries?",message:`Permanently delete ${c}?${b?" This will stop the active timer.":""}`,confirmLabel:"Delete",variant:"danger"})))&&(v(W),$())},aa=W.length>0,ab=async a=>{if(!U)return;let b=aD(a);J(b),L(null);try{let c=a.notes.map(a=>a.text).join("\n"),d=await m({provider:O,api_key:T,context:a.description,notes:c});N(a=>({...a,[b]:d})),E(b)}catch(a){L(a instanceof Error?a.message:String(a))}finally{J(null)}};return(0,ag.use_escape_to_cancel)($,aa&&null===D),(0,b.jsxs)("section",{className:"min-w-0",children:[(0,b.jsx)("header",{className:"mb-3 flex flex-col gap-2 border-b border-panel-border pb-2.5 compact:mb-2 compact:pb-1.5",children:aa?(0,b.jsx)(av,{selected_count:W.length,total_count:c.length,all_selected:X,some_selected:Y,selected_entries:W,sheets:e,is_pending:n,on_toggle_all:Z,on_move:a=>{u(W,a),$()},on_delete:()=>void _(),on_clear:$}):(0,b.jsxs)(b.Fragment,{children:[p,(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2.5",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[c.length>0?(0,b.jsx)(ad,{className:"shrink-0",checked:X,indeterminate:Y,disabled:n,aria_label:"Select all entries",on_change:Z}):null,(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em]",children:a}),(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:0===c.length?null:1===c.length?"1 entry":`${c.length} entries`})]}),(0,b.jsxs)("p",{className:"m-0 font-mono text-[0.85rem] text-muted max-[640px]:w-full",children:[(0,s.format_duration)(g,C)," total"]})]}),(0,b.jsx)(aB,{is_pending:n}),null!==K?(0,b.jsx)("p",{className:"m-0 text-[0.8rem] text-danger",children:K}):null]})}),0===c.length?(0,b.jsx)("p",{className:"m-0 text-muted",children:l}):(0,b.jsx)(b.Fragment,{children:(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col p-0",children:c.map(a=>{let c=aD(a),d=D===c,g=G.has(c);return d?(0,b.jsx)("li",{className:"block border-b border-panel-border py-2.5 last:border-b-0 compact:py-1.5",children:(0,b.jsx)(au,{entry:a,known_tags:f,is_pending:n,initial_description_override:M[c],on_cancel:()=>{E(null),N(a=>{if(!(c in a))return a;let b={...a};return delete b[c],b})},on_save:b=>{r(a,b),E(null),N(a=>{if(!(c in a))return a;let b={...a};return delete b[c],b})}})},c):(0,b.jsxs)("li",{className:`group relative flex flex-col gap-0 border-b border-panel-border px-2 py-2.5 transition-colors duration-150 last:border-b-0 hover:bg-surface-hover compact:py-1.5 ${g?"bg-accent-soft hover:bg-accent-soft":""}`,children:[(0,b.jsxs)("div",{className:"flex w-full min-w-0 flex-col items-start gap-2.5 min-[700px]:flex-row min-[700px]:items-center compact:gap-1.5",children:[(0,b.jsxs)("label",{className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 has-disabled:cursor-not-allowed","aria-label":`Select entry ${a.description||"Untitled entry"}`,children:[(0,b.jsx)(ad,{nested:!0,className:`shrink-0 pr-1 transition-opacity duration-150 compact:pr-0.5 ${g||aa?"opacity-100":"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`,checked:g,disabled:n,on_change:()=>{H(a=>{let b=new Set(a);return b.has(c)?b.delete(c):b.add(c),b})}}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-semibold leading-snug compact:text-[0.9rem] compact:leading-tight",children:a.description||"Untitled entry"}),(0,b.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-1 text-[0.8rem] text-muted compact:mt-px compact:gap-0.5 compact:text-[0.72rem]",children:[o?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:a.sheetName}),(0,b.jsx)("span",{children:"·"})]}):null,(0,b.jsxs)("span",{children:["#",a.id]}),(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{className:"whitespace-nowrap",children:[(0,ak.format_time)(a.start,B),null===a.end?" → now":` → ${(0,ak.format_time)(a.end,B)}`]}),a.tags.length>0?(0,b.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1 p-0",children:a.tags.map(a=>(0,b.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,Q.format_display_tag)(a)},a))}):null]})]})]}),(0,b.jsxs)("div",{className:"flex w-full shrink-0 flex-row items-center justify-between gap-2 min-[700px]:w-auto min-[700px]:justify-end max-[860px]:flex-wrap compact:gap-1.5",children:[(0,b.jsx)("p",{className:`m-0 whitespace-nowrap text-right font-mono text-[0.9rem] text-muted compact:text-[0.8rem] ${a.isActive?"text-accent":""}`,children:(0,s.format_duration)(a.durationMs,C)}),(0,b.jsx)(ai,{current_sheet_name:a.sheetName,sheets:e,is_pending:n||I===c,on_edit:()=>{E(c),N(a=>{if(!(c in a))return a;let b={...a};return delete b[c],b})},on_revise_description_ai:U?()=>void ab(a):void 0,can_revise_description_ai:U,on_add_note:b=>x(a,b),on_resume:()=>y(a),entry_is_active:a.isActive,on_move:b=>t(a,b),on_delete:async()=>{(!A||await z(aC(a)))&&q(a)}})]})]}),a.notes.length>0?(0,b.jsx)("div",{className:"w-full pt-1 pl-[calc(0.85rem+0.5rem+0.35rem)] compact:pt-0.5 compact:pl-[calc(0.85rem+0.35rem+0.2rem)]",children:(0,b.jsx)(aq,{notes:a.notes,variant:"inline",is_pending:n,on_edit_note:(b,c)=>w(a,b,c)})}):null]},c)})})})]})}let aH="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function aI({sheet_name:a,is_pending:c,can_delete:e,on_rename:f,on_delete:g}){let[h,i]=(0,d.useState)(!1),j=(0,d.useRef)(null);(0,d.useEffect)(()=>{if(!h)return;let a=a=>{null===j.current||j.current.contains(a.target)||i(!1)};return document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a)}},[h]);let k=()=>{i(!1)};return(0,b.jsxs)("div",{className:"relative shrink-0 self-center",ref:j,children:[(0,b.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":`Actions for sheet ${a}`,"aria-expanded":h,"aria-haspopup":"menu",disabled:c,onClick:()=>i(a=>!a),children:(0,b.jsx)(af.HamburgerIcon,{})}),h?(0,b.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:aH,role:"menuitem",disabled:c,onClick:()=>{k(),f()},children:"Rename"})}),(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${aH} text-danger`,role:"menuitem",disabled:c||!e,title:e?void 0:"Cannot delete the last sheet",onClick:()=>{k(),g()},children:"Delete sheet"})})]}):null]})}function aJ({sheets:a,db_path:c,on_select:e,on_create:h,on_rename:i,on_delete:j,is_pending:k}){let{confirm:l}=(0,ae.use_confirm_dialog)(),m=aF(),n=a.length>1,[o,p]=(0,d.useState)(!1),[q,r]=(0,d.useState)(""),[s,t]=(0,d.useState)(null),[u,v]=(0,d.useState)(""),w=()=>{p(!1),r("")},x=()=>{t(null),v("")};(0,ag.use_escape_to_cancel)(x,null!==s),(0,ag.use_escape_to_cancel)(w,o);let y=a=>{if(a.preventDefault(),null===s)return;let b=u.trim();0===b.length||b===s||i(s,b),x()};return(0,b.jsxs)("aside",{className:"flex min-w-0 flex-col gap-3 max-[860px]:min-w-0",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Sheets"}),(0,b.jsx)("ul",{className:"m-0 flex min-h-0 flex-1 list-none flex-col gap-1.5 p-0",children:a.map(a=>(0,b.jsx)("li",{className:"min-w-0",children:s===a.name?(0,b.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-1.5",onSubmit:y,children:[(0,b.jsx)("input",{className:(0,g.get_input_class_name)("compact"),value:u,onChange:a=>v(a.target.value),disabled:k,autoFocus:!0}),(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)("button",{type:"submit",className:`${(0,f.get_button_class_name)("ghost")} flex-1`,disabled:k||0===u.trim().length,children:"Save"}),(0,b.jsx)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost")} flex-1`,disabled:k,onClick:x,children:"Cancel"})]})]}):(0,b.jsxs)("div",{className:"flex min-w-0 items-stretch gap-1",children:[(0,b.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 rounded-md border border-transparent bg-transparent px-2.5 py-2 text-left transition-[background-color,color] duration-150 hover:bg-surface-hover",disabled:k&&!a.isActive,onClick:()=>e(a.name),children:[(0,b.jsx)("span",{className:`min-w-0 flex-1 truncate font-semibold ${a.isActive||a.hasActiveEntry?"text-accent":""}`,children:a.name}),(0,b.jsx)("span",{className:`shrink-0 text-xs whitespace-nowrap ${a.hasActiveEntry?"text-accent":"text-muted"}`,children:a.hasActiveEntry?"● active":`${a.entryCount} entries`})]}),(0,b.jsx)(aI,{sheet_name:a.name,is_pending:k,can_delete:n,on_rename:()=>{var b;t(b=a.name),v(b)},on_delete:async()=>{var b,c,d;let e;(!m||await l((b=a.name,c=a.entryCount,d=a.hasActiveEntry,e=0===c?"":` This will delete ${c} ${1===c?"entry":"entries"}.`,{title:"Delete sheet?",message:`Delete "${b}"?${e}${d?" This will stop the active timer.":""}`,confirmLabel:"Delete sheet",variant:"danger"})))&&j(a.name)}})]})},a.name))}),o?(0,b.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-2",onSubmit:a=>{a.preventDefault();let b=q.trim();0!==b.length&&(h(b),w())},children:[(0,b.jsx)("input",{className:(0,g.get_input_class_name)("compact"),value:q,onChange:a=>r(a.target.value),placeholder:"New sheet name",disabled:k,autoFocus:!0}),(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)("button",{type:"submit",className:`${(0,f.get_button_class_name)("ghost")} flex-1`,disabled:k||0===q.trim().length,children:"Add"}),(0,b.jsx)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost")} flex-1`,disabled:k,onClick:w,children:"Cancel"})]})]}):(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost"),disabled:k,onClick:()=>p(!0),children:"Add sheet"}),(0,b.jsx)("p",{className:"mt-auto shrink-0 overflow-wrap-anywhere border-t border-panel-border pt-3 font-mono text-[0.65rem] leading-snug text-muted",title:c,children:c})]})}var aK=a.i(99751);function aL(){return"true"===(0,d.useSyncExternalStore)(aK.timer_show_seconds_preference.subscribe,aK.timer_show_seconds_preference.get_snapshot,aK.timer_show_seconds_preference.get_server_snapshot)}function aM({entry:a,in_bar:c,is_pending:e,initial_at:h,on_cancel:i,on_submit:j}){let k=(0,F.use_duration_format)(),l=aL(),[m,n]=(0,d.useState)(()=>Date.now()-new Date(a.start).getTime()),[o,p]=(0,d.useState)(""),[q,r]=(0,d.useState)(h??""),t=(0,d.useRef)(null);(0,ag.use_escape_to_cancel)(i),(0,d.useEffect)(()=>{t.current?.focus()},[]),(0,d.useEffect)(()=>{n(Date.now()-new Date(a.start).getTime());let b=window.setInterval(()=>{n(Date.now()-new Date(a.start).getTime())},1e3);return()=>window.clearInterval(b)},[a.start]);let u=(0,s.format_duration)(m,k,l),v=a.description||"Untitled entry";return(0,b.jsxs)("form",{className:"flex min-w-0 flex-col gap-4","aria-label":"Check out form",onSubmit:a=>{a.preventDefault();let b=o.trim(),c=q.trim(),d=b.length>0,e=c.length>0;d||e?j({...e?{at:c}:{},...d?{note:b}:{}}):j(void 0)},children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.68rem] font-bold uppercase leading-none tracking-wider text-danger",children:"Checking out"}),(0,b.jsx)("h2",{className:"m-0 min-w-0 truncate text-[1.05rem] font-[650] leading-tight tracking-tight min-[560px]:text-[1.15rem]",children:v})]}),(0,b.jsx)("p",{className:"m-0 whitespace-nowrap font-mono text-[1.4rem] font-medium leading-none tracking-tight text-accent min-[560px]:text-[1.6rem]",children:u})]}),a.tags.length>0?(0,b.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1.5 p-0",children:a.tags.map(a=>(0,b.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-[0.72rem] text-tag-text",children:(0,Q.format_display_tag)(a)},a))}):null,(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-3 min-[640px]:grid-cols-[minmax(0,1fr)_minmax(10rem,14rem)]",children:[(0,b.jsxs)("label",{className:"flex min-w-0 flex-col gap-1",htmlFor:"checkout-note",children:[(0,b.jsxs)("span",{className:"text-[0.8rem] font-semibold",children:["Note ",(0,b.jsx)("span",{className:"font-normal text-muted",children:"(optional)"})]}),(0,b.jsx)("input",{ref:t,id:"checkout-note",className:(0,g.get_input_class_name)("compact"),value:o,onChange:a=>p(a.target.value),placeholder:"Wrap-up, blockers, next steps…",disabled:e})]}),(0,b.jsxs)("label",{className:"flex min-w-0 flex-col gap-1",htmlFor:"checkout-at",children:[(0,b.jsxs)("span",{className:"text-[0.8rem] font-semibold",children:["End time ",(0,b.jsx)("span",{className:"font-normal text-muted",children:"(optional)"})]}),(0,b.jsx)("input",{id:"checkout-at",className:(0,g.get_input_class_name)("compact"),value:q,onChange:a=>r(a.target.value),placeholder:"e.g. now, 30 minutes ago, 5:30pm",disabled:e})]})]}),(0,b.jsxs)("div",{className:`flex flex-wrap items-center gap-2 ${c?"":"pt-1"}`,children:[(0,b.jsx)("button",{type:"submit",className:(0,f.get_button_class_name)("danger-solid"),disabled:e,children:"Confirm check out"}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost"),disabled:e,onClick:i,children:"Cancel"})]})]})}function aN(){return(0,b.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",role:"presentation","aria-hidden":"true",focusable:"false",children:(0,b.jsx)("path",{d:"M12 3l1.7 4.3L18 9l-4.3 1.7L12 15l-1.7-4.3L6 9l4.3-1.7L12 3zM19 14l.9 2.1L22 17l-2.1.9L19 20l-.9-2.1L16 17l2.1-.9L19 14zM5 15l.9 2.1L8 18l-2.1.9L5 21l-.9-2.1L2 18l2.1-.9L5 15z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function aO({entry:a,known_tags:c,is_pending:g,on_save:l,on_cancel:n}){let o=(0,d.useMemo)(()=>(0,at.build_resume_description)(a.description,a.tags),[a.description,a.id,a.tags]),[p,q]=(0,d.useState)(o),[r,s]=(0,d.useState)(!1),[t,u]=(0,d.useState)(null),v=(0,d.useSyncExternalStore)(i.entry_suggestion_provider_preference.subscribe,i.entry_suggestion_provider_preference.get_snapshot,i.entry_suggestion_provider_preference.get_server_snapshot),w=(0,d.useSyncExternalStore)(k.openai_api_key_preference.subscribe,k.openai_api_key_preference.get_snapshot,k.openai_api_key_preference.get_server_snapshot),x=(0,d.useSyncExternalStore)(h.claude_api_key_preference.subscribe,h.claude_api_key_preference.get_snapshot,h.claude_api_key_preference.get_server_snapshot),y=(0,d.useSyncExternalStore)(j.google_ai_api_key_preference.subscribe,j.google_ai_api_key_preference.get_snapshot,j.google_ai_api_key_preference.get_server_snapshot),z="openai"===v?w:"claude"===v?x:"google_ai"===v?y:"",A="none"!==v&&z.trim().length>0;(0,d.useEffect)(()=>{q((0,at.build_resume_description)(a.description,a.tags))},[a.description,a.id,a.sheetName,a.tags]),(0,ag.use_escape_to_cancel)(n);let B=async()=>{if(A){s(!0),u(null);try{let b=a.notes.map(a=>a.text).join("\n"),c=await m({provider:v,api_key:z,context:p,notes:b});q(c)}catch(a){u(a instanceof Error?a.message:String(a))}finally{s(!1)}}};return(0,b.jsxs)("form",{className:"flex min-w-0 flex-1 flex-col gap-2",onSubmit:a=>{a.preventDefault();let b=p.trim();b===o.trim()?n():l(b)},children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-start gap-2 max-[700px]:flex-col",children:[(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)(e.TagAutocompleteInput,{id:`active-entry-description-${a.id}`,value:p,known_tags:c,placeholder:"e.g. crafting something @design",disabled:g,autoFocus:!0,on_change:q})}),(0,b.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2 max-[700px]:w-full",children:[A?(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),disabled:g||r,title:"Revise description with AI","aria-label":"Revise description with AI",onClick:()=>void B(),children:(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(aN,{}),r?"Revising…":"Revise with AI"]})}):null,(0,b.jsx)("button",{type:"submit",className:(0,f.get_button_class_name)("primary","small"),disabled:g||p.trim()===o.trim(),children:"Save"}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),disabled:g,onClick:n,children:"Cancel"})]})]}),null!==t?(0,b.jsx)("p",{className:"m-0 text-[0.8rem] text-danger",children:t}):null]})}var aP=a.i(61566);let aQ=`${(0,f.get_button_class_name)("danger-solid")} rounded-none first:rounded-l-[0.65rem] last:rounded-r-[0.65rem] not-first:-ml-px not-first:min-w-12 not-first:border-l not-first:border-l-[color-mix(in_srgb,#ffffff_30%,var(--danger-solid))] min-[561px]:px-2.5 min-[561px]:py-2 min-[561px]:text-[0.9rem] max-[560px]:flex-1 max-[560px]:basis-1/2`;function aR({in_bar:a=!1,is_pending:c,on_start_checkout:d}){return(0,b.jsxs)("div",{className:`inline-flex min-w-0 max-w-full ${a?"max-[560px]:w-full":"min-w-30 max-[560px]:w-full"}`,children:[(0,b.jsx)("button",{type:"button",className:aQ,disabled:c,onClick:()=>d(),children:"Check out"}),(0,b.jsx)("button",{type:"button",className:aQ,disabled:c,title:"Check out at a specific time",onClick:()=>{let a=(0,aP.prompt_check_out_at)();null!==a&&d(a)},children:"@"})]})}function aS({on_submit:a,on_cancel:c,is_pending:e,in_active_panel:h=!1,in_bar:i=!1,allow_at:j=!1}){let[k,l]=(0,d.useState)(""),[m,n]=(0,d.useState)("");return(0,ag.use_escape_to_cancel)(()=>c?.(),void 0!==c),(0,b.jsxs)("form",{className:`flex flex-col gap-2 ${h&&!i?"border-t border-accent-border pt-4":i?"border-t border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))] pt-3.5":""}`,onSubmit:b=>{b.preventDefault();let c=k.trim();if(0===c.length)return;let d=m.trim();a(c,d.length>0?d:void 0),l(""),n("")},children:[(0,b.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-text",children:"Add note"}),(0,b.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,b.jsx)("input",{id:"note-text",className:(0,g.get_input_class_name)(),value:k,onChange:a=>l(a.target.value),placeholder:"Pair with alice on the widget",disabled:e,autoFocus:!0}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2 max-[860px]:w-full",children:[(0,b.jsx)("button",{type:"submit",className:(0,f.get_button_class_name)("ghost"),disabled:e||0===k.trim().length,children:"Save note"}),void 0!==c?(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost"),disabled:e,onClick:c,children:"Cancel"}):null]})]}),j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-at",children:["Note time"," ",(0,b.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,b.jsx)("input",{id:"note-at",className:(0,g.get_input_class_name)(),value:m,onChange:a=>n(a.target.value),placeholder:"e.g. 30 minutes ago",disabled:e})]}):null]})}var aT=a.i(38842),aU=a.i(77328);let aV=(0,d.forwardRef)(function({entry:a,sheets:c,known_tags:e,in_bar:g=!1,on_check_out:h,on_delete:i,on_edit:j,on_move:k,on_add_note:l,on_edit_note:m,on_delete_note:n,is_pending:o},p){var q;let r,{confirm:t}=(0,ae.use_confirm_dialog)(),u=aF(),v=(0,aT.use_confirm_before_checkout)(),w=(0,F.use_duration_format)(),x=aL(),[y,z]=(0,d.useState)(a.durationMs),[A,B]=(0,d.useState)(!1),[C,D]=(0,d.useState)(!1),[E,G]=(0,d.useState)(!1),[H,I]=(0,d.useState)(!1),[J,K]=(0,d.useState)(void 0);(0,d.useImperativeHandle)(p,()=>({start_edit:()=>{A||C||H||B(!0)},start_add_note:()=>{A||C||E||H||G(!0)}}),[E,A,C,H]),(0,d.useEffect)(()=>{G(!1),B(!1),D(!1),I(!1),K(void 0)},[a.id,a.sheetName]),(0,d.useEffect)(()=>{z(a.durationMs);let b=window.setInterval(()=>{z(Date.now()-new Date(a.start).getTime())},1e3);return()=>window.clearInterval(b)},[a.durationMs,a.start]);let L=()=>{I(!1),K(void 0)},M=async a=>{(!v||await t((0,aU.get_check_out_confirm_dialog)(a)))&&(h(a),L())},N=(q=A||C||H,r="flex flex-col gap-4 rounded-lg border border-accent-border p-[1.1rem] shadow-sm",g?q?`${r} rounded-md border border-accent-border bg-[color-mix(in_srgb,var(--panel)_70%,var(--background))] p-3.5`:"flex flex-col gap-3 border-0 bg-transparent p-0 shadow-none":`${r} bg-[image:var(--active-panel-bg)]`),O=async b=>{let c,d,e=a.notes.find(a=>a.timestamp===b);(!u||await t({title:"Delete note?",message:(d=(c=(e?.text??"").trim()).length>80?`${c.slice(0,80)}…`:c).length>0?`Remove this note? "${d}"`:"Remove this note?",confirmLabel:"Delete",variant:"danger"}))&&n(b)},P=(0,b.jsx)(ai,{current_sheet_name:a.sheetName,sheets:c,is_pending:o,on_edit:()=>D(!0),on_show_add_note_form:()=>G(!0),on_move:k,on_delete:async()=>{(!u||await t(aC(a)))&&i()}});return H?(0,b.jsx)("section",{className:N,"aria-label":"Check out active entry",children:(0,b.jsx)(aM,{entry:a,in_bar:g,is_pending:o,initial_at:J,on_cancel:L,on_submit:a=>{M(a)}})}):C?(0,b.jsx)("section",{className:N,children:(0,b.jsx)(au,{entry:a,known_tags:e,is_pending:o,in_active_panel:!0,times_only:!0,start_only:!0,on_cancel:()=>D(!1),on_save:a=>{j(a),D(!1)}})}):(0,b.jsxs)("section",{className:N,children:[(0,b.jsxs)("div",{className:"flex min-w-0 shrink-0 items-start justify-between gap-2",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[g?null:(0,b.jsx)("span",{className:"self-start rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),A?(0,b.jsx)(aO,{entry:a,known_tags:e,is_pending:o,on_cancel:()=>B(!1),on_save:a=>{j({description:a}),B(!1)}}):(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-1",children:[(0,b.jsx)("h2",{className:"m-0 min-w-0 truncate text-[1.12rem] font-[650] leading-tight tracking-tight min-[560px]:text-xl",children:a.description||"Untitled entry"}),(0,b.jsx)("button",{type:"button",className:"inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border-0 bg-transparent p-0 text-muted hover:bg-surface-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55","aria-label":"Edit description",title:"Edit description",disabled:o||E,onClick:()=>B(!0),children:(0,b.jsx)(am,{})})]})]}),g?null:(0,b.jsx)("div",{className:"max-[560px]:self-end",children:P})]}),(0,b.jsxs)("div",{className:`flex shrink-0 items-end justify-between gap-4 max-[860px]:flex-col max-[860px]:items-stretch ${g?"px-3":""}`,children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,b.jsx)("p",{className:"m-0 whitespace-nowrap font-mono text-[1.65rem] font-medium leading-none tracking-tight text-accent min-[440px]:text-[1.85rem] min-[560px]:text-[2rem]",children:(0,s.format_duration)(y,w,x)}),!A&&a.tags.length>0?(0,b.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1.5 p-0",children:a.tags.map(a=>(0,b.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,Q.format_display_tag)(a)},a))}):null]}),(0,b.jsxs)("div",{className:`flex min-w-0 shrink-0 flex-wrap items-center justify-end gap-2 max-[560px]:flex-col max-[560px]:items-stretch ${g?"w-full":"min-w-30 max-[860px]:w-full max-[860px]:justify-stretch"}`,children:[E?null:(0,b.jsx)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost")} min-w-0 min-[561px]:px-2.5 min-[561px]:py-2 min-[561px]:text-[0.9rem] max-[560px]:flex-1`,disabled:o||A,onClick:()=>G(!0),children:"Add note"}),(0,b.jsx)(aR,{in_bar:g,is_pending:o,on_start_checkout:a=>{o||(B(!1),D(!1),G(!1),K(a),I(!0))}})]})]}),(0,b.jsx)(aq,{notes:a.notes,variant:"panel",in_bar:g,is_pending:o,on_edit_note:m,on_delete_note:O}),E?(0,b.jsx)("div",{className:"shrink-0",children:(0,b.jsx)(aS,{in_active_panel:!0,in_bar:g,allow_at:!0,is_pending:o,on_cancel:()=>G(!1),on_submit:(a,b)=>{l(a,b),G(!1)}})}):null]})});var aW=a.i(18734);let aX=(0,d.forwardRef)(function({active_entry:a,sheets:c,known_tags:e,is_pending:f,on_check_out:g,on_delete:h,on_edit:i,on_move:j,on_add_note:k,on_edit_note:l,on_delete_note:m},n){let{confirm:o}=(0,ae.use_confirm_dialog)(),p=aF(),q=(0,d.useRef)(null);return((0,d.useImperativeHandle)(n,()=>({start_edit:()=>{q.current?.start_edit()},start_add_note:()=>{q.current?.start_add_note()}})),null===a)?null:(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted whitespace-nowrap truncate",children:["Sheet ",a.sheetName]}),(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),(0,aW.is_pomodoro_task_entry)(a)?(0,b.jsx)("span",{className:"shrink-0 rounded-full border border-panel-border bg-surface-raised px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-foreground",children:"Pomodoro"}):null,(0,b.jsx)("div",{className:"ml-auto",children:(0,b.jsx)(ai,{current_sheet_name:a.sheetName,sheets:c,is_pending:f,on_edit:()=>q.current?.start_edit(),on_show_add_note_form:()=>q.current?.start_add_note(),on_move:j,on_delete:async()=>{(!p||await o(aC(a)))&&h()}})})]}),(0,b.jsx)(aV,{ref:q,entry:a,sheets:c,known_tags:e,in_bar:!0,is_pending:f,on_check_out:g,on_delete:h,on_edit:i,on_move:j,on_add_note:k,on_edit_note:l,on_delete_note:m},`${a.sheetName}-${a.id}`)]})});var aY=a.i(6128);let aZ="super-time-tracker";function a$({active_entry:a}){let b="true"===(0,d.useSyncExternalStore)(aY.timer_in_title_preference.subscribe,aY.timer_in_title_preference.get_snapshot,aY.timer_in_title_preference.get_server_snapshot),c=(0,F.use_duration_format)(),e=aL(),[f,g]=(0,d.useState)(a?.durationMs??0);return(0,d.useEffect)(()=>{if(null===a)return void g(0);g(a.durationMs);let b=window.setInterval(()=>{g(Date.now()-new Date(a.start).getTime())},1e3);return()=>window.clearInterval(b)},[a]),(0,d.useEffect)(()=>{if(!b||null===a){document.title=aZ;return}let d=a.description.trim()||"Tracking",g=(0,s.format_duration)(f,c,e);return document.title=`${g} — ${d}`,()=>{document.title=aZ}},[a,c,f,e,b]),null}var a_=a.i(98790),a0=a.i(68070),a1=a.i(68225);function a2(a){return`${a.sheetName}:${a.id}`}var a3=a.i(84365),a4=a.i(78537),a5=a.i(97063);async function a6(a,b){let c=await fetch(a,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json()).error??"Request failed");return await c.json()}var a7=a.i(57377),a8=a.i(115);function a9(a){}var ba=a.i(35822),bb=a.i(77963);a.s(["TrackerApp",0,function({initial_state:a}){let[e,g]=(0,d.useState)(a),[h,i]=(0,d.useState)(null),[j,k]=(0,d.useState)(!1),[l,m]=(0,d.useState)(!1),n=(0,d.useRef)(a);(0,d.useEffect)(()=>{a9(a)},[a]);let o=async a=>{k(!0),i(null);try{let b=await a(),c=null!==e.activeEntry&&null===b.activeEntry,d=e.runningEntry,f=b.runningEntry;if(a9(b),g(b),c&&(0,a1.finish_running_pomodoro_timer)(),!t)return;if(null===d&&null!==f)return void(0,a4.notify_desktop)({title:"Tracking started",body:`${f.description||"Untitled entry"} (${f.sheetName})`,tag:"tracker-running-entry"});if(null!==d&&null===f)return void(0,a4.notify_desktop)({title:"Tracking stopped",body:`${d.description||"Untitled entry"} (${d.sheetName})`,tag:"tracker-running-entry"});null!==d&&null!==f&&a2(d)!==a2(f)&&(0,a4.notify_desktop)({title:"Tracking switched",body:`${f.description||"Untitled entry"} (${f.sheetName})`,tag:"tracker-running-entry"})}catch(a){i(a instanceof Error?a.message:String(a))}finally{k(!1)}},p=e.activeSheetName??e.sheets.find(a=>a.isActive)?.name??"main",r=aa(),s=az(),t="true"===(0,d.useSyncExternalStore)(bb.desktop_notifications_preference.subscribe,bb.desktop_notifications_preference.get_snapshot,bb.desktop_notifications_preference.get_server_snapshot),u="true"===(0,d.useSyncExternalStore)(ba.clear_tag_filters_on_sheet_change_preference.subscribe,ba.clear_tag_filters_on_sheet_change_preference.get_snapshot,ba.clear_tag_filters_on_sheet_change_preference.get_server_snapshot),v=(0,d.useRef)(null),w=(0,d.useRef)(null),x=(0,d.useRef)(null);(0,d.useEffect)(()=>{if(!u||null===v.current||v.current===p){v.current=p;return}Z(p,[]),v.current=p},[p,u]);let y=(0,d.useSyncExternalStore)(W.subscribe_sheet_tag_filters,()=>U(p),V),z=(0,d.useMemo)(()=>(function(a){let b=new Map;for(let c of a){let a=new Set;for(let d of c.tags)try{let c=(0,R.normalize_stored_tag)(d);if(a.has(c))continue;a.add(c),b.set(c,(b.get(c)??0)+1)}catch{continue}}return[...b.entries()].map(([a,b])=>({name:a,entryCount:b})).sort((a,b)=>a.name.localeCompare(b.name))})(e.activeSheetEntries),[e.activeSheetEntries]),A=(0,d.useMemo)(()=>{if(l)return[];let a=[...function(a,b,c="all"){return 0===b.length?a:a.filter(a=>(function(a,b,c="all"){return 0===b.length||("any"===c?b.some(b=>a.tags.some(a=>$(a,b))):b.every(b=>a.tags.some(a=>$(a,b))))})(a,b,c))}(e.activeSheetEntries,y,r)];switch(s){case"oldest":return a.sort((a,b)=>new Date(a.start).getTime()-new Date(b.start).getTime());case"duration":return a.sort((a,b)=>b.durationMs-a.durationMs);case"description":return a.sort((a,b)=>{let c=a.description.trim()||"Untitled entry",d=b.description.trim()||"Untitled entry";return c.localeCompare(d)});default:return a.sort((a,b)=>new Date(b.start).getTime()-new Date(a.start).getTime())}},[e.activeSheetEntries,y,r,s,l]),B=(0,d.useMemo)(()=>(0,a3.get_serialized_entries_total_ms)(A),[A]);(0,d.useEffect)(()=>(0,a5.subscribe_tracker_state_sync)(()=>{j||l||fetch("/api/state").then(async a=>{if(!a.ok)throw Error("Failed to refresh tracker state");return await a.json()}).then(a=>{a9(a),g(b=>(null===b.activeEntry?null:`${b.activeEntry.sheetName}:${b.activeEntry.id}`)===(null===a.activeEntry?null:`${a.activeEntry.sheetName}:${a.activeEntry.id}`)?b:a)}).catch(()=>{})}),[j,l]);let C=l?`Loading entries for "${p}"…`:y.length>0?"any"===r?`No entries on sheet "${p}" match any selected tag.`:`No entries on sheet "${p}" match all selected tags.`:`No entries on sheet "${p}".`,D=a=>{let b;if(a===p&&!l)return;n.current=e;let c=(b=e.runningEntries.find(b=>b.sheetName===a)??null,{...e,activeSheetName:a,sheets:e.sheets.map(b=>({...b,isActive:b.name===a})),activeEntry:b,activeSheetEntries:e.activeSheetEntries,activeSheetTotalMs:e.activeSheetTotalMs});a9(c),g(c),m(!0),i(null),(0,a8.post_tracker_action)("/api/sheet",{name:a}).then(a=>{a9(a),g(a)}).catch(a=>{i(a instanceof Error?a.message:String(a)),g(n.current)}).finally(()=>{m(!1)})},E=(a,b,c)=>(0,a7.patch_tracker_action)("/api/entry",{sheetName:a,entryId:b,...c});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a$,{active_entry:e.activeEntry}),(0,b.jsx)(P,{sheets:e.sheets,active_sheet_name:p,active_entry:e.activeEntry,is_pending:j,check_in_form_ref:w,active_entry_panel_ref:x,on_select_sheet:D,on_check_out:a=>o(()=>(0,a8.post_tracker_action)("/api/out",(0,a0.build_check_out_request_payload)(p,a)))}),(0,b.jsx)("div",{className:"relative z-1",children:(0,b.jsx)(a_.TrackerTopbar,{})}),(0,b.jsxs)("div",{className:"mx-auto max-w-[1120px] px-4 pb-10 pt-4 sm:px-5 sm:pt-5",children:[null!==h?(0,b.jsx)("p",{className:"mb-4 border border-danger-border bg-danger-soft px-3 py-2.5 text-danger-text",children:h}):null,(0,b.jsx)(G,{has_running_timer:null!==e.runningEntry,on_check_in_shortcut:()=>{w.current?.expand_and_focus()}}),(0,b.jsxs)("div",{className:"grid grid-cols-[minmax(14rem,18rem)_minmax(0,1fr)] items-stretch border border-panel-border bg-panel shadow-sm max-[960px]:grid-cols-1",children:[(0,b.jsx)("div",{className:"flex min-h-0 min-w-0 flex-col border-r border-panel-border p-4 max-[860px]:border-r-0 max-[860px]:border-b",children:(0,b.jsx)(aJ,{sheets:e.sheets,db_path:e.dbPath,is_pending:j,on_select:D,on_create:a=>o(()=>(0,a8.post_tracker_action)("/api/sheet",{name:a})),on_rename:(a,b)=>o(()=>(0,a7.patch_tracker_action)("/api/sheet",{name:a,newName:b})),on_delete:a=>o(()=>(0,a8.post_tracker_action)("/api/sheet",{name:a,delete:!0}))})}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,b.jsxs)("section",{className:"flex min-w-0 flex-col gap-4 border-b border-panel-border border-l-4 border-l-accent p-4",children:[null===e.activeEntry?(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-panel-border bg-background px-3 py-2",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Quick action"}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[0.9rem] font-medium",children:"Jump into Pomodoro without leaving the tracker."})]}),(0,b.jsxs)(c.default,{href:"/pomodoro",className:`${(0,f.get_button_class_name)("primary")} inline-flex min-w-40 flex-col items-center justify-center whitespace-nowrap text-center`,"aria-label":"Open Pomodoro timer",children:[(0,b.jsx)("span",{className:"text-white text-[0.9rem] leading-none",children:"Start Pomodoro"}),(0,b.jsx)("span",{className:"text-white mt-1 text-[0.72rem] font-medium leading-none opacity-85",children:"Focus timer"})]})]}):null,(0,b.jsx)(aX,{ref:x,active_entry:e.activeEntry,sheets:e.sheets,known_tags:e.knownTags,is_pending:j,on_check_out:a=>o(()=>(0,a8.post_tracker_action)("/api/out",(0,a0.build_check_out_request_payload)(p,a))),on_delete:()=>o(()=>(0,a8.post_tracker_action)("/api/entry",{sheetName:p,entryId:e.activeEntry?.id})),on_edit:a=>o(()=>E(p,e.activeEntry?.id??0,a)),on_move:a=>o(()=>(0,a8.post_tracker_action)("/api/entry/move",{sheetName:p,entryId:e.activeEntry?.id,targetSheetName:a})),on_add_note:(a,b)=>o(()=>(0,a8.post_tracker_action)("/api/note",{text:a,...void 0!==b?{at:b}:{},sheetName:p,entryId:e.activeEntry?.id})),on_edit_note:(a,b)=>o(()=>(0,a7.patch_tracker_action)("/api/note",{sheetName:p,entryId:e.activeEntry?.id,timestamp:a,text:b})),on_delete_note:a=>o(()=>a6("/api/note",{sheetName:p,entryId:e.activeEntry?.id,timestamp:a}))}),null===e.activeEntry?(0,b.jsx)(q,{ref:w,known_tags:e.knownTags,is_pending:j,trailing:(0,b.jsx)("p",{className:"m-0 text-[0.85rem] leading-tight text-muted",children:"Not tracking"}),on_submit:a=>o(()=>(0,a8.post_tracker_action)("/api/in",{...a,sheetName:p}))}):null]}),(0,b.jsx)("section",{className:"flex min-w-0 flex-col gap-4 p-4",children:(0,b.jsx)(aG,{title:"Entries",entries:A,sheets:e.sheets,known_tags:e.knownTags,total_ms:B,empty_message:C,is_pending:j,show_sheet_name:!1,header_extra:(0,b.jsx)(ab,{sheet_name:p,sheet_tags:z}),on_delete:a=>o(()=>(0,a8.post_tracker_action)("/api/entry",{sheetName:a.sheetName,entryId:a.id})),on_edit:(a,b)=>o(()=>E(a.sheetName,a.id,b)),on_move:(a,b)=>o(()=>(0,a8.post_tracker_action)("/api/entry/move",{sheetName:a.sheetName,entryId:a.id,targetSheetName:b})),on_move_many:(a,b)=>o(()=>(0,a8.post_tracker_action)("/api/entry/move-bulk",{entries:a.map(a=>({sheetName:a.sheetName,entryId:a.id})),targetSheetName:b})),on_delete_many:a=>o(()=>(0,a8.post_tracker_action)("/api/entry/delete-bulk",{entries:a.map(a=>({sheetName:a.sheetName,entryId:a.id}))})),on_edit_note:(a,b,c)=>o(()=>(0,a7.patch_tracker_action)("/api/note",{sheetName:a.sheetName,entryId:a.id,timestamp:b,text:c})),on_add_note:(a,b)=>o(()=>(0,a8.post_tracker_action)("/api/note",{sheetName:a.sheetName,entryId:a.id,text:b})),on_resume:a=>o(()=>(0,a8.post_tracker_action)("/api/in",{description:(0,at.build_resume_description)(a.description,a.tags),sheetName:a.sheetName}))})})]})]})]})]})}],12584)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=components_tracker-app_tsx_0qs9.7y._.js.map
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/03~yq9q893hmn.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/Ohbr2ePvonj7GxdJPkXBY/_buildManifest.js",
|
|
11
|
+
"static/Ohbr2ePvonj7GxdJPkXBY/_ssgManifest.js",
|
|
12
|
+
"static/Ohbr2ePvonj7GxdJPkXBY/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/0zx~44x9cv897.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"wasm": [],
|
|
20
20
|
"assets": [],
|
|
21
21
|
"env": {
|
|
22
|
-
"__NEXT_BUILD_ID": "
|
|
22
|
+
"__NEXT_BUILD_ID": "Ohbr2ePvonj7GxdJPkXBY",
|
|
23
23
|
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "ZCfjWQ1j+/I4J6mmJUTCdkubaVm/wt/fMfxL0iW8R8U=",
|
|
24
24
|
"__NEXT_PREVIEW_MODE_ID": "29d30992fa321255a736fc76b01cc746",
|
|
25
25
|
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "ef32282c22c87bee7352728993998d51dd159b60ec937b820c18a87ac9647a97",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__NEXT_FONT_MANIFEST="{\n \"app\": {\n \"[project]/app/_not-found/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/login/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/offline/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/pomodoro/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/register/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/reporting/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/ai-suggestions/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/cloud-sync/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/data/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/display/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/goals/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/pomodoro/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/tags/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/sheets/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/today/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ]\n },\n \"appUsingSizeAdjust\": true,\n \"pages\": {},\n \"pagesUsingSizeAdjust\": false\n}"
|
|
1
|
+
self.__NEXT_FONT_MANIFEST="{\n \"app\": {\n \"[project]/app/_not-found/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/login/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/offline/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/pomodoro/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/register/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/reporting/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/ai-suggestions/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/cloud-sync/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/data/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/display/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/goals/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/notifications/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/pomodoro/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/settings/tags/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/sheets/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ],\n \"[project]/app/today/page\": [\n \"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2\",\n \"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2\"\n ]\n },\n \"appUsingSizeAdjust\": true,\n \"pages\": {},\n \"pagesUsingSizeAdjust\": false\n}"
|
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2",
|
|
49
49
|
"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2"
|
|
50
50
|
],
|
|
51
|
+
"[project]/app/settings/notifications/page": [
|
|
52
|
+
"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2",
|
|
53
|
+
"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2"
|
|
54
|
+
],
|
|
51
55
|
"[project]/app/settings/page": [
|
|
52
56
|
"static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2",
|
|
53
57
|
"static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0zx~44x9cv897.js"/><script src="/_next/static/chunks/0ztw.xdr4egi9.js" async=""></script><script src="/_next/static/chunks/0l~uil8w-ewlm.js" async=""></script><script src="/_next/static/chunks/04_2jzw-uhhu0.js" async=""></script><script src="/_next/static/chunks/turbopack-09e2mm19twlrw.js" async=""></script><script src="/_next/static/chunks/1513ibnpmlx36.js" async=""></script><script src="/_next/static/chunks/0lgo02csmvyps.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0zx~44x9cv897.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5233,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"default\"]\n3:I[73632,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"default\"]\n4:I[83775,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[83775,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"ViewportBoundary\"]\na:I[83775,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"MetadataBoundary\"]\nc:I[51709,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0zx~44x9cv897.js"/><script src="/_next/static/chunks/0ztw.xdr4egi9.js" async=""></script><script src="/_next/static/chunks/0l~uil8w-ewlm.js" async=""></script><script src="/_next/static/chunks/04_2jzw-uhhu0.js" async=""></script><script src="/_next/static/chunks/turbopack-09e2mm19twlrw.js" async=""></script><script src="/_next/static/chunks/1513ibnpmlx36.js" async=""></script><script src="/_next/static/chunks/0lgo02csmvyps.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0zx~44x9cv897.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5233,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"default\"]\n3:I[73632,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"default\"]\n4:I[83775,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[83775,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"ViewportBoundary\"]\na:I[83775,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"MetadataBoundary\"]\nc:I[51709,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"Ohbr2ePvonj7GxdJPkXBY\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[31415,[\"/_next/static/chunks/1513ibnpmlx36.js\",\"/_next/static/chunks/0lgo02csmvyps.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
|