super-time-tracker-ui 0.1.32 → 0.1.33

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 (328) hide show
  1. package/bin/stt-ui.js +4 -4
  2. package/dist/standalone/next-output/BUILD_ID +1 -1
  3. package/dist/standalone/next-output/app-path-routes-manifest.json +5 -0
  4. package/dist/standalone/next-output/build-manifest.json +5 -5
  5. package/dist/standalone/next-output/routes-manifest.json +30 -0
  6. package/dist/standalone/next-output/server/app/_global-error/page/build-manifest.json +2 -2
  7. package/dist/standalone/next-output/server/app/_global-error.html +1 -1
  8. package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
  9. package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/dist/standalone/next-output/server/app/_not-found/page/build-manifest.json +2 -2
  15. package/dist/standalone/next-output/server/app/_not-found/page.js +1 -2
  16. package/dist/standalone/next-output/server/app/_not-found/page.js.nft.json +1 -1
  17. package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/dist/standalone/next-output/server/app/api/command-palette/route/app-paths-manifest.json +3 -0
  19. package/dist/standalone/next-output/server/app/api/command-palette/route/build-manifest.json +9 -0
  20. package/dist/standalone/next-output/server/app/api/command-palette/route/server-reference-manifest.json +4 -0
  21. package/dist/standalone/next-output/server/app/api/command-palette/route.js +6 -0
  22. package/dist/standalone/next-output/server/app/api/command-palette/route.js.nft.json +1 -0
  23. package/dist/standalone/next-output/server/app/api/command-palette/route_client-reference-manifest.js +3 -0
  24. package/dist/standalone/next-output/server/app/api/entries/search/route/app-paths-manifest.json +3 -0
  25. package/dist/standalone/next-output/server/app/api/entries/search/route/build-manifest.json +9 -0
  26. package/dist/standalone/next-output/server/app/api/entries/search/route/server-reference-manifest.json +4 -0
  27. package/dist/standalone/next-output/server/app/api/entries/search/route.js +7 -0
  28. package/dist/standalone/next-output/server/app/api/entries/search/route.js.nft.json +1 -0
  29. package/dist/standalone/next-output/server/app/api/entries/search/route_client-reference-manifest.js +3 -0
  30. package/dist/standalone/next-output/server/app/api/entry/delete-bulk/route.js +1 -1
  31. package/dist/standalone/next-output/server/app/api/entry/delete-bulk/route.js.nft.json +1 -1
  32. package/dist/standalone/next-output/server/app/api/entry/merge/route/app-paths-manifest.json +3 -0
  33. package/dist/standalone/next-output/server/app/api/entry/merge/route/build-manifest.json +9 -0
  34. package/dist/standalone/next-output/server/app/api/entry/merge/route/server-reference-manifest.json +4 -0
  35. package/dist/standalone/next-output/server/app/api/entry/merge/route.js +7 -0
  36. package/dist/standalone/next-output/server/app/api/entry/merge/route.js.nft.json +1 -0
  37. package/dist/standalone/next-output/server/app/api/entry/merge/route_client-reference-manifest.js +3 -0
  38. package/dist/standalone/next-output/server/app/api/entry/move/route.js +1 -1
  39. package/dist/standalone/next-output/server/app/api/entry/move/route.js.nft.json +1 -1
  40. package/dist/standalone/next-output/server/app/api/entry/move-bulk/route.js +1 -1
  41. package/dist/standalone/next-output/server/app/api/entry/move-bulk/route.js.nft.json +1 -1
  42. package/dist/standalone/next-output/server/app/api/entry/route.js +2 -2
  43. package/dist/standalone/next-output/server/app/api/entry/route.js.nft.json +1 -1
  44. package/dist/standalone/next-output/server/app/api/entry/split/route/app-paths-manifest.json +3 -0
  45. package/dist/standalone/next-output/server/app/api/entry/split/route/build-manifest.json +9 -0
  46. package/dist/standalone/next-output/server/app/api/entry/split/route/server-reference-manifest.json +4 -0
  47. package/dist/standalone/next-output/server/app/api/entry/split/route.js +8 -0
  48. package/dist/standalone/next-output/server/app/api/entry/split/route.js.nft.json +1 -0
  49. package/dist/standalone/next-output/server/app/api/entry/split/route_client-reference-manifest.js +3 -0
  50. package/dist/standalone/next-output/server/app/api/focus-nudges/status/route.js +1 -1
  51. package/dist/standalone/next-output/server/app/api/focus-nudges/status/route.js.nft.json +1 -1
  52. package/dist/standalone/next-output/server/app/api/in/route.js +1 -1
  53. package/dist/standalone/next-output/server/app/api/in/route.js.nft.json +1 -1
  54. package/dist/standalone/next-output/server/app/api/note/route.js +1 -1
  55. package/dist/standalone/next-output/server/app/api/note/route.js.nft.json +1 -1
  56. package/dist/standalone/next-output/server/app/api/out/route.js +2 -2
  57. package/dist/standalone/next-output/server/app/api/out/route.js.nft.json +1 -1
  58. package/dist/standalone/next-output/server/app/api/sheet/active/route.js +1 -1
  59. package/dist/standalone/next-output/server/app/api/sheet/active/route.js.nft.json +1 -1
  60. package/dist/standalone/next-output/server/app/api/sheet/route.js +1 -1
  61. package/dist/standalone/next-output/server/app/api/sheet/route.js.nft.json +1 -1
  62. package/dist/standalone/next-output/server/app/api/state/route.js +1 -1
  63. package/dist/standalone/next-output/server/app/api/state/route.js.nft.json +1 -1
  64. package/dist/standalone/next-output/server/app/api/sync/import/route.js +1 -1
  65. package/dist/standalone/next-output/server/app/api/sync/import/route.js.nft.json +1 -1
  66. package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js +1 -1
  67. package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js.nft.json +1 -1
  68. package/dist/standalone/next-output/server/app/api/sync/pull/route.js +1 -1
  69. package/dist/standalone/next-output/server/app/api/sync/pull/route.js.nft.json +1 -1
  70. package/dist/standalone/next-output/server/app/api/sync/push/route.js +1 -1
  71. package/dist/standalone/next-output/server/app/api/sync/push/route.js.nft.json +1 -1
  72. package/dist/standalone/next-output/server/app/api/tags/route.js +1 -1
  73. package/dist/standalone/next-output/server/app/api/tags/route.js.nft.json +1 -1
  74. package/dist/standalone/next-output/server/app/login/page/build-manifest.json +2 -2
  75. package/dist/standalone/next-output/server/app/login/page.js +1 -2
  76. package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
  77. package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
  78. package/dist/standalone/next-output/server/app/offline/page/build-manifest.json +2 -2
  79. package/dist/standalone/next-output/server/app/offline/page.js +1 -2
  80. package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
  81. package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
  82. package/dist/standalone/next-output/server/app/page/build-manifest.json +2 -2
  83. package/dist/standalone/next-output/server/app/page.js +2 -3
  84. package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
  85. package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
  86. package/dist/standalone/next-output/server/app/pomodoro/page/build-manifest.json +2 -2
  87. package/dist/standalone/next-output/server/app/pomodoro/page.js +2 -3
  88. package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
  89. package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
  90. package/dist/standalone/next-output/server/app/register/page/build-manifest.json +2 -2
  91. package/dist/standalone/next-output/server/app/register/page.js +1 -2
  92. package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
  93. package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
  94. package/dist/standalone/next-output/server/app/reporting/page/build-manifest.json +2 -2
  95. package/dist/standalone/next-output/server/app/reporting/page.js +2 -3
  96. package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
  97. package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
  98. package/dist/standalone/next-output/server/app/search/page/app-paths-manifest.json +3 -0
  99. package/dist/standalone/next-output/server/app/search/page/build-manifest.json +17 -0
  100. package/dist/standalone/next-output/server/app/search/page/next-font-manifest.json +11 -0
  101. package/dist/standalone/next-output/server/app/search/page/react-loadable-manifest.json +1 -0
  102. package/dist/standalone/next-output/server/app/search/page/server-reference-manifest.json +4 -0
  103. package/dist/standalone/next-output/server/app/search/page.js +16 -0
  104. package/dist/standalone/next-output/server/app/search/page.js.nft.json +1 -0
  105. package/dist/standalone/next-output/server/app/search/page_client-reference-manifest.js +3 -0
  106. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/build-manifest.json +2 -2
  107. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js +1 -2
  108. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
  109. package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
  110. package/dist/standalone/next-output/server/app/settings/cloud-sync/page/build-manifest.json +2 -2
  111. package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js +1 -2
  112. package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
  113. package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
  114. package/dist/standalone/next-output/server/app/settings/data/page/build-manifest.json +2 -2
  115. package/dist/standalone/next-output/server/app/settings/data/page.js +2 -3
  116. package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
  117. package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
  118. package/dist/standalone/next-output/server/app/settings/display/page/build-manifest.json +2 -2
  119. package/dist/standalone/next-output/server/app/settings/display/page.js +1 -2
  120. package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
  121. package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
  122. package/dist/standalone/next-output/server/app/settings/goals/page/build-manifest.json +2 -2
  123. package/dist/standalone/next-output/server/app/settings/goals/page.js +2 -3
  124. package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
  125. package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
  126. package/dist/standalone/next-output/server/app/settings/notifications/page/build-manifest.json +2 -2
  127. package/dist/standalone/next-output/server/app/settings/notifications/page.js +1 -2
  128. package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
  129. package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
  130. package/dist/standalone/next-output/server/app/settings/page/build-manifest.json +2 -2
  131. package/dist/standalone/next-output/server/app/settings/page.js +2 -3
  132. package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
  133. package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
  134. package/dist/standalone/next-output/server/app/settings/pomodoro/page/build-manifest.json +2 -2
  135. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js +2 -3
  136. package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
  137. package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
  138. package/dist/standalone/next-output/server/app/settings/quick-actions/page/build-manifest.json +2 -2
  139. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js +1 -2
  140. package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -1
  141. package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +1 -1
  142. package/dist/standalone/next-output/server/app/settings/tags/page/build-manifest.json +2 -2
  143. package/dist/standalone/next-output/server/app/settings/tags/page.js +2 -3
  144. package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
  145. package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
  146. package/dist/standalone/next-output/server/app/sheets/page/build-manifest.json +2 -2
  147. package/dist/standalone/next-output/server/app/sheets/page.js +2 -3
  148. package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
  149. package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
  150. package/dist/standalone/next-output/server/app/today/page/build-manifest.json +2 -2
  151. package/dist/standalone/next-output/server/app/today/page.js +2 -3
  152. package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
  153. package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
  154. package/dist/standalone/next-output/server/app-paths-manifest.json +5 -0
  155. package/dist/standalone/next-output/server/chunks/0z~i_next_dist_esm_build_templates_app-route_0~jv_po.js +3 -0
  156. package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0ixkum3._.js → [root-of-the-server]__01ng47y._.js} +2 -2
  157. package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0.ztg_g._.js → [root-of-the-server]__02bnr5q._.js} +2 -2
  158. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0daa86i._.js +3 -0
  159. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0hwik-5._.js +3 -0
  160. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0lbu8mm._.js +3 -0
  161. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0n.~.zo._.js +3 -0
  162. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0n~maxn._.js +3 -0
  163. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0pave79._.js +3 -0
  164. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0qj~x3r._.js +3 -0
  165. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0skolig._.js +3 -0
  166. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0traxfq._.js +3 -0
  167. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0u_4s37._.js +3 -0
  168. package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0qxlpdo._.js → [root-of-the-server]__0vivr1t._.js} +2 -2
  169. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0vjnznw._.js +3 -0
  170. package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__01dpndl._.js → [root-of-the-server]__0wp5dks._.js} +2 -2
  171. package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0g~~yai._.js → [root-of-the-server]__0~_od9c._.js} +2 -2
  172. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~gka7i._.js +3 -0
  173. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~zviro._.js +1 -1
  174. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__13y14r6._.js +3 -0
  175. package/dist/standalone/next-output/server/chunks/{_0y.amf.._.js → _009-tpl._.js} +2 -2
  176. package/dist/standalone/next-output/server/chunks/_0p0-odp._.js +3 -0
  177. package/dist/standalone/next-output/server/chunks/{_0vzosja._.js → _0rz1whw._.js} +2 -2
  178. package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_command-palette_route_actions_0n5r28j.js +3 -0
  179. package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entries_search_route_actions_09m9ljm.js +3 -0
  180. package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entry_merge_route_actions_047yt1x.js +3 -0
  181. package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entry_split_route_actions_0g-iltq.js +3 -0
  182. package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_04bpslp._.js +1 -1
  183. package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0huho7_.js +4 -0
  184. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__052~wmx._.js +1 -1
  185. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__07_7oid._.js +3 -0
  186. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0x6yv3u._.js → [root-of-the-server]__0c786vx._.js} +2 -2
  187. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0gi2idc._.js → [root-of-the-server]__0d6wmgd._.js} +2 -2
  188. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d9ak_~._.js +3 -0
  189. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d~vgg9._.js +3 -0
  190. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0hpcspt._.js +3 -0
  191. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0kp.3u5._.js +3 -0
  192. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0yrs18n._.js → [root-of-the-server]__0laah33._.js} +2 -2
  193. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0n8s9zq._.js +1 -1
  194. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0qwn._e._.js +3 -0
  195. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0_wxrlk._.js → [root-of-the-server]__0teulir._.js} +2 -2
  196. package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0hx9602._.js → [root-of-the-server]__0xp50ux._.js} +2 -2
  197. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0yz-q3-._.js +3 -0
  198. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__113s7hk._.js +3 -0
  199. package/dist/standalone/next-output/server/chunks/ssr/_0-a9ia4._.js +3 -0
  200. package/dist/standalone/next-output/server/chunks/ssr/_002dssm._.js +1 -1
  201. package/dist/standalone/next-output/server/chunks/ssr/_00x~ete._.js +1 -1
  202. package/dist/standalone/next-output/server/chunks/ssr/_01m_4io._.js +3 -0
  203. package/dist/standalone/next-output/server/chunks/ssr/_036rv.y._.js +3 -0
  204. package/dist/standalone/next-output/server/chunks/ssr/{_0_k2414._.js → _04.8jwp._.js} +2 -2
  205. package/dist/standalone/next-output/server/chunks/ssr/_040_y99._.js +3 -0
  206. package/dist/standalone/next-output/server/chunks/ssr/_07p~0bg._.js +1 -1
  207. package/dist/standalone/next-output/server/chunks/ssr/_0dxq_sx._.js +3 -0
  208. package/dist/standalone/next-output/server/chunks/ssr/_0hcz.gb._.js +3 -0
  209. package/dist/standalone/next-output/server/chunks/ssr/_0lhrvkv._.js +3 -0
  210. package/dist/standalone/next-output/server/chunks/ssr/_0l~yvzl._.js +3 -0
  211. package/dist/standalone/next-output/server/chunks/ssr/_0m.iebm._.js +1 -1
  212. package/dist/standalone/next-output/server/chunks/ssr/_0nnp~ae._.js +1 -1
  213. package/dist/standalone/next-output/server/chunks/ssr/_0p5_u-y._.js +3 -0
  214. package/dist/standalone/next-output/server/chunks/ssr/_0q~8_bm._.js +1 -1
  215. package/dist/standalone/next-output/server/chunks/ssr/_0rv4ope._.js +3 -0
  216. package/dist/standalone/next-output/server/chunks/ssr/_0s_1q6-._.js +3 -0
  217. package/dist/standalone/next-output/server/chunks/ssr/_0s_yzxz._.js +3 -0
  218. package/dist/standalone/next-output/server/chunks/ssr/_0t2td71._.js +3 -0
  219. package/dist/standalone/next-output/server/chunks/ssr/_0v9kigy._.js +1 -1
  220. package/dist/standalone/next-output/server/chunks/ssr/_0woiueg._.js +3 -0
  221. package/dist/standalone/next-output/server/chunks/ssr/_0zgllyb._.js +3 -0
  222. package/dist/standalone/next-output/server/chunks/ssr/_10c-dv7._.js +3 -0
  223. package/dist/standalone/next-output/server/chunks/ssr/{_088~qfj._.js → _10~dvb4._.js} +3 -3
  224. package/dist/standalone/next-output/server/chunks/ssr/_11je2nt._.js +3 -0
  225. package/dist/standalone/next-output/server/chunks/ssr/_1218olc._.js +3 -0
  226. package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_search_page_actions_0koh-tf.js +3 -0
  227. package/dist/standalone/next-output/server/chunks/ssr/components_0isp.qn._.js +3 -0
  228. package/dist/standalone/next-output/server/chunks/ssr/components_0rm~268._.js +1 -1
  229. package/dist/standalone/next-output/server/chunks/ssr/components_0s502iu._.js +3 -0
  230. package/dist/standalone/next-output/server/chunks/ssr/components_reporting-view_tsx_0-0ofcv._.js +1 -1
  231. package/dist/standalone/next-output/server/chunks/ssr/components_supabase-auth-form_tsx_0s9lt-1._.js +3 -0
  232. package/dist/standalone/next-output/server/chunks/ssr/components_today-focus-view_tsx_0~eac-w._.js +1 -1
  233. package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +1 -1
  234. package/dist/standalone/next-output/server/middleware-build-manifest.js +5 -5
  235. package/dist/standalone/next-output/server/middleware-manifest.json +1 -1
  236. package/dist/standalone/next-output/server/next-font-manifest.js +1 -1
  237. package/dist/standalone/next-output/server/next-font-manifest.json +4 -0
  238. package/dist/standalone/next-output/server/pages/500.html +1 -1
  239. package/dist/standalone/next-output/static/chunks/0-pivfzfhyz.5.js +1 -0
  240. package/dist/standalone/next-output/static/chunks/0.e7_ejd.-kzx.js +1 -0
  241. package/dist/standalone/next-output/static/chunks/{0x9s1xcq69ppx.js → 005x4jqipr75n.js} +5 -5
  242. package/dist/standalone/next-output/static/chunks/02~oo04e0po4k.css +3 -0
  243. package/dist/standalone/next-output/static/chunks/033lk~e30imyc.js +1 -0
  244. package/dist/standalone/next-output/static/chunks/03lov4c0_c3q~.js +1 -0
  245. package/dist/standalone/next-output/static/chunks/049ufrw2rog87.js +1 -0
  246. package/dist/standalone/next-output/static/chunks/04d2c_i-luh3o.js +1 -0
  247. package/dist/standalone/next-output/static/chunks/08sdj449boiec.js +1 -0
  248. package/dist/standalone/next-output/static/chunks/09u_29en-yaxy.js +1 -0
  249. package/dist/standalone/next-output/static/chunks/0ahw3noqs1atp.js +1 -0
  250. package/dist/standalone/next-output/static/chunks/0e7vf6ybvzpet.js +1 -0
  251. package/dist/standalone/next-output/static/chunks/0hse41v5a2z.p.js +1 -0
  252. package/dist/standalone/next-output/static/chunks/0kehy4rq7thp9.js +1 -0
  253. package/dist/standalone/next-output/static/chunks/0pq_8wz65_8e..js +1 -0
  254. package/dist/standalone/next-output/static/chunks/0q1lqhczpaxed.js +1 -0
  255. package/dist/standalone/next-output/static/chunks/0s_kkoslz7uoy.js +1 -0
  256. package/dist/standalone/next-output/static/chunks/0tee7--l8~1jx.js +1 -0
  257. package/dist/standalone/next-output/static/chunks/0ufz8oxu3.gqp.js +1 -0
  258. package/dist/standalone/next-output/static/chunks/0xalmh45.srx..js +1 -0
  259. package/dist/standalone/next-output/static/chunks/0xeacy6yprulb.js +1 -0
  260. package/dist/standalone/next-output/static/chunks/0xmqo9jexa_hl.js +1 -0
  261. package/dist/standalone/next-output/static/chunks/{0ztw.xdr4egi9.js → 0y7vk2q__th4g.js} +2 -2
  262. package/dist/standalone/next-output/static/chunks/0yd454vuc8vdt.js +1 -0
  263. package/dist/standalone/next-output/static/chunks/10hpcjpra-dzn.js +1 -0
  264. package/dist/standalone/next-output/static/chunks/151m05291h.pl.js +1 -0
  265. package/dist/standalone/next-output/static/chunks/175d60.wup0de.js +1 -0
  266. package/dist/standalone/next-output/static/chunks/17gch824k4dm8.js +1 -0
  267. package/dist/standalone/next-output/static/chunks/{turbopack-09e2mm19twlrw.js → turbopack-01utszc95mtf1.js} +1 -1
  268. package/dist/standalone/package.json +13 -4
  269. package/dist/standalone/public/sw.js +1 -0
  270. package/package.json +13 -4
  271. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0-xbdkv._.js +0 -3
  272. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__00_xlkl._.js +0 -3
  273. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__02io6cv._.js +0 -3
  274. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__07sy349._.js +0 -3
  275. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0l9xtqh._.js +0 -3
  276. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0o1mjxc._.js +0 -3
  277. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0s7i732._.js +0 -3
  278. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wtdkb3._.js +0 -3
  279. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__13n2uo8._.js +0 -3
  280. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0-0rjzr._.js +0 -3
  281. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__01xqr3d._.js +0 -3
  282. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0_b2z9m._.js +0 -3
  283. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0bowsf1._.js +0 -3
  284. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0dvku3t._.js +0 -3
  285. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0k~hq1g._.js +0 -3
  286. package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0wtu388._.js +0 -3
  287. package/dist/standalone/next-output/server/chunks/ssr/_00aklen._.js +0 -3
  288. package/dist/standalone/next-output/server/chunks/ssr/_00ic3j9._.js +0 -3
  289. package/dist/standalone/next-output/server/chunks/ssr/_08qe8j9._.js +0 -3
  290. package/dist/standalone/next-output/server/chunks/ssr/_0_aptb7._.js +0 -3
  291. package/dist/standalone/next-output/server/chunks/ssr/_0axgv9-._.js +0 -3
  292. package/dist/standalone/next-output/server/chunks/ssr/_0c0txs~._.js +0 -3
  293. package/dist/standalone/next-output/server/chunks/ssr/_0cm4hy2._.js +0 -3
  294. package/dist/standalone/next-output/server/chunks/ssr/_0cxg26n._.js +0 -3
  295. package/dist/standalone/next-output/server/chunks/ssr/_0l6-7m4._.js +0 -3
  296. package/dist/standalone/next-output/server/chunks/ssr/_0s1f~0y._.js +0 -3
  297. package/dist/standalone/next-output/server/chunks/ssr/_0xrc5.~._.js +0 -3
  298. package/dist/standalone/next-output/server/chunks/ssr/_0y3ypyx._.js +0 -3
  299. package/dist/standalone/next-output/server/chunks/ssr/_0ycs85o._.js +0 -3
  300. package/dist/standalone/next-output/server/chunks/ssr/_0zk9gtm._.js +0 -3
  301. package/dist/standalone/next-output/server/chunks/ssr/_13crob-._.js +0 -3
  302. package/dist/standalone/next-output/server/chunks/ssr/_13y76jr._.js +0 -3
  303. package/dist/standalone/next-output/server/chunks/ssr/lib_0c0z4q-._.js +0 -3
  304. package/dist/standalone/next-output/static/chunks/0.4obx1-sv46-.js +0 -1
  305. package/dist/standalone/next-output/static/chunks/029pvmqxn_t4z.js +0 -1
  306. package/dist/standalone/next-output/static/chunks/04~.lbegcwd41.js +0 -1
  307. package/dist/standalone/next-output/static/chunks/05tg.ske01w0a.js +0 -1
  308. package/dist/standalone/next-output/static/chunks/06xf_oh5oqbs2.js +0 -1
  309. package/dist/standalone/next-output/static/chunks/09acxdggb87~w.js +0 -1
  310. package/dist/standalone/next-output/static/chunks/09tjbwcc~3p_e.js +0 -1
  311. package/dist/standalone/next-output/static/chunks/0ate7k1rcitu0.js +0 -1
  312. package/dist/standalone/next-output/static/chunks/0crn_fc6.6569.js +0 -1
  313. package/dist/standalone/next-output/static/chunks/0fkr5kz7p1r5l.js +0 -1
  314. package/dist/standalone/next-output/static/chunks/0lhj2p9.4g20~.js +0 -1
  315. package/dist/standalone/next-output/static/chunks/0o4zvrm3q.9k3.js +0 -1
  316. package/dist/standalone/next-output/static/chunks/0pqilbd~jphqs.css +0 -3
  317. package/dist/standalone/next-output/static/chunks/0q05k1wfzh4_a.js +0 -1
  318. package/dist/standalone/next-output/static/chunks/0vov8ngx9~8m2.js +0 -1
  319. package/dist/standalone/next-output/static/chunks/0watkjb-fw0vn.js +0 -1
  320. package/dist/standalone/next-output/static/chunks/0x5_m1_cuacap.js +0 -1
  321. package/dist/standalone/next-output/static/chunks/0xj4dodycy1oc.js +0 -1
  322. package/dist/standalone/next-output/static/chunks/0yi4m~~80yeqj.js +0 -1
  323. package/dist/standalone/next-output/static/chunks/12eaief5vtso9.js +0 -1
  324. package/dist/standalone/next-output/static/chunks/13-nw2q_c_9mk.js +0 -1
  325. package/dist/standalone/next-output/static/chunks/14jtaz5s.4ih1.js +0 -1
  326. /package/dist/standalone/next-output/static/{gS32e4Tv_70ot1IWBJddE → X1tXHWU8OQsHkaFGwq5aW}/_buildManifest.js +0 -0
  327. /package/dist/standalone/next-output/static/{gS32e4Tv_70ot1IWBJddE → X1tXHWU8OQsHkaFGwq5aW}/_clientMiddlewareManifest.js +0 -0
  328. /package/dist/standalone/next-output/static/{gS32e4Tv_70ot1IWBJddE → X1tXHWU8OQsHkaFGwq5aW}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ module.exports=[2474,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),this.name="InvariantError"}}},35394,a=>{"use strict";a.s(["is_supabase_configured",0,function(){return("https://ctruizaqyeyidujmtxhc.supabase.co".trim()??"").length>0&&("sb_publishable_gTYHeWoWIPPW3SIC4cYaXw_ux7UL_Jb".trim()??"").length>0}])},55120,a=>{a.v({className:"geist_f53a3a98-module__E6rLHq__className",variable:"geist_f53a3a98-module__E6rLHq__variable"})},91129,a=>{a.v({className:"geist_mono_a0a08e0-module__UZhpWW__className",variable:"geist_mono_a0a08e0-module__UZhpWW__variable"})},62497,a=>{"use strict";a.s(["AppProviders",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call AppProviders() from the server but AppProviders is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/app-providers.tsx <module evaluation>","AppProviders")},98596,a=>{"use strict";a.s(["AppProviders",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call AppProviders() from the server but AppProviders is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/app-providers.tsx","AppProviders")},14631,a=>{"use strict";a.i(62497);var b=a.i(98596);a.n(b)},4684,a=>{"use strict";a.s(["DocumentPreferencesInit",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DocumentPreferencesInit() from the server but DocumentPreferencesInit is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/document-preferences-init.tsx <module evaluation>","DocumentPreferencesInit")},8602,a=>{"use strict";a.s(["DocumentPreferencesInit",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DocumentPreferencesInit() from the server but DocumentPreferencesInit is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/document-preferences-init.tsx","DocumentPreferencesInit")},41505,a=>{"use strict";a.i(4684);var b=a.i(8602);a.n(b)},93359,a=>{"use strict";a.s(["PwaRegister",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PwaRegister() from the server but PwaRegister is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pwa-register.tsx <module evaluation>","PwaRegister")},33610,a=>{"use strict";a.s(["PwaRegister",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PwaRegister() from the server but PwaRegister is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pwa-register.tsx","PwaRegister")},22650,a=>{"use strict";a.i(93359);var b=a.i(33610);a.n(b)},80351,a=>{"use strict";a.s(["ThemeModeSystemListener",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ThemeModeSystemListener() from the server but ThemeModeSystemListener is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/theme-mode-system-listener.tsx <module evaluation>","ThemeModeSystemListener")},68139,a=>{"use strict";a.s(["ThemeModeSystemListener",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ThemeModeSystemListener() from the server but ThemeModeSystemListener is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/theme-mode-system-listener.tsx","ThemeModeSystemListener")},3905,a=>{"use strict";a.i(80351);var b=a.i(68139);a.n(b)},18073,a=>{"use strict";a.s(["UiPreferencesDocumentSync",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call UiPreferencesDocumentSync() from the server but UiPreferencesDocumentSync is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui-preferences-document-sync.tsx <module evaluation>","UiPreferencesDocumentSync")},45471,a=>{"use strict";a.s(["UiPreferencesDocumentSync",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call UiPreferencesDocumentSync() from the server but UiPreferencesDocumentSync is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui-preferences-document-sync.tsx","UiPreferencesDocumentSync")},90689,a=>{"use strict";a.i(18073);var b=a.i(45471);a.n(b)},33290,a=>{"use strict";var b=a.i(46193),c=a.i(55120);let d={className:c.default.className,style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"}};null!=c.default.variable&&(d.variable=c.default.variable);var e=a.i(91129);let f={className:e.default.className,style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"}};null!=e.default.variable&&(f.variable=e.default.variable);var g=a.i(14631),h=a.i(41505),i=a.i(22650),j=a.i(3905),k=a.i(90689),l=a.i(40035);let m="default",n=["default","midnight","warm","ocean","forest","contrast","sunset","lavender","rose","slate","nord","dracula"],o={teal:"default",blue:"ocean",violet:"midnight",rose:"warm",amber:"warm",emerald:"forest"};a.i(35394);let p=function(a){let{default_value:b,is_valid:c,storage_key:d}=a,e=new Set,f=()=>b;return{storage_key:d,default_value:b,is_valid:c,read:f,write:a=>{try{window.localStorage.setItem(d,a)}catch{}},subscribe:a=>(e.add(a),()=>{e.delete(a)}),notify:()=>{e.forEach(a=>{a()})},get_snapshot:f,get_server_snapshot:()=>b}}({storage_key:"super-time-tracker-theme-mode",default_value:"system",is_valid:a=>"light"===a||"dark"===a||"system"===a});async function q(){var a;let b=await (0,l.cookies)(),c="light"===(await (0,l.headers)()).get("sec-ch-prefers-color-scheme"),d=b.get("stt-palette")?.value,e=function(a,b){if(void 0!==a&&n.includes(a))return a;if(void 0!==b){let a=o[b];if(void 0!==a)return a}return m}(d,void 0),f=b.get("stt-compact-lists")?.value==="true",g=void 0===(a=b.get("stt-theme-mode")?.value)?null:p.is_valid(a)?a:null;if(null!==g)return{theme:function(a,b){return"system"===a?b?"light":"dark":"light"===a||"dark"===a?a:"dark"}(g,c),palette:e,compact_lists:f};let h=b.get("stt-theme")?.value;return"light"===h||"dark"===h?{theme:h,palette:e,compact_lists:f}:{theme:c?"light":"dark",palette:void 0===d?m:e,compact_lists:f}}async function r({children:a}){let{theme:c,palette:e,compact_lists:l}=await q();return(0,b.jsx)("html",{lang:"en",className:`${d.variable} ${f.variable} h-full antialiased`,"data-theme":c,"data-palette":e,"data-compact-lists":l?"true":"false",suppressHydrationWarning:!0,children:(0,b.jsxs)("body",{className:"min-h-full font-sans transition-[background-color,color] duration-200",children:[(0,b.jsx)(h.DocumentPreferencesInit,{}),(0,b.jsx)(i.PwaRegister,{}),(0,b.jsx)(j.ThemeModeSystemListener,{}),(0,b.jsx)(k.UiPreferencesDocumentSync,{}),(0,b.jsx)(g.AppProviders,{children:a})]})})}a.s(["default",0,r,"metadata",0,{title:"super-time-tracker",description:"Web UI for the super-time-tracker CLI time sheets",manifest:"/manifest.webmanifest",icons:{icon:[{url:"/icons/favicon.ico",type:"image/x-icon"},{url:"/icons/favicon-16x16.png",type:"image/png",sizes:"16x16"},{url:"/icons/favicon-32x32.png",type:"image/png",sizes:"32x32"},{url:"/icons/android-chrome-192x192.png",type:"image/png",sizes:"192x192"},{url:"/icons/android-chrome-512x512.png",type:"image/png",sizes:"512x512"}],apple:[{url:"/icons/apple-touch-icon.png",type:"image/png",sizes:"180x180"}]},appleWebApp:{capable:!0,title:"super-time-tracker",statusBarStyle:"default"}},"viewport",0,{themeColor:"#14b8a6"}],33290)},70864,a=>{a.n(a.i(33290))}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0kp.3u5._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},23750,a=>{"use strict";a.s(["collect_known_tags",0,function(a){let b=new Set;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags){let a=c.trim();a.length>0&&b.add(a)}return[...b].sort((a,b)=>a.localeCompare(b))}])},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},28157,a=>{"use strict";a.s(["PomodoroSettingsView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PomodoroSettingsView() from the server but PomodoroSettingsView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pomodoro-settings-view.tsx <module evaluation>","PomodoroSettingsView")},7372,a=>{"use strict";a.s(["PomodoroSettingsView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PomodoroSettingsView() from the server but PomodoroSettingsView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pomodoro-settings-view.tsx","PomodoroSettingsView")},17330,a=>{"use strict";a.i(28157);var b=a.i(7372);a.n(b)},47420,a=>{"use strict";var b=a.i(46193),c=a.i(17330),d=a.i(23750),e=a.i(4813);async function f(){let a=await (0,e.read_db)(),f=(0,d.collect_known_tags)(a);return(0,b.jsx)(c.PomodoroSettingsView,{known_tags:f})}a.s(["default",0,f])},93954,a=>{a.n(a.i(47420))}];
1
+ module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},23750,a=>{"use strict";a.s(["collect_known_tags",0,function(a){let b=new Set;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags){let a=c.trim();a.length>0&&b.add(a)}return[...b].sort((a,b)=>a.localeCompare(b))}])},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},28157,a=>{"use strict";a.s(["PomodoroSettingsView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PomodoroSettingsView() from the server but PomodoroSettingsView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pomodoro-settings-view.tsx <module evaluation>","PomodoroSettingsView")},7372,a=>{"use strict";a.s(["PomodoroSettingsView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PomodoroSettingsView() from the server but PomodoroSettingsView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pomodoro-settings-view.tsx","PomodoroSettingsView")},17330,a=>{"use strict";a.i(28157);var b=a.i(7372);a.n(b)},47420,a=>{"use strict";var b=a.i(46193),c=a.i(17330),d=a.i(23750),e=a.i(4813);async function f(){let a=await (0,e.read_db)(),f=(0,d.collect_known_tags)(a);return(0,b.jsx)(c.PomodoroSettingsView,{known_tags:f})}a.s(["default",0,f])},93954,a=>{a.n(a.i(47420))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0yrs18n._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0laah33._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(a,b,c)=>{b.exports=a.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},80022,(a,b,c)=>{(()=>{"use strict";"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="/ROOT/node_modules/.pnpm/next@16.2.6_@babel+core@7.29.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/compiled/cookie/");var a,c,d,e,f={};f.parse=function(b,c){if("string"!=typeof b)throw TypeError("argument str must be a string");for(var e={},f=b.split(d),g=(c||{}).decode||a,h=0;h<f.length;h++){var i=f[h],j=i.indexOf("=");if(!(j<0)){var k=i.substr(0,j).trim(),l=i.substr(++j,i.length).trim();'"'==l[0]&&(l=l.slice(1,-1)),void 0==e[k]&&(e[k]=function(a,b){try{return b(a)}catch(b){return a}}(l,g))}}return e},f.serialize=function(a,b,d){var f=d||{},g=f.encode||c;if("function"!=typeof g)throw TypeError("option encode is invalid");if(!e.test(a))throw TypeError("argument name is invalid");var h=g(b);if(h&&!e.test(h))throw TypeError("argument val is invalid");var i=a+"="+h;if(null!=f.maxAge){var j=f.maxAge-0;if(isNaN(j)||!isFinite(j))throw TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(j)}if(f.domain){if(!e.test(f.domain))throw TypeError("option domain is invalid");i+="; Domain="+f.domain}if(f.path){if(!e.test(f.path))throw TypeError("option path is invalid");i+="; Path="+f.path}if(f.expires){if("function"!=typeof f.expires.toUTCString)throw TypeError("option expires is invalid");i+="; Expires="+f.expires.toUTCString()}if(f.httpOnly&&(i+="; HttpOnly"),f.secure&&(i+="; Secure"),f.sameSite)switch("string"==typeof f.sameSite?f.sameSite.toLowerCase():f.sameSite){case!0:case"strict":i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"none":i+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return i},a=decodeURIComponent,c=encodeURIComponent,d=/; */,e=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,b.exports=f})()},95258,(a,b,c)=>{(()=>{"use strict";var a={56:a=>{a.exports=function(a,b){return"string"==typeof a?g(a):"number"==typeof a?f(a,b):null},a.exports.format=f,a.exports.parse=g;var b=/\B(?=(\d{3})+(?!\d))/g,c=/(?:\.0*|(\.[^0]+)0+)$/,d={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000},e=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function f(a,e){if(!Number.isFinite(a))return null;var f=Math.abs(a),g=e&&e.thousandsSeparator||"",h=e&&e.unitSeparator||"",i=e&&void 0!==e.decimalPlaces?e.decimalPlaces:2,j=!!(e&&e.fixedDecimals),k=e&&e.unit||"";k&&d[k.toLowerCase()]||(k=f>=d.pb?"PB":f>=d.tb?"TB":f>=d.gb?"GB":f>=d.mb?"MB":f>=d.kb?"KB":"B");var l=(a/d[k.toLowerCase()]).toFixed(i);return j||(l=l.replace(c,"$1")),g&&(l=l.split(".").map(function(a,c){return 0===c?a.replace(b,g):a}).join(".")),l+h+k}function g(a){if("number"==typeof a&&!isNaN(a))return a;if("string"!=typeof a)return null;var b,c=e.exec(a),f="b";return c?(b=parseFloat(c[1]),f=c[4].toLowerCase()):(b=parseInt(a,10),f="b"),Math.floor(d[f]*b)}}},c={};function d(b){var e=c[b];if(void 0!==e)return e.exports;var f=c[b]={exports:{}},g=!0;try{a[b](f,f.exports,d),g=!1}finally{g&&delete c[b]}return f.exports}d.ab="/ROOT/node_modules/.pnpm/next@16.2.6_@babel+core@7.29.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/compiled/bytes/",b.exports=d(56)})()},14747,(a,b,c)=>{b.exports=a.x("path",()=>require("path"))},77657,a=>{"use strict";a.s(["isFullStringUrl",0,function(a){return/https?:\/\//.test(a)},"parseUrl",0,function(a){let b;try{b=new URL(a,"http://n")}catch{}return b}])},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},50713,(a,b,c)=>{"use strict";b.exports=a.r(18622)},46193,(a,b,c)=>{"use strict";b.exports=a.r(50713).vendored["react-rsc"].ReactJsxRuntime},41445,(a,b,c)=>{"use strict";b.exports=a.r(50713).vendored["react-rsc"].ReactServerDOMTurbopackServer},91973,(a,b,c)=>{"use strict";b.exports=a.r(50713).vendored["react-rsc"].React},4941,(a,b,c)=>{"use strict";var d=Object.defineProperty,e=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,h={},i={RequestCookies:()=>p,ResponseCookies:()=>q,parseCookie:()=>l,parseSetCookie:()=>m,stringifyCookie:()=>k};for(var j in i)d(h,j,{get:i[j],enumerable:!0});function k(a){var b;let c=["path"in a&&a.path&&`Path=${a.path}`,"expires"in a&&(a.expires||0===a.expires)&&`Expires=${("number"==typeof a.expires?new Date(a.expires):a.expires).toUTCString()}`,"maxAge"in a&&"number"==typeof a.maxAge&&`Max-Age=${a.maxAge}`,"domain"in a&&a.domain&&`Domain=${a.domain}`,"secure"in a&&a.secure&&"Secure","httpOnly"in a&&a.httpOnly&&"HttpOnly","sameSite"in a&&a.sameSite&&`SameSite=${a.sameSite}`,"partitioned"in a&&a.partitioned&&"Partitioned","priority"in a&&a.priority&&`Priority=${a.priority}`].filter(Boolean),d=`${a.name}=${encodeURIComponent(null!=(b=a.value)?b:"")}`;return 0===c.length?d:`${d}; ${c.join("; ")}`}function l(a){let b=new Map;for(let c of a.split(/; */)){if(!c)continue;let a=c.indexOf("=");if(-1===a){b.set(c,"true");continue}let[d,e]=[c.slice(0,a),c.slice(a+1)];try{b.set(d,decodeURIComponent(null!=e?e:"true"))}catch{}}return b}function m(a){if(!a)return;let[[b,c],...d]=l(a),{domain:e,expires:f,httponly:g,maxage:h,path:i,samesite:j,secure:k,partitioned:m,priority:p}=Object.fromEntries(d.map(([a,b])=>[a.toLowerCase().replace(/-/g,""),b]));{var q,r,s={name:b,value:decodeURIComponent(c),domain:e,...f&&{expires:new Date(f)},...g&&{httpOnly:!0},..."string"==typeof h&&{maxAge:Number(h)},path:i,...j&&{sameSite:n.includes(q=(q=j).toLowerCase())?q:void 0},...k&&{secure:!0},...p&&{priority:o.includes(r=(r=p).toLowerCase())?r:void 0},...m&&{partitioned:!0}};let a={};for(let b in s)s[b]&&(a[b]=s[b]);return a}}b.exports=((a,b,c)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of f(b))g.call(a,h)||void 0===h||d(a,h,{get:()=>b[h],enumerable:!(c=e(b,h))||c.enumerable});return a})(d({},"__esModule",{value:!0}),h);var n=["strict","lax","none"],o=["low","medium","high"],p=class{constructor(a){this._parsed=new Map,this._headers=a;const b=a.get("cookie");if(b)for(const[a,c]of l(b))this._parsed.set(a,{name:a,value:c})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed);if(!a.length)return c.map(([a,b])=>b);let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(([a])=>a===d).map(([a,b])=>b)}has(a){return this._parsed.has(a)}set(...a){let[b,c]=1===a.length?[a[0].name,a[0].value]:a,d=this._parsed;return d.set(b,{name:b,value:c}),this._headers.set("cookie",Array.from(d).map(([a,b])=>k(b)).join("; ")),this}delete(a){let b=this._parsed,c=Array.isArray(a)?a.map(a=>b.delete(a)):b.delete(a);return this._headers.set("cookie",Array.from(b).map(([a,b])=>k(b)).join("; ")),c}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(a=>`${a.name}=${encodeURIComponent(a.value)}`).join("; ")}},q=class{constructor(a){var b,c,d;this._parsed=new Map,this._headers=a;const e=null!=(d=null!=(c=null==(b=a.getSetCookie)?void 0:b.call(a))?c:a.get("set-cookie"))?d:[];for(const a of Array.isArray(e)?e:function(a){if(!a)return[];var b,c,d,e,f,g=[],h=0;function i(){for(;h<a.length&&/\s/.test(a.charAt(h));)h+=1;return h<a.length}for(;h<a.length;){for(b=h,f=!1;i();)if(","===(c=a.charAt(h))){for(d=h,h+=1,i(),e=h;h<a.length&&"="!==(c=a.charAt(h))&&";"!==c&&","!==c;)h+=1;h<a.length&&"="===a.charAt(h)?(f=!0,h=e,g.push(a.substring(b,d)),b=h):h=d+1}else h+=1;(!f||h>=a.length)&&g.push(a.substring(b,a.length))}return g}(e)){const b=m(a);b&&this._parsed.set(b.name,b)}}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed.values());if(!a.length)return c;let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(a=>a.name===d)}has(a){return this._parsed.has(a)}set(...a){let[b,c,d]=1===a.length?[a[0].name,a[0].value,a[0]]:a,e=this._parsed;return e.set(b,function(a={name:"",value:""}){return"number"==typeof a.expires&&(a.expires=new Date(a.expires)),a.maxAge&&(a.expires=new Date(Date.now()+1e3*a.maxAge)),(null===a.path||void 0===a.path)&&(a.path="/"),a}({name:b,value:c,...d})),function(a,b){for(let[,c]of(b.delete("set-cookie"),a)){let a=k(c);b.append("set-cookie",a)}}(e,this._headers),this}delete(...a){let[b,c]="string"==typeof a[0]?[a[0]]:[a[0].name,a[0]];return this.set({...c,name:b,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(k).join("; ")}}}];
1
+ module.exports=[18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(a,b,c)=>{b.exports=a.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},19276,(a,b,c)=>{(()=>{"use strict";"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="/ROOT/node_modules/.pnpm/next@16.2.6_@babel+core@7.29.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/compiled/cookie/");var a,c,d,e,f={};f.parse=function(b,c){if("string"!=typeof b)throw TypeError("argument str must be a string");for(var e={},f=b.split(d),g=(c||{}).decode||a,h=0;h<f.length;h++){var i=f[h],j=i.indexOf("=");if(!(j<0)){var k=i.substr(0,j).trim(),l=i.substr(++j,i.length).trim();'"'==l[0]&&(l=l.slice(1,-1)),void 0==e[k]&&(e[k]=function(a,b){try{return b(a)}catch(b){return a}}(l,g))}}return e},f.serialize=function(a,b,d){var f=d||{},g=f.encode||c;if("function"!=typeof g)throw TypeError("option encode is invalid");if(!e.test(a))throw TypeError("argument name is invalid");var h=g(b);if(h&&!e.test(h))throw TypeError("argument val is invalid");var i=a+"="+h;if(null!=f.maxAge){var j=f.maxAge-0;if(isNaN(j)||!isFinite(j))throw TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(j)}if(f.domain){if(!e.test(f.domain))throw TypeError("option domain is invalid");i+="; Domain="+f.domain}if(f.path){if(!e.test(f.path))throw TypeError("option path is invalid");i+="; Path="+f.path}if(f.expires){if("function"!=typeof f.expires.toUTCString)throw TypeError("option expires is invalid");i+="; Expires="+f.expires.toUTCString()}if(f.httpOnly&&(i+="; HttpOnly"),f.secure&&(i+="; Secure"),f.sameSite)switch("string"==typeof f.sameSite?f.sameSite.toLowerCase():f.sameSite){case!0:case"strict":i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"none":i+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return i},a=decodeURIComponent,c=encodeURIComponent,d=/; */,e=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,b.exports=f})()},95258,(a,b,c)=>{(()=>{"use strict";var a={56:a=>{a.exports=function(a,b){return"string"==typeof a?g(a):"number"==typeof a?f(a,b):null},a.exports.format=f,a.exports.parse=g;var b=/\B(?=(\d{3})+(?!\d))/g,c=/(?:\.0*|(\.[^0]+)0+)$/,d={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000},e=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function f(a,e){if(!Number.isFinite(a))return null;var f=Math.abs(a),g=e&&e.thousandsSeparator||"",h=e&&e.unitSeparator||"",i=e&&void 0!==e.decimalPlaces?e.decimalPlaces:2,j=!!(e&&e.fixedDecimals),k=e&&e.unit||"";k&&d[k.toLowerCase()]||(k=f>=d.pb?"PB":f>=d.tb?"TB":f>=d.gb?"GB":f>=d.mb?"MB":f>=d.kb?"KB":"B");var l=(a/d[k.toLowerCase()]).toFixed(i);return j||(l=l.replace(c,"$1")),g&&(l=l.split(".").map(function(a,c){return 0===c?a.replace(b,g):a}).join(".")),l+h+k}function g(a){if("number"==typeof a&&!isNaN(a))return a;if("string"!=typeof a)return null;var b,c=e.exec(a),f="b";return c?(b=parseFloat(c[1]),f=c[4].toLowerCase()):(b=parseInt(a,10),f="b"),Math.floor(d[f]*b)}}},c={};function d(b){var e=c[b];if(void 0!==e)return e.exports;var f=c[b]={exports:{}},g=!0;try{a[b](f,f.exports,d),g=!1}finally{g&&delete c[b]}return f.exports}d.ab="/ROOT/node_modules/.pnpm/next@16.2.6_@babel+core@7.29.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/compiled/bytes/",b.exports=d(56)})()},14747,(a,b,c)=>{b.exports=a.x("path",()=>require("path"))},77657,a=>{"use strict";a.s(["isFullStringUrl",0,function(a){return/https?:\/\//.test(a)},"parseUrl",0,function(a){let b;try{b=new URL(a,"http://n")}catch{}return b}])},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},50713,(a,b,c)=>{"use strict";b.exports=a.r(18622)},46193,(a,b,c)=>{"use strict";b.exports=a.r(50713).vendored["react-rsc"].ReactJsxRuntime},41445,(a,b,c)=>{"use strict";b.exports=a.r(50713).vendored["react-rsc"].ReactServerDOMTurbopackServer},91973,(a,b,c)=>{"use strict";b.exports=a.r(50713).vendored["react-rsc"].React},4941,(a,b,c)=>{"use strict";var d=Object.defineProperty,e=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,h={},i={RequestCookies:()=>p,ResponseCookies:()=>q,parseCookie:()=>l,parseSetCookie:()=>m,stringifyCookie:()=>k};for(var j in i)d(h,j,{get:i[j],enumerable:!0});function k(a){var b;let c=["path"in a&&a.path&&`Path=${a.path}`,"expires"in a&&(a.expires||0===a.expires)&&`Expires=${("number"==typeof a.expires?new Date(a.expires):a.expires).toUTCString()}`,"maxAge"in a&&"number"==typeof a.maxAge&&`Max-Age=${a.maxAge}`,"domain"in a&&a.domain&&`Domain=${a.domain}`,"secure"in a&&a.secure&&"Secure","httpOnly"in a&&a.httpOnly&&"HttpOnly","sameSite"in a&&a.sameSite&&`SameSite=${a.sameSite}`,"partitioned"in a&&a.partitioned&&"Partitioned","priority"in a&&a.priority&&`Priority=${a.priority}`].filter(Boolean),d=`${a.name}=${encodeURIComponent(null!=(b=a.value)?b:"")}`;return 0===c.length?d:`${d}; ${c.join("; ")}`}function l(a){let b=new Map;for(let c of a.split(/; */)){if(!c)continue;let a=c.indexOf("=");if(-1===a){b.set(c,"true");continue}let[d,e]=[c.slice(0,a),c.slice(a+1)];try{b.set(d,decodeURIComponent(null!=e?e:"true"))}catch{}}return b}function m(a){if(!a)return;let[[b,c],...d]=l(a),{domain:e,expires:f,httponly:g,maxage:h,path:i,samesite:j,secure:k,partitioned:m,priority:p}=Object.fromEntries(d.map(([a,b])=>[a.toLowerCase().replace(/-/g,""),b]));{var q,r,s={name:b,value:decodeURIComponent(c),domain:e,...f&&{expires:new Date(f)},...g&&{httpOnly:!0},..."string"==typeof h&&{maxAge:Number(h)},path:i,...j&&{sameSite:n.includes(q=(q=j).toLowerCase())?q:void 0},...k&&{secure:!0},...p&&{priority:o.includes(r=(r=p).toLowerCase())?r:void 0},...m&&{partitioned:!0}};let a={};for(let b in s)s[b]&&(a[b]=s[b]);return a}}b.exports=((a,b,c)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of f(b))g.call(a,h)||void 0===h||d(a,h,{get:()=>b[h],enumerable:!(c=e(b,h))||c.enumerable});return a})(d({},"__esModule",{value:!0}),h);var n=["strict","lax","none"],o=["low","medium","high"],p=class{constructor(a){this._parsed=new Map,this._headers=a;const b=a.get("cookie");if(b)for(const[a,c]of l(b))this._parsed.set(a,{name:a,value:c})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed);if(!a.length)return c.map(([a,b])=>b);let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(([a])=>a===d).map(([a,b])=>b)}has(a){return this._parsed.has(a)}set(...a){let[b,c]=1===a.length?[a[0].name,a[0].value]:a,d=this._parsed;return d.set(b,{name:b,value:c}),this._headers.set("cookie",Array.from(d).map(([a,b])=>k(b)).join("; ")),this}delete(a){let b=this._parsed,c=Array.isArray(a)?a.map(a=>b.delete(a)):b.delete(a);return this._headers.set("cookie",Array.from(b).map(([a,b])=>k(b)).join("; ")),c}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(a=>`${a.name}=${encodeURIComponent(a.value)}`).join("; ")}},q=class{constructor(a){var b,c,d;this._parsed=new Map,this._headers=a;const e=null!=(d=null!=(c=null==(b=a.getSetCookie)?void 0:b.call(a))?c:a.get("set-cookie"))?d:[];for(const a of Array.isArray(e)?e:function(a){if(!a)return[];var b,c,d,e,f,g=[],h=0;function i(){for(;h<a.length&&/\s/.test(a.charAt(h));)h+=1;return h<a.length}for(;h<a.length;){for(b=h,f=!1;i();)if(","===(c=a.charAt(h))){for(d=h,h+=1,i(),e=h;h<a.length&&"="!==(c=a.charAt(h))&&";"!==c&&","!==c;)h+=1;h<a.length&&"="===a.charAt(h)?(f=!0,h=e,g.push(a.substring(b,d)),b=h):h=d+1}else h+=1;(!f||h>=a.length)&&g.push(a.substring(b,a.length))}return g}(e)){const b=m(a);b&&this._parsed.set(b.name,b)}}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed.values());if(!a.length)return c;let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(a=>a.name===d)}has(a){return this._parsed.has(a)}set(...a){let[b,c,d]=1===a.length?[a[0].name,a[0].value,a[0]]:a,e=this._parsed;return e.set(b,function(a={name:"",value:""}){return"number"==typeof a.expires&&(a.expires=new Date(a.expires)),a.maxAge&&(a.expires=new Date(Date.now()+1e3*a.maxAge)),(null===a.path||void 0===a.path)&&(a.path="/"),a}({name:b,value:c,...d})),function(a,b){for(let[,c]of(b.delete("set-cookie"),a)){let a=k(c);b.append("set-cookie",a)}}(e,this._headers),this}delete(...a){let[b,c]="string"==typeof a[0]?[a[0]]:[a[0].name,a[0]];return this.set({...c,name:b,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(k).join("; ")}}}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__0n8s9zq._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},94877,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored.contexts.HooksClientContext},12273,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored.contexts.ServerInsertedHtml},85058,(a,b,c)=>{"use strict";b.exports=a.r(18622)},39752,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored["react-ssr"].ReactJsxRuntime},34542,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored["react-ssr"].React},72034,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored.contexts.AppRouterContext},71535,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored["react-ssr"].ReactServerDOMTurbopackClient},3988,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},38371,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DEFAULT_SEGMENT_KEY:function(){return l},NOT_FOUND_SEGMENT_KEY:function(){return m},PAGE_SEGMENT_KEY:function(){return k},addSearchParamsIfPageSegment:function(){return i},computeSelectedLayoutSegment:function(){return j},getSegmentValue:function(){return f},getSelectedLayoutSegmentPath:function(){return function a(b,c,d=!0,e=[]){let g;if(d)g=b[1][c];else{let a=b[1];g=a.children??Object.values(a)[0]}if(!g)return e;let h=f(g[0]);return!h||h.startsWith(k)?e:(e.push(h),a(g,c,!1,e))}},isGroupSegment:function(){return g},isParallelRouteSegment:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return Array.isArray(a)?a[1]:a}function g(a){return"("===a[0]&&a.endsWith(")")}function h(a){return a.startsWith("@")&&"@children"!==a}function i(a,b){if(a.includes(k)){let a=JSON.stringify(b);return"{}"!==a?k+"?"+a:k}return a}function j(a,b){if(!a||0===a.length)return null;let c="children"===b?a[0]:a[a.length-1];return c===l?null:c}let k="__PAGE__",l="__DEFAULT__",m="/_not-found"},21154,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),this.name="InvariantError"}}},40959,(a,b,c)=>{"use strict";function d(){let a,b,c=new Promise((c,d)=>{a=c,b=d});return{resolve:a,reject:b,promise:c}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createPromiseWithResolvers",{enumerable:!0,get:function(){return d}})},69749,a=>{"use strict";a.s(["get_input_class_name",0,function(a="default"){let b="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"===a?`${b} px-2.5 py-2`:b}])},89969,a=>{"use strict";a.s(["get_button_class_name",0,function(a="ghost",b="default"){return`cursor-pointer appearance-none rounded-[0.65rem] border border-transparent font-inherit font-semibold disabled:cursor-not-allowed disabled:opacity-55 ${({default:"px-3.5 py-2.5",small:"px-2.5 py-1.5 text-xs"})[b]} ${({primary:"border-accent-border bg-[var(--accent)] text-[var(--accent-text-on)]",ghost:"border-panel-border bg-ghost-bg text-inherit",danger:"border-danger-border bg-danger-soft text-danger","danger-solid":"border-danger-border bg-[var(--danger-solid)] text-[var(--danger-text-on)]"})[a]}`}])},16229,a=>{"use strict";a.s(["message_from_unknown_error",0,function(a,b){return a instanceof Error?a.message:"string"==typeof a?a:b}])},97917,a=>{"use strict";let b=new Set;a.s(["notify_in_app",0,function(a){},"subscribe_in_app_notifications",0,function(a){return b.add(a),()=>{b.delete(a)}}])},19702,a=>{"use strict";a.s(["ACTIVE_SHEET_COOKIE_NAME",0,"stt-active-sheet","ACTIVE_SHEET_STORAGE_KEY",0,"super-time-tracker-active-sheet","COMPACT_LISTS_STORAGE_KEY",0,"super-time-tracker-compact-lists","DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME",0,"stt-default-sheet-fixed-name","DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY",0,"super-time-tracker-default-sheet-fixed-name","DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME",0,"stt-default-sheet-session-mode","DEFAULT_SHEET_SESSION_MODE_DEFAULT",0,"last_viewed","DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY",0,"super-time-tracker-default-sheet-session-mode","SHEET_TAG_FILTERS_STORAGE_KEY",0,"super-time-tracker-sheet-tag-filters"])},14679,a=>{"use strict";var b=a.i(72958),c=a.i(19702);a.s(["navigate_to_tracker_sheet",0,function(a){let d=a.trim();if(0!==d.length){try{window.localStorage.setItem(c.ACTIVE_SHEET_STORAGE_KEY,d),(0,b.schedule_ui_preferences_cloud_sync)()}catch{}try{let a=encodeURIComponent(d);document.cookie=`${c.ACTIVE_SHEET_COOKIE_NAME}=${a}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}],14679)},72327,40395,76121,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_NUDGES_ENABLED_STORAGE_KEY,default_value:c.FOCUS_NUDGES_ENABLED_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["focus_nudges_enabled_preference",0,d],72327);let e=(0,b.create_ui_preference_store)({storage_key:c.NO_LOG_REMINDER_MINUTES_STORAGE_KEY,default_value:c.NO_LOG_REMINDER_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=5&&b<=240}});a.s(["no_log_reminder_minutes_preference",0,e],40395);let f=(0,b.create_ui_preference_store)({storage_key:c.OVERWORK_ALERT_HOURS_STORAGE_KEY,default_value:c.OVERWORK_ALERT_HOURS_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=1&&b<=16}});a.s(["overwork_alert_hours_preference",0,f],76121)},22496,43329,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=/^([01]\d|2[0-3]):[0-5]\d$/,e=(0,b.create_ui_preference_store)({storage_key:c.WORK_HOURS_END_STORAGE_KEY,default_value:c.WORK_HOURS_END_DEFAULT,is_valid:a=>d.test(a)});a.s(["work_hours_end_preference",0,e],22496);let f=/^([01]\d|2[0-3]):[0-5]\d$/,g=(0,b.create_ui_preference_store)({storage_key:c.WORK_HOURS_START_STORAGE_KEY,default_value:c.WORK_HOURS_START_DEFAULT,is_valid:a=>f.test(a)});a.s(["work_hours_start_preference",0,g],43329)},7386,85928,80185,89184,a=>{"use strict";var b=a.i(39752),c=a.i(34542);function d({label:a,description:c,compact:e}){return(0,b.jsxs)("div",{className:"contents",children:[(0,b.jsx)("dt",{className:"m-0",children:(0,b.jsx)("kbd",{className:`inline-block min-w-7 rounded border border-panel-border bg-surface text-center font-mono font-semibold text-foreground ${e?"px-1 py-0.5 text-[0.7rem]":"px-1.5 py-0.5 text-[0.78rem]"}`,children:a})}),(0,b.jsx)("dd",{className:`m-0 self-center leading-snug text-muted ${e?"text-[0.8rem]":"text-[0.9rem]"}`,children:c})]})}function e({sections:a,compact:c=!1}){return(0,b.jsx)("div",{className:`flex flex-col ${c?"gap-2.5":"gap-4"}`,children:a.map(a=>(0,b.jsxs)("section",{children:[(0,b.jsx)("h3",{className:`m-0 font-semibold uppercase tracking-[0.04em] text-muted ${c?"text-[0.65rem]":"text-[0.72rem]"}`,children:a.title}),(0,b.jsx)("dl",{className:`m-0 grid grid-cols-[auto_minmax(0,1fr)] ${c?"mt-1.5 gap-x-3 gap-y-1.5":"mt-2 gap-x-4 gap-y-2"}`,children:a.entries.map(e=>(0,b.jsx)(d,{label:e.label,description:e.description,compact:c},`${a.title}-${e.label}-${e.description}`))})]},a.title))})}var f=a.i(89969);a.s(["KeyboardShortcutsDialog",0,function({sections:a,on_close:d}){let g=(0,c.useId)(),h=(0,c.useRef)(null);return(0,c.useEffect)(()=>{h.current?.focus();let a=a=>{"Escape"===a.key&&d()};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[d]),(0,b.jsxs)("div",{className:"fixed inset-0 z-100 flex items-center justify-center p-5",role:"presentation",children:[(0,b.jsx)("button",{type:"button",className:"absolute inset-0 cursor-default border-0 bg-overlay p-0","aria-label":"Dismiss dialog",onClick:d}),(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":g,className:"relative z-1 w-full max-w-lg rounded-lg border border-panel-border bg-panel p-5 shadow-md",children:[(0,b.jsx)("h2",{id:g,className:"m-0 text-[1.1rem] font-[650] tracking-tight",children:"Keyboard shortcuts"}),(0,b.jsx)("div",{className:"mt-4 max-h-[min(28rem,70vh)] overflow-y-auto pr-1",children:(0,b.jsx)(e,{sections:a})}),(0,b.jsx)("div",{className:"mt-5 flex justify-end",children:(0,b.jsx)("button",{ref:h,type:"button",className:(0,f.get_button_class_name)("primary"),onClick:d,children:"Close"})})]})]})}],7386);var g=a.i(75049);a.s(["get_tracker_keyboard_shortcut_sections",0,function(a=g.tracker_shortcut_defaults){return[...function(a="?"){return[{title:"General",entries:[{label:"Ctrl+P",description:"Open command palette"},{label:a,description:"Show keyboard shortcuts"}]}]}("?"===a.help?"?":a.help.toUpperCase()),{title:"Tracker",entries:[{label:a["check-in"].toUpperCase(),description:"Check in (focus description)"},{label:a["check-out"].toUpperCase(),description:"Check out"},{label:a["edit-entry"].toUpperCase(),description:"Edit active entry description"},{label:a["add-note"].toUpperCase(),description:"Add note to active entry"},{label:a.pomodoro.toUpperCase(),description:"Open Pomodoro"},{label:a["previous-sheet"],description:"Previous sheet"},{label:a["next-sheet"],description:"Next sheet"}]}]}],85928);var h=a.i(46299);function i(a){let b=a.target;if(!(b instanceof HTMLElement))return!1;if(b.isContentEditable)return!0;let c=b.tagName;return"INPUT"===c||"TEXTAREA"===c||"SELECT"===c}a.s(["should_ignore_keyboard_shortcut",0,i],80185),a.s(["use_document_keyboard_shortcuts",0,function(a){let b=(0,c.useRef)(a);b.current=a,(0,c.useEffect)(()=>{let a=a=>{if(!i(a)&&!(0,h.is_modal_dialog_open)()){for(let c of b.current)if(c.is_available?.()!==!1&&function(a,b){let c=b.modifiers??[],d=c.includes("alt"),e=c.includes("ctrl"),f=c.includes("meta"),g=c.includes("shift");return a.altKey===d&&a.ctrlKey===e&&a.metaKey===f&&a.shiftKey===g&&(1===a.key.length?a.key.toLowerCase():a.key)===(1===b.key.length?b.key.toLowerCase():b.key)}(a,c)){a.preventDefault(),c.action();return}}};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[])}],89184)},48174,a=>{"use strict";a.s(["format_display_tag",0,function(a){return a.startsWith("@")?a:`@${a}`}])},53030,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(89969);function e({options:a,on_confirm:f,on_cancel:g}){let h=(0,c.useId)(),i=(0,c.useRef)(null),j=(0,c.useRef)(null),{cancelLabel:k="Cancel",confirmLabel:l="Confirm",message:m,title:n,variant:o="default"}=a;(0,c.useEffect)(()=>{let a=i.current;if(null!==a&&!a.open)return a.showModal(),()=>{a.open&&a.close()}},[]),(0,c.useEffect)(()=>{j.current?.focus()},[]);let p=()=>{i.current?.close(),g()};return(0,b.jsxs)("dialog",{ref:i,"aria-labelledby":h,className:"fixed inset-0 z-100 m-0 flex max-h-none w-full max-w-none items-center justify-center border-0 bg-transparent p-5 backdrop:bg-overlay open:flex",onCancel:a=>{a.preventDefault(),p()},children:[(0,b.jsx)("button",{type:"button",tabIndex:-1,"aria-label":"Dismiss dialog",className:"absolute inset-0 z-0 cursor-default border-0 bg-transparent p-0",onClick:p}),(0,b.jsxs)("div",{className:"relative z-1 w-full max-w-md rounded-lg border border-panel-border bg-panel p-5 shadow-md",children:[(0,b.jsx)("h2",{id:h,className:"m-0 text-[1.1rem] font-[650] tracking-tight",children:n}),(0,b.jsx)("p",{className:"m-0 mt-2 text-[0.9rem] leading-relaxed text-muted",children:m}),(0,b.jsxs)("div",{className:"mt-5 flex flex-wrap justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("ghost"),onClick:p,children:k}),(0,b.jsx)("button",{ref:j,type:"button",className:(0,d.get_button_class_name)("danger"===o?"danger":"primary"),onClick:f,children:l})]})]})]})}let f=null,g=(0,c.createContext)(null);a.s(["ConfirmDialogProvider",0,function({children:a}){let[d,h]=(0,c.useState)(null),i=(0,c.useCallback)(a=>new Promise(b=>{h({options:a,resolve:b})}),[]);f=i,(0,c.useEffect)(()=>(f=i,()=>{f=null}),[i]);let j=(0,c.useMemo)(()=>({confirm:i}),[i]),k=a=>{d?.resolve(a),h(null)};return(0,b.jsxs)(g.Provider,{value:j,children:[a,null===d?null:(0,b.jsx)(e,{options:d.options,on_confirm:()=>k(!0),on_cancel:()=>k(!1)})]})},"useConfirmDialog",0,function(){let a=(0,c.useContext)(g);if(null!==a)return a;let b=f;if(null!==b)return{confirm:b};throw Error("useConfirmDialog must be used within ConfirmDialogProvider")}],53030)},59659,87281,5796,a=>{"use strict";var b=a.i(49170);function c(){return"true"===b.greedy_cloud_sync_preference.read()}function d(){}function e(){c()&&d()}a.s(["is_greedy_cloud_sync_enabled",0,c],87281),a.i(63577),a.i(51652),a.i(74365),Promise.resolve(),a.s(["schedule_tracker_db_cloud_sync",0,e],5796),a.s(["push_tracker_db_cloud_after_change",0,function(){c()?e():d()}],59659)},50803,71034,115,a=>{"use strict";var b=a.i(48174);a.s(["build_resume_description",0,function(a,c){let d=a.trim(),e=d.length>0?d:"Untitled entry",f=c.map(a=>(0,b.format_display_tag)(a)).join(" ");return f.length>0?`${e} ${f}`.trim():e}],50803);var c=a.i(87281);async function d(a){let b=await fetch("/api/sheet/active",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a})});if(!b.ok)throw Error((await b.json()).error??"Failed to update active sheet in cloud")}var e=a.i(59659),f=a.i(5796);function g(a,b){if("/api/sheet"===a&&"object"==typeof b&&null!==b&&!0!==b.delete&&!(0,c.is_greedy_cloud_sync_enabled)()){let a=b.name?.trim()??"";a.length>0&&d(a).catch(()=>{});return}(0,c.is_greedy_cloud_sync_enabled)()?(0,f.schedule_tracker_db_cloud_sync)():(0,e.push_tracker_db_cloud_after_change)()}a.s(["notify_tracker_db_cloud_sync",0,g],71034);let h=new Set(["/api/note"]);async function i(a,b){let c={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)},d=await fetch(a,c);if(!d.ok){var e,f;let b,g=(await d.json()).error??"Request failed";if(e=a,f=g,h.has(e)&&((b=f.toLowerCase()).includes("duplicate key")||b.includes("unique constraint"))){if(await new Promise(a=>{setTimeout(a,25)}),!(d=await fetch(a,c)).ok)throw Error((await d.json()).error??g)}else throw Error(g)}let i=await d.json();return g(a,b),i}a.s(["post_tracker_action",0,i],115)},33272,a=>{"use strict";a.s(["build_entry_search_href",0,function(a){let b=new URLSearchParams;a.query.trim().length>0&&b.set("q",a.query.trim()),a.sheetName.trim().length>0&&b.set("sheet",a.sheetName.trim()),a.tag.trim().length>0&&b.set("tag",a.tag.trim()),a.fromDate.trim().length>0&&b.set("from",a.fromDate.trim()),a.toDate.trim().length>0&&b.set("to",a.toDate.trim());let c=b.toString();return c.length>0?`/search?${c}`:"/search"}])},38005,a=>{"use strict";let b={query:"",sheetName:"",tag:"",fromDate:"",toDate:""};a.s(["get_empty_entry_search_filters",0,function(){return{...b}}])},2837,a=>{"use strict";var b=a.i(34542);a.s(["use_debounced_value",0,function(a,c){let[d,e]=(0,b.useState)(a);return(0,b.useEffect)(()=>{let b=window.setTimeout(()=>{e(a)},c);return()=>{window.clearTimeout(b)}},[a,c]),d}])}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0qwn._e._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},25244,a=>{"use strict";a.s(["TagManagementView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TagManagementView() from the server but TagManagementView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tag-management-view.tsx <module evaluation>","TagManagementView")},6889,a=>{"use strict";a.s(["TagManagementView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TagManagementView() from the server but TagManagementView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tag-management-view.tsx","TagManagementView")},38116,a=>{"use strict";a.i(25244);var b=a.i(6889);a.n(b)},72299,a=>{"use strict";var b=a.i(46193),c=a.i(38116),d=a.i(4813);async function e(){let a=function(a){let b=new Map;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags)try{let a=function(a){let b=a.trim().replace(/^@+/,"");if(0===b.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(b))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${b}`}(c);b.set(a,(b.get(a)??0)+1)}catch{continue}return[...b.entries()].map(([a,b])=>({name:a,entryCount:b})).sort((a,b)=>a.name.localeCompare(b.name))}(await (0,d.read_db)());return(0,b.jsx)(c.TagManagementView,{initial_tags:a})}a.s(["default",0,e],72299)},83074,a=>{a.n(a.i(72299))}];
1
+ module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},52190,a=>{"use strict";a.s(["normalize_stored_tag",0,function(a){let b=a.trim().replace(/^@+/,"");if(0===b.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(b))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${b}`}])},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},25244,a=>{"use strict";a.s(["TagManagementView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TagManagementView() from the server but TagManagementView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tag-management-view.tsx <module evaluation>","TagManagementView")},6889,a=>{"use strict";a.s(["TagManagementView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TagManagementView() from the server but TagManagementView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tag-management-view.tsx","TagManagementView")},38116,a=>{"use strict";a.i(25244);var b=a.i(6889);a.n(b)},72299,a=>{"use strict";var b=a.i(46193),c=a.i(38116),d=a.i(52190),e=a.i(4813);async function f(){let a=function(a){let b=new Map;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags)try{let a=(0,d.normalize_stored_tag)(c);b.set(a,(b.get(a)??0)+1)}catch{continue}return[...b.entries()].map(([a,b])=>({name:a,entryCount:b})).sort((a,b)=>a.name.localeCompare(b.name))}(await (0,e.read_db)());return(0,b.jsx)(c.TagManagementView,{initial_tags:a})}a.s(["default",0,f],72299)},83074,a=>{a.n(a.i(72299))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0_wxrlk._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0teulir._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},23750,a=>{"use strict";a.s(["collect_known_tags",0,function(a){let b=new Set;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags){let a=c.trim();a.length>0&&b.add(a)}return[...b].sort((a,b)=>a.localeCompare(b))}])},67835,88028,a=>{"use strict";a.s(["get_serialized_entries_total_ms",0,function(a){return a.reduce((a,b)=>a+b.durationMs,0)}],67835);var b=a.i(19045);a.s(["serialize_sheet_entries",0,function(a){let{activeEntryID:c,entries:d,name:e}=a;return d.map(a=>(0,b.serialize_entry)(a,e,c===a.id&&null===a.end))}],88028)},19045,a=>{"use strict";a.s(["serialize_entry",0,function(a,b,c){return{id:a.id,description:a.description,start:a.start.toISOString(),end:null===a.end?null:a.end.toISOString(),tags:a.tags,notes:a.notes.map(({timestamp:a,text:b})=>({timestamp:a.toISOString(),text:b})),sheetName:b,durationMs:function(a,b=Date.now()){let{end:c,start:d}=a;return Math.max(0,(null===c?b:+c)-d)}(a),isActive:c}}],19045)},80403,a=>{"use strict";var b=a.i(19045);a.s(["find_all_serialized_active_entries",0,function(a){let c=[];for(let d of a.sheets){let{activeEntryID:a,entries:e,name:f}=d;if(null===a)continue;let g=e.find(({id:b})=>b===a);void 0!==g&&null===g.end&&c.push((0,b.serialize_entry)(g,f,!0))}return c}])},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},43732,a=>{"use strict";a.s(["TrackerApp",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerApp() from the server but TrackerApp is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tracker-app.tsx <module evaluation>","TrackerApp")},50367,a=>{"use strict";a.s(["TrackerApp",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerApp() from the server but TrackerApp is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tracker-app.tsx","TrackerApp")},84174,a=>{"use strict";a.i(43732);var b=a.i(50367);a.n(b)},50708,a=>{"use strict";var b=a.i(46193),c=a.i(40035),d=a.i(84174),e=a.i(23750),f=a.i(60197),g=a.i(67835),h=a.i(4813),i=a.i(59341),j=a.i(80403),k=a.i(19045),l=a.i(88028),m=a.i(92398),n=a.i(23761);async function o(a,b){await (0,n.write_local_db)(a,b)}async function p(a){let b=await (0,h.read_db)();b.sheets.some(({name:b})=>b===a)||b.sheets.push((0,m.gen_sheet)(a)),b.activeSheetName=a,await o(b)}async function q(a){let b=await (0,h.read_db)(),c=function(a,b){let c=b?.trim()??"";if(c.length>0&&a.sheets.some(a=>a.name===c))return c;if(null!==a.activeSheetName&&a.sheets.some(b=>b.name===a.activeSheetName))return a.activeSheetName;let d=a.sheets.find(a=>null!==a.activeEntryID);return void 0!==d?d.name:a.sheets[0]?.name??i.DEFAULT_SHEET_NAME}(b,a);b.activeSheetName!==c&&(await p(c),b.activeSheetName=c);let{sheets:d}=b,m=[],n=function(a,b){let c=a.sheets.find(({name:a})=>a===b);if(void 0===c)throw Error(`Sheet ${b} not found`);return c}(b,c);m=function(a,b){let c=[...a];switch(b){case"oldest":return c.sort((a,b)=>new Date(a.start).getTime()-new Date(b.start).getTime());case"duration":return c.sort((a,b)=>b.durationMs-a.durationMs);case"description":return c.sort((a,b)=>{let c=a.description.trim()||"Untitled entry",d=b.description.trim()||"Untitled entry";return c.localeCompare(d)});default:return c.sort((a,b)=>new Date(b.start).getTime()-new Date(a.start).getTime())}}((0,l.serialize_sheet_entries)(n),"newest");let o=function(a,b){let c=a.sheets.find(({name:a})=>a===b);if(void 0===c)return null;let{activeEntryID:d,entries:e,name:f}=c;if(null===d)return null;let g=e.find(({id:a})=>a===d);return void 0===g?null:(0,k.serialize_entry)(g,f,null===g.end)}(b,c),q=(0,j.find_all_serialized_active_entries)(b),r=o??q[0]??null;return{dbPath:await (0,f.resolve_db_path_label)(),activeSheetName:c,knownTags:(0,e.collect_known_tags)(b),sheets:d.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entryCount:a.entries.length,isActive:a.name===c,hasActiveEntry:null!==a.activeEntryID})),activeEntry:o,runningEntry:r,runningEntries:q,activeSheetEntries:m,activeSheetTotalMs:(0,g.get_serialized_entries_total_ms)(m)}}async function r(){let a=await (0,c.cookies)(),e=function(a,b){var c;let d="last_viewed"===(c=b.session_mode)||"active_timer"===c||"fixed"===c?c:"last_viewed",e=void 0!==b.last_viewed_sheet&&decodeURIComponent(b.last_viewed_sheet).trim()||null,f=void 0!==b.fixed_sheet_name&&decodeURIComponent(b.fixed_sheet_name).trim()||null;switch(d){case"fixed":{let b=f?.trim()??"";if(b.length>0&&a.sheets.some(a=>a.name===b))return b;return null}case"active_timer":{let b=a.sheets.find(a=>null!==a.activeEntryID);return b?.name??null}default:return e}}(await (0,h.read_db)(),{session_mode:a.get("stt-default-sheet-session-mode")?.value,fixed_sheet_name:a.get("stt-default-sheet-fixed-name")?.value,last_viewed_sheet:a.get("stt-active-sheet")?.value}),f=await q(e);return(0,b.jsx)(d.TrackerApp,{initial_state:f})}a.s(["default",0,r],50708)},26030,a=>{a.n(a.i(50708))}];
1
+ module.exports=[60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},23750,a=>{"use strict";a.s(["collect_known_tags",0,function(a){let b=new Set;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags){let a=c.trim();a.length>0&&b.add(a)}return[...b].sort((a,b)=>a.localeCompare(b))}])},19045,a=>{"use strict";a.s(["serialize_entry",0,function(a,b,c){return{id:a.id,description:a.description,start:a.start.toISOString(),end:null===a.end?null:a.end.toISOString(),tags:a.tags,notes:a.notes.map(({timestamp:a,text:b})=>({timestamp:a.toISOString(),text:b})),sheetName:b,durationMs:function(a,b=Date.now()){let{end:c,start:d}=a;return Math.max(0,(null===c?b:+c)-d)}(a),isActive:c}}],19045)},67835,88028,a=>{"use strict";a.s(["get_serialized_entries_total_ms",0,function(a){return a.reduce((a,b)=>a+b.durationMs,0)}],67835);var b=a.i(19045);a.s(["serialize_sheet_entries",0,function(a){let{activeEntryID:c,entries:d,name:e}=a;return d.map(a=>(0,b.serialize_entry)(a,e,c===a.id&&null===a.end))}],88028)},80403,a=>{"use strict";var b=a.i(19045);a.s(["find_all_serialized_active_entries",0,function(a){let c=[];for(let d of a.sheets){let{activeEntryID:a,entries:e,name:f}=d;if(null===a)continue;let g=e.find(({id:b})=>b===a);void 0!==g&&null===g.end&&c.push((0,b.serialize_entry)(g,f,!0))}return c}])},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},43732,a=>{"use strict";a.s(["TrackerApp",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerApp() from the server but TrackerApp is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tracker-app.tsx <module evaluation>","TrackerApp")},50367,a=>{"use strict";a.s(["TrackerApp",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerApp() from the server but TrackerApp is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tracker-app.tsx","TrackerApp")},84174,a=>{"use strict";a.i(43732);var b=a.i(50367);a.n(b)},50708,a=>{"use strict";var b=a.i(46193),c=a.i(40035),d=a.i(84174),e=a.i(23750),f=a.i(60197),g=a.i(67835),h=a.i(4813),i=a.i(59341),j=a.i(80403),k=a.i(19045),l=a.i(88028),m=a.i(92398),n=a.i(23761);async function o(a,b){await (0,n.write_local_db)(a,b)}async function p(a){let b=await (0,h.read_db)();b.sheets.some(({name:b})=>b===a)||b.sheets.push((0,m.gen_sheet)(a)),b.activeSheetName=a,await o(b)}async function q(a){let b=await (0,h.read_db)(),c=function(a,b){let c=b?.trim()??"";if(c.length>0&&a.sheets.some(a=>a.name===c))return c;if(null!==a.activeSheetName&&a.sheets.some(b=>b.name===a.activeSheetName))return a.activeSheetName;let d=a.sheets.find(a=>null!==a.activeEntryID);return void 0!==d?d.name:a.sheets[0]?.name??i.DEFAULT_SHEET_NAME}(b,a);b.activeSheetName!==c&&(await p(c),b.activeSheetName=c);let{sheets:d}=b,m=[],n=function(a,b){let c=a.sheets.find(({name:a})=>a===b);if(void 0===c)throw Error(`Sheet ${b} not found`);return c}(b,c);m=function(a,b){let c=[...a];switch(b){case"oldest":return c.sort((a,b)=>new Date(a.start).getTime()-new Date(b.start).getTime());case"duration":return c.sort((a,b)=>b.durationMs-a.durationMs);case"description":return c.sort((a,b)=>{let c=a.description.trim()||"Untitled entry",d=b.description.trim()||"Untitled entry";return c.localeCompare(d)});default:return c.sort((a,b)=>new Date(b.start).getTime()-new Date(a.start).getTime())}}((0,l.serialize_sheet_entries)(n),"newest");let o=function(a,b){let c=a.sheets.find(({name:a})=>a===b);if(void 0===c)return null;let{activeEntryID:d,entries:e,name:f}=c;if(null===d)return null;let g=e.find(({id:a})=>a===d);return void 0===g?null:(0,k.serialize_entry)(g,f,null===g.end)}(b,c),q=(0,j.find_all_serialized_active_entries)(b),r=o??q[0]??null;return{dbPath:await (0,f.resolve_db_path_label)(),activeSheetName:c,knownTags:(0,e.collect_known_tags)(b),sheets:d.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entryCount:a.entries.length,isActive:a.name===c,hasActiveEntry:null!==a.activeEntryID})),activeEntry:o,runningEntry:r,runningEntries:q,activeSheetEntries:m,activeSheetTotalMs:(0,g.get_serialized_entries_total_ms)(m)}}async function r(){let a=await (0,c.cookies)(),e=function(a,b){var c;let d="last_viewed"===(c=b.session_mode)||"active_timer"===c||"fixed"===c?c:"last_viewed",e=void 0!==b.last_viewed_sheet&&decodeURIComponent(b.last_viewed_sheet).trim()||null,f=void 0!==b.fixed_sheet_name&&decodeURIComponent(b.fixed_sheet_name).trim()||null;switch(d){case"fixed":{let b=f?.trim()??"";if(b.length>0&&a.sheets.some(a=>a.name===b))return b;return null}case"active_timer":{let b=a.sheets.find(a=>null!==a.activeEntryID);return b?.name??null}default:return e}}(await (0,h.read_db)(),{session_mode:a.get("stt-default-sheet-session-mode")?.value,fixed_sheet_name:a.get("stt-default-sheet-fixed-name")?.value,last_viewed_sheet:a.get("stt-active-sheet")?.value}),f=await q(e);return(0,b.jsx)(d.TrackerApp,{initial_state:f})}a.s(["default",0,r],50708)},26030,a=>{a.n(a.i(50708))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0hx9602._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0xp50ux._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},23750,a=>{"use strict";a.s(["collect_known_tags",0,function(a){let b=new Set;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags){let a=c.trim();a.length>0&&b.add(a)}return[...b].sort((a,b)=>a.localeCompare(b))}])},52190,a=>{"use strict";a.s(["normalize_stored_tag",0,function(a){let b=a.trim().replace(/^@+/,"");if(0===b.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(b))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${b}`}])},19045,a=>{"use strict";a.s(["serialize_entry",0,function(a,b,c){return{id:a.id,description:a.description,start:a.start.toISOString(),end:null===a.end?null:a.end.toISOString(),tags:a.tags,notes:a.notes.map(({timestamp:a,text:b})=>({timestamp:a.toISOString(),text:b})),sheetName:b,durationMs:function(a,b=Date.now()){let{end:c,start:d}=a;return Math.max(0,(null===c?b:+c)-d)}(a),isActive:c}}],19045)},93835,3973,82478,2798,95763,a=>{"use strict";let b=Symbol.for("constructDateFrom");function c(a,c){return"function"==typeof a?a(c):a&&"object"==typeof a&&b in a?a[b](c):a instanceof Date?new a.constructor(c):new Date(c)}function d(a,b){return c(b||a,a)}a.s(["constructFromSymbol",0,b,"millisecondsInHour",0,36e5,"millisecondsInMinute",0,6e4,"millisecondsInSecond",0,1e3,"millisecondsInWeek",0,6048e5],3973),a.s(["constructFrom",0,c],82478),a.s(["toDate",0,d],2798),a.s(["endOfDay",0,function(a,b){let c=d(a,b?.in);return c.setHours(23,59,59,999),c}],93835);let e={};a.s(["getDefaultOptions",0,function(){return e}],95763)},34114,a=>{"use strict";var b=a.i(95763),c=a.i(2798);a.s(["startOfWeek",0,function(a,d){let e=(0,b.getDefaultOptions)(),f=d?.weekStartsOn??d?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,g=(0,c.toDate)(a,d?.in),h=g.getDay();return g.setDate(g.getDate()-(7*(h<f)+h-f)),g.setHours(0,0,0,0),g}])},12781,a=>{"use strict";var b=a.i(2798);a.s(["startOfDay",0,function(a,c){let d=(0,b.toDate)(a,c?.in);return d.setHours(0,0,0,0),d}])},60135,a=>{"use strict";var b=a.i(82478),c=a.i(2798);a.s(["addDays",0,function(a,d,e){let f=(0,c.toDate)(a,e?.in);return isNaN(d)?(0,b.constructFrom)(e?.in||a,NaN):(d&&f.setDate(f.getDate()+d),f)}])},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0yz-q3-._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},93835,3973,82478,2798,95763,a=>{"use strict";let b=Symbol.for("constructDateFrom");function c(a,c){return"function"==typeof a?a(c):a&&"object"==typeof a&&b in a?a[b](c):a instanceof Date?new a.constructor(c):new Date(c)}function d(a,b){return c(b||a,a)}a.s(["constructFromSymbol",0,b,"millisecondsInHour",0,36e5,"millisecondsInMinute",0,6e4,"millisecondsInSecond",0,1e3,"millisecondsInWeek",0,6048e5],3973),a.s(["constructFrom",0,c],82478),a.s(["toDate",0,d],2798),a.s(["endOfDay",0,function(a,b){let c=d(a,b?.in);return c.setHours(23,59,59,999),c}],93835);let e={};a.s(["getDefaultOptions",0,function(){return e}],95763)},12781,a=>{"use strict";var b=a.i(2798);a.s(["startOfDay",0,function(a,c){let d=(0,b.toDate)(a,c?.in);return d.setHours(0,0,0,0),d}])},34114,a=>{"use strict";var b=a.i(95763),c=a.i(2798);a.s(["startOfWeek",0,function(a,d){let e=(0,b.getDefaultOptions)(),f=d?.weekStartsOn??d?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,g=(0,c.toDate)(a,d?.in),h=g.getDay();return g.setDate(g.getDate()-(7*(h<f)+h-f)),g.setHours(0,0,0,0),g}])},2985,a=>{"use strict";var b=a.i(93835),c=a.i(2798),d=a.i(95763),e=a.i(12781),f=a.i(34114);a.s(["get_period_range_ms",0,function(a,g=new Date,h=1){var i;switch(a){case"week":let j,k,l,m;return{startMs:+(0,f.startOfWeek)(g,{weekStartsOn:h}),endMs:+(i={weekStartsOn:h},j=(0,d.getDefaultOptions)(),k=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??j.weekStartsOn??j.locale?.options?.weekStartsOn??0,m=(l=(0,c.toDate)(g,i?.in)).getDay(),l.setDate(l.getDate()+((m<k?-7:0)+6-(m-k))),l.setHours(23,59,59,999),l)};case"month":let n,o,p;return{startMs:+((n=(0,c.toDate)(g,void 0)).setDate(1),n.setHours(0,0,0,0),n),endMs:+(p=(o=(0,c.toDate)(g,void 0)).getMonth(),o.setFullYear(o.getFullYear(),p+1,0),o.setHours(23,59,59,999),o)};default:return{startMs:+(0,e.startOfDay)(g),endMs:+(0,b.endOfDay)(g)}}}],2985)},23035,a=>{"use strict";a.s(["get_clipped_entry_duration_ms",0,function(a,b,c,d=Date.now()){let e=+a.start;return Math.max(0,Math.min(null===a.end?d:+a.end,c)-Math.max(e,b))}])},2317,51196,a=>{"use strict";function b(a,b){return 0===b?0:a/b}a.s(["get_average_entry_ms",0,b],51196);var c=a.i(23035);a.s(["get_sheet_report_stats_for_range",0,function(a,d,e,f=Date.now()){let g=0,h=0,i=!1;for(let b of a.entries){let j=(0,c.get_clipped_entry_duration_ms)(b,d,e,f);j<=0||(g+=j,h+=1,a.activeEntryID===b.id&&null===b.end&&(i=!0))}return{sheetName:a.name,totalMs:g,entryCount:h,averageEntryMs:b(g,h),hasActiveEntry:i}}],2317)},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},57577,a=>{"use strict";a.s(["SheetHubView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SheetHubView() from the server but SheetHubView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/sheet-hub-view.tsx <module evaluation>","SheetHubView")},68434,a=>{"use strict";a.s(["SheetHubView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SheetHubView() from the server but SheetHubView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/sheet-hub-view.tsx","SheetHubView")},14012,a=>{"use strict";a.i(57577);var b=a.i(68434);a.n(b)},23853,a=>{"use strict";var b=a.i(46193),c=a.i(14012),d=a.i(2985),e=a.i(2317),f=a.i(4813);async function g(){return{rows:function(a,b=Date.now(),c=1){let f=new Date(b),g=(0,d.get_period_range_ms)("week",f,c),h=(0,d.get_period_range_ms)("month",f);return a.map(a=>{let c=(0,e.get_sheet_report_stats_for_range)(a,g.startMs,g.endMs,b),d=(0,e.get_sheet_report_stats_for_range)(a,h.startMs,h.endMs,b),f=function(a,b=Date.now()){let c=null;for(let d of a.entries){let a=null===d.end?b:+d.end,e=Math.max(+d.start,a);(null===c||e>c)&&(c=e)}return c}(a,b);return{sheetName:a.name,entryCount:a.entries.length,hasActiveEntry:null!==a.activeEntryID,weekTotalMs:c.totalMs,monthTotalMs:d.totalMs,lastActivityAt:null===f?null:new Date(f).toISOString()}})}((await (0,f.read_db)()).sheets)}}async function h(){let{rows:a}=await g();return(0,b.jsx)(c.SheetHubView,{rows:a})}a.s(["default",0,h],23853)},12349,a=>{a.n(a.i(23853))}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__113s7hk._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[86663,17603,a=>{"use strict";let b=new Set,c=[],d=null;function e(){return[]}function f(a){}a.s(["get_pinned_sheet_names_server_snapshot",0,function(){return c},"get_pinned_sheet_names_snapshot",0,function(){var a=e();if(0===a.length)return c;let b=a.join("\0");if(null!==d&&d.key===b)return d.snapshot;let f=Object.freeze([...a]);return d={key:b,snapshot:f},f},"read_pinned_sheet_names",0,e,"subscribe_pinned_sheet_names",0,function(a){return b.add(a),()=>{b.delete(a)}},"write_pinned_sheet_names",0,f],86663),a.s(["toggle_pinned_sheet_name",0,function(a){let b=a.trim();if(0===b.length)return;let c=e(),d=c.indexOf(b);d>=0?f([...c.slice(0,d),...c.slice(d+1)]):f([...c,b])}],17603)},44312,a=>{"use strict";var b;let c={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function d(a){return (b={})=>{let c=b.width?String(b.width):a.defaultWidth;return a.formats[c]||a.formats[a.defaultWidth]}}let e={date:d({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:d({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:d({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},f={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function g(a){return(b,c)=>{let d;if("formatting"===(c?.context?String(c.context):"standalone")&&a.formattingValues){let b=a.defaultFormattingWidth||a.defaultWidth,e=c?.width?String(c.width):b;d=a.formattingValues[e]||a.formattingValues[b]}else{let b=a.defaultWidth,e=c?.width?String(c.width):a.defaultWidth;d=a.values[e]||a.values[b]}return d[a.argumentCallback?a.argumentCallback(b):b]}}let h={ordinalNumber:(a,b)=>{let c=Number(a),d=c%100;if(d>20||d<10)switch(d%10){case 1:return c+"st";case 2:return c+"nd";case 3:return c+"rd"}return c+"th"},era:g({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:g({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:a=>a-1}),month:g({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:g({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:g({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function i(a){return(b,c={})=>{let d,e=c.width,f=e&&a.matchPatterns[e]||a.matchPatterns[a.defaultMatchWidth],g=b.match(f);if(!g)return null;let h=g[0],i=e&&a.parsePatterns[e]||a.parsePatterns[a.defaultParseWidth],j=Array.isArray(i)?function(a,b){for(let c=0;c<a.length;c++)if(b(a[c]))return c}(i,a=>a.test(h)):function(a,b){for(let c in a)if(Object.prototype.hasOwnProperty.call(a,c)&&b(a[c]))return c}(i,a=>a.test(h));return d=a.valueCallback?a.valueCallback(j):j,{value:d=c.valueCallback?c.valueCallback(d):d,rest:b.slice(h.length)}}}let j={ordinalNumber:(b={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:a=>parseInt(a,10)},(a,c={})=>{let d=a.match(b.matchPattern);if(!d)return null;let e=d[0],f=a.match(b.parsePattern);if(!f)return null;let g=b.valueCallback?b.valueCallback(f[0]):f[0];return{value:g=c.valueCallback?c.valueCallback(g):g,rest:a.slice(e.length)}}),era:i({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:i({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:a=>a+1}),month:i({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:i({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:i({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};a.s(["defaultLocale",0,{code:"en-US",formatDistance:(a,b,d)=>{let e,f=c[a];if(e="string"==typeof f?f:1===b?f.one:f.other.replace("{{count}}",b.toString()),d?.addSuffix)if(d.comparison&&d.comparison>0)return"in "+e;else return e+" ago";return e},formatLong:e,formatRelative:(a,b,c,d)=>f[a],localize:h,match:j,options:{weekStartsOn:0,firstWeekContainsDate:1}}],44312)},57487,a=>{"use strict";let b={};a.s(["getDefaultOptions",0,function(){return b}])},61802,9357,a=>{"use strict";let b=Symbol.for("constructDateFrom");a.s(["constructFromSymbol",0,b,"millisecondsInDay",0,864e5,"millisecondsInHour",0,36e5,"millisecondsInMinute",0,6e4,"millisecondsInSecond",0,1e3,"millisecondsInWeek",0,6048e5,"minutesInDay",0,1440,"minutesInMonth",0,43200,"minutesInYear",0,525600],9357),a.s(["constructFrom",0,function(a,c){return"function"==typeof a?a(c):a&&"object"==typeof a&&b in a?a[b](c):a instanceof Date?new a.constructor(c):new Date(c)}],61802)},46313,a=>{"use strict";var b=a.i(61802);a.s(["toDate",0,function(a,c){return(0,b.constructFrom)(c||a,a)}])},95799,59099,a=>{"use strict";var b=a.i(46313);a.s(["getTimezoneOffsetInMilliseconds",0,function(a){let c=(0,b.toDate)(a),d=new Date(Date.UTC(c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds()));return d.setUTCFullYear(c.getFullYear()),a-d}],95799);var c=a.i(61802);a.s(["normalizeDates",0,function(a,...b){let d=c.constructFrom.bind(null,a||b.find(a=>"object"==typeof a));return b.map(d)}],59099)},76767,a=>{"use strict";var b=a.i(93301);a.s(["format_time",0,function(a,c="12h"){return(0,b.format)(new Date(a),"24h"===c?"HH:mm":"h:mm a")}])},13175,a=>{"use strict";a.s(["format_entry_count_label",0,function(a){return 0===a?null:1===a?"1 entry":`${a} entries`}])},20537,a=>{"use strict";var b=a.i(34542),c=a.i(50825);a.s(["use_time_format",0,function(){return(0,b.useSyncExternalStore)(c.time_format_preference.subscribe,c.time_format_preference.get_snapshot,c.time_format_preference.get_server_snapshot)}])},39744,62082,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:c.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=30&&b<=720}});a.s(["daily_focus_target_minutes_preference",0,d],39744);let e=(0,b.create_ui_preference_store)({storage_key:c.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:c.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=60&&b<=4200}});a.s(["weekly_focus_target_minutes_preference",0,e],62082)},68070,68225,a=>{"use strict";a.s(["build_check_out_request_payload",0,function(a,b){let c={sheetName:a},d=b?.at?.trim(),e=b?.note?.trim();return void 0!==d&&d.length>0&&(c.at=d),void 0!==e&&e.length>0&&(c.note=e),c}],68070),a.s(["finish_running_pomodoro_timer",0,function(){}],68225)},61566,a=>{"use strict";a.s(["prompt_check_out_at",0,function(){let a=window.prompt("Check out at what time?","30 minutes ago");if(null===a)return null;let b=a.trim();return 0===b.length?null:b}])},26336,77328,38842,a=>{"use strict";var b=a.i(34542),c=a.i(53030);function d(a){let b=a?.at?.trim()??"",c=a?.note?.trim()??"",d=b.length>0,e=c.length>0,f="Stop the active timer and save this entry?";return d&&e?f=`Stop the timer at "${b}" and save a checkout note?`:d?f=`Stop the timer and check out at "${b}"?`:e&&(f="Stop the timer and save this entry with your checkout note?"),{title:"Check out?",message:f,confirmLabel:"Check out",variant:"danger"}}a.s(["get_check_out_confirm_dialog",0,d],77328);var e=a.i(40947);function f(){return"true"===(0,b.useSyncExternalStore)(e.confirm_before_checkout_preference.subscribe,e.confirm_before_checkout_preference.get_snapshot,e.confirm_before_checkout_preference.get_server_snapshot)}a.s(["use_confirm_before_checkout",0,f],38842),a.s(["useCheckOutAction",0,function(a){let{confirm:e}=(0,c.useConfirmDialog)(),g=f();return(0,b.useCallback)(async b=>(!g||!!await e(d(b)))&&(a(b),!0),[e,g,a])}],26336)}];
2
+
3
+ //# sourceMappingURL=_0-a9ia4._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:a=>a.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:a=>a.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},57077,a=>{"use strict";var b=a.i(7048);a.s(["persist_ui_preference",0,function(a,c){a.read()!==c&&(a.write(c),a.notify(),(0,b.notify_settings_saved)())}])},39744,62082,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:c.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=30&&b<=720}});a.s(["daily_focus_target_minutes_preference",0,d],39744);let e=(0,b.create_ui_preference_store)({storage_key:c.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:c.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=60&&b<=4200}});a.s(["weekly_focus_target_minutes_preference",0,e],62082)},50762,13870,16777,18558,80805,9818,a=>{"use strict";a.s(["parse_focus_goals_by_name",0,function(a){if(0===a.length)return{};try{let b=JSON.parse(a);if(null===b||"object"!=typeof b||Array.isArray(b))return{};let c={};for(let[a,d]of Object.entries(b)){if(null===d||"object"!=typeof d)continue;let b={};"string"==typeof d.daily&&d.daily.length>0&&(b.daily=d.daily),"string"==typeof d.weekly&&d.weekly.length>0&&(b.weekly=d.weekly),(void 0!==b.daily||void 0!==b.weekly)&&(c[a]=b)}return c}catch{return{}}}],50762);var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOAL_SCOPE_STORAGE_KEY,default_value:c.FOCUS_GOAL_SCOPE_DEFAULT,is_valid:a=>"global"===a||"sheet"===a||"tag"===a});a.s(["focus_goal_scope_preference",0,d],13870);let e=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOAL_SHEET_NAME_STORAGE_KEY,default_value:c.FOCUS_GOAL_SHEET_NAME_DEFAULT,is_valid:a=>a.trim().length>0});a.s(["focus_goal_sheet_name_preference",0,e],16777);let f=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOAL_TAG_NAME_STORAGE_KEY,default_value:c.FOCUS_GOAL_TAG_NAME_DEFAULT,is_valid:a=>a.trim().length>0});a.s(["focus_goal_tag_name_preference",0,f],18558);let g=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOALS_PER_SHEET_STORAGE_KEY,default_value:c.FOCUS_GOALS_PER_SHEET_DEFAULT,is_valid:a=>{if(0===a.length)return!1;try{let b=JSON.parse(a);return null!==b&&"object"==typeof b&&!Array.isArray(b)}catch{return!1}}});a.s(["focus_goals_per_sheet_preference",0,g],80805);let h=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOALS_PER_TAG_STORAGE_KEY,default_value:c.FOCUS_GOALS_PER_TAG_DEFAULT,is_valid:a=>{if(0===a.length)return!1;try{let b=JSON.parse(a);return null!==b&&"object"==typeof b&&!Array.isArray(b)}catch{return!1}}});a.s(["focus_goals_per_tag_preference",0,h],9818)},38296,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(50762);function e(a,b,c,e){if(0===b.length)return a;let f=(0,d.parse_focus_goals_by_name)(a),g=f[b]??{};if(0===e.length){let a={...g};delete a[c],void 0===a.daily&&void 0===a.weekly?delete f[b]:f[b]=a}else f[b]={...g,[c]:e};return JSON.stringify(f)}var f=a.i(39744),g=a.i(13870),h=a.i(16777),i=a.i(18558),j=a.i(80805),k=a.i(9818),l=a.i(72327),m=a.i(40395),n=a.i(76121),o=a.i(22496),p=a.i(43329),q=a.i(62082),r=a.i(57077);let s=[120,180,240,300,360,420,480],t=[600,900,1200,1500,1800,2100,2400],u=[15,30,45,60,90,120],v=[6,8,10,12,14],w=[{value:"global",label:"Global"},{value:"sheet",label:"Per-sheet"},{value:"tag",label:"Per-tag"}];function x({disabled:a,daily_target_minutes:c,weekly_target_minutes:d}){return(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Global targets"}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Daily target"}),(0,b.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:c,disabled:a,onChange:a=>(0,r.persist_ui_preference)(f.daily_focus_target_minutes_preference,a.target.value),children:s.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))})]}),(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Weekly target"}),(0,b.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:d,disabled:a,onChange:a=>(0,r.persist_ui_preference)(q.weekly_focus_target_minutes_preference,a.target.value),children:t.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))})]})]})]})}function y({kind:a,names:c,disabled:d,active_name:f,map:g,json:l}){let m="sheet"===a?"Per-sheet targets":"Per-tag targets";if(0===c.length)return(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:m}),(0,b.jsx)("p",{className:"m-0 text-[0.85rem] text-muted",children:"sheet"===a?"Create a sheet to configure per-sheet goals.":"Add a tag to a time entry to configure per-tag goals."})]});let n=`focus-goal-active-${a}`;return(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:m}),(0,b.jsxs)("span",{className:"text-[0.75rem] text-muted",children:["Pick the ",a," shown in the focus banner."]})]}),(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:c.map(c=>{let m=g[c]??{},o=m.daily??"",p=m.weekly??"",q=f===c;return(0,b.jsxs)("li",{className:`grid items-center gap-2 rounded-md border bg-panel px-3 py-2.5 transition-colors md:grid-cols-[auto_minmax(0,1fr)_minmax(0,11rem)_minmax(0,11rem)] grid-cols-[auto_minmax(0,1fr)] ${q?"border-accent-border bg-accent-soft":"border-panel-border"}`,children:[(0,b.jsx)("label",{className:"flex shrink-0 cursor-pointer items-center justify-center",children:(0,b.jsx)("input",{type:"radio",name:n,className:"cursor-pointer",checked:q,disabled:d,"aria-label":`Show ${c} in focus banner`,onChange:()=>(0,r.persist_ui_preference)("sheet"===a?h.focus_goal_sheet_name_preference:i.focus_goal_tag_name_preference,c)})}),(0,b.jsx)("span",{className:"truncate text-[0.9rem] font-medium",title:c,children:"tag"!==a||c.startsWith("@")?c:`@${c}`}),(0,b.jsxs)("label",{className:"flex items-center gap-2 md:col-start-3",children:[(0,b.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Daily"}),(0,b.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:o,disabled:d,onChange:b=>(0,r.persist_ui_preference)("sheet"===a?j.focus_goals_per_sheet_preference:k.focus_goals_per_tag_preference,e(l,c,"daily",b.target.value)),children:[(0,b.jsx)("option",{value:"",children:"Not set"}),s.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))]})]}),(0,b.jsxs)("label",{className:"flex items-center gap-2 md:col-start-4",children:[(0,b.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Weekly"}),(0,b.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:p,disabled:d,onChange:b=>(0,r.persist_ui_preference)("sheet"===a?j.focus_goals_per_sheet_preference:k.focus_goals_per_tag_preference,e(l,c,"weekly",b.target.value)),children:[(0,b.jsx)("option",{value:"",children:"Not set"}),t.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))]})]})]},c)})})]})}a.s(["FocusGoalsNudgesSetting",0,function({sheet_names:a,tag_names:e}){let s=(0,c.useSyncExternalStore)(l.focus_nudges_enabled_preference.subscribe,l.focus_nudges_enabled_preference.get_snapshot,l.focus_nudges_enabled_preference.get_server_snapshot),t=(0,c.useSyncExternalStore)(f.daily_focus_target_minutes_preference.subscribe,f.daily_focus_target_minutes_preference.get_snapshot,f.daily_focus_target_minutes_preference.get_server_snapshot),z=(0,c.useSyncExternalStore)(q.weekly_focus_target_minutes_preference.subscribe,q.weekly_focus_target_minutes_preference.get_snapshot,q.weekly_focus_target_minutes_preference.get_server_snapshot),A=(0,c.useSyncExternalStore)(m.no_log_reminder_minutes_preference.subscribe,m.no_log_reminder_minutes_preference.get_snapshot,m.no_log_reminder_minutes_preference.get_server_snapshot),B=(0,c.useSyncExternalStore)(n.overwork_alert_hours_preference.subscribe,n.overwork_alert_hours_preference.get_snapshot,n.overwork_alert_hours_preference.get_server_snapshot),C=(0,c.useSyncExternalStore)(p.work_hours_start_preference.subscribe,p.work_hours_start_preference.get_snapshot,p.work_hours_start_preference.get_server_snapshot),D=(0,c.useSyncExternalStore)(o.work_hours_end_preference.subscribe,o.work_hours_end_preference.get_snapshot,o.work_hours_end_preference.get_server_snapshot),E=(0,c.useSyncExternalStore)(g.focus_goal_scope_preference.subscribe,g.focus_goal_scope_preference.get_snapshot,g.focus_goal_scope_preference.get_server_snapshot),F=(0,c.useSyncExternalStore)(h.focus_goal_sheet_name_preference.subscribe,h.focus_goal_sheet_name_preference.get_snapshot,h.focus_goal_sheet_name_preference.get_server_snapshot),G=(0,c.useSyncExternalStore)(i.focus_goal_tag_name_preference.subscribe,i.focus_goal_tag_name_preference.get_snapshot,i.focus_goal_tag_name_preference.get_server_snapshot),H=(0,c.useSyncExternalStore)(j.focus_goals_per_sheet_preference.subscribe,j.focus_goals_per_sheet_preference.get_snapshot,j.focus_goals_per_sheet_preference.get_server_snapshot),I=(0,c.useSyncExternalStore)(k.focus_goals_per_tag_preference.subscribe,k.focus_goals_per_tag_preference.get_snapshot,k.focus_goals_per_tag_preference.get_server_snapshot),J=(0,d.parse_focus_goals_by_name)(H),K=(0,d.parse_focus_goals_by_name)(I);(0,c.useEffect)(()=>{"sheet"===E&&0===F.length&&a.length>0&&(0,r.persist_ui_preference)(h.focus_goal_sheet_name_preference,a[0])},[E,F,a]),(0,c.useEffect)(()=>{"tag"===E&&0===G.length&&e.length>0&&(0,r.persist_ui_preference)(i.focus_goal_tag_name_preference,e[0])},[E,G,e]);let L="true"!==s;return(0,b.jsxs)("div",{id:"focus-goals-nudges",className:"flex w-full flex-col gap-4",children:[(0,b.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,b.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===s,onChange:a=>(0,r.persist_ui_preference)(l.focus_nudges_enabled_preference,a.target.checked?"true":"false")}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Goals + nudges"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Track daily/weekly focus goals, overwork alerts, and no-log reminders."})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Focus goal scope"}),(0,b.jsx)("div",{role:"radiogroup","aria-label":"Focus goal scope",className:"inline-flex w-full flex-wrap gap-1 rounded-md border border-panel-border bg-panel p-0.5",children:w.map(a=>{let c=E===a.value;return(0,b.jsx)("button",{type:"button",role:"radio","aria-checked":c,disabled:L,className:`flex-1 min-w-24 cursor-pointer rounded px-3 py-1.5 text-[0.85rem] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-55 ${c?"bg-accent-soft text-foreground":"bg-transparent text-muted hover:bg-surface-hover hover:text-foreground"}`,onClick:()=>(0,r.persist_ui_preference)(g.focus_goal_scope_preference,a.value),children:a.label},a.value)})})]}),"global"===E?(0,b.jsx)(x,{disabled:L,daily_target_minutes:t,weekly_target_minutes:z}):null,"sheet"===E?(0,b.jsx)(y,{kind:"sheet",names:a,disabled:L,active_name:F,map:J,json:H}):null,"tag"===E?(0,b.jsx)(y,{kind:"tag",names:e,disabled:L,active_name:G,map:K,json:I}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Behavior nudges"}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours start"}),(0,b.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:C,disabled:L,onChange:a=>(0,r.persist_ui_preference)(p.work_hours_start_preference,a.target.value)})]}),(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours end"}),(0,b.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:D,disabled:L,onChange:a=>(0,r.persist_ui_preference)(o.work_hours_end_preference,a.target.value)})]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"No-log reminder"}),(0,b.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:A,disabled:L,onChange:a=>(0,r.persist_ui_preference)(m.no_log_reminder_minutes_preference,a.target.value),children:u.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))})]}),(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Overwork alert"}),(0,b.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:B,disabled:L,onChange:a=>(0,r.persist_ui_preference)(n.overwork_alert_hours_preference,a.target.value),children:v.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," hours"]},a))})]})]}),(0,b.jsx)("p",{className:"m-0 text-[0.78rem] leading-snug text-muted",children:"Rule reminders: notify when no active timer during work hours, and alert when an active timer runs longer than the overwork threshold."})]})]})}],38296)}];
1
+ module.exports=[85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:a=>a.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:a=>a.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},57077,a=>{"use strict";var b=a.i(7048);a.s(["persist_ui_preference",0,function(a,c){a.read()!==c&&(a.write(c),a.notify(),(0,b.notify_settings_saved)())}])},39744,62082,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:c.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=30&&b<=720}});a.s(["daily_focus_target_minutes_preference",0,d],39744);let e=(0,b.create_ui_preference_store)({storage_key:c.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:c.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=60&&b<=4200}});a.s(["weekly_focus_target_minutes_preference",0,e],62082)},50762,13870,16777,18558,80805,9818,a=>{"use strict";a.s(["parse_focus_goals_by_name",0,function(a){if(0===a.length)return{};try{let b=JSON.parse(a);if(null===b||"object"!=typeof b||Array.isArray(b))return{};let c={};for(let[a,d]of Object.entries(b)){if(null===d||"object"!=typeof d)continue;let b={};"string"==typeof d.daily&&d.daily.length>0&&(b.daily=d.daily),"string"==typeof d.weekly&&d.weekly.length>0&&(b.weekly=d.weekly),(void 0!==b.daily||void 0!==b.weekly)&&(c[a]=b)}return c}catch{return{}}}],50762);var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOAL_SCOPE_STORAGE_KEY,default_value:c.FOCUS_GOAL_SCOPE_DEFAULT,is_valid:a=>"global"===a||"sheet"===a||"tag"===a});a.s(["focus_goal_scope_preference",0,d],13870);let e=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOAL_SHEET_NAME_STORAGE_KEY,default_value:c.FOCUS_GOAL_SHEET_NAME_DEFAULT,is_valid:a=>a.trim().length>0});a.s(["focus_goal_sheet_name_preference",0,e],16777);let f=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOAL_TAG_NAME_STORAGE_KEY,default_value:c.FOCUS_GOAL_TAG_NAME_DEFAULT,is_valid:a=>a.trim().length>0});a.s(["focus_goal_tag_name_preference",0,f],18558);let g=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOALS_PER_SHEET_STORAGE_KEY,default_value:c.FOCUS_GOALS_PER_SHEET_DEFAULT,is_valid:a=>{if(0===a.length)return!1;try{let b=JSON.parse(a);return null!==b&&"object"==typeof b&&!Array.isArray(b)}catch{return!1}}});a.s(["focus_goals_per_sheet_preference",0,g],80805);let h=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOALS_PER_TAG_STORAGE_KEY,default_value:c.FOCUS_GOALS_PER_TAG_DEFAULT,is_valid:a=>{if(0===a.length)return!1;try{let b=JSON.parse(a);return null!==b&&"object"==typeof b&&!Array.isArray(b)}catch{return!1}}});a.s(["focus_goals_per_tag_preference",0,h],9818)},38296,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(50762);function e(a,b,c,e){if(0===b.length)return a;let f=(0,d.parse_focus_goals_by_name)(a),g=f[b]??{};if(0===e.length){let a={...g};delete a[c],void 0===a.daily&&void 0===a.weekly?delete f[b]:f[b]=a}else f[b]={...g,[c]:e};return JSON.stringify(f)}var f=a.i(39744),g=a.i(13870),h=a.i(16777),i=a.i(18558),j=a.i(80805),k=a.i(9818),l=a.i(72327),m=a.i(40395),n=a.i(76121),o=a.i(22496),p=a.i(43329),q=a.i(62082),r=a.i(57077);let s=[120,180,240,300,360,420,480],t=[600,900,1200,1500,1800,2100,2400],u=[15,30,45,60,90,120],v=[6,8,10,12,14],w=[{value:"global",label:"Global"},{value:"sheet",label:"Per-sheet"},{value:"tag",label:"Per-tag"}];function x({disabled:a,daily_target_minutes:c,weekly_target_minutes:d}){return(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Global targets"}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Daily target"}),(0,b.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:c,disabled:a,onChange:a=>(0,r.persist_ui_preference)(f.daily_focus_target_minutes_preference,a.target.value),children:s.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))})]}),(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Weekly target"}),(0,b.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:d,disabled:a,onChange:a=>(0,r.persist_ui_preference)(q.weekly_focus_target_minutes_preference,a.target.value),children:t.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))})]})]})]})}function y({kind:a,names:c,disabled:d,active_name:f,map:g,json:l}){let m="sheet"===a?"Per-sheet targets":"Per-tag targets";if(0===c.length)return(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:m}),(0,b.jsx)("p",{className:"m-0 text-[0.85rem] text-muted",children:"sheet"===a?"Create a sheet to configure per-sheet goals.":"Add a tag to a time entry to configure per-tag goals."})]});let n=`focus-goal-active-${a}`;return(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:m}),(0,b.jsxs)("span",{className:"text-[0.75rem] text-muted",children:["Pick the ",a," shown in the focus banner."]})]}),(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:c.map(c=>{let m=g[c]??{},o=m.daily??"",p=m.weekly??"",q=f===c;return(0,b.jsxs)("li",{className:`grid items-center gap-2 rounded-md border bg-panel px-3 py-2.5 transition-colors md:grid-cols-[auto_minmax(0,1fr)_minmax(0,11rem)_minmax(0,11rem)] grid-cols-[auto_minmax(0,1fr)] ${q?"border-accent-border bg-accent-soft":"border-panel-border"}`,children:[(0,b.jsx)("label",{className:"flex shrink-0 cursor-pointer items-center justify-center","aria-label":`Show ${c} in focus banner`,children:(0,b.jsx)("input",{type:"radio",name:n,className:"cursor-pointer",checked:q,disabled:d,onChange:()=>(0,r.persist_ui_preference)("sheet"===a?h.focus_goal_sheet_name_preference:i.focus_goal_tag_name_preference,c)})}),(0,b.jsx)("span",{className:"truncate text-[0.9rem] font-medium",title:c,children:"tag"!==a||c.startsWith("@")?c:`@${c}`}),(0,b.jsxs)("label",{className:"flex items-center gap-2 md:col-start-3",children:[(0,b.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Daily"}),(0,b.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:o,disabled:d,onChange:b=>(0,r.persist_ui_preference)("sheet"===a?j.focus_goals_per_sheet_preference:k.focus_goals_per_tag_preference,e(l,c,"daily",b.target.value)),children:[(0,b.jsx)("option",{value:"",children:"Not set"}),s.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))]})]}),(0,b.jsxs)("label",{className:"flex items-center gap-2 md:col-start-4",children:[(0,b.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Weekly"}),(0,b.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:p,disabled:d,onChange:b=>(0,r.persist_ui_preference)("sheet"===a?j.focus_goals_per_sheet_preference:k.focus_goals_per_tag_preference,e(l,c,"weekly",b.target.value)),children:[(0,b.jsx)("option",{value:"",children:"Not set"}),t.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))]})]})]},c)})})]})}a.s(["FocusGoalsNudgesSetting",0,function({sheet_names:a,tag_names:e}){let s=(0,c.useSyncExternalStore)(l.focus_nudges_enabled_preference.subscribe,l.focus_nudges_enabled_preference.get_snapshot,l.focus_nudges_enabled_preference.get_server_snapshot),t=(0,c.useSyncExternalStore)(f.daily_focus_target_minutes_preference.subscribe,f.daily_focus_target_minutes_preference.get_snapshot,f.daily_focus_target_minutes_preference.get_server_snapshot),z=(0,c.useSyncExternalStore)(q.weekly_focus_target_minutes_preference.subscribe,q.weekly_focus_target_minutes_preference.get_snapshot,q.weekly_focus_target_minutes_preference.get_server_snapshot),A=(0,c.useSyncExternalStore)(m.no_log_reminder_minutes_preference.subscribe,m.no_log_reminder_minutes_preference.get_snapshot,m.no_log_reminder_minutes_preference.get_server_snapshot),B=(0,c.useSyncExternalStore)(n.overwork_alert_hours_preference.subscribe,n.overwork_alert_hours_preference.get_snapshot,n.overwork_alert_hours_preference.get_server_snapshot),C=(0,c.useSyncExternalStore)(p.work_hours_start_preference.subscribe,p.work_hours_start_preference.get_snapshot,p.work_hours_start_preference.get_server_snapshot),D=(0,c.useSyncExternalStore)(o.work_hours_end_preference.subscribe,o.work_hours_end_preference.get_snapshot,o.work_hours_end_preference.get_server_snapshot),E=(0,c.useSyncExternalStore)(g.focus_goal_scope_preference.subscribe,g.focus_goal_scope_preference.get_snapshot,g.focus_goal_scope_preference.get_server_snapshot),F=(0,c.useSyncExternalStore)(h.focus_goal_sheet_name_preference.subscribe,h.focus_goal_sheet_name_preference.get_snapshot,h.focus_goal_sheet_name_preference.get_server_snapshot),G=(0,c.useSyncExternalStore)(i.focus_goal_tag_name_preference.subscribe,i.focus_goal_tag_name_preference.get_snapshot,i.focus_goal_tag_name_preference.get_server_snapshot),H=(0,c.useSyncExternalStore)(j.focus_goals_per_sheet_preference.subscribe,j.focus_goals_per_sheet_preference.get_snapshot,j.focus_goals_per_sheet_preference.get_server_snapshot),I=(0,c.useSyncExternalStore)(k.focus_goals_per_tag_preference.subscribe,k.focus_goals_per_tag_preference.get_snapshot,k.focus_goals_per_tag_preference.get_server_snapshot),J=(0,d.parse_focus_goals_by_name)(H),K=(0,d.parse_focus_goals_by_name)(I);(0,c.useEffect)(()=>{"sheet"===E&&0===F.length&&a.length>0&&(0,r.persist_ui_preference)(h.focus_goal_sheet_name_preference,a[0])},[E,F,a]),(0,c.useEffect)(()=>{"tag"===E&&0===G.length&&e.length>0&&(0,r.persist_ui_preference)(i.focus_goal_tag_name_preference,e[0])},[E,G,e]);let L="true"!==s;return(0,b.jsxs)("div",{id:"focus-goals-nudges",className:"flex w-full flex-col gap-4",children:[(0,b.jsxs)("label",{"aria-label":"Focus goals and nudges",className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,b.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===s,onChange:a=>(0,r.persist_ui_preference)(l.focus_nudges_enabled_preference,a.target.checked?"true":"false")}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Goals + nudges"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Track daily/weekly focus goals, overwork alerts, and no-log reminders."})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Focus goal scope"}),(0,b.jsx)("div",{role:"radiogroup","aria-label":"Focus goal scope",className:"inline-flex w-full flex-wrap gap-1 rounded-md border border-panel-border bg-panel p-0.5",children:w.map(a=>{let c=E===a.value;return(0,b.jsx)("button",{type:"button",role:"radio","aria-checked":c,disabled:L,className:`flex-1 min-w-24 cursor-pointer rounded px-3 py-1.5 text-[0.85rem] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-55 ${c?"bg-accent-soft text-foreground":"bg-transparent text-muted hover:bg-surface-hover hover:text-foreground"}`,onClick:()=>(0,r.persist_ui_preference)(g.focus_goal_scope_preference,a.value),children:a.label},a.value)})})]}),"global"===E?(0,b.jsx)(x,{disabled:L,daily_target_minutes:t,weekly_target_minutes:z}):null,"sheet"===E?(0,b.jsx)(y,{kind:"sheet",names:a,disabled:L,active_name:F,map:J,json:H}):null,"tag"===E?(0,b.jsx)(y,{kind:"tag",names:e,disabled:L,active_name:G,map:K,json:I}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Behavior nudges"}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours start"}),(0,b.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:C,disabled:L,onChange:a=>(0,r.persist_ui_preference)(p.work_hours_start_preference,a.target.value)})]}),(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours end"}),(0,b.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:D,disabled:L,onChange:a=>(0,r.persist_ui_preference)(o.work_hours_end_preference,a.target.value)})]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"No-log reminder"}),(0,b.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:A,disabled:L,onChange:a=>(0,r.persist_ui_preference)(m.no_log_reminder_minutes_preference,a.target.value),children:u.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," min"]},a))})]}),(0,b.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Overwork alert"}),(0,b.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:B,disabled:L,onChange:a=>(0,r.persist_ui_preference)(n.overwork_alert_hours_preference,a.target.value),children:v.map(a=>(0,b.jsxs)("option",{value:String(a),children:[a," hours"]},a))})]})]}),(0,b.jsx)("p",{className:"m-0 text-[0.78rem] leading-snug text-muted",children:"Rule reminders: notify when no active timer during work hours, and alert when an active timer runs longer than the overwork threshold."})]})]})}],38296)}];
2
2
 
