super-time-tracker-ui 0.1.32 → 0.1.34
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/bin/stt-ui.js +4 -4
- package/dist/standalone/next-output/BUILD_ID +1 -1
- package/dist/standalone/next-output/app-path-routes-manifest.json +5 -0
- package/dist/standalone/next-output/build-manifest.json +5 -5
- package/dist/standalone/next-output/routes-manifest.json +30 -0
- package/dist/standalone/next-output/server/app/_global-error/page/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/_not-found/page.js +1 -2
- 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/api/command-palette/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route.js +6 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/entry/delete-bulk/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/entry/delete-bulk/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/merge/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/entry/move/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/entry/move/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/move-bulk/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/entry/move-bulk/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/route.js +2 -2
- package/dist/standalone/next-output/server/app/api/entry/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/split/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route.js +8 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/focus-nudges/status/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/focus-nudges/status/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/in/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/in/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/note/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/note/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/out/route.js +2 -2
- package/dist/standalone/next-output/server/app/api/out/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sheet/active/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sheet/active/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sheet/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sheet/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/state/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/state/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/import/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/import/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/pull/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/pull/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/push/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/push/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/tags/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/tags/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/login/page.js +1 -2
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/offline/page.js +1 -2
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/page.js +2 -3
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/pomodoro/page.js +2 -3
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/register/page.js +1 -2
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/reporting/page.js +2 -3
- 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/search/page/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/search/page/build-manifest.json +17 -0
- package/dist/standalone/next-output/server/app/search/page/next-font-manifest.json +11 -0
- package/dist/standalone/next-output/server/app/search/page/react-loadable-manifest.json +1 -0
- package/dist/standalone/next-output/server/app/search/page/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/search/page.js +16 -0
- package/dist/standalone/next-output/server/app/search/page.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/search/page_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js +1 -2
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js +1 -2
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/data/page.js +2 -3
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/display/page.js +1 -2
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/goals/page.js +2 -3
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/notifications/page.js +1 -2
- package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/page.js +2 -3
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/pomodoro/page.js +2 -3
- 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/quick-actions/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js +1 -2
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/tags/page.js +2 -3
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/sheets/page.js +2 -3
- 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/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/today/page.js +2 -3
- 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 +5 -0
- package/dist/standalone/next-output/server/chunks/0z~i_next_dist_esm_build_templates_app-route_0~jv_po.js +3 -0
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0ixkum3._.js → [root-of-the-server]__01ng47y._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0.ztg_g._.js → [root-of-the-server]__02bnr5q._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0daa86i._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0hwik-5._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0lbu8mm._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0n.~.zo._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0n~maxn._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0pave79._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0qj~x3r._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0skolig._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0traxfq._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0u_4s37._.js +3 -0
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0qxlpdo._.js → [root-of-the-server]__0vivr1t._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0vjnznw._.js +3 -0
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__01dpndl._.js → [root-of-the-server]__0wp5dks._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0g~~yai._.js → [root-of-the-server]__0~_od9c._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~gka7i._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~zviro._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__13y14r6._.js +3 -0
- package/dist/standalone/next-output/server/chunks/{_0y.amf.._.js → _009-tpl._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/_0p0-odp._.js +3 -0
- package/dist/standalone/next-output/server/chunks/{_0vzosja._.js → _0rz1whw._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_command-palette_route_actions_0n5r28j.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entries_search_route_actions_09m9ljm.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entry_merge_route_actions_047yt1x.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entry_split_route_actions_0g-iltq.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_04bpslp._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0huho7_.js +4 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__052~wmx._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__07_7oid._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0x6yv3u._.js → [root-of-the-server]__0c786vx._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0gi2idc._.js → [root-of-the-server]__0d6wmgd._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d9ak_~._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d~vgg9._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0fzz02j._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0hpcspt._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0kp.3u5._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0yrs18n._.js → [root-of-the-server]__0laah33._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0n8s9zq._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0_wxrlk._.js → [root-of-the-server]__0teulir._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0hx9602._.js → [root-of-the-server]__0xp50ux._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0yz-q3-._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__113s7hk._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_002dssm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_036rv.y._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_0_k2414._.js → _04.8jwp._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/_040_y99._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_07p~0bg._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0dxq_sx._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0fzq9xc._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0hcz.gb._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0hy_8.b._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0lhrvkv._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0m.iebm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0nnp~ae._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0ntfdc9._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0p5_u-y._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0q214m8._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0q~8_bm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0rv4ope._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0s_1q6-._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0s_yzxz._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0syjj1b._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0v9kigy._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0woiueg._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0zfyg1r._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0zgllyb._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_088~qfj._.js → _10~dvb4._.js} +3 -3
- package/dist/standalone/next-output/server/chunks/ssr/_11je2nt._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_1218olc._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_search_page_actions_0koh-tf.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_0isp.qn._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_0rm~268._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/components_0s502iu._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_reporting-view_tsx_0-0ofcv._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/components_supabase-auth-form_tsx_0s9lt-1._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_today-focus-view_tsx_0~eac-w._.js +1 -1
- 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 +5 -5
- 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/0-pivfzfhyz.5.js +1 -0
- package/dist/standalone/next-output/static/chunks/0.e7_ejd.-kzx.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0x9s1xcq69ppx.js → 005x4jqipr75n.js} +5 -5
- package/dist/standalone/next-output/static/chunks/02~oo04e0po4k.css +3 -0
- package/dist/standalone/next-output/static/chunks/033lk~e30imyc.js +1 -0
- package/dist/standalone/next-output/static/chunks/03dh~3.gq~kw7.js +1 -0
- package/dist/standalone/next-output/static/chunks/04d2c_i-luh3o.js +1 -0
- package/dist/standalone/next-output/static/chunks/08sdj449boiec.js +1 -0
- package/dist/standalone/next-output/static/chunks/09u_29en-yaxy.js +1 -0
- package/dist/standalone/next-output/static/chunks/0aru5x_.qsjc3.js +1 -0
- package/dist/standalone/next-output/static/chunks/0c0i5ey6h8qet.js +1 -0
- package/dist/standalone/next-output/static/chunks/0c2088mpz.z.3.js +1 -0
- package/dist/standalone/next-output/static/chunks/0e7vf6ybvzpet.js +1 -0
- package/dist/standalone/next-output/static/chunks/0jn1~13s4qy3c.js +1 -0
- package/dist/standalone/next-output/static/chunks/0jwrz3zhj9oat.js +1 -0
- package/dist/standalone/next-output/static/chunks/0kehy4rq7thp9.js +1 -0
- package/dist/standalone/next-output/static/chunks/0mcmtes_owmfo.js +1 -0
- package/dist/standalone/next-output/static/chunks/0njpt~3f0nhto.js +1 -0
- package/dist/standalone/next-output/static/chunks/0pq_8wz65_8e..js +1 -0
- package/dist/standalone/next-output/static/chunks/0s5i31vj2y6n7.js +1 -0
- package/dist/standalone/next-output/static/chunks/0s_kkoslz7uoy.js +1 -0
- package/dist/standalone/next-output/static/chunks/0tee7--l8~1jx.js +1 -0
- package/dist/standalone/next-output/static/chunks/0xmqo9jexa_hl.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0ztw.xdr4egi9.js → 0y7vk2q__th4g.js} +2 -2
- package/dist/standalone/next-output/static/chunks/151m05291h.pl.js +1 -0
- package/dist/standalone/next-output/static/chunks/175d60.wup0de.js +1 -0
- package/dist/standalone/next-output/static/chunks/17gch824k4dm8.js +1 -0
- package/dist/standalone/next-output/static/chunks/{turbopack-09e2mm19twlrw.js → turbopack-01utszc95mtf1.js} +1 -1
- package/dist/standalone/package.json +13 -4
- package/dist/standalone/public/sw.js +1 -0
- package/package.json +13 -4
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0-xbdkv._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__00_xlkl._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__02io6cv._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__07sy349._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0l9xtqh._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0o1mjxc._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0s7i732._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wtdkb3._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__13n2uo8._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0-0rjzr._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__01xqr3d._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0_b2z9m._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0bowsf1._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0dvku3t._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0k~hq1g._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0wtu388._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_00aklen._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_00ic3j9._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_00x~ete._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_08qe8j9._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0_aptb7._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0axgv9-._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0c0txs~._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0cm4hy2._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0cxg26n._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0l6-7m4._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0s1f~0y._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0xrc5.~._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0y3ypyx._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0ycs85o._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0zk9gtm._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_13crob-._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_13y76jr._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/lib_0c0z4q-._.js +0 -3
- package/dist/standalone/next-output/static/chunks/0.4obx1-sv46-.js +0 -1
- package/dist/standalone/next-output/static/chunks/029pvmqxn_t4z.js +0 -1
- package/dist/standalone/next-output/static/chunks/04~.lbegcwd41.js +0 -1
- package/dist/standalone/next-output/static/chunks/05tg.ske01w0a.js +0 -1
- package/dist/standalone/next-output/static/chunks/06xf_oh5oqbs2.js +0 -1
- package/dist/standalone/next-output/static/chunks/09acxdggb87~w.js +0 -1
- package/dist/standalone/next-output/static/chunks/09tjbwcc~3p_e.js +0 -1
- package/dist/standalone/next-output/static/chunks/0ate7k1rcitu0.js +0 -1
- package/dist/standalone/next-output/static/chunks/0crn_fc6.6569.js +0 -1
- package/dist/standalone/next-output/static/chunks/0fkr5kz7p1r5l.js +0 -1
- package/dist/standalone/next-output/static/chunks/0lhj2p9.4g20~.js +0 -1
- package/dist/standalone/next-output/static/chunks/0o4zvrm3q.9k3.js +0 -1
- package/dist/standalone/next-output/static/chunks/0pqilbd~jphqs.css +0 -3
- package/dist/standalone/next-output/static/chunks/0q05k1wfzh4_a.js +0 -1
- package/dist/standalone/next-output/static/chunks/0vov8ngx9~8m2.js +0 -1
- package/dist/standalone/next-output/static/chunks/0watkjb-fw0vn.js +0 -1
- package/dist/standalone/next-output/static/chunks/0x5_m1_cuacap.js +0 -1
- package/dist/standalone/next-output/static/chunks/0xj4dodycy1oc.js +0 -1
- package/dist/standalone/next-output/static/chunks/0yi4m~~80yeqj.js +0 -1
- package/dist/standalone/next-output/static/chunks/12eaief5vtso9.js +0 -1
- package/dist/standalone/next-output/static/chunks/13-nw2q_c_9mk.js +0 -1
- package/dist/standalone/next-output/static/chunks/14jtaz5s.4ih1.js +0 -1
- /package/dist/standalone/next-output/static/{gS32e4Tv_70ot1IWBJddE → o0yrmO-jZI10Gicr4syI_}/_buildManifest.js +0 -0
- /package/dist/standalone/next-output/static/{gS32e4Tv_70ot1IWBJddE → o0yrmO-jZI10Gicr4syI_}/_clientMiddlewareManifest.js +0 -0
- /package/dist/standalone/next-output/static/{gS32e4Tv_70ot1IWBJddE → o0yrmO-jZI10Gicr4syI_}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68120,e=>{"use strict";var t=e.i(54710),a=e.i(71060),r=e.i(29158),s=e.i(32584),n=e.i(56812);let l=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=[0,6,12,18];function i({heatmap:e,duration_format:a,week_starts_on:s}){let l=(0,n.week_starts_on_to_index)(s),u=(0,r.useMemo)(()=>Array.from({length:7},(e,t)=>(l+t)%7),[l]),x=(0,r.useMemo)(()=>{let t=new Map;for(let a of e)t.set(`${a.weekdayIndex}-${a.hourIndex}`,a.totalMs);return t},[e]),f=(0,r.useMemo)(()=>e.reduce((e,t)=>Math.max(e,t.totalMs),0),[e]),h=(0,r.useMemo)(()=>e.reduce((e,t)=>e+t.totalMs,0),[e]);return(0,t.jsxs)("section",{className:"flex w-full flex-col gap-3 rounded-md border border-panel-border bg-panel p-4 shadow-sm",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("h3",{className:"m-0 text-[0.95rem] font-semibold",children:"Activity heatmap"}),(0,t.jsx)("p",{className:"m-0 text-[0.78rem] text-muted",children:"When during the week you usually track time."})]}),0===h?(0,t.jsx)("p",{className:"m-0 py-6 text-center text-[0.85rem] text-muted",children:"Once you start logging time, your weekly rhythm appears here."}):(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"min-w-[420px] pb-1",children:(0,t.jsxs)("div",{className:"grid grid-cols-[2rem_1fr] gap-x-2",children:[(0,t.jsx)("div",{}),(0,t.jsx)("div",{className:"relative h-3.5 w-full",children:o.map(e=>(0,t.jsx)("span",{className:"absolute -translate-x-1/2 text-[0.65rem] font-medium uppercase tracking-[0.06em] text-muted",style:{left:`${e/24*100}%`},children:c(e)},e))}),u.map(e=>(0,t.jsx)(d,{weekday_index:e,cell_lookup:x,max_cell_ms:f,duration_format:a},e))]})})}),(0,t.jsxs)("footer",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1 text-[0.72rem] text-muted",children:[(0,t.jsx)("span",{children:"Less"}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:[.15,.35,.6,.85,1].map(e=>(0,t.jsx)("span",{className:"inline-block h-3 w-4 rounded-sm",style:{backgroundColor:m(e)}},e))}),(0,t.jsx)("span",{children:"More"})]})]})}function d({weekday_index:e,cell_lookup:a,max_cell_ms:r,duration_format:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"self-center text-[0.7rem] font-medium uppercase tracking-[0.06em] text-muted",children:l[e]}),(0,t.jsx)("div",{className:"grid gap-[2px]",style:{gridTemplateColumns:"repeat(24, minmax(0, 1fr))"},children:Array.from({length:24},(o,i)=>{let d=a.get(`${e}-${i}`)??0;return(0,t.jsx)("span",{className:"block aspect-square min-h-[14px] rounded-[3px]",style:{backgroundColor:m(r>0?d/r:0)},title:`${l[e]} ${c(i)}: ${(0,s.format_duration)(d,n)}`},i)})})]})}function c(e){return 0===e?"12a":12===e?"12p":e<12?`${e}a`:`${e-12}p`}function m(e){if(e<=0)return"color-mix(in srgb, var(--surface-raised) 80%, transparent)";let t=Math.min(100,Math.round(90*e)+10);return`color-mix(in srgb, var(--accent) ${t}%, transparent)`}function u(e){return Math.round(100*e)/100}function x({daily_buckets:e,duration_format:a,title:n="Time over days",subtitle:l}){let o=(0,r.useMemo)(()=>e.slice(-60),[e]),i=(0,r.useMemo)(()=>o.reduce((e,t)=>Math.max(e,t.totalMs),0),[o]),d=(0,r.useMemo)(()=>o.reduce((e,t)=>e+t.totalMs,0),[o]),c=(0,r.useMemo)(()=>{let e=o.filter(e=>e.totalMs>0).length;return 0===e?0:d/e},[o,d]),m=l??(0===o.length?"No data in this period.":`${o.length} day${1===o.length?"":"s"} \xb7 avg ${(0,s.format_duration)(c,a)} on active days`);return(0,t.jsxs)("section",{className:"flex w-full flex-col gap-3 rounded-md border border-panel-border bg-panel p-4 shadow-sm",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("h3",{className:"m-0 text-[0.95rem] font-semibold",children:n}),(0,t.jsx)("p",{className:"m-0 text-[0.78rem] text-muted",children:m})]}),0===o.length?(0,t.jsx)("p",{className:"m-0 py-6 text-center text-[0.85rem] text-muted",children:"Track time to populate this chart."}):(0,t.jsx)("div",{className:"flex h-44 items-end gap-[3px] overflow-x-auto pb-2",children:o.map(e=>{let r=i>0?u(e.totalMs/i*100):0,n=0===e.weekdayIndex||6===e.weekdayIndex,l=e.totalMs>0;return(0,t.jsx)("div",{className:"flex h-full min-w-[6px] flex-1 flex-col justify-end",title:`${e.dateLabel} \xb7 ${(0,s.format_duration)(e.totalMs,a)}`,role:"img","aria-label":`${e.dateLabel}: ${(0,s.format_duration)(e.totalMs,a)}`,children:(0,t.jsx)("div",{className:`w-full rounded-t-sm transition-all ${l?n?"bg-accent/60":"bg-accent":"bg-surface-raised"}`,style:{height:l?`${Math.max(2,r)}%`:"2px"}})},e.dateMs)})}),(0,t.jsxs)("footer",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1 text-[0.72rem] text-muted",children:[(0,t.jsx)("span",{children:o.length>0?`${o[0].dateLabel} → ${o[o.length-1].dateLabel}`:""}),(0,t.jsxs)("span",{children:["Total ",(0,s.format_duration)(d,a)," · Peak"," ",(0,s.format_duration)(i,a)]})]})]})}var f=e.i(55437);function h({stats:e,duration_format:a}){let r=Math.round(100*(e.daysInMonth>0?e.trackedDays/e.daysInMonth:0));return(0,t.jsxs)("section",{className:"flex w-full flex-col gap-5 rounded-md border border-panel-border bg-panel p-5 shadow-sm","aria-label":"Month in review",style:{backgroundImage:"linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 60%, transparent) 0%, transparent 70%)"},children:[(0,t.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-[0.08em] text-accent",children:"Month in review"}),(0,t.jsx)("h2",{className:"m-0 text-[1.25rem] font-[650] tracking-tight",children:e.monthLabel}),(0,t.jsx)("p",{className:"m-0 text-[0.85rem] text-muted",children:0===e.totalMs?"No time tracked this month yet — start a timer to fill this in.":`Tracked on ${e.trackedDays} of ${e.daysInMonth} days (${r}%).`})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsx)(g,{label:"Total this month",value:(0,s.format_duration)(e.totalMs,a),detail:0===e.totalMs?"—":`${(0,s.format_duration)(e.averageActiveDayMs,a)} per active day`}),(0,t.jsx)(g,{label:"Best day",value:0===e.bestDayMs?"—":(0,s.format_duration)(e.bestDayMs,a),detail:e.bestDayLabel??"No tracked days yet"}),(0,t.jsx)(g,{label:"Top sheet",value:e.topSheetName??"—",detail:0===e.topSheetMs?"No tracked sheets":(0,s.format_duration)(e.topSheetMs,a)}),(0,t.jsx)(g,{label:"Top tag",value:e.topTag??"—",detail:0===e.topTagMs?"Tag entries to surface":(0,s.format_duration)(e.topTagMs,a)})]}),(0,t.jsxs)("ul",{className:"m-0 grid grid-cols-1 gap-2 p-0 text-[0.85rem] sm:grid-cols-3",children:[(0,t.jsx)(p,{label:"Current streak",value:`${e.currentStreakDays} day${1===e.currentStreakDays?"":"s"}`}),(0,t.jsx)(p,{label:"Longest streak",value:`${e.longestStreakDays} day${1===e.longestStreakDays?"":"s"}`}),(0,t.jsx)(p,{label:"Longest entry",value:0===e.longestEntryMs?"—":(0,s.format_duration)(e.longestEntryMs,a)}),(0,t.jsx)(p,{label:"Entries logged",value:String(e.totalEntries)}),(0,t.jsx)(p,{label:"Tracked days",value:`${e.trackedDays} / ${e.daysInMonth}`}),(0,t.jsx)(p,{label:"Coverage",value:`${r}%`})]})]})}function g({label:e,value:a,detail:r}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1 rounded-md border border-panel-border bg-surface-raised/60 p-3.5",children:[(0,t.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-[0.06em] text-muted",children:e}),(0,t.jsx)("span",{className:"truncate font-mono text-[1.05rem] font-semibold",children:a}),(0,t.jsx)("span",{className:"text-[0.78rem] text-muted",children:r})]})}function p({label:e,value:a}){return(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 rounded-md border border-panel-border/60 bg-surface-raised/40 px-3 py-2",children:[(0,t.jsx)("span",{className:"text-[0.78rem] text-muted",children:e}),(0,t.jsx)("span",{className:"font-mono font-semibold",children:a})]})}var b=e.i(52663);let y=[{value:"duration",label:"Duration"},{value:"name",label:"Name"},{value:"entry_count",label:"Entries"},{value:"active_first",label:"Active first"}];function M({sort:e,on_sort_change:a}){return(0,t.jsxs)("fieldset",{className:"m-0 flex w-full max-w-2xl flex-col gap-2 border-0 p-0",children:[(0,t.jsx)("legend",{className:"mb-2 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Sort by"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"Sort sheets by",children:y.map(r=>{let s=e===r.value;return(0,t.jsx)("button",{type:"button",className:`${(0,b.get_button_class_name)("ghost","small")} ${s?"border-accent-border bg-accent-soft text-foreground":""}`,"aria-pressed":s,onClick:()=>a(r.value),children:r.label},r.value)})})]})}let j=["#2dd4bf","#60a5fa","#a78bfa","#f472b6","#fb923c","#facc15","#34d399","#22d3ee","#f87171","#c084fc","#fbbf24","#4ade80"];function w(e){return Math.round(100*e)/100}function v({tag_breakdown:e,duration_format:a}){let n=(0,r.useMemo)(()=>(function(e){let t=e.reduce((e,t)=>e+t.totalMs,0);if(0===t)return[];let a=[],r=0;return e.forEach((e,s)=>{var n,l,o;let i,d,c,m,u;if(e.totalMs<=0)return;let x=e.totalMs/t,f=r*Math.PI*2,h=(r+x)*Math.PI*2;r+=x,a.push({tag:e.tag,color:(n=e.tag,"Untagged"===n?"#64748b":j[s%j.length]),ratio:x,total_ms:e.totalMs,path_data:(l=f,o=h,i=k(l,70),d=k(o,70),c=k(o,38),m=k(l,38),u=+(o-l>Math.PI),`M ${i.x} ${i.y} A 70 70 0 ${u} 1 ${d.x} ${d.y} L ${c.x} ${c.y} A 38 38 0 ${u} 0 ${m.x} ${m.y} Z`)})}),a})(e),[e]),l=(0,r.useMemo)(()=>e.reduce((e,t)=>e+t.totalMs,0),[e]),o=n.slice(0,8),i=Math.max(0,n.length-8);return 0===n.length||0===l?(0,t.jsx)(N,{title:"Time by tag",subtitle:"No tagged time in this period.",children:(0,t.jsx)(_,{})}):(0,t.jsx)(N,{title:"Time by tag",subtitle:"Multi-tag entries are split evenly across their tags.",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[(0,t.jsxs)("div",{className:"relative shrink-0",children:[(0,t.jsx)("svg",{viewBox:"0 0 160 160",className:"h-40 w-40",role:"img","aria-label":"Tag time distribution",children:1===n.length?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:80,cy:80,r:70,fill:n[0].color}),(0,t.jsx)("circle",{cx:80,cy:80,r:38,fill:"var(--panel)"})]}):n.map(e=>(0,t.jsx)("path",{d:e.path_data,fill:e.color},e.tag))}),(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center text-center",children:[(0,t.jsx)("span",{className:"text-[0.65rem] font-semibold uppercase tracking-[0.08em] text-muted",children:"Total"}),(0,t.jsx)("span",{className:"font-mono text-[0.85rem] font-semibold",children:(0,s.format_duration)(l,a)})]})]}),(0,t.jsxs)("ul",{className:"m-0 flex w-full flex-col gap-1.5 p-0",children:[o.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-2 text-[0.82rem]",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium",children:e.tag}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-muted",children:[Math.round(100*e.ratio),"%"]}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-foreground",children:(0,s.format_duration)(e.total_ms,a)})]},e.tag)),i>0?(0,t.jsxs)("li",{className:"text-[0.78rem] text-muted",children:["+ ",i," more ",1===i?"tag":"tags"]}):null]})]})})}function N({title:e,subtitle:a,children:r}){return(0,t.jsxs)("section",{className:"flex w-full flex-col gap-3 rounded-md border border-panel-border bg-panel p-4 shadow-sm",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("h3",{className:"m-0 text-[0.95rem] font-semibold",children:e}),void 0!==a?(0,t.jsx)("p",{className:"m-0 text-[0.78rem] text-muted",children:a}):null]}),r]})}function _(){return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-3 text-center",children:[(0,t.jsx)("svg",{viewBox:"0 0 160 160",className:"h-28 w-28 opacity-40",role:"presentation",children:(0,t.jsx)("circle",{cx:80,cy:80,r:70,fill:"none",stroke:"var(--panel-border)",strokeWidth:32})}),(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-muted",children:"Tag your entries to see time distribution here."})]})}function k(e,t){return{x:w(80+t*Math.sin(e)),y:w(80-t*Math.cos(e))}}function D({trend:e,duration_format:a,current_label:r,previous_label:n}){var l;let o=(l=e.deltaMs)>0?{symbol:"▲",badge_class:"bg-accent-soft text-accent border border-accent-border"}:l<0?{symbol:"▼",badge_class:"bg-danger-soft text-danger border border-danger-border"}:{symbol:"—",badge_class:"bg-ghost-bg text-muted border border-panel-border"},i=function(e){if(0===e.previousMs)return 0===e.currentMs?"0%":"New";let t=100*Math.abs(e.deltaRatio);return t<.5?"~0%":`${t>=100?t.toFixed(0):t.toFixed(1)}%`}(e);return(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-md border border-panel-border bg-panel p-4 shadow-sm",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("h3",{className:"m-0 text-[0.95rem] font-semibold",children:e.label}),(0,t.jsxs)("span",{className:`shrink-0 rounded-full px-2 py-0.5 text-[0.7rem] font-semibold ${o.badge_class}`,children:[o.symbol," ",i]})]}),(0,t.jsxs)("dl",{className:"m-0 grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("dt",{className:"m-0 text-[0.7rem] font-semibold uppercase tracking-[0.06em] text-muted",children:r}),(0,t.jsx)("dd",{className:"m-0 font-mono text-[1.05rem] font-semibold",children:(0,s.format_duration)(e.currentMs,a)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("dt",{className:"m-0 text-[0.7rem] font-semibold uppercase tracking-[0.06em] text-muted",children:n}),(0,t.jsx)("dd",{className:"m-0 font-mono text-[1.05rem] font-semibold text-muted",children:(0,s.format_duration)(e.previousMs,a)})]})]}),(0,t.jsx)("p",{className:"m-0 text-[0.78rem] text-muted",children:function(e,t){if(0===e.previousMs&&0===e.currentMs)return"No tracked time in either period.";if(0===e.previousMs)return`${(0,s.format_duration)(e.currentMs,t)} more than last period.`;if(0===e.deltaMs)return"Identical to the previous period.";let a=e.deltaMs>0?"more":"less";return`${(0,s.format_duration)(Math.abs(e.deltaMs),t)} ${a} than the previous period.`}(e,a)})]})}let $=[{value:"dashboard",label:"Dashboard"},{value:"sheets",label:"Sheets"}];function T({active_tab:e,on_change:a}){return(0,t.jsx)("div",{role:"tablist","aria-label":"Reporting view",className:"inline-flex w-full max-w-2xl items-center gap-1 self-center rounded-full border border-panel-border bg-surface-raised/50 p-1",children:$.map(r=>{let s=r.value===e;return(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":s,className:`${(0,b.get_button_class_name)("ghost","small")} flex-1 rounded-full border-transparent ${s?"bg-accent text-accent-text-on":"bg-transparent text-muted"}`,onClick:()=>a(r.value),children:r.label},r.value)})})}function S({weekday_distribution:e,duration_format:a}){let n=(0,r.useMemo)(()=>e.reduce((e,t)=>Math.max(e,t.totalMs),0),[e]),l=(0,r.useMemo)(()=>e.reduce((e,t)=>e+t.totalMs,0),[e]);return(0,t.jsxs)("section",{className:"flex w-full flex-col gap-3 rounded-md border border-panel-border bg-panel p-4 shadow-sm",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("h3",{className:"m-0 text-[0.95rem] font-semibold",children:"Day of week"}),(0,t.jsx)("p",{className:"m-0 text-[0.78rem] text-muted",children:"Where your week tends to lean."})]}),0===l?(0,t.jsx)("p",{className:"m-0 py-4 text-center text-[0.85rem] text-muted",children:"No tracked time in this period."}):(0,t.jsx)("ul",{className:"m-0 flex flex-col gap-1.5 p-0",children:e.map(e=>{let r=n>0?u(e.totalMs/n*100):0;return(0,t.jsxs)("li",{className:"grid grid-cols-[2.25rem_1fr_auto] items-center gap-2 text-[0.82rem]",children:[(0,t.jsx)("span",{className:"font-mono text-[0.78rem] text-muted",children:e.weekdayLabel}),(0,t.jsx)("span",{className:"block h-2 overflow-hidden rounded-full bg-surface-raised",role:"presentation",children:(0,t.jsx)("span",{className:"block h-full rounded-full bg-accent",style:{width:`${Math.max(r,4*(e.totalMs>0))}%`}})}),(0,t.jsx)("span",{className:"font-mono text-foreground",children:(0,s.format_duration)(e.totalMs,a)})]},e.weekdayIndex)})})]})}var E=e.i(75404),O=e.i(98636),I=e.i(36519),C=e.i(19402),A=e.i(43864),L=e.i(29263);function R(e,t){return(0,L.toDate)(e,t?.in).getDay()}function B(e,t,a,r=Date.now()){let s=+e.start;return Math.max(0,Math.min(null===e.end?r:+e.end,a)-Math.max(s,t))}function F(e){let t=[];for(let a=0;a<7;a+=1)for(let r=0;r<24;r+=1){let s=`${a}-${r}`;t.push({weekdayIndex:a,hourIndex:r,totalMs:e.get(s)??0})}return t}var P=e.i(39552);function W(e,t,a,r=Date.now()){let s=[],n=(0,I.startOfDay)(new Date(t)),l=(0,I.startOfDay)(new Date(a));if(+n>+l)return s;let o=n;for(;+o<=+l;){let t=+(0,I.startOfDay)(o),a=+(0,A.endOfDay)(o),n=0;for(let s of e)for(let e of s.entries)n+=B(e,t,a,r);s.push({dateMs:t,dateLabel:(0,P.format)(o,"MMM d"),weekdayIndex:R(o),totalMs:n}),o=(0,O.addDays)(o,1)}return s}var U=e.i(22106),z=e.i(25402),K=e.i(61837);function Y(e,t,a,r=Date.now()){let s=0;for(let n of e)for(let e of n.entries)s+=B(e,t,a,r);return s}var q=e.i(31113);let H="Untagged";function V(e,t,a,r=Date.now()){let s=new Map,n=0;for(let l of e)for(let e of l.entries){let l=B(e,t,a,r);if(l<=0)continue;let o=[];for(let t of e.tags)try{o.push((0,q.normalize_stored_tag)(t))}catch{continue}let i=[...new Set(o)];if(n+=l,0===i.length){s.set(H,(s.get(H)??0)+l);continue}let d=l/i.length;for(let e of i)s.set(e,(s.get(e)??0)+d)}let l=[...s.entries()].map(([e,t])=>({tag:e,totalMs:t,ratio:n>0?t/n:0}));return l.sort((e,t)=>e.tag===H?1:t.tag===H?-1:t.totalMs-e.totalMs),l}var Z=e.i(67584),G=e.i(7312),J=e.i(78194);function Q(e,t,a=new Date,r=Date.now(),s=1){var n;let l=X(t,a,s),o="week"===t?(n=void 0,(0,O.addDays)(a,-7,n)):(0,J.subMonths)(a,1),i=X(t,o,s),d=Y(e,l.start,l.end,r),c=Y(e,i.start,i.end,r),m=d-c;return{label:"week"===t?"This week vs last week":"This month vs last month",currentMs:d,previousMs:c,deltaMs:m,deltaRatio:c>0?m/c:0}}function X(e,t,a){return"week"===e?{start:+(0,G.startOfWeek)(t,{weekStartsOn:a}),end:+(0,Z.endOfWeek)(t,{weekStartsOn:a})}:{start:+(0,K.startOfMonth)(t),end:+(0,U.endOfMonth)(t)}}function ee(e,t){return 0===t?0:e/t}function et(e,t=new Date,a=1){switch(e){case"week":return{startMs:+(0,G.startOfWeek)(t,{weekStartsOn:a}),endMs:+(0,Z.endOfWeek)(t,{weekStartsOn:a})};case"month":return{startMs:+(0,K.startOfMonth)(t),endMs:+(0,U.endOfMonth)(t)};default:return{startMs:+(0,I.startOfDay)(t),endMs:+(0,A.endOfDay)(t)}}}var ea=e.i(67999),er=e.i(1997),es=e.i(54873),en=e.i(68462),el=e.i(46748);let eo={from_date:"",to_date:""},ei=["today","yesterday","week","month","last_month","year","last_year"];function ed(e,t){let a=[...e];switch(t){case"name":a.sort((e,t)=>e.sheetName.localeCompare(t.sheetName));break;case"entry_count":a.sort((e,t)=>t.entryCount!==e.entryCount?t.entryCount-e.entryCount:t.totalMs-e.totalMs);break;case"active_first":a.sort((e,t)=>e.hasActiveEntry!==t.hasActiveEntry?e.hasActiveEntry?-1:1:t.totalMs-e.totalMs);break;default:a.sort((e,t)=>t.totalMs-e.totalMs)}return a}var ec=e.i(1800),em=e.i(12843);let eu={from_date:"",to_date:""};function ex({children:e}){return(0,t.jsx)("div",{className:"flex w-full max-w-5xl flex-col gap-5",children:e})}function ef({children:e}){return(0,t.jsx)("div",{className:"flex w-full max-w-2xl flex-col items-center gap-4",children:e})}function eh({label:e,value:a}){return(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:e}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[1.1rem] font-[650] tracking-tight",children:a})]})}function eg({title:e,aria_label:a,muted:r=!1,children:s}){return(0,t.jsxs)("section",{className:"flex w-full max-w-2xl flex-col gap-2",children:[(0,t.jsx)("h2",{className:`m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] ${r?"text-muted":"text-foreground"}`,children:e}),(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0","aria-label":a,children:s})]})}function ep({sheet:e,grand_total_ms:a,duration_format:r}){let n=a>0?Math.round(e.totalMs/a*100):0,l=a>0?u(e.totalMs/a*100):0;return(0,t.jsxs)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{className:"m-0 min-w-0 truncate text-[1rem] font-semibold",children:e.sheetName}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[0.95rem] font-semibold text-accent",children:(0,s.format_duration)(e.totalMs,r)})]}),(0,t.jsx)("div",{className:"mt-2.5 h-1.5 overflow-hidden rounded-full bg-surface-raised",role:"presentation",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-accent",style:{width:`${l}%`}})}),(0,t.jsxs)("p",{className:"m-0 mt-2 flex flex-wrap gap-x-3 gap-y-0.5 text-[0.82rem] text-muted",children:[(0,t.jsxs)("span",{children:[n,"% of total"]}),(0,t.jsxs)("span",{children:[e.entryCount," ",1===e.entryCount?"entry":"entries"]}),(0,t.jsx)("span",{children:0===e.entryCount?"No average":`${(0,s.format_duration)(e.averageEntryMs,r)} avg`}),e.hasActiveEntry?(0,t.jsx)("span",{className:"text-accent",children:"Timer running"}):null]})]})}function eb({sheet:e,in_range:a}){let r=a?"No time in range":0===e.entryCount?"No entries":"No tracked time";return(0,t.jsxs)("li",{className:"rounded-md border border-dashed border-panel-border bg-surface-raised/60 px-3.5 py-2.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("h3",{className:"m-0 min-w-0 truncate text-[0.95rem] font-medium text-muted",children:e.sheetName}),(0,t.jsx)("span",{className:"shrink-0 text-[0.82rem] text-muted",children:r})]}),e.hasActiveEntry?(0,t.jsx)("p",{className:"m-0 mt-1.5 text-[0.82rem] text-accent",children:"Timer running"}):null]})}e.s(["ReportingView",0,function({source_sheets:e,reference_now:l}){let o=(0,a.useSearchParams)(),d=(0,ec.use_duration_format)(),c=(0,em.use_week_starts_on)(),[m,u]=(0,r.useState)("dashboard"),[g,p]=(0,r.useState)(()=>er.default_reporting_sort_preference.get_server_snapshot()),[b,y]=(0,r.useState)(eu),[j,w]=(0,r.useState)(l);(0,r.useEffect)(()=>{y(function(e=en.default_reporting_range_preference.read(),t="monday"){return"none"===e?eo:(0,el.get_reporting_date_range_shortcut_inputs)(e,new Date,(0,n.week_starts_on_to_index)(t))}(void 0,c)),p(er.default_reporting_sort_preference.read())},[c]),(0,r.useEffect)(()=>{let e=function(e){if(null===e)return null;let t=e.trim().toLowerCase();return ei.includes(t)?t:null}(o.get("range"));null!==e&&y((0,el.get_reporting_date_range_shortcut_inputs)(e,new Date,(0,n.week_starts_on_to_index)(c)))},[o,c]),(0,r.useEffect)(()=>{w(l)},[l]),(0,r.useEffect)(()=>{w(Date.now())},[b,e,c]);let N=(0,r.useMemo)(()=>e.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entries:e.entries.map(e=>({id:e.id,start:new Date(e.start),end:null===e.end?null:new Date(e.end),description:"",tags:e.tags,notes:[]}))})),[e]),_=(0,r.useMemo)(()=>(0,es.get_date_range_ms_from_inputs)(b.from_date,b.to_date),[b]),k=b.from_date.length>0!=b.to_date.length>0||b.from_date.length>0&&b.to_date.length>0&&null===_,$=(0,n.week_starts_on_to_index)(c),{stats:q,analytics:H}=(0,r.useMemo)(()=>({stats:function(e,t=null,a=Date.now(),r=1){let s=e.map(e=>{let r,s,n;return null===t?(r=function(e){let{activeEntryID:t,entries:a,name:r}=e;return a.map(e=>{var a;return a=t===e.id&&null===e.end,{id:e.id,description:e.description,start:e.start.toISOString(),end:null===e.end?null:e.end.toISOString(),tags:e.tags,notes:e.notes.map(({timestamp:e,text:t})=>({timestamp:e.toISOString(),text:t})),sheetName:r,durationMs:function(e,t=Date.now()){let{end:a,start:r}=e;return Math.max(0,(null===a?t:+a)-r)}(e),isActive:a}})}(e),s=e.entries.length,n=(0,ea.get_serialized_entries_total_ms)(r),{sheetName:e.name,totalMs:n,entryCount:s,averageEntryMs:ee(n,s),hasActiveEntry:null!==e.activeEntryID}):function(e,t,a,r=Date.now()){let s=0,n=0,l=!1;for(let o of e.entries){let i=B(o,t,a,r);i<=0||(s+=i,n+=1,e.activeEntryID===o.id&&null===o.end&&(l=!0))}return{sheetName:e.name,totalMs:s,entryCount:n,averageEntryMs:ee(s,n),hasActiveEntry:l}}(e,t.startMs,t.endMs,a)}),{activeSheets:n,idleSheets:l}=function(e){let t=[],a=[];for(let r of e)0===r.entryCount||0===r.totalMs?a.push(r):t.push(r);return{activeSheets:t,idleSheets:a}}(s),o=s.reduce((e,t)=>e+t.totalMs,0),i=s.reduce((e,t)=>e+t.entryCount,0);return{activeSheets:n,idleSheets:l,grandTotalMs:o,totalEntryCount:i,grandAverageEntryMs:ee(o,i),periodTotals:null===t?function(e,t=new Date,a=Date.now(),r=1){let s=et("today",t,r),n=et("week",t,r),l=et("month",t,r);return{todayMs:Y(e,s.startMs,s.endMs,a),weekMs:Y(e,n.startMs,n.endMs,a),monthMs:Y(e,l.startMs,l.endMs,a)}}(e,new Date(a),a,r):{todayMs:0,weekMs:0,monthMs:0}}}(N,_,j,$),analytics:function(e,t,a=Date.now(),r=1){let s=new Date(a),n=(0,O.addDays)((0,I.startOfDay)(s),1)-1,l=+(0,I.startOfDay)((0,C.subDays)(s,29)),o=null===t?l:t.startMs,i=null===t?n:t.endMs,d=W(e,o,i,a),c=V(e,o,i,a),m=function(e,t=1){let a=Array(7).fill(0);for(let t of e)a[t.weekdayIndex]+=t.totalMs;let r=(0,G.startOfWeek)(new Date,{weekStartsOn:t});return Array.from({length:7},(e,s)=>{let n=(0,O.addDays)(r,s),l=(t+s)%7;return{weekdayIndex:l,weekdayLabel:(0,P.format)(n,"EEE"),totalMs:a[l]}})}(d,r);return{dailyBuckets:d,tagBreakdown:c,weekdayDistribution:m,heatmap:function(e,t,a,r=Date.now()){let s=new Map,n=(0,I.startOfDay)(new Date(t)),l=(0,I.startOfDay)(new Date(a));if(+n>+l)return F(s);let o=n;for(;+o<=+l;){let t=R(o),a=+o,n=+(0,A.endOfDay)(o);for(let l=0;l<24;l+=1){let o=a+36e5*l,i=Math.min(o+36e5-1,n),d=0;for(let t of e)for(let e of t.entries)d+=B(e,o,i,r);if(d<=0)continue;let c=`${t}-${l}`;s.set(c,(s.get(c)??0)+d)}o=(0,O.addDays)(o,1)}return F(s)}(e,o,i,a),weekTrend:Q(e,"week",s,a,r),monthTrend:Q(e,"month",s,a,r),monthInReview:function(e,t=new Date,a=Date.now()){let r,s,n,l,o=(0,K.startOfMonth)(t),i=(0,U.endOfMonth)(t),d=(0,P.format)(o,"MMMM yyyy"),c=(s=(r=(0,L.toDate)(o,void 0)).getFullYear(),n=r.getMonth(),(l=(0,z.constructFrom)(r,0)).setFullYear(s,n+1,0),l.setHours(0,0,0,0),l.getDate()),m=W(e,+o,+i,a),u=V(e,+o,+i,a),x=0,f=0,h=0,g=-1;m.forEach((e,t)=>{x+=e.totalMs,e.totalMs>0&&(f+=1),e.totalMs>h&&(h=e.totalMs,g=t)});let p=0,b=0,y=new Map;for(let t of e){let e=0;for(let r of t.entries){let t=B(r,+o,+i,a);!(t<=0)&&(p+=1,e+=t,t>b&&(b=t))}e>0&&y.set(t.name,e)}let M=null,j=0;for(let[e,t]of y)t>j&&(j=t,M=e);let w=null,v=0;for(let e of u)"Untagged"!==e.tag&&e.totalMs>v&&(v=e.totalMs,w=e.tag);let N=function(e,t=new Date,a=Date.now()){let r=(0,I.startOfDay)(t);0>=Y(e,+r,+(0,A.endOfDay)(r),a)&&(r=(0,C.subDays)(r,1));let s=0;for(let t=0;t<3660&&!(0>=Y(e,+(0,I.startOfDay)(r),+(0,A.endOfDay)(r),a));t+=1){;s+=1,r=(0,C.subDays)(r,1)}return s}(e,t,a),_=function(e){let t=0,a=0;for(let r of e)r.totalMs>0?(a+=1,t=Math.max(t,a)):a=0;return t}(m),k=-1===g?null:(0,P.format)(new Date(m[g].dateMs),"EEE, MMM d"),D=f>0?x/f:0;return{monthLabel:d,totalMs:x,trackedDays:f,daysInMonth:c,bestDayMs:h,bestDayLabel:k,longestEntryMs:b,totalEntries:p,topSheetName:M,topSheetMs:j,topTag:w,topTagMs:v,currentStreakDays:N,longestStreakDays:_,averageActiveDayMs:D}}(e,s,a)}}(N,_,j,$)}),[N,_,$,j]),{activeSheets:Z,grandAverageEntryMs:J,grandTotalMs:X,idleSheets:ey,periodTotals:eM,totalEntryCount:ej}=q,ew=Z.length+ey.length,ev=null===_,eN=(0,r.useMemo)(()=>ed(Z,g),[Z,g]),e_=(0,r.useMemo)(()=>ed(ey,g),[ey,g]),ek=null===_?"Last 30 days of activity.":`${H.dailyBuckets.length} days in the selected range.`;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E.TrackerTopbar,{breadcrumb:{current:"Reporting"}}),(0,t.jsxs)("main",{className:"mx-auto flex w-full max-w-[1120px] flex-col items-center gap-6 px-5 pb-12 pt-6",children:[(0,t.jsxs)("header",{className:"flex w-full max-w-2xl flex-col gap-3",children:[(0,t.jsx)("h1",{className:"m-0 text-center text-[1.5rem] font-[650] tracking-tight",children:"Reporting"}),(0,t.jsx)("p",{className:"m-0 max-w-md self-center text-center text-[0.9rem] leading-relaxed text-muted",children:null===_?"A snapshot of where your time has been going.":"Metrics filtered to the selected date range."})]}),(0,t.jsx)(T,{active_tab:m,on_change:u}),(0,t.jsx)(f.ReportingDateRangePicker,{range:b,is_invalid:k,on_range_change:y,on_clear:()=>y(eu)}),(0,t.jsxs)("section",{className:"grid w-full max-w-5xl grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4","aria-label":"Summary",children:[(0,t.jsx)(eh,{label:null===_?"Total tracked":"In range",value:(0,s.format_duration)(X,d)}),(0,t.jsx)(eh,{label:"Avg per entry",value:(0,s.format_duration)(J,d)}),(0,t.jsx)(eh,{label:"Sheets",value:String(ew)}),(0,t.jsx)(eh,{label:"Entries",value:String(ej)})]}),ev?(0,t.jsxs)("section",{className:"grid w-full max-w-5xl grid-cols-1 gap-2 sm:grid-cols-3","aria-label":"Period totals",children:[(0,t.jsx)(eh,{label:"Today",value:(0,s.format_duration)(eM.todayMs,d)}),(0,t.jsx)(eh,{label:"This week",value:(0,s.format_duration)(eM.weekMs,d)}),(0,t.jsx)(eh,{label:"This month",value:(0,s.format_duration)(eM.monthMs,d)})]}):null,0===ew?(0,t.jsx)("p",{className:"m-0 w-full max-w-2xl text-center text-[0.9rem] text-muted",children:"No sheets yet. Create a sheet on the tracker to start logging time."}):k?(0,t.jsx)("p",{className:"m-0 w-full max-w-2xl text-center text-[0.9rem] text-muted",children:"Choose both dates to filter metrics, or clear the range to see all time."}):"dashboard"===m?(0,t.jsxs)(ex,{children:[(0,t.jsx)(h,{stats:H.monthInReview,duration_format:d}),(0,t.jsxs)("div",{className:"grid w-full grid-cols-1 gap-3 lg:grid-cols-2",children:[(0,t.jsx)(D,{trend:H.weekTrend,duration_format:d,current_label:"This week",previous_label:"Last week"}),(0,t.jsx)(D,{trend:H.monthTrend,duration_format:d,current_label:"This month",previous_label:"Last month"})]}),(0,t.jsx)(x,{daily_buckets:H.dailyBuckets,duration_format:d,subtitle:ek}),(0,t.jsxs)("div",{className:"grid w-full grid-cols-1 gap-3 lg:grid-cols-2",children:[(0,t.jsx)(v,{tag_breakdown:H.tagBreakdown,duration_format:d}),(0,t.jsx)(S,{weekday_distribution:H.weekdayDistribution,duration_format:d})]}),(0,t.jsx)(i,{heatmap:H.heatmap,duration_format:d,week_starts_on:c})]}):(0,t.jsxs)(ef,{children:[(0,t.jsx)(M,{sort:g,on_sort_change:p}),0===Z.length?(0,t.jsx)("p",{className:"m-0 w-full max-w-2xl text-center text-[0.9rem] text-muted",children:null===_?"No tracked time yet. Check in on a sheet to see stats here.":"No tracked time in this date range."}):(0,t.jsx)(eg,{title:"Tracked sheets",aria_label:"Tracked sheet statistics",children:eN.map(e=>(0,t.jsx)(ep,{sheet:e,grand_total_ms:X,duration_format:d},e.sheetName))}),ey.length>0?(0,t.jsx)(eg,{title:null===_?"Empty sheets":"Sheets in range",aria_label:"Sheets without time in range",muted:!0,children:e_.map(e=>(0,t.jsx)(eb,{sheet:e,in_range:null!==_},e.sheetName))}):null]})]})]})}],68120)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(78677)),o=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",l=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${l}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(29158);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),s=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return b}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),o=e.r(54710),l=a._(e.r(29158)),i=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),m=e.r(20321);e.r(90503);let p=e.r(38520),f=e.r(19947),h=e.r(59246),_=e.r(99046);function x(t){var r,n;let s,a,x,[b,y]=(0,l.useOptimistic)(f.IDLE_LINK_STATUS),v=(0,l.useRef)(null),{href:j,as:w,children:N,prefetch:k=null,passHref:S,replace:E,shallow:T,scroll:O,onClick:C,onMouseEnter:A,onTouchStart:M,legacyBehavior:P=!1,onNavigate:R,transitionTypes:L,ref:I,unstable_dynamicOnHover:D,...U}=t;s=N,P&&("string"==typeof s||"number"==typeof s)&&(s=(0,o.jsx)("a",{children:s}));let $=l.default.useContext(c.AppRouterContext),F=!1!==k,K=!1!==k?null===(n=k)||"auto"===n?_.FetchStrategy.PPR:_.FetchStrategy.Full:_.FetchStrategy.PPR,q="string"==typeof(r=w||j)?r:(0,i.formatUrl)(r);if(P){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=l.default.Children.only(s)}let B=P?a&&"object"==typeof a&&a.ref:I,Y=l.default.useCallback(e=>(null!==$&&(v.current=(0,f.mountLinkInstance)(e,q,$,K,F,y)),()=>{v.current&&((0,f.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,f.unmountPrefetchableInstance)(e)}),[F,q,$,K,y]),W={ref:(0,u.useMergedRef)(Y,B),onClick(t){P||"function"!=typeof C||C(t),P&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,s,a,o,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);l.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,i)})}}(t,q,v,E,O,R,L)},onMouseEnter(e){P||"function"!=typeof A||A(e),P&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&F&&(0,f.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){P||"function"!=typeof M||M(e),P&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&F&&(0,f.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(q)?W.href=q:P&&!S&&("a"!==a.type||"href"in a.props)||(W.href=(0,m.addBasePath)(q)),x=P?l.default.cloneElement(a,W):(0,o.jsx)("a",{...U,...W,children:s}),(0,o.jsx)(g.Provider,{value:b,children:x})}e.r(10364);let g=(0,l.createContext)(f.IDLE_LINK_STATUS),b=()=>(0,l.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),s=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[o,l]=(0,r.useState)(null),[i,c]=(0,r.useState)(!1),u=(0,s.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{l(e?.user.email??null)}).catch(()=>{l(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{l(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:o,is_pending:i,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},45200,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/",label:"Tracker",match:e=>"/"===e}];function a(){return(0,t.jsx)("svg",{className:"block h-4 w-4",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,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":s?"page":void 0,children:n.label},n.href)})})}],45200);var o=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,o.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(a,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},73205,2268,76003,38240,e=>{"use strict";let t=new Set(e.i(22373).topbar_quick_action_ids),r=["today","search","reporting","pomodoro"];e.s(["parse_topbar_quick_actions",0,function(e){try{let n=JSON.parse(e);if(!Array.isArray(n))return r;let s=n.filter(e=>"string"==typeof e&&t.has(e));return Array.from(new Set(s))}catch{return r}}],73205);var n=e.i(34869),s=e.i(92629);let a=(0,n.create_ui_preference_store)({storage_key:s.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:s.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function o(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,a],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return o()}],76003);var l=e.i(17798),i=e.i(46549),c=e.i(10464),u=e.i(35434),d=e.i(61834),m=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===o()?"light":"dark";(0,l.apply_theme)(e),(0,m.write_stored_theme)(e),c.theme_mode_preference.write(e),(0,d.write_document_preference_cookies)({theme_mode:e,theme:e}),c.theme_mode_preference.notify(),(0,u.notify_theme_subscribers)(),(0,i.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let s=(0,t.useRef)(e);s.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158),a=e.i(37399),o=e.i(90463),l=e.i(46549),i=e.i(73205),c=e.i(66295),u=e.i(2268),d=e.i(32792),m=e.i(90299),p=e.i(28274),f=e.i(76003),h=e.i(35434),_=e.i(38240),x=e.i(22373),g=e.i(25204),b=e.i(77882);let y="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 no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},j=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),w=(0,n.usePathname)()??"/",N=(0,s.useSyncExternalStore)(h.subscribe_theme,f.get_theme_snapshot,f.get_theme_server_snapshot),k=(0,s.useSyncExternalStore)(u.cloud_sync_enabled_preference.subscribe,u.cloud_sync_enabled_preference.get_snapshot,u.cloud_sync_enabled_preference.get_server_snapshot),S=(0,s.useSyncExternalStore)(m.tracker_shortcut_map_preference.subscribe,m.tracker_shortcut_map_preference.get_snapshot,m.tracker_shortcut_map_preference.get_server_snapshot),E=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),T=(0,c.parse_tracker_shortcut_map)(S),O=new Set((0,i.parse_topbar_quick_actions)(E)),C=x.topbar_quick_action_ids.filter(e=>!O.has(e)),A=Array.from(new Set([...Array.from(j),...C])),{email:M,is_configured:P,is_pending:R,sign_out:L}=(0,b.use_supabase_auth_session)(),[I,D]=(0,s.useState)(!1),U=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!I)return;let e=e=>{null===U.current||U.current.contains(e.target)||D(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[I]);let $=()=>{D(!1)};return(0,g.use_escape_to_cancel)($,I),(0,t.jsxs)("div",{className:"relative shrink-0",ref:U,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":I,"aria-haspopup":"menu",onClick:()=>D(e=>!e),children:(0,t.jsx)(a.HamburgerIcon,{})}),I?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[P&&null!==M?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:M,children:M})}):null,A.map(e=>{let n=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:y,role:"menuitem",onClick:$,children:n.label})},e)}),P?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===k,onClick:()=>{let e="true"===k?"false":"true";u.cloud_sync_enabled_preference.write(e),u.cloud_sync_enabled_preference.notify(),(0,l.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==M&&(0,p.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===k?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===k?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{$(),(0,_.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===N?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===N?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;$(),e=T.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),P?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===M?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{$(),e.push((0,o.build_auth_page_href)("sign_in",w))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:R,onClick:()=>{$(),L()},children:R?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let w=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",a=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),o=(0,s.useMemo)(()=>(0,i.parse_topbar_quick_actions)(a),[a]);if(0===o.length)return null;let l=w.filter(e=>o.includes(e.id));return 0===l.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:l.map(n=>{let s=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":s?"page":void 0,children:n.label},n.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",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,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),s=e.i(1976),a=e.i(76080),o=e.i(45958),l=e.i(71060),i=e.i(29539);function c(){let e=((0,l.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(o.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(i.SettingsIcon,{})})}function u({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(o.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(o.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(u,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(a.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(c,{}),(0,t.jsx)(s.TopbarOverflowMenu,{})]})]})]})})}],75404)},6690,93749,e=>{"use strict";let t="super-time-tracker-pinned-sheet-names",r=new Set,n=[],s=null;function a(){try{let e=window.localStorage.getItem(t);if(null===e)return[];let r=JSON.parse(e);if(!Array.isArray(r))return[];return r.filter(e=>"string"==typeof e)}catch{return[]}}function o(e){try{window.localStorage.setItem(t,JSON.stringify(e))}catch{}s=null,r.forEach(e=>{e()})}e.s(["get_pinned_sheet_names_server_snapshot",0,function(){return n},"get_pinned_sheet_names_snapshot",0,function(){var e=a();if(0===e.length)return n;let t=e.join("\0");if(null!==s&&s.key===t)return s.snapshot;let r=Object.freeze([...e]);return s={key:t,snapshot:r},r},"read_pinned_sheet_names",0,a,"subscribe_pinned_sheet_names",0,function(e){return r.add(e),()=>{r.delete(e)}},"write_pinned_sheet_names",0,o],6690),e.s(["toggle_pinned_sheet_name",0,function(e){let t=e.trim();if(0===t.length)return;let r=a(),n=r.indexOf(t);n>=0?o([...r.slice(0,n),...r.slice(n+1)]):o([...r,t])}],93749)},19946,e=>{"use strict";var t=e.i(29158),r=e.i(72270),n=e.i(4572);e.s(["use_confirm_dialog",0,function(){let e=(0,t.useContext)(r.ConfirmDialogContext);if(null!==e)return e;let s=(0,n.get_registered_confirm_dialog)();if(null!==s)return{confirm:s};throw Error("use_confirm_dialog must be used within ConfirmDialogProvider")}])},75899,e=>{"use strict";var t=e.i(39552);e.s(["format_time",0,function(e,r="12h"){return(0,t.format)(new Date(e),"24h"===r?"HH:mm":"h:mm a")}])},60529,e=>{"use strict";e.s(["format_entry_count_label",0,function(e){return 0===e?null:1===e?"1 entry":`${e} entries`}])},35923,e=>{"use strict";var t=e.i(29158),r=e.i(97891);e.s(["use_time_format",0,function(){return(0,t.useSyncExternalStore)(r.time_format_preference.subscribe,r.time_format_preference.get_snapshot,r.time_format_preference.get_server_snapshot)}])},83821,60145,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=30&&t<=720}});e.s(["daily_focus_target_minutes_preference",0,n],83821);let s=(0,t.create_ui_preference_store)({storage_key:r.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=60&&t<=4200}});e.s(["weekly_focus_target_minutes_preference",0,s],60145)},15526,e=>{"use strict";let t="super-time-tracker-pomodoro-active-entry";e.s(["clear_pomodoro_task_entry_marker",0,function(){try{window.localStorage.removeItem(t)}catch{}},"is_pomodoro_task_entry",0,function(e){let r=(()=>{try{let e=window.localStorage.getItem(t);if(null===e)return null;try{let t=JSON.parse(e);if("string"==typeof t.sheetName&&t.sheetName.length>0&&"number"==typeof t.entryId&&Number.isInteger(t.entryId))return{sheetName:t.sheetName,entryId:t.entryId}}catch{}return null}catch{return null}})();return null!==r&&r.sheetName===e.sheetName&&r.entryId===e.id},"mark_pomodoro_task_entry",0,function(e){try{let r={sheetName:e.sheetName,entryId:e.id};window.localStorage.setItem(t,JSON.stringify(r))}catch{}}])},36178,68713,e=>{"use strict";e.s(["build_check_out_request_payload",0,function(e,t){let r={sheetName:e},n=t?.at?.trim(),s=t?.note?.trim();return void 0!==n&&n.length>0&&(r.at=n),void 0!==s&&s.length>0&&(r.note=s),r}],36178);var t=e.i(26740),r=e.i(15526);e.s(["finish_running_pomodoro_timer",0,function(){try{let e=window.localStorage.getItem(t.POMODORO_STORAGE_KEY);if(null===e)return;let n=JSON.parse(e),s=n.state;if(s?.status!=="running")return;let a={settings:n.settings??t.POMODORO_DEFAULT_SETTINGS,state:t.POMODORO_DEFAULT_STATE};window.localStorage.setItem(t.POMODORO_STORAGE_KEY,JSON.stringify(a)),(0,r.clear_pomodoro_task_entry_marker)()}catch{}}],68713)},50459,e=>{"use strict";e.s(["prompt_check_out_at",0,function(){let e=window.prompt("Check out at what time?","30 minutes ago");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}])},53754,7554,76379,e=>{"use strict";var t=e.i(29158),r=e.i(19946);function n(e){let t=e?.at?.trim()??"",r=e?.note?.trim()??"",n=t.length>0,s=r.length>0,a="Stop the active timer and save this entry?";return n&&s?a=`Stop the timer at "${t}" and save a checkout note?`:n?a=`Stop the timer and check out at "${t}"?`:s&&(a="Stop the timer and save this entry with your checkout note?"),{title:"Check out?",message:a,confirmLabel:"Check out",variant:"danger"}}e.s(["get_check_out_confirm_dialog",0,n],7554);var s=e.i(97026);function a(){return"true"===(0,t.useSyncExternalStore)(s.confirm_before_checkout_preference.subscribe,s.confirm_before_checkout_preference.get_snapshot,s.confirm_before_checkout_preference.get_server_snapshot)}e.s(["use_confirm_before_checkout",0,a],76379),e.s(["useCheckOutAction",0,function(e){let{confirm:s}=(0,r.use_confirm_dialog)(),o=a();return(0,t.useCallback)(async t=>(!o||!!await s(n(t)))&&(e(t),!0),[s,o,e])}],53754)},81823,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158),a=e.i(75899),o=e.i(56716),l=e.i(6690);let i=[{value:"all",label:"All sheets"},{value:"pinned",label:"Pinned"}];function c({sheet_names:e,on_toggle_pin:r}){let n=(0,s.useSyncExternalStore)(o.today_scope_preference.subscribe,o.today_scope_preference.get_snapshot,o.today_scope_preference.get_server_snapshot),a=(0,s.useSyncExternalStore)(l.subscribe_pinned_sheet_names,l.get_pinned_sheet_names_snapshot,l.get_pinned_sheet_names_server_snapshot),u=new Set(a);return(0,t.jsxs)("div",{className:"flex w-full max-w-2xl flex-col gap-3",children:[(0,t.jsx)("div",{role:"group","aria-label":"Today scope",className:"flex flex-wrap gap-2",children:i.map(e=>{let r=n===e.value;return(0,t.jsx)("button",{type:"button",className:`cursor-pointer rounded-full border px-3 py-1.5 text-[0.85rem] font-semibold transition-colors duration-150 ${r?"border-accent bg-accent-soft text-foreground":"border-panel-border bg-panel text-muted hover:border-accent hover:text-foreground"}`,"aria-pressed":r,onClick:()=>{var t;return t=e.value,void(o.today_scope_preference.read()!==t&&(o.today_scope_preference.write(t),o.today_scope_preference.notify()))},children:e.label},e.value)})}),"pinned"===n?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[0===a.length?(0,t.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,t.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-2 p-0","aria-label":"Pinned sheets",children:e.map(e=>{let n=u.has(e);return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",className:`cursor-pointer rounded-full border px-2.5 py-1 text-[0.8rem] font-medium transition-colors duration-150 ${n?"border-accent bg-accent-soft text-foreground":"border-panel-border bg-surface-raised text-muted hover:text-foreground"}`,"aria-pressed":n,onClick:()=>r(e),children:[n?"★ ":"☆ ",e]})},e)})})]}):null]})}var u=e.i(75404),d=e.i(36178),m=e.i(44356),p=e.i(60529),f=e.i(18774),h=e.i(32584),_=e.i(68713);function x(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}var g=e.i(37193),b=e.i(67321),y=e.i(51229),v=e.i(83821),j=e.i(60145),w=e.i(50459),N=e.i(93749),k=e.i(53754),S=e.i(1800),E=e.i(35923);let T="rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text";function O({label:e,tracked_ms:r,target_ms:n,progress_percent:s,duration_format:a}){return(0,t.jsxs)("article",{className:"rounded-md border border-panel-border bg-background px-3 py-2.5",children:[(0,t.jsx)("p",{className:"m-0 text-[0.75rem] font-semibold uppercase tracking-[0.04em] text-muted",children:e}),(0,t.jsxs)("p",{className:"m-0 mt-1 font-mono text-[0.95rem] font-semibold text-accent",children:[(0,h.format_duration)(r,a)," /"," ",(0,h.format_duration)(n,a)]}),(0,t.jsx)("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-accent-soft",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-accent transition-[width] duration-300",style:{width:`${s}%`}})})]})}function C({entry:e,is_pending:n,duration_format:o,time_format:l,on_check_out:i}){let[c,u]=(0,s.useState)(()=>Date.now()-new Date(e.start)),d=(0,k.useCheckOutAction)(e=>{i(e)});(0,s.useEffect)(()=>{u(Date.now()-new Date(e.start));let t=globalThis.setInterval(()=>{u(Date.now()-new Date(e.start))},1e3);return()=>{globalThis.clearInterval(t)}},[e.start]);let m=(0,a.format_time)(e.start,l);return(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-3 shadow-sm",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:e.sheetName}),(0,t.jsx)("p",{className:"m-0 mt-1 truncate text-[0.95rem] font-medium",children:e.description||"Untitled entry"}),(0,t.jsxs)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:["Since ",m]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-[0.92rem] font-semibold text-accent",children:(0,h.format_duration)(c,o)}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.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:n,onClick:()=>{d()},children:"Check out"}),(0,t.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:n,onClick:()=>{let e=(0,w.prompt_check_out_at)();null!==e&&d({at:e})},title:"Check out at specific time",children:"@"}),(0,t.jsx)(r.default,{href:"/",className:"text-[0.75rem] font-semibold text-accent no-underline hover:underline",onClick:()=>(0,b.navigate_to_tracker_sheet)(e.sheetName),children:"Open"})]})]})]})})}function A({suggestion:e,is_pending:r,is_pinned:n,time_format:s,on_toggle_pin:o,on_start:l}){return(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-3 shadow-sm",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:e.sheetName}),(0,t.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:()=>o(e.sheetName),title:n?"Unpin sheet":"Pin sheet",children:n?"Pinned":"Pin"})]}),(0,t.jsx)("p",{className:"m-0 mt-1 truncate text-[0.95rem] font-medium",children:e.suggestedDescription||"Untitled entry"}),(0,t.jsxs)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:["Yesterday at ",(0,a.format_time)(e.lastLoggedAt,s)]}),e.suggestedTags.length>0?(0,t.jsx)("ul",{className:"m-0 mt-2 flex list-none flex-wrap gap-1.5 p-0",children:e.suggestedTags.map(e=>(0,t.jsx)("li",{className:T,children:(0,f.format_display_tag)(e)},e))}):null]}),(0,t.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:r,onClick:()=>{l()},children:"Start task"})]})})}function M({entry:e,duration_format:n,time_format:s,show_sheet_name:o}){let l=(0,a.format_time)(e.start,s),i=null===e.end?"now":(0,a.format_time)(e.end,s);return(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-3 shadow-sm",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[o?(0,t.jsx)("p",{className:"m-0 mb-1 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:e.sheetName}):null,(0,t.jsx)("p",{className:"m-0 text-[0.95rem] font-medium",children:e.description}),(0,t.jsxs)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:[l," → ",i]}),e.tags.length>0?(0,t.jsx)("ul",{className:"m-0 mt-2 flex list-none flex-wrap gap-1.5 p-0",children:e.tags.map(e=>(0,t.jsx)("li",{className:T,children:(0,f.format_display_tag)(e)},e))}):null]}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[(0,t.jsx)("span",{className:"font-mono text-[0.9rem] font-semibold text-accent",children:(0,h.format_duration)(e.todayDurationMs,n)}),(0,t.jsx)(r.default,{href:"/",className:"text-[0.8rem] font-semibold text-accent no-underline hover:underline",onClick:()=>(0,b.navigate_to_tracker_sheet)(e.sheetName),children:"Open sheet"})]})]})})}e.s(["TodayFocusView",0,function({initial_data:e}){var a;let i=(0,n.useRouter)(),f=(0,S.use_duration_format)(),b=(0,E.use_time_format)(),w=(0,s.useSyncExternalStore)(v.daily_focus_target_minutes_preference.subscribe,v.daily_focus_target_minutes_preference.get_snapshot,v.daily_focus_target_minutes_preference.get_server_snapshot),k=(0,s.useSyncExternalStore)(j.weekly_focus_target_minutes_preference.subscribe,j.weekly_focus_target_minutes_preference.get_snapshot,j.weekly_focus_target_minutes_preference.get_server_snapshot),[T,P]=(0,s.useState)(e),[R,L]=(0,s.useState)(null),[I,D]=(0,s.useState)(!1);(0,s.useEffect)(()=>{P(e)},[e]);let U=(0,s.useSyncExternalStore)(o.today_scope_preference.subscribe,o.today_scope_preference.get_snapshot,o.today_scope_preference.get_server_snapshot),$=(0,s.useSyncExternalStore)(l.subscribe_pinned_sheet_names,l.get_pinned_sheet_names_snapshot,l.get_pinned_sheet_names_server_snapshot),F=(0,s.useMemo)(()=>"all"===U?null:new Set($),[U,$]),K=(0,s.useMemo)(()=>null===F?T.runningEntries:T.runningEntries.filter(e=>F.has(e.sheetName)),[F,T.runningEntries]),q=(0,s.useMemo)(()=>{var e;return null===F?T.todayEntries:(e=T.todayEntries,e.filter(e=>F.has(e.sheetName)))},[F,T.todayEntries]),B=(0,s.useMemo)(()=>null===F?T.startDaySuggestions:T.startDaySuggestions.filter(e=>F.has(e.sheetName)),[F,T.startDaySuggestions]),Y=(0,s.useMemo)(()=>q.reduce((e,t)=>e+t.todayDurationMs,0),[q]),W=async e=>{D(!0),L(null);try{await e(),i.refresh()}catch(e){L((0,g.message_from_unknown_error)(e,"Action failed"))}finally{D(!1)}},G=6e4*Number.parseInt(w,10),z=6e4*Number.parseInt(k,10),J=x(T.focusStatus.todayTrackedMs,G),H=x(T.focusStatus.weekTrackedMs,z);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.TrackerTopbar,{breadcrumb:{current:"Today"}}),(0,t.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,t.jsxs)("header",{className:"flex w-full flex-col gap-2 text-center",children:[(0,t.jsx)("h1",{className:"m-0 text-[1.5rem] font-[650] tracking-tight",children:"Today"}),(0,t.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:"Running timers and time logged today."})]}),null===R?null:(0,t.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:R}),(0,t.jsx)(c,{sheet_names:T.sheetNames,on_toggle_pin:N.toggle_pinned_sheet_name}),(0,t.jsxs)("section",{className:"w-full rounded-md border border-panel-border bg-panel p-4 shadow-sm","aria-label":"Focus goals progress",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Focus goals"}),(0,t.jsx)(r.default,{href:"/settings/goals",className:"text-[0.78rem] font-semibold text-accent no-underline hover:underline",children:"Edit goals"})]}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-2 min-[620px]:grid-cols-2",children:[(0,t.jsx)(O,{label:"Daily",tracked_ms:T.focusStatus.todayTrackedMs,target_ms:G,progress_percent:J,duration_format:f}),(0,t.jsx)(O,{label:"Weekly",tracked_ms:T.focusStatus.weekTrackedMs,target_ms:z,progress_percent:H,duration_format:f})]})]}),(0,t.jsxs)("section",{className:"w-full rounded-md border border-panel-border bg-panel p-4 shadow-sm","aria-label":"Today total",children:[(0,t.jsxs)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:["Tracked today","pinned"===U?" (pinned)":""]}),(0,t.jsx)("p",{className:"m-0 mt-1 font-mono text-[1.75rem] font-semibold text-accent",children:(0,h.format_duration)(Y,f)})]}),(0,t.jsxs)("section",{className:"flex w-full flex-col gap-3","aria-label":"Running timers",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Running now"}),(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:0===(a=K.length)?"No active timers":1===a?"1 timer":`${a} timers`})]}),0===K.length?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"No running timers for the selected scope."}):(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:K.map(e=>(0,t.jsx)(C,{entry:e,is_pending:I,duration_format:f,time_format:b,on_check_out:t=>W(async()=>{await (0,y.post_tracker_action)("/api/out",(0,d.build_check_out_request_payload)(e.sheetName,t)),(0,_.finish_running_pomodoro_timer)()})},`${e.sheetName}-${e.id}`))})]}),(0,t.jsxs)("section",{className:"flex w-full flex-col gap-3","aria-label":"Start day suggestions",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Start day"}),(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Suggested first task from yesterday"})]}),0===B.length?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"No yesterday history yet for the selected scope."}):(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:B.map(e=>(0,t.jsx)(A,{suggestion:e,is_pending:I,is_pinned:$.includes(e.sheetName),time_format:b,on_toggle_pin:N.toggle_pinned_sheet_name,on_start:()=>W(()=>(0,y.post_tracker_action)("/api/in",{sheetName:e.sheetName,description:(0,m.build_resume_description)(e.suggestedDescription,e.suggestedTags)}))},`${e.sheetName}-${e.lastLoggedAt}`))})]}),(0,t.jsxs)("section",{className:"flex w-full flex-col gap-3","aria-label":"Today's entries",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Today's entries"}),(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:(0,p.format_entry_count_label)(q.length)??"None"})]}),0===q.length?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"pinned"===U&&0===$.length?"Pin at least one sheet to see today’s activity.":"No time logged today for the selected scope."}):(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:q.map(e=>(0,t.jsx)(M,{entry:e,duration_format:f,time_format:b,show_sheet_name:"all"===U||$.length>1},`${e.sheetName}-${e.id}`))})]})]})]})}],81823)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(44066)._(e.r(78677)),s=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",o=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||s.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(29158);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=i(e,n)),t&&(a.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(31047),a=e.r(63334);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return w},useLinkStatus:function(){return x}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(44066),s=e.r(54710),o=i._(e.r(29158)),l=e.r(42552),u=e.r(61717),c=e.r(37879),d=e.r(31047),h=e.r(20321);e.r(90503);let m=e.r(38520),f=e.r(19947),g=e.r(59246),p=e.r(99046);function w(t){var r,n;let a,i,w,[x,y]=(0,o.useOptimistic)(f.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:_,as:k,children:D,prefetch:j=null,passHref:N,replace:S,shallow:T,scroll:M,onClick:O,onMouseEnter:P,onTouchStart:E,legacyBehavior:C=!1,onNavigate:Y,transitionTypes:W,ref:L,unstable_dynamicOnHover:q,...F}=t;a=D,C&&("string"==typeof a||"number"==typeof a)&&(a=(0,s.jsx)("a",{children:a}));let I=o.default.useContext(u.AppRouterContext),H=!1!==j,R=!1!==j?null===(n=j)||"auto"===n?p.FetchStrategy.PPR:p.FetchStrategy.Full:p.FetchStrategy.PPR,$="string"==typeof(r=k||_)?r:(0,l.formatUrl)(r);if(C){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=o.default.Children.only(a)}let A=C?i&&"object"==typeof i&&i.ref:L,B=o.default.useCallback(e=>(null!==I&&(v.current=(0,f.mountLinkInstance)(e,$,I,R,H,y)),()=>{v.current&&((0,f.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,f.unmountPrefetchableInstance)(e)}),[H,$,I,R,y]),Q={ref:(0,c.useMergedRef)(B,A),onClick(t){C||"function"!=typeof O||O(t),C&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,a,i,s,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);o.default.startTransition(()=>{d(r,a?"replace":"push",!1===i?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,n.current,l)})}}(t,$,v,S,M,Y,W)},onMouseEnter(e){C||"function"!=typeof P||P(e),C&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),I&&H&&(0,f.onNavigationIntent)(e.currentTarget,!0===q)},onTouchStart:function(e){C||"function"!=typeof E||E(e),C&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),I&&H&&(0,f.onNavigationIntent)(e.currentTarget,!0===q)}};return(0,d.isAbsoluteUrl)($)?Q.href=$:C&&!N&&("a"!==i.type||"href"in i.props)||(Q.href=(0,h.addBasePath)($)),w=C?o.default.cloneElement(i,Q):(0,s.jsx)("a",{...F,...Q,children:a}),(0,s.jsx)(b.Provider,{value:x,children:w})}e.r(10364);let b=(0,o.createContext)(f.IDLE_LINK_STATUS),x=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),a=e.i(32417),i=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[s,o]=(0,r.useState)(null),[l,u]=(0,r.useState)(!1),c=(0,a.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!c)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{o(e?.user.email??null)}).catch(()=>{o(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{o(t?.user.email??null)});return()=>{t.unsubscribe()}},[c]),{is_configured:c,email:s,is_pending:l,sign_out:(0,r.useCallback)(async()=>{u(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,i.notify_settings_saved)("Signed out"),e.refresh()}finally{u(!1)}},[e])}}])},45200,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let a=[{href:"/",label:"Tracker",match:e=>"/"===e}];function i(){return(0,t.jsx)("svg",{className:"block h-4 w-4",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,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:a.map(n=>{let a=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":a?"page":void 0,children:n.label},n.href)})})}],45200);var s=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,s.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(i,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},73205,2268,76003,38240,e=>{"use strict";let t=new Set(e.i(22373).topbar_quick_action_ids),r=["today","search","reporting","pomodoro"];e.s(["parse_topbar_quick_actions",0,function(e){try{let n=JSON.parse(e);if(!Array.isArray(n))return r;let a=n.filter(e=>"string"==typeof e&&t.has(e));return Array.from(new Set(a))}catch{return r}}],73205);var n=e.i(34869),a=e.i(92629);let i=(0,n.create_ui_preference_store)({storage_key:a.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:a.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function s(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,i],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return s()}],76003);var o=e.i(17798),l=e.i(46549),u=e.i(10464),c=e.i(35434),d=e.i(61834),h=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===s()?"light":"dark";(0,o.apply_theme)(e),(0,h.write_stored_theme)(e),u.theme_mode_preference.write(e),(0,d.write_document_preference_cookies)({theme_mode:e,theme:e}),u.theme_mode_preference.notify(),(0,c.notify_theme_subscribers)(),(0,l.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),a.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(29158),i=e.i(37399),s=e.i(90463),o=e.i(46549),l=e.i(73205),u=e.i(66295),c=e.i(2268),d=e.i(32792),h=e.i(90299),m=e.i(28274),f=e.i(76003),g=e.i(35434),p=e.i(38240),w=e.i(22373),b=e.i(25204),x=e.i(77882);let y="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 no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},_=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),k=(0,n.usePathname)()??"/",D=(0,a.useSyncExternalStore)(g.subscribe_theme,f.get_theme_snapshot,f.get_theme_server_snapshot),j=(0,a.useSyncExternalStore)(c.cloud_sync_enabled_preference.subscribe,c.cloud_sync_enabled_preference.get_snapshot,c.cloud_sync_enabled_preference.get_server_snapshot),N=(0,a.useSyncExternalStore)(h.tracker_shortcut_map_preference.subscribe,h.tracker_shortcut_map_preference.get_snapshot,h.tracker_shortcut_map_preference.get_server_snapshot),S=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),T=(0,u.parse_tracker_shortcut_map)(N),M=new Set((0,l.parse_topbar_quick_actions)(S)),O=w.topbar_quick_action_ids.filter(e=>!M.has(e)),P=Array.from(new Set([...Array.from(_),...O])),{email:E,is_configured:C,is_pending:Y,sign_out:W}=(0,x.use_supabase_auth_session)(),[L,q]=(0,a.useState)(!1),F=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!L)return;let e=e=>{null===F.current||F.current.contains(e.target)||q(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[L]);let I=()=>{q(!1)};return(0,b.use_escape_to_cancel)(I,L),(0,t.jsxs)("div",{className:"relative shrink-0",ref:F,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":L,"aria-haspopup":"menu",onClick:()=>q(e=>!e),children:(0,t.jsx)(i.HamburgerIcon,{})}),L?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[C&&null!==E?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:E,children:E})}):null,P.map(e=>{let n=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:y,role:"menuitem",onClick:I,children:n.label})},e)}),C?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===j,onClick:()=>{let e="true"===j?"false":"true";c.cloud_sync_enabled_preference.write(e),c.cloud_sync_enabled_preference.notify(),(0,o.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==E&&(0,m.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===j?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===j?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{I(),(0,p.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===D?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===D?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;I(),e=T.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),C?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===E?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{I(),e.push((0,s.build_auth_page_href)("sign_in",k))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:Y,onClick:()=>{I(),W()},children:Y?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let k=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",i=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),s=(0,a.useMemo)(()=>(0,l.parse_topbar_quick_actions)(i),[i]);if(0===s.length)return null;let o=k.filter(e=>s.includes(e.id));return 0===o.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:o.map(n=>{let a=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":a?"page":void 0,children:n.label},n.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",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,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),a=e.i(1976),i=e.i(76080),s=e.i(45958),o=e.i(71060),l=e.i(29539);function u(){let e=((0,o.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(s.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(l.SettingsIcon,{})})}function c({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(s.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(s.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(c,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(i.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(u,{}),(0,t.jsx)(a.TopbarOverflowMenu,{})]})]})]})})}],75404)},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let a=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.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:a.map(n=>{let a=n.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:n.href,"aria-current":a?"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 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},31113,e=>{"use strict";e.s(["normalize_stored_tag",0,function(e){let t=e.trim().replace(/^@+/,"");if(0===t.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(t))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${t}`}])},19946,e=>{"use strict";var t=e.i(29158),r=e.i(72270),n=e.i(4572);e.s(["use_confirm_dialog",0,function(){let e=(0,t.useContext)(r.ConfirmDialogContext);if(null!==e)return e;let a=(0,n.get_registered_confirm_dialog)();if(null!==a)return{confirm:a};throw Error("use_confirm_dialog must be used within ConfirmDialogProvider")}])},25402,8627,e=>{"use strict";let t=Symbol.for("constructDateFrom");e.s(["constructFromSymbol",0,t,"millisecondsInDay",0,864e5,"millisecondsInHour",0,36e5,"millisecondsInMinute",0,6e4,"millisecondsInSecond",0,1e3,"millisecondsInWeek",0,6048e5,"minutesInDay",0,1440,"minutesInMonth",0,43200,"minutesInYear",0,525600],8627),e.s(["constructFrom",0,function(e,r){return"function"==typeof e?e(r):e&&"object"==typeof e&&t in e?e[t](r):e instanceof Date?new e.constructor(r):new Date(r)}],25402)},29263,e=>{"use strict";var t=e.i(25402);e.s(["toDate",0,function(e,r){return(0,t.constructFrom)(r||e,e)}])},36145,e=>{"use strict";let t={};e.s(["getDefaultOptions",0,function(){return t}])},26313,e=>{"use strict";var t;let r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function n(e){return (t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}let a={date:n({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:n({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:n({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{let t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}let o={ordinalNumber:(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:s({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:s({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:s({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function l(e){return(t,r={})=>{let n,a=r.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;let o=s[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}(l,e=>e.test(o)):function(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}(l,e=>e.test(o));return n=e.valueCallback?e.valueCallback(u):u,{value:n=r.valueCallback?r.valueCallback(n):n,rest:t.slice(o.length)}}}let u={ordinalNumber:(t={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,r={})=>{let n=e.match(t.matchPattern);if(!n)return null;let a=n[0],i=e.match(t.parsePattern);if(!i)return null;let s=t.valueCallback?t.valueCallback(i[0]):i[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:e.slice(a.length)}}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.s(["defaultLocale",0,{code:"en-US",formatDistance:(e,t,n)=>{let a,i=r[e];if(a="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix)if(n.comparison&&n.comparison>0)return"in "+a;else return a+" ago";return a},formatLong:a,formatRelative:(e,t,r,n)=>i[e],localize:o,match:u,options:{weekStartsOn:0,firstWeekContainsDate:1}}],26313)},72424,16913,e=>{"use strict";var t=e.i(29263);e.s(["getTimezoneOffsetInMilliseconds",0,function(e){let r=(0,t.toDate)(e),n=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return n.setUTCFullYear(r.getFullYear()),e-n}],72424);var r=e.i(25402);e.s(["normalizeDates",0,function(e,...t){let n=r.constructFrom.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}],16913)},39552,36519,35292,7312,43360,69978,42874,66852,16245,93415,e=>{"use strict";var t=e.i(26313),r=e.i(36145),n=e.i(72424),a=e.i(16913),i=e.i(8627),s=e.i(29263);function o(e,t){let r=(0,s.toDate)(e,t?.in);return r.setHours(0,0,0,0),r}function l(e,t){let r=(0,s.toDate)(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function u(e,t){let n=(0,r.getDefaultOptions)(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=(0,s.toDate)(e,t?.in),o=i.getDay();return i.setDate(i.getDate()-(7*(o<a)+o-a)),i.setHours(0,0,0,0),i}function c(e,t){return u(e,{...t,weekStartsOn:1})}e.s(["startOfDay",0,o],36519),e.s(["startOfYear",0,l],35292),e.s(["startOfWeek",0,u],7312),e.s(["startOfISOWeek",0,c],43360);var d=e.i(25402);function h(e,t){let r=(0,s.toDate)(e,t?.in),n=r.getFullYear(),a=(0,d.constructFrom)(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);let i=c(a),o=(0,d.constructFrom)(r,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);let l=c(o);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function m(e,t){let r,n,a=(0,s.toDate)(e,t?.in);return Math.round((c(a)-(r=h(a,void 0),(n=(0,d.constructFrom)(a,0)).setFullYear(r,0,4),n.setHours(0,0,0,0),c(n)))/i.millisecondsInWeek)+1}function f(e,t){let n=(0,s.toDate)(e,t?.in),a=n.getFullYear(),i=(0,r.getDefaultOptions)(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=(0,d.constructFrom)(t?.in||e,0);l.setFullYear(a+1,0,o),l.setHours(0,0,0,0);let c=u(l,t),h=(0,d.constructFrom)(t?.in||e,0);h.setFullYear(a,0,o),h.setHours(0,0,0,0);let m=u(h,t);return+n>=+c?a+1:+n>=+m?a:a-1}function g(e,t){let n,a,o,l,c=(0,s.toDate)(e,t?.in);return Math.round((u(c,t)-(n=(0,r.getDefaultOptions)(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=f(c,t),(l=(0,d.constructFrom)(t?.in||c,0)).setFullYear(o,0,a),l.setHours(0,0,0,0),u(l,t)))/i.millisecondsInWeek)+1}function p(e,t){let r=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+r}e.s(["getISOWeek",0,m],69978),e.s(["getWeekYear",0,f],42874),e.s(["getWeek",0,g],66852);let w={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return p("yy"===t?n%100:n,t.length)},M(e,t){let r=e.getMonth();return"M"===t?String(r+1):p(r+1,2)},d:(e,t)=>p(e.getDate(),t.length),a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>p(e.getHours()%12||12,t.length),H:(e,t)=>p(e.getHours(),t.length),m:(e,t)=>p(e.getMinutes(),t.length),s:(e,t)=>p(e.getSeconds(),t.length),S(e,t){let r=t.length;return p(Math.trunc(e.getMilliseconds()*Math.pow(10,r-3)),t.length)}},b={G:function(e,t,r){let n=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){let t=e.getFullYear();return r.ordinalNumber(t>0?t:1-t,{unit:"year"})}return w.y(e,t)},Y:function(e,t,r,n){let a=f(e,n),i=a>0?a:1-a;return"YY"===t?p(i%100,2):"Yo"===t?r.ordinalNumber(i,{unit:"year"}):p(i,t.length)},R:function(e,t){return p(h(e),t.length)},u:function(e,t){return p(e.getFullYear(),t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return p(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return p(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return w.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return p(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let a=g(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):p(a,t.length)},I:function(e,t,r){let n=m(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):p(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):w.d(e,t)},D:function(e,t,r){let u,c=function(e,t){let[r,s]=(0,a.normalizeDates)(void 0,e,t),l=o(r),u=o(s);return Math.round((l-(0,n.getTimezoneOffsetInMilliseconds)(l)-(u-(0,n.getTimezoneOffsetInMilliseconds)(u)))/i.millisecondsInDay)}(u=(0,s.toDate)(e,void 0),l(u))+1;return"Do"===t?r.ordinalNumber(c,{unit:"dayOfYear"}):p(c,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return p(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return p(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return p(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n,a=e.getHours();switch(n=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n,a=e.getHours();switch(n=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return w.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):w.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):p(n,t.length)},k:function(e,t,r){let n=e.getHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):p(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):w.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):w.s(e,t)},S:function(e,t){return w.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return y(n);case"XXXX":case"XX":return v(n);default:return v(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return y(n);case"xxxx":case"xx":return v(n);default:return v(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+x(n,":");default:return"GMT"+v(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+x(n,":");default:return"GMT"+v(n,":")}},t:function(e,t,r){return p(Math.trunc(e/1e3),t.length)},T:function(e,t,r){return p(+e,t.length)}};function x(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return 0===i?r+String(a):r+String(a)+t+p(i,2)}function y(e,t){return e%60==0?(e>0?"-":"+")+p(Math.abs(e)/60,2):v(e,t)}function v(e,t=""){let r=Math.abs(e);return(e>0?"-":"+")+p(Math.trunc(r/60),2)+t+p(r%60,2)}let _=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},k=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},D={p:k,P:(e,t)=>{let r,n=e.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return _(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",_(a,t)).replace("{{time}}",k(i,t))}};e.s(["longFormatters",0,D],16245);let j=/^D+$/,N=/^Y+$/,S=["D","DD","YY","YYYY"];function T(e){return j.test(e)}function M(e){return N.test(e)}function O(e,t,r){var n,a,i;let s,o=(n=e,a=t,i=r,s="Y"===n[0]?"years":"days of the month",`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${a}\`) for formatting ${s} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(o),S.includes(e))throw RangeError(o)}e.s(["isProtectedDayOfYearToken",0,T,"isProtectedWeekYearToken",0,M,"warnOrThrowProtectedError",0,O],93415);let P=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,E=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,C=/^'([^]*?)'?$/,Y=/''/g,W=/[a-zA-Z]/;e.s(["format",0,function(e,n,a){let i=(0,r.getDefaultOptions)(),o=a?.locale??i.locale??t.defaultLocale,l=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,u=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,c=(0,s.toDate)(e,a?.in);if(!(c instanceof Date||"object"==typeof c&&"[object Date]"===Object.prototype.toString.call(c))&&"number"!=typeof c||isNaN(+(0,s.toDate)(c)))throw RangeError("Invalid time value");let d=n.match(E).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,D[t])(e,o.formatLong):e}).join("").match(P).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t){var r;let t;return{isToken:!1,value:(t=(r=e).match(C))?t[1].replace(Y,"'"):r}}if(b[t])return{isToken:!0,value:e};if(t.match(W))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(d=o.localize.preprocessor(c,d));let h={firstWeekContainsDate:l,weekStartsOn:u,locale:o};return d.map(t=>{if(!t.isToken)return t.value;let r=t.value;return(!a?.useAdditionalWeekYearTokens&&M(r)||!a?.useAdditionalDayOfYearTokens&&T(r))&&O(r,n,String(e)),(0,b[r[0]])(c,r,o.localize,h)}).join("")}],39552)},47540,e=>{"use strict";var t=e.i(31113);e.s(["tags_are_equal",0,function(e,r){try{return(0,t.normalize_stored_tag)(e)===(0,t.normalize_stored_tag)(r)}catch{return!1}}])},46748,22106,67584,61837,98636,19402,78194,23633,12843,e=>{"use strict";var t=e.i(29263);function r(e,r){let n=(0,t.toDate)(e,r?.in),a=n.getMonth();return n.setFullYear(n.getFullYear(),a+1,0),n.setHours(23,59,59,999),n}e.s(["endOfMonth",0,r],22106);var n=e.i(36145);function a(e,r){let a=(0,n.getDefaultOptions)(),i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,s=(0,t.toDate)(e,r?.in),o=s.getDay();return s.setDate(s.getDate()+((o<i?-7:0)+6-(o-i))),s.setHours(23,59,59,999),s}function i(e,r){let n=(0,t.toDate)(e,r?.in),a=n.getFullYear();return n.setFullYear(a+1,0,0),n.setHours(23,59,59,999),n}e.s(["endOfWeek",0,a],67584);var s=e.i(39552),o=e.i(36519);function l(e,r){let n=(0,t.toDate)(e,r?.in);return n.setDate(1),n.setHours(0,0,0,0),n}e.s(["startOfMonth",0,l],61837);var u=e.i(7312),c=e.i(35292),d=e.i(25402);function h(e,r,n){let a=(0,t.toDate)(e,n?.in);return isNaN(r)?(0,d.constructFrom)(n?.in||e,NaN):(r&&a.setDate(a.getDate()+r),a)}function m(e,t,r){return h(e,-t,r)}function f(e,r,n){let a=(0,t.toDate)(e,n?.in);if(isNaN(r))return(0,d.constructFrom)(n?.in||e,NaN);if(!r)return a;let i=a.getDate(),s=(0,d.constructFrom)(n?.in||e,a.getTime());return(s.setMonth(a.getMonth()+r+1,0),i>=s.getDate())?s:(a.setFullYear(s.getFullYear(),s.getMonth(),i),a)}function g(e,t,r){return f(e,-t,r)}function p(e,t=new Date,n=1){let d=e=>(0,s.format)(e,"yyyy-MM-dd");switch(e){case"yesterday":{let e=m(t,1);return{from_date:d((0,o.startOfDay)(e)),to_date:d((0,o.startOfDay)(e))}}case"week":return{from_date:d((0,u.startOfWeek)(t,{weekStartsOn:n})),to_date:d(a(t,{weekStartsOn:n}))};case"month":return{from_date:d(l(t)),to_date:d(r(t))};case"last_month":{let e=g(t,1);return{from_date:d(l(e)),to_date:d(r(e))}}case"year":return{from_date:d((0,c.startOfYear)(t)),to_date:d(i(t))};case"last_year":{let e=f(t,-12,void 0);return{from_date:d((0,c.startOfYear)(e)),to_date:d(i(e))}}default:{let e=(0,o.startOfDay)(t);return{from_date:d(e),to_date:d(e)}}}}e.s(["addDays",0,h],98636),e.s(["subDays",0,m],19402),e.s(["subMonths",0,g],78194),e.s(["get_reporting_date_range_shortcut_inputs",0,p],46748),e.s(["matches_reporting_date_range_shortcut",0,function(e,t,r=new Date,n=1){if(0===e.from_date.length||0===e.to_date.length)return!1;let a=p(t,r,n);return e.from_date===a.from_date&&e.to_date===a.to_date}],23633);var w=e.i(29158),b=e.i(57853);e.s(["use_week_starts_on",0,function(){return(0,w.useSyncExternalStore)(b.week_starts_on_preference.subscribe,b.week_starts_on_preference.get_snapshot,b.week_starts_on_preference.get_server_snapshot)}],12843)},56812,e=>{"use strict";e.s(["week_starts_on_to_index",0,function(e){return+("sunday"!==e)}])},55437,43864,54873,e=>{"use strict";var t=e.i(54710),r=e.i(52663),n=e.i(52405),a=e.i(46748),i=e.i(23633),s=e.i(12843),o=e.i(56812);let l=[{value:"today",label:"Today"},{value:"yesterday",label:"Yesterday"},{value:"week",label:"This week"},{value:"month",label:"This month"},{value:"last_month",label:"Last month"},{value:"year",label:"This year"},{value:"last_year",label:"Last year"}];e.s(["ReportingDateRangePicker",0,function({range:e,is_invalid:u,on_range_change:c,on_clear:d}){let h=(0,s.use_week_starts_on)(),m=(0,o.week_starts_on_to_index)(h),f=e.from_date.length>0||e.to_date.length>0;return(0,t.jsxs)("fieldset",{className:"m-0 flex w-full max-w-2xl flex-col gap-2 rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,t.jsx)("legend",{className:"mb-2 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Date range"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"Date range shortcuts",children:l.map(n=>{let s=(0,i.matches_reporting_date_range_shortcut)(e,n.value,new Date,m);return(0,t.jsx)("button",{type:"button",className:s?(0,r.get_button_class_name)("primary","small"):(0,r.get_button_class_name)("ghost","small"),"aria-pressed":s,onClick:()=>c((0,a.get_reporting_date_range_shortcut_inputs)(n.value,new Date,m)),children:n.label},n.value)})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-[0.82rem] text-muted",children:["From",(0,t.jsx)("input",{type:"date",className:(0,n.get_input_class_name)("compact"),value:e.from_date,onChange:t=>c({...e,from_date:t.target.value})})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-[0.82rem] text-muted",children:["To",(0,t.jsx)("input",{type:"date",className:(0,n.get_input_class_name)("compact"),value:e.to_date,onChange:t=>c({...e,to_date:t.target.value})})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("button",{type:"button",className:(0,r.get_button_class_name)("ghost","small"),disabled:!f,onClick:d,children:"Clear"}),u?(0,t.jsx)("span",{className:"text-[0.82rem] text-danger",children:"Enter a valid from and to date."}):null]})]})}],55437);var u=e.i(29263);function c(e,t){let r=(0,u.toDate)(e,t?.in);return r.setHours(23,59,59,999),r}e.s(["endOfDay",0,c],43864);var d=e.i(26313),h=e.i(16245),m=e.i(93415),f=e.i(25402),g=e.i(36145);class p{subPriority=0;validate(e,t){return!0}}class w extends p{constructor(e,t,r,n,a){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=n,a&&(this.subPriority=a)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}}class b extends p{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>(0,f.constructFrom)(t,e))}set(e,t){var r,n;let a;if(t.timestampIsSet)return e;return(0,f.constructFrom)(e,((a="function"==typeof(n=r=this.context)&&n.prototype?.constructor===n?new r(0):(0,f.constructFrom)(r,0)).setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),a.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),a))}}class x{run(e,t,r,n){let a=this.parse(e,t,r,n);return a?{setter:new w(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,r){return!0}}var y=e.i(8627);let v=/^(1[0-2]|0?\d)/,_=/^(3[0-1]|[0-2]?\d)/,k=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,D=/^(5[0-3]|[0-4]?\d)/,j=/^(2[0-3]|[0-1]?\d)/,N=/^(2[0-4]|[0-1]?\d)/,S=/^(1[0-1]|0?\d)/,T=/^(1[0-2]|0?\d)/,M=/^[0-5]?\d/,O=/^[0-5]?\d/,P=/^\d/,E=/^\d{1,2}/,C=/^\d{1,3}/,Y=/^\d{1,4}/,W=/^-?\d+/,L=/^-?\d/,q=/^-?\d{1,2}/,F=/^-?\d{1,3}/,I=/^-?\d{1,4}/,H=/^([+-])(\d{2})(\d{2})?|Z/,R=/^([+-])(\d{2})(\d{2})|Z/,$=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,A=/^([+-])(\d{2}):(\d{2})|Z/,B=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Q(e,t){return e?{value:t(e.value),rest:e.rest}:e}function z(e,t){let r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function G(e,t){let r=t.match(e);if(!r)return null;if("Z"===r[0])return{value:0,rest:t.slice(1)};let n="+"===r[1]?1:-1,a=r[2]?parseInt(r[2],10):0,i=r[3]?parseInt(r[3],10):0,s=r[5]?parseInt(r[5],10):0;return{value:n*(a*y.millisecondsInHour+i*y.millisecondsInMinute+s*y.millisecondsInSecond),rest:t.slice(r[0].length)}}function X(e,t){switch(e){case 1:return z(P,t);case 2:return z(E,t);case 3:return z(C,t);case 4:return z(Y,t);default:return z(RegExp("^\\d{1,"+e+"}"),t)}}function U(e,t){switch(e){case 1:return z(L,t);case 2:return z(q,t);case 3:return z(F,t);case 4:return z(I,t);default:return z(RegExp("^-?\\d{1,"+e+"}"),t)}}function K(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function J(e,t){let r,n=t>0,a=n?t:1-t;if(a<=50)r=e||100;else{let t=a+50;r=e+100*Math.trunc(t/100)-100*(e>=t%100)}return n?r:1-r}function V(e){return e%400==0||e%4==0&&e%100!=0}var Z=e.i(42874),ee=e.i(7312),et=e.i(43360),er=e.i(66852),en=e.i(69978);let ea=[31,28,31,30,31,30,31,31,30,31,30,31],ei=[31,29,31,30,31,30,31,31,30,31,30,31];var es=e.i(98636);function eo(e,t,r){let n=(0,g.getDefaultOptions)(),a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=(0,u.toDate)(e,r?.in),s=i.getDay(),o=7-a,l=t<0||t>6?t-(s+o)%7:((t%7+7)%7+o)%7-(s+o)%7;return(0,es.addDays)(i,l,r)}var el=e.i(72424);let eu={G:new class extends x{priority=140;parse(e,t,r){switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,t,r){return t.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends x{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,r){let n=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Q(X(4,e),n);case"yo":return Q(r.ordinalNumber(e,{unit:"year"}),n);default:return Q(X(t.length,e),n)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r){let n=e.getFullYear();if(r.isTwoDigitYear){let t=J(r.year,n);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}let a="era"in t&&1!==t.era?1-r.year:r.year;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}},Y:new class extends x{priority=130;parse(e,t,r){let n=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Q(X(4,e),n);case"Yo":return Q(r.ordinalNumber(e,{unit:"year"}),n);default:return Q(X(t.length,e),n)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,n){let a=(0,Z.getWeekYear)(e,n);if(r.isTwoDigitYear){let t=J(r.year,a);return e.setFullYear(t,0,n.firstWeekContainsDate),e.setHours(0,0,0,0),(0,ee.startOfWeek)(e,n)}let i="era"in t&&1!==t.era?1-r.year:r.year;return e.setFullYear(i,0,n.firstWeekContainsDate),e.setHours(0,0,0,0),(0,ee.startOfWeek)(e,n)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends x{priority=130;parse(e,t){return"R"===t?U(4,e):U(t.length,e)}set(e,t,r){let n=(0,f.constructFrom)(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),(0,et.startOfISOWeek)(n)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends x{priority=130;parse(e,t){return"u"===t?U(4,e):U(t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends x{priority=120;parse(e,t,r){switch(t){case"Q":case"QQ":return X(t.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends x{priority=120;parse(e,t,r){switch(t){case"q":case"qq":return X(t.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends x{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,r){let n=e=>e-1;switch(t){case"M":return Q(z(v,e),n);case"MM":return Q(X(2,e),n);case"Mo":return Q(r.ordinalNumber(e,{unit:"month"}),n);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}},L:new class extends x{priority=110;parse(e,t,r){let n=e=>e-1;switch(t){case"L":return Q(z(v,e),n);case"LL":return Q(X(2,e),n);case"Lo":return Q(r.ordinalNumber(e,{unit:"month"}),n);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends x{priority=100;parse(e,t,r){switch(t){case"w":return z(D,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return X(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,n){let a,i;return(0,ee.startOfWeek)((a=(0,u.toDate)(e,n?.in),i=(0,er.getWeek)(a,n)-r,a.setDate(a.getDate()-7*i),(0,u.toDate)(a,n?.in)),n)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends x{priority=100;parse(e,t,r){switch(t){case"I":return z(D,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return X(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){let n,a;return(0,et.startOfISOWeek)((n=(0,u.toDate)(e,void 0),a=(0,en.getISOWeek)(n,void 0)-r,n.setDate(n.getDate()-7*a),n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends x{priority=90;subPriority=1;parse(e,t,r){switch(t){case"d":return z(_,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return X(t.length,e)}}validate(e,t){let r=V(e.getFullYear()),n=e.getMonth();return r?t>=1&&t<=ei[n]:t>=1&&t<=ea[n]}set(e,t,r){return e.setDate(r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends x{priority=90;subpriority=1;parse(e,t,r){switch(t){case"D":case"DD":return z(k,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return X(t.length,e)}}validate(e,t){return V(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends x{priority=90;parse(e,t,r){switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,n){return(e=eo(e,r,n)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends x{priority=90;parse(e,t,r,n){let a=e=>{let t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Q(X(t.length,e),a);case"eo":return Q(r.ordinalNumber(e,{unit:"day"}),a);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,n){return(e=eo(e,r,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends x{priority=90;parse(e,t,r,n){let a=e=>{let t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Q(X(t.length,e),a);case"co":return Q(r.ordinalNumber(e,{unit:"day"}),a);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,n){return(e=eo(e,r,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends x{priority=90;parse(e,t,r){let n=e=>0===e?7:e;switch(t){case"i":case"ii":return X(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Q(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),n);case"iiiii":return Q(r.day(e,{width:"narrow",context:"formatting"}),n);case"iiiiii":return Q(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),n);default:return Q(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),n)}}validate(e,t){return t>=1&&t<=7}set(e,t,r){var n,a;let i,s,o;return n=e,i=(0,u.toDate)(n,void 0),a=void 0,o=0===(s=(0,u.toDate)(i,a?.in).getDay())?7:s,(e=(0,es.addDays)(i,r-o,void 0)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends x{priority=80;parse(e,t,r){switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(K(r),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends x{priority=80;parse(e,t,r){switch(t){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(K(r),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends x{priority=80;parse(e,t,r){switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(K(r),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends x{priority=70;parse(e,t,r){switch(t){case"h":return z(T,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return X(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,r){let n=e.getHours()>=12;return n&&r<12?e.setHours(r+12,0,0,0):n||12!==r?e.setHours(r,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends x{priority=70;parse(e,t,r){switch(t){case"H":return z(j,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return X(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends x{priority=70;parse(e,t,r){switch(t){case"K":return z(S,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return X(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends x{priority=70;parse(e,t,r){switch(t){case"k":return z(N,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return X(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,r){return e.setHours(r<=24?r%24:r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends x{priority=60;parse(e,t,r){switch(t){case"m":return z(M,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return X(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}incompatibleTokens=["t","T"]},s:new class extends x{priority=50;parse(e,t,r){switch(t){case"s":return z(O,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return X(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}incompatibleTokens=["t","T"]},S:new class extends x{priority=30;parse(e,t){return Q(X(t.length,e),e=>Math.trunc(e*Math.pow(10,-t.length+3)))}set(e,t,r){return e.setMilliseconds(r),e}incompatibleTokens=["t","T"]},X:new class extends x{priority=10;parse(e,t){switch(t){case"X":return G(H,e);case"XX":return G(R,e);case"XXXX":return G($,e);case"XXXXX":return G(B,e);default:return G(A,e)}}set(e,t,r){return t.timestampIsSet?e:(0,f.constructFrom)(e,e.getTime()-(0,el.getTimezoneOffsetInMilliseconds)(e)-r)}incompatibleTokens=["t","T","x"]},x:new class extends x{priority=10;parse(e,t){switch(t){case"x":return G(H,e);case"xx":return G(R,e);case"xxxx":return G($,e);case"xxxxx":return G(B,e);default:return G(A,e)}}set(e,t,r){return t.timestampIsSet?e:(0,f.constructFrom)(e,e.getTime()-(0,el.getTimezoneOffsetInMilliseconds)(e)-r)}incompatibleTokens=["t","T","X"]},t:new class extends x{priority=40;parse(e){return z(W,e)}set(e,t,r){return[(0,f.constructFrom)(e,1e3*r),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends x{priority=20;parse(e){return z(W,e)}set(e,t,r){return[(0,f.constructFrom)(e,r),{timestampIsSet:!0}]}incompatibleTokens="*"}},ec=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ed=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eh=/^'([^]*?)'?$/,em=/''/g,ef=/\S/,eg=/[a-zA-Z]/;function ep(e,t,r,n){let a=()=>(0,f.constructFrom)(n?.in||r,NaN),i=Object.assign({},(0,g.getDefaultOptions)()),s=n?.locale??i.locale??d.defaultLocale,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?a():(0,u.toDate)(r,n?.in);let c={firstWeekContainsDate:o,weekStartsOn:l,locale:s},p=[new b(n?.in,r)],w=t.match(ed).map(e=>{let t=e[0];return t in h.longFormatters?(0,h.longFormatters[t])(e,s.formatLong):e}).join("").match(ec),x=[];for(let r of w){!n?.useAdditionalWeekYearTokens&&(0,m.isProtectedWeekYearToken)(r)&&(0,m.warnOrThrowProtectedError)(r,t,e),!n?.useAdditionalDayOfYearTokens&&(0,m.isProtectedDayOfYearToken)(r)&&(0,m.warnOrThrowProtectedError)(r,t,e);let i=r[0],o=eu[i];if(o){let{incompatibleTokens:t}=o;if(Array.isArray(t)){let e=x.find(e=>t.includes(e.token)||e.token===i);if(e)throw RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${r}\` at the same time`)}else if("*"===o.incompatibleTokens&&x.length>0)throw RangeError(`The format string mustn't contain \`${r}\` and any other token at the same time`);x.push({token:i,fullToken:r});let n=o.run(e,r,s.match,c);if(!n)return a();p.push(n.setter),e=n.rest}else{if(i.match(eg))throw RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===r?r="'":"'"===i&&(r=r.match(eh)[1].replace(em,"'")),0!==e.indexOf(r))return a();e=e.slice(r.length)}}if(e.length>0&&ef.test(e))return a();let y=p.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,r)=>r.indexOf(e)===t).map(e=>p.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),v=(0,u.toDate)(r,n?.in);if(isNaN(+v))return a();let _={};for(let e of y){if(!e.validate(v,c))return a();let t=e.set(v,_,c);Array.isArray(t)?(v=t[0],Object.assign(_,t[1])):v=t}return v}var ew=e.i(36519);e.s(["get_date_range_ms_from_inputs",0,function(e,t){if(0===e.length||0===t.length)return null;let r=ep(e,"yyyy-MM-dd",new Date),n=ep(t,"yyyy-MM-dd",new Date);return Number.isNaN(+r)||Number.isNaN(+n)||+r>+n?null:{startMs:+(0,ew.startOfDay)(r),endMs:+c(n)}}],54873)},90904,65604,e=>{"use strict";var t=e.i(54710),r=e.i(55437),n=e.i(18774),a=e.i(52663),i=e.i(52405),s=e.i(54873);function o(){return{sheetName:"",tag:"",fromDate:"",toDate:""}}e.s(["get_empty_entry_export_filters",0,o],65604),e.s(["EntryFacetFiltersPanel",0,function({filters:e,sheet_names:l,tag_names:u,is_pending:c=!1,clear_label:d="Clear filters",on_change:h,on_clear:m}){let f={from_date:e.fromDate,to_date:e.toDate},g=e.fromDate.length>0!=e.toDate.length>0||e.fromDate.length>0&&e.toDate.length>0&&null===(0,s.get_date_range_ms_from_inputs)(e.fromDate,e.toDate),p=e.sheetName.length>0||e.tag.length>0||e.fromDate.length>0||e.toDate.length>0;return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Sheet"}),(0,t.jsxs)("select",{className:(0,i.get_input_class_name)("compact"),value:e.sheetName,disabled:c,onChange:t=>h({...e,sheetName:t.target.value}),children:[(0,t.jsx)("option",{value:"",children:"All sheets"}),l.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]}),(0,t.jsxs)("label",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Tag"}),(0,t.jsxs)("select",{className:(0,i.get_input_class_name)("compact"),value:e.tag,disabled:c,onChange:t=>h({...e,tag:t.target.value}),children:[(0,t.jsx)("option",{value:"",children:"Any tag"}),u.map(e=>(0,t.jsx)("option",{value:e,children:(0,n.format_display_tag)(e)},e))]})]})]}),(0,t.jsx)(r.ReportingDateRangePicker,{range:f,is_invalid:g,on_range_change:t=>h({...e,fromDate:t.from_date,toDate:t.to_date}),on_clear:()=>h({...e,fromDate:"",toDate:""})}),p?(0,t.jsx)("div",{children:(0,t.jsx)("button",{type:"button",className:(0,a.get_button_class_name)("ghost","small"),disabled:c,onClick:()=>{void 0!==m?m():h(o())},children:d})}):null]})}],90904)},6216,e=>{"use strict";var t=e.i(54710),r=e.i(71060),n=e.i(29158),a=e.i(37193),i=e.i(39474),s=e.i(19946),o=e.i(52663);e.s(["BackupRestoreSetting",0,function({db_path:e}){let l=(0,r.useRouter)(),{confirm:u}=(0,s.use_confirm_dialog)(),c=(0,n.useRef)(null),[d,h]=(0,n.useState)(null),[m,f]=(0,n.useState)(null),[g,p]=(0,n.useState)(!1),[w,b]=(0,n.useState)(!1),x=async()=>{p(!0),h(null),f(null);try{let e=await fetch("/api/backup");if(!e.ok){let t=await e.json();throw Error(t.error??"Download failed")}let t=await e.blob(),r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download="db.json",n.click(),URL.revokeObjectURL(r),f("Backup downloaded.")}catch(e){h((0,a.message_from_unknown_error)(e,"Backup download failed"))}finally{p(!1)}},y=async e=>{let t=e.target.files?.[0];if((e.target.value="",void 0!==t)&&await u({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"})){b(!0),h(null),f(null);try{let e,r=await t.text();try{e=JSON.parse(r)}catch{throw Error("Invalid backup file: file is not valid JSON.")}let n=await fetch("/api/backup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok){let e=await n.json();throw Error(e.error??"Restore failed")}f("Backup restored. Opening tracker…"),(0,i.push_tracker_db_cloud_after_change)(),l.push("/"),l.refresh()}catch(e){h((0,a.message_from_unknown_error)(e,"Restore failed"))}finally{b(!1)}}},v=g||w;return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Backup and restore"}),(0,t.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,t.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-mono text-[0.65rem] leading-snug text-muted",title:e,children:e}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost","small"),disabled:v,onClick:()=>void x(),children:g?"Downloading…":"Download backup"}),(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("danger","small"),disabled:v,onClick:()=>{c.current?.click()},children:w?"Restoring…":"Restore from file"}),(0,t.jsx)("input",{ref:c,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>void y(e)})]}),null===m?null:(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:m}),null===d?null:(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:d})]})}],6216)},66764,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(90904);function a(e){let t=e.replaceAll('"','""');return`"${t}"`}function i(e){return e.sheetName.trim().length>0||e.tag.trim().length>0||e.fromDate.trim().length>0||e.toDate.trim().length>0}function s(e){return e.replaceAll("|","\\|").replaceAll("\n"," ")}function o(e){let t=e.trim().toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,"");return t.length>0?t:"scope"}function l(e){return e.sheets.reduce((e,t)=>e+t.entries.length,0)}var u=e.i(54873),c=e.i(47540),d=e.i(52663),h=e.i(65604),m=e.i(37193);e.s(["DbExportSetting",0,function({db:e,sheet_names:f,tag_names:g}){let[p,w]=(0,r.useState)(()=>(0,h.get_empty_entry_export_filters)()),[b,x]=(0,r.useState)(null),[y,v]=(0,r.useState)(null),_=(0,r.useMemo)(()=>l(e),[e]),k=(0,r.useMemo)(()=>(function(e,t,r=Date.now()){var n;let a,i=function(e){let{sheets:t,version:r,activeSheetName:n}=e;return{version:r,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:a,notes:i})=>({id:e,description:n,tags:a,notes:i.map(({timestamp:e,text:t})=>({text:t,timestamp:new Date(e)})),start:new Date(t),end:null===r?null:new Date(r)}))}))}}(e),s={query:"",...t},o=t.sheetName.trim(),l=i.sheets.filter(e=>!(o.length>0)||e.name===o).map(e=>({...e,entries:e.entries.filter(t=>(function(e,t,r,n=Date.now()){let a=r.sheetName.trim();if(a.length>0&&t!==a)return!1;let i=r.tag.trim();if(i.length>0&&!e.tags.some(e=>(0,c.tags_are_equal)(e,i)))return!1;let s=(0,u.get_date_range_ms_from_inputs)(r.fromDate.trim(),r.toDate.trim());return null===s||function(e,t,r=Date.now()){let n=e.start.getTime(),a=null===e.end?r:e.end.getTime();return n<=t.endMs&&a>=t.startMs}(e,s,n)})(t,e.name,s,r))})).filter(e=>o.length>0||e.entries.length>0),d=null!==i.activeSheetName&&l.some(e=>e.name===i.activeSheetName)?i.activeSheetName:l[0]?.name??null;return a=(n={version:i.version,activeSheetName:d,sheets:l}).sheets.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entries:e.entries.map(e=>({id:e.id,description:e.description,tags:e.tags,start:e.start.getTime(),end:null===e.end?null:e.end.getTime(),notes:e.notes.map(e=>({text:e.text,timestamp:e.timestamp.getTime()}))}))})),{version:n.version,activeSheetName:n.activeSheetName,sheets:a}})(e,p),[e,p]),D=(0,r.useMemo)(()=>l(k),[k]),j=(0,r.useMemo)(()=>p.fromDate.length>0!=p.toDate.length>0||p.fromDate.length>0&&p.toDate.length>0&&null===(0,u.get_date_range_ms_from_inputs)(p.fromDate,p.toDate),[p.fromDate,p.toDate]),N=e=>{if(v(null),x(null),j)return void v("Choose a valid from and to date, or clear the date filter.");if(0===D)return void v("No entries match the current export filters.");try{let t,r,n,l,u,c=function(e,t,r){if("json"===e)return JSON.stringify(t,null,2);if("csv"===e){let e;return e=t.sheets.flatMap(e=>e.entries.map(t=>{let r=new Date(t.start).toISOString(),n=null===t.end?"":new Date(t.end).toISOString(),i=null===t.end?"":String(Math.max(0,t.end-t.start)/6e4),s=t.notes.map(e=>e.text).join(" | ");return[e.name,String(t.id),t.description,t.tags.join(" "),r,n,i,String(t.notes.length),s].map(a).join(",")})),["sheet_name,entry_id,description,tags,start_iso,end_iso,duration_minutes,note_count,notes",...e].join("\n")}return function(e,t={sheetName:"",tag:"",fromDate:"",toDate:""}){var r;let n,a=[],o=new Date().toISOString(),l=e.sheets.reduce((e,t)=>e+t.entries.length,0);for(let u of(a.push("# super-time-tracker export"),a.push(""),a.push(`- Exported at: ${o}`),a.push(`- Active sheet: ${e.activeSheetName??"none"}`),a.push(`- Sheets: ${e.sheets.length}`),a.push(`- Entries: ${l}`),i(t)&&a.push(`- Scope: ${(r=t,n=[],r.sheetName.trim().length>0&&n.push(`sheet "${r.sheetName.trim()}"`),r.tag.trim().length>0&&n.push(`tag @${r.tag.trim()}`),(r.fromDate.trim().length>0||r.toDate.trim().length>0)&&n.push(`dates ${r.fromDate.trim()||"…"} – ${r.toDate.trim()||"…"}`),n.join(", "))}`),a.push(""),e.sheets)){if(a.push(`## ${u.name}`),a.push(""),a.push(`- Active entry ID: ${u.activeEntryID??"none"}`),a.push(`- Entries: ${u.entries.length}`),a.push(""),0===u.entries.length){a.push("_No entries_"),a.push("");continue}for(let e of(a.push("| ID | Description | Tags | Start | End | Duration | Notes |"),a.push("| --- | --- | --- | --- | --- | --- | --- |"),u.entries)){let t=new Date(e.start).toISOString(),r=null===e.end?"running":new Date(e.end).toISOString(),n=null===e.end?"running":`${Math.max(0,e.end-e.start)/6e4} min`,i=0===e.tags.length?"-":e.tags.map(e=>`@${e}`).join(" "),o=0===e.notes.length?"-":e.notes.map(e=>e.text).join(" / ");a.push(`| ${e.id} | ${s(e.description)} | ${s(i)} | ${t} | ${r} | ${n} | ${s(o)} |`)}a.push("")}return a.join("\n")}(t,r)}(e,k,p),d=(t="json"===e?"json":"csv"===e?"csv":"md",r=function(e){if(!i(e))return"";let t=[];if(e.sheetName.trim().length>0&&t.push(o(e.sheetName)),e.tag.trim().length>0&&t.push(`tag-${o(e.tag)}`),e.fromDate.trim().length>0||e.toDate.trim().length>0){let r=e.fromDate.trim()||"start",n=e.toDate.trim()||"end";t.push(`${r}-to-${n}`)}return t.join("-").slice(0,80)}(p),0===r.length?`super-time-tracker-export.${t}`:`super-time-tracker-export-${r}.${t}`);n=new Blob([c],{type:"json"===e?"application/json":"csv"===e?"text/csv;charset=utf-8":"text/markdown;charset=utf-8"}),l=URL.createObjectURL(n),(u=document.createElement("a")).href=l,u.download=d,u.click(),URL.revokeObjectURL(l),x(`Downloaded ${d}`)}catch(e){v((0,m.message_from_unknown_error)(e,"Export failed"))}},S=i(p)?`${D} of ${_} entries in scope`:`${_} entries ready to export`;return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Database export"}),(0,t.jsxs)("p",{className:"m-0 text-[0.8rem] leading-snug text-muted",children:[e.sheets.length," sheets · ",S]})]}),(0,t.jsx)(n.EntryFacetFiltersPanel,{filters:p,sheet_names:f,tag_names:g,on_change:w}),j?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:"Choose both from and to dates, or clear the date filter."}):null,(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("ghost","small"),disabled:j||0===D,onClick:()=>N("json"),children:"Export JSON"}),(0,t.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("ghost","small"),disabled:j||0===D,onClick:()=>N("csv"),children:"Export CSV"}),(0,t.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("ghost","small"),disabled:j||0===D,onClick:()=>N("markdown"),children:"Export Markdown"})]}),null===b?null:(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:b}),null===y?null:(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:y})]})}],66764)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(44066)._(e.r(78677)),s=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||s.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(29158);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(31047),a=e.r(63334);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return y}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(44066),s=e.r(54710),i=o._(e.r(29158)),l=e.r(42552),u=e.r(61717),c=e.r(37879),d=e.r(31047),f=e.r(20321);e.r(90503);let _=e.r(38520),h=e.r(19947),p=e.r(59246),m=e.r(99046);function g(t){var r,n;let a,o,g,[y,x]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,i.useRef)(null),{href:w,as:k,children:S,prefetch:j=null,passHref:E,replace:O,shallow:N,scroll:T,onClick:A,onMouseEnter:C,onTouchStart:L,legacyBehavior:R=!1,onNavigate:U,transitionTypes:P,ref:I,unstable_dynamicOnHover:D,...M}=t;a=S,R&&("string"==typeof a||"number"==typeof a)&&(a=(0,s.jsx)("a",{children:a}));let F=i.default.useContext(u.AppRouterContext),G=!1!==j,$=!1!==j?null===(n=j)||"auto"===n?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=k||w)?r:(0,l.formatUrl)(r);if(R){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=i.default.Children.only(a)}let q=R?o&&"object"==typeof o&&o.ref:I,Y=i.default.useCallback(e=>(null!==F&&(v.current=(0,h.mountLinkInstance)(e,K,F,$,G,x)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[G,K,F,$,x]),B={ref:(0,c.useMergedRef)(Y,q),onClick(t){R||"function"!=typeof A||A(t),R&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!F||t.defaultPrevented||function(t,r,n,a,o,s,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);i.default.startTransition(()=>{d(r,a?"replace":"push",!1===o?_.ScrollBehavior.NoScroll:_.ScrollBehavior.Default,n.current,l)})}}(t,K,v,O,T,U,P)},onMouseEnter(e){R||"function"!=typeof C||C(e),R&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),F&&G&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){R||"function"!=typeof L||L(e),R&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),F&&G&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(K)?B.href=K:R&&!E&&("a"!==o.type||"href"in o.props)||(B.href=(0,f.addBasePath)(K)),g=R?i.default.cloneElement(o,B):(0,s.jsx)("a",{...M,...B,children:a}),(0,s.jsx)(b.Provider,{value:y,children:g})}e.r(10364);let b=(0,i.createContext)(h.IDLE_LINK_STATUS),y=()=>(0,i.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",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,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),a.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),a=e.i(32417),o=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[s,i]=(0,r.useState)(null),[l,u]=(0,r.useState)(!1),c=(0,a.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!c)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{i(e?.user.email??null)}).catch(()=>{i(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{i(t?.user.email??null)});return()=>{t.unsubscribe()}},[c]),{is_configured:c,email:s,is_pending:l,sign_out:(0,r.useCallback)(async()=>{u(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,o.notify_settings_saved)("Signed out"),e.refresh()}finally{u(!1)}},[e])}}])},45200,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let a=[{href:"/",label:"Tracker",match:e=>"/"===e}];function o(){return(0,t.jsx)("svg",{className:"block h-4 w-4",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,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:a.map(n=>{let a=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":a?"page":void 0,children:n.label},n.href)})})}],45200);var s=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,s.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(o,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},73205,2268,76003,38240,e=>{"use strict";let t=new Set(e.i(22373).topbar_quick_action_ids),r=["today","search","reporting","pomodoro"];e.s(["parse_topbar_quick_actions",0,function(e){try{let n=JSON.parse(e);if(!Array.isArray(n))return r;let a=n.filter(e=>"string"==typeof e&&t.has(e));return Array.from(new Set(a))}catch{return r}}],73205);var n=e.i(34869),a=e.i(92629);let o=(0,n.create_ui_preference_store)({storage_key:a.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:a.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function s(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,o],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return s()}],76003);var i=e.i(17798),l=e.i(46549),u=e.i(10464),c=e.i(35434),d=e.i(61834),f=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===s()?"light":"dark";(0,i.apply_theme)(e),(0,f.write_stored_theme)(e),u.theme_mode_preference.write(e),(0,d.write_document_preference_cookies)({theme_mode:e,theme:e}),u.theme_mode_preference.notify(),(0,c.notify_theme_subscribers)(),(0,l.notify_settings_saved)()}],38240)},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(29158),o=e.i(37399),s=e.i(90463),i=e.i(46549),l=e.i(73205),u=e.i(66295),c=e.i(2268),d=e.i(32792),f=e.i(90299),_=e.i(28274),h=e.i(76003),p=e.i(35434),m=e.i(38240),g=e.i(22373),b=e.i(25204),y=e.i(77882);let x="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 no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},w=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),k=(0,n.usePathname)()??"/",S=(0,a.useSyncExternalStore)(p.subscribe_theme,h.get_theme_snapshot,h.get_theme_server_snapshot),j=(0,a.useSyncExternalStore)(c.cloud_sync_enabled_preference.subscribe,c.cloud_sync_enabled_preference.get_snapshot,c.cloud_sync_enabled_preference.get_server_snapshot),E=(0,a.useSyncExternalStore)(f.tracker_shortcut_map_preference.subscribe,f.tracker_shortcut_map_preference.get_snapshot,f.tracker_shortcut_map_preference.get_server_snapshot),O=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),N=(0,u.parse_tracker_shortcut_map)(E),T=new Set((0,l.parse_topbar_quick_actions)(O)),A=g.topbar_quick_action_ids.filter(e=>!T.has(e)),C=Array.from(new Set([...Array.from(w),...A])),{email:L,is_configured:R,is_pending:U,sign_out:P}=(0,y.use_supabase_auth_session)(),[I,D]=(0,a.useState)(!1),M=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!I)return;let e=e=>{null===M.current||M.current.contains(e.target)||D(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[I]);let F=()=>{D(!1)};return(0,b.use_escape_to_cancel)(F,I),(0,t.jsxs)("div",{className:"relative shrink-0",ref:M,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":I,"aria-haspopup":"menu",onClick:()=>D(e=>!e),children:(0,t.jsx)(o.HamburgerIcon,{})}),I?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[R&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,C.map(e=>{let n=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:x,role:"menuitem",onClick:F,children:n.label})},e)}),R?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitemcheckbox","aria-checked":"true"===j,onClick:()=>{let e="true"===j?"false":"true";c.cloud_sync_enabled_preference.write(e),c.cloud_sync_enabled_preference.notify(),(0,i.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,_.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===j?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===j?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitem",onClick:()=>{F(),(0,m.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===S?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===S?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitem",onClick:()=>{let e;F(),e=N.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),R?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitem",onClick:()=>{F(),e.push((0,s.build_auth_page_href)("sign_in",k))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${x} text-danger`,role:"menuitem",disabled:U,onClick:()=>{F(),P()},children:U?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let k=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",o=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),s=(0,a.useMemo)(()=>(0,l.parse_topbar_quick_actions)(o),[o]);if(0===s.length)return null;let i=k.filter(e=>s.includes(e.id));return 0===i.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:i.map(n=>{let a=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":a?"page":void 0,children:n.label},n.id)})})}],76080)},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),a=e.i(1976),o=e.i(76080),s=e.i(45958),i=e.i(71060),l=e.i(29539);function u(){let e=((0,i.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(s.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(l.SettingsIcon,{})})}function c({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(s.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(s.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(c,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(o.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(u,{}),(0,t.jsx)(a.TopbarOverflowMenu,{})]})]})]})})}],75404)},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},31113,e=>{"use strict";e.s(["normalize_stored_tag",0,function(e){let t=e.trim().replace(/^@+/,"");if(0===t.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(t))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${t}`}])},14260,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(18774),a=e.i(52405),o=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:s,known_tags:i,placeholder:l,disabled:u=!1,autoFocus:c=!1,on_change:d}){let f=(0,r.useRef)(null),_=(0,r.useRef)(null),h=(0,r.useRef)(null),[p,m]=(0,r.useState)(0),[g,b]=(0,r.useState)(0),y=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("@");if(-1===n)return null;let a=r.slice(n+1);return/\s/.test(a)?null:{query:a,start_index:n,end_index:t}}(s,p),x=null===y?[]:function(e,t,r=10){let n=t.toLowerCase();return e.filter(e=>{let t=e.replace(/^@/,"").toLowerCase();return 0===n.length||t.startsWith(n)}).slice(0,r)}(i,y.query),v=null!==y&&function(e,t){if(!/^\w+$/.test(e))return!1;let r=e.toLowerCase();return t.some(e=>{try{return(0,o.normalize_stored_tag)(e).slice(1).toLowerCase()===r}catch{return!1}})}(y.query,i),w=null!==y&&x.length>0&&!v&&!u;(0,r.useLayoutEffect)(()=>{null!==h.current&&null!==f.current&&(f.current.setSelectionRange(h.current,h.current),m(h.current),h.current=null)},[s]),(0,r.useEffect)(()=>{b(0)},[s,p,x.length]);let k=()=>{m(f.current?.selectionStart??s.length)},S=()=>{b(0)},j=e=>{let t,r,a;if(null===y)return;let{next_text:o,next_cursor:i}=(t=(0,n.format_display_tag)(e),r=s.slice(0,y.start_index),a=s.slice(y.end_index),{next_text:`${r}${t}${a}`,next_cursor:r.length+t.length});h.current=i,d(o),S()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:f,id:e,type:"text",role:"combobox",className:(0,a.get_input_class_name)(),value:s,placeholder:l,disabled:u,autoFocus:c,autoComplete:"off","aria-autocomplete":"list","aria-expanded":w,"aria-controls":w?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),m(e.target.selectionStart??e.target.value.length)},onClick:k,onKeyUp:k,onKeyDown:e=>{if(w){if("ArrowDown"===e.key){e.preventDefault(),b(e=>(e+1)%x.length);return}if("ArrowUp"===e.key){e.preventDefault(),b(e=>(e-1+x.length)%x.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=x[g];void 0!==t&&j(t);return}"Escape"===e.key&&(e.preventDefault(),S())}},onBlur:()=>{window.setTimeout(S,120)}}),w?(0,t.jsx)("ul",{ref:_,id:`${e}-tag-suggestions`,role:"listbox",className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-48 list-none overflow-y-auto rounded-md border border-panel-border bg-panel p-1.5 shadow-md",children:x.map((e,r)=>(0,t.jsx)("li",{role:"option","aria-selected":r===g,children:(0,t.jsx)("button",{type:"button",className:`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 ${r===g?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),j(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},47540,e=>{"use strict";var t=e.i(31113);e.s(["tags_are_equal",0,function(e,r){try{return(0,t.normalize_stored_tag)(e)===(0,t.normalize_stored_tag)(r)}catch{return!1}}])},85323,e=>{"use strict";var t=e.i(49087);e.s(["notify_desktop",0,function(e){if((0,t.notify_in_app)({title:e.title,body:e.body}),"u"<typeof Notification||"u">typeof document&&"visible"===document.visibilityState&&document.hasFocus()||"granted"!==Notification.permission)return;let{body:r,tag:n,title:a}=e,o={body:r,...void 0!==n?{tag:n}:{}};try{new Notification(a,o)}catch{}},"supports_desktop_notifications",0,function(){return"u">typeof Notification}])},48541,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DESKTOP_NOTIFICATIONS_STORAGE_KEY,default_value:r.DESKTOP_NOTIFICATIONS_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["desktop_notifications_preference",0,n])},1238,51703,74597,77130,56442,73228,e=>{"use strict";e.s(["parse_focus_goals_by_name",0,function(e){if(0===e.length)return{};try{let t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))return{};let r={};for(let[e,n]of Object.entries(t)){if(null===n||"object"!=typeof n)continue;let t={};"string"==typeof n.daily&&n.daily.length>0&&(t.daily=n.daily),"string"==typeof n.weekly&&n.weekly.length>0&&(t.weekly=n.weekly),(void 0!==t.daily||void 0!==t.weekly)&&(r[e]=t)}return r}catch{return{}}}],1238);var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SCOPE_STORAGE_KEY,default_value:r.FOCUS_GOAL_SCOPE_DEFAULT,is_valid:e=>"global"===e||"sheet"===e||"tag"===e});e.s(["focus_goal_scope_preference",0,n],51703);let a=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SHEET_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_SHEET_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_sheet_name_preference",0,a],74597);let o=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_TAG_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_TAG_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_tag_name_preference",0,o],77130);let s=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_SHEET_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_SHEET_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_sheet_preference",0,s],56442);let i=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_TAG_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_TAG_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_tag_preference",0,i],73228)},19946,e=>{"use strict";var t=e.i(29158),r=e.i(72270),n=e.i(4572);e.s(["use_confirm_dialog",0,function(){let e=(0,t.useContext)(r.ConfirmDialogContext);if(null!==e)return e;let a=(0,n.get_registered_confirm_dialog)();if(null!==a)return{confirm:a};throw Error("use_confirm_dialog must be used within ConfirmDialogProvider")}])},75899,e=>{"use strict";var t=e.i(39552);e.s(["format_time",0,function(e,r="12h"){return(0,t.format)(new Date(e),"24h"===r?"HH:mm":"h:mm a")}])},35923,e=>{"use strict";var t=e.i(29158),r=e.i(97891);e.s(["use_time_format",0,function(){return(0,t.useSyncExternalStore)(r.time_format_preference.subscribe,r.time_format_preference.get_snapshot,r.time_format_preference.get_server_snapshot)}])},60529,e=>{"use strict";e.s(["format_entry_count_label",0,function(e){return 0===e?null:1===e?"1 entry":`${e} entries`}])},15526,e=>{"use strict";let t="super-time-tracker-pomodoro-active-entry";e.s(["clear_pomodoro_task_entry_marker",0,function(){try{window.localStorage.removeItem(t)}catch{}},"is_pomodoro_task_entry",0,function(e){let r=(()=>{try{let e=window.localStorage.getItem(t);if(null===e)return null;try{let t=JSON.parse(e);if("string"==typeof t.sheetName&&t.sheetName.length>0&&"number"==typeof t.entryId&&Number.isInteger(t.entryId))return{sheetName:t.sheetName,entryId:t.entryId}}catch{}return null}catch{return null}})();return null!==r&&r.sheetName===e.sheetName&&r.entryId===e.id},"mark_pomodoro_task_entry",0,function(e){try{let r={sheetName:e.sheetName,entryId:e.id};window.localStorage.setItem(t,JSON.stringify(r))}catch{}}])},83821,60145,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=30&&t<=720}});e.s(["daily_focus_target_minutes_preference",0,n],83821);let a=(0,t.create_ui_preference_store)({storage_key:r.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=60&&t<=4200}});e.s(["weekly_focus_target_minutes_preference",0,a],60145)},53754,7554,76379,e=>{"use strict";var t=e.i(29158),r=e.i(19946);function n(e){let t=e?.at?.trim()??"",r=e?.note?.trim()??"",n=t.length>0,a=r.length>0,o="Stop the active timer and save this entry?";return n&&a?o=`Stop the timer at "${t}" and save a checkout note?`:n?o=`Stop the timer and check out at "${t}"?`:a&&(o="Stop the timer and save this entry with your checkout note?"),{title:"Check out?",message:o,confirmLabel:"Check out",variant:"danger"}}e.s(["get_check_out_confirm_dialog",0,n],7554);var a=e.i(97026);function o(){return"true"===(0,t.useSyncExternalStore)(a.confirm_before_checkout_preference.subscribe,a.confirm_before_checkout_preference.get_snapshot,a.confirm_before_checkout_preference.get_server_snapshot)}e.s(["use_confirm_before_checkout",0,o],76379),e.s(["useCheckOutAction",0,function(e){let{confirm:a}=(0,r.use_confirm_dialog)(),s=o();return(0,t.useCallback)(async t=>(!s||!!await a(n(t)))&&(e(t),!0),[a,s,e])}],53754)},50459,e=>{"use strict";e.s(["prompt_check_out_at",0,function(){let e=window.prompt("Check out at what time?","30 minutes ago");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}])},36178,68713,e=>{"use strict";e.s(["build_check_out_request_payload",0,function(e,t){let r={sheetName:e},n=t?.at?.trim(),a=t?.note?.trim();return void 0!==n&&n.length>0&&(r.at=n),void 0!==a&&a.length>0&&(r.note=a),r}],36178);var t=e.i(26740),r=e.i(15526);e.s(["finish_running_pomodoro_timer",0,function(){try{let e=window.localStorage.getItem(t.POMODORO_STORAGE_KEY);if(null===e)return;let n=JSON.parse(e),a=n.state;if(a?.status!=="running")return;let o={settings:n.settings??t.POMODORO_DEFAULT_SETTINGS,state:t.POMODORO_DEFAULT_STATE};window.localStorage.setItem(t.POMODORO_STORAGE_KEY,JSON.stringify(o)),(0,r.clear_pomodoro_task_entry_marker)()}catch{}}],68713)}]);
|