super-time-tracker-ui 0.1.40 → 0.1.42

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 (254) hide show
  1. package/dist/standalone/next-output/BUILD_ID +1 -1
  2. package/dist/standalone/next-output/app-path-routes-manifest.json +3 -0
  3. package/dist/standalone/next-output/build-manifest.json +3 -3
  4. package/dist/standalone/next-output/routes-manifest.json +18 -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/entry/completed/route/app-paths-manifest.json +3 -0
  16. package/dist/standalone/next-output/server/app/api/entry/completed/route/build-manifest.json +9 -0
  17. package/dist/standalone/next-output/server/app/api/entry/completed/route/server-reference-manifest.json +4 -0
  18. package/dist/standalone/next-output/server/app/api/entry/completed/route.js +8 -0
  19. package/dist/standalone/next-output/server/app/api/entry/completed/route.js.nft.json +1 -0
  20. package/dist/standalone/next-output/server/app/api/entry/completed/route_client-reference-manifest.js +3 -0
  21. package/dist/standalone/next-output/server/app/api/entry/split/route.js +1 -1
  22. package/dist/standalone/next-output/server/app/api/entry/split/route.js.nft.json +1 -1
  23. package/dist/standalone/next-output/server/app/api/in/route.js +1 -1
  24. package/dist/standalone/next-output/server/app/api/in/route.js.nft.json +1 -1
  25. package/dist/standalone/next-output/server/app/login/page/react-loadable-manifest.json +1 -1
  26. package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
  27. package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
  28. package/dist/standalone/next-output/server/app/offline/page/react-loadable-manifest.json +1 -1
  29. package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
  30. package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
  31. package/dist/standalone/next-output/server/app/page/react-loadable-manifest.json +2 -2
  32. package/dist/standalone/next-output/server/app/page.js +1 -1
  33. package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
  34. package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
  35. package/dist/standalone/next-output/server/app/pomodoro/page/react-loadable-manifest.json +1 -1
  36. package/dist/standalone/next-output/server/app/pomodoro/page.js +1 -1
  37. package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
  38. package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
  39. package/dist/standalone/next-output/server/app/register/page/react-loadable-manifest.json +1 -1
  40. package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
  41. package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
  42. package/dist/standalone/next-output/server/app/reporting/page/react-loadable-manifest.json +1 -1
  43. package/dist/standalone/next-output/server/app/reporting/page.js +1 -1
  44. package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
  45. package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
  46. package/dist/standalone/next-output/server/app/review/page/app-paths-manifest.json +3 -0
  47. package/dist/standalone/next-output/server/app/review/page/build-manifest.json +18 -0
  48. package/dist/standalone/next-output/server/app/review/page/next-font-manifest.json +11 -0
  49. package/dist/standalone/next-output/server/app/review/page/react-loadable-manifest.json +8 -0
  50. package/dist/standalone/next-output/server/app/review/page/server-reference-manifest.json +4 -0
  51. package/dist/standalone/next-output/server/app/review/page.js +16 -0
  52. package/dist/standalone/next-output/server/app/review/page.js.nft.json +1 -0
  53. package/dist/standalone/next-output/server/app/review/page_client-reference-manifest.js +3 -0
  54. package/dist/standalone/next-output/server/app/search/page/react-loadable-manifest.json +1 -1
  55. package/dist/standalone/next-output/server/app/search/page.js +3 -3
  56. package/dist/standalone/next-output/server/app/search/page.js.nft.json +1 -1
  57. package/dist/standalone/next-output/server/app/search/page_client-reference-manifest.js +1 -1
  58. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/react-loadable-manifest.json +1 -1
  59. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
  60. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
  61. package/dist/standalone/next-output/server/app/settings/cloud-sync/page/react-loadable-manifest.json +1 -1
  62. package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
  63. package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
  64. package/dist/standalone/next-output/server/app/settings/data/page/react-loadable-manifest.json +1 -1
  65. package/dist/standalone/next-output/server/app/settings/data/page.js +1 -1
  66. package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
  67. package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
  68. package/dist/standalone/next-output/server/app/settings/display/page/react-loadable-manifest.json +1 -1
  69. package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
  70. package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
  71. package/dist/standalone/next-output/server/app/settings/goals/page/react-loadable-manifest.json +1 -1
  72. package/dist/standalone/next-output/server/app/settings/goals/page.js +1 -1
  73. package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
  74. package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
  75. package/dist/standalone/next-output/server/app/settings/notifications/page/react-loadable-manifest.json +1 -1
  76. package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
  77. package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
  78. package/dist/standalone/next-output/server/app/settings/page/react-loadable-manifest.json +1 -1
  79. package/dist/standalone/next-output/server/app/settings/page.js +1 -1
  80. package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
  81. package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
  82. package/dist/standalone/next-output/server/app/settings/pomodoro/page/react-loadable-manifest.json +1 -1
  83. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js +1 -1
  84. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
  85. package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
  86. package/dist/standalone/next-output/server/app/settings/quick-actions/page/react-loadable-manifest.json +1 -1
  87. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -1
  88. package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +1 -1
  89. package/dist/standalone/next-output/server/app/settings/tags/page/react-loadable-manifest.json +1 -1
  90. package/dist/standalone/next-output/server/app/settings/tags/page.js +1 -1
  91. package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
  92. package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
  93. package/dist/standalone/next-output/server/app/sheets/page/react-loadable-manifest.json +1 -1
  94. package/dist/standalone/next-output/server/app/sheets/page.js +1 -1
  95. package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
  96. package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
  97. package/dist/standalone/next-output/server/app/templates/page/app-paths-manifest.json +3 -0
  98. package/dist/standalone/next-output/server/app/templates/page/build-manifest.json +18 -0
  99. package/dist/standalone/next-output/server/app/templates/page/next-font-manifest.json +11 -0
  100. package/dist/standalone/next-output/server/app/templates/page/react-loadable-manifest.json +8 -0
  101. package/dist/standalone/next-output/server/app/templates/page/server-reference-manifest.json +4 -0
  102. package/dist/standalone/next-output/server/app/templates/page.js +15 -0
  103. package/dist/standalone/next-output/server/app/templates/page.js.nft.json +1 -0
  104. package/dist/standalone/next-output/server/app/templates/page_client-reference-manifest.js +3 -0
  105. package/dist/standalone/next-output/server/app/today/page/react-loadable-manifest.json +1 -1
  106. package/dist/standalone/next-output/server/app/today/page.js +1 -1
  107. package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
  108. package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
  109. package/dist/standalone/next-output/server/app-paths-manifest.json +3 -0
  110. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06r8z50._.js +1 -1
  111. package/dist/standalone/next-output/server/chunks/_0g3-h0x._.js +3 -0
  112. package/dist/standalone/next-output/server/chunks/{_0glc6qw._.js → _0h-5oxh._.js} +2 -2
  113. package/dist/standalone/next-output/server/chunks/{_00h8h72._.js → _0jso~pc._.js} +2 -2
  114. package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entry_completed_route_actions_0u88hrc.js +3 -0
  115. package/dist/standalone/next-output/server/chunks/ssr/0prs_next_dist_esm_build_templates_app-page_0yh6v2i.js +4 -0
  116. package/dist/standalone/next-output/server/chunks/ssr/0prs_next_dist_esm_build_templates_app-page_0~6ygkd.js +4 -0
  117. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__03dwgvv._.js +3 -0
  118. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0i8nvpz._.js → [root-of-the-server]__04flz4-._.js} +2 -2
  119. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__05o8b_c._.js +3 -0
  120. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__06jwkua._.js +3 -0
  121. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__078pqlk._.js +3 -0
  122. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__09~j2of._.js +3 -0
  123. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__07dg5mm._.js → [root-of-the-server]__0_y9w.y._.js} +2 -2
  124. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0q5n4_f._.js → [root-of-the-server]__0gmlwng._.js} +2 -2
  125. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__08n6l..._.js → [root-of-the-server]__0il5~uq._.js} +2 -2
  126. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0njhf-m._.js +3 -0
  127. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0ta228.._.js → [root-of-the-server]__0ou-jv5._.js} +2 -2
  128. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0f0-17f._.js → [root-of-the-server]__0p4w3_0._.js} +2 -2
  129. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0sx0ra6._.js +3 -0
  130. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__11yff~n._.js → [root-of-the-server]__0u.h8zx._.js} +2 -2
  131. package/dist/standalone/next-output/server/chunks/ssr/_0-wgm9z._.js +3 -0
  132. package/dist/standalone/next-output/server/chunks/ssr/_0.sy6.4._.js +3 -0
  133. package/dist/standalone/next-output/server/chunks/ssr/_0.vgy_3._.js +3 -0
  134. package/dist/standalone/next-output/server/chunks/ssr/_018i8lw._.js +3 -0
  135. package/dist/standalone/next-output/server/chunks/ssr/_01bznln._.js +3 -0
  136. package/dist/standalone/next-output/server/chunks/ssr/_028bo2r._.js +3 -0
  137. package/dist/standalone/next-output/server/chunks/ssr/_02fm6gp._.js +3 -0
  138. package/dist/standalone/next-output/server/chunks/ssr/_02l2ykc._.js +3 -0
  139. package/dist/standalone/next-output/server/chunks/ssr/_04wup-5._.js +1 -1
  140. package/dist/standalone/next-output/server/chunks/ssr/_05ydjrh._.js +3 -0
  141. package/dist/standalone/next-output/server/chunks/ssr/_07q4l3.._.js +3 -0
  142. package/dist/standalone/next-output/server/chunks/ssr/_08_ax6~._.js +3 -0
  143. package/dist/standalone/next-output/server/chunks/ssr/_09~-e0f._.js +3 -0
  144. package/dist/standalone/next-output/server/chunks/ssr/_0aaepl8._.js +3 -0
  145. package/dist/standalone/next-output/server/chunks/ssr/_0bypypo._.js +1 -1
  146. package/dist/standalone/next-output/server/chunks/ssr/_0e_h4bk._.js +3 -0
  147. package/dist/standalone/next-output/server/chunks/ssr/_0pf-hlu._.js +3 -0
  148. package/dist/standalone/next-output/server/chunks/ssr/_0sic8ed._.js +3 -0
  149. package/dist/standalone/next-output/server/chunks/ssr/_0t7z076._.js +1 -1
  150. package/dist/standalone/next-output/server/chunks/ssr/_0woiueg._.js +1 -1
  151. package/dist/standalone/next-output/server/chunks/ssr/_0xr0n-6._.js +3 -0
  152. package/dist/standalone/next-output/server/chunks/ssr/_0yno0i8._.js +3 -0
  153. package/dist/standalone/next-output/server/chunks/ssr/_0zatphu._.js +3 -0
  154. package/dist/standalone/next-output/server/chunks/ssr/_0zkfh~p._.js +3 -0
  155. package/dist/standalone/next-output/server/chunks/ssr/_10n.q--._.js +1 -1
  156. package/dist/standalone/next-output/server/chunks/ssr/_10rw92f._.js +3 -0
  157. package/dist/standalone/next-output/server/chunks/ssr/_10utgt7._.js +3 -0
  158. package/dist/standalone/next-output/server/chunks/ssr/_11.jqyk._.js +3 -0
  159. package/dist/standalone/next-output/server/chunks/ssr/_119e_ui._.js +1 -1
  160. package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_review_page_actions_0u~6wfd.js +3 -0
  161. package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_templates_page_actions_0n8gow3.js +3 -0
  162. package/dist/standalone/next-output/server/chunks/ssr/components_end-of-day-review-view_tsx_0t6snsb._.js +3 -0
  163. package/dist/standalone/next-output/server/chunks/ssr/components_entry-list_tsx_02.v.ur._.js +1 -1
  164. package/dist/standalone/next-output/server/chunks/ssr/components_template-library-view_tsx_0mt9r.5._.js +3 -0
  165. package/dist/standalone/next-output/server/chunks/ssr/lib_0l690qw._.js +3 -0
  166. package/dist/standalone/next-output/server/middleware-build-manifest.js +3 -3
  167. package/dist/standalone/next-output/server/next-font-manifest.js +1 -1
  168. package/dist/standalone/next-output/server/next-font-manifest.json +8 -0
  169. package/dist/standalone/next-output/server/pages/500.html +1 -1
  170. package/dist/standalone/next-output/static/chunks/00h013ys5a8px.js +1 -0
  171. package/dist/standalone/next-output/static/chunks/03~m0oomxu3r9.js +1 -0
  172. package/dist/standalone/next-output/static/chunks/048hg7.kf50p6.js +1 -0
  173. package/dist/standalone/next-output/static/chunks/05m~ilvrxjj14.css +3 -0
  174. package/dist/standalone/next-output/static/chunks/099rnw4-qk_33.js +1 -0
  175. package/dist/standalone/next-output/static/chunks/{01.p8x7rwa_da.js → 09lddf9c4kn~5.js} +1 -1
  176. package/dist/standalone/next-output/static/chunks/09p9p33-jf6p_.js +1 -0
  177. package/dist/standalone/next-output/static/chunks/0_8ps~_e8~ea7.js +1 -0
  178. package/dist/standalone/next-output/static/chunks/0agpph3f~gct3.js +1 -0
  179. package/dist/standalone/next-output/static/chunks/0cnb9ojb1.4_s.js +1 -0
  180. package/dist/standalone/next-output/static/chunks/0do2bszv92zfl.js +1 -0
  181. package/dist/standalone/next-output/static/chunks/0f.g~ypqld4i2.js +1 -0
  182. package/dist/standalone/next-output/static/chunks/0fa.o-_asg9n7.js +1 -0
  183. package/dist/standalone/next-output/static/chunks/0gc_4fwvsadx9.js +1 -0
  184. package/dist/standalone/next-output/static/chunks/0gv5y9hez6j.f.js +1 -0
  185. package/dist/standalone/next-output/static/chunks/0io.jffavun5t.js +1 -0
  186. package/dist/standalone/next-output/static/chunks/0lw-y46eplh.w.js +1 -0
  187. package/dist/standalone/next-output/static/chunks/0ni97tabbd6ql.js +1 -0
  188. package/dist/standalone/next-output/static/chunks/0qc9jf34l6_d8.js +1 -0
  189. package/dist/standalone/next-output/static/chunks/0r9inu-z~8h4p.js +1 -0
  190. package/dist/standalone/next-output/static/chunks/0s7b~rp4s3q9q.js +1 -0
  191. package/dist/standalone/next-output/static/chunks/0t3hajznk~j44.js +1 -0
  192. package/dist/standalone/next-output/static/chunks/0t~0aam6r_eto.js +1 -0
  193. package/dist/standalone/next-output/static/chunks/0ua4wv84cw5ds.js +1 -0
  194. package/dist/standalone/next-output/static/chunks/0vmr-fgq74aqi.js +1 -0
  195. package/dist/standalone/next-output/static/chunks/0vudo56ulr706.js +1 -0
  196. package/dist/standalone/next-output/static/chunks/141j1htu_qj-p.js +1 -0
  197. package/dist/standalone/next-output/static/chunks/{0fxgcr1q998_k.js → 15hds0xz6b5ce.js} +1 -1
  198. package/dist/standalone/next-output/static/chunks/16tc8vh998e~1.js +1 -0
  199. package/dist/standalone/package.json +1 -1
  200. package/package.json +1 -1
  201. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__03~l7zo._.js +0 -3
  202. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0kp4i1o._.js +0 -3
  203. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0s2z7s7._.js +0 -3
  204. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0t9jvpg._.js +0 -3
  205. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__13lfzik._.js +0 -3
  206. package/dist/standalone/next-output/server/chunks/ssr/_0.6lcq2._.js +0 -3
  207. package/dist/standalone/next-output/server/chunks/ssr/_02pahon._.js +0 -3
  208. package/dist/standalone/next-output/server/chunks/ssr/_07zjmow._.js +0 -3
  209. package/dist/standalone/next-output/server/chunks/ssr/_0_glxov._.js +0 -3
  210. package/dist/standalone/next-output/server/chunks/ssr/_0arprr3._.js +0 -3
  211. package/dist/standalone/next-output/server/chunks/ssr/_0e5mly4._.js +0 -3
  212. package/dist/standalone/next-output/server/chunks/ssr/_0ig7qj4._.js +0 -3
  213. package/dist/standalone/next-output/server/chunks/ssr/_0jh.m3o._.js +0 -3
  214. package/dist/standalone/next-output/server/chunks/ssr/_0ka6qj5._.js +0 -3
  215. package/dist/standalone/next-output/server/chunks/ssr/_0kke.lq._.js +0 -3
  216. package/dist/standalone/next-output/server/chunks/ssr/_0li125f._.js +0 -3
  217. package/dist/standalone/next-output/server/chunks/ssr/_0mb-jfk._.js +0 -3
  218. package/dist/standalone/next-output/server/chunks/ssr/_0mpyhsz._.js +0 -3
  219. package/dist/standalone/next-output/server/chunks/ssr/_0nuw8_e._.js +0 -3
  220. package/dist/standalone/next-output/server/chunks/ssr/_0n~tafj._.js +0 -3
  221. package/dist/standalone/next-output/server/chunks/ssr/_0ow880h._.js +0 -3
  222. package/dist/standalone/next-output/server/chunks/ssr/_0tc~oq5._.js +0 -3
  223. package/dist/standalone/next-output/server/chunks/ssr/_0xx3178._.js +0 -3
  224. package/dist/standalone/next-output/server/chunks/ssr/_0yg7mcz._.js +0 -3
  225. package/dist/standalone/next-output/server/chunks/ssr/_11jpj6c._.js +0 -3
  226. package/dist/standalone/next-output/server/chunks/ssr/_12nqpzj._.js +0 -3
  227. package/dist/standalone/next-output/static/chunks/0.ke4n64znh40.js +0 -1
  228. package/dist/standalone/next-output/static/chunks/0068ff71tv6bi.js +0 -1
  229. package/dist/standalone/next-output/static/chunks/0076tj~a2_nqt.css +0 -3
  230. package/dist/standalone/next-output/static/chunks/01e9mu0.nm5zq.js +0 -1
  231. package/dist/standalone/next-output/static/chunks/02xzj0v314vt~.js +0 -1
  232. package/dist/standalone/next-output/static/chunks/03q-5-y-5ico8.js +0 -1
  233. package/dist/standalone/next-output/static/chunks/073j7j4i1_blt.js +0 -1
  234. package/dist/standalone/next-output/static/chunks/07fpf9v1uq4kz.js +0 -1
  235. package/dist/standalone/next-output/static/chunks/0_ofg6_dn.8-1.js +0 -1
  236. package/dist/standalone/next-output/static/chunks/0b7w3-0q5h333.js +0 -1
  237. package/dist/standalone/next-output/static/chunks/0clzbneaj7nky.js +0 -1
  238. package/dist/standalone/next-output/static/chunks/0db9cfl4l3zca.js +0 -1
  239. package/dist/standalone/next-output/static/chunks/0g5ys-l7lj28k.js +0 -1
  240. package/dist/standalone/next-output/static/chunks/0jlyg_y~jm_1h.js +0 -1
  241. package/dist/standalone/next-output/static/chunks/0n18~cn6kld3f.js +0 -1
  242. package/dist/standalone/next-output/static/chunks/0oziz2u.3r2or.js +0 -1
  243. package/dist/standalone/next-output/static/chunks/0p53xxi2_tefo.js +0 -1
  244. package/dist/standalone/next-output/static/chunks/0slg_rix2tzz_.js +0 -1
  245. package/dist/standalone/next-output/static/chunks/0ui094~7v00dn.js +0 -1
  246. package/dist/standalone/next-output/static/chunks/0uns_i-qjgt4k.js +0 -1
  247. package/dist/standalone/next-output/static/chunks/0vl.zehia.g12.js +0 -1
  248. package/dist/standalone/next-output/static/chunks/0zh3lwmofmt.3.js +0 -1
  249. package/dist/standalone/next-output/static/chunks/119bnezxwjo29.js +0 -1
  250. package/dist/standalone/next-output/static/chunks/140f1v233k4bb.js +0 -1
  251. package/dist/standalone/next-output/static/chunks/14tf2a7ym42vl.js +0 -1
  252. /package/dist/standalone/next-output/static/{i7qPdm2jbeXagyWgWaWeK → l_mfwvHxStSDpzw8cKLu3}/_buildManifest.js +0 -0
  253. /package/dist/standalone/next-output/static/{i7qPdm2jbeXagyWgWaWeK → l_mfwvHxStSDpzw8cKLu3}/_clientMiddlewareManifest.js +0 -0
  254. /package/dist/standalone/next-output/static/{i7qPdm2jbeXagyWgWaWeK → l_mfwvHxStSDpzw8cKLu3}/_ssgManifest.js +0 -0