3
3
  //# sourceMappingURL=_002dssm._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:a=>a.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:a=>a.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},57077,a=>{"use strict";var b=a.i(7048);a.s(["persist_ui_preference",0,function(a,c){a.read()!==c&&(a.write(c),a.notify(),(0,b.notify_settings_saved)())}])},99301,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508),e=a.i(41615),f=a.i(89969),g=a.i(26846);a.s(["CloudAccountSetting",0,function(){let a=(0,d.usePathname)()??"/settings/cloud-sync",{email:h,is_configured:i,is_pending:j,sign_out:k}=(0,g.use_supabase_auth_session)();if(!i)return null;let l=(0,e.build_auth_page_href)("sign_in",a);return(0,b.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Account"}),(0,b.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===h?(0,b.jsx)(c.default,{href:l,className:`${(0,f.get_button_class_name)("primary","small")} self-start no-underline`,children:"Sign in to enable cloud sync"}):(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("p",{className:"m-0 text-[0.85rem]",children:["Signed in as ",(0,b.jsx)("span",{className:"font-semibold",children:h})]}),(0,b.jsx)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost","small")} self-start`,disabled:j,onClick:()=>void k(),children:j?"Signing out…":"Sign out"})]})]})}])},23086,a=>{"use strict";var b=a.i(39752),c=a.i(82508),d=a.i(34542),e=a.i(53030),f=a.i(89969),g=a.i(74365),h=a.i(26846);a.s(["CloudSyncActions",0,function(){let a=(0,c.useRouter)(),{confirm:i}=(0,e.use_confirm_dialog)(),{email:j,is_configured:k}=(0,h.use_supabase_auth_session)(),[l,m]=(0,d.useState)(null),[n,o]=(0,d.useState)(!0),[p,q]=(0,d.useState)(null),[r,s]=(0,d.useState)(null),[t,u]=(0,d.useState)(null),v=async()=>{try{let a=await fetch("/api/sync/status");if(!a.ok)throw Error("Failed to load sync status");let b=await a.json();m(b)}catch(a){u(a instanceof Error?a.message:String(a))}finally{o(!1)}};if((0,d.useEffect)(()=>{k?v():o(!1)},[k,j]),!k||null===j)return null;let w=async b=>{if(await i("push"===b?{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"})){q(b),s(null),u(null);try{await (0,g.run_tracker_db_cloud_sync)({action:b,on_complete:()=>{a.refresh()}}),s("push"===b?"Cloud database merged with local file.":"Local db.json merged with cloud database."),await v()}catch(a){u(a instanceof Error?a.message:String(a))}finally{q(null)}}},x=l?.local_imported_at!==null&&l?.local_imported_at!==void 0?new Date(l.local_imported_at).toLocaleString():"never";return(0,b.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Manual sync"}),(0,b.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."})]}),n?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-muted",children:"Loading sync status…"}):(0,b.jsxs)("dl",{className:"m-0 grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-[0.82rem]",children:[(0,b.jsx)("dt",{className:"text-muted",children:"Cloud sheets"}),(0,b.jsx)("dd",{className:"m-0 font-mono",children:l?.cloud_sheet_count??0}),(0,b.jsx)("dt",{className:"text-muted",children:"Last local import"}),(0,b.jsx)("dd",{className:"m-0 font-mono",children:x})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),disabled:null!==p,onClick:()=>void w("push"),children:"push"===p?"Pushing…":"Push local → cloud"}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),disabled:null!==p,onClick:()=>void w("pull"),children:"pull"===p?"Pulling…":"Pull cloud → local"})]}),null!==r?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:r}):null,null!==t?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:t}):null]})}])},91553,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(49170),e=a.i(57077);a.s(["GreedyCloudSyncSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.greedy_cloud_sync_preference.subscribe,d.greedy_cloud_sync_preference.get_snapshot,d.greedy_cloud_sync_preference.get_server_snapshot);return(0,b.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,b.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===a,onChange:a=>{var b;return b=a.target.checked,void(0,e.persist_ui_preference)(d.greedy_cloud_sync_preference,b?"true":"false")}}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Greedy cloud sync"}),(0,b.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
