super-time-tracker-ui 0.1.44 → 0.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/dist/standalone/next-output/BUILD_ID +1 -1
  2. package/dist/standalone/next-output/app-path-routes-manifest.json +2 -0
  3. package/dist/standalone/next-output/build-manifest.json +3 -3
  4. package/dist/standalone/next-output/routes-manifest.json +12 -0
  5. package/dist/standalone/next-output/server/app/_global-error.html +1 -1
  6. package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
  7. package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
  10. package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
  11. package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/dist/standalone/next-output/server/app/_not-found/page/react-loadable-manifest.json +1 -1
  13. package/dist/standalone/next-output/server/app/_not-found/page.js.nft.json +1 -1
  14. package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/dist/standalone/next-output/server/app/api/command-palette/route.js +1 -1
  16. package/dist/standalone/next-output/server/app/api/command-palette/route.js.nft.json +1 -1
  17. package/dist/standalone/next-output/server/app/api/entries/search/route.js +1 -1
  18. package/dist/standalone/next-output/server/app/api/entries/search/route.js.nft.json +1 -1
  19. package/dist/standalone/next-output/server/app/api/entry/completed/route.js +1 -1
  20. package/dist/standalone/next-output/server/app/api/entry/completed/route.js.nft.json +1 -1
  21. package/dist/standalone/next-output/server/app/api/entry/delete-bulk/route.js +1 -1
  22. package/dist/standalone/next-output/server/app/api/entry/delete-bulk/route.js.nft.json +1 -1
  23. package/dist/standalone/next-output/server/app/api/entry/merge/route.js +1 -1
  24. package/dist/standalone/next-output/server/app/api/entry/merge/route.js.nft.json +1 -1
  25. package/dist/standalone/next-output/server/app/api/entry/move/route.js +1 -1
  26. package/dist/standalone/next-output/server/app/api/entry/move/route.js.nft.json +1 -1
  27. package/dist/standalone/next-output/server/app/api/entry/move-bulk/route.js +1 -1
  28. package/dist/standalone/next-output/server/app/api/entry/move-bulk/route.js.nft.json +1 -1
  29. package/dist/standalone/next-output/server/app/api/entry/route.js +1 -1
  30. package/dist/standalone/next-output/server/app/api/entry/route.js.nft.json +1 -1
  31. package/dist/standalone/next-output/server/app/api/entry/split/route.js +1 -1
  32. package/dist/standalone/next-output/server/app/api/entry/split/route.js.nft.json +1 -1
  33. package/dist/standalone/next-output/server/app/api/in/route.js +1 -1
  34. package/dist/standalone/next-output/server/app/api/in/route.js.nft.json +1 -1
  35. package/dist/standalone/next-output/server/app/api/note/delete/route.js +1 -1
  36. package/dist/standalone/next-output/server/app/api/note/delete/route.js.nft.json +1 -1
  37. package/dist/standalone/next-output/server/app/api/note/route.js +1 -1
  38. package/dist/standalone/next-output/server/app/api/note/route.js.nft.json +1 -1
  39. package/dist/standalone/next-output/server/app/api/out/route.js +1 -1
  40. package/dist/standalone/next-output/server/app/api/out/route.js.nft.json +1 -1
  41. package/dist/standalone/next-output/server/app/api/sheet/route.js +1 -1
  42. package/dist/standalone/next-output/server/app/api/sheet/route.js.nft.json +1 -1
  43. package/dist/standalone/next-output/server/app/api/state/route.js +1 -1
  44. package/dist/standalone/next-output/server/app/api/state/route.js.nft.json +1 -1
  45. package/dist/standalone/next-output/server/app/api/task/route/app-paths-manifest.json +3 -0
  46. package/dist/standalone/next-output/server/app/api/task/route/build-manifest.json +9 -0
  47. package/dist/standalone/next-output/server/app/api/task/route/server-reference-manifest.json +4 -0
  48. package/dist/standalone/next-output/server/app/api/task/route.js +6 -0
  49. package/dist/standalone/next-output/server/app/api/task/route.js.nft.json +1 -0
  50. package/dist/standalone/next-output/server/app/api/task/route_client-reference-manifest.js +3 -0
  51. package/dist/standalone/next-output/server/app/login/page/react-loadable-manifest.json +1 -1
  52. package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
  53. package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
  54. package/dist/standalone/next-output/server/app/offline/page/react-loadable-manifest.json +1 -1
  55. package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
  56. package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
  57. package/dist/standalone/next-output/server/app/page/react-loadable-manifest.json +2 -2
  58. package/dist/standalone/next-output/server/app/page.js +3 -2
  59. package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
  60. package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
  61. package/dist/standalone/next-output/server/app/pomodoro/page/react-loadable-manifest.json +1 -1
  62. package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
  63. package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
  64. package/dist/standalone/next-output/server/app/register/page/react-loadable-manifest.json +1 -1
  65. package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
  66. package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
  67. package/dist/standalone/next-output/server/app/reporting/page/react-loadable-manifest.json +1 -1
  68. package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
  69. package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
  70. package/dist/standalone/next-output/server/app/review/page/react-loadable-manifest.json +1 -1
  71. package/dist/standalone/next-output/server/app/review/page.js +1 -1
  72. package/dist/standalone/next-output/server/app/review/page.js.nft.json +1 -1
  73. package/dist/standalone/next-output/server/app/review/page_client-reference-manifest.js +1 -1
  74. package/dist/standalone/next-output/server/app/search/page/react-loadable-manifest.json +1 -1
  75. package/dist/standalone/next-output/server/app/search/page.js +1 -1
  76. package/dist/standalone/next-output/server/app/search/page.js.nft.json +1 -1
  77. package/dist/standalone/next-output/server/app/search/page_client-reference-manifest.js +1 -1
  78. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/react-loadable-manifest.json +1 -1
  79. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
  80. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
  81. package/dist/standalone/next-output/server/app/settings/cloud-sync/page/react-loadable-manifest.json +1 -1
  82. package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
  83. package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
  84. package/dist/standalone/next-output/server/app/settings/data/page/react-loadable-manifest.json +1 -1
  85. package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
  86. package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
  87. package/dist/standalone/next-output/server/app/settings/display/page/react-loadable-manifest.json +1 -1
  88. package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
  89. package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
  90. package/dist/standalone/next-output/server/app/settings/goals/page/react-loadable-manifest.json +1 -1
  91. package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
  92. package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
  93. package/dist/standalone/next-output/server/app/settings/notifications/page/react-loadable-manifest.json +1 -1
  94. package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
  95. package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
  96. package/dist/standalone/next-output/server/app/settings/page/react-loadable-manifest.json +1 -1
  97. package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
  98. package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
  99. package/dist/standalone/next-output/server/app/settings/pomodoro/page/react-loadable-manifest.json +1 -1
  100. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
  101. package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
  102. package/dist/standalone/next-output/server/app/settings/quick-actions/page/react-loadable-manifest.json +1 -1
  103. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -1
  104. package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +1 -1
  105. package/dist/standalone/next-output/server/app/settings/tags/page/react-loadable-manifest.json +1 -1
  106. package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
  107. package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
  108. package/dist/standalone/next-output/server/app/sheets/page/react-loadable-manifest.json +1 -1
  109. package/dist/standalone/next-output/server/app/sheets/page.js +1 -1
  110. package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
  111. package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
  112. package/dist/standalone/next-output/server/app/tasks/page/app-paths-manifest.json +3 -0
  113. package/dist/standalone/next-output/server/app/tasks/page/build-manifest.json +18 -0
  114. package/dist/standalone/next-output/server/app/tasks/page/next-font-manifest.json +11 -0
  115. package/dist/standalone/next-output/server/app/tasks/page/react-loadable-manifest.json +8 -0
  116. package/dist/standalone/next-output/server/app/tasks/page/server-reference-manifest.json +4 -0
  117. package/dist/standalone/next-output/server/app/tasks/page.js +15 -0
  118. package/dist/standalone/next-output/server/app/tasks/page.js.nft.json +1 -0
  119. package/dist/standalone/next-output/server/app/tasks/page_client-reference-manifest.js +3 -0
  120. package/dist/standalone/next-output/server/app/templates/page/react-loadable-manifest.json +1 -1
  121. package/dist/standalone/next-output/server/app/templates/page.js.nft.json +1 -1
  122. package/dist/standalone/next-output/server/app/templates/page_client-reference-manifest.js +1 -1
  123. package/dist/standalone/next-output/server/app/today/page/react-loadable-manifest.json +1 -1
  124. package/dist/standalone/next-output/server/app/today/page.js +1 -1
  125. package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
  126. package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
  127. package/dist/standalone/next-output/server/app-paths-manifest.json +2 -0
  128. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0-taz6n._.js +1 -1
  129. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__00~g.6x._.js +1 -1
  130. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__02ngfib._.js +3 -0
  131. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06666_b._.js +1 -1
  132. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06wq380._.js +1 -1
  133. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0agceca._.js +3 -0
  134. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0m-c-3t._.js +1 -1
  135. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0m8yoxl._.js +3 -0
  136. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0mft_cy._.js +2 -2
  137. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0o-u0o6._.js +1 -1
  138. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0pwxv6f._.js +3 -0
  139. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0rv02cm._.js +3 -0
  140. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0tk~k.1._.js +3 -0
  141. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wdwx.8._.js +1 -1
  142. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wj1pxh._.js +1 -1
  143. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~22xdv._.js +1 -1
  144. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__137-7ty._.js +3 -0
  145. package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_task_route_actions_12ylnj2.js +3 -0
  146. package/dist/standalone/next-output/server/chunks/ssr/0prs_next_dist_esm_build_templates_app-page_0ki.wrf.js +4 -0
  147. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0.9xlwz._.js +3 -0
  148. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0.g3pd4._.js +3 -0
  149. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__02n0dvz._.js +3 -0
  150. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__04flz4-._.js +1 -1
  151. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__05o8b_c._.js +1 -1
  152. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__08jp.ha._.js +3 -0
  153. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__08mtp44._.js +3 -0
  154. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0_y9w.y._.js +1 -1
  155. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0fvs04n._.js +3 -0
  156. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0gmlwng._.js +1 -1
  157. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0il5~uq._.js +1 -1
  158. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0ou-jv5._.js +1 -1
  159. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0p4w3_0._.js +1 -1
  160. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0sx0ra6._.js +1 -1
  161. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0u.h8zx._.js +1 -1
  162. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0v5-roe._.js +3 -0
  163. package/dist/standalone/next-output/server/chunks/ssr/_0-4oz91._.js +1 -1
  164. package/dist/standalone/next-output/server/chunks/ssr/_02oputi._.js +3 -0
  165. package/dist/standalone/next-output/server/chunks/ssr/_040~8u~._.js +3 -0
  166. package/dist/standalone/next-output/server/chunks/ssr/_04wup-5._.js +1 -1
  167. package/dist/standalone/next-output/server/chunks/ssr/_05t~0qd._.js +3 -0
  168. package/dist/standalone/next-output/server/chunks/ssr/_08~9-.f._.js +3 -0
  169. package/dist/standalone/next-output/server/chunks/ssr/_092k549._.js +3 -0
  170. package/dist/standalone/next-output/server/chunks/ssr/_0_0w8kz._.js +3 -0
  171. package/dist/standalone/next-output/server/chunks/ssr/_0bypypo._.js +1 -1
  172. package/dist/standalone/next-output/server/chunks/ssr/_0e_h4bk._.js +1 -1
  173. package/dist/standalone/next-output/server/chunks/ssr/_0lp.vd1._.js +3 -0
  174. package/dist/standalone/next-output/server/chunks/ssr/_0mdf7jn._.js +3 -0
  175. package/dist/standalone/next-output/server/chunks/ssr/_0sic8ed._.js +1 -1
  176. package/dist/standalone/next-output/server/chunks/ssr/_0t7z076._.js +1 -1
  177. package/dist/standalone/next-output/server/chunks/ssr/{_028bo2r._.js → _0~6f4kw._.js} +2 -2
  178. package/dist/standalone/next-output/server/chunks/ssr/_10n.q--._.js +1 -1
  179. package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_tasks_page_actions_0_2o_cr.js +3 -0
  180. package/dist/standalone/next-output/server/chunks/ssr/components_reporting-view_tsx_0-0ofcv._.js +1 -1
  181. package/dist/standalone/next-output/server/middleware-build-manifest.js +3 -3
  182. package/dist/standalone/next-output/server/next-font-manifest.js +1 -1
  183. package/dist/standalone/next-output/server/next-font-manifest.json +4 -0
  184. package/dist/standalone/next-output/server/pages/500.html +1 -1
  185. package/dist/standalone/next-output/static/chunks/0-3kyxhxw4bbj.js +1 -0
  186. package/dist/standalone/next-output/static/chunks/0-408g-._49ss.js +1 -0
  187. package/dist/standalone/next-output/static/chunks/0-cegmvshy7~a.js +1 -0
  188. package/dist/standalone/next-output/static/chunks/0-vzgnzke5d_x.js +1 -0
  189. package/dist/standalone/next-output/static/chunks/0.dc4~0qlrrmq.js +1 -0
  190. package/dist/standalone/next-output/static/chunks/00kyekysf5.rz.js +1 -0
  191. package/dist/standalone/next-output/static/chunks/01_obgfd_d0-5.js +1 -0
  192. package/dist/standalone/next-output/static/chunks/0ad60i1-~p1p9.js +1 -0
  193. package/dist/standalone/next-output/static/chunks/0bp_fueuuzc3l.js +1 -0
  194. package/dist/standalone/next-output/static/chunks/0d.t1amf2zp1y.js +1 -0
  195. package/dist/standalone/next-output/static/chunks/0f1u1npfh1b-o.js +1 -0
  196. package/dist/standalone/next-output/static/chunks/0fcd7jg.xwz~d.js +1 -0
  197. package/dist/standalone/next-output/static/chunks/0gkw9_fpp4r.i.js +1 -0
  198. package/dist/standalone/next-output/static/chunks/0hiigo7crs4m1.js +1 -0
  199. package/dist/standalone/next-output/static/chunks/{15hds0xz6b5ce.js → 0k-swz.-tm1g3.js} +1 -1
  200. package/dist/standalone/next-output/static/chunks/0l-z2n83y2aa2.js +1 -0
  201. package/dist/standalone/next-output/static/chunks/0njsx8jnl8cgg.js +1 -0
  202. package/dist/standalone/next-output/static/chunks/{0ya1a.o~xsixd.js → 0np820b81oc9m.js} +1 -1
  203. package/dist/standalone/next-output/static/chunks/0pgfu2rxbx5z2.js +1 -0
  204. package/dist/standalone/next-output/static/chunks/0puu5bj-k_hz9.js +1 -0
  205. package/dist/standalone/next-output/static/chunks/0qsrkbt.l5i70.js +1 -0
  206. package/dist/standalone/next-output/static/chunks/0tumi91py-w0x.js +1 -0
  207. package/dist/standalone/next-output/static/chunks/0unkbkr3scujr.js +1 -0
  208. package/dist/standalone/next-output/static/chunks/{0-niex.k_xqnu.js → 0wj9lgwud1gqj.js} +1 -1
  209. package/dist/standalone/next-output/static/chunks/0xv~-o0b9qigv.css +3 -0
  210. package/dist/standalone/next-output/static/chunks/0zi_5_ssa1_j-.js +1 -0
  211. package/dist/standalone/next-output/static/chunks/0~og7w2d0fi8k.js +1 -0
  212. package/dist/standalone/next-output/static/chunks/13-.m15df8.b8.js +1 -0
  213. package/dist/standalone/next-output/static/chunks/13hyb9n2laeam.js +1 -0
  214. package/dist/standalone/package.json +1 -1
  215. package/package.json +1 -1
  216. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06h__d_._.js +0 -3
  217. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0_b50~5._.js +0 -3
  218. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0eruj62._.js +0 -3
  219. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0g4.zxh._.js +0 -3
  220. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0hasizg._.js +0 -3
  221. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0jlfmb8._.js +0 -3
  222. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0m~u8g4._.js +0 -3
  223. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0nx-vwn._.js +0 -3
  224. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0rl2w7-._.js +0 -3
  225. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0yqw7pu._.js +0 -3
  226. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__03dwgvv._.js +0 -3
  227. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__06jwkua._.js +0 -3
  228. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__078pqlk._.js +0 -3
  229. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__09~j2of._.js +0 -3
  230. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0njhf-m._.js +0 -3
  231. package/dist/standalone/next-output/server/chunks/ssr/_02fm6gp._.js +0 -3
  232. package/dist/standalone/next-output/server/chunks/ssr/_07q4l3.._.js +0 -3
  233. package/dist/standalone/next-output/server/chunks/ssr/_0aaepl8._.js +0 -3
  234. package/dist/standalone/next-output/server/chunks/ssr/_0ja6w18._.js +0 -3
  235. package/dist/standalone/next-output/server/chunks/ssr/_0rhx88g._.js +0 -3
  236. package/dist/standalone/next-output/server/chunks/ssr/_0y9lue.._.js +0 -3
  237. package/dist/standalone/next-output/server/chunks/ssr/_0zatphu._.js +0 -3
  238. package/dist/standalone/next-output/static/chunks/048hg7.kf50p6.js +0 -1
  239. package/dist/standalone/next-output/static/chunks/099rnw4-qk_33.js +0 -1
  240. package/dist/standalone/next-output/static/chunks/09p9p33-jf6p_.js +0 -1
  241. package/dist/standalone/next-output/static/chunks/0_8ps~_e8~ea7.js +0 -1
  242. package/dist/standalone/next-output/static/chunks/0cnb9ojb1.4_s.js +0 -1
  243. package/dist/standalone/next-output/static/chunks/0f.g~ypqld4i2.js +0 -1
  244. package/dist/standalone/next-output/static/chunks/0feo1c5hcq~fw.js +0 -1
  245. package/dist/standalone/next-output/static/chunks/0gc_4fwvsadx9.js +0 -1
  246. package/dist/standalone/next-output/static/chunks/0gv5y9hez6j.f.js +0 -1
  247. package/dist/standalone/next-output/static/chunks/0kv6q0hk3m5ja.css +0 -3
  248. package/dist/standalone/next-output/static/chunks/0lbfeprw3roep.js +0 -1
  249. package/dist/standalone/next-output/static/chunks/0lw-y46eplh.w.js +0 -1
  250. package/dist/standalone/next-output/static/chunks/0ni97tabbd6ql.js +0 -1
  251. package/dist/standalone/next-output/static/chunks/0q_cw2e3uj20q.js +0 -1
  252. package/dist/standalone/next-output/static/chunks/0qc9jf34l6_d8.js +0 -1
  253. package/dist/standalone/next-output/static/chunks/0r9inu-z~8h4p.js +0 -1
  254. package/dist/standalone/next-output/static/chunks/0s7b~rp4s3q9q.js +0 -1
  255. package/dist/standalone/next-output/static/chunks/0t~0aam6r_eto.js +0 -1
  256. package/dist/standalone/next-output/static/chunks/0ua4wv84cw5ds.js +0 -1
  257. package/dist/standalone/next-output/static/chunks/0vmr-fgq74aqi.js +0 -1
  258. package/dist/standalone/next-output/static/chunks/0vudo56ulr706.js +0 -1
  259. package/dist/standalone/next-output/static/chunks/0yc_so6bvu6on.js +0 -1
  260. package/dist/standalone/next-output/static/chunks/16tc8vh998e~1.js +0 -1
  261. /package/dist/standalone/next-output/static/{3mGyuXIk1hccaSXSOwPrh → 4G6Gtdu0DdRdBmSmuydRA}/_buildManifest.js +0 -0
  262. /package/dist/standalone/next-output/static/{3mGyuXIk1hccaSXSOwPrh → 4G6Gtdu0DdRdBmSmuydRA}/_clientMiddlewareManifest.js +0 -0
  263. /package/dist/standalone/next-output/static/{3mGyuXIk1hccaSXSOwPrh → 4G6Gtdu0DdRdBmSmuydRA}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75899,35923,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")}],75899);var r=e.i(51268),n=e.i(97891);e.s(["use_time_format",0,function(){return(0,r.useSyncExternalStore)(n.time_format_preference.subscribe,n.time_format_preference.get_snapshot,n.time_format_preference.get_server_snapshot)}],35923)},99997,(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(33434)),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)}},70782,(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(51268);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)},88334,(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(69600),a=e.r(76636);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}}},20612,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},70096,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},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(8063),i=o._(e.r(51268)),l=e.r(99997),u=e.r(4411),c=e.r(70782),d=e.r(69600),h=e.r(31508);e.r(91946);let f=e.r(35302),p=e.r(92024),m=e.r(88334),_=e.r(44017);function b(t){var r,n;let a,o,b,[y,x]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),v=(0,i.useRef)(null),{href:w,as:j,children:k,prefetch:S=null,passHref:N,replace:O,shallow:E,scroll:C,onClick:T,onMouseEnter:P,onTouchStart:R,legacyBehavior:L=!1,onNavigate:A,transitionTypes:I,ref:M,unstable_dynamicOnHover:D,...U}=t;a=k,L&&("string"==typeof a||"number"==typeof a)&&(a=(0,s.jsx)("a",{children:a}));let $=i.default.useContext(u.AppRouterContext),K=!1!==S,q=!1!==S?null===(n=S)||"auto"===n?_.FetchStrategy.PPR:_.FetchStrategy.Full:_.FetchStrategy.PPR,B="string"==typeof(r=j||w)?r:(0,l.formatUrl)(r);if(L){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 F=L?o&&"object"==typeof o&&o.ref:M,W=i.default.useCallback(e=>(null!==$&&(v.current=(0,p.mountLinkInstance)(e,B,$,q,K,x)),()=>{v.current&&((0,p.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,p.unmountPrefetchableInstance)(e)}),[K,B,$,q,x]),J={ref:(0,c.useMergedRef)(W,F),onClick(t){L||"function"!=typeof T||T(t),L&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!$||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,m.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(12178);i.default.startTransition(()=>{d(r,a?"replace":"push",!1===o?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,l)})}}(t,B,v,O,C,A,I)},onMouseEnter(e){L||"function"!=typeof P||P(e),L&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),$&&K&&(0,p.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),$&&K&&(0,p.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(B)?J.href=B:L&&!N&&("a"!==o.type||"href"in o.props)||(J.href=(0,h.addBasePath)(B)),b=L?i.default.cloneElement(o,J):(0,s.jsx)("a",{...U,...J,children:a}),(0,s.jsx)(g.Provider,{value:y,children:b})}e.r(20612);let g=(0,i.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,i.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)},29539,e=>{"use strict";var t=e.i(8063);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(8063);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(51268),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(48042),r=e.i(51268),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])}}])},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)}`}])},75404,73205,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042);let a=[{href:"/",label:"Tracker",match:e=>"/"===e}];function o(){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)})})}function s(){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"})})}var i=e.i(77882);function l(){let{email:e,is_configured:r}=(0,i.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)(s,{})}),(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}var u=e.i(51268),c=e.i(37399),d=e.i(90463),h=e.i(46549),f=e.i(22373);let p=new Set(f.topbar_quick_action_ids),m=["today","review","templates","search","reporting","pomodoro"];function _(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return m;let r=t.filter(e=>"string"==typeof e&&p.has(e));return Array.from(new Set(r))}catch{return m}}e.s(["parse_topbar_quick_actions",0,_],73205);var b=e.i(66295),g=e.i(34869),y=e.i(92629);let x=(0,g.create_ui_preference_store)({storage_key:y.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:y.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});var v=e.i(32792),w=e.i(90299),j=e.i(28274);function k(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function S(){return k()}function N(){return"dark"}var O=e.i(35434),E=e.i(17798),C=e.i(10464),T=e.i(61834),P=e.i(81553),R=e.i(25204);let L="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",A={today:{href:"/today",label:"Today"},review:{href:"/review",label:"Review"},templates:{href:"/templates",label:"Templates"},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"}},I=new Set(["manage-tags","pomodoro","templates","sync-settings"]);function M(){let e=(0,n.useRouter)(),a=(0,n.usePathname)()??"/",o=(0,u.useSyncExternalStore)(O.subscribe_theme,S,N),s=(0,u.useSyncExternalStore)(x.subscribe,x.get_snapshot,x.get_server_snapshot),l=(0,u.useSyncExternalStore)(w.tracker_shortcut_map_preference.subscribe,w.tracker_shortcut_map_preference.get_snapshot,w.tracker_shortcut_map_preference.get_server_snapshot),p=(0,u.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),m=(0,b.parse_tracker_shortcut_map)(l),g=new Set(_(p)),y=f.topbar_quick_action_ids.filter(e=>!g.has(e)),M=Array.from(new Set([...Array.from(I),...y])),{email:D,is_configured:U,is_pending:$,sign_out:K}=(0,i.use_supabase_auth_session)(),[q,B]=(0,u.useState)(!1),F=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!q)return;let e=e=>{null===F.current||F.current.contains(e.target)||B(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[q]);let W=()=>{B(!1)};return(0,R.use_escape_to_cancel)(W,q),(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":q,"aria-haspopup":"menu",onClick:()=>B(e=>!e),children:(0,t.jsx)(c.HamburgerIcon,{})}),q?(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:[U&&null!==D?(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:D,children:D})}):null,M.map(e=>{let n=A[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:L,role:"menuitem",onClick:W,children:n.label})},e)}),U?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:L,role:"menuitemcheckbox","aria-checked":"true"===s,onClick:()=>{let e="true"===s?"false":"true";x.write(e),x.notify(),(0,h.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==D&&(0,j.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"===s?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===s?"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:L,role:"menuitem",onClick:()=>{let e;W(),e="dark"===k()?"light":"dark",(0,E.apply_theme)(e),(0,P.write_stored_theme)(e),C.theme_mode_preference.write(e),(0,T.write_document_preference_cookies)({theme_mode:e,theme:e}),C.theme_mode_preference.notify(),(0,O.notify_theme_subscribers)(),(0,h.notify_settings_saved)()},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"===o?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===o?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:L,role:"menuitem",onClick:()=>{let e;W(),e=m.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:"(?)"})]})})}),U?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===D?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:L,role:"menuitem",onClick:()=>{W(),e.push((0,d.build_auth_page_href)("sign_in",a))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${L} text-danger`,role:"menuitem",disabled:$,onClick:()=>{W(),K()},children:$?"Signing out…":"Sign out"})})]}):null]}):null]})}let D=[{id:"today",href:"/today",label:"Today"},{id:"review",href:"/review",label:"Review"},{id:"templates",href:"/templates",label:"Templates"},{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"}];function U(){let e=(0,n.usePathname)()??"/",a=(0,u.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),o=(0,u.useMemo)(()=>_(a),[a]);if(0===o.length)return null;let s=D.filter(e=>o.includes(e.id));return 0===s.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:s.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)})})}var $=e.i(29539);function K(){let e=((0,n.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(r.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)($.SettingsIcon,{})})}function q({current:e,parent:n}){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)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:n.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)(q,{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)(o,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(U,{}),(0,t.jsx)(l,{}),(0,t.jsx)(K,{}),(0,t.jsx)(M,{})]})]})]})})}],75404)},18774,e=>{"use strict";e.s(["format_display_tag",0,function(e){return e.startsWith("@")?e:`@${e}`}])},39474,20993,e=>{"use strict";var t=e.i(13349),r=e.i(32417),n=e.i(44171),a=e.i(28274);let o=null,s=Promise.resolve();function i(){(0,r.is_supabase_configured)()&&(0,n.is_cloud_sync_enabled)()&&(null!==o&&clearTimeout(o),o=setTimeout(()=>{o=null,s=s.then(()=>(0,a.run_tracker_db_cloud_sync)()).catch(()=>{})},400))}function l(){(0,t.is_greedy_cloud_sync_enabled)()&&i()}e.s(["schedule_tracker_db_cloud_sync",0,l],20993),e.s(["push_tracker_db_cloud_after_change",0,function(){(0,t.is_greedy_cloud_sync_enabled)()?l():i()}],39474)},97176,e=>{"use strict";var t=e.i(13349);async function r(e){let t=await fetch("/api/sheet/active",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});if(!t.ok)throw Error((await t.json()).error??"Failed to update active sheet in cloud")}var n=e.i(39474),a=e.i(20993);e.s(["notify_tracker_db_cloud_sync",0,function(e,o){if("/api/sheet"===e&&"object"==typeof o&&null!==o&&!0!==o.delete&&!(0,t.is_greedy_cloud_sync_enabled)()){let e=o.name?.trim()??"";e.length>0&&r(e).catch(()=>{});return}(0,t.is_greedy_cloud_sync_enabled)()?(0,a.schedule_tracker_db_cloud_sync)():(0,n.push_tracker_db_cloud_after_change)()}],97176)},44356,e=>{"use strict";var t=e.i(18774);e.s(["build_resume_description",0,function(e,r){let n=e.trim(),a=n.length>0?n:"Untitled entry",o=r.map(e=>(0,t.format_display_tag)(e)).join(" ");return o.length>0?`${a} ${o}`.trim():a}])},51229,e=>{"use strict";var t=e.i(97176);let r=new Set(["/api/note"]);async function n(e,n){let a={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},o=await fetch(e,a);if(!o.ok){var s,i;let t,n=(await o.json()).error??"Request failed";if(s=e,i=n,r.has(s)&&((t=i.toLowerCase()).includes("duplicate key")||t.includes("unique constraint"))){if(await new Promise(e=>{setTimeout(e,25)}),!(o=await fetch(e,a)).ok)throw Error((await o.json()).error??n)}else throw Error(n)}let l=await o.json();return(0,t.notify_tracker_db_cloud_sync)(e,n),l}e.s(["post_tracker_action",0,n])},36178,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}])},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{}}])},68713,e=>{"use strict";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{}}])},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(51268),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)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37193,e=>{"use strict";e.s(["message_from_unknown_error",0,function(e,t){return e instanceof Error?e.message:"string"==typeof e?e:t}])},19946,e=>{"use strict";var t=e.i(51268),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")}])},99997,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return c},urlObjectKeys:function(){return o}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(33434)),l=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",i=e.hash||"",o=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)),o&&"object"==typeof o&&(o=String(a.urlQueryToSearchParams(o)));let u=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),i&&"#"!==i[0]&&(i="#"+i),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${i}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return i(e)}},70782,(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(51268);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)},88334,(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(69600),s=e.r(76636);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}}},20612,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},70096,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return _}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),l=e.r(8063),i=a._(e.r(51268)),o=e.r(99997),c=e.r(4411),u=e.r(70782),d=e.r(69600),h=e.r(31508);e.r(91946);let f=e.r(35302),m=e.r(92024),p=e.r(88334),g=e.r(44017);function x(t){var r,n;let s,a,x,[_,y]=(0,i.useOptimistic)(m.IDLE_LINK_STATUS),v=(0,i.useRef)(null),{href:j,as:w,children:k,prefetch:N=null,passHref:S,replace:C,shallow:E,scroll:P,onClick:L,onMouseEnter:T,onTouchStart:O,legacyBehavior:R=!1,onNavigate:A,transitionTypes:M,ref:W,unstable_dynamicOnHover:D,...$}=t;s=k,R&&("string"==typeof s||"number"==typeof s)&&(s=(0,l.jsx)("a",{children:s}));let U=i.default.useContext(c.AppRouterContext),I=!1!==N,B=!1!==N?null===(n=N)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,q="string"==typeof(r=w||j)?r:(0,o.formatUrl)(r);if(R){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=i.default.Children.only(s)}let K=R?a&&"object"==typeof a&&a.ref:W,F=i.default.useCallback(e=>(null!==U&&(v.current=(0,m.mountLinkInstance)(e,q,U,B,I,y)),()=>{v.current&&((0,m.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,m.unmountPrefetchableInstance)(e)}),[I,q,U,B,y]),z={ref:(0,u.useMergedRef)(F,K),onClick(t){R||"function"!=typeof L||L(t),R&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!U||t.defaultPrevented||function(t,r,n,s,a,l,o){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,p.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(12178);i.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,o)})}}(t,q,v,C,P,A,M)},onMouseEnter(e){R||"function"!=typeof T||T(e),R&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),U&&I&&(0,m.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){R||"function"!=typeof O||O(e),R&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),U&&I&&(0,m.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(q)?z.href=q:R&&!S&&("a"!==a.type||"href"in a.props)||(z.href=(0,h.addBasePath)(q)),x=R?i.default.cloneElement(a,z):(0,l.jsx)("a",{...$,...z,children:s}),(0,l.jsx)(b.Provider,{value:_,children:x})}e.r(20612);let b=(0,i.createContext)(m.IDLE_LINK_STATUS),_=()=>(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(8063);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(8063);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(51268),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])}])},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)}`}])},77882,e=>{"use strict";var t=e.i(48042),r=e.i(51268),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)(),[l,i]=(0,r.useState)(null),[o,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}})=>{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()}},[u]),{is_configured:u,email:l,is_pending:o,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])}}])},75404,73205,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042);let s=[{href:"/",label:"Tracker",match:e=>"/"===e}];function a(){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)})})}function l(){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"})})}var i=e.i(77882);function o(){let{email:e,is_configured:r}=(0,i.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)(l,{})}),(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}var c=e.i(51268),u=e.i(37399),d=e.i(90463),h=e.i(46549),f=e.i(22373);let m=new Set(f.topbar_quick_action_ids),p=["today","review","templates","search","reporting","pomodoro"];function g(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return p;let r=t.filter(e=>"string"==typeof e&&m.has(e));return Array.from(new Set(r))}catch{return p}}e.s(["parse_topbar_quick_actions",0,g],73205);var x=e.i(66295),b=e.i(34869),_=e.i(92629);let y=(0,b.create_ui_preference_store)({storage_key:_.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:_.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});var v=e.i(32792),j=e.i(90299),w=e.i(28274);function k(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function N(){return k()}function S(){return"dark"}var C=e.i(35434),E=e.i(17798),P=e.i(10464),L=e.i(61834),T=e.i(81553),O=e.i(25204);let R="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",A={today:{href:"/today",label:"Today"},review:{href:"/review",label:"Review"},templates:{href:"/templates",label:"Templates"},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"}},M=new Set(["manage-tags","pomodoro","templates","sync-settings"]);function W(){let e=(0,n.useRouter)(),s=(0,n.usePathname)()??"/",a=(0,c.useSyncExternalStore)(C.subscribe_theme,N,S),l=(0,c.useSyncExternalStore)(y.subscribe,y.get_snapshot,y.get_server_snapshot),o=(0,c.useSyncExternalStore)(j.tracker_shortcut_map_preference.subscribe,j.tracker_shortcut_map_preference.get_snapshot,j.tracker_shortcut_map_preference.get_server_snapshot),m=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),p=(0,x.parse_tracker_shortcut_map)(o),b=new Set(g(m)),_=f.topbar_quick_action_ids.filter(e=>!b.has(e)),W=Array.from(new Set([...Array.from(M),..._])),{email:D,is_configured:$,is_pending:U,sign_out:I}=(0,i.use_supabase_auth_session)(),[B,q]=(0,c.useState)(!1),K=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!B)return;let e=e=>{null===K.current||K.current.contains(e.target)||q(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[B]);let F=()=>{q(!1)};return(0,O.use_escape_to_cancel)(F,B),(0,t.jsxs)("div",{className:"relative shrink-0",ref:K,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":B,"aria-haspopup":"menu",onClick:()=>q(e=>!e),children:(0,t.jsx)(u.HamburgerIcon,{})}),B?(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:[$&&null!==D?(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:D,children:D})}):null,W.map(e=>{let n=A[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:R,role:"menuitem",onClick:F,children:n.label})},e)}),$?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:R,role:"menuitemcheckbox","aria-checked":"true"===l,onClick:()=>{let e="true"===l?"false":"true";y.write(e),y.notify(),(0,h.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==D&&(0,w.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"===l?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===l?"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:R,role:"menuitem",onClick:()=>{let e;F(),e="dark"===k()?"light":"dark",(0,E.apply_theme)(e),(0,T.write_stored_theme)(e),P.theme_mode_preference.write(e),(0,L.write_document_preference_cookies)({theme_mode:e,theme:e}),P.theme_mode_preference.notify(),(0,C.notify_theme_subscribers)(),(0,h.notify_settings_saved)()},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"===a?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===a?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:R,role:"menuitem",onClick:()=>{let e;F(),e=p.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:"(?)"})]})})}),$?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===D?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:R,role:"menuitem",onClick:()=>{F(),e.push((0,d.build_auth_page_href)("sign_in",s))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${R} text-danger`,role:"menuitem",disabled:U,onClick:()=>{F(),I()},children:U?"Signing out…":"Sign out"})})]}):null]}):null]})}let D=[{id:"today",href:"/today",label:"Today"},{id:"review",href:"/review",label:"Review"},{id:"templates",href:"/templates",label:"Templates"},{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"}];function $(){let e=(0,n.usePathname)()??"/",s=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),a=(0,c.useMemo)(()=>g(s),[s]);if(0===a.length)return null;let l=D.filter(e=>a.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)})})}var U=e.i(29539);function I(){let e=((0,n.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(r.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)(U.SettingsIcon,{})})}function B({current:e,parent:n}){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)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:n.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)(B,{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)(a,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)($,{}),(0,t.jsx)(o,{}),(0,t.jsx)(I,{}),(0,t.jsx)(W,{})]})]})]})})}],75404)},42800,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042);let s=[{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:s.map(n=>{let s=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":s?"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 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},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)())}])},88019,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042),s=e.i(90463),a=e.i(52663),l=e.i(77882);e.s(["CloudAccountSetting",0,function(){let e=(0,n.usePathname)()??"/settings/cloud-sync",{email:i,is_configured:o,is_pending:c,sign_out:u}=(0,l.use_supabase_auth_session)();if(!o)return null;let d=(0,s.build_auth_page_href)("sign_in",e);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:"Account"}),(0,t.jsx)("p",{className:"m-0 text-[0.8rem] leading-snug text-muted",children:"When signed in, tracker data and settings sync to your Supabase project instead of the local db.json file."})]}),null===i?(0,t.jsx)(r.default,{href:d,className:`${(0,a.get_button_class_name)("primary","small")} self-start no-underline`,children:"Sign in to enable cloud sync"}):(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("p",{className:"m-0 text-[0.85rem]",children:["Signed in as ",(0,t.jsx)("span",{className:"font-semibold",children:i})]}),(0,t.jsx)("button",{type:"button",className:`${(0,a.get_button_class_name)("ghost","small")} self-start`,disabled:c,onClick:()=>void u(),children:c?"Signing out…":"Sign out"})]})]})}])},98516,e=>{"use strict";var t=e.i(8063),r=e.i(48042),n=e.i(51268),s=e.i(19946),a=e.i(37193),l=e.i(52663),i=e.i(28274),o=e.i(77882);e.s(["CloudSyncActions",0,function(){let e=(0,r.useRouter)(),{confirm:c}=(0,s.use_confirm_dialog)(),{email:u,is_configured:d}=(0,o.use_supabase_auth_session)(),[h,f]=(0,n.useState)(null),[m,p]=(0,n.useState)(!0),[g,x]=(0,n.useState)(null),[b,_]=(0,n.useState)(null),[y,v]=(0,n.useState)(null),j=async()=>{try{let e=await fetch("/api/sync/status");if(!e.ok)throw Error("Failed to load sync status");let t=await e.json();f(t)}catch(e){v((0,a.message_from_unknown_error)(e,"Failed to load sync status"))}finally{p(!1)}};if((0,n.useEffect)(()=>{d?j():p(!1)},[d,u]),!d||null===u)return null;let w=async t=>{if(await c("push"===t?{title:"Push local to cloud?",message:"Merge your local db.json into the cloud database. Entries with the same id are combined; local data wins when they conflict.",confirmLabel:"Push to cloud",variant:"danger"}:{title:"Pull cloud to local?",message:"Merge the cloud database into your local db.json. Entries with the same id are combined; cloud data wins when they conflict.",confirmLabel:"Pull from cloud",variant:"danger"})){x(t),_(null),v(null);try{await (0,i.run_tracker_db_cloud_sync)({action:t,on_complete:()=>{e.refresh()}}),_("push"===t?"Cloud database merged with local file.":"Local db.json merged with cloud database."),await j()}catch(e){v((0,a.message_from_unknown_error)(e,"Sync action failed"))}finally{x(null)}}},k=h?.local_imported_at!==null&&h?.local_imported_at!==void 0?new Date(h.local_imported_at).toLocaleString():"never";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:"Manual sync"}),(0,t.jsx)("p",{className:"m-0 text-[0.8rem] leading-snug text-muted",children:"Merge local db.json with your cloud database. Conflicting entries keep the most recent timer; push favors local, pull favors cloud."})]}),m?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-muted",children:"Loading sync status…"}):(0,t.jsxs)("dl",{className:"m-0 grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-[0.82rem]",children:[(0,t.jsx)("dt",{className:"text-muted",children:"Cloud sheets"}),(0,t.jsx)("dd",{className:"m-0 font-mono",children:h?.cloud_sheet_count??0}),(0,t.jsx)("dt",{className:"text-muted",children:"Last local import"}),(0,t.jsx)("dd",{className:"m-0 font-mono",children:k})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost","small"),disabled:null!==g,onClick:()=>void w("push"),children:"push"===g?"Pushing…":"Push local → cloud"}),(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost","small"),disabled:null!==g,onClick:()=>void w("pull"),children:"pull"===g?"Pulling…":"Pull cloud → local"})]}),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})]})}])},4259,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(410),s=e.i(7902);e.s(["GreedyCloudSyncSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.greedy_cloud_sync_preference.subscribe,n.greedy_cloud_sync_preference.get_snapshot,n.greedy_cloud_sync_preference.get_server_snapshot);return(0,t.jsxs)("label",{"aria-label":"Greedy cloud sync",className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.greedy_cloud_sync_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Greedy cloud sync"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"When on, merge with the cloud when you move between pages and after each change. When off, merge once per session and push only when entries, notes, or sheets change—not when switching sheets."})]})]})}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,99997,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return o}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(33434)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",l=e.hash||"",o=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)),o&&"object"==typeof o&&(o=String(a.urlQueryToSearchParams(o)));let u=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.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 o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},70782,(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(51268);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)},88334,(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(69600),s=e.r(76636);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}}},20612,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},70096,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return _},useLinkStatus:function(){return b}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),i=e.r(8063),l=a._(e.r(51268)),o=e.r(99997),c=e.r(4411),u=e.r(70782),d=e.r(69600),h=e.r(31508);e.r(91946);let f=e.r(35302),p=e.r(92024),m=e.r(88334),g=e.r(44017);function _(t){var r,n;let s,a,_,[b,v]=(0,l.useOptimistic)(p.IDLE_LINK_STATUS),y=(0,l.useRef)(null),{href:j,as:w,children:k,prefetch:S=null,passHref:N,replace:E,shallow:C,scroll:T,onClick:O,onMouseEnter:A,onTouchStart:L,legacyBehavior:D=!1,onNavigate:P,transitionTypes:R,ref:I,unstable_dynamicOnHover:M,...U}=t;s=k,D&&("string"==typeof s||"number"==typeof s)&&(s=(0,i.jsx)("a",{children:s}));let $=l.default.useContext(c.AppRouterContext),F=!1!==S,K=!1!==S?null===(n=S)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=w||j)?r:(0,o.formatUrl)(r);if(D){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 W=D?a&&"object"==typeof a&&a.ref:I,G=l.default.useCallback(e=>(null!==$&&(y.current=(0,p.mountLinkInstance)(e,B,$,K,F,v)),()=>{y.current&&((0,p.unmountLinkForCurrentNavigation)(y.current),y.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,B,$,K,v]),q={ref:(0,u.useMergedRef)(G,W),onClick(t){D||"function"!=typeof O||O(t),D&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,s,a,i,o){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,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(12178);l.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,o)})}}(t,B,y,E,T,P,R)},onMouseEnter(e){D||"function"!=typeof A||A(e),D&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){D||"function"!=typeof L||L(e),D&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,d.isAbsoluteUrl)(B)?q.href=B:D&&!N&&("a"!==a.type||"href"in a.props)||(q.href=(0,h.addBasePath)(B)),_=D?l.default.cloneElement(a,q):(0,i.jsx)("a",{...U,...q,children:s}),(0,i.jsx)(x.Provider,{value:b,children:_})}e.r(20612);let x=(0,l.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,l.useContext)(x);("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(8063);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(8063);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(51268),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])}])},77882,e=>{"use strict";var t=e.i(48042),r=e.i(51268),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)(),[i,l]=(0,r.useState)(null),[o,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:i,is_pending:o,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])}}])},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)}`}])},75404,73205,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042);let s=[{href:"/",label:"Tracker",match:e=>"/"===e}];function a(){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)})})}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"})})}var l=e.i(77882);function o(){let{email:e,is_configured:r}=(0,l.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}var c=e.i(51268),u=e.i(37399),d=e.i(90463),h=e.i(46549),f=e.i(22373);let p=new Set(f.topbar_quick_action_ids),m=["today","review","templates","search","reporting","pomodoro"];function g(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return m;let r=t.filter(e=>"string"==typeof e&&p.has(e));return Array.from(new Set(r))}catch{return m}}e.s(["parse_topbar_quick_actions",0,g],73205);var _=e.i(66295),x=e.i(34869),b=e.i(92629);let v=(0,x.create_ui_preference_store)({storage_key:b.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:b.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});var y=e.i(32792),j=e.i(90299),w=e.i(28274);function k(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function S(){return k()}function N(){return"dark"}var E=e.i(35434),C=e.i(17798),T=e.i(10464),O=e.i(61834),A=e.i(81553),L=e.i(25204);let D="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",P={today:{href:"/today",label:"Today"},review:{href:"/review",label:"Review"},templates:{href:"/templates",label:"Templates"},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"}},R=new Set(["manage-tags","pomodoro","templates","sync-settings"]);function I(){let e=(0,n.useRouter)(),s=(0,n.usePathname)()??"/",a=(0,c.useSyncExternalStore)(E.subscribe_theme,S,N),i=(0,c.useSyncExternalStore)(v.subscribe,v.get_snapshot,v.get_server_snapshot),o=(0,c.useSyncExternalStore)(j.tracker_shortcut_map_preference.subscribe,j.tracker_shortcut_map_preference.get_snapshot,j.tracker_shortcut_map_preference.get_server_snapshot),p=(0,c.useSyncExternalStore)(y.topbar_quick_actions_preference.subscribe,y.topbar_quick_actions_preference.get_snapshot,y.topbar_quick_actions_preference.get_server_snapshot),m=(0,_.parse_tracker_shortcut_map)(o),x=new Set(g(p)),b=f.topbar_quick_action_ids.filter(e=>!x.has(e)),I=Array.from(new Set([...Array.from(R),...b])),{email:M,is_configured:U,is_pending:$,sign_out:F}=(0,l.use_supabase_auth_session)(),[K,B]=(0,c.useState)(!1),W=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!K)return;let e=e=>{null===W.current||W.current.contains(e.target)||B(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[K]);let G=()=>{B(!1)};return(0,L.use_escape_to_cancel)(G,K),(0,t.jsxs)("div",{className:"relative shrink-0",ref:W,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":K,"aria-haspopup":"menu",onClick:()=>B(e=>!e),children:(0,t.jsx)(u.HamburgerIcon,{})}),K?(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:[U&&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,I.map(e=>{let n=P[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:D,role:"menuitem",onClick:G,children:n.label})},e)}),U?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:D,role:"menuitemcheckbox","aria-checked":"true"===i,onClick:()=>{let e="true"===i?"false":"true";v.write(e),v.notify(),(0,h.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==M&&(0,w.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"===i?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===i?"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:D,role:"menuitem",onClick:()=>{let e;G(),e="dark"===k()?"light":"dark",(0,C.apply_theme)(e),(0,A.write_stored_theme)(e),T.theme_mode_preference.write(e),(0,O.write_document_preference_cookies)({theme_mode:e,theme:e}),T.theme_mode_preference.notify(),(0,E.notify_theme_subscribers)(),(0,h.notify_settings_saved)()},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"===a?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===a?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:D,role:"menuitem",onClick:()=>{let e;G(),e=m.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:"(?)"})]})})}),U?(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:D,role:"menuitem",onClick:()=>{G(),e.push((0,d.build_auth_page_href)("sign_in",s))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${D} text-danger`,role:"menuitem",disabled:$,onClick:()=>{G(),F()},children:$?"Signing out…":"Sign out"})})]}):null]}):null]})}let M=[{id:"today",href:"/today",label:"Today"},{id:"review",href:"/review",label:"Review"},{id:"templates",href:"/templates",label:"Templates"},{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"}];function U(){let e=(0,n.usePathname)()??"/",s=(0,c.useSyncExternalStore)(y.topbar_quick_actions_preference.subscribe,y.topbar_quick_actions_preference.get_snapshot,y.topbar_quick_actions_preference.get_server_snapshot),a=(0,c.useMemo)(()=>g(s),[s]);if(0===a.length)return null;let i=M.filter(e=>a.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 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)})})}var $=e.i(29539);function F(){let e=((0,n.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(r.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)($.SettingsIcon,{})})}function K({current:e,parent:n}){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)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:n.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)(K,{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)(a,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(U,{}),(0,t.jsx)(o,{}),(0,t.jsx)(F,{}),(0,t.jsx)(I,{})]})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},42800,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042);let s=[{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:s.map(n=>{let s=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":s?"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 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},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)())}])},35877,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DEBUG_LOGGING_STORAGE_KEY,default_value:r.DEBUG_LOGGING_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["debug_logging_preference",0,n])},91653,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(65742),s=e.i(7902);e.s(["ClearTagFiltersOnSheetChangeSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.clear_tag_filters_on_sheet_change_preference.subscribe,n.clear_tag_filters_on_sheet_change_preference.get_snapshot,n.clear_tag_filters_on_sheet_change_preference.get_server_snapshot);return(0,t.jsxs)("label",{"aria-label":"Clear tag filters on sheet change",className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.clear_tag_filters_on_sheet_change_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Clear tag filters on sheet change"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Remove tag filters when you switch to another sheet."})]})]})}])},98295,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(97026),s=e.i(7902);e.s(["ConfirmBeforeCheckoutSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.confirm_before_checkout_preference.subscribe,n.confirm_before_checkout_preference.get_snapshot,n.confirm_before_checkout_preference.get_server_snapshot);return(0,t.jsxs)("label",{"aria-label":"Confirm before checkout",className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.confirm_before_checkout_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Confirm before checkout"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show a confirmation dialog when you stop the active timer."})]})]})}])},256,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(36405),s=e.i(7902);e.s(["ConfirmDestructiveActionsSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.confirm_destructive_actions_preference.subscribe,n.confirm_destructive_actions_preference.get_snapshot,n.confirm_destructive_actions_preference.get_server_snapshot);return(0,t.jsxs)("label",{"aria-label":"Confirm destructive actions",className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.confirm_destructive_actions_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Confirm destructive actions"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Ask before deleting entries or sheets. Turn off for fast mode."})]})]})}])},90867,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(35877),s=e.i(7902);e.s(["DebugLoggingSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.debug_logging_preference.subscribe,n.debug_logging_preference.get_snapshot,n.debug_logging_preference.get_server_snapshot);return(0,t.jsxs)("label",{"aria-label":"Debug logging",className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.debug_logging_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Debug logging"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Log outgoing AI suggestion queries in the console for troubleshooting."})]})]})}])},62344,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(52405),s=e.i(72550);function a(e){return"last_viewed"===e||"active_timer"===e||"fixed"===e?e:s.DEFAULT_SHEET_SESSION_MODE_DEFAULT}var i=e.i(46549),l=e.i(27850);function o(e){let t=e.trim();if(0!==t.length){try{window.localStorage.setItem(s.DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY,t),(0,l.schedule_ui_preferences_cloud_sync)()}catch{}try{let e=encodeURIComponent(t);document.cookie=`${s.DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}let c=[{value:"last_viewed",label:"Last viewed",description:"Open the sheet you were viewing when you last used the tracker."},{value:"active_timer",label:"Sheet with active timer",description:"Open the sheet that has a running timer, when one exists."},{value:"fixed",label:"Specific sheet",description:"Always open a chosen sheet when you start a new session."}];e.s(["DefaultSheetSessionSetting",0,function({sheet_names:e}){let[u,d]=(0,r.useState)("last_viewed"),[h,f]=(0,r.useState)("");return(0,r.useEffect)(()=>{d(function(){try{let e=window.localStorage.getItem(s.DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY);return a(e)}catch{return a(null)}}());let t=function(){try{let e=window.localStorage.getItem(s.DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY)?.trim()??"";return e.length>0?e:null}catch{return null}}(),r=e[0]??"";f(t??r)},[e]),(0,t.jsxs)("fieldset",{className:"m-0 flex w-full flex-col gap-3 border-0 p-0",children:[(0,t.jsx)("legend",{className:"mb-2 text-[0.95rem] font-semibold",children:"Default sheet on new session"}),(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:c.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("label",{"aria-label":e.label,className:"flex w-full cursor-pointer items-start gap-2.5",children:[(0,t.jsx)("input",{type:"radio",name:"default-sheet-session-mode",className:"mt-0.5 shrink-0",checked:u===e.value,onChange:()=>(e=>{d(e);try{window.localStorage.setItem(s.DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY,e),(0,l.schedule_ui_preferences_cloud_sync)()}catch{}try{document.cookie=`${s.DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}"fixed"===e&&h.length>0&&o(h),(0,i.notify_settings_saved)()})(e.value)}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.9rem] font-semibold",children:e.label}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:e.description})]})]})},e.value))}),"fixed"===u?(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-[0.82rem] text-muted",children:[(0,t.jsx)("span",{children:"Sheet"}),(0,t.jsx)("select",{className:(0,n.get_input_class_name)("compact"),value:h,disabled:0===e.length,onChange:e=>{var t;f(t=e.target.value),o(t),(0,i.notify_settings_saved)()},children:e.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]}):null]})}],62344)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)())}])},19946,e=>{"use strict";var t=e.i(51268),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")}])},99997,(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 s=e.r(44066)._(e.r(33434)),i=/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(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.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)}},70782,(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(51268);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=s(e,n)),t&&(a.current=s(t,n))},[e,t])}function s(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)},88334,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(69600),a=e.r(76636);function s(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}}},20612,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},70096,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return _},useLinkStatus:function(){return x}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(44066),i=e.r(8063),o=s._(e.r(51268)),l=e.r(99997),u=e.r(4411),c=e.r(70782),d=e.r(69600),h=e.r(31508);e.r(91946);let m=e.r(35302),f=e.r(92024),p=e.r(88334),g=e.r(44017);function _(t){var r,n;let a,s,_,[x,y]=(0,o.useOptimistic)(f.IDLE_LINK_STATUS),b=(0,o.useRef)(null),{href:v,as:k,children:j,prefetch:N=null,passHref:T,replace:D,shallow:S,scroll:E,onClick:O,onMouseEnter:M,onTouchStart:C,legacyBehavior:P=!1,onNavigate:q,transitionTypes:L,ref:R,unstable_dynamicOnHover:I,...Y}=t;a=j,P&&("string"==typeof a||"number"==typeof a)&&(a=(0,i.jsx)("a",{children:a}));let H=o.default.useContext(u.AppRouterContext),F=!1!==N,A=!1!==N?null===(n=N)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,$="string"==typeof(r=k||v)?r:(0,l.formatUrl)(r);if(P){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=o.default.Children.only(a)}let B=P?s&&"object"==typeof s&&s.ref:R,W=o.default.useCallback(e=>(null!==H&&(b.current=(0,f.mountLinkInstance)(e,$,H,A,F,y)),()=>{b.current&&((0,f.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,f.unmountPrefetchableInstance)(e)}),[F,$,H,A,y]),Q={ref:(0,c.useMergedRef)(W,B),onClick(t){P||"function"!=typeof O||O(t),P&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!H||t.defaultPrevented||function(t,r,n,a,s,i,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(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(12178);o.default.startTransition(()=>{d(r,a?"replace":"push",!1===s?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,n.current,l)})}}(t,$,b,D,E,q,L)},onMouseEnter(e){P||"function"!=typeof M||M(e),P&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),H&&F&&(0,f.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){P||"function"!=typeof C||C(e),P&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),H&&F&&(0,f.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)($)?Q.href=$:P&&!T&&("a"!==s.type||"href"in s.props)||(Q.href=(0,h.addBasePath)($)),_=P?o.default.cloneElement(s,Q):(0,i.jsx)("a",{...Y,...Q,children:a}),(0,i.jsx)(w.Provider,{value:x,children:_})}e.r(20612);let w=(0,o.createContext)(f.IDLE_LINK_STATUS),x=()=>(0,o.useContext)(w);("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(8063);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(8063);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(51268),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(48042),r=e.i(51268),n=e.i(83105),a=e.i(32417),s=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[i,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:i,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,s.notify_settings_saved)("Signed out"),e.refresh()}finally{u(!1)}},[e])}}])},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)}`}])},75404,73205,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042);let a=[{href:"/",label:"Tracker",match:e=>"/"===e}];function s(){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)})})}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"})})}var o=e.i(77882);function l(){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)(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}var u=e.i(51268),c=e.i(37399),d=e.i(90463),h=e.i(46549),m=e.i(22373);let f=new Set(m.topbar_quick_action_ids),p=["today","review","templates","search","reporting","pomodoro"];function g(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return p;let r=t.filter(e=>"string"==typeof e&&f.has(e));return Array.from(new Set(r))}catch{return p}}e.s(["parse_topbar_quick_actions",0,g],73205);var _=e.i(66295),w=e.i(34869),x=e.i(92629);let y=(0,w.create_ui_preference_store)({storage_key:x.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:x.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});var b=e.i(32792),v=e.i(90299),k=e.i(28274);function j(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function N(){return j()}function T(){return"dark"}var D=e.i(35434),S=e.i(17798),E=e.i(10464),O=e.i(61834),M=e.i(81553),C=e.i(25204);let P="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",q={today:{href:"/today",label:"Today"},review:{href:"/review",label:"Review"},templates:{href:"/templates",label:"Templates"},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"}},L=new Set(["manage-tags","pomodoro","templates","sync-settings"]);function R(){let e=(0,n.useRouter)(),a=(0,n.usePathname)()??"/",s=(0,u.useSyncExternalStore)(D.subscribe_theme,N,T),i=(0,u.useSyncExternalStore)(y.subscribe,y.get_snapshot,y.get_server_snapshot),l=(0,u.useSyncExternalStore)(v.tracker_shortcut_map_preference.subscribe,v.tracker_shortcut_map_preference.get_snapshot,v.tracker_shortcut_map_preference.get_server_snapshot),f=(0,u.useSyncExternalStore)(b.topbar_quick_actions_preference.subscribe,b.topbar_quick_actions_preference.get_snapshot,b.topbar_quick_actions_preference.get_server_snapshot),p=(0,_.parse_tracker_shortcut_map)(l),w=new Set(g(f)),x=m.topbar_quick_action_ids.filter(e=>!w.has(e)),R=Array.from(new Set([...Array.from(L),...x])),{email:I,is_configured:Y,is_pending:H,sign_out:F}=(0,o.use_supabase_auth_session)(),[A,$]=(0,u.useState)(!1),B=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!A)return;let e=e=>{null===B.current||B.current.contains(e.target)||$(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[A]);let W=()=>{$(!1)};return(0,C.use_escape_to_cancel)(W,A),(0,t.jsxs)("div",{className:"relative shrink-0",ref:B,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":A,"aria-haspopup":"menu",onClick:()=>$(e=>!e),children:(0,t.jsx)(c.HamburgerIcon,{})}),A?(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:[Y&&null!==I?(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:I,children:I})}):null,R.map(e=>{let n=q[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:P,role:"menuitem",onClick:W,children:n.label})},e)}),Y?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:P,role:"menuitemcheckbox","aria-checked":"true"===i,onClick:()=>{let e="true"===i?"false":"true";y.write(e),y.notify(),(0,h.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==I&&(0,k.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"===i?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===i?"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:P,role:"menuitem",onClick:()=>{let e;W(),e="dark"===j()?"light":"dark",(0,S.apply_theme)(e),(0,M.write_stored_theme)(e),E.theme_mode_preference.write(e),(0,O.write_document_preference_cookies)({theme_mode:e,theme:e}),E.theme_mode_preference.notify(),(0,D.notify_theme_subscribers)(),(0,h.notify_settings_saved)()},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:P,role:"menuitem",onClick:()=>{let e;W(),e=p.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:"(?)"})]})})}),Y?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===I?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:P,role:"menuitem",onClick:()=>{W(),e.push((0,d.build_auth_page_href)("sign_in",a))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${P} text-danger`,role:"menuitem",disabled:H,onClick:()=>{W(),F()},children:H?"Signing out…":"Sign out"})})]}):null]}):null]})}let I=[{id:"today",href:"/today",label:"Today"},{id:"review",href:"/review",label:"Review"},{id:"templates",href:"/templates",label:"Templates"},{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"}];function Y(){let e=(0,n.usePathname)()??"/",a=(0,u.useSyncExternalStore)(b.topbar_quick_actions_preference.subscribe,b.topbar_quick_actions_preference.get_snapshot,b.topbar_quick_actions_preference.get_server_snapshot),s=(0,u.useMemo)(()=>g(a),[a]);if(0===s.length)return null;let i=I.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)})})}var H=e.i(29539);function F(){let e=((0,n.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(r.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)(H.SettingsIcon,{})})}function A({current:e,parent:n}){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)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:n.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)(A,{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)(s,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(Y,{}),(0,t.jsx)(l,{}),(0,t.jsx)(F,{}),(0,t.jsx)(R,{})]})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},18774,e=>{"use strict";e.s(["format_display_tag",0,function(e){return e.startsWith("@")?e:`@${e}`}])},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(8063),r=e.i(51268),n=e.i(18774),a=e.i(52405),s=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:i,known_tags:o,placeholder:l,disabled:u=!1,autoFocus:c=!1,on_change:d}){let h=(0,r.useRef)(null),m=(0,r.useRef)(null),f=(0,r.useRef)(null),[p,g]=(0,r.useState)(0),[_,w]=(0,r.useState)(0),x=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}}(i,p),y=null===x?[]: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)}(o,x.query),b=null!==x&&function(e,t){if(!/^\w+$/.test(e))return!1;let r=e.toLowerCase();return t.some(e=>{try{return(0,s.normalize_stored_tag)(e).slice(1).toLowerCase()===r}catch{return!1}})}(x.query,o),v=null!==x&&y.length>0&&!b&&!u;(0,r.useLayoutEffect)(()=>{null!==f.current&&null!==h.current&&(h.current.setSelectionRange(f.current,f.current),g(f.current),f.current=null)},[i]),(0,r.useEffect)(()=>{w(0)},[i,p,y.length]);let k=()=>{g(h.current?.selectionStart??i.length)},j=()=>{w(0)},N=e=>{let t,r,a;if(null===x)return;let{next_text:s,next_cursor:o}=(t=(0,n.format_display_tag)(e),r=i.slice(0,x.start_index),a=i.slice(x.end_index),{next_text:`${r}${t}${a}`,next_cursor:r.length+t.length});f.current=o,d(s),j()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:h,id:e,type:"text",role:"combobox",className:(0,a.get_input_class_name)(),value:i,placeholder:l,disabled:u,autoFocus:c,autoComplete:"off","aria-autocomplete":"list","aria-expanded":v,"aria-controls":v?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),g(e.target.selectionStart??e.target.value.length)},onClick:k,onKeyUp:k,onKeyDown:e=>{if(v){if("ArrowDown"===e.key){e.preventDefault(),w(e=>(e+1)%y.length);return}if("ArrowUp"===e.key){e.preventDefault(),w(e=>(e-1+y.length)%y.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=y[_];void 0!==t&&N(t);return}"Escape"===e.key&&(e.preventDefault(),j())}},onBlur:()=>{window.setTimeout(j,120)}}),v?(0,t.jsx)("ul",{ref:m,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:y.map((e,r)=>(0,t.jsx)("li",{role:"option","aria-selected":r===_,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===_?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),N(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},17003,e=>{"use strict";var t=e.i(27850),r=e.i(72550);e.s(["write_active_sheet_preference",0,function(e){let n=e.trim();if(0!==n.length){try{window.localStorage.setItem(r.ACTIVE_SHEET_STORAGE_KEY,n),(0,t.schedule_ui_preferences_cloud_sync)()}catch{}try{let e=encodeURIComponent(n);document.cookie=`${r.ACTIVE_SHEET_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}])},67321,e=>{"use strict";var t=e.i(17003);e.s(["navigate_to_tracker_sheet",0,function(e){(0,t.write_active_sheet_preference)(e)}])},3159,e=>{"use strict";var t=e.i(97176);let r=new Set(["/api/note"]);async function n(e,n){let a={method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},s=await fetch(e,a);if(!s.ok){var i,o;let t,n=(await s.json()).error??"Request failed";if(i=e,o=n,r.has(i)&&((t=o.toLowerCase()).includes("duplicate key")||t.includes("unique constraint"))){if(await new Promise(e=>{setTimeout(e,25)}),!(s=await fetch(e,a)).ok)throw Error((await s.json()).error??n)}else throw Error(n)}let l=await s.json();return(0,t.notify_tracker_db_cloud_sync)(e,n),l}e.s(["patch_tracker_action",0,n])},67999,e=>{"use strict";e.s(["get_serialized_entries_total_ms",0,function(e){return e.reduce((e,t)=>e+t.durationMs,0)}])},39474,20993,e=>{"use strict";var t=e.i(13349),r=e.i(32417),n=e.i(44171),a=e.i(28274);let s=null,i=Promise.resolve();function o(){(0,r.is_supabase_configured)()&&(0,n.is_cloud_sync_enabled)()&&(null!==s&&clearTimeout(s),s=setTimeout(()=>{s=null,i=i.then(()=>(0,a.run_tracker_db_cloud_sync)()).catch(()=>{})},400))}function l(){(0,t.is_greedy_cloud_sync_enabled)()&&o()}e.s(["schedule_tracker_db_cloud_sync",0,l],20993),e.s(["push_tracker_db_cloud_after_change",0,function(){(0,t.is_greedy_cloud_sync_enabled)()?l():o()}],39474)},97176,e=>{"use strict";var t=e.i(13349);async function r(e){let t=await fetch("/api/sheet/active",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});if(!t.ok)throw Error((await t.json()).error??"Failed to update active sheet in cloud")}var n=e.i(39474),a=e.i(20993);e.s(["notify_tracker_db_cloud_sync",0,function(e,s){if("/api/sheet"===e&&"object"==typeof s&&null!==s&&!0!==s.delete&&!(0,t.is_greedy_cloud_sync_enabled)()){let e=s.name?.trim()??"";e.length>0&&r(e).catch(()=>{});return}(0,t.is_greedy_cloud_sync_enabled)()?(0,a.schedule_tracker_db_cloud_sync)():(0,n.push_tracker_db_cloud_after_change)()}],97176)},44356,e=>{"use strict";var t=e.i(18774);e.s(["build_resume_description",0,function(e,r){let n=e.trim(),a=n.length>0?n:"Untitled entry",s=r.map(e=>(0,t.format_display_tag)(e)).join(" ");return s.length>0?`${a} ${s}`.trim():a}])},51229,e=>{"use strict";var t=e.i(97176);let r=new Set(["/api/note"]);async function n(e,n){let a={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},s=await fetch(e,a);if(!s.ok){var i,o;let t,n=(await s.json()).error??"Request failed";if(i=e,o=n,r.has(i)&&((t=o.toLowerCase()).includes("duplicate key")||t.includes("unique constraint"))){if(await new Promise(e=>{setTimeout(e,25)}),!(s=await fetch(e,a)).ok)throw Error((await s.json()).error??n)}else throw Error(n)}let l=await s.json();return(0,t.notify_tracker_db_cloud_sync)(e,n),l}e.s(["post_tracker_action",0,n])},56586,e=>{"use strict";let t={query:"",sheetName:"",tag:"",fromDate:"",toDate:""};e.s(["get_empty_entry_search_filters",0,function(){return{...t}}])},87231,e=>{"use strict";e.s(["build_entry_search_href",0,function(e){let t=new URLSearchParams;e.query.trim().length>0&&t.set("q",e.query.trim()),e.sheetName.trim().length>0&&t.set("sheet",e.sheetName.trim()),e.tag.trim().length>0&&t.set("tag",e.tag.trim()),e.fromDate.trim().length>0&&t.set("from",e.fromDate.trim()),e.toDate.trim().length>0&&t.set("to",e.toDate.trim());let r=t.toString();return r.length>0?`/search?${r}`:"/search"}])},17993,e=>{"use strict";var t=e.i(51268);e.s(["use_debounced_value",0,function(e,r){let[n,a]=(0,t.useState)(e);return(0,t.useEffect)(()=>{let t=window.setTimeout(()=>{a(e)},r);return()=>{window.clearTimeout(t)}},[e,r]),n}])},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)(),s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,i=(0,t.toDate)(e,r?.in),o=i.getDay();return i.setDate(i.getDate()+((o<s?-7:0)+6-(o-s))),i.setHours(23,59,59,999),i}function s(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 i=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 s=a.getDate(),i=(0,d.constructFrom)(n?.in||e,a.getTime());return(i.setMonth(a.getMonth()+r+1,0),s>=i.getDate())?i:(a.setFullYear(i.getFullYear(),i.getMonth(),s),a)}function p(e,t,r){return f(e,-t,r)}function g(e,t=new Date,n=1){let d=e=>(0,i.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=p(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(s(t))};case"last_year":{let e=f(t,-12,void 0);return{from_date:d((0,c.startOfYear)(e)),to_date:d(s(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,p],78194),e.s(["get_reporting_date_range_shortcut_inputs",0,g],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=g(t,r,n);return e.from_date===a.from_date&&e.to_date===a.to_date}],23633);var _=e.i(51268),w=e.i(57853);e.s(["use_week_starts_on",0,function(){return(0,_.useSyncExternalStore)(w.week_starts_on_preference.subscribe,w.week_starts_on_preference.get_snapshot,w.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(8063),r=e.i(52663),n=e.i(52405),a=e.i(46748),s=e.i(23633),i=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,i.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 i=(0,s.matches_reporting_date_range_shortcut)(e,n.value,new Date,m);return(0,t.jsx)("button",{type:"button",className:i?(0,r.get_button_class_name)("primary","small"):(0,r.get_button_class_name)("ghost","small"),"aria-pressed":i,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),p=e.i(36145);class g{subPriority=0;validate(e,t){return!0}}class _ extends g{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 w extends g{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 _(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 b=/^(1[0-2]|0?\d)/,v=/^(3[0-1]|[0-2]?\d)/,k=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,j=/^(5[0-3]|[0-4]?\d)/,N=/^(2[0-3]|[0-1]?\d)/,T=/^(2[0-4]|[0-1]?\d)/,D=/^(1[0-1]|0?\d)/,S=/^(1[0-2]|0?\d)/,E=/^[0-5]?\d/,O=/^[0-5]?\d/,M=/^\d/,C=/^\d{1,2}/,P=/^\d{1,3}/,q=/^\d{1,4}/,L=/^-?\d+/,R=/^-?\d/,I=/^-?\d{1,2}/,Y=/^-?\d{1,3}/,H=/^-?\d{1,4}/,F=/^([+-])(\d{2})(\d{2})?|Z/,A=/^([+-])(\d{2})(\d{2})|Z/,$=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,B=/^([+-])(\d{2}):(\d{2})|Z/,W=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Q(e,t){return e?{value:t(e.value),rest:e.rest}:e}function K(e,t){let r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function U(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,s=r[3]?parseInt(r[3],10):0,i=r[5]?parseInt(r[5],10):0;return{value:n*(a*y.millisecondsInHour+s*y.millisecondsInMinute+i*y.millisecondsInSecond),rest:t.slice(r[0].length)}}function G(e,t){switch(e){case 1:return K(M,t);case 2:return K(C,t);case 3:return K(P,t);case 4:return K(q,t);default:return K(RegExp("^\\d{1,"+e+"}"),t)}}function z(e,t){switch(e){case 1:return K(R,t);case 2:return K(I,t);case 3:return K(Y,t);case 4:return K(H,t);default:return K(RegExp("^-?\\d{1,"+e+"}"),t)}}function X(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function V(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 Z(e){return e%400==0||e%4==0&&e%100!=0}var J=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],es=[31,29,31,30,31,30,31,31,30,31,30,31];var ei=e.i(98636);function eo(e,t,r){let n=(0,p.getDefaultOptions)(),a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=(0,u.toDate)(e,r?.in),i=s.getDay(),o=7-a,l=t<0||t>6?t-(i+o)%7:((t%7+7)%7+o)%7-(i+o)%7;return(0,ei.addDays)(s,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(G(4,e),n);case"yo":return Q(r.ordinalNumber(e,{unit:"year"}),n);default:return Q(G(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=V(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(G(4,e),n);case"Yo":return Q(r.ordinalNumber(e,{unit:"year"}),n);default:return Q(G(t.length,e),n)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,n){let a=(0,J.getWeekYear)(e,n);if(r.isTwoDigitYear){let t=V(r.year,a);return e.setFullYear(t,0,n.firstWeekContainsDate),e.setHours(0,0,0,0),(0,ee.startOfWeek)(e,n)}let s="era"in t&&1!==t.era?1-r.year:r.year;return e.setFullYear(s,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?z(4,e):z(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?z(4,e):z(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 G(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 G(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(K(b,e),n);case"MM":return Q(G(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(K(b,e),n);case"LL":return Q(G(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 K(j,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return G(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,n){let a,s;return(0,ee.startOfWeek)((a=(0,u.toDate)(e,n?.in),s=(0,er.getWeek)(a,n)-r,a.setDate(a.getDate()-7*s),(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 K(j,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return G(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 K(v,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return G(t.length,e)}}validate(e,t){let r=Z(e.getFullYear()),n=e.getMonth();return r?t>=1&&t<=es[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 K(k,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return G(t.length,e)}}validate(e,t){return Z(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(G(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(G(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 G(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 s,i,o;return n=e,s=(0,u.toDate)(n,void 0),a=void 0,o=0===(i=(0,u.toDate)(s,a?.in).getDay())?7:i,(e=(0,ei.addDays)(s,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(X(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(X(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(X(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 K(S,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return G(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 K(N,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return G(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 K(D,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return G(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 K(T,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return G(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 K(E,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return G(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 K(O,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return G(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(G(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 U(F,e);case"XX":return U(A,e);case"XXXX":return U($,e);case"XXXXX":return U(W,e);default:return U(B,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 U(F,e);case"xx":return U(A,e);case"xxxx":return U($,e);case"xxxxx":return U(W,e);default:return U(B,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 K(L,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 K(L,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/,ep=/[a-zA-Z]/;function eg(e,t,r,n){let a=()=>(0,f.constructFrom)(n?.in||r,NaN),s=Object.assign({},(0,p.getDefaultOptions)()),i=n?.locale??s.locale??d.defaultLocale,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,l=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(!t)return e?a():(0,u.toDate)(r,n?.in);let c={firstWeekContainsDate:o,weekStartsOn:l,locale:i},g=[new w(n?.in,r)],_=t.match(ed).map(e=>{let t=e[0];return t in h.longFormatters?(0,h.longFormatters[t])(e,i.formatLong):e}).join("").match(ec),x=[];for(let r of _){!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 s=r[0],o=eu[s];if(o){let{incompatibleTokens:t}=o;if(Array.isArray(t)){let e=x.find(e=>t.includes(e.token)||e.token===s);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:s,fullToken:r});let n=o.run(e,r,i.match,c);if(!n)return a();g.push(n.setter),e=n.rest}else{if(s.match(ep))throw RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");if("''"===r?r="'":"'"===s&&(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=g.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,r)=>r.indexOf(e)===t).map(e=>g.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),b=(0,u.toDate)(r,n?.in);if(isNaN(+b))return a();let v={};for(let e of y){if(!e.validate(b,c))return a();let t=e.set(b,v,c);Array.isArray(t)?(b=t[0],Object.assign(v,t[1])):b=t}return b}var e_=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=eg(e,"yyyy-MM-dd",new Date),n=eg(t,"yyyy-MM-dd",new Date);return Number.isNaN(+r)||Number.isNaN(+n)||+r>+n?null:{startMs:+(0,e_.startOfDay)(r),endMs:+c(n)}}],54873)},90904,65604,e=>{"use strict";var t=e.i(8063),r=e.i(55437),n=e.i(18774),a=e.i(52663),s=e.i(52405),i=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},p=e.fromDate.length>0!=e.toDate.length>0||e.fromDate.length>0&&e.toDate.length>0&&null===(0,i.get_date_range_ms_from_inputs)(e.fromDate,e.toDate),g=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,s.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,s.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:p,on_range_change:t=>h({...e,fromDate:t.from_date,toDate:t.to_date}),on_clear:()=>h({...e,fromDate:"",toDate:""})}),g?(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)},50804,e=>{"use strict";var t=e.i(8063),r=e.i(48042),n=e.i(51268),a=e.i(41619),s=e.i(90904),i=e.i(56586);function o({filters:e,sheet_names:r,tag_names:n,is_pending:a,on_change:l}){return(0,t.jsx)(s.EntryFacetFiltersPanel,{filters:e,sheet_names:r,tag_names:n,is_pending:a,on_change:t=>l({...e,...t}),on_clear:()=>l({...(0,i.get_empty_entry_search_filters)(),query:e.query})})}var l=e.i(75404),u=e.i(87231),c=e.i(44356);async function d(e,t){let r=await fetch(e,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok)throw Error((await r.json()).error??"Request failed");return await r.json()}async function h(e){let t=new URLSearchParams;e.query.trim().length>0&&t.set("q",e.query.trim()),e.sheetName.trim().length>0&&t.set("sheet",e.sheetName.trim()),e.tag.trim().length>0&&t.set("tag",e.tag.trim()),e.fromDate.trim().length>0&&t.set("from",e.fromDate.trim()),e.toDate.trim().length>0&&t.set("to",e.toDate.trim());let r=t.size>0?`?${t.toString()}`:"",n=await fetch(`/api/entries/search${r}`,{method:"GET",cache:"no-store"});if(!n.ok)throw Error((await n.json().catch(()=>({}))).error??"Failed to search entries");return await n.json()}var m=e.i(52405),f=e.i(67999),p=e.i(67321),g=e.i(3159),_=e.i(51229),w=e.i(17993);e.s(["EntrySearchView",0,function({initial_filters:e,initial_data:s}){var i;let x=(0,r.useRouter)(),[y,b]=(0,n.useState)(e),[v,k]=(0,n.useState)(s),[j,N]=(0,n.useState)(null),[T,D]=(0,n.useState)(!1),S=(0,w.use_debounced_value)(y,250),E=(0,n.useRef)(!0);(0,n.useEffect)(()=>{b(e),k(s)},[e,s]),(0,n.useEffect)(()=>{x.replace((0,u.build_entry_search_href)(S),{scroll:!1})},[S,x]),(0,n.useEffect)(()=>{if(E.current&&S.query.trim()===e.query.trim()&&S.sheetName.trim()===e.sheetName.trim()&&S.tag.trim()===e.tag.trim()&&S.fromDate.trim()===e.fromDate.trim()&&S.toDate.trim()===e.toDate.trim()){E.current=!1;return}E.current=!1;let t=!1;return(async()=>{D(!0),N(null);try{let e=await h(S);t||k(e)}catch(e){t||N(e instanceof Error?e.message:String(e))}finally{t||D(!1)}})(),()=>{t=!0}},[S,e]);let O=(0,n.useMemo)(()=>v.sheetNames.map(e=>({name:e,activeEntryID:null,entryCount:0,isActive:!1,hasActiveEntry:!1})),[v.sheetNames]),M=(0,n.useMemo)(()=>(0,f.get_serialized_entries_total_ms)(v.entries),[v.entries]),C=(0,n.useCallback)(async e=>{D(!0),N(null);try{await e();let t=await h(S);k(t)}catch(e){N(e instanceof Error?e.message:String(e))}finally{D(!1)}},[S]),P=y.query.trim().length>0||y.sheetName.length>0||y.tag.length>0||y.fromDate.length>0||y.toDate.length>0?"No entries match your search.":"Showing recent entries. Type to search descriptions, tags, and notes.";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.TrackerTopbar,{breadcrumb:{current:"Search"}}),(0,t.jsxs)("main",{className:"mx-auto flex w-full max-w-3xl flex-col gap-5 px-5 pb-12 pt-6",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h1",{className:"m-0 text-[1.5rem] font-[650] tracking-tight",children:"Search entries"}),(0,t.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:"Search across descriptions, @tags, and notes. Filter by sheet, tag, or date range."})]}),(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:"Search"}),(0,t.jsx)("input",{type:"search",className:(0,m.get_input_class_name)(),placeholder:"Search descriptions, tags, notes…",value:y.query,disabled:T,onChange:e=>b(t=>({...t,query:e.target.value}))})]}),(0,t.jsx)(o,{filters:y,sheet_names:v.sheetNames,tag_names:v.tagNames,is_pending:T,on_change:b}),null===j?null:(0,t.jsx)("p",{className:"m-0 border border-danger-border bg-danger-soft px-3 py-2.5 text-[0.85rem] text-danger-text",children:j}),(0,t.jsxs)("section",{className:"rounded-md border border-panel-border bg-panel p-4 shadow-sm",children:[(0,t.jsxs)("p",{className:"m-0 mb-3 text-[0.85rem] text-muted",children:[0===(i=v.totalCount)?"No results":1===i?"1 result":`${i} results`,v.totalCount>v.entries.length?` (showing ${v.entries.length})`:null]}),(0,t.jsx)(a.EntryList,{title:"Results",entries:v.entries,sheets:O,known_tags:v.tagNames,total_ms:M,empty_message:P,is_pending:T,show_sheet_name:!0,on_delete:e=>C(()=>d("/api/entry",{sheetName:e.sheetName,entryId:e.id})),on_edit:(e,t)=>C(()=>(0,g.patch_tracker_action)("/api/entry",{sheetName:e.sheetName,entryId:e.id,...t})),on_move:(e,t)=>C(()=>(0,_.post_tracker_action)("/api/entry/move",{sheetName:e.sheetName,entryId:e.id,targetSheetName:t})),on_move_many:(e,t)=>C(()=>(0,_.post_tracker_action)("/api/entry/move-bulk",{entries:e.map(e=>({sheetName:e.sheetName,entryId:e.id})),targetSheetName:t})),on_delete_many:e=>C(()=>(0,_.post_tracker_action)("/api/entry/delete-bulk",{entries:e.map(e=>({sheetName:e.sheetName,entryId:e.id}))})),on_edit_note:(e,t,r,n)=>C(()=>(0,g.patch_tracker_action)("/api/note",{sheetName:e.sheetName,entryId:e.id,timestamp:t,originalText:r,text:n})),on_add_note:(e,t)=>C(()=>(0,_.post_tracker_action)("/api/note",{sheetName:e.sheetName,entryId:e.id,text:t})),on_resume:e=>C(async()=>{(0,p.navigate_to_tracker_sheet)(e.sheetName),await (0,_.post_tracker_action)("/api/in",{description:(0,c.build_resume_description)(e.description,e.tags),sheetName:e.sheetName}),x.push("/")}),on_split:(e,t)=>C(()=>(0,_.post_tracker_action)("/api/entry/split",{sheetName:e.sheetName,entryId:e.id,at:t})),on_merge:(e,t)=>C(()=>(0,_.post_tracker_action)("/api/entry/merge",{sheetName:e.sheetName,entryId:e.id,direction:t}))})]})]})]})}],50804)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37193,e=>{"use strict";e.s(["message_from_unknown_error",0,function(e,t){return e instanceof Error?e.message:"string"==typeof e?e:t}])},99997,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return c},urlObjectKeys:function(){return o}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(44066)._(e.r(33434)),l=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",o=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)),o&&"object"==typeof o&&(o=String(s.urlQueryToSearchParams(o)));let u=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==c?(c="//"+(c||""),a&&"/"!==a[0]&&(a="/"+a)):c||(c=""),i&&"#"!==i[0]&&(i="#"+i),u&&"?"!==u[0]&&(u="?"+u),a=a.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${a}${u}${i}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return i(e)}},70782,(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(51268);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=s(e,n)),t&&(a.current=s(t,n))},[e,t])}function s(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)},88334,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(69600),a=e.r(76636);function s(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}}},20612,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},70096,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(44066),l=e.r(8063),i=s._(e.r(51268)),o=e.r(99997),c=e.r(4411),u=e.r(70782),d=e.r(69600),m=e.r(31508);e.r(91946);let p=e.r(35302),h=e.r(92024),f=e.r(88334),g=e.r(44017);function x(t){var r,n;let a,s,x,[b,y]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,i.useRef)(null),{href:j,as:w,children:N,prefetch:k=null,passHref:S,replace:C,shallow:E,scroll:T,onClick:$,onMouseEnter:R,onTouchStart:O,legacyBehavior:L=!1,onNavigate:P,transitionTypes:A,ref:M,unstable_dynamicOnHover:D,...I}=t;a=N,L&&("string"==typeof a||"number"==typeof a)&&(a=(0,l.jsx)("a",{children:a}));let U=i.default.useContext(c.AppRouterContext),q=!1!==k,F=!1!==k?null===(n=k)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=w||j)?r:(0,o.formatUrl)(r);if(L){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});s=i.default.Children.only(a)}let K=L?s&&"object"==typeof s&&s.ref:M,z=i.default.useCallback(e=>(null!==U&&(v.current=(0,h.mountLinkInstance)(e,B,U,F,q,y)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[q,B,U,F,y]),W={ref:(0,u.useMergedRef)(z,K),onClick(t){L||"function"!=typeof $||$(t),L&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!U||t.defaultPrevented||function(t,r,n,a,s,l,o){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,f.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(12178);i.default.startTransition(()=>{d(r,a?"replace":"push",!1===s?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,o)})}}(t,B,v,C,T,P,A)},onMouseEnter(e){L||"function"!=typeof R||R(e),L&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),U&&q&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){L||"function"!=typeof O||O(e),L&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),U&&q&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(B)?W.href=B:L&&!S&&("a"!==s.type||"href"in s.props)||(W.href=(0,m.addBasePath)(B)),x=L?i.default.cloneElement(s,W):(0,l.jsx)("a",{...I,...W,children:a}),(0,l.jsx)(_.Provider,{value:b,children:x})}e.r(20612);let _=(0,i.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(_);("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(8063);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"})]})}])},25204,e=>{"use strict";var t=e.i(51268),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])}])},37399,e=>{"use strict";var t=e.i(8063);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"})]})}])},77882,e=>{"use strict";var t=e.i(48042),r=e.i(51268),n=e.i(83105),a=e.i(32417),s=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[l,i]=(0,r.useState)(null),[o,c]=(0,r.useState)(!1),u=(0,a.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}})=>{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()}},[u]),{is_configured:u,email:l,is_pending:o,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,s.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},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)}`}])},75404,73205,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042);let a=[{href:"/",label:"Tracker",match:e=>"/"===e}];function s(){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)})})}function l(){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"})})}var i=e.i(77882);function o(){let{email:e,is_configured:r}=(0,i.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)(l,{})}),(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}var c=e.i(51268),u=e.i(37399),d=e.i(90463),m=e.i(46549),p=e.i(22373);let h=new Set(p.topbar_quick_action_ids),f=["today","review","templates","search","reporting","pomodoro"];function g(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return f;let r=t.filter(e=>"string"==typeof e&&h.has(e));return Array.from(new Set(r))}catch{return f}}e.s(["parse_topbar_quick_actions",0,g],73205);var x=e.i(66295),_=e.i(34869),b=e.i(92629);let y=(0,_.create_ui_preference_store)({storage_key:b.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:b.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});var v=e.i(32792),j=e.i(90299),w=e.i(28274);function N(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function k(){return N()}function S(){return"dark"}var C=e.i(35434),E=e.i(17798),T=e.i(10464),$=e.i(61834),R=e.i(81553),O=e.i(25204);let L="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",P={today:{href:"/today",label:"Today"},review:{href:"/review",label:"Review"},templates:{href:"/templates",label:"Templates"},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"}},A=new Set(["manage-tags","pomodoro","templates","sync-settings"]);function M(){let e=(0,n.useRouter)(),a=(0,n.usePathname)()??"/",s=(0,c.useSyncExternalStore)(C.subscribe_theme,k,S),l=(0,c.useSyncExternalStore)(y.subscribe,y.get_snapshot,y.get_server_snapshot),o=(0,c.useSyncExternalStore)(j.tracker_shortcut_map_preference.subscribe,j.tracker_shortcut_map_preference.get_snapshot,j.tracker_shortcut_map_preference.get_server_snapshot),h=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),f=(0,x.parse_tracker_shortcut_map)(o),_=new Set(g(h)),b=p.topbar_quick_action_ids.filter(e=>!_.has(e)),M=Array.from(new Set([...Array.from(A),...b])),{email:D,is_configured:I,is_pending:U,sign_out:q}=(0,i.use_supabase_auth_session)(),[F,B]=(0,c.useState)(!1),K=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!F)return;let e=e=>{null===K.current||K.current.contains(e.target)||B(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[F]);let z=()=>{B(!1)};return(0,O.use_escape_to_cancel)(z,F),(0,t.jsxs)("div",{className:"relative shrink-0",ref:K,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":F,"aria-haspopup":"menu",onClick:()=>B(e=>!e),children:(0,t.jsx)(u.HamburgerIcon,{})}),F?(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:[I&&null!==D?(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:D,children:D})}):null,M.map(e=>{let n=P[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:L,role:"menuitem",onClick:z,children:n.label})},e)}),I?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:L,role:"menuitemcheckbox","aria-checked":"true"===l,onClick:()=>{let e="true"===l?"false":"true";y.write(e),y.notify(),(0,m.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==D&&(0,w.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"===l?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===l?"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:L,role:"menuitem",onClick:()=>{let e;z(),e="dark"===N()?"light":"dark",(0,E.apply_theme)(e),(0,R.write_stored_theme)(e),T.theme_mode_preference.write(e),(0,$.write_document_preference_cookies)({theme_mode:e,theme:e}),T.theme_mode_preference.notify(),(0,C.notify_theme_subscribers)(),(0,m.notify_settings_saved)()},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:L,role:"menuitem",onClick:()=>{let e;z(),e=f.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:"(?)"})]})})}),I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===D?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:L,role:"menuitem",onClick:()=>{z(),e.push((0,d.build_auth_page_href)("sign_in",a))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${L} text-danger`,role:"menuitem",disabled:U,onClick:()=>{z(),q()},children:U?"Signing out…":"Sign out"})})]}):null]}):null]})}let D=[{id:"today",href:"/today",label:"Today"},{id:"review",href:"/review",label:"Review"},{id:"templates",href:"/templates",label:"Templates"},{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"}];function I(){let e=(0,n.usePathname)()??"/",a=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),s=(0,c.useMemo)(()=>g(a),[a]);if(0===s.length)return null;let l=D.filter(e=>s.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 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)})})}var U=e.i(29539);function q(){let e=((0,n.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(r.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)(U.SettingsIcon,{})})}function F({current:e,parent:n}){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)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:n.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)(F,{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)(s,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(I,{}),(0,t.jsx)(o,{}),(0,t.jsx)(q,{}),(0,t.jsx)(M,{})]})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},18774,e=>{"use strict";e.s(["format_display_tag",0,function(e){return e.startsWith("@")?e:`@${e}`}])},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(8063),r=e.i(51268),n=e.i(18774),a=e.i(52405),s=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:l,known_tags:i,placeholder:o,disabled:c=!1,autoFocus:u=!1,on_change:d}){let m=(0,r.useRef)(null),p=(0,r.useRef)(null),h=(0,r.useRef)(null),[f,g]=(0,r.useState)(0),[x,_]=(0,r.useState)(0),b=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}}(l,f),y=null===b?[]: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,b.query),v=null!==b&&function(e,t){if(!/^\w+$/.test(e))return!1;let r=e.toLowerCase();return t.some(e=>{try{return(0,s.normalize_stored_tag)(e).slice(1).toLowerCase()===r}catch{return!1}})}(b.query,i),j=null!==b&&y.length>0&&!v&&!c;(0,r.useLayoutEffect)(()=>{null!==h.current&&null!==m.current&&(m.current.setSelectionRange(h.current,h.current),g(h.current),h.current=null)},[l]),(0,r.useEffect)(()=>{_(0)},[l,f,y.length]);let w=()=>{g(m.current?.selectionStart??l.length)},N=()=>{_(0)},k=e=>{let t,r,a;if(null===b)return;let{next_text:s,next_cursor:i}=(t=(0,n.format_display_tag)(e),r=l.slice(0,b.start_index),a=l.slice(b.end_index),{next_text:`${r}${t}${a}`,next_cursor:r.length+t.length});h.current=i,d(s),N()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:m,id:e,type:"text",role:"combobox",className:(0,a.get_input_class_name)(),value:l,placeholder:o,disabled:c,autoFocus:u,autoComplete:"off","aria-autocomplete":"list","aria-expanded":j,"aria-controls":j?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),g(e.target.selectionStart??e.target.value.length)},onClick:w,onKeyUp:w,onKeyDown:e=>{if(j){if("ArrowDown"===e.key){e.preventDefault(),_(e=>(e+1)%y.length);return}if("ArrowUp"===e.key){e.preventDefault(),_(e=>(e-1+y.length)%y.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=y[x];void 0!==t&&k(t);return}"Escape"===e.key&&(e.preventDefault(),N())}},onBlur:()=>{window.setTimeout(N,120)}}),j?(0,t.jsx)("ul",{ref:p,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:y.map((e,r)=>(0,t.jsx)("li",{role:"option","aria-selected":r===x,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===x?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),k(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},39474,20993,e=>{"use strict";var t=e.i(13349),r=e.i(32417),n=e.i(44171),a=e.i(28274);let s=null,l=Promise.resolve();function i(){(0,r.is_supabase_configured)()&&(0,n.is_cloud_sync_enabled)()&&(null!==s&&clearTimeout(s),s=setTimeout(()=>{s=null,l=l.then(()=>(0,a.run_tracker_db_cloud_sync)()).catch(()=>{})},400))}function o(){(0,t.is_greedy_cloud_sync_enabled)()&&i()}e.s(["schedule_tracker_db_cloud_sync",0,o],20993),e.s(["push_tracker_db_cloud_after_change",0,function(){(0,t.is_greedy_cloud_sync_enabled)()?o():i()}],39474)},97176,e=>{"use strict";var t=e.i(13349);async function r(e){let t=await fetch("/api/sheet/active",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});if(!t.ok)throw Error((await t.json()).error??"Failed to update active sheet in cloud")}var n=e.i(39474),a=e.i(20993);e.s(["notify_tracker_db_cloud_sync",0,function(e,s){if("/api/sheet"===e&&"object"==typeof s&&null!==s&&!0!==s.delete&&!(0,t.is_greedy_cloud_sync_enabled)()){let e=s.name?.trim()??"";e.length>0&&r(e).catch(()=>{});return}(0,t.is_greedy_cloud_sync_enabled)()?(0,a.schedule_tracker_db_cloud_sync)():(0,n.push_tracker_db_cloud_after_change)()}],97176)},44356,e=>{"use strict";var t=e.i(18774);e.s(["build_resume_description",0,function(e,r){let n=e.trim(),a=n.length>0?n:"Untitled entry",s=r.map(e=>(0,t.format_display_tag)(e)).join(" ");return s.length>0?`${a} ${s}`.trim():a}])},51229,e=>{"use strict";var t=e.i(97176);let r=new Set(["/api/note"]);async function n(e,n){let a={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},s=await fetch(e,a);if(!s.ok){var l,i;let t,n=(await s.json()).error??"Request failed";if(l=e,i=n,r.has(l)&&((t=i.toLowerCase()).includes("duplicate key")||t.includes("unique constraint"))){if(await new Promise(e=>{setTimeout(e,25)}),!(s=await fetch(e,a)).ok)throw Error((await s.json()).error??n)}else throw Error(n)}let o=await s.json();return(0,t.notify_tracker_db_cloud_sync)(e,n),o}e.s(["post_tracker_action",0,n])},36178,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}])},75899,35923,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")}],75899);var r=e.i(51268),n=e.i(97891);e.s(["use_time_format",0,function(){return(0,r.useSyncExternalStore)(n.time_format_preference.subscribe,n.time_format_preference.get_snapshot,n.time_format_preference.get_server_snapshot)}],35923)},69837,e=>{"use strict";var t=e.i(39552);e.s(["format_datetime_hint",0,function(e){return(0,t.format)(new Date(e),"MMM d, h:mm a")}])},3159,e=>{"use strict";var t=e.i(97176);let r=new Set(["/api/note"]);async function n(e,n){let a={method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},s=await fetch(e,a);if(!s.ok){var l,i;let t,n=(await s.json()).error??"Request failed";if(l=e,i=n,r.has(l)&&((t=i.toLowerCase()).includes("duplicate key")||t.includes("unique constraint"))){if(await new Promise(e=>{setTimeout(e,25)}),!(s=await fetch(e,a)).ok)throw Error((await s.json()).error??n)}else throw Error(n)}let o=await s.json();return(0,t.notify_tracker_db_cloud_sync)(e,n),o}e.s(["patch_tracker_action",0,n])},52161,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(52663),a=e.i(52405),s=e.i(25204);e.s(["NoteForm",0,function({on_submit:e,on_cancel:l,is_pending:i,in_active_panel:o=!1,in_bar:c=!1,allow_at:u=!1}){let[d,m]=(0,r.useState)(""),[p,h]=(0,r.useState)("");return(0,s.use_escape_to_cancel)(()=>l?.(),void 0!==l),(0,t.jsxs)("form",{className:`flex flex-col gap-2 ${o&&!c?"border-t border-accent-border pt-4":c?"border-t border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))] pt-3.5":""}`,onSubmit:t=>{t.preventDefault();let r=d.trim();if(0===r.length)return;let n=p.trim();e(r,n.length>0?n:void 0),m(""),h("")},children:[(0,t.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-text",children:"Add note"}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,t.jsx)("input",{id:"note-text",className:(0,a.get_input_class_name)(),value:d,onChange:e=>m(e.target.value),placeholder:"Pair with alice on the widget",disabled:i,autoFocus:!0}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 max-[860px]:w-full",children:[(0,t.jsx)("button",{type:"submit",className:(0,n.get_button_class_name)("ghost"),disabled:i||0===d.trim().length,children:"Save note"}),void 0===l?null:(0,t.jsx)("button",{type:"button",className:(0,n.get_button_class_name)("ghost"),disabled:i,onClick:l,children:"Cancel"})]})]}),u?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-at",children:["Note time"," ",(0,t.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,t.jsx)("input",{id:"note-at",className:(0,a.get_input_class_name)(),value:p,onChange:e=>h(e.target.value),placeholder:"e.g. 30 minutes ago",disabled:i})]}):null]})}],52161)},94287,e=>{"use strict";var t=e.i(8063),r=e.i(48042),n=e.i(51268),a=e.i(69837),s=e.i(75899),l=e.i(52161),i=e.i(14260),o=e.i(75404),c=e.i(36178),u=e.i(44356),d=e.i(18774),m=e.i(32584),p=e.i(52663),h=e.i(52405),f=e.i(37193),g=e.i(3159),x=e.i(51229),_=e.i(1800),b=e.i(35923);let y="w-full rounded-md border border-panel-border bg-panel p-4 shadow-sm";function v({label:e,value:r,tone:n="default"}){var a;let s="accent"===(a=n)?"text-accent":"danger"===a?"text-danger":"text-foreground";return(0,t.jsxs)("article",{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] ${s}`,children:r})]})}function j({label:e,count:r,active:n,on_click:a}){return(0,t.jsxs)("button",{type:"button",className:`flex cursor-pointer items-center justify-between gap-2 rounded-md border-0 px-2.5 py-2 text-left font-inherit text-[0.86rem] ${n?"bg-accent-soft text-foreground":"bg-transparent text-muted hover:bg-surface-hover hover:text-foreground"}`,onClick:a,children:[(0,t.jsx)("span",{className:"font-semibold",children:e}),(0,t.jsx)("span",{className:"rounded-full bg-background px-2 py-0.5 text-[0.72rem] text-muted",children:r})]})}function w({entries:e,is_pending:r,on_close:n}){return(0,t.jsxs)("section",{className:y,"aria-label":"Running timers",children:[(0,t.jsx)(O,{title:"Close running timers",description:"Set an end time and optional checkout note before wrapping the day."}),0===e.length?(0,t.jsx)(L,{message:"No timers are running."}):(0,t.jsx)("ul",{className:"m-0 mt-4 flex list-none flex-col gap-3 p-0",children:e.map(e=>(0,t.jsx)(N,{entry:e,is_pending:r,on_close:n},`${e.sheetName}-${e.id}`))})]})}function N({entry:e,is_pending:r,on_close:a}){let[l,i]=(0,n.useState)(""),[o,c]=(0,n.useState)(""),u=(0,_.use_duration_format)(),d=(0,b.use_time_format)();return(0,t.jsxs)("li",{className:"rounded-md border border-panel-border bg-background p-3",children:[(0,t.jsx)(R,{entry:e,duration_ms:e.durationMs}),(0,t.jsxs)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:["Started ",(0,s.format_time)(e.start,d),". Running for"," ",(0,m.format_duration)(e.durationMs,u),"."]}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-2 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]",children:[(0,t.jsx)("input",{className:(0,h.get_input_class_name)("compact"),value:l,disabled:r,placeholder:"End time, e.g. now or 5pm","aria-label":"Checkout time",onChange:e=>i(e.target.value)}),(0,t.jsx)("input",{className:(0,h.get_input_class_name)("compact"),value:o,disabled:r,placeholder:"Checkout note","aria-label":"Checkout note",onChange:e=>c(e.target.value)}),(0,t.jsx)("button",{type:"button",className:(0,p.get_button_class_name)("primary","small"),disabled:r,onClick:()=>a(e,l.trim().length>0?l.trim():void 0,o.trim().length>0?o.trim():void 0),children:"Close timer"})]})]})}function k({entries:e,threshold_ms:r,known_tags:n,is_pending:a,on_save:s}){let l=(0,_.use_duration_format)();return(0,t.jsxs)("section",{className:y,"aria-label":"Long entries",children:[(0,t.jsx)(O,{title:"Review suspiciously long entries",description:`Entries at or above ${(0,m.format_duration)(r,l)} are listed here for correction.`}),0===e.length?(0,t.jsx)(L,{message:"No long entries need review."}):(0,t.jsx)("ul",{className:"m-0 mt-4 flex list-none flex-col gap-3 p-0",children:e.map(e=>(0,t.jsx)(T,{entry:e,known_tags:n,is_pending:a,show_times:!0,on_save:s},`${e.sheetName}-${e.id}`))})]})}function S({gaps:e,sheet_names:r,known_tags:n,is_pending:a,on_create:s}){return(0,t.jsxs)("section",{className:y,"aria-label":"Idle gaps",children:[(0,t.jsx)(O,{title:"Fill idle gaps",description:"Create completed entries for untracked time between today's logged blocks."}),0===e.length?(0,t.jsx)(L,{message:"No idle gaps found between entries."}):(0,t.jsx)("ul",{className:"m-0 mt-4 flex list-none flex-col gap-3 p-0",children:e.map(e=>(0,t.jsx)(C,{gap:e,sheet_names:r,known_tags:n,is_pending:a,on_create:s},e.id))})]})}function C({gap:e,sheet_names:r,known_tags:a,is_pending:l,on_create:o}){let c=(0,b.use_time_format)(),u=(0,_.use_duration_format)(),d=e.previousEntry?.sheetName??r[0]??"",[f,g]=(0,n.useState)(d),[x,y]=(0,n.useState)(""),[v,j]=(0,n.useState)("");return(0,t.jsxs)("li",{className:"rounded-md border border-panel-border bg-background p-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsxs)("p",{className:"m-0 font-semibold",children:[(0,s.format_time)(e.start,c)," to"," ",(0,s.format_time)(e.end,c)]}),(0,t.jsx)("span",{className:"font-mono text-[0.86rem] font-semibold text-accent",children:(0,m.format_duration)(e.durationMs,u)})]}),(0,t.jsxs)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:["Between ",e.previousEntry?.description||"the previous entry"," and"," ",e.nextEntry?.description||"the next entry","."]}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-2 md:grid-cols-[11rem_minmax(0,1fr)]",children:[(0,t.jsx)("select",{className:(0,h.get_input_class_name)("compact"),value:f,disabled:l,"aria-label":"Gap sheet",onChange:e=>g(e.target.value),children:r.map(e=>(0,t.jsx)("option",{value:e,children:e},e))}),(0,t.jsx)(i.TagAutocompleteInput,{id:`gap-description-${e.id}`,value:x,known_tags:a,placeholder:"What filled this gap? Add @tags",disabled:l,on_change:y}),(0,t.jsx)("input",{className:`${(0,h.get_input_class_name)("compact")} md:col-span-2`,value:v,disabled:l,placeholder:"Optional note","aria-label":"Gap note",onChange:e=>j(e.target.value)})]}),(0,t.jsx)("button",{type:"button",className:`${(0,p.get_button_class_name)("primary","small")} mt-3`,disabled:l||0===f.length||0===x.trim().length,onClick:()=>o(e,f,x.trim(),v.trim().length>0?v.trim():void 0),children:"Create entry"})]})}function E({issues:e,known_tags:r,is_pending:n,on_save:a}){return(0,t.jsxs)("section",{className:y,"aria-label":"Tag issues",children:[(0,t.jsx)(O,{title:"Normalize tags",description:"Add missing tags and clean up tag casing on today's entries."}),0===e.length?(0,t.jsx)(L,{message:"No tag cleanup needed."}):(0,t.jsx)("ul",{className:"m-0 mt-4 flex list-none flex-col gap-3 p-0",children:e.map(e=>(0,t.jsx)(T,{entry:e.entry,known_tags:r,is_pending:n,issue_label:e.kinds.map(e=>"missing_tags"===e?"Missing tags":"Tag casing differs").join(" and "),on_save:(e,t)=>{void 0!==t&&a(e,t)}},`${e.entry.sheetName}-${e.entry.id}`))})]})}function T({entry:e,known_tags:r,is_pending:s,issue_label:l,show_times:o=!1,on_save:c}){let[d,m]=(0,n.useState)((0,u.build_resume_description)(e.description,e.tags)),[f,g]=(0,n.useState)(""),[x,_]=(0,n.useState)(""),b=d.trim()!==(0,u.build_resume_description)(e.description,e.tags).trim()||f.trim().length>0||x.trim().length>0;return(0,t.jsxs)("li",{className:"rounded-md border border-panel-border bg-background p-3",children:[(0,t.jsx)(R,{entry:e,duration_ms:e.reviewDurationMs}),void 0===l?null:(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:l}),(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[(0,t.jsx)(i.TagAutocompleteInput,{id:`review-entry-${e.sheetName}-${e.id}`,value:d,known_tags:r,disabled:s,placeholder:"Description with @tags",on_change:m}),o?(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,t.jsx)("input",{className:(0,h.get_input_class_name)("compact"),value:f,disabled:s,placeholder:`Start: ${(0,a.format_datetime_hint)(e.start)}`,"aria-label":"Entry start",onChange:e=>g(e.target.value)}),(0,t.jsx)("input",{className:(0,h.get_input_class_name)("compact"),value:x,disabled:s,placeholder:null===e.end?"End: still running":`End: ${(0,a.format_datetime_hint)(e.end)}`,"aria-label":"Entry end",onChange:e=>_(e.target.value)})]}):null,(0,t.jsx)("button",{type:"button",className:`${(0,p.get_button_class_name)("primary","small")} w-fit`,disabled:s||!b,onClick:()=>c(e,d.trim(),f.trim().length>0?f.trim():void 0,x.trim().length>0?x.trim():void 0),children:"Save changes"})]})]})}function $({entries:e,is_pending:r,on_add_note:n}){return(0,t.jsxs)("section",{className:y,"aria-label":"Review notes",children:[(0,t.jsx)(O,{title:"Add handoff notes",description:"Attach details to entries while the work is still fresh."}),0===e.length?(0,t.jsx)(L,{message:"No entries today."}):(0,t.jsx)("ul",{className:"m-0 mt-4 flex list-none flex-col gap-3 p-0",children:e.map(e=>(0,t.jsxs)("li",{className:"rounded-md border border-panel-border bg-background p-3",children:[(0,t.jsx)(R,{entry:e,duration_ms:e.reviewDurationMs}),e.notes.length>0?(0,t.jsxs)("p",{className:"m-0 mt-1 text-[0.8rem] text-muted",children:[e.notes.length," ",1===e.notes.length?"note":"notes"," already added."]}):null,(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(l.NoteForm,{is_pending:r,allow_at:!0,on_submit:(t,r)=>n(e,t,r)})})]},`${e.sheetName}-${e.id}`))})]})}function R({entry:e,duration_ms:r}){let n=(0,_.use_duration_format)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0",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 text-[0.95rem] font-semibold",children:e.description||"Untitled entry"}),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:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,d.format_display_tag)(e)},e))}):null]}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[0.88rem] font-semibold text-accent",children:(0,m.format_duration)(r,n)})]})}function O({title:e,description:r}){return(0,t.jsxs)("header",{children:[(0,t.jsx)("h2",{className:"m-0 text-[1rem] font-semibold",children:e}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.86rem] leading-relaxed text-muted",children:r})]})}function L({message:e}){return(0,t.jsx)("p",{className:"m-0 mt-4 text-[0.9rem] text-muted",children:e})}e.s(["EndOfDayReviewView",0,function({initial_data:e}){let a=(0,r.useRouter)(),[s,l]=(0,n.useState)(e),[i,u]=(0,n.useState)("running"),[d,m]=(0,n.useState)(null),[p,h]=(0,n.useState)(null),[_,b]=(0,n.useState)(!1);(0,n.useEffect)(()=>{l(e)},[e]);let y=(0,n.useMemo)(()=>[0===s.runningEntries.length,0===s.longEntries.length,0===s.idleGaps.length,0===s.tagIssues.length].filter(Boolean).length,[s]),N=async(e,t)=>{b(!0),m(null),h(null);try{await e(),h(t),a.refresh()}catch(e){m((0,f.message_from_unknown_error)(e,"Review action failed"))}finally{b(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.TrackerTopbar,{breadcrumb:{current:"Review"}}),(0,t.jsxs)("main",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-5 pb-12 pt-6",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-2 text-center",children:[(0,t.jsx)("h1",{className:"m-0 text-[1.5rem] font-[650] tracking-tight",children:"End-of-day review"}),(0,t.jsxs)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:[s.dateLabel,". Close timers, fill gaps, normalize tags, and add handoff notes."]})]}),null===d?null:(0,t.jsx)("p",{className:"m-0 rounded-md border border-danger-border bg-danger-soft px-3 py-2 text-[0.85rem] text-danger",children:d}),null===p?null:(0,t.jsx)("p",{className:"m-0 rounded-md border border-accent-border bg-accent-soft px-3 py-2 text-[0.85rem] text-accent",children:p}),(0,t.jsxs)("section",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4","aria-label":"Review summary",children:[(0,t.jsx)(v,{label:"Checklist",value:`${y}/4 clear`,tone:4===y?"accent":"default"}),(0,t.jsx)(v,{label:"Running",value:String(s.runningEntries.length),tone:s.runningEntries.length>0?"danger":"accent"}),(0,t.jsx)(v,{label:"Entries today",value:String(s.entries.length)}),(0,t.jsx)(v,{label:"Gaps",value:String(s.idleGaps.length),tone:s.idleGaps.length>0?"warning":"accent"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-[14rem_minmax(0,1fr)] gap-4 max-[760px]:grid-cols-1",children:[(0,t.jsxs)("nav",{className:"flex h-fit flex-col gap-1 rounded-md border border-panel-border bg-panel p-1.5 shadow-sm","aria-label":"Review sections",children:[(0,t.jsx)(j,{label:"Running timers",count:s.runningEntries.length,active:"running"===i,on_click:()=>u("running")}),(0,t.jsx)(j,{label:"Long entries",count:s.longEntries.length,active:"long"===i,on_click:()=>u("long")}),(0,t.jsx)(j,{label:"Idle gaps",count:s.idleGaps.length,active:"gaps"===i,on_click:()=>u("gaps")}),(0,t.jsx)(j,{label:"Tags",count:s.tagIssues.length,active:"tags"===i,on_click:()=>u("tags")}),(0,t.jsx)(j,{label:"Notes",count:s.entries.length,active:"notes"===i,on_click:()=>u("notes")})]}),(0,t.jsxs)("div",{className:"min-w-0",children:["running"===i?(0,t.jsx)(w,{entries:s.runningEntries,is_pending:_,on_close:(e,t,r)=>N(()=>(0,x.post_tracker_action)("/api/out",(0,c.build_check_out_request_payload)(e.sheetName,{at:t,note:r})),"Timer closed.")}):null,"long"===i?(0,t.jsx)(k,{entries:s.longEntries,threshold_ms:s.longEntryThresholdMs,known_tags:s.knownTags,is_pending:_,on_save:(e,t,r,n)=>N(()=>(0,g.patch_tracker_action)("/api/entry",{sheetName:e.sheetName,entryId:e.id,description:t,start:r,end:n}),"Entry updated.")}):null,"gaps"===i?(0,t.jsx)(S,{gaps:s.idleGaps,sheet_names:s.sheetNames,known_tags:s.knownTags,is_pending:_,on_create:(e,t,r,n)=>N(()=>(0,x.post_tracker_action)("/api/entry/completed",{sheetName:t,description:r,start:e.start,end:e.end,note:n}),"Gap filled.")}):null,"tags"===i?(0,t.jsx)(E,{issues:s.tagIssues,known_tags:s.knownTags,is_pending:_,on_save:(e,t)=>N(()=>(0,g.patch_tracker_action)("/api/entry",{sheetName:e.sheetName,entryId:e.id,description:t}),"Tags updated.")}):null,"notes"===i?(0,t.jsx)($,{entries:s.entries,is_pending:_,on_add_note:(e,t,r)=>N(()=>(0,x.post_tracker_action)("/api/note",{sheetName:e.sheetName,entryId:e.id,text:t,at:r}),"Note added.")}):null]})]})]})]})}])}]);