@@ -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 i},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(33434)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=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(a.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),s&&"/"!==s[0]&&(s="/"+s)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${s}${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 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 b},useLinkStatus:function(){return x}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),o=e.r(8063),i=a._(e.r(51268)),l=e.r(99997),u=e.r(4411),c=e.r(70782),d=e.r(69600),m=e.r(31508);e.r(91946);let h=e.r(35302),f=e.r(92024),p=e.r(88334),_=e.r(44017);function b(t){var r,n;let s,a,b,[x,y]=(0,i.useOptimistic)(f.IDLE_LINK_STATUS),w=(0,i.useRef)(null),{href:k,as:v,children:j,prefetch:N=null,passHref:S,replace:E,shallow:O,scroll:T,onClick:P,onMouseEnter:C,onTouchStart:D,legacyBehavior:R=!1,onNavigate:L,transitionTypes:A,ref:M,unstable_dynamicOnHover:I,...F}=t;s=j,R&&("string"==typeof s||"number"==typeof s)&&(s=(0,o.jsx)("a",{children:s}));let $=i.default.useContext(u.AppRouterContext),U=!1!==N,K=!1!==N?null===(n=N)||"auto"===n?_.FetchStrategy.PPR:_.FetchStrategy.Full:_.FetchStrategy.PPR,B="string"==typeof(r=v||k)?r:(0,l.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 G=R?a&&"object"==typeof a&&a.ref:M,q=i.default.useCallback(e=>(null!==$&&(w.current=(0,f.mountLinkInstance)(e,B,$,K,U,y)),()=>{w.current&&((0,f.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,f.unmountPrefetchableInstance)(e)}),[U,B,$,K,y]),W={ref:(0,c.useMergedRef)(q,G),onClick(t){R||"function"!=typeof P||P(t),R&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,s,a,o,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)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(12178);i.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,B,w,E,T,L,A)},onMouseEnter(e){R||"function"!=typeof C||C(e),R&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&U&&(0,f.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){R||"function"!=typeof D||D(e),R&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&U&&(0,f.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(B)?W.href=B:R&&!S&&("a"!==a.type||"href"in a.props)||(W.href=(0,m.addBasePath)(B)),b=R?i.default.cloneElement(a,W):(0,o.jsx)("a",{...F,...W,children:s}),(0,o.jsx)(g.Provider,{value:x,children:b})}e.r(20612);let g=(0,i.createContext)(f.IDLE_LINK_STATUS),x=()=>(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,25204,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"})]})}],37399);var r=e.i(51268),n=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,t=!0){let s=(0,r.useRef)(e);s.current=e,(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,n.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}],25204)},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)(),[o,i]=(0,r.useState)(null),[l,u]=(0,r.useState)(!1),c=(0,s.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:o,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,a.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 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 o(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}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)(o,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}var u=e.i(51268),c=e.i(37399),d=e.i(90463),m=e.i(46549),h=e.i(22373);let f=new Set(h.topbar_quick_action_ids),p=["today","search","reporting","pomodoro"];function _(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,_],73205);var b=e.i(66295),g=e.i(34869),x=e.i(92629);let y=(0,g.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 w=e.i(32792),k=e.i(90299),v=e.i(28274);function j(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function N(){return j()}function S(){return"dark"}var E=e.i(35434),O=e.i(17798),T=e.i(10464),P=e.i(61834),C=e.i(81553),D=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",L={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},A=new Set(["manage-tags","pomodoro","sync-settings"]);function M(){let e=(0,n.useRouter)(),s=(0,n.usePathname)()??"/",a=(0,u.useSyncExternalStore)(E.subscribe_theme,N,S),o=(0,u.useSyncExternalStore)(y.subscribe,y.get_snapshot,y.get_server_snapshot),l=(0,u.useSyncExternalStore)(k.tracker_shortcut_map_preference.subscribe,k.tracker_shortcut_map_preference.get_snapshot,k.tracker_shortcut_map_preference.get_server_snapshot),f=(0,u.useSyncExternalStore)(w.topbar_quick_actions_preference.subscribe,w.topbar_quick_actions_preference.get_snapshot,w.topbar_quick_actions_preference.get_server_snapshot),p=(0,b.parse_tracker_shortcut_map)(l),g=new Set(_(f)),x=h.topbar_quick_action_ids.filter(e=>!g.has(e)),M=Array.from(new Set([...Array.from(A),...x])),{email:I,is_configured:F,is_pending:$,sign_out:U}=(0,i.use_supabase_auth_session)(),[K,B]=(0,u.useState)(!1),G=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!K)return;let e=e=>{null===G.current||G.current.contains(e.target)||B(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[K]);let q=()=>{B(!1)};return(0,D.use_escape_to_cancel)(q,K),(0,t.jsxs)("div",{className:"relative shrink-0",ref:G,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)(c.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:[F&&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,M.map(e=>{let n=L[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:R,role:"menuitem",onClick:q,children:n.label})},e)}),F?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:R,role:"menuitemcheckbox","aria-checked":"true"===o,onClick:()=>{let e="true"===o?"false":"true";y.write(e),y.notify(),(0,m.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==I&&(0,v.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"===o?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===o?"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;q(),e="dark"===j()?"light":"dark",(0,O.apply_theme)(e),(0,C.write_stored_theme)(e),T.theme_mode_preference.write(e),(0,P.write_document_preference_cookies)({theme_mode:e,theme:e}),T.theme_mode_preference.notify(),(0,E.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"===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;q(),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:"(?)"})]})})}),F?(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:R,role:"menuitem",onClick:()=>{q(),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:$,onClick:()=>{q(),U()},children:$?"Signing out…":"Sign out"})})]}):null]}):null]})}let I=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];function F(){let e=(0,n.usePathname)()??"/",s=(0,u.useSyncExternalStore)(w.topbar_quick_actions_preference.subscribe,w.topbar_quick_actions_preference.get_snapshot,w.topbar_quick_actions_preference.get_server_snapshot),a=(0,u.useMemo)(()=>_(s),[s]);if(0===a.length)return null;let o=I.filter(e=>a.includes(e.id));return 0===o.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:o.map(n=>{let 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 U(){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)(F,{}),(0,t.jsx)(l,{}),(0,t.jsx)(U,{}),(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),s=e.i(52405),a=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:o,known_tags:i,placeholder:l,disabled:u=!1,autoFocus:c=!1,on_change:d}){let m=(0,r.useRef)(null),h=(0,r.useRef)(null),f=(0,r.useRef)(null),[p,_]=(0,r.useState)(0),[b,g]=(0,r.useState)(0),x=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("@");if(-1===n)return null;let s=r.slice(n+1);return/\s/.test(s)?null:{query:s,start_index:n,end_index:t}}(o,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)}(i,x.query),w=null!==x&&function(e,t){if(!/^\w+$/.test(e))return!1;let r=e.toLowerCase();return t.some(e=>{try{return(0,a.normalize_stored_tag)(e).slice(1).toLowerCase()===r}catch{return!1}})}(x.query,i),k=null!==x&&y.length>0&&!w&&!u;(0,r.useLayoutEffect)(()=>{null!==f.current&&null!==m.current&&(m.current.setSelectionRange(f.current,f.current),_(f.current),f.current=null)},[o]),(0,r.useEffect)(()=>{g(0)},[o,p,y.length]);let v=()=>{_(m.current?.selectionStart??o.length)},j=()=>{g(0)},N=e=>{let t,r,s;if(null===x)return;let{next_text:a,next_cursor:i}=(t=(0,n.format_display_tag)(e),r=o.slice(0,x.start_index),s=o.slice(x.end_index),{next_text:`${r}${t}${s}`,next_cursor:r.length+t.length});f.current=i,d(a),j()};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,s.get_input_class_name)(),value:o,placeholder:l,disabled:u,autoFocus:c,autoComplete:"off","aria-autocomplete":"list","aria-expanded":k,"aria-controls":k?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),_(e.target.selectionStart??e.target.value.length)},onClick:v,onKeyUp:v,onKeyDown:e=>{if(k){if("ArrowDown"===e.key){e.preventDefault(),g(e=>(e+1)%y.length);return}if("ArrowUp"===e.key){e.preventDefault(),g(e=>(e-1+y.length)%y.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=y[b];void 0!==t&&N(t);return}"Escape"===e.key&&(e.preventDefault(),j())}},onBlur:()=>{window.setTimeout(j,120)}}),k?(0,t.jsx)("ul",{ref:h,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===b,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===b?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),N(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},85323,e=>{"use strict";var t=e.i(49087);e.s(["notify_desktop",0,function(e){if((0,t.notify_in_app)({title:e.title,body:e.body}),"u"<typeof Notification||"u">typeof document&&"visible"===document.visibilityState&&document.hasFocus()||"granted"!==Notification.permission)return;let{body:r,tag:n,title:s}=e,a={body:r,...void 0!==n?{tag:n}:{}};try{new Notification(s,a)}catch{}},"supports_desktop_notifications",0,function(){return"u">typeof Notification}])},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{}}])},7668,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(51268),s=e.i(29539),a=e.i(14260),o=e.i(75404),i=e.i(52663),l=e.i(85323),u=e.i(15526),c=e.i(72550),d=e.i(26740);e.s(["PomodoroView",0,function({known_tags:e}){let[m,h]=(0,n.useState)(d.POMODORO_DEFAULT_SETTINGS),[f,p]=(0,n.useState)(d.POMODORO_DEFAULT_STATE),[_,b]=(0,n.useState)(()=>Date.now()),[g,x]=(0,n.useState)(!1),[y,w]=(0,n.useState)(null),[k,v]=(0,n.useState)(!1),j=(0,n.useRef)(null),N=(0,n.useRef)(d.POMODORO_DEFAULT_SETTINGS),S=(0,n.useRef)(d.POMODORO_DEFAULT_STATE),E=(0,n.useCallback)((e,t)=>{(0,l.notify_desktop)({title:e,body:t,tag:"pomodoro-phase-event"})},[]);(0,n.useEffect)(()=>{let e=window.setTimeout(()=>{try{let e=window.localStorage.getItem(d.POMODORO_STORAGE_KEY);if(null!==e){let t=JSON.parse(e),r=t.settings,n=t.state;if(void 0!==r&&h({work_minutes:"number"==typeof r.work_minutes&&Number.isFinite(r.work_minutes)&&r.work_minutes>0?Math.round(r.work_minutes):d.POMODORO_DEFAULT_SETTINGS.work_minutes,short_break_minutes:"number"==typeof r.short_break_minutes&&Number.isFinite(r.short_break_minutes)&&r.short_break_minutes>0?Math.round(r.short_break_minutes):d.POMODORO_DEFAULT_SETTINGS.short_break_minutes,long_break_minutes:"number"==typeof r.long_break_minutes&&Number.isFinite(r.long_break_minutes)&&r.long_break_minutes>0?Math.round(r.long_break_minutes):d.POMODORO_DEFAULT_SETTINGS.long_break_minutes,rounds_before_long_break:"number"==typeof r.rounds_before_long_break&&Number.isFinite(r.rounds_before_long_break)&&r.rounds_before_long_break>0?Math.round(r.rounds_before_long_break):d.POMODORO_DEFAULT_SETTINGS.rounds_before_long_break,auto_start_next_phase:"boolean"==typeof r.auto_start_next_phase?r.auto_start_next_phase:d.POMODORO_DEFAULT_SETTINGS.auto_start_next_phase,check_in_on_work_start:"boolean"==typeof r.check_in_on_work_start?r.check_in_on_work_start:d.POMODORO_DEFAULT_SETTINGS.check_in_on_work_start,work_entry_description:"string"==typeof r.work_entry_description?r.work_entry_description:d.POMODORO_DEFAULT_SETTINGS.work_entry_description}),void 0!==n){let e=n.phase,t=n.status,r={phase:"short_break"===e||"long_break"===e||"work"===e?e:d.POMODORO_DEFAULT_STATE.phase,status:"idle"===t||"paused"===t||"running"===t?t:d.POMODORO_DEFAULT_STATE.status,completed_work_sessions:"number"==typeof n.completed_work_sessions&&Number.isFinite(n.completed_work_sessions)&&n.completed_work_sessions>=0?Math.round(n.completed_work_sessions):d.POMODORO_DEFAULT_STATE.completed_work_sessions,deadline_at_ms:"number"==typeof n.deadline_at_ms&&Number.isFinite(n.deadline_at_ms)?n.deadline_at_ms:null,paused_remaining_ms:"number"==typeof n.paused_remaining_ms&&Number.isFinite(n.paused_remaining_ms)&&n.paused_remaining_ms>=0?Math.round(n.paused_remaining_ms):null};S.current=r,p(r)}}}catch{}x(!0)},0);return()=>{window.clearTimeout(e)}},[]),(0,n.useEffect)(()=>{N.current=m},[m]),(0,n.useEffect)(()=>{S.current=f},[f]);let O=(0,n.useCallback)((e,t)=>{try{window.localStorage.setItem(d.POMODORO_STORAGE_KEY,JSON.stringify({settings:e,state:t}))}catch{}},[]),T=(0,n.useCallback)(e=>{p(t=>{let r="function"==typeof e?e(t):e;return S.current=r,O(N.current,r),r})},[O]);(0,n.useEffect)(()=>{g&&O(m,f)},[g,O,m,f]),(0,n.useEffect)(()=>{let e=()=>{O(N.current,S.current)};return window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),()=>{window.removeEventListener("pagehide",e),window.removeEventListener("beforeunload",e)}},[O]),(0,n.useEffect)(()=>{if("running"!==f.status)return;let e=window.setInterval(()=>{b(Date.now())},1e3);return()=>{window.clearInterval(e)}},[f.status,f.deadline_at_ms]);let P=(0,n.useCallback)(e=>{switch(e){case"work":return 6e4*m.work_minutes;case"short_break":return 6e4*m.short_break_minutes;case"long_break":return 6e4*m.long_break_minutes}},[m.long_break_minutes,m.short_break_minutes,m.work_minutes]),C=(0,n.useCallback)(async()=>{let e=await fetch("/api/state",{method:"GET",cache:"no-store"});if(!e.ok)throw Error((await e.json().catch(()=>({}))).error??"Failed to read tracker state");let t=await e.json().catch(()=>null);return t?.runningEntry!==null&&t?.runningEntry!==void 0},[]),D=(0,n.useCallback)(async()=>{try{v(await C())}catch{}},[C]),R=async()=>{let e=m.work_entry_description.trim();if(0===e.length)return;if(await C())return void v(!0);let t=await fetch("/api/in",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:e,sheetName:function(){try{let e=window.localStorage.getItem(c.ACTIVE_SHEET_STORAGE_KEY)?.trim()??"";return e.length>0?e:null}catch{return null}}()??void 0})});if(t.ok){let e=await t.json().catch(()=>null),r=e?.activeEntry;null!=r&&(0,u.mark_pomodoro_task_entry)({id:r.id,sheetName:r.sheetName}),v(!0);return}throw Error((await t.json().catch(()=>({}))).error??"Failed to start tracker entry for Pomodoro")},L=async()=>{let e=await fetch("/api/out",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){(0,u.clear_pomodoro_task_entry_marker)(),v(!1);return}let t=(await e.json().catch(()=>({}))).error??"Failed to check out active tracker entry";if(!t.includes("No active entry"))throw Error(t)},A=async()=>{w(null);try{let e=await fetch("/api/state",{method:"GET",cache:"no-store"});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??"Failed to read tracker state")}let t=await e.json().catch(()=>null),r=t?.runningEntry;if(r?.start===void 0)throw Error("No active task found to start from");let n=Date.parse(r.start);if(!Number.isFinite(n))throw Error("Active task start time is invalid");let s=Math.max(0,Date.now()-n),a=P(f.phase),o=Math.max(0,a-s);T(e=>({...e,status:"running",deadline_at_ms:Date.now()+o,paused_remaining_ms:null}))}catch(e){w(e instanceof Error?e.message:String(e))}},M=(0,n.useCallback)(()=>{let e="work"===f.phase,t=f.completed_work_sessions+1;if(T(e=>{let t="work"===e.phase?e.completed_work_sessions+1:e.completed_work_sessions,r="work"===e.phase?t%m.rounds_before_long_break==0?"long_break":"short_break":"work",n=P(r);return m.auto_start_next_phase?{phase:r,status:"running",completed_work_sessions:t,deadline_at_ms:Date.now()+n,paused_remaining_ms:null}:{phase:r,status:"idle",completed_work_sessions:t,deadline_at_ms:null,paused_remaining_ms:null}}),e&&E("Pomodoro focus session complete",`Completed focus session ${t}.`),m.auto_start_next_phase){let e="work"===f.phase?f.completed_work_sessions%m.rounds_before_long_break==m.rounds_before_long_break-1?"long break":"short break":"focus";E("work"===f.phase?"Pomodoro break started":"Pomodoro focus started",`Auto-started ${e} timer.`)}},[P,E,T,f.completed_work_sessions,f.phase,m.auto_start_next_phase,m.rounds_before_long_break]);(0,n.useEffect)(()=>{let e=window.setTimeout(()=>{D()},0);return()=>{window.clearTimeout(e)}},[D]),(0,n.useEffect)(()=>{let e=window.setInterval(()=>{D()},5e3);return()=>{window.clearInterval(e)}},[D]),(0,n.useEffect)(()=>{if("running"!==f.status||null===f.deadline_at_ms||_<f.deadline_at_ms)return;let e=window.setTimeout(()=>{M()},0);return()=>{window.clearTimeout(e)}},[M,_,f.deadline_at_ms,f.status]);let I=P(f.phase),F="running"===f.status&&null!==f.deadline_at_ms?Math.max(0,f.deadline_at_ms-_):"paused"===f.status?f.paused_remaining_ms??I:I,$=Math.min(100,Math.max(0,(I-F)/I*100)),U=`${Math.floor(F/6e4).toString().padStart(2,"0")}:${Math.floor(F%6e4/1e3).toString().padStart(2,"0")}`,K={work:"Focus",short_break:"Short break",long_break:"Long break"}[f.phase],B="work"===f.phase?f.completed_work_sessions%m.rounds_before_long_break==m.rounds_before_long_break-1?"long_break":"short_break":"work",G="work"===f.phase?`${f.completed_work_sessions+1} / ${m.rounds_before_long_break} focus rounds`:"short_break"===f.phase?"Recover before the next focus block.":"Take the long break before the next round.",q="running"===f.status?"Pause":"paused"===f.status?"Resume":"Start",W=`${U} \xb7 ${K} \xb7 Pomodoro`;return(0,n.useEffect)(()=>{if("u">typeof document)return null===j.current&&(j.current=document.title),()=>{null!==j.current&&(document.title=j.current)}},[]),(0,n.useEffect)(()=>{"u">typeof document&&(document.title=W)},[W]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.TrackerTopbar,{breadcrumb:{current:"Pomodoro"}}),(0,t.jsxs)("main",{className:"mx-auto flex w-full max-w-2xl flex-col gap-6 px-5 pb-12 pt-6",children:[(0,t.jsxs)("header",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"m-0 text-[1.5rem] font-[650] tracking-tight",children:"Pomodoro"}),(0,t.jsx)("p",{className:"m-0 mt-2 text-[0.9rem] leading-relaxed text-muted",children:"Keep a simple focus cycle running alongside your time tracker."})]}),(0,t.jsx)(r.default,{href:"/settings/pomodoro",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","aria-label":"Pomodoro settings",title:"Pomodoro settings",children:(0,t.jsx)(s.SettingsIcon,{})})]}),(0,t.jsx)("section",{className:"rounded-md border border-panel-border bg-panel p-5 shadow-sm",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Current phase"}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[1.3rem] font-semibold",children:K}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.88rem] leading-relaxed text-muted",children:G})]}),(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Next phase"}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.95rem] font-semibold text-accent",children:{work:"Focus",short_break:"Short break",long_break:"Long break"}[B]}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.84rem] text-muted",children:m.auto_start_next_phase?"Auto-start enabled":"Waiting for you"})]})]}),(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-background px-4 py-5 text-center",children:[(0,t.jsx)("p",{className:"m-0 font-mono text-[3rem] font-semibold tracking-tight text-accent","aria-live":"polite",children:U}),(0,t.jsx)("div",{className:"mt-4 h-2 overflow-hidden rounded-full bg-surface-strong",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-accent transition-[width] duration-200",style:{width:`${$}%`}})}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-2 text-[0.82rem] text-muted",children:[(0,t.jsxs)("span",{children:[f.completed_work_sessions," focus sessions done"]}),(0,t.jsx)("span",{children:"•"}),(0,t.jsx)("span",{children:"running"===f.status?"Running":"paused"===f.status?"Paused":"Idle"})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",className:(0,i.get_button_class_name)("primary"),onClick:()=>{let e,t,r;"running"===f.status?(w(null),T(e=>"running"!==e.status||null===e.deadline_at_ms?e:{...e,status:"paused",deadline_at_ms:null,paused_remaining_ms:Math.max(0,e.deadline_at_ms-Date.now())}),L().catch(e=>{w(e instanceof Error?e.message:String(e))})):(w(null),T(e=>{let t="paused"===e.status&&null!==e.paused_remaining_ms?e.paused_remaining_ms:P(e.phase);return{...e,status:"running",deadline_at_ms:Date.now()+t,paused_remaining_ms:null}}),e="paused"===f.status,t="short_break"===f.phase||"long_break"===f.phase,r=e||"running"!==f.status&&"work"===f.phase&&m.check_in_on_work_start,e||"running"===f.status||E(t?"Pomodoro break started":"Pomodoro focus started",t?"Break timer is running.":"Focus timer is running."),r&&R().catch(e=>{w(e instanceof Error?e.message:String(e))}))},children:q}),(0,t.jsx)("button",{type:"button",className:(0,i.get_button_class_name)("ghost"),onClick:M,children:"Skip phase"}),(0,t.jsx)("button",{type:"button",className:(0,i.get_button_class_name)("ghost"),onClick:()=>{T(d.POMODORO_DEFAULT_STATE),b(Date.now())},children:"Reset"}),(0,t.jsx)("button",{type:"button",className:(0,i.get_button_class_name)("ghost"),disabled:"running"===f.status,onClick:()=>{A()},children:"Start from active task start time"})]}),null!==y?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:y}):null,m.check_in_on_work_start&&!k?(0,t.jsx)("div",{className:"grid gap-2 rounded-md border border-panel-border bg-background p-3 md:grid-cols-2",children:(0,t.jsxs)("label",{className:"flex flex-col gap-1.5 md:col-span-2",children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold text-muted",children:"New entry description (supports @tags)"}),(0,t.jsx)(a.TagAutocompleteInput,{id:"pomodoro-work-entry-description",value:m.work_entry_description,known_tags:e,placeholder:"Pomodoro focus @pomodoro @focus",on_change:e=>{h(t=>({...t,work_entry_description:e}))}})]})}):null]})})]})]})}],7668)}]);
@@ -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 o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(33434)),l=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(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 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),o=a._(e.r(51268)),i=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,o.useOptimistic)(m.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:j,as:w,children:k,prefetch:N=null,passHref:S,replace:C,shallow:E,scroll:P,onClick:L,onMouseEnter:O,onTouchStart:T,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=o.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,i.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=o.default.Children.only(s)}let K=R?a&&"object"==typeof a&&a.ref:W,F=o.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,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,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);o.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,i)})}}(t,q,v,C,P,A,M)},onMouseEnter(e){R||"function"!=typeof O||O(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 T||T(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?o.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,o.createContext)(m.IDLE_LINK_STATUS),_=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},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,25204,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"})]})}],37399);var r=e.i(51268),n=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,t=!0){let s=(0,r.useRef)(e);s.current=e,(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,n.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}],25204)},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,o]=(0,r.useState)(null),[i,c]=(0,r.useState)(!1),u=(0,s.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{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()}},[u]),{is_configured:u,email:l,is_pending:i,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},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 o=e.i(77882);function i(){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)(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","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),O=e.i(81553),T=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"},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","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),i=(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)(i),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,o.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,T.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,O.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:"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)(i,{}),(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:o,is_configured:i,is_pending:c,sign_out:u}=(0,l.use_supabase_auth_session)();if(!i)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===o?(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:o})]}),(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),o=e.i(28274),i=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,i.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,o.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:O,onClick:T,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 T||T(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,O,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,25204,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"})]})}],37399);var r=e.i(51268),n=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,t=!0){let s=(0,r.useRef)(e);s.current=e,(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,n.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}],25204)},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","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),O=e.i(10464),T=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"},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","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),O.theme_mode_preference.write(e),(0,T.write_document_preference_cookies)({theme_mode:e,theme:e}),O.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:"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,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 s=e.r(44066)._(e.r(33434)),o=/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(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.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=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 b},useLinkStatus:function(){return x}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(44066),o=e.r(8063),i=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 f=e.r(35302),m=e.r(92024),p=e.r(88334),g=e.r(44017);function b(t){var r,n;let a,s,b,[x,y]=(0,i.useOptimistic)(m.IDLE_LINK_STATUS),_=(0,i.useRef)(null),{href:v,as:k,children:j,prefetch:T=null,passHref:N,replace:D,shallow:S,scroll:M,onClick:O,onMouseEnter:E,onTouchStart:P,legacyBehavior:L=!1,onNavigate:Y,transitionTypes:q,ref:C,unstable_dynamicOnHover:R,...H}=t;a=j,L&&("string"==typeof a||"number"==typeof a)&&(a=(0,o.jsx)("a",{children:a}));let I=i.default.useContext(u.AppRouterContext),F=!1!==T,A=!1!==T?null===(n=T)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=k||v)?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});s=i.default.Children.only(a)}let Q=L?s&&"object"==typeof s&&s.ref:C,W=i.default.useCallback(e=>(null!==I&&(_.current=(0,m.mountLinkInstance)(e,B,I,A,F,y)),()=>{_.current&&((0,m.unmountLinkForCurrentNavigation)(_.current),_.current=null),(0,m.unmountPrefetchableInstance)(e)}),[F,B,I,A,y]),$={ref:(0,c.useMergedRef)(W,Q),onClick(t){L||"function"!=typeof O||O(t),L&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,a,s,o,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(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(12178);i.default.startTransition(()=>{d(r,a?"replace":"push",!1===s?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,l)})}}(t,B,_,D,M,Y,q)},onMouseEnter(e){L||"function"!=typeof E||E(e),L&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),I&&F&&(0,m.onNavigationIntent)(e.currentTarget,!0===R)},onTouchStart:function(e){L||"function"!=typeof P||P(e),L&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),I&&F&&(0,m.onNavigationIntent)(e.currentTarget,!0===R)}};return(0,d.isAbsoluteUrl)(B)?$.href=B:L&&!N&&("a"!==s.type||"href"in s.props)||($.href=(0,h.addBasePath)(B)),b=L?i.default.cloneElement(s,$):(0,o.jsx)("a",{...H,...$,children:a}),(0,o.jsx)(w.Provider,{value:x,children:b})}e.r(20612);let w=(0,i.createContext)(m.IDLE_LINK_STATUS),x=()=>(0,i.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,25204,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"})]})}],37399);var r=e.i(51268),n=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,t=!0){let a=(0,r.useRef)(e);a.current=e,(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,n.is_modal_dialog_open)()||(e.preventDefault(),a.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}],25204)},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)(),[o,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:o,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 o(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}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)(o,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}var u=e.i(51268),c=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","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 b=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 _=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 T(){return j()}function N(){return"dark"}var D=e.i(35434),S=e.i(17798),M=e.i(10464),O=e.i(61834),E=e.i(81553),P=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",Y={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},q=new Set(["manage-tags","pomodoro","sync-settings"]);function C(){let e=(0,n.useRouter)(),a=(0,n.usePathname)()??"/",s=(0,u.useSyncExternalStore)(D.subscribe_theme,T,N),o=(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),m=(0,u.useSyncExternalStore)(_.topbar_quick_actions_preference.subscribe,_.topbar_quick_actions_preference.get_snapshot,_.topbar_quick_actions_preference.get_server_snapshot),p=(0,b.parse_tracker_shortcut_map)(l),w=new Set(g(m)),x=f.topbar_quick_action_ids.filter(e=>!w.has(e)),C=Array.from(new Set([...Array.from(q),...x])),{email:R,is_configured:H,is_pending:I,sign_out:F}=(0,i.use_supabase_auth_session)(),[A,B]=(0,u.useState)(!1),Q=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!A)return;let e=e=>{null===Q.current||Q.current.contains(e.target)||B(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[A]);let W=()=>{B(!1)};return(0,P.use_escape_to_cancel)(W,A),(0,t.jsxs)("div",{className:"relative shrink-0",ref:Q,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:()=>B(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:[H&&null!==R?(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:R,children:R})}):null,C.map(e=>{let n=Y[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)}),H?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:L,role:"menuitemcheckbox","aria-checked":"true"===o,onClick:()=>{let e="true"===o?"false":"true";y.write(e),y.notify(),(0,h.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==R&&(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"===o?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===o?"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"===j()?"light":"dark",(0,S.apply_theme)(e),(0,E.write_stored_theme)(e),M.theme_mode_preference.write(e),(0,O.write_document_preference_cookies)({theme_mode:e,theme:e}),M.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:L,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:"(?)"})]})})}),H?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===R?(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:I,onClick:()=>{W(),F()},children:I?"Signing out…":"Sign out"})})]}):null]}):null]})}let R=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];function H(){let e=(0,n.usePathname)()??"/",a=(0,u.useSyncExternalStore)(_.topbar_quick_actions_preference.subscribe,_.topbar_quick_actions_preference.get_snapshot,_.topbar_quick_actions_preference.get_server_snapshot),s=(0,u.useMemo)(()=>g(a),[a]);if(0===s.length)return null;let o=R.filter(e=>s.includes(e.id));return 0===o.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:o.map(n=>{let a=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":a?"page":void 0,children:n.label},n.id)})})}var I=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)(I.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)(H,{}),(0,t.jsx)(l,{}),(0,t.jsx)(F,{}),(0,t.jsx)(C,{})]})]})]})})}],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}])},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}`}])},67999,e=>{"use strict";e.s(["get_serialized_entries_total_ms",0,function(e){return e.reduce((e,t)=>e+t.durationMs,0)}])},56812,e=>{"use strict";e.s(["week_starts_on_to_index",0,function(e){return+("sunday"!==e)}])},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,o=(0,t.toDate)(e,r?.in),i=o.getDay();return o.setDate(o.getDate()+((i<s?-7:0)+6-(i-s))),o.setHours(23,59,59,999),o}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 o=e.i(39552),i=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 f(e,t,r){return h(e,-t,r)}function m(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(),o=(0,d.constructFrom)(n?.in||e,a.getTime());return(o.setMonth(a.getMonth()+r+1,0),s>=o.getDate())?o:(a.setFullYear(o.getFullYear(),o.getMonth(),s),a)}function p(e,t,r){return m(e,-t,r)}function g(e,t=new Date,n=1){let d=e=>(0,o.format)(e,"yyyy-MM-dd");switch(e){case"yesterday":{let e=f(t,1);return{from_date:d((0,i.startOfDay)(e)),to_date:d((0,i.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=m(t,-12,void 0);return{from_date:d((0,c.startOfYear)(e)),to_date:d(s(e))}}default:{let e=(0,i.startOfDay)(t);return{from_date:d(e),to_date:d(e)}}}}e.s(["addDays",0,h],98636),e.s(["subDays",0,f],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 b=e.i(51268),w=e.i(57853);e.s(["use_week_starts_on",0,function(){return(0,b.useSyncExternalStore)(w.week_starts_on_preference.subscribe,w.week_starts_on_preference.get_snapshot,w.week_starts_on_preference.get_server_snapshot)}],12843)},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),o=e.i(12843),i=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,o.use_week_starts_on)(),f=(0,i.week_starts_on_to_index)(h),m=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 o=(0,s.matches_reporting_date_range_shortcut)(e,n.value,new Date,f);return(0,t.jsx)("button",{type:"button",className:o?(0,r.get_button_class_name)("primary","small"):(0,r.get_button_class_name)("ghost","small"),"aria-pressed":o,onClick:()=>c((0,a.get_reporting_date_range_shortcut_inputs)(n.value,new Date,f)),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:!m,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),f=e.i(93415),m=e.i(25402),p=e.i(36145);class g{subPriority=0;validate(e,t){return!0}}class b 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,m.constructFrom)(t,e))}set(e,t){var r,n;let a;if(t.timestampIsSet)return e;return(0,m.constructFrom)(e,((a="function"==typeof(n=r=this.context)&&n.prototype?.constructor===n?new r(0):(0,m.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 b(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 _=/^(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)/,T=/^(2[0-3]|[0-1]?\d)/,N=/^(2[0-4]|[0-1]?\d)/,D=/^(1[0-1]|0?\d)/,S=/^(1[0-2]|0?\d)/,M=/^[0-5]?\d/,O=/^[0-5]?\d/,E=/^\d/,P=/^\d{1,2}/,L=/^\d{1,3}/,Y=/^\d{1,4}/,q=/^-?\d+/,C=/^-?\d/,R=/^-?\d{1,2}/,H=/^-?\d{1,3}/,I=/^-?\d{1,4}/,F=/^([+-])(\d{2})(\d{2})?|Z/,A=/^([+-])(\d{2})(\d{2})|Z/,B=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Q=/^([+-])(\d{2}):(\d{2})|Z/,W=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function $(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,o=r[5]?parseInt(r[5],10):0;return{value:n*(a*y.millisecondsInHour+s*y.millisecondsInMinute+o*y.millisecondsInSecond),rest:t.slice(r[0].length)}}function X(e,t){switch(e){case 1:return K(E,t);case 2:return K(P,t);case 3:return K(L,t);case 4:return K(Y,t);default:return K(RegExp("^\\d{1,"+e+"}"),t)}}function G(e,t){switch(e){case 1:return K(C,t);case 2:return K(R,t);case 3:return K(H,t);case 4:return K(I,t);default:return K(RegExp("^-?\\d{1,"+e+"}"),t)}}function z(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 eo=e.i(98636);function ei(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),o=s.getDay(),i=7-a,l=t<0||t>6?t-(o+i)%7:((t%7+7)%7+i)%7-(o+i)%7;return(0,eo.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 $(X(4,e),n);case"yo":return $(r.ordinalNumber(e,{unit:"year"}),n);default:return $(X(t.length,e),n)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r){let n=e.getFullYear();if(r.isTwoDigitYear){let t=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 $(X(4,e),n);case"Yo":return $(r.ordinalNumber(e,{unit:"year"}),n);default:return $(X(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?G(4,e):G(t.length,e)}set(e,t,r){let n=(0,m.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?G(4,e):G(t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends x{priority=120;parse(e,t,r){switch(t){case"Q":case"QQ":return X(t.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends x{priority=120;parse(e,t,r){switch(t){case"q":case"qq":return X(t.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends x{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,r){let n=e=>e-1;switch(t){case"M":return $(K(_,e),n);case"MM":return $(X(2,e),n);case"Mo":return $(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 $(K(_,e),n);case"LL":return $(X(2,e),n);case"Lo":return $(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 X(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 X(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){let n,a;return(0,et.startOfISOWeek)((n=(0,u.toDate)(e,void 0),a=(0,en.getISOWeek)(n,void 0)-r,n.setDate(n.getDate()-7*a),n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends x{priority=90;subPriority=1;parse(e,t,r){switch(t){case"d":return K(v,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return X(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 X(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=ei(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 $(X(t.length,e),a);case"eo":return $(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=ei(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 $(X(t.length,e),a);case"co":return $(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=ei(e,r,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends x{priority=90;parse(e,t,r){let n=e=>0===e?7:e;switch(t){case"i":case"ii":return X(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return $(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 $(r.day(e,{width:"narrow",context:"formatting"}),n);case"iiiiii":return $(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),n);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"}),n)}}validate(e,t){return t>=1&&t<=7}set(e,t,r){var n,a;let s,o,i;return n=e,s=(0,u.toDate)(n,void 0),a=void 0,i=0===(o=(0,u.toDate)(s,a?.in).getDay())?7:o,(e=(0,eo.addDays)(s,r-i,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(z(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(z(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(z(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 X(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,r){let n=e.getHours()>=12;return n&&r<12?e.setHours(r+12,0,0,0):n||12!==r?e.setHours(r,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends x{priority=70;parse(e,t,r){switch(t){case"H":return K(T,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return X(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends x{priority=70;parse(e,t,r){switch(t){case"K":return K(D,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return X(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends x{priority=70;parse(e,t,r){switch(t){case"k":return K(N,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return X(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,r){return e.setHours(r<=24?r%24:r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends x{priority=60;parse(e,t,r){switch(t){case"m":return K(M,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return X(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}incompatibleTokens=["t","T"]},s:new class extends x{priority=50;parse(e,t,r){switch(t){case"s":return K(O,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return X(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}incompatibleTokens=["t","T"]},S:new class extends x{priority=30;parse(e,t){return $(X(t.length,e),e=>Math.trunc(e*Math.pow(10,-t.length+3)))}set(e,t,r){return e.setMilliseconds(r),e}incompatibleTokens=["t","T"]},X:new class extends x{priority=10;parse(e,t){switch(t){case"X":return U(F,e);case"XX":return U(A,e);case"XXXX":return U(B,e);case"XXXXX":return U(W,e);default:return U(Q,e)}}set(e,t,r){return t.timestampIsSet?e:(0,m.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(B,e);case"xxxxx":return U(W,e);default:return U(Q,e)}}set(e,t,r){return t.timestampIsSet?e:(0,m.constructFrom)(e,e.getTime()-(0,el.getTimezoneOffsetInMilliseconds)(e)-r)}incompatibleTokens=["t","T","X"]},t:new class extends x{priority=40;parse(e){return K(q,e)}set(e,t,r){return[(0,m.constructFrom)(e,1e3*r),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends x{priority=20;parse(e){return K(q,e)}set(e,t,r){return[(0,m.constructFrom)(e,r),{timestampIsSet:!0}]}incompatibleTokens="*"}},ec=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ed=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eh=/^'([^]*?)'?$/,ef=/''/g,em=/\S/,ep=/[a-zA-Z]/;function eg(e,t,r,n){let a=()=>(0,m.constructFrom)(n?.in||r,NaN),s=Object.assign({},(0,p.getDefaultOptions)()),o=n?.locale??s.locale??d.defaultLocale,i=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:i,weekStartsOn:l,locale:o},g=[new w(n?.in,r)],b=t.match(ed).map(e=>{let t=e[0];return t in h.longFormatters?(0,h.longFormatters[t])(e,o.formatLong):e}).join("").match(ec),x=[];for(let r of b){!n?.useAdditionalWeekYearTokens&&(0,f.isProtectedWeekYearToken)(r)&&(0,f.warnOrThrowProtectedError)(r,t,e),!n?.useAdditionalDayOfYearTokens&&(0,f.isProtectedDayOfYearToken)(r)&&(0,f.warnOrThrowProtectedError)(r,t,e);let s=r[0],i=eu[s];if(i){let{incompatibleTokens:t}=i;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("*"===i.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=i.run(e,r,o.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(ef,"'")),0!==e.indexOf(r))return a();e=e.slice(r.length)}}if(e.length>0&&em.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]),_=(0,u.toDate)(r,n?.in);if(isNaN(+_))return a();let v={};for(let e of y){if(!e.validate(_,c))return a();let t=e.set(_,v,c);Array.isArray(t)?(_=t[0],Object.assign(v,t[1])):_=t}return _}var eb=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,eb.startOfDay)(r),endMs:+c(n)}}],54873)}]);
@@ -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 i},formatWithValidation:function(){return u},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||"",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)),o&&"object"==typeof o&&(o=String(s.urlQueryToSearchParams(o)));let c=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.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 o=["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=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 _}};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),u=e.r(4411),c=e.r(70782),d=e.r(69600),m=e.r(31508);e.r(91946);let f=e.r(35302),h=e.r(92024),p=e.r(88334),g=e.r(44017);function x(t){var r,n;let a,s,x,[_,y]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,i.useRef)(null),{href:w,as:j,children:k,prefetch:N=null,passHref:S,replace:C,shallow:T,scroll:E,onClick:P,onMouseEnter:L,onTouchStart:$,legacyBehavior:R=!1,onNavigate:O,transitionTypes:A,ref:M,unstable_dynamicOnHover:D,...U}=t;a=k,R&&("string"==typeof a||"number"==typeof a)&&(a=(0,l.jsx)("a",{children:a}));let I=i.default.useContext(u.AppRouterContext),W=!1!==N,q=!1!==N?null===(n=N)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=j||w)?r:(0,o.formatUrl)(r);if(R){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=i.default.Children.only(a)}let K=R?s&&"object"==typeof s&&s.ref:M,z=i.default.useCallback(e=>(null!==I&&(v.current=(0,h.mountLinkInstance)(e,B,I,q,W,y)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[W,B,I,q,y]),F={ref:(0,c.useMergedRef)(z,K),onClick(t){R||"function"!=typeof P||P(t),R&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,a,s,l,o){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(),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?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,o)})}}(t,B,v,C,E,O,A)},onMouseEnter(e){R||"function"!=typeof L||L(e),R&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),I&&W&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){R||"function"!=typeof $||$(e),R&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),I&&W&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(B)?F.href=B:R&&!S&&("a"!==s.type||"href"in s.props)||(F.href=(0,m.addBasePath)(B)),x=R?i.default.cloneElement(s,F):(0,l.jsx)("a",{...U,...F,children:a}),(0,l.jsx)(b.Provider,{value:_,children:x})}e.r(20612);let b=(0,i.createContext)(h.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,25204,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"})]})}],37399);var r=e.i(51268),n=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,t=!0){let a=(0,r.useRef)(e);a.current=e,(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,n.is_modal_dialog_open)()||(e.preventDefault(),a.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}],25204)},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,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:l,is_pending:o,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 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 u=e.i(51268),c=e.i(37399),d=e.i(90463),m=e.i(46549),f=e.i(22373);let h=new Set(f.topbar_quick_action_ids),p=["today","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&&h.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),w=e.i(90299),j=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),T=e.i(17798),E=e.i(10464),P=e.i(61834),L=e.i(81553),$=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",O={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},A=new Set(["manage-tags","pomodoro","sync-settings"]);function M(){let e=(0,n.useRouter)(),a=(0,n.usePathname)()??"/",s=(0,u.useSyncExternalStore)(C.subscribe_theme,N,S),l=(0,u.useSyncExternalStore)(y.subscribe,y.get_snapshot,y.get_server_snapshot),o=(0,u.useSyncExternalStore)(w.tracker_shortcut_map_preference.subscribe,w.tracker_shortcut_map_preference.get_snapshot,w.tracker_shortcut_map_preference.get_server_snapshot),h=(0,u.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(h)),_=f.topbar_quick_action_ids.filter(e=>!b.has(e)),M=Array.from(new Set([...Array.from(A),..._])),{email:D,is_configured:U,is_pending:I,sign_out:W}=(0,i.use_supabase_auth_session)(),[q,B]=(0,u.useState)(!1),K=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!q)return;let e=e=>{null===K.current||K.current.contains(e.target)||B(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[q]);let z=()=>{B(!1)};return(0,$.use_escape_to_cancel)(z,q),(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":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=O[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:R,role:"menuitem",onClick:z,children:n.label})},e)}),U?(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,m.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"===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;z(),e="dark"===k()?"light":"dark",(0,T.apply_theme)(e),(0,L.write_stored_theme)(e),E.theme_mode_preference.write(e),(0,P.write_document_preference_cookies)({theme_mode:e,theme:e}),E.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:R,role:"menuitem",onClick:()=>{let e;z(),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:"(?)"})]})})}),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:R,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:`${R} text-danger`,role:"menuitem",disabled:I,onClick:()=>{z(),W()},children:I?"Signing out…":"Sign out"})})]}):null]}):null]})}let D=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];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),s=(0,u.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 I=e.i(29539);function W(){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)(I.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)(s,{}),(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)(W,{}),(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}])},42800,e=>{"use strict";var t=e.i(8063),r=e.i(70096),n=e.i(48042);let a=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:a.map(n=>{let a=n.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:n.href,"aria-current":a?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},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}])},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:u=!1,autoFocus:c=!1,on_change:d}){let m=(0,r.useRef)(null),f=(0,r.useRef)(null),h=(0,r.useRef)(null),[p,g]=(0,r.useState)(0),[x,b]=(0,r.useState)(0),_=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,p),y=null===_?[]: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,_.query),v=null!==_&&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}})}(_.query,i),w=null!==_&&y.length>0&&!v&&!u;(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)(()=>{b(0)},[l,p,y.length]);let j=()=>{g(m.current?.selectionStart??l.length)},k=()=>{b(0)},N=e=>{let t,r,a;if(null===_)return;let{next_text:s,next_cursor:i}=(t=(0,n.format_display_tag)(e),r=l.slice(0,_.start_index),a=l.slice(_.end_index),{next_text:`${r}${t}${a}`,next_cursor:r.length+t.length});h.current=i,d(s),k()};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:u,autoFocus:c,autoComplete:"off","aria-autocomplete":"list","aria-expanded":w,"aria-controls":w?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),g(e.target.selectionStart??e.target.value.length)},onClick:j,onKeyUp:j,onKeyDown:e=>{if(w){if("ArrowDown"===e.key){e.preventDefault(),b(e=>(e+1)%y.length);return}if("ArrowUp"===e.key){e.preventDefault(),b(e=>(e-1+y.length)%y.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=y[x];void 0!==t&&N(t);return}"Escape"===e.key&&(e.preventDefault(),k())}},onBlur:()=>{window.setTimeout(k,120)}}),w?(0,t.jsx)("ul",{ref:f,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(),N(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},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")}])},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)},77352,e=>{"use strict";var t=e.i(8063),r=e.i(42800),n=e.i(75404);e.s(["SettingsPageLayout",0,function({breadcrumb:e,title:a,description:s,children:l}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.TrackerTopbar,{breadcrumb:e}),(0,t.jsxs)("main",{className:"mx-auto grid w-full max-w-[1120px] grid-cols-[minmax(12rem,16rem)_minmax(0,1fr)] gap-4 px-4 pb-10 pt-5 sm:gap-6 sm:px-5 sm:pt-6 max-[860px]:grid-cols-1",children:[(0,t.jsxs)("aside",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Settings"}),(0,t.jsx)(r.SettingsNav,{})]}),(0,t.jsxs)("section",{className:"flex min-w-0 flex-col gap-4",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h1",{className:"m-0 text-[1.35rem] font-[650] tracking-tight",children:a}),void 0!==s?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:s}):null]}),l]})]})]})}])},2286,e=>{"use strict";var t=e.i(8063),r=e.i(51268),n=e.i(19946),a=e.i(37193),s=e.i(77352),l=e.i(14260),i=e.i(18774),o=e.i(52663),u=e.i(52405);function c(e,t,r){let n=e.map(e=>(0,i.format_display_tag)(e)).join(", "),a=(0,i.format_display_tag)(t),s=1===r?"1 entry will be updated.":`${r} entries will be updated.`;return{title:"Merge tags?",message:`Merge ${n} into ${a}? ${s}`,confirmLabel:"Merge tags",variant:"danger"}}var d=e.i(39474);e.s(["TagManagementView",0,function({initial_tags:e}){let{confirm:m}=(0,n.use_confirm_dialog)(),[f,h]=(0,r.useState)(e),[p,g]=(0,r.useState)(()=>new Set),[x,b]=(0,r.useState)({}),[_,y]=(0,r.useState)(""),[v,w]=(0,r.useState)(null),[j,k]=(0,r.useState)(null),[N,S]=(0,r.useState)(!1),C=(0,r.useMemo)(()=>f.map(e=>e.name),[f]),T=f.filter(e=>p.has(e.name)).reduce((e,t)=>e+t.entryCount,0),E=async e=>{let t=await fetch("/api/tags",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json()).error??"Tag update failed");let r=await t.json();h(r.tags),g(new Set),k(1===r.entries_updated?"Updated 1 entry.":`Updated ${r.entries_updated} entries.`),(0,d.push_tracker_db_cloud_after_change)()},P=async e=>{let t=x[e]?.trim()??"";if(0===t.length)return void w("Enter a new tag name.");let r=f.find(t=>t.name===e);if(void 0===r)return;let n=f.find(e=>(0,i.format_display_tag)(e.name)===(0,i.format_display_tag)(t)),s=void 0!==n&&n.name!==e?r.entryCount+n.entryCount:r.entryCount;if(await m(c([e],t,s))){S(!0),w(null),k(null);try{await E({action:"rename",fromTag:e,toTag:t}),b(t=>{let r={...t};return delete r[e],r})}catch(e){w((0,a.message_from_unknown_error)(e,"Tag rename failed"))}finally{S(!1)}}},L=async()=>{let e=[...p];if(e.length<2)return void w("Select at least two tags to merge.");if(0===_.trim().length)return void w("Enter a target tag for the merge.");if(await m(c(e,_,T))){S(!0),w(null),k(null);try{await E({action:"merge",sourceTags:e,targetTag:_}),y("")}catch(e){w((0,a.message_from_unknown_error)(e,"Tag merge failed"))}finally{S(!1)}}};return(0,t.jsxs)(s.SettingsPageLayout,{breadcrumb:{current:"Tag management",parent:{label:"Settings",href:"/settings"}},title:"Tag management",description:"Rename or merge tags across every entry in your database.",children:[(0,t.jsxs)("section",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Merge tags"}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.8rem] leading-snug text-muted",children:"Select two or more tags below, then choose the tag they should become."}),(0,t.jsxs)("label",{className:"mt-3 flex flex-col gap-1 text-[0.82rem] text-muted",children:["Target tag",(0,t.jsx)(l.TagAutocompleteInput,{id:"merge-target-tag",value:_,known_tags:C,placeholder:"e.g. @project",disabled:N,on_change:y})]}),(0,t.jsxs)("button",{type:"button",className:`${(0,o.get_button_class_name)("primary","small")} mt-3`,disabled:N||p.size<2,onClick:()=>void L(),children:["Merge ",p.size," tags"]})]}),0===f.length?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"No tags yet. Add @tags when you check in to an entry."}):(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0","aria-label":"Tags",children:f.map(e=>(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-2.5 shadow-sm",children:(0,t.jsxs)("form",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",onSubmit:t=>{t.preventDefault(),P(e.name)},children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:p.has(e.name),disabled:N,"aria-label":`Select ${(0,i.format_display_tag)(e.name)}`,onChange:()=>{var t;return t=e.name,void g(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})}}),(0,t.jsxs)("div",{className:"flex min-w-0 shrink-0 flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[(0,t.jsx)("span",{className:"font-semibold leading-tight",children:(0,i.format_display_tag)(e.name)}),(0,t.jsxs)("span",{className:"text-[0.82rem] text-muted",children:[e.entryCount," ",1===e.entryCount?"entry":"entries"]})]}),(0,t.jsxs)("div",{className:"ml-auto flex min-w-[min(100%,14rem)] flex-1 basis-56 items-center justify-end gap-2 sm:max-w-xs",children:[(0,t.jsx)("input",{className:(0,u.get_input_class_name)("compact"),value:x[e.name]??"",placeholder:"Rename to…","aria-label":`Rename ${(0,i.format_display_tag)(e.name)}`,disabled:N,onChange:t=>b(r=>({...r,[e.name]:t.target.value}))}),(0,t.jsx)("button",{type:"submit",className:`${(0,o.get_button_class_name)("ghost","small")} shrink-0`,disabled:N||(x[e.name]?.trim().length??0)===0,children:"Rename"})]})]})},e.name))}),null===j?null:(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-accent",children:j}),null===v?null:(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-danger",children:v})]})}],2286)}]);