+ module.exports=[85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:a=>a.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:a=>a.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},57077,a=>{"use strict";var b=a.i(7048);a.s(["persist_ui_preference",0,function(a,c){a.read()!==c&&(a.write(c),a.notify(),(0,b.notify_settings_saved)())}])},99301,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508),e=a.i(41615),f=a.i(89969),g=a.i(26846);a.s(["CloudAccountSetting",0,function(){let a=(0,d.usePathname)()??"/settings/cloud-sync",{email:h,is_configured:i,is_pending:j,sign_out:k}=(0,g.use_supabase_auth_session)();if(!i)return null;let l=(0,e.build_auth_page_href)("sign_in",a);return(0,b.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Account"}),(0,b.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===h?(0,b.jsx)(c.default,{href:l,className:`${(0,f.get_button_class_name)("primary","small")} self-start no-underline`,children:"Sign in to enable cloud sync"}):(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("p",{className:"m-0 text-[0.85rem]",children:["Signed in as ",(0,b.jsx)("span",{className:"font-semibold",children:h})]}),(0,b.jsx)("button",{type:"button",className:`${(0,f.get_button_class_name)("ghost","small")} self-start`,disabled:j,onClick:()=>void k(),children:j?"Signing out…":"Sign out"})]})]})}])},23086,a=>{"use strict";var b=a.i(39752),c=a.i(82508),d=a.i(34542),e=a.i(53030),f=a.i(16229),g=a.i(89969),h=a.i(74365),i=a.i(26846);a.s(["CloudSyncActions",0,function(){let a=(0,c.useRouter)(),{confirm:j}=(0,e.useConfirmDialog)(),{email:k,is_configured:l}=(0,i.use_supabase_auth_session)(),[m,n]=(0,d.useState)(null),[o,p]=(0,d.useState)(!0),[q,r]=(0,d.useState)(null),[s,t]=(0,d.useState)(null),[u,v]=(0,d.useState)(null),w=async()=>{try{let a=await fetch("/api/sync/status");if(!a.ok)throw Error("Failed to load sync status");let b=await a.json();n(b)}catch(a){v((0,f.message_from_unknown_error)(a,"Failed to load sync status"))}finally{p(!1)}};if((0,d.useEffect)(()=>{l?w():p(!1)},[l,k]),!l||null===k)return null;let x=async b=>{if(await j("push"===b?{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"})){r(b),t(null),v(null);try{await (0,h.run_tracker_db_cloud_sync)({action:b,on_complete:()=>{a.refresh()}}),t("push"===b?"Cloud database merged with local file.":"Local db.json merged with cloud database."),await w()}catch(a){v((0,f.message_from_unknown_error)(a,"Sync action failed"))}finally{r(null)}}},y=m?.local_imported_at!==null&&m?.local_imported_at!==void 0?new Date(m.local_imported_at).toLocaleString():"never";return(0,b.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Manual sync"}),(0,b.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."})]}),o?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-muted",children:"Loading sync status…"}):(0,b.jsxs)("dl",{className:"m-0 grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-[0.82rem]",children:[(0,b.jsx)("dt",{className:"text-muted",children:"Cloud sheets"}),(0,b.jsx)("dd",{className:"m-0 font-mono",children:m?.cloud_sheet_count??0}),(0,b.jsx)("dt",{className:"text-muted",children:"Last local import"}),(0,b.jsx)("dd",{className:"m-0 font-mono",children:y})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"button",className:(0,g.get_button_class_name)("ghost","small"),disabled:null!==q,onClick:()=>void x("push"),children:"push"===q?"Pushing…":"Push local → cloud"}),(0,b.jsx)("button",{type:"button",className:(0,g.get_button_class_name)("ghost","small"),disabled:null!==q,onClick:()=>void x("pull"),children:"pull"===q?"Pulling…":"Pull cloud → local"})]}),null===s?null:(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:s}),null===u?null:(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:u})]})}])},91553,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(49170),e=a.i(57077);a.s(["GreedyCloudSyncSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.greedy_cloud_sync_preference.subscribe,d.greedy_cloud_sync_preference.get_snapshot,d.greedy_cloud_sync_preference.get_server_snapshot);return(0,b.jsxs)("label",{"aria-label":"Greedy cloud sync",className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,b.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===a,onChange:a=>{var b;return b=a.target.checked,void(0,e.persist_ui_preference)(d.greedy_cloud_sync_preference,b?"true":"false")}}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Greedy cloud sync"}),(0,b.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."})]})]})}])}];
2
2
 
3
3
  //# sourceMappingURL=_00x~ete._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:a=>a.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:a=>a.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},56924,a=>{"use strict";a.s(["normalize_stored_tag",0,function(a){let b=a.trim().replace(/^@+/,"");if(0===b.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(b))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${b}`}])},30354,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(48174),e=a.i(69749),f=a.i(56924);a.s(["TagAutocompleteInput",0,function({id:a,value:g,known_tags:h,placeholder:i,disabled:j=!1,autoFocus:k=!1,on_change:l}){let m=(0,c.useRef)(null),n=(0,c.useRef)(null),o=(0,c.useRef)(null),[p,q]=(0,c.useState)(0),[r,s]=(0,c.useState)(0),t=function(a,b){let c=a.slice(0,b),d=c.lastIndexOf("@");if(-1===d)return null;let e=c.slice(d+1);return/\s/.test(e)?null:{query:e,start_index:d,end_index:b}}(g,p),u=null===t?[]:function(a,b,c=10){let d=b.toLowerCase();return a.filter(a=>{let b=a.replace(/^@/,"").toLowerCase();return 0===d.length||b.startsWith(d)}).slice(0,c)}(h,t.query),v=null!==t&&function(a,b){if(!/^\w+$/.test(a))return!1;let c=a.toLowerCase();return b.some(a=>{try{return(0,f.normalize_stored_tag)(a).slice(1).toLowerCase()===c}catch{return!1}})}(t.query,h),w=null!==t&&u.length>0&&!v&&!j;(0,c.useLayoutEffect)(()=>{null!==o.current&&null!==m.current&&(m.current.setSelectionRange(o.current,o.current),q(o.current),o.current=null)},[g]),(0,c.useEffect)(()=>{s(0)},[g,p,u.length]);let x=()=>{q(m.current?.selectionStart??g.length)},y=()=>{s(0)},z=a=>{let b,c,e;if(null===t)return;let{next_text:f,next_cursor:h}=(b=(0,d.format_display_tag)(a),c=g.slice(0,t.start_index),e=g.slice(t.end_index),{next_text:`${c}${b}${e}`,next_cursor:c.length+b.length});o.current=h,l(f),y()};return(0,b.jsxs)("div",{className:"relative min-w-0",children:[(0,b.jsx)("input",{ref:m,id:a,type:"text",role:"combobox",className:(0,e.get_input_class_name)(),value:g,placeholder:i,disabled:j,autoFocus:k,autoComplete:"off","aria-autocomplete":"list","aria-expanded":w,"aria-controls":w?`${a}-tag-suggestions`:void 0,onChange:a=>{l(a.target.value),q(a.target.selectionStart??a.target.value.length)},onClick:x,onKeyUp:x,onKeyDown:a=>{if(w){if("ArrowDown"===a.key){a.preventDefault(),s(a=>(a+1)%u.length);return}if("ArrowUp"===a.key){a.preventDefault(),s(a=>(a-1+u.length)%u.length);return}if("Enter"===a.key||"Tab"===a.key){a.preventDefault();let b=u[r];void 0!==b&&z(b);return}"Escape"===a.key&&(a.preventDefault(),y())}},onBlur:()=>{window.setTimeout(y,120)}}),w?(0,b.jsx)("ul",{ref:n,id:`${a}-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:u.map((a,c)=>(0,b.jsx)("li",{role:"option","aria-selected":c===r,children:(0,b.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 ${c===r?"bg-surface-hover":""}`,onMouseDown:b=>{b.preventDefault(),z(a)},children:(0,d.format_display_tag)(a)})},a))}):null]})}],30354)},85930,a=>{"use strict";var b=a.i(39752),c=a.i(85393),d=a.i(98790);a.s(["SettingsPageLayout",0,function({breadcrumb:a,title:e,description:f,children:g}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.TrackerTopbar,{breadcrumb:a}),(0,b.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,b.jsxs)("aside",{className:"flex flex-col gap-2",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Settings"}),(0,b.jsx)(c.SettingsNav,{})]}),(0,b.jsxs)("section",{className:"flex min-w-0 flex-col gap-4",children:[(0,b.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,b.jsx)("h1",{className:"m-0 text-[1.35rem] font-[650] tracking-tight",children:e}),void 0!==f?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:f}):null]}),g]})]})]})}])},53372,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(53030),e=a.i(16229),f=a.i(85930),g=a.i(30354),h=a.i(48174),i=a.i(89969),j=a.i(69749);function k(a,b,c){let d=a.map(a=>(0,h.format_display_tag)(a)).join(", "),e=(0,h.format_display_tag)(b),f=1===c?"1 entry will be updated.":`${c} entries will be updated.`;return{title:"Merge tags?",message:`Merge ${d} into ${e}? ${f}`,confirmLabel:"Merge tags",variant:"danger"}}var l=a.i(59659);a.s(["TagManagementView",0,function({initial_tags:a}){let{confirm:m}=(0,d.useConfirmDialog)(),[n,o]=(0,c.useState)(a),[p,q]=(0,c.useState)(()=>new Set),[r,s]=(0,c.useState)({}),[t,u]=(0,c.useState)(""),[v,w]=(0,c.useState)(null),[x,y]=(0,c.useState)(null),[z,A]=(0,c.useState)(!1),B=(0,c.useMemo)(()=>n.map(a=>a.name),[n]),C=n.filter(a=>p.has(a.name)).reduce((a,b)=>a+b.entryCount,0),D=async a=>{let b=await fetch("/api/tags",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!b.ok)throw Error((await b.json()).error??"Tag update failed");let c=await b.json();o(c.tags),q(new Set),y(1===c.entries_updated?"Updated 1 entry.":`Updated ${c.entries_updated} entries.`),(0,l.push_tracker_db_cloud_after_change)()},E=async a=>{let b=r[a]?.trim()??"";if(0===b.length)return void w("Enter a new tag name.");let c=n.find(b=>b.name===a);if(void 0===c)return;let d=n.find(a=>(0,h.format_display_tag)(a.name)===(0,h.format_display_tag)(b)),f=void 0!==d&&d.name!==a?c.entryCount+d.entryCount:c.entryCount;if(await m(k([a],b,f))){A(!0),w(null),y(null);try{await D({action:"rename",fromTag:a,toTag:b}),s(b=>{let c={...b};return delete c[a],c})}catch(a){w((0,e.message_from_unknown_error)(a,"Tag rename failed"))}finally{A(!1)}}},F=async()=>{let a=[...p];if(a.length<2)return void w("Select at least two tags to merge.");if(0===t.trim().length)return void w("Enter a target tag for the merge.");if(await m(k(a,t,C))){A(!0),w(null),y(null);try{await D({action:"merge",sourceTags:a,targetTag:t}),u("")}catch(a){w((0,e.message_from_unknown_error)(a,"Tag merge failed"))}finally{A(!1)}}};return(0,b.jsxs)(f.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,b.jsxs)("section",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Merge tags"}),(0,b.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,b.jsxs)("label",{className:"mt-3 flex flex-col gap-1 text-[0.82rem] text-muted",children:["Target tag",(0,b.jsx)(g.TagAutocompleteInput,{id:"merge-target-tag",value:t,known_tags:B,placeholder:"e.g. @project",disabled:z,on_change:u})]}),(0,b.jsxs)("button",{type:"button",className:`${(0,i.get_button_class_name)("primary","small")} mt-3`,disabled:z||p.size<2,onClick:()=>void F(),children:["Merge ",p.size," tags"]})]}),0===n.length?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"No tags yet. Add @tags when you check in to an entry."}):(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0","aria-label":"Tags",children:n.map(a=>(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-2.5 shadow-sm",children:(0,b.jsxs)("form",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",onSubmit:b=>{b.preventDefault(),E(a.name)},children:[(0,b.jsx)("input",{type:"checkbox",className:"shrink-0",checked:p.has(a.name),disabled:z,"aria-label":`Select ${(0,h.format_display_tag)(a.name)}`,onChange:()=>{var b;return b=a.name,void q(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})}}),(0,b.jsxs)("div",{className:"flex min-w-0 shrink-0 flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[(0,b.jsx)("span",{className:"font-semibold leading-tight",children:(0,h.format_display_tag)(a.name)}),(0,b.jsxs)("span",{className:"text-[0.82rem] text-muted",children:[a.entryCount," ",1===a.entryCount?"entry":"entries"]})]}),(0,b.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,b.jsx)("input",{className:(0,j.get_input_class_name)("compact"),value:r[a.name]??"",placeholder:"Rename to…","aria-label":`Rename ${(0,h.format_display_tag)(a.name)}`,disabled:z,onChange:b=>s(c=>({...c,[a.name]:b.target.value}))}),(0,b.jsx)("button",{type:"submit",className:`${(0,i.get_button_class_name)("ghost","small")} shrink-0`,disabled:z||(r[a.name]?.trim().length??0)===0,children:"Rename"})]})]})},a.name))}),null===x?null:(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-accent",children:x}),null===v?null:(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-danger",children:v})]})}],53372)}];
2
+
3
+ //# sourceMappingURL=_01m_4io._.js.map