super-time-tracker-ui 0.1.9 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/stt-ui.js +2 -1
- package/dist/standalone/next-output/BUILD_ID +1 -1
- package/dist/standalone/next-output/build-manifest.json +3 -3
- package/dist/standalone/next-output/server/app/_global-error.html +1 -1
- package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/_not-found.html +1 -1
- package/dist/standalone/next-output/server/app/_not-found.rsc +3 -3
- package/dist/standalone/next-output/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/dist/standalone/next-output/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/api/entry/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/entry/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/in/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/in/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/reporting.html +1 -1
- package/dist/standalone/next-output/server/app/reporting.rsc +5 -5
- package/dist/standalone/next-output/server/app/reporting.segments/_full.segment.rsc +5 -5
- package/dist/standalone/next-output/server/app/reporting.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/reporting.segments/_index.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/reporting.segments/_tree.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/reporting.segments/reporting/__PAGE__.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/reporting.segments/reporting.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/data.html +1 -1
- package/dist/standalone/next-output/server/app/settings/data.rsc +9 -9
- package/dist/standalone/next-output/server/app/settings/data.segments/_full.segment.rsc +9 -9
- package/dist/standalone/next-output/server/app/settings/data.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings/data.segments/_index.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/settings/data.segments/_tree.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/settings/data.segments/settings/data/__PAGE__.segment.rsc +6 -6
- package/dist/standalone/next-output/server/app/settings/data.segments/settings/data.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings/data.segments/settings.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/display.html +1 -1
- package/dist/standalone/next-output/server/app/settings/display.rsc +20 -20
- package/dist/standalone/next-output/server/app/settings/display.segments/_full.segment.rsc +20 -20
- package/dist/standalone/next-output/server/app/settings/display.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings/display.segments/_index.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/settings/display.segments/_tree.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/settings/display.segments/settings/display/__PAGE__.segment.rsc +17 -17
- package/dist/standalone/next-output/server/app/settings/display.segments/settings/display.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings/display.segments/settings.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/tags.html +1 -1
- package/dist/standalone/next-output/server/app/settings/tags.rsc +5 -5
- package/dist/standalone/next-output/server/app/settings/tags.segments/_full.segment.rsc +5 -5
- package/dist/standalone/next-output/server/app/settings/tags.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings/tags.segments/_index.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/settings/tags.segments/_tree.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/settings/tags.segments/settings/tags/__PAGE__.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/settings/tags.segments/settings/tags.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings/tags.segments/settings.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings.html +1 -1
- package/dist/standalone/next-output/server/app/settings.rsc +11 -11
- package/dist/standalone/next-output/server/app/settings.segments/_full.segment.rsc +11 -11
- package/dist/standalone/next-output/server/app/settings.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/settings.segments/_index.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/settings.segments/settings/__PAGE__.segment.rsc +8 -8
- package/dist/standalone/next-output/server/app/settings.segments/settings.segment.rsc +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0_vmm81._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0y8pcoc._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_0gz6nul._.js → _02-gx7.._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/_02_~c39._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0hg~x6b._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0ll5ibs._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_0wjdrek._.js → _0ui3u54._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/{_02pv8kk._.js → _0w8k735._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/{_0ct61hc._.js → _12t56ma._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/components_109-aj4._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +1 -1
- package/dist/standalone/next-output/server/middleware-build-manifest.js +3 -3
- package/dist/standalone/next-output/server/pages/404.html +1 -1
- package/dist/standalone/next-output/server/pages/500.html +1 -1
- package/dist/standalone/next-output/static/chunks/002_cxi.67d5i.js +1 -0
- package/dist/standalone/next-output/static/chunks/00gppo5nrk9ov.js +1 -0
- package/dist/standalone/next-output/static/chunks/04~lsgqjxciw_.js +1 -0
- package/dist/standalone/next-output/static/chunks/0e8tmpq~qz.dz.js +1 -0
- package/dist/standalone/next-output/static/chunks/0ewk7kj3yfts~.css +3 -0
- package/dist/standalone/next-output/static/chunks/0js9~7rlpndqf.js +1 -0
- package/dist/standalone/next-output/static/chunks/0ytd28-7d8.21.js +1 -0
- package/dist/standalone/next-output/static/chunks/14dlpcnjaw-zw.js +1 -0
- package/dist/standalone/package.json +1 -1
- package/package.json +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0d1w0cs._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0qmw9wb._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_07raa2f._.js +0 -3
- package/dist/standalone/next-output/static/chunks/0-4qto4zejzdf.js +0 -1
- package/dist/standalone/next-output/static/chunks/05zy2m..vwhne.js +0 -1
- package/dist/standalone/next-output/static/chunks/09__rtwky2ffd.js +0 -1
- package/dist/standalone/next-output/static/chunks/0c9knh~t~22o1.js +0 -1
- package/dist/standalone/next-output/static/chunks/0ev966.breqju.js +0 -1
- package/dist/standalone/next-output/static/chunks/0fx83q6t~ep.v.js +0 -1
- package/dist/standalone/next-output/static/chunks/0g2ra41_1p6y6.js +0 -1
- package/dist/standalone/next-output/static/chunks/0sqkcyb268i44.css +0 -3
- /package/dist/standalone/next-output/static/{nCFHHujcYM5EFaWSlUj2N → wHoiBM1uMbUIrfXkizlyC}/_buildManifest.js +0 -0
- /package/dist/standalone/next-output/static/{nCFHHujcYM5EFaWSlUj2N → wHoiBM1uMbUIrfXkizlyC}/_clientMiddlewareManifest.js +0 -0
- /package/dist/standalone/next-output/static/{nCFHHujcYM5EFaWSlUj2N → wHoiBM1uMbUIrfXkizlyC}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[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}])},7048,a=>{"use strict";let b=new Set,c="Settings saved";a.s(["SETTINGS_SAVED_DEFAULT_MESSAGE",0,c,"notify_settings_saved",0,function(a=c){},"subscribe_settings_saved",0,function(a){return b.add(a),()=>{b.delete(a)}}])},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/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:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},78823,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(7048);a.s(["SettingsSavedToast",0,function(){let[a,e]=(0,c.useState)(null);return((0,c.useEffect)(()=>{let a=null,b=(0,d.subscribe_settings_saved)(b=>{e(b),null!==a&&clearTimeout(a),a=setTimeout(()=>{e(null),a=null},2800)});return()=>{b(),null!==a&&clearTimeout(a)}},[]),null===a)?null:(0,b.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"pointer-events-none fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:a||d.SETTINGS_SAVED_DEFAULT_MESSAGE})}])},19702,a=>{"use strict";a.s(["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"])},
|
|
1
|
+
module.exports=[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}])},7048,a=>{"use strict";let b=new Set,c="Settings saved";a.s(["SETTINGS_SAVED_DEFAULT_MESSAGE",0,c,"notify_settings_saved",0,function(a=c){},"subscribe_settings_saved",0,function(a){return b.add(a),()=>{b.delete(a)}}])},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/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:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},78823,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(7048);a.s(["SettingsSavedToast",0,function(){let[a,e]=(0,c.useState)(null);return((0,c.useEffect)(()=>{let a=null,b=(0,d.subscribe_settings_saved)(b=>{e(b),null!==a&&clearTimeout(a),a=setTimeout(()=>{e(null),a=null},2800)});return()=>{b(),null!==a&&clearTimeout(a)}},[]),null===a)?null:(0,b.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"pointer-events-none fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:a||d.SETTINGS_SAVED_DEFAULT_MESSAGE})}])},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)())}])},19702,a=>{"use strict";a.s(["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"])},35822,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_STORAGE_KEY,default_value:c.CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["clear_tag_filters_on_sheet_change_preference",0,d])},40947,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CONFIRM_BEFORE_CHECKOUT_STORAGE_KEY,default_value:c.CONFIRM_BEFORE_CHECKOUT_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["confirm_before_checkout_preference",0,d])},32297,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CONFIRM_DESTRUCTIVE_ACTIONS_STORAGE_KEY,default_value:c.CONFIRM_DESTRUCTIVE_ACTIONS_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["confirm_destructive_actions_preference",0,d])},73271,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(35822),e=a.i(57077);a.s(["ClearTagFiltersOnSheetChangeSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.clear_tag_filters_on_sheet_change_preference.subscribe,d.clear_tag_filters_on_sheet_change_preference.get_snapshot,d.clear_tag_filters_on_sheet_change_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.clear_tag_filters_on_sheet_change_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:"Clear tag filters on sheet change"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Remove tag filters when you switch to another sheet."})]})]})}])},80587,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(40947),e=a.i(57077);a.s(["ConfirmBeforeCheckoutSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.confirm_before_checkout_preference.subscribe,d.confirm_before_checkout_preference.get_snapshot,d.confirm_before_checkout_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.confirm_before_checkout_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:"Confirm before checkout"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show a confirmation dialog when you stop the active timer."})]})]})}])},89365,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(32297),e=a.i(57077);a.s(["ConfirmDestructiveActionsSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.confirm_destructive_actions_preference.subscribe,d.confirm_destructive_actions_preference.get_snapshot,d.confirm_destructive_actions_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.confirm_destructive_actions_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:"Confirm destructive actions"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Ask before deleting entries or sheets. Turn off for fast mode."})]})]})}])},46914,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(69749),e=a.i(19702);function f(a){return"last_viewed"===a||"active_timer"===a||"fixed"===a?a:e.DEFAULT_SHEET_SESSION_MODE_DEFAULT}var g=a.i(7048);function h(a){let b=a.trim();if(0!==b.length){try{window.localStorage.setItem(e.DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY,b)}catch{}try{let a=encodeURIComponent(b);document.cookie=`${e.DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME}=${a}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}let i=[{value:"last_viewed",label:"Last viewed",description:"Open the sheet you were viewing when you last used the tracker."},{value:"active_timer",label:"Sheet with active timer",description:"Open the sheet that has a running timer, when one exists."},{value:"fixed",label:"Specific sheet",description:"Always open a chosen sheet when you start a new session."}];a.s(["DefaultSheetSessionSetting",0,function({sheet_names:a}){let[j,k]=(0,c.useState)("last_viewed"),[l,m]=(0,c.useState)("");return(0,c.useEffect)(()=>{k(function(){try{let a=window.localStorage.getItem(e.DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY);return f(a)}catch{return f(null)}}());let b=function(){try{let a=window.localStorage.getItem(e.DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY)?.trim()??"";return a.length>0?a:null}catch{return null}}(),c=a[0]??"";m(b??c)},[a]),(0,b.jsxs)("fieldset",{className:"m-0 flex w-full flex-col gap-3 border-0 p-0",children:[(0,b.jsx)("legend",{className:"mb-2 text-[0.95rem] font-semibold",children:"Default sheet on new session"}),(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:i.map(a=>(0,b.jsx)("li",{children:(0,b.jsxs)("label",{className:"flex w-full cursor-pointer items-start gap-2.5",children:[(0,b.jsx)("input",{type:"radio",name:"default-sheet-session-mode",className:"mt-0.5 shrink-0",checked:j===a.value,onChange:()=>(a=>{k(a);try{window.localStorage.setItem(e.DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY,a)}catch{}try{document.cookie=`${e.DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME}=${a}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}"fixed"===a&&l.length>0&&h(l),(0,g.notify_settings_saved)()})(a.value)}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.9rem] font-semibold",children:a.label}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:a.description})]})]})},a.value))}),"fixed"===j?(0,b.jsxs)("label",{className:"flex flex-col gap-1 text-[0.82rem] text-muted",children:["Sheet",(0,b.jsx)("select",{className:(0,d.get_input_class_name)("compact"),value:l,disabled:0===a.length,onChange:a=>{var b;m(b=a.target.value),h(b),(0,g.notify_settings_saved)()},children:a.map(a=>(0,b.jsx)("option",{value:a,children:a},a))})]}):null]})}],46914)}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_0ui3u54._.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/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:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},
|
|
1
|
+
module.exports=[7048,a=>{"use strict";let b=new Set,c="Settings saved";a.s(["SETTINGS_SAVED_DEFAULT_MESSAGE",0,c,"notify_settings_saved",0,function(a=c){},"subscribe_settings_saved",0,function(a){return b.add(a),()=>{b.delete(a)}}])},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/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:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},78823,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(7048);a.s(["SettingsSavedToast",0,function(){let[a,e]=(0,c.useState)(null);return((0,c.useEffect)(()=>{let a=null,b=(0,d.subscribe_settings_saved)(b=>{e(b),null!==a&&clearTimeout(a),a=setTimeout(()=>{e(null),a=null},2800)});return()=>{b(),null!==a&&clearTimeout(a)}},[]),null===a)?null:(0,b.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"pointer-events-none fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:a||d.SETTINGS_SAVED_DEFAULT_MESSAGE})}])},19325,a=>{"use strict";var b=a.i(39752),c=a.i(82508),d=a.i(34542),e=a.i(53030),f=a.i(89969);a.s(["BackupRestoreSetting",0,function({db_path:a}){let g=(0,c.useRouter)(),{confirm:h}=(0,e.use_confirm_dialog)(),i=(0,d.useRef)(null),[j,k]=(0,d.useState)(null),[l,m]=(0,d.useState)(null),[n,o]=(0,d.useState)(!1),[p,q]=(0,d.useState)(!1),r=async()=>{o(!0),k(null),m(null);try{let a=await fetch("/api/backup");if(!a.ok){let b=await a.json();throw Error(b.error??"Download failed")}let b=await a.blob(),c=URL.createObjectURL(b),d=document.createElement("a");d.href=c,d.download="db.json",d.click(),URL.revokeObjectURL(c),m("Backup downloaded.")}catch(a){k(a instanceof Error?a.message:String(a))}finally{o(!1)}},s=async a=>{let b=a.target.files?.[0];if((a.target.value="",void 0!==b)&&await h({title:"Restore backup?",message:"This will replace your current time tracker data with the uploaded backup file. This cannot be undone.",confirmLabel:"Restore",variant:"danger"})){q(!0),k(null),m(null);try{let a,c=await b.text();try{a=JSON.parse(c)}catch{throw Error("Invalid backup file: file is not valid JSON.")}let d=await fetch("/api/backup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!d.ok){let a=await d.json();throw Error(a.error??"Restore failed")}m("Backup restored. Opening tracker…"),g.push("/"),g.refresh()}catch(a){k(a instanceof Error?a.message:String(a))}finally{q(!1)}}},t=n||p;return(0,b.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Backup and restore"}),(0,b.jsx)("p",{className:"m-0 text-[0.8rem] leading-snug text-muted",children:"Download a copy of your database or replace it with a previously saved backup file."})]}),(0,b.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-mono text-[0.65rem] leading-snug text-muted",title:a,children:a}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("ghost","small"),disabled:t,onClick:()=>void r(),children:n?"Downloading…":"Download backup"}),(0,b.jsx)("button",{type:"button",className:(0,f.get_button_class_name)("danger","small"),disabled:t,onClick:()=>{i.current?.click()},children:p?"Restoring…":"Restore from file"}),(0,b.jsx)("input",{ref:i,type:"file",accept:"application/json,.json",className:"hidden",onChange:a=>void s(a)})]}),null!==l?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:l}):null,null!==j?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:j}):null]})}],19325)}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_0w8k735._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[7048,a=>{"use strict";let b=new Set,c="Settings saved";a.s(["SETTINGS_SAVED_DEFAULT_MESSAGE",0,c,"notify_settings_saved",0,function(a=c){},"subscribe_settings_saved",0,function(a){return b.add(a),()=>{b.delete(a)}}])},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/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:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},78823,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(7048);a.s(["SettingsSavedToast",0,function(){let[a,e]=(0,c.useState)(null);return((0,c.useEffect)(()=>{let a=null,b=(0,d.subscribe_settings_saved)(b=>{e(b),null!==a&&clearTimeout(a),a=setTimeout(()=>{e(null),a=null},2800)});return()=>{b(),null!==a&&clearTimeout(a)}},[]),null===a)?null:(0,b.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"pointer-events-none fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:a||d.SETTINGS_SAVED_DEFAULT_MESSAGE})}])},
|
|
1
|
+
module.exports=[7048,a=>{"use strict";let b=new Set,c="Settings saved";a.s(["SETTINGS_SAVED_DEFAULT_MESSAGE",0,c,"notify_settings_saved",0,function(a=c){},"subscribe_settings_saved",0,function(a){return b.add(a),()=>{b.delete(a)}}])},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/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:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},78823,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(7048);a.s(["SettingsSavedToast",0,function(){let[a,e]=(0,c.useState)(null);return((0,c.useEffect)(()=>{let a=null,b=(0,d.subscribe_settings_saved)(b=>{e(b),null!==a&&clearTimeout(a),a=setTimeout(()=>{e(null),a=null},2800)});return()=>{b(),null!==a&&clearTimeout(a)}},[]),null===a)?null:(0,b.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"pointer-events-none fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:a||d.SETTINGS_SAVED_DEFAULT_MESSAGE})}])},24047,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DURATION_FORMAT_STORAGE_KEY,default_value:c.DURATION_FORMAT_DEFAULT,is_valid:a=>"humanized"===a||"clock"===a||"decimal"===a});a.s(["duration_format_preference",0,d])},50824,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DEFAULT_REPORTING_RANGE_STORAGE_KEY,default_value:c.DEFAULT_REPORTING_RANGE_DEFAULT,is_valid:a=>"none"===a||"today"===a||"week"===a});a.s(["default_reporting_range_preference",0,d])},13532,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DEFAULT_REPORTING_SORT_STORAGE_KEY,default_value:c.DEFAULT_REPORTING_SORT_DEFAULT,is_valid:a=>"duration"===a||"name"===a||"entry_count"===a||"active_first"===a});a.s(["default_reporting_sort_preference",0,d])},82474,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.WEEK_STARTS_ON_STORAGE_KEY,default_value:c.WEEK_STARTS_ON_DEFAULT,is_valid:a=>"monday"===a||"sunday"===a});a.s(["week_starts_on_preference",0,d])},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)())}])},19702,a=>{"use strict";a.s(["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"])},14244,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CHECK_IN_FORM_COLLAPSED_STORAGE_KEY,default_value:c.CHECK_IN_FORM_COLLAPSED_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["check_in_form_collapsed_preference",0,d])},79918,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.ENTRY_LIST_SORT_STORAGE_KEY,default_value:c.ENTRY_LIST_SORT_DEFAULT,is_valid:a=>"newest"===a||"oldest"===a||"duration"===a||"description"===a});a.s(["entry_list_sort_preference",0,d])},14945,a=>{"use strict";a.s(["get_entry_list_sort_options",0,function(){return[{value:"newest",label:"Newest"},{value:"oldest",label:"Oldest"},{value:"duration",label:"Duration"},{value:"description",label:"Description"}]}])},78702,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.TAG_FILTER_MODE_STORAGE_KEY,default_value:c.TAG_FILTER_MODE_DEFAULT,is_valid:a=>"all"===a||"any"===a});a.s(["tag_filter_mode_preference",0,d])},50825,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.TIME_FORMAT_STORAGE_KEY,default_value:c.TIME_FORMAT_DEFAULT,is_valid:a=>"12h"===a||"24h"===a});a.s(["time_format_preference",0,d])},6128,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.TIMER_IN_TITLE_STORAGE_KEY,default_value:c.TIMER_IN_TITLE_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["timer_in_title_preference",0,d])},99751,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.TIMER_SHOW_SECONDS_STORAGE_KEY,default_value:c.TIMER_SHOW_SECONDS_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["timer_show_seconds_preference",0,d])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_12t56ma._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[27623,a=>{"use strict";var b=a.i(39752);a.s(["SettingRadioGroup",0,function({name:a,legend:c,description:d,value:e,options:f,disabled:g=!1,on_change:h}){return(0,b.jsxs)("fieldset",{className:"m-0 border-0 p-0",children:[(0,b.jsx)("legend",{className:"m-0 mb-1 text-[0.95rem] font-semibold",children:c}),void 0!==d?(0,b.jsx)("p",{className:"m-0 mb-2 text-[0.8rem] leading-snug text-muted",children:d}):null,(0,b.jsx)("div",{className:"flex flex-col gap-1.5",children:f.map(c=>{let d=c.value===e;return(0,b.jsxs)("label",{className:`flex cursor-pointer items-start gap-2 rounded-md border px-2.5 py-2 transition-colors duration-150 ${d?"border-accent-border bg-accent-soft":"border-panel-border hover:bg-surface-hover"}`,children:[(0,b.jsx)("input",{type:"radio",className:"mt-1 shrink-0",name:a,value:c.value,checked:d,disabled:g,onChange:()=>h(c.value)}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.9rem] font-semibold",children:c.label}),void 0!==c.description?(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:c.description}):null]})]},c.value)})})]})}])},52218,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(7048),f=a.i(52345),g=a.i(70827);let h=new Set(g.COLOR_PALETTE_VALUES),i=(0,f.create_ui_preference_store)({storage_key:g.COLOR_PALETTE_STORAGE_KEY,default_value:g.COLOR_PALETTE_DEFAULT,is_valid:a=>h.has(a)}),j=[{value:"default",label:"Default",description:"Balanced blue-gray surfaces for light and dark."},{value:"midnight",label:"Midnight",description:"Cooler, deeper backgrounds with crisp panels."},{value:"warm",label:"Warm",description:"Stone and sepia tones, easy on the eyes."},{value:"ocean",label:"Ocean",description:"Soft blue-tinted surfaces and shadows."},{value:"forest",label:"Forest",description:"Muted green-gray backgrounds."},{value:"contrast",label:"High contrast",description:"Stronger text and border contrast for readability."}];a.s(["ColorPaletteSetting",0,function(){let a=(0,c.useSyncExternalStore)(i.subscribe,i.get_snapshot,i.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"color-palette",legend:"Color palette",description:"Backgrounds, surfaces, and highlight colors for light and dark mode.",value:a,options:j,on_change:b=>{b!==a&&(i.write(b),"u">typeof document&&document.documentElement.setAttribute("data-palette",b),i.notify(),(0,e.notify_settings_saved)())}})}],52218)},86410,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(14244),e=a.i(57077);a.s(["CheckInFormCollapsedSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.check_in_form_collapsed_preference.subscribe,d.check_in_form_collapsed_preference.get_snapshot,d.check_in_form_collapsed_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.check_in_form_collapsed_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:"Collapse check-in form"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show a single “Check in” button until clicked, instead of the full form."})]})]})}])},72541,a=>{"use strict";var b=a.i(39752),c=a.i(34542);function d(){return!("u"<typeof document)&&"true"===document.documentElement.getAttribute("data-compact-lists")}function e(){return!1}var f=a.i(7048);let g=new Set;function h(a){return g.add(a),()=>{g.delete(a)}}var i=a.i(19702);a.s(["CompactListsSetting",0,function(){let a=(0,c.useSyncExternalStore)(h,d,e);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:a,onChange:a=>{var b=a.target.checked;document.documentElement.setAttribute("data-compact-lists",b?"true":"false");try{window.localStorage.setItem(i.COMPACT_LISTS_STORAGE_KEY,b?"true":"false")}catch{}g.forEach(a=>{a()}),(0,f.notify_settings_saved)()}}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Compact lists"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Flatter, tighter rows in the sheet entry list"})]})]})}],72541)},20422,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(50824),f=a.i(57077);let g=[{value:"none",label:"All time",description:"Open with no date filter applied."},{value:"today",label:"Today",description:"Pre-select today’s date range."},{value:"week",label:"This week",description:"Pre-select the current week (respects week starts on)."}],h=a=>{(0,f.persist_ui_preference)(e.default_reporting_range_preference,a)};a.s(["DefaultReportingRangeSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.default_reporting_range_preference.subscribe,e.default_reporting_range_preference.get_snapshot,e.default_reporting_range_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"default-reporting-range",legend:"Default reporting range",description:"Date filter applied when you open the Reporting page.",value:a,options:g,on_change:h})}])},59385,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(13532),f=a.i(57077);let g=[{value:"duration",label:"Duration"},{value:"name",label:"Name"},{value:"entry_count",label:"Entries"},{value:"active_first",label:"Active first"}],h=a=>{(0,f.persist_ui_preference)(e.default_reporting_sort_preference,a)};a.s(["DefaultReportingSortSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.default_reporting_sort_preference.subscribe,e.default_reporting_sort_preference.get_snapshot,e.default_reporting_sort_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"default-reporting-sort",legend:"Default reporting sort",description:"The Reporting view opens with this sort selected.",value:a,options:g,on_change:h})}])},56075,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(24047),f=a.i(57077);let g=[{value:"humanized",label:"Humanized",description:"e.g. 1 hour 25 minutes"},{value:"clock",label:"Clock",description:"e.g. 01:25:00"},{value:"decimal",label:"Decimal hours",description:"e.g. 1.42h"}],h=a=>{(0,f.persist_ui_preference)(e.duration_format_preference,a)};a.s(["DurationFormatSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.duration_format_preference.subscribe,e.duration_format_preference.get_snapshot,e.duration_format_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"duration-format",legend:"Duration format",description:"Applies to entry durations, reporting totals, and the active timer.",value:a,options:g,on_change:h})}])},6403,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(79918),f=a.i(57077);let g=[{value:"newest",label:"Newest first"},{value:"oldest",label:"Oldest first"},{value:"duration",label:"Longest duration"},{value:"description",label:"Description (A–Z)"}],h=a=>{(0,f.persist_ui_preference)(e.entry_list_sort_preference,a)};a.s(["EntryListSortSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.entry_list_sort_preference.subscribe,e.entry_list_sort_preference.get_snapshot,e.entry_list_sort_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"entry-list-sort",legend:"Entry list sort",description:"How entries are ordered on the active sheet.",value:a,options:g,on_change:h})}])},76408,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(78702),f=a.i(57077);let g=[{value:"all",label:"Match all tags",description:"Entry must include every selected tag."},{value:"any",label:"Match any tag",description:"Entry can include any one of the selected tags."}],h=a=>{(0,f.persist_ui_preference)(e.tag_filter_mode_preference,a)};a.s(["TagFilterModeSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.tag_filter_mode_preference.subscribe,e.tag_filter_mode_preference.get_snapshot,e.tag_filter_mode_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"tag-filter-mode",legend:"Tag filter mode",description:"How entries match when multiple tags are selected on a sheet.",value:a,options:g,on_change:h})}])},53903,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(29698),f=a.i(7048),g=a.i(81764),h=a.i(44103),i=a.i(34569);let j=[{value:"light",label:"Light",description:"Always use the light theme."},{value:"dark",label:"Dark",description:"Always use the dark theme."},{value:"system",label:"System",description:"Match the operating system preference."}];a.s(["ThemeModeSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.theme_mode_preference.subscribe,e.theme_mode_preference.get_snapshot,e.theme_mode_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"theme-mode",legend:"Light / dark mode",description:"Choose light, dark, or match the system. The topbar toggle flips light and dark.",value:a,options:j,on_change:a=>{let b;e.theme_mode_preference.write(a),e.theme_mode_preference.notify(),b="light"===a||"dark"===a?a:"dark",(0,g.apply_theme)(b),(0,i.write_stored_theme)(b),(0,h.notify_theme_subscribers)(),(0,f.notify_settings_saved)()}})}],53903)},45879,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(50825),f=a.i(57077);let g=[{value:"12h",label:"12-hour",description:"e.g. 6:34 PM"},{value:"24h",label:"24-hour",description:"e.g. 18:34"}],h=a=>{(0,f.persist_ui_preference)(e.time_format_preference,a)};a.s(["TimeFormatSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.time_format_preference.subscribe,e.time_format_preference.get_snapshot,e.time_format_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"time-format",legend:"Time format",description:"Used for entry start/end times and notes timestamps.",value:a,options:g,on_change:h})}])},82349,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(6128),e=a.i(57077);a.s(["TimerInTitleSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.timer_in_title_preference.subscribe,d.timer_in_title_preference.get_snapshot,d.timer_in_title_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.timer_in_title_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:"Timer in tab title"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show elapsed time in the browser tab while a timer is running."})]})]})}])},82306,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(99751),e=a.i(57077);a.s(["TimerShowSecondsSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.timer_show_seconds_preference.subscribe,d.timer_show_seconds_preference.get_snapshot,d.timer_show_seconds_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.timer_show_seconds_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:"Show seconds on timer"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Include seconds on the live active timer (humanized duration format)."})]})]})}])},96458,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(82474),f=a.i(57077);let g=[{value:"monday",label:"Monday",description:"ISO 8601 week (default)."},{value:"sunday",label:"Sunday",description:"US-style week."}],h=a=>{(0,f.persist_ui_preference)(e.week_starts_on_preference,a)};a.s(["WeekStartsOnSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.week_starts_on_preference.subscribe,e.week_starts_on_preference.get_snapshot,e.week_starts_on_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"week-starts-on",legend:"Week starts on",description:'Used for the "this week" reporting shortcuts and totals.',value:a,options:g,on_change:h})}])}];
|
|
1
|
+
module.exports=[27623,a=>{"use strict";var b=a.i(39752);a.s(["SettingRadioGroup",0,function({name:a,legend:c,description:d,value:e,options:f,disabled:g=!1,on_change:h}){return(0,b.jsxs)("fieldset",{className:"m-0 border-0 p-0",children:[(0,b.jsx)("legend",{className:"m-0 mb-1 text-[0.95rem] font-semibold",children:c}),void 0!==d?(0,b.jsx)("p",{className:"m-0 mb-2 text-[0.8rem] leading-snug text-muted",children:d}):null,(0,b.jsx)("div",{className:"flex flex-col gap-1.5",children:f.map(c=>{let d=c.value===e;return(0,b.jsxs)("label",{className:`flex cursor-pointer items-start gap-2 rounded-md border px-2.5 py-2 transition-colors duration-150 ${d?"border-accent-border bg-accent-soft":"border-panel-border hover:bg-surface-hover"}`,children:[(0,b.jsx)("input",{type:"radio",className:"mt-1 shrink-0",name:a,value:c.value,checked:d,disabled:g,onChange:()=>h(c.value)}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.9rem] font-semibold",children:c.label}),void 0!==c.description?(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:c.description}):null]})]},c.value)})})]})}])},52218,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(7048),f=a.i(52345),g=a.i(70827);let h=new Set(g.COLOR_PALETTE_VALUES),i=(0,f.create_ui_preference_store)({storage_key:g.COLOR_PALETTE_STORAGE_KEY,default_value:g.COLOR_PALETTE_DEFAULT,is_valid:a=>h.has(a)}),j=[{value:"default",label:"Default",description:"Balanced blue-gray surfaces for light and dark."},{value:"midnight",label:"Midnight",description:"Cooler, deeper backgrounds with crisp panels."},{value:"warm",label:"Warm",description:"Stone and sepia tones, easy on the eyes."},{value:"ocean",label:"Ocean",description:"Soft blue-tinted surfaces and shadows."},{value:"forest",label:"Forest",description:"Muted green-gray backgrounds."},{value:"contrast",label:"High contrast",description:"Stronger text and border contrast for readability."}];a.s(["ColorPaletteSetting",0,function(){let a=(0,c.useSyncExternalStore)(i.subscribe,i.get_snapshot,i.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"color-palette",legend:"Color palette",description:"Backgrounds, surfaces, and highlight colors for light and dark mode.",value:a,options:j,on_change:b=>{b!==a&&(i.write(b),"u">typeof document&&document.documentElement.setAttribute("data-palette",b),i.notify(),(0,e.notify_settings_saved)())}})}],52218)},86410,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(14244),e=a.i(57077);a.s(["CheckInFormCollapsedSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.check_in_form_collapsed_preference.subscribe,d.check_in_form_collapsed_preference.get_snapshot,d.check_in_form_collapsed_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.check_in_form_collapsed_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:"Collapse check-in form"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show a single “Check in” button until clicked, instead of the full form."})]})]})}])},72541,a=>{"use strict";var b=a.i(39752),c=a.i(34542);function d(){return!("u"<typeof document)&&"true"===document.documentElement.getAttribute("data-compact-lists")}function e(){return!1}var f=a.i(7048);let g=new Set;function h(a){return g.add(a),()=>{g.delete(a)}}var i=a.i(19702);a.s(["CompactListsSetting",0,function(){let a=(0,c.useSyncExternalStore)(h,d,e);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:a,onChange:a=>{var b=a.target.checked;document.documentElement.setAttribute("data-compact-lists",b?"true":"false");try{window.localStorage.setItem(i.COMPACT_LISTS_STORAGE_KEY,b?"true":"false")}catch{}g.forEach(a=>{a()}),(0,f.notify_settings_saved)()}}),(0,b.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Compact lists"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Flatter, tighter rows in the sheet entry list"})]})]})}],72541)},20422,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(50824),f=a.i(57077);let g=[{value:"none",label:"All time",description:"Open with no date filter applied."},{value:"today",label:"Today",description:"Pre-select today’s date range."},{value:"week",label:"This week",description:"Pre-select the current week (respects week starts on)."}],h=a=>{(0,f.persist_ui_preference)(e.default_reporting_range_preference,a)};a.s(["DefaultReportingRangeSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.default_reporting_range_preference.subscribe,e.default_reporting_range_preference.get_snapshot,e.default_reporting_range_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"default-reporting-range",legend:"Default reporting range",description:"Date filter applied when you open the Reporting page.",value:a,options:g,on_change:h})}])},59385,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(13532),f=a.i(57077);let g=[{value:"duration",label:"Duration"},{value:"name",label:"Name"},{value:"entry_count",label:"Entries"},{value:"active_first",label:"Active first"}],h=a=>{(0,f.persist_ui_preference)(e.default_reporting_sort_preference,a)};a.s(["DefaultReportingSortSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.default_reporting_sort_preference.subscribe,e.default_reporting_sort_preference.get_snapshot,e.default_reporting_sort_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"default-reporting-sort",legend:"Default reporting sort",description:"The Reporting view opens with this sort selected.",value:a,options:g,on_change:h})}])},56075,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(24047),f=a.i(57077);let g=[{value:"humanized",label:"Humanized",description:"e.g. 1 hour 25 minutes"},{value:"clock",label:"Clock",description:"e.g. 01:25:00"},{value:"decimal",label:"Decimal hours",description:"e.g. 1.42h"}],h=a=>{(0,f.persist_ui_preference)(e.duration_format_preference,a)};a.s(["DurationFormatSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.duration_format_preference.subscribe,e.duration_format_preference.get_snapshot,e.duration_format_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"duration-format",legend:"Duration format",description:"Applies to entry durations, reporting totals, and the active timer.",value:a,options:g,on_change:h})}])},6403,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(79918),f=a.i(57077);let g=(0,a.i(14945).get_entry_list_sort_options)().map(a=>({value:a.value,label:"newest"===a.value?"Newest first":"oldest"===a.value?"Oldest first":"duration"===a.value?"Longest duration":"Description (A–Z)"})),h=a=>{(0,f.persist_ui_preference)(e.entry_list_sort_preference,a)};a.s(["EntryListSortSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.entry_list_sort_preference.subscribe,e.entry_list_sort_preference.get_snapshot,e.entry_list_sort_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"entry-list-sort",legend:"Entry list sort",description:"How entries are ordered on the active sheet.",value:a,options:g,on_change:h})}])},76408,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(78702),f=a.i(57077);let g=[{value:"all",label:"Match all tags",description:"Entry must include every selected tag."},{value:"any",label:"Match any tag",description:"Entry can include any one of the selected tags."}],h=a=>{(0,f.persist_ui_preference)(e.tag_filter_mode_preference,a)};a.s(["TagFilterModeSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.tag_filter_mode_preference.subscribe,e.tag_filter_mode_preference.get_snapshot,e.tag_filter_mode_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"tag-filter-mode",legend:"Tag filter mode",description:"How entries match when multiple tags are selected on a sheet.",value:a,options:g,on_change:h})}])},53903,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(29698),f=a.i(7048),g=a.i(81764),h=a.i(44103),i=a.i(34569);let j=[{value:"light",label:"Light",description:"Always use the light theme."},{value:"dark",label:"Dark",description:"Always use the dark theme."},{value:"system",label:"System",description:"Match the operating system preference."}];a.s(["ThemeModeSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.theme_mode_preference.subscribe,e.theme_mode_preference.get_snapshot,e.theme_mode_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"theme-mode",legend:"Light / dark mode",description:"Choose light, dark, or match the system. The topbar toggle flips light and dark.",value:a,options:j,on_change:a=>{let b;e.theme_mode_preference.write(a),e.theme_mode_preference.notify(),b="light"===a||"dark"===a?a:"dark",(0,g.apply_theme)(b),(0,i.write_stored_theme)(b),(0,h.notify_theme_subscribers)(),(0,f.notify_settings_saved)()}})}],53903)},45879,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(50825),f=a.i(57077);let g=[{value:"12h",label:"12-hour",description:"e.g. 6:34 PM"},{value:"24h",label:"24-hour",description:"e.g. 18:34"}],h=a=>{(0,f.persist_ui_preference)(e.time_format_preference,a)};a.s(["TimeFormatSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.time_format_preference.subscribe,e.time_format_preference.get_snapshot,e.time_format_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"time-format",legend:"Time format",description:"Used for entry start/end times and notes timestamps.",value:a,options:g,on_change:h})}])},82349,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(6128),e=a.i(57077);a.s(["TimerInTitleSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.timer_in_title_preference.subscribe,d.timer_in_title_preference.get_snapshot,d.timer_in_title_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.timer_in_title_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:"Timer in tab title"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show elapsed time in the browser tab while a timer is running."})]})]})}])},82306,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(99751),e=a.i(57077);a.s(["TimerShowSecondsSetting",0,function(){let a=(0,c.useSyncExternalStore)(d.timer_show_seconds_preference.subscribe,d.timer_show_seconds_preference.get_snapshot,d.timer_show_seconds_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.timer_show_seconds_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:"Show seconds on timer"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Include seconds on the live active timer (humanized duration format)."})]})]})}])},96458,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(27623),e=a.i(82474),f=a.i(57077);let g=[{value:"monday",label:"Monday",description:"ISO 8601 week (default)."},{value:"sunday",label:"Sunday",description:"US-style week."}],h=a=>{(0,f.persist_ui_preference)(e.week_starts_on_preference,a)};a.s(["WeekStartsOnSetting",0,function(){let a=(0,c.useSyncExternalStore)(e.week_starts_on_preference.subscribe,e.week_starts_on_preference.get_snapshot,e.week_starts_on_preference.get_server_snapshot);return(0,b.jsx)(d.SettingRadioGroup,{name:"week-starts-on",legend:"Week starts on",description:'Used for the "this week" reporting shortcuts and totals.',value:a,options:g,on_change:h})}])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=components_109-aj4._.js.map
|
package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[12584,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(30354),e=a.i(89969),f=a.i(69749);function g({known_tags:a,on_submit:h,is_pending:i}){let[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)("");return(0,b.jsxs)("form",{className:"flex flex-col gap-2 rounded-lg border border-panel-border bg-panel p-[1.1rem] shadow-sm",onSubmit:a=>{a.preventDefault();let b=j.trim();if(0===b.length)return;let c=l.trim();h({description:b,...c.length>0?{at:c}:{}}),k(""),m("")},children:[(0,b.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-description",children:"What are you working on?"}),(0,b.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,b.jsx)(d.TagAutocompleteInput,{id:"check-in-description",value:j,known_tags:a,placeholder:"e.g. crafting something @design",disabled:i,autoFocus:!0,on_change:k}),(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("primary"),disabled:i||0===j.trim().length,children:"Check in"})]}),(0,b.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-at",children:["Start time"," ",(0,b.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,b.jsx)("input",{id:"check-in-at",className:(0,f.get_input_class_name)(),value:l,onChange:a=>m(a.target.value),placeholder:"e.g. 30 minutes ago",disabled:i})]})}var h=a.i(14244);let i=(0,c.forwardRef)(function({known_tags:a,is_pending:d,on_submit:f},i){let j="true"===(0,c.useSyncExternalStore)(h.check_in_form_collapsed_preference.subscribe,h.check_in_form_collapsed_preference.get_snapshot,h.check_in_form_collapsed_preference.get_server_snapshot),[k,l]=(0,c.useState)(!j);return((0,c.useImperativeHandle)(i,()=>({expand_and_focus:()=>{l(!0),window.requestAnimationFrame(()=>{let a=document.getElementById("check-in-description");a instanceof HTMLElement&&a.focus()})}}),[]),j&&!k)?(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("primary")} self-start`,disabled:d,onClick:()=>l(!0),children:"Check in"}):(0,b.jsx)(g,{known_tags:a,is_pending:d,on_submit:a=>{f(a),j&&l(!1)}})});var j=a.i(7386);function k(a,b,c){if(0===a.length)return null;let d=a.findIndex(a=>a.name===b),e=((-1===d?0:d)+("next"===c?1:-1)+a.length)%a.length;return a[e]?.name??null}var l=a.i(85928),m=a.i(53030),n=a.i(40947);function o(a){let{confirm:b}=(0,m.use_confirm_dialog)(),d="true"===(0,c.useSyncExternalStore)(n.confirm_before_checkout_preference.subscribe,n.confirm_before_checkout_preference.get_snapshot,n.confirm_before_checkout_preference.get_server_snapshot);return(0,c.useCallback)(async c=>{if(d){let a;if(!await b({title:"Check out?",message:(a=c?.trim()??"").length>0?`Stop the timer and check out at "${a}"?`:"Stop the active timer and save this entry?",confirmLabel:"Check out",variant:"danger"}))return}a(c)},[b,d,a])}var p=a.i(89184);function q({sheets:a,active_sheet_name:d,active_entry:e,is_pending:f,check_in_form_ref:g,active_entry_panel_ref:h,on_select_sheet:i,on_check_out:m}){let[n,r]=(0,c.useState)(!1),s=o(m),t=(0,c.useMemo)(()=>{let b=null!==e;return[{id:"help",label:"?",description:"Show keyboard shortcuts",key:"?",modifiers:["shift"],action:()=>{r(a=>!a)}},{id:"check-in",label:"C",description:"Check in (focus description)",key:"c",is_available:()=>!f&&!b,action:()=>{g.current?.expand_and_focus()}},{id:"check-out",label:"O",description:"Check out",key:"o",is_available:()=>!f&&b,action:()=>{s()}},{id:"edit-entry",label:"E",description:"Edit active entry",key:"e",is_available:()=>!f&&b,action:()=>{h.current?.start_edit()}},{id:"add-note",label:"N",description:"Add note to active entry",key:"n",is_available:()=>!f&&b,action:()=>{h.current?.start_add_note()}},{id:"previous-sheet",label:"[",description:"Previous sheet",key:"[",is_available:()=>!f&&a.length>1,action:()=>{let b=k(a,d,"previous");null!==b&&b!==d&&i(b)}},{id:"next-sheet",label:"]",description:"Next sheet",key:"]",is_available:()=>!f&&a.length>1,action:()=>{let b=k(a,d,"next");null!==b&&b!==d&&i(b)}}]},[e,h,d,g,s,f,i,a]);return((0,p.use_document_keyboard_shortcuts)(t),n)?(0,b.jsx)(j.KeyboardShortcutsDialog,{sections:(0,l.get_tracker_keyboard_shortcut_sections)(),on_close:()=>r(!1)}):null}var r=a.i(48174);function s(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}`}function t(a){let b=[],c=new Set;for(let d of({})[a]??[])try{let a=s(d);c.has(a)||(c.add(a),b.push(a))}catch{continue}return b}let u=[],v=null;function w(a){var b=t(a);let c=b.join("\0");if(null!==v&&v.sheet_name===a&&v.tags_key===c)return v.snapshot;let d=0===b.length?u:Object.freeze([...b]);return v={sheet_name:a,tags_key:c,snapshot:d},d}function x(){return u}let y=new Set;function z(a){return y.add(a),()=>{y.delete(a)}}var A=a.i(19702);function B(a,b){let c={};0===b.length?delete c[a]:c[a]=b;try{window.localStorage.setItem(A.SHEET_TAG_FILTERS_STORAGE_KEY,JSON.stringify(c))}catch{}v=null,y.forEach(a=>{a()})}function C(a,b){try{return s(a)===s(b)}catch{return!1}}var D=a.i(78702);function E(){return(0,c.useSyncExternalStore)(D.tag_filter_mode_preference.subscribe,D.tag_filter_mode_preference.get_snapshot,D.tag_filter_mode_preference.get_server_snapshot)}function F({sheet_name:a,sheet_tags:d}){let f=E(),g=(0,c.useSyncExternalStore)(z,()=>w(a),x);if((0,c.useEffect)(()=>{!function(a,b){let c=t(a);if(0===c.length)return;let d=c.filter(a=>b.some(b=>C(a,b)));d.length!==c.length&&B(a,d)}(a,d.map(a=>a.name))},[a,d]),0===d.length)return null;let h=g.length>0;return(0,b.jsxs)("fieldset",{className:"m-0 rounded-lg border border-panel-border bg-panel p-3.5 shadow-sm compact:p-3",children:[(0,b.jsx)("legend",{className:"px-0.5 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Filter by tag"}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,b.jsx)("p",{className:"m-0 shrink-0 text-[0.8rem] leading-snug text-muted",children:"any"===f?"Show entries that include any selected tag.":"Show entries that include every selected tag."}),(0,b.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap justify-end gap-1.5",role:"group","aria-label":"Filter by tag",children:d.map(c=>{let d=g.some(a=>C(a,c.name));return(0,b.jsxs)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost","small")} ${d?"border-accent-border bg-accent-soft text-foreground":""}`,"aria-pressed":d,onClick:()=>{let b,d;return b=s(c.name),void((d=t(a)).some(a=>C(a,b))?B(a,d.filter(a=>!C(a,b))):B(a,[...d,b]))},children:[(0,r.format_display_tag)(c.name),(0,b.jsxs)("span",{className:"ml-1 font-normal text-muted",children:["(",c.entryCount,")"]})]},c.name)})})]}),h?(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost","small")} mt-2.5`,onClick:()=>B(a,[]),children:"Clear filter"}):null]})}let G="inline-flex shrink-0 cursor-pointer items-center gap-1.5";function H({checked:a,disabled:d=!1,indeterminate:e=!1,nested:f=!1,on_change:g,label:h,aria_label:i,className:j}){let k=(0,c.useRef)(null);(0,c.useEffect)(()=>{null!==k.current&&(k.current.indeterminate=e)},[e]);let l=void 0===j?G:`${G} ${j}`,m=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("input",{ref:k,type:"checkbox",className:"peer absolute m-0 h-px w-px overflow-hidden opacity-0",checked:a,disabled:d,"aria-label":f&&void 0===h?i:void 0,onChange:g}),(0,b.jsx)("span",{className:'relative block h-[0.85rem] w-[0.85rem] shrink-0 rounded-[0.2rem] border border-panel-border bg-input-bg box-border transition-[background-color,border-color] duration-150 peer-checked:border-accent peer-checked:bg-accent peer-indeterminate:border-accent peer-indeterminate:bg-accent peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-input-focus-border peer-focus-visible:outline-offset-1 peer-disabled:cursor-not-allowed peer-disabled:opacity-55 after:absolute after:left-1/2 after:top-[44%] after:hidden after:h-[0.28rem] after:w-[0.45rem] after:-translate-x-1/2 after:-translate-y-[60%] after:rotate-[-45deg] after:border-b-[1.5px] after:border-l-[1.5px] after:border-accent-text-on after:content-[""] peer-checked:after:block peer-indeterminate:after:top-1/2 peer-indeterminate:after:block peer-indeterminate:after:h-[1.5px] peer-indeterminate:after:w-[0.45rem] peer-indeterminate:after:-translate-x-1/2 peer-indeterminate:after:-translate-y-1/2 peer-indeterminate:after:rotate-0 peer-indeterminate:after:border-0 peer-indeterminate:after:bg-accent-text-on',"aria-hidden":"true"})]});return f?(0,b.jsx)("span",{className:l,children:m}):(0,b.jsxs)("label",{className:l,children:[m,void 0!==h?(0,b.jsx)("span",{className:"select-none text-[0.8rem] leading-tight text-muted",children:h}):null]})}function I(){return(0,b.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M4 7h16"}),(0,b.jsx)("path",{d:"M4 12h16"}),(0,b.jsx)("path",{d:"M4 17h16"})]})}var J=a.i(46299);function K(a,b=!0){let d=(0,c.useRef)(a);d.current=a,(0,c.useEffect)(()=>{if(!b)return;let a=a=>{"Escape"!==a.key||(0,J.is_modal_dialog_open)()||(a.preventDefault(),d.current())};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[b])}let L="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function M({current_sheet_name:a,sheets:d,is_pending:e,on_edit:f,on_add_note:g,on_show_add_note_form:h,on_resume:i,entry_is_active:j=!1,on_delete:k,on_move:l}){let m=d.find(b=>b.name===a),n=j||m?.hasActiveEntry===!0&&!j,o=d.filter(b=>b.name!==a),[p,q]=(0,c.useState)(!1),r=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!p)return;let a=a=>{null===r.current||r.current.contains(a.target)||q(!1)};return document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a)}},[p]);let s=()=>{q(!1)};return K(s,p),(0,b.jsxs)("div",{className:"relative shrink-0",ref:r,children:[(0,b.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":"Entry actions","aria-expanded":p,"aria-haspopup":"menu",disabled:e,onClick:()=>q(a=>!a),children:(0,b.jsx)(I,{})}),p?(0,b.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:L,role:"menuitem",disabled:e,onClick:()=>{s(),f()},children:"Edit times"})}),void 0!==h||void 0!==g?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:L,role:"menuitem",disabled:e,onClick:()=>{if(s(),void 0!==h)return void h();let a=function(){let a=window.prompt("Add note","");if(null===a)return null;let b=a.trim();return 0===b.length?null:b}();null!==a&&void 0!==g&&g(a)},children:"Add note"})}):null,void 0!==i?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:L,role:"menuitem",disabled:e||n,title:n?j?"This entry is already active":"Another entry is active on this sheet":void 0,onClick:()=>{s(),i()},children:"Resume"})}):null,(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("p",{className:"m-0 px-2.5 py-0.5 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Move to sheet"})}),0===o.length?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:L,role:"menuitem",disabled:!0,children:"No other sheets"})}):o.map(a=>(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${L} pl-4`,role:"menuitem",disabled:e||a.hasActiveEntry,title:a.hasActiveEntry?"That sheet already has an active entry":void 0,onClick:()=>{s(),l(a.name)},children:a.name})},a.name)),(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${L} text-danger`,role:"menuitem",disabled:e,onClick:()=>{s(),k()},children:"Delete"})})]}):null]})}function N({rotated:a=!1,className:c=""}){return(0,b.jsx)("svg",{className:`h-3 w-3 shrink-0 transition-transform duration-150 ${a?"rotate-90":""} ${c}`.trim(),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,b.jsx)("path",{d:"m9 18 6-6-6-6"})})}var O=a.i(93301);function P(a,b="12h"){return(0,O.format)(new Date(a),"24h"===b?"HH:mm":"h:mm a")}function Q({initial_text:a,is_pending:d,inline:g=!1,on_save:h,on_cancel:i}){let[j,k]=(0,c.useState)(a);K(i);let l=Math.min(6,Math.max(2,a.split("\n").length)),m=g?`${(0,f.get_input_class_name)()} min-h-10 w-full resize-y text-xs leading-snug`:`${(0,f.get_input_class_name)()} min-h-10 w-full resize-y text-[0.85rem] leading-snug`;return(0,b.jsxs)("form",{className:"flex w-full flex-col gap-1.5",onSubmit:a=>{a.preventDefault();let b=j.trim();0!==b.length&&h(b)},onClick:a=>a.stopPropagation(),children:[(0,b.jsx)("textarea",{className:m,value:j,rows:l,disabled:d,onChange:a=>k(a.target.value)}),(0,b.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("ghost"),disabled:d,onClick:i,children:"Cancel"}),(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("ghost"),disabled:d||0===j.trim().length,children:"Save"})]})]})}function R(){return(0,b.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M12 20h9"}),(0,b.jsx)("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}function S(){return(0,b.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M3 6h18"}),(0,b.jsx)("path",{d:"M8 6V4h8v2"}),(0,b.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),(0,b.jsx)("path",{d:"M10 11v6"}),(0,b.jsx)("path",{d:"M14 11v6"})]})}var T=a.i(50825);function U(){return(0,c.useSyncExternalStore)(T.time_format_preference.subscribe,T.time_format_preference.get_snapshot,T.time_format_preference.get_server_snapshot)}let V="inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border-0 bg-transparent p-0 text-muted hover:bg-surface-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55";function W({notes:a,variant:d="panel",in_bar:e=!1,is_pending:f=!1,on_edit_note:g,on_delete_note:h}){let i=U(),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(!1);if(0===a.length)return null;let n=[...a].sort((a,b)=>new Date(a.timestamp).getTime()-new Date(b.timestamp).getTime()),o="inline"===d,p=l||null!==j,q=o?`${a.length} ${1===a.length?"note":"notes"}`:`Notes (${a.length})`,r=[o?"m-0 w-full p-0":"border-t border-accent-border pt-3.5",e&&!o?"border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))]":""].filter(Boolean).join(" "),s=o?`m-0 flex list-none flex-col gap-1.5 overflow-visible p-0 compact:gap-0.5 ${p?"mt-1.5":"hidden"}`:`m-0 grid max-h-48 list-none grid-cols-2 gap-2 overflow-y-auto p-0 max-[860px]:grid-cols-1 ${p?"mt-1.5":"hidden"}`,t=o?"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-ghost-bg px-2 py-1.5 compact:rounded-none compact:px-1.5 compact:py-1":"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-[color-mix(in_srgb,var(--panel)_55%,var(--background))] px-2.5 py-2",u=a=>void 0===g&&void 0===h?null:(0,b.jsxs)("div",{className:"flex shrink-0 gap-0.5",children:[void 0!==g?(0,b.jsx)("button",{type:"button",className:V,"aria-label":"Edit note",title:"Edit note",disabled:f,onClick:b=>{var c;b.stopPropagation(),c=a.timestamp,m(!0),k(c)},children:(0,b.jsx)(R,{})}):null,void 0!==h?(0,b.jsx)("button",{type:"button",className:`${V} hover:text-danger`,"aria-label":"Delete note",title:"Delete note",disabled:f,onClick:b=>{var c;b.stopPropagation(),j===(c=a.timestamp)&&k(null),h?.(c)},children:(0,b.jsx)(S,{})}):null]});return(0,b.jsxs)("section",{className:r,"aria-label":"Entry notes",children:[(0,b.jsxs)("button",{type:"button",className:o?"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 font-inherit text-xs font-medium normal-case tracking-normal text-muted hover:text-foreground":"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent px-0 py-0.5 font-inherit text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted hover:text-foreground","aria-expanded":p,onClick:a=>{a.stopPropagation(),null===j&&m(a=>!a)},children:[(0,b.jsx)(N,{rotated:p}),(0,b.jsx)("span",{children:q})]}),(0,b.jsx)("ul",{className:s,children:n.map((a,c)=>{let d=j===a.timestamp;return(0,b.jsx)("li",{className:t,children:d?(0,b.jsx)(Q,{initial_text:a.text,inline:o,is_pending:f,on_cancel:()=>k(null),on_save:b=>{var c;return c=a.timestamp,void(g?.(c,b),k(null))}}):o?(0,b.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,b.jsxs)("p",{className:"m-0 flex min-w-0 flex-1 items-baseline gap-1.5 text-xs leading-snug text-foreground compact:text-[0.72rem]",children:[(0,b.jsx)("time",{className:"shrink-0 font-mono text-[0.68rem] text-muted",dateTime:a.timestamp,children:P(a.timestamp,i)}),(0,b.jsx)("span",{className:"min-w-0 overflow-wrap-anywhere whitespace-pre-wrap",children:a.text})]}),u(a)]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,b.jsx)("time",{className:"font-mono text-[0.72rem] text-muted",dateTime:a.timestamp,children:P(a.timestamp,i)}),u(a)]}),(0,b.jsx)("p",{className:"m-0 overflow-wrap-anywhere text-[0.9rem] leading-snug whitespace-pre-wrap",children:a.text})]})},`${a.timestamp}-${c}`)})})]})}function X(a){return(0,O.format)(new Date(a),"MMM d, h:mm a")}function Y({entry:a,is_pending:d,in_active_panel:g=!1,on_save:h,on_cancel:i}){let[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)("");K(i);let n=a.isActive?"still running":X(a.end??a.start);return(0,b.jsxs)("form",{className:`flex flex-col gap-3 rounded-[0.65rem] border border-panel-border bg-input-bg p-3 ${g?"mt-2":""}`,onSubmit:a=>{a.preventDefault();let b=j.trim(),c=l.trim();(0!==b.length||0!==c.length)&&h({...b.length>0?{start:b}:{},...c.length>0?{end:c}:{}})},children:[(0,b.jsx)("p",{className:"m-0 text-[0.85rem] font-semibold",children:"Edit times"}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-2.5 max-[860px]:grid-cols-1",children:[(0,b.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-start-${a.id}`,children:[(0,b.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Start"}),(0,b.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",X(a.start)]}),(0,b.jsx)("input",{id:`entry-start-${a.id}`,className:(0,f.get_input_class_name)("compact"),value:j,onChange:a=>k(a.target.value),placeholder:"e.g. 10am, 30 minutes ago",disabled:d})]}),(0,b.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-end-${a.id}`,children:[(0,b.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"End"}),(0,b.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",n]}),(0,b.jsx)("input",{id:`entry-end-${a.id}`,className:(0,f.get_input_class_name)("compact"),value:l,onChange:a=>m(a.target.value),placeholder:a.isActive?"e.g. now, 5 minutes ago":"e.g. 11:30am",disabled:d})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("primary","small"),disabled:d||0===j.trim().length&&0===l.trim().length,children:"Save"}),(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("ghost","small"),disabled:d,onClick:i,children:"Cancel"})]})]})}function Z({selected_count:a,total_count:d,all_selected:g,some_selected:h,selected_entries:i,sheets:j,is_pending:k,on_toggle_all:l,on_move:m,on_delete:n,on_clear:o}){let[p,q]=(0,c.useState)(""),r=i.some(a=>a.isActive),s=j.filter(a=>(!r||!a.hasActiveEntry)&&i.some(b=>b.sheetName!==a.name));return(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-md border border-accent-border bg-accent-soft px-3 py-2",children:[(0,b.jsx)(H,{className:"shrink-0",checked:g,indeterminate:h,disabled:k,aria_label:g?"Deselect all entries":"Select all entries",on_change:l}),(0,b.jsxs)("p",{className:"m-0 shrink-0 text-[0.85rem] font-semibold",children:[a,(0,b.jsx)("span",{className:"text-muted",children:` of ${d} selected`})]}),(0,b.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("select",{className:`${(0,f.get_input_class_name)("compact")} min-w-32`,value:p,disabled:k||0===s.length,"aria-label":"Move to sheet",onChange:a=>q(a.target.value),children:[(0,b.jsx)("option",{value:"",children:"Move to…"}),s.map(a=>(0,b.jsx)("option",{value:a.name,children:a.name},a.name))]}),(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("ghost","small"),disabled:k||0===p.trim().length||0===s.length,onClick:()=>{let a=p.trim();0!==a.length&&(m(a),q(""))},children:"Move"})]}),(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("danger","small"),disabled:k,onClick:n,children:"Delete"}),(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost","small")} shrink-0`,disabled:k,"aria-label":"Clear selection",title:"Clear selection",onClick:o,children:"✕"})]})]})}function $(a){let b=a.description.trim()||"Untitled entry",c=a.isActive?" This will stop the active timer.":"";return{title:"Delete entry?",message:`Delete "${b}" on sheet "${a.sheetName}"?${c}`,confirmLabel:"Delete",variant:"danger"}}var _=a.i(85752);function aa(a){return`${a.sheetName}-${a.id}`}var ab=a.i(32297);function ac(){return"true"===(0,c.useSyncExternalStore)(ab.confirm_destructive_actions_preference.subscribe,ab.confirm_destructive_actions_preference.get_snapshot,ab.confirm_destructive_actions_preference.get_server_snapshot)}var ad=a.i(65162);function ae({title:a,entries:d,sheets:e,total_ms:f,empty_message:g,is_pending:h,show_sheet_name:i=!0,on_delete:j,on_edit:k,on_move:l,on_move_many:n,on_delete_many:o,on_edit_note:p,on_add_note:q,on_resume:s}){let{confirm:t}=(0,m.use_confirm_dialog)(),u=ac(),v=U(),w=(0,ad.use_duration_format)(),[x,y]=(0,c.useState)(null),[z,A]=(0,c.useState)(()=>new Set),B=d.map(a=>aa(a)),C=d.filter(a=>z.has(aa(a))),D=d.length>0&&C.length===d.length,E=C.length>0&&C.length<d.length;(0,c.useEffect)(()=>{A(a=>{let b=new Set(B),c=new Set([...a].filter(a=>b.has(a)));return c.size===a.size?a:c})},[B.join("|")]);let F=()=>{D?A(new Set):A(new Set(B))},G=()=>{A(new Set)},I=async()=>{let a,b,c;0!==C.length&&(!u||await t((a=C.length,b=C.some(a=>a.isActive),c=1===a?"1 entry":`${a} entries`,{title:1===a?"Delete entry?":"Delete entries?",message:`Permanently delete ${c}?${b?" This will stop the active timer.":""}`,confirmLabel:"Delete",variant:"danger"})))&&(o(C),G())},J=C.length>0;return K(G,J&&null===x),(0,b.jsxs)("section",{className:"min-w-0",children:[(0,b.jsx)("header",{className:"mb-3 flex flex-col gap-2 border-b border-panel-border pb-2.5 compact:mb-2 compact:pb-1.5",children:J?(0,b.jsx)(Z,{selected_count:C.length,total_count:d.length,all_selected:D,some_selected:E,selected_entries:C,sheets:e,is_pending:h,on_toggle_all:F,on_move:a=>{n(C,a),G()},on_delete:()=>void I(),on_clear:G}):(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[d.length>0?(0,b.jsx)(H,{className:"shrink-0",checked:D,indeterminate:E,disabled:h,aria_label:"Select all entries",on_change:F}):null,(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em]",children:a}),(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:0===d.length?null:1===d.length?"1 entry":`${d.length} entries`})]}),(0,b.jsxs)("p",{className:"m-0 font-mono text-[0.85rem] text-muted",children:[(0,_.format_duration)(f,w)," total"]})]})}),0===d.length?(0,b.jsx)("p",{className:"m-0 text-muted",children:g}):(0,b.jsx)(b.Fragment,{children:(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col p-0",children:d.map(a=>{let c=aa(a),d=x===c,f=z.has(c);return d?(0,b.jsx)("li",{className:"block border-b border-panel-border py-2.5 last:border-b-0 compact:py-1.5",children:(0,b.jsx)(Y,{entry:a,is_pending:h,on_cancel:()=>y(null),on_save:b=>{k(a,b),y(null)}})},c):(0,b.jsxs)("li",{className:`group relative flex flex-col gap-0 border-b border-panel-border px-2 py-2.5 transition-colors duration-150 last:border-b-0 hover:bg-surface-hover compact:py-1.5 ${f?"bg-accent-soft hover:bg-accent-soft":""}`,children:[(0,b.jsxs)("div",{className:"flex w-full min-w-0 items-center gap-2.5 compact:gap-1.5",children:[(0,b.jsxs)("label",{className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 has-disabled:cursor-not-allowed","aria-label":`Select entry ${a.description||"Untitled entry"}`,children:[(0,b.jsx)(H,{nested:!0,className:`shrink-0 pr-1 transition-opacity duration-150 compact:pr-0.5 ${f||J?"opacity-100":"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`,checked:f,disabled:h,on_change:()=>{A(a=>{let b=new Set(a);return b.has(c)?b.delete(c):b.add(c),b})}}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-semibold leading-snug compact:text-[0.9rem] compact:leading-tight",children:a.description||"Untitled entry"}),(0,b.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-1 text-[0.8rem] text-muted compact:mt-px compact:gap-0.5 compact:text-[0.72rem]",children:[i?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:a.sheetName}),(0,b.jsx)("span",{children:"·"})]}):null,(0,b.jsxs)("span",{children:["#",a.id]}),(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{className:"whitespace-nowrap",children:[P(a.start,v),null===a.end?" → now":` → ${P(a.end,v)}`]}),a.tags.length>0?(0,b.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1 p-0",children:a.tags.map(a=>(0,b.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,r.format_display_tag)(a)},a))}):null]})]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 flex-row items-center gap-2 max-[860px]:flex-wrap max-[860px]:justify-end compact:gap-1.5",children:[(0,b.jsx)("p",{className:`m-0 whitespace-nowrap text-right font-mono text-[0.9rem] text-muted compact:text-[0.8rem] ${a.isActive?"text-accent":""}`,children:(0,_.format_duration)(a.durationMs,w)}),(0,b.jsx)(M,{current_sheet_name:a.sheetName,sheets:e,is_pending:h,on_edit:()=>y(c),on_add_note:b=>q(a,b),on_resume:()=>s(a),entry_is_active:a.isActive,on_move:b=>l(a,b),on_delete:async()=>{(!u||await t($(a)))&&j(a)}})]})]}),a.notes.length>0?(0,b.jsx)("div",{className:"w-full pt-1 pl-[calc(0.85rem+0.5rem+0.35rem)] compact:pt-0.5 compact:pl-[calc(0.85rem+0.35rem+0.2rem)]",children:(0,b.jsx)(W,{notes:a.notes,variant:"inline",is_pending:h,on_edit_note:(b,c)=>p(a,b,c)})}):null]},c)})})})]})}let af="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function ag({sheet_name:a,is_pending:d,can_delete:e,on_rename:f,on_delete:g}){let[h,i]=(0,c.useState)(!1),j=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!h)return;let a=a=>{null===j.current||j.current.contains(a.target)||i(!1)};return document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a)}},[h]);let k=()=>{i(!1)};return(0,b.jsxs)("div",{className:"relative shrink-0 self-center",ref:j,children:[(0,b.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":`Actions for sheet ${a}`,"aria-expanded":h,"aria-haspopup":"menu",disabled:d,onClick:()=>i(a=>!a),children:(0,b.jsx)(I,{})}),h?(0,b.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:af,role:"menuitem",disabled:d,onClick:()=>{k(),f()},children:"Rename"})}),(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${af} text-danger`,role:"menuitem",disabled:d||!e,title:e?void 0:"Cannot delete the last sheet",onClick:()=>{k(),g()},children:"Delete sheet"})})]}):null]})}function ah({sheets:a,db_path:d,on_select:g,on_create:h,on_rename:i,on_delete:j,is_pending:k}){let{confirm:l}=(0,m.use_confirm_dialog)(),n=ac(),o=a.length>1,[p,q]=(0,c.useState)(""),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(""),v=()=>{s(null),u("")};K(v,null!==r);let w=a=>{if(a.preventDefault(),null===r)return;let b=t.trim();0===b.length||b===r||i(r,b),v()};return(0,b.jsxs)("aside",{className:"flex min-w-0 flex-col gap-3 max-[860px]:min-w-0",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Sheets"}),(0,b.jsx)("ul",{className:"m-0 flex min-h-0 flex-1 list-none flex-col gap-1.5 p-0",children:a.map(a=>(0,b.jsx)("li",{className:"min-w-0",children:r===a.name?(0,b.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-1.5",onSubmit:w,children:[(0,b.jsx)("input",{className:(0,f.get_input_class_name)("compact"),value:t,onChange:a=>u(a.target.value),disabled:k,autoFocus:!0}),(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)("button",{type:"submit",className:`${(0,e.get_button_class_name)("ghost")} flex-1`,disabled:k||0===t.trim().length,children:"Save"}),(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost")} flex-1`,disabled:k,onClick:v,children:"Cancel"})]})]}):(0,b.jsxs)("div",{className:"flex min-w-0 items-stretch gap-1",children:[(0,b.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 rounded-md border border-transparent bg-transparent px-2.5 py-2 text-left transition-[background-color,color] duration-150 hover:bg-surface-hover",disabled:k,onClick:()=>g(a.name),children:[(0,b.jsx)("span",{className:`min-w-0 flex-1 truncate font-semibold ${a.isActive||a.hasActiveEntry?"text-accent":""}`,children:a.name}),(0,b.jsx)("span",{className:`shrink-0 text-xs whitespace-nowrap ${a.hasActiveEntry?"text-accent":"text-muted"}`,children:a.hasActiveEntry?"● active":`${a.entryCount} entries`})]}),(0,b.jsx)(ag,{sheet_name:a.name,is_pending:k,can_delete:o,on_rename:()=>{var b;s(b=a.name),u(b)},on_delete:async()=>{var b,c,d;let e;(!n||await l((b=a.name,c=a.entryCount,d=a.hasActiveEntry,e=0===c?"":` This will delete ${c} ${1===c?"entry":"entries"}.`,{title:"Delete sheet?",message:`Delete "${b}"?${e}${d?" This will stop the active timer.":""}`,confirmLabel:"Delete sheet",variant:"danger"})))&&j(a.name)}})]})},a.name))}),(0,b.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-2",onSubmit:a=>{a.preventDefault();let b=p.trim();0!==b.length&&(h(b),q(""))},children:[(0,b.jsx)("input",{className:(0,f.get_input_class_name)("compact"),value:p,onChange:a=>q(a.target.value),placeholder:"New sheet name",disabled:k}),(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("ghost"),disabled:k||0===p.trim().length,children:"Add"})]}),(0,b.jsx)("p",{className:"mt-auto shrink-0 overflow-wrap-anywhere border-t border-panel-border pt-3 font-mono text-[0.65rem] leading-snug text-muted",title:d,children:d})]})}let ai=`${(0,e.get_button_class_name)("danger")} text-white rounded-none first:rounded-l-[0.65rem] last:rounded-r-[0.65rem] not-first:-ml-px not-first:min-w-12 not-first:border-l not-first:border-l-[color-mix(in_srgb,var(--danger-text)_30%,var(--background))] max-[860px]:flex-1 max-[860px]:basis-1/2`;function aj({in_bar:a=!1,is_pending:c,on_check_out:d}){let e=o(d);return(0,b.jsxs)("div",{className:`inline-flex shrink-0 ${a?"min-w-0 max-[860px]:w-full":"min-w-30 max-[860px]:w-full"}`,children:[(0,b.jsx)("button",{type:"button",className:ai,disabled:c,onClick:()=>void e(),children:"Check out"}),(0,b.jsx)("button",{type:"button",className:ai,disabled:c,title:"Check out at a specific time",onClick:()=>{let a=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}();null!==a&&e(a)},children:"@"})]})}function ak({on_submit:a,on_cancel:d,is_pending:g,in_active_panel:h=!1,in_bar:i=!1,allow_at:j=!1}){let[k,l]=(0,c.useState)(""),[m,n]=(0,c.useState)("");return K(()=>d?.(),void 0!==d),(0,b.jsxs)("form",{className:`flex flex-col gap-2 ${h&&!i?"border-t border-accent-border pt-4":i?"border-t border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))] pt-3.5":""}`,onSubmit:b=>{b.preventDefault();let c=k.trim();if(0===c.length)return;let d=m.trim();a(c,d.length>0?d:void 0),l(""),n("")},children:[(0,b.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-text",children:"Add note"}),(0,b.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,b.jsx)("input",{id:"note-text",className:(0,f.get_input_class_name)(),value:k,onChange:a=>l(a.target.value),placeholder:"Pair with alice on the widget",disabled:g,autoFocus:!0}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2 max-[860px]:w-full",children:[(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("ghost"),disabled:g||0===k.trim().length,children:"Save note"}),void 0!==d?(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("ghost"),disabled:g,onClick:d,children:"Cancel"}):null]})]}),j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-at",children:["Note time"," ",(0,b.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,b.jsx)("input",{id:"note-at",className:(0,f.get_input_class_name)(),value:m,onChange:a=>n(a.target.value),placeholder:"e.g. 30 minutes ago",disabled:g})]}):null]})}var al=a.i(99751);function am(){return"true"===(0,c.useSyncExternalStore)(al.timer_show_seconds_preference.subscribe,al.timer_show_seconds_preference.get_snapshot,al.timer_show_seconds_preference.get_server_snapshot)}let an=(0,c.forwardRef)(function({entry:a,sheets:d,in_bar:f=!1,on_check_out:g,on_delete:h,on_edit:i,on_move:j,on_add_note:k,on_edit_note:l,on_delete_note:n,is_pending:o},p){let q,{confirm:s}=(0,m.use_confirm_dialog)(),t=ac(),u=(0,ad.use_duration_format)(),v=am(),[w,x]=(0,c.useState)(a.durationMs),[y,z]=(0,c.useState)(!1),[A,B]=(0,c.useState)(!1);(0,c.useImperativeHandle)(p,()=>({start_edit:()=>{y||z(!0)},start_add_note:()=>{y||A||B(!0)}}),[A,y]),(0,c.useEffect)(()=>{B(!1)},[a.id,a.sheetName]),(0,c.useEffect)(()=>{x(a.durationMs);let b=window.setInterval(()=>{x(Date.now()-new Date(a.start).getTime())},1e3);return()=>window.clearInterval(b)},[a.durationMs,a.start]);let C=(q="flex flex-col gap-4 rounded-lg border border-accent-border p-[1.1rem] shadow-sm",f?y?`${q} rounded-md border border-accent-border bg-[color-mix(in_srgb,var(--panel)_70%,var(--background))] p-3.5`:"flex flex-col gap-3.5 border-0 bg-transparent p-0 shadow-none":`${q} bg-[image:var(--active-panel-bg)]`),D=async b=>{let c,d,e=a.notes.find(a=>a.timestamp===b);(!t||await s({title:"Delete note?",message:(d=(c=(e?.text??"").trim()).length>80?`${c.slice(0,80)}…`:c).length>0?`Remove this note? "${d}"`:"Remove this note?",confirmLabel:"Delete",variant:"danger"}))&&n(b)};return y?(0,b.jsx)("section",{className:C,children:(0,b.jsx)(Y,{entry:a,is_pending:o,in_active_panel:!0,on_cancel:()=>z(!1),on_save:a=>{i(a),z(!1)}})}):(0,b.jsxs)("section",{className:C,children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5",children:[f?null:(0,b.jsx)("span",{className:"self-start rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),(0,b.jsx)("h2",{className:"m-0 text-xl font-[650] leading-tight tracking-tight",children:a.description||"Untitled entry"})]}),(0,b.jsx)(M,{current_sheet_name:a.sheetName,sheets:d,is_pending:o,on_edit:()=>z(!0),on_show_add_note_form:()=>B(!0),on_move:j,on_delete:async()=>{(!t||await s($(a)))&&h()}})]}),(0,b.jsxs)("div",{className:"flex items-end justify-between gap-4 max-[860px]:flex-col max-[860px]:items-stretch",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,b.jsx)("p",{className:"m-0 font-mono text-[2rem] font-medium leading-none tracking-tight text-accent",children:(0,_.format_duration)(w,u,v)}),a.tags.length>0?(0,b.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1.5 p-0",children:a.tags.map(a=>(0,b.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,r.format_display_tag)(a)},a))}):null]}),(0,b.jsxs)("div",{className:`inline-flex shrink-0 items-center gap-2 ${f?"min-w-0 max-[860px]:w-full max-[860px]:justify-end":"min-w-30 max-[860px]:w-full max-[860px]:justify-stretch"}`,children:[A?null:(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost")} max-[860px]:flex-1`,disabled:o,onClick:()=>B(!0),children:"Add note"}),(0,b.jsx)(aj,{in_bar:f,is_pending:o,on_check_out:g})]})]}),(0,b.jsx)(W,{notes:a.notes,variant:"panel",in_bar:f,is_pending:o,on_edit_note:l,on_delete_note:D}),A?(0,b.jsx)(ak,{in_active_panel:!0,in_bar:f,allow_at:!0,is_pending:o,on_cancel:()=>B(!1),on_submit:(a,b)=>{k(a,b),B(!1)}}):null]})}),ao=(0,c.forwardRef)(function({active_entry:a,sheets:c,is_pending:d,on_check_out:e,on_delete:f,on_edit:g,on_move:h,on_add_note:i,on_edit_note:j,on_delete_note:k},l){return(0,b.jsx)("div",{className:"w-full border-b border-panel-border bg-[color-mix(in_srgb,var(--accent-soft)_55%,var(--panel))]",children:(0,b.jsx)("div",{className:"mx-auto flex w-full max-w-[1120px] flex-col gap-3 px-5 py-3.5 max-[860px]:gap-2.5 max-[860px]:py-3",children:null!==a?(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted whitespace-nowrap truncate",children:["Sheet ",a.sheetName]}),(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"})]}),(0,b.jsx)(an,{ref:l,entry:a,sheets:c,in_bar:!0,is_pending:d,on_check_out:e,on_delete:f,on_edit:g,on_move:h,on_add_note:i,on_edit_note:j,on_delete_note:k},`${a.sheetName}-${a.id}`)]}):(0,b.jsx)("p",{className:"m-0 text-[0.85rem] leading-tight text-muted",children:"Not tracking"})})})});var ap=a.i(6128);let aq="super-time-tracker";function ar({active_entry:a}){let b="true"===(0,c.useSyncExternalStore)(ap.timer_in_title_preference.subscribe,ap.timer_in_title_preference.get_snapshot,ap.timer_in_title_preference.get_server_snapshot),d=(0,ad.use_duration_format)(),e=am(),[f,g]=(0,c.useState)(a?.durationMs??0);return(0,c.useEffect)(()=>{if(null===a)return void g(0);g(a.durationMs);let b=window.setInterval(()=>{g(Date.now()-new Date(a.start).getTime())},1e3);return()=>window.clearInterval(b)},[a]),(0,c.useEffect)(()=>{if(!b||null===a){document.title=aq;return}let c=a.description.trim()||"Tracking",g=(0,_.format_duration)(f,d,e);return document.title=`${g} — ${c}`,()=>{document.title=aq}},[a,d,f,e,b]),null}var as=a.i(98790),at=a.i(84365);async function au(a,b){let c=await fetch(a,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json()).error??"Request failed");return await c.json()}async function av(a,b){let c=await fetch(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json()).error??"Request failed");return await c.json()}async function aw(a,b){let c=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json()).error??"Request failed");return await c.json()}function ax(a){}var ay=a.i(35822),az=a.i(79918);a.s(["TrackerApp",0,function({initial_state:a}){let[d,e]=(0,c.useState)(a),[f,g]=(0,c.useState)(null),[h,j]=(0,c.useState)(!1);(0,c.useEffect)(()=>{ax(a)},[a]);let k=async a=>{j(!0),g(null);try{let b=await a();ax(b),e(b)}catch(a){g(a instanceof Error?a.message:String(a))}finally{j(!1)}},l=d.sheets.find(a=>a.isActive)?.name??"main",m=E(),n=(0,c.useSyncExternalStore)(az.entry_list_sort_preference.subscribe,az.entry_list_sort_preference.get_snapshot,az.entry_list_sort_preference.get_server_snapshot),o="true"===(0,c.useSyncExternalStore)(ay.clear_tag_filters_on_sheet_change_preference.subscribe,ay.clear_tag_filters_on_sheet_change_preference.get_snapshot,ay.clear_tag_filters_on_sheet_change_preference.get_server_snapshot),p=(0,c.useRef)(null),t=(0,c.useRef)(null),u=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!o||null===p.current||p.current===l){p.current=l;return}B(l,[]),p.current=l},[l,o]);let v=(0,c.useSyncExternalStore)(z,()=>w(l),x),y=(0,c.useMemo)(()=>(function(a){let b=new Map;for(let c of a){let a=new Set;for(let d of c.tags)try{let c=s(d);if(a.has(c))continue;a.add(c),b.set(c,(b.get(c)??0)+1)}catch{continue}}return[...b.entries()].map(([a,b])=>({name:a,entryCount:b})).sort((a,b)=>a.name.localeCompare(b.name))})(d.activeSheetEntries),[d.activeSheetEntries]),A=(0,c.useMemo)(()=>{let a=[...function(a,b,c="all"){return 0===b.length?a:a.filter(a=>(function(a,b,c="all"){return 0===b.length||("any"===c?b.some(b=>a.tags.some(a=>C(a,b))):b.every(b=>a.tags.some(a=>C(a,b))))})(a,b,c))}(d.activeSheetEntries,v,m)];switch(n){case"oldest":return a.sort((a,b)=>new Date(a.start).getTime()-new Date(b.start).getTime());case"duration":return a.sort((a,b)=>b.durationMs-a.durationMs);case"description":return a.sort((a,b)=>{let c=a.description.trim()||"Untitled entry",d=b.description.trim()||"Untitled entry";return c.localeCompare(d)});default:return a.sort((a,b)=>new Date(b.start).getTime()-new Date(a.start).getTime())}},[d.activeSheetEntries,v,m,n]),D=(0,c.useMemo)(()=>(0,at.get_serialized_entries_total_ms)(A),[A]),G=v.length>0?"any"===m?`No entries on sheet "${l}" match any selected tag.`:`No entries on sheet "${l}" match all selected tags.`:`No entries on sheet "${l}".`,H=(a,b,c)=>av("/api/entry",{sheetName:a,entryId:b,...c});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ar,{active_entry:d.activeEntry}),(0,b.jsx)(q,{sheets:d.sheets,active_sheet_name:l,active_entry:d.activeEntry,is_pending:h,check_in_form_ref:t,active_entry_panel_ref:u,on_select_sheet:a=>k(()=>aw("/api/sheet",{name:a})),on_check_out:a=>k(()=>aw("/api/out",{sheetName:l,...void 0!==a?{at:a}:{}}))}),(0,b.jsxs)("div",{className:"relative z-1",children:[(0,b.jsx)(as.TrackerTopbar,{}),(0,b.jsx)(ao,{ref:u,active_entry:d.activeEntry,sheets:d.sheets,is_pending:h,on_check_out:a=>k(()=>aw("/api/out",{sheetName:l,...void 0!==a?{at:a}:{}})),on_delete:()=>k(()=>aw("/api/entry",{sheetName:l,entryId:d.activeEntry?.id})),on_edit:a=>k(()=>H(l,d.activeEntry?.id??0,a)),on_move:a=>k(()=>aw("/api/entry/move",{sheetName:l,entryId:d.activeEntry?.id,targetSheetName:a})),on_add_note:(a,b)=>k(()=>aw("/api/note",{text:a,...void 0!==b?{at:b}:{},sheetName:l,entryId:d.activeEntry?.id})),on_edit_note:(a,b)=>k(()=>av("/api/note",{sheetName:l,entryId:d.activeEntry?.id,timestamp:a,text:b})),on_delete_note:a=>k(()=>au("/api/note",{sheetName:l,entryId:d.activeEntry?.id,timestamp:a}))})]}),(0,b.jsxs)("div",{className:"mx-auto max-w-[1120px] px-5 pb-10 pt-5",children:[null!==f?(0,b.jsx)("p",{className:"mb-4 rounded-[0.65rem] border border-danger-border bg-danger-soft px-3 py-2.5 text-danger-text",children:f}):null,(0,b.jsxs)("div",{className:"grid grid-cols-[minmax(16rem,20rem)_minmax(0,1fr)] items-start gap-4 max-[860px]:grid-cols-1",children:[(0,b.jsx)(ah,{sheets:d.sheets,db_path:d.dbPath,is_pending:h,on_select:a=>k(()=>aw("/api/sheet",{name:a})),on_create:a=>k(()=>aw("/api/sheet",{name:a})),on_rename:(a,b)=>k(()=>av("/api/sheet",{name:a,newName:b})),on_delete:a=>k(()=>aw("/api/sheet",{name:a,delete:!0}))}),(0,b.jsxs)("main",{className:"flex min-w-0 flex-col gap-4 rounded-lg border border-panel-border bg-panel p-4 shadow-sm",children:[null===d.activeEntry?(0,b.jsx)(i,{ref:t,known_tags:d.knownTags,is_pending:h,on_submit:a=>k(()=>aw("/api/in",{...a,sheetName:l}))}):null,(0,b.jsx)(F,{sheet_name:l,sheet_tags:y}),(0,b.jsx)(ae,{title:"Entries",entries:A,sheets:d.sheets,total_ms:D,empty_message:G,is_pending:h,show_sheet_name:!1,on_delete:a=>k(()=>aw("/api/entry",{sheetName:a.sheetName,entryId:a.id})),on_edit:(a,b)=>k(()=>H(a.sheetName,a.id,b)),on_move:(a,b)=>k(()=>aw("/api/entry/move",{sheetName:a.sheetName,entryId:a.id,targetSheetName:b})),on_move_many:(a,b)=>k(()=>aw("/api/entry/move-bulk",{entries:a.map(a=>({sheetName:a.sheetName,entryId:a.id})),targetSheetName:b})),on_delete_many:a=>k(()=>aw("/api/entry/delete-bulk",{entries:a.map(a=>({sheetName:a.sheetName,entryId:a.id}))})),on_edit_note:(a,b,c)=>k(()=>av("/api/note",{sheetName:a.sheetName,entryId:a.id,timestamp:b,text:c})),on_add_note:(a,b)=>k(()=>aw("/api/note",{sheetName:a.sheetName,entryId:a.id,text:b})),on_resume:a=>k(()=>{var b,c;let d,e,f;return aw("/api/in",{description:(b=a.description,c=a.tags,e=(d=b.trim()).length>0?d:"Untitled entry",(f=c.map(a=>(0,r.format_display_tag)(a)).join(" ")).length>0?`${e} ${f}`.trim():e),sheetName:a.sheetName})})})]})]})]})]})}],12584)}];
|
|
1
|
+
module.exports=[12584,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(30354),e=a.i(89969),f=a.i(69749);function g({known_tags:a,on_submit:h,is_pending:i}){let[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)("");return(0,b.jsxs)("form",{className:"flex flex-col gap-2 rounded-lg border border-panel-border bg-panel p-[1.1rem] shadow-sm",onSubmit:a=>{a.preventDefault();let b=j.trim();if(0===b.length)return;let c=l.trim();h({description:b,...c.length>0?{at:c}:{}}),k(""),m("")},children:[(0,b.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-description",children:"What are you working on?"}),(0,b.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,b.jsx)(d.TagAutocompleteInput,{id:"check-in-description",value:j,known_tags:a,placeholder:"e.g. crafting something @design",disabled:i,autoFocus:!0,on_change:k}),(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("primary"),disabled:i||0===j.trim().length,children:"Check in"})]}),(0,b.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-at",children:["Start time"," ",(0,b.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,b.jsx)("input",{id:"check-in-at",className:(0,f.get_input_class_name)(),value:l,onChange:a=>m(a.target.value),placeholder:"e.g. 30 minutes ago",disabled:i})]})}var h=a.i(14244);let i=(0,c.forwardRef)(function({known_tags:a,is_pending:d,on_submit:f},i){let j="true"===(0,c.useSyncExternalStore)(h.check_in_form_collapsed_preference.subscribe,h.check_in_form_collapsed_preference.get_snapshot,h.check_in_form_collapsed_preference.get_server_snapshot),[k,l]=(0,c.useState)(!j);return((0,c.useImperativeHandle)(i,()=>({expand_and_focus:()=>{l(!0),window.requestAnimationFrame(()=>{let a=document.getElementById("check-in-description");a instanceof HTMLElement&&a.focus()})}}),[]),j&&!k)?(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("primary")} self-start`,disabled:d,onClick:()=>l(!0),children:"Check in"}):(0,b.jsx)(g,{known_tags:a,is_pending:d,on_submit:a=>{f(a),j&&l(!1)}})});var j=a.i(7386);function k(a,b,c){if(0===a.length)return null;let d=a.findIndex(a=>a.name===b),e=((-1===d?0:d)+("next"===c?1:-1)+a.length)%a.length;return a[e]?.name??null}var l=a.i(85928),m=a.i(53030),n=a.i(40947);function o(a){let{confirm:b}=(0,m.use_confirm_dialog)(),d="true"===(0,c.useSyncExternalStore)(n.confirm_before_checkout_preference.subscribe,n.confirm_before_checkout_preference.get_snapshot,n.confirm_before_checkout_preference.get_server_snapshot);return(0,c.useCallback)(async c=>{if(d){let a;if(!await b({title:"Check out?",message:(a=c?.trim()??"").length>0?`Stop the timer and check out at "${a}"?`:"Stop the active timer and save this entry?",confirmLabel:"Check out",variant:"danger"}))return}a(c)},[b,d,a])}var p=a.i(89184);function q({sheets:a,active_sheet_name:d,active_entry:e,is_pending:f,check_in_form_ref:g,active_entry_panel_ref:h,on_select_sheet:i,on_check_out:m}){let[n,r]=(0,c.useState)(!1),s=o(m),t=(0,c.useMemo)(()=>{let b=null!==e;return[{id:"help",label:"?",description:"Show keyboard shortcuts",key:"?",modifiers:["shift"],action:()=>{r(a=>!a)}},{id:"check-in",label:"C",description:"Check in (focus description)",key:"c",is_available:()=>!f&&!b,action:()=>{g.current?.expand_and_focus()}},{id:"check-out",label:"O",description:"Check out",key:"o",is_available:()=>!f&&b,action:()=>{s()}},{id:"edit-entry",label:"E",description:"Edit active entry",key:"e",is_available:()=>!f&&b,action:()=>{h.current?.start_edit()}},{id:"add-note",label:"N",description:"Add note to active entry",key:"n",is_available:()=>!f&&b,action:()=>{h.current?.start_add_note()}},{id:"previous-sheet",label:"[",description:"Previous sheet",key:"[",is_available:()=>!f&&a.length>1,action:()=>{let b=k(a,d,"previous");null!==b&&b!==d&&i(b)}},{id:"next-sheet",label:"]",description:"Next sheet",key:"]",is_available:()=>!f&&a.length>1,action:()=>{let b=k(a,d,"next");null!==b&&b!==d&&i(b)}}]},[e,h,d,g,s,f,i,a]);return((0,p.use_document_keyboard_shortcuts)(t),n)?(0,b.jsx)(j.KeyboardShortcutsDialog,{sections:(0,l.get_tracker_keyboard_shortcut_sections)(),on_close:()=>r(!1)}):null}var r=a.i(48174);function s(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}`}function t(a){let b=[],c=new Set;for(let d of({})[a]??[])try{let a=s(d);c.has(a)||(c.add(a),b.push(a))}catch{continue}return b}let u=[],v=null;function w(a){var b=t(a);let c=b.join("\0");if(null!==v&&v.sheet_name===a&&v.tags_key===c)return v.snapshot;let d=0===b.length?u:Object.freeze([...b]);return v={sheet_name:a,tags_key:c,snapshot:d},d}function x(){return u}let y=new Set;function z(a){return y.add(a),()=>{y.delete(a)}}var A=a.i(19702);function B(a,b){let c={};0===b.length?delete c[a]:c[a]=b;try{window.localStorage.setItem(A.SHEET_TAG_FILTERS_STORAGE_KEY,JSON.stringify(c))}catch{}v=null,y.forEach(a=>{a()})}function C(a,b){try{return s(a)===s(b)}catch{return!1}}var D=a.i(78702);function E(){return(0,c.useSyncExternalStore)(D.tag_filter_mode_preference.subscribe,D.tag_filter_mode_preference.get_snapshot,D.tag_filter_mode_preference.get_server_snapshot)}function F({sheet_name:a,sheet_tags:d}){let f=E(),g=(0,c.useSyncExternalStore)(z,()=>w(a),x);if((0,c.useEffect)(()=>{!function(a,b){let c=t(a);if(0===c.length)return;let d=c.filter(a=>b.some(b=>C(a,b)));d.length!==c.length&&B(a,d)}(a,d.map(a=>a.name))},[a,d]),0===d.length)return null;let h=g.length>0;return(0,b.jsxs)("fieldset",{className:"m-0 rounded-lg border border-panel-border bg-panel p-3.5 shadow-sm compact:p-3",children:[(0,b.jsx)("legend",{className:"px-0.5 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Filter by tag"}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,b.jsx)("p",{className:"m-0 shrink-0 text-[0.8rem] leading-snug text-muted",children:"any"===f?"Show entries that include any selected tag.":"Show entries that include every selected tag."}),(0,b.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap justify-end gap-1.5",role:"group","aria-label":"Filter by tag",children:d.map(c=>{let d=g.some(a=>C(a,c.name));return(0,b.jsxs)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost","small")} ${d?"border-accent-border bg-accent-soft text-foreground":""}`,"aria-pressed":d,onClick:()=>{let b,d;return b=s(c.name),void((d=t(a)).some(a=>C(a,b))?B(a,d.filter(a=>!C(a,b))):B(a,[...d,b]))},children:[(0,r.format_display_tag)(c.name),(0,b.jsxs)("span",{className:"ml-1 font-normal text-muted",children:["(",c.entryCount,")"]})]},c.name)})})]}),h?(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost","small")} mt-2.5`,onClick:()=>B(a,[]),children:"Clear filter"}):null]})}let G="inline-flex shrink-0 cursor-pointer items-center gap-1.5";function H({checked:a,disabled:d=!1,indeterminate:e=!1,nested:f=!1,on_change:g,label:h,aria_label:i,className:j}){let k=(0,c.useRef)(null);(0,c.useEffect)(()=>{null!==k.current&&(k.current.indeterminate=e)},[e]);let l=void 0===j?G:`${G} ${j}`,m=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("input",{ref:k,type:"checkbox",className:"peer absolute m-0 h-px w-px overflow-hidden opacity-0",checked:a,disabled:d,"aria-label":f&&void 0===h?i:void 0,onChange:g}),(0,b.jsx)("span",{className:'relative block h-[0.85rem] w-[0.85rem] shrink-0 rounded-[0.2rem] border border-panel-border bg-input-bg box-border transition-[background-color,border-color] duration-150 peer-checked:border-accent peer-checked:bg-accent peer-indeterminate:border-accent peer-indeterminate:bg-accent peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-input-focus-border peer-focus-visible:outline-offset-1 peer-disabled:cursor-not-allowed peer-disabled:opacity-55 after:absolute after:left-1/2 after:top-[44%] after:hidden after:h-[0.28rem] after:w-[0.45rem] after:-translate-x-1/2 after:-translate-y-[60%] after:rotate-[-45deg] after:border-b-[1.5px] after:border-l-[1.5px] after:border-accent-text-on after:content-[""] peer-checked:after:block peer-indeterminate:after:top-1/2 peer-indeterminate:after:block peer-indeterminate:after:h-[1.5px] peer-indeterminate:after:w-[0.45rem] peer-indeterminate:after:-translate-x-1/2 peer-indeterminate:after:-translate-y-1/2 peer-indeterminate:after:rotate-0 peer-indeterminate:after:border-0 peer-indeterminate:after:bg-accent-text-on',"aria-hidden":"true"})]});return f?(0,b.jsx)("span",{className:l,children:m}):(0,b.jsxs)("label",{className:l,children:[m,void 0!==h?(0,b.jsx)("span",{className:"select-none text-[0.8rem] leading-tight text-muted",children:h}):null]})}function I(){return(0,b.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M4 7h16"}),(0,b.jsx)("path",{d:"M4 12h16"}),(0,b.jsx)("path",{d:"M4 17h16"})]})}var J=a.i(46299);function K(a,b=!0){let d=(0,c.useRef)(a);d.current=a,(0,c.useEffect)(()=>{if(!b)return;let a=a=>{"Escape"!==a.key||(0,J.is_modal_dialog_open)()||(a.preventDefault(),d.current())};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[b])}let L="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function M({current_sheet_name:a,sheets:d,is_pending:e,on_edit:f,on_add_note:g,on_show_add_note_form:h,on_resume:i,entry_is_active:j=!1,on_delete:k,on_move:l}){let m=d.find(b=>b.name===a),n=j||m?.hasActiveEntry===!0&&!j,o=d.filter(b=>b.name!==a),[p,q]=(0,c.useState)(!1),r=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!p)return;let a=a=>{null===r.current||r.current.contains(a.target)||q(!1)};return document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a)}},[p]);let s=()=>{q(!1)};return K(s,p),(0,b.jsxs)("div",{className:"relative shrink-0",ref:r,children:[(0,b.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":"Entry actions","aria-expanded":p,"aria-haspopup":"menu",disabled:e,onClick:()=>q(a=>!a),children:(0,b.jsx)(I,{})}),p?(0,b.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:L,role:"menuitem",disabled:e,onClick:()=>{s(),f()},children:"Edit times"})}),void 0!==h||void 0!==g?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:L,role:"menuitem",disabled:e,onClick:()=>{if(s(),void 0!==h)return void h();let a=function(){let a=window.prompt("Add note","");if(null===a)return null;let b=a.trim();return 0===b.length?null:b}();null!==a&&void 0!==g&&g(a)},children:"Add note"})}):null,void 0!==i?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:L,role:"menuitem",disabled:e||n,title:n?j?"This entry is already active":"Another entry is active on this sheet":void 0,onClick:()=>{s(),i()},children:"Resume"})}):null,(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("p",{className:"m-0 px-2.5 py-0.5 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Move to sheet"})}),0===o.length?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:L,role:"menuitem",disabled:!0,children:"No other sheets"})}):o.map(a=>(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${L} pl-4`,role:"menuitem",disabled:e||a.hasActiveEntry,title:a.hasActiveEntry?"That sheet already has an active entry":void 0,onClick:()=>{s(),l(a.name)},children:a.name})},a.name)),(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${L} text-danger`,role:"menuitem",disabled:e,onClick:()=>{s(),k()},children:"Delete"})})]}):null]})}function N({rotated:a=!1,className:c=""}){return(0,b.jsx)("svg",{className:`h-3 w-3 shrink-0 transition-transform duration-150 ${a?"rotate-90":""} ${c}`.trim(),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,b.jsx)("path",{d:"m9 18 6-6-6-6"})})}var O=a.i(93301);function P(a,b="12h"){return(0,O.format)(new Date(a),"24h"===b?"HH:mm":"h:mm a")}function Q({initial_text:a,is_pending:d,inline:g=!1,on_save:h,on_cancel:i}){let[j,k]=(0,c.useState)(a);K(i);let l=Math.min(6,Math.max(2,a.split("\n").length)),m=g?`${(0,f.get_input_class_name)()} min-h-10 w-full resize-y text-xs leading-snug`:`${(0,f.get_input_class_name)()} min-h-10 w-full resize-y text-[0.85rem] leading-snug`;return(0,b.jsxs)("form",{className:"flex w-full flex-col gap-1.5",onSubmit:a=>{a.preventDefault();let b=j.trim();0!==b.length&&h(b)},onClick:a=>a.stopPropagation(),children:[(0,b.jsx)("textarea",{className:m,value:j,rows:l,disabled:d,onChange:a=>k(a.target.value)}),(0,b.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("ghost"),disabled:d,onClick:i,children:"Cancel"}),(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("ghost"),disabled:d||0===j.trim().length,children:"Save"})]})]})}function R(){return(0,b.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M12 20h9"}),(0,b.jsx)("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}function S(){return(0,b.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M3 6h18"}),(0,b.jsx)("path",{d:"M8 6V4h8v2"}),(0,b.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),(0,b.jsx)("path",{d:"M10 11v6"}),(0,b.jsx)("path",{d:"M14 11v6"})]})}var T=a.i(50825);function U(){return(0,c.useSyncExternalStore)(T.time_format_preference.subscribe,T.time_format_preference.get_snapshot,T.time_format_preference.get_server_snapshot)}let V="inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border-0 bg-transparent p-0 text-muted hover:bg-surface-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55";function W({notes:a,variant:d="panel",in_bar:e=!1,is_pending:f=!1,on_edit_note:g,on_delete_note:h}){let i=U(),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(!1);if(0===a.length)return null;let n=[...a].sort((a,b)=>new Date(a.timestamp).getTime()-new Date(b.timestamp).getTime()),o="inline"===d,p=l||null!==j,q=o?`${a.length} ${1===a.length?"note":"notes"}`:`Notes (${a.length})`,r=[o?"m-0 w-full p-0":"border-t border-accent-border pt-3.5",e&&!o?"border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))]":""].filter(Boolean).join(" "),s=o?`m-0 flex list-none flex-col gap-1.5 overflow-visible p-0 compact:gap-0.5 ${p?"mt-1.5":"hidden"}`:`m-0 grid max-h-48 list-none grid-cols-2 gap-2 overflow-y-auto p-0 max-[860px]:grid-cols-1 ${p?"mt-1.5":"hidden"}`,t=o?"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-ghost-bg px-2 py-1.5 compact:rounded-none compact:px-1.5 compact:py-1":"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-[color-mix(in_srgb,var(--panel)_55%,var(--background))] px-2.5 py-2",u=a=>void 0===g&&void 0===h?null:(0,b.jsxs)("div",{className:"flex shrink-0 gap-0.5",children:[void 0!==g?(0,b.jsx)("button",{type:"button",className:V,"aria-label":"Edit note",title:"Edit note",disabled:f,onClick:b=>{var c;b.stopPropagation(),c=a.timestamp,m(!0),k(c)},children:(0,b.jsx)(R,{})}):null,void 0!==h?(0,b.jsx)("button",{type:"button",className:`${V} hover:text-danger`,"aria-label":"Delete note",title:"Delete note",disabled:f,onClick:b=>{var c;b.stopPropagation(),j===(c=a.timestamp)&&k(null),h?.(c)},children:(0,b.jsx)(S,{})}):null]});return(0,b.jsxs)("section",{className:r,"aria-label":"Entry notes",children:[(0,b.jsxs)("button",{type:"button",className:o?"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 font-inherit text-xs font-medium normal-case tracking-normal text-muted hover:text-foreground":"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent px-0 py-0.5 font-inherit text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted hover:text-foreground","aria-expanded":p,onClick:a=>{a.stopPropagation(),null===j&&m(a=>!a)},children:[(0,b.jsx)(N,{rotated:p}),(0,b.jsx)("span",{children:q})]}),(0,b.jsx)("ul",{className:s,children:n.map((a,c)=>{let d=j===a.timestamp;return(0,b.jsx)("li",{className:t,children:d?(0,b.jsx)(Q,{initial_text:a.text,inline:o,is_pending:f,on_cancel:()=>k(null),on_save:b=>{var c;return c=a.timestamp,void(g?.(c,b),k(null))}}):o?(0,b.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,b.jsxs)("p",{className:"m-0 flex min-w-0 flex-1 items-baseline gap-1.5 text-xs leading-snug text-foreground compact:text-[0.72rem]",children:[(0,b.jsx)("time",{className:"shrink-0 font-mono text-[0.68rem] text-muted",dateTime:a.timestamp,children:P(a.timestamp,i)}),(0,b.jsx)("span",{className:"min-w-0 overflow-wrap-anywhere whitespace-pre-wrap",children:a.text})]}),u(a)]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,b.jsx)("time",{className:"font-mono text-[0.72rem] text-muted",dateTime:a.timestamp,children:P(a.timestamp,i)}),u(a)]}),(0,b.jsx)("p",{className:"m-0 overflow-wrap-anywhere text-[0.9rem] leading-snug whitespace-pre-wrap",children:a.text})]})},`${a.timestamp}-${c}`)})})]})}function X(a){return(0,O.format)(new Date(a),"MMM d, h:mm a")}function Y(a,b){let c=a.trim(),d=c.length>0?c:"Untitled entry",e=b.map(a=>(0,r.format_display_tag)(a)).join(" ");return e.length>0?`${d} ${e}`.trim():d}function Z({entry:a,known_tags:g,is_pending:h,in_active_panel:i=!1,times_only:j=!1,on_save:k,on_cancel:l}){let m=(0,c.useMemo)(()=>Y(a.description,a.tags),[a.description,a.id,a.tags]),[n,o]=(0,c.useState)(m),[p,q]=(0,c.useState)(""),[r,s]=(0,c.useState)("");(0,c.useEffect)(()=>{o(Y(a.description,a.tags)),q(""),s("")},[a.description,a.id,a.sheetName,a.tags]),K(l);let t=a.isActive?"still running":X(a.end??a.start),u=j?p.trim().length>0||r.trim().length>0:n.trim()!==m.trim()||p.trim().length>0||r.trim().length>0;return(0,b.jsxs)("form",{className:`flex flex-col gap-3 rounded-[0.65rem] border border-panel-border bg-input-bg p-3 ${i?"mt-2":""}`,onSubmit:a=>{a.preventDefault();let b=n.trim(),c=p.trim(),d=r.trim(),e={};j||b===m.trim()||(e.description=b),c.length>0&&(e.start=c),d.length>0&&(e.end=d),(void 0!==e.description||void 0!==e.start||void 0!==e.end)&&k(e)},children:[(0,b.jsx)("p",{className:"m-0 text-[0.85rem] font-semibold",children:j?"Edit times":"Edit entry"}),j?null:(0,b.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-description-${a.id}`,children:[(0,b.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Description"}),(0,b.jsx)(d.TagAutocompleteInput,{id:`entry-description-${a.id}`,value:n,known_tags:g,placeholder:"e.g. crafting something @design",disabled:h,autoFocus:i,on_change:o})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)("p",{className:"m-0 text-[0.8rem] font-semibold text-muted",children:"Times (optional)"}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-2.5 max-[860px]:grid-cols-1",children:[(0,b.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-start-${a.id}`,children:[(0,b.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Start"}),(0,b.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",X(a.start)]}),(0,b.jsx)("input",{id:`entry-start-${a.id}`,className:(0,f.get_input_class_name)("compact"),value:p,onChange:a=>q(a.target.value),placeholder:"e.g. 10am, 30 minutes ago",disabled:h,autoFocus:j&&i})]}),(0,b.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-end-${a.id}`,children:[(0,b.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"End"}),(0,b.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",t]}),(0,b.jsx)("input",{id:`entry-end-${a.id}`,className:(0,f.get_input_class_name)("compact"),value:r,onChange:a=>s(a.target.value),placeholder:a.isActive?"e.g. now, 5 minutes ago":"e.g. 11:30am",disabled:h})]})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("primary","small"),disabled:h||!u,children:"Save"}),(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("ghost","small"),disabled:h,onClick:l,children:"Cancel"})]})]})}function $({selected_count:a,total_count:d,all_selected:g,some_selected:h,selected_entries:i,sheets:j,is_pending:k,on_toggle_all:l,on_move:m,on_delete:n,on_clear:o}){let[p,q]=(0,c.useState)(""),r=i.some(a=>a.isActive),s=j.filter(a=>(!r||!a.hasActiveEntry)&&i.some(b=>b.sheetName!==a.name));return(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-md border border-accent-border bg-accent-soft px-3 py-2",children:[(0,b.jsx)(H,{className:"shrink-0",checked:g,indeterminate:h,disabled:k,aria_label:g?"Deselect all entries":"Select all entries",on_change:l}),(0,b.jsxs)("p",{className:"m-0 shrink-0 text-[0.85rem] font-semibold",children:[a,(0,b.jsx)("span",{className:"text-muted",children:` of ${d} selected`})]}),(0,b.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("select",{className:`${(0,f.get_input_class_name)("compact")} min-w-32`,value:p,disabled:k||0===s.length,"aria-label":"Move to sheet",onChange:a=>q(a.target.value),children:[(0,b.jsx)("option",{value:"",children:"Move to…"}),s.map(a=>(0,b.jsx)("option",{value:a.name,children:a.name},a.name))]}),(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("ghost","small"),disabled:k||0===p.trim().length||0===s.length,onClick:()=>{let a=p.trim();0!==a.length&&(m(a),q(""))},children:"Move"})]}),(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("danger","small"),disabled:k,onClick:n,children:"Delete"}),(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost","small")} shrink-0`,disabled:k,"aria-label":"Clear selection",title:"Clear selection",onClick:o,children:"✕"})]})]})}var _=a.i(14945),aa=a.i(79918),ab=a.i(57077);function ac(){return(0,c.useSyncExternalStore)(aa.entry_list_sort_preference.subscribe,aa.entry_list_sort_preference.get_snapshot,aa.entry_list_sort_preference.get_server_snapshot)}let ad=(0,_.get_entry_list_sort_options)();function ae({is_pending:a=!1}){let c=ac();return(0,b.jsxs)("fieldset",{className:"m-0 flex flex-wrap items-center gap-x-2 gap-y-1.5 border-0 p-0",children:[(0,b.jsx)("legend",{className:"sr-only",children:"Order entries by"}),(0,b.jsx)("span",{className:"shrink-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Order by"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1",role:"group","aria-label":"Order entries by",children:ad.map(d=>{let f=c===d.value;return(0,b.jsx)("button",{type:"button",className:f?(0,e.get_button_class_name)("primary","small"):(0,e.get_button_class_name)("ghost","small"),disabled:a,"aria-pressed":f,onClick:()=>(0,ab.persist_ui_preference)(aa.entry_list_sort_preference,d.value),children:d.label},d.value)})})]})}function af(a){let b=a.description.trim()||"Untitled entry",c=a.isActive?" This will stop the active timer.":"";return{title:"Delete entry?",message:`Delete "${b}" on sheet "${a.sheetName}"?${c}`,confirmLabel:"Delete",variant:"danger"}}var ag=a.i(85752);function ah(a){return`${a.sheetName}-${a.id}`}var ai=a.i(32297);function aj(){return"true"===(0,c.useSyncExternalStore)(ai.confirm_destructive_actions_preference.subscribe,ai.confirm_destructive_actions_preference.get_snapshot,ai.confirm_destructive_actions_preference.get_server_snapshot)}var ak=a.i(65162);function al({title:a,entries:d,sheets:e,known_tags:f,total_ms:g,empty_message:h,is_pending:i,show_sheet_name:j=!0,on_delete:k,on_edit:l,on_move:n,on_move_many:o,on_delete_many:p,on_edit_note:q,on_add_note:s,on_resume:t}){let{confirm:u}=(0,m.use_confirm_dialog)(),v=aj(),w=U(),x=(0,ak.use_duration_format)(),[y,z]=(0,c.useState)(null),[A,B]=(0,c.useState)(()=>new Set),C=d.map(a=>ah(a)),D=d.filter(a=>A.has(ah(a))),E=d.length>0&&D.length===d.length,F=D.length>0&&D.length<d.length;(0,c.useEffect)(()=>{B(a=>{let b=new Set(C),c=new Set([...a].filter(a=>b.has(a)));return c.size===a.size?a:c})},[C.join("|")]);let G=()=>{E?B(new Set):B(new Set(C))},I=()=>{B(new Set)},J=async()=>{let a,b,c;0!==D.length&&(!v||await u((a=D.length,b=D.some(a=>a.isActive),c=1===a?"1 entry":`${a} entries`,{title:1===a?"Delete entry?":"Delete entries?",message:`Permanently delete ${c}?${b?" This will stop the active timer.":""}`,confirmLabel:"Delete",variant:"danger"})))&&(p(D),I())},L=D.length>0;return K(I,L&&null===y),(0,b.jsxs)("section",{className:"min-w-0",children:[(0,b.jsx)("header",{className:"mb-3 flex flex-col gap-2 border-b border-panel-border pb-2.5 compact:mb-2 compact:pb-1.5",children:L?(0,b.jsx)($,{selected_count:D.length,total_count:d.length,all_selected:E,some_selected:F,selected_entries:D,sheets:e,is_pending:i,on_toggle_all:G,on_move:a=>{o(D,a),I()},on_delete:()=>void J(),on_clear:I}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[d.length>0?(0,b.jsx)(H,{className:"shrink-0",checked:E,indeterminate:F,disabled:i,aria_label:"Select all entries",on_change:G}):null,(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em]",children:a}),(0,b.jsx)("span",{className:"text-[0.8rem] text-muted",children:0===d.length?null:1===d.length?"1 entry":`${d.length} entries`})]}),(0,b.jsxs)("p",{className:"m-0 font-mono text-[0.85rem] text-muted",children:[(0,ag.format_duration)(g,x)," total"]})]}),(0,b.jsx)(ae,{is_pending:i})]})}),0===d.length?(0,b.jsx)("p",{className:"m-0 text-muted",children:h}):(0,b.jsx)(b.Fragment,{children:(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col p-0",children:d.map(a=>{let c=ah(a),d=y===c,g=A.has(c);return d?(0,b.jsx)("li",{className:"block border-b border-panel-border py-2.5 last:border-b-0 compact:py-1.5",children:(0,b.jsx)(Z,{entry:a,known_tags:f,is_pending:i,on_cancel:()=>z(null),on_save:b=>{l(a,b),z(null)}})},c):(0,b.jsxs)("li",{className:`group relative flex flex-col gap-0 border-b border-panel-border px-2 py-2.5 transition-colors duration-150 last:border-b-0 hover:bg-surface-hover compact:py-1.5 ${g?"bg-accent-soft hover:bg-accent-soft":""}`,children:[(0,b.jsxs)("div",{className:"flex w-full min-w-0 items-center gap-2.5 compact:gap-1.5",children:[(0,b.jsxs)("label",{className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 has-disabled:cursor-not-allowed","aria-label":`Select entry ${a.description||"Untitled entry"}`,children:[(0,b.jsx)(H,{nested:!0,className:`shrink-0 pr-1 transition-opacity duration-150 compact:pr-0.5 ${g||L?"opacity-100":"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`,checked:g,disabled:i,on_change:()=>{B(a=>{let b=new Set(a);return b.has(c)?b.delete(c):b.add(c),b})}}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-semibold leading-snug compact:text-[0.9rem] compact:leading-tight",children:a.description||"Untitled entry"}),(0,b.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-1 text-[0.8rem] text-muted compact:mt-px compact:gap-0.5 compact:text-[0.72rem]",children:[j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:a.sheetName}),(0,b.jsx)("span",{children:"·"})]}):null,(0,b.jsxs)("span",{children:["#",a.id]}),(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{className:"whitespace-nowrap",children:[P(a.start,w),null===a.end?" → now":` → ${P(a.end,w)}`]}),a.tags.length>0?(0,b.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1 p-0",children:a.tags.map(a=>(0,b.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,r.format_display_tag)(a)},a))}):null]})]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 flex-row items-center gap-2 max-[860px]:flex-wrap max-[860px]:justify-end compact:gap-1.5",children:[(0,b.jsx)("p",{className:`m-0 whitespace-nowrap text-right font-mono text-[0.9rem] text-muted compact:text-[0.8rem] ${a.isActive?"text-accent":""}`,children:(0,ag.format_duration)(a.durationMs,x)}),(0,b.jsx)(M,{current_sheet_name:a.sheetName,sheets:e,is_pending:i,on_edit:()=>z(c),on_add_note:b=>s(a,b),on_resume:()=>t(a),entry_is_active:a.isActive,on_move:b=>n(a,b),on_delete:async()=>{(!v||await u(af(a)))&&k(a)}})]})]}),a.notes.length>0?(0,b.jsx)("div",{className:"w-full pt-1 pl-[calc(0.85rem+0.5rem+0.35rem)] compact:pt-0.5 compact:pl-[calc(0.85rem+0.35rem+0.2rem)]",children:(0,b.jsx)(W,{notes:a.notes,variant:"inline",is_pending:i,on_edit_note:(b,c)=>q(a,b,c)})}):null]},c)})})})]})}let am="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function an({sheet_name:a,is_pending:d,can_delete:e,on_rename:f,on_delete:g}){let[h,i]=(0,c.useState)(!1),j=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!h)return;let a=a=>{null===j.current||j.current.contains(a.target)||i(!1)};return document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a)}},[h]);let k=()=>{i(!1)};return(0,b.jsxs)("div",{className:"relative shrink-0 self-center",ref:j,children:[(0,b.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":`Actions for sheet ${a}`,"aria-expanded":h,"aria-haspopup":"menu",disabled:d,onClick:()=>i(a=>!a),children:(0,b.jsx)(I,{})}),h?(0,b.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:am,role:"menuitem",disabled:d,onClick:()=>{k(),f()},children:"Rename"})}),(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${am} text-danger`,role:"menuitem",disabled:d||!e,title:e?void 0:"Cannot delete the last sheet",onClick:()=>{k(),g()},children:"Delete sheet"})})]}):null]})}function ao({sheets:a,db_path:d,on_select:g,on_create:h,on_rename:i,on_delete:j,is_pending:k}){let{confirm:l}=(0,m.use_confirm_dialog)(),n=aj(),o=a.length>1,[p,q]=(0,c.useState)(""),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(""),v=()=>{s(null),u("")};K(v,null!==r);let w=a=>{if(a.preventDefault(),null===r)return;let b=t.trim();0===b.length||b===r||i(r,b),v()};return(0,b.jsxs)("aside",{className:"flex min-w-0 flex-col gap-3 max-[860px]:min-w-0",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Sheets"}),(0,b.jsx)("ul",{className:"m-0 flex min-h-0 flex-1 list-none flex-col gap-1.5 p-0",children:a.map(a=>(0,b.jsx)("li",{className:"min-w-0",children:r===a.name?(0,b.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-1.5",onSubmit:w,children:[(0,b.jsx)("input",{className:(0,f.get_input_class_name)("compact"),value:t,onChange:a=>u(a.target.value),disabled:k,autoFocus:!0}),(0,b.jsxs)("div",{className:"flex gap-1.5",children:[(0,b.jsx)("button",{type:"submit",className:`${(0,e.get_button_class_name)("ghost")} flex-1`,disabled:k||0===t.trim().length,children:"Save"}),(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost")} flex-1`,disabled:k,onClick:v,children:"Cancel"})]})]}):(0,b.jsxs)("div",{className:"flex min-w-0 items-stretch gap-1",children:[(0,b.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 rounded-md border border-transparent bg-transparent px-2.5 py-2 text-left transition-[background-color,color] duration-150 hover:bg-surface-hover",disabled:k,onClick:()=>g(a.name),children:[(0,b.jsx)("span",{className:`min-w-0 flex-1 truncate font-semibold ${a.isActive||a.hasActiveEntry?"text-accent":""}`,children:a.name}),(0,b.jsx)("span",{className:`shrink-0 text-xs whitespace-nowrap ${a.hasActiveEntry?"text-accent":"text-muted"}`,children:a.hasActiveEntry?"● active":`${a.entryCount} entries`})]}),(0,b.jsx)(an,{sheet_name:a.name,is_pending:k,can_delete:o,on_rename:()=>{var b;s(b=a.name),u(b)},on_delete:async()=>{var b,c,d;let e;(!n||await l((b=a.name,c=a.entryCount,d=a.hasActiveEntry,e=0===c?"":` This will delete ${c} ${1===c?"entry":"entries"}.`,{title:"Delete sheet?",message:`Delete "${b}"?${e}${d?" This will stop the active timer.":""}`,confirmLabel:"Delete sheet",variant:"danger"})))&&j(a.name)}})]})},a.name))}),(0,b.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-2",onSubmit:a=>{a.preventDefault();let b=p.trim();0!==b.length&&(h(b),q(""))},children:[(0,b.jsx)("input",{className:(0,f.get_input_class_name)("compact"),value:p,onChange:a=>q(a.target.value),placeholder:"New sheet name",disabled:k}),(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("ghost"),disabled:k||0===p.trim().length,children:"Add"})]}),(0,b.jsx)("p",{className:"mt-auto shrink-0 overflow-wrap-anywhere border-t border-panel-border pt-3 font-mono text-[0.65rem] leading-snug text-muted",title:d,children:d})]})}function ap({entry:a,known_tags:f,is_pending:g,on_save:h,on_cancel:i}){let j=(0,c.useMemo)(()=>Y(a.description,a.tags),[a.description,a.id,a.tags]),[k,l]=(0,c.useState)(j);return(0,c.useEffect)(()=>{l(Y(a.description,a.tags))},[a.description,a.id,a.sheetName,a.tags]),K(i),(0,b.jsxs)("form",{className:"flex min-w-0 flex-1 flex-col gap-2",onSubmit:a=>{a.preventDefault();let b=k.trim();b===j.trim()?i():h(b)},children:[(0,b.jsx)(d.TagAutocompleteInput,{id:`active-entry-description-${a.id}`,value:k,known_tags:f,placeholder:"e.g. crafting something @design",disabled:g,autoFocus:!0,on_change:l}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("primary","small"),disabled:g||k.trim()===j.trim(),children:"Save"}),(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("ghost","small"),disabled:g,onClick:i,children:"Cancel"})]})]})}let aq=`${(0,e.get_button_class_name)("danger")} text-white rounded-none first:rounded-l-[0.65rem] last:rounded-r-[0.65rem] not-first:-ml-px not-first:min-w-12 not-first:border-l not-first:border-l-[color-mix(in_srgb,var(--danger-text)_30%,var(--background))] max-[860px]:flex-1 max-[860px]:basis-1/2`;function ar({in_bar:a=!1,is_pending:c,on_check_out:d}){let e=o(d);return(0,b.jsxs)("div",{className:`inline-flex shrink-0 ${a?"min-w-0 max-[860px]:w-full":"min-w-30 max-[860px]:w-full"}`,children:[(0,b.jsx)("button",{type:"button",className:aq,disabled:c,onClick:()=>void e(),children:"Check out"}),(0,b.jsx)("button",{type:"button",className:aq,disabled:c,title:"Check out at a specific time",onClick:()=>{let a=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}();null!==a&&e(a)},children:"@"})]})}function as({on_submit:a,on_cancel:d,is_pending:g,in_active_panel:h=!1,in_bar:i=!1,allow_at:j=!1}){let[k,l]=(0,c.useState)(""),[m,n]=(0,c.useState)("");return K(()=>d?.(),void 0!==d),(0,b.jsxs)("form",{className:`flex flex-col gap-2 ${h&&!i?"border-t border-accent-border pt-4":i?"border-t border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))] pt-3.5":""}`,onSubmit:b=>{b.preventDefault();let c=k.trim();if(0===c.length)return;let d=m.trim();a(c,d.length>0?d:void 0),l(""),n("")},children:[(0,b.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-text",children:"Add note"}),(0,b.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,b.jsx)("input",{id:"note-text",className:(0,f.get_input_class_name)(),value:k,onChange:a=>l(a.target.value),placeholder:"Pair with alice on the widget",disabled:g,autoFocus:!0}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2 max-[860px]:w-full",children:[(0,b.jsx)("button",{type:"submit",className:(0,e.get_button_class_name)("ghost"),disabled:g||0===k.trim().length,children:"Save note"}),void 0!==d?(0,b.jsx)("button",{type:"button",className:(0,e.get_button_class_name)("ghost"),disabled:g,onClick:d,children:"Cancel"}):null]})]}),j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-at",children:["Note time"," ",(0,b.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,b.jsx)("input",{id:"note-at",className:(0,f.get_input_class_name)(),value:m,onChange:a=>n(a.target.value),placeholder:"e.g. 30 minutes ago",disabled:g})]}):null]})}var at=a.i(99751);function au(){return"true"===(0,c.useSyncExternalStore)(at.timer_show_seconds_preference.subscribe,at.timer_show_seconds_preference.get_snapshot,at.timer_show_seconds_preference.get_server_snapshot)}let av=(0,c.forwardRef)(function({entry:a,sheets:d,known_tags:f,in_bar:g=!1,on_check_out:h,on_delete:i,on_edit:j,on_move:k,on_add_note:l,on_edit_note:n,on_delete_note:o,is_pending:p},q){var s;let t,{confirm:u}=(0,m.use_confirm_dialog)(),v=aj(),w=(0,ak.use_duration_format)(),x=au(),[y,z]=(0,c.useState)(a.durationMs),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(!1),[E,F]=(0,c.useState)(!1);(0,c.useImperativeHandle)(q,()=>({start_edit:()=>{A||C||B(!0)},start_add_note:()=>{A||C||E||F(!0)}}),[E,A,C]),(0,c.useEffect)(()=>{F(!1),B(!1),D(!1)},[a.id,a.sheetName]),(0,c.useEffect)(()=>{z(a.durationMs);let b=window.setInterval(()=>{z(Date.now()-new Date(a.start).getTime())},1e3);return()=>window.clearInterval(b)},[a.durationMs,a.start]);let G=(s=A||C,t="flex flex-col gap-4 rounded-lg border border-accent-border p-[1.1rem] shadow-sm",g?s?`${t} rounded-md border border-accent-border bg-[color-mix(in_srgb,var(--panel)_70%,var(--background))] p-3.5`:"flex flex-col gap-3.5 border-0 bg-transparent p-0 shadow-none":`${t} bg-[image:var(--active-panel-bg)]`),H=async b=>{let c,d,e=a.notes.find(a=>a.timestamp===b);(!v||await u({title:"Delete note?",message:(d=(c=(e?.text??"").trim()).length>80?`${c.slice(0,80)}…`:c).length>0?`Remove this note? "${d}"`:"Remove this note?",confirmLabel:"Delete",variant:"danger"}))&&o(b)};return C?(0,b.jsx)("section",{className:G,children:(0,b.jsx)(Z,{entry:a,known_tags:f,is_pending:p,in_active_panel:!0,times_only:!0,on_cancel:()=>D(!1),on_save:a=>{j(a),D(!1)}})}):(0,b.jsxs)("section",{className:G,children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[g?null:(0,b.jsx)("span",{className:"self-start rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),A?(0,b.jsx)(ap,{entry:a,known_tags:f,is_pending:p,on_cancel:()=>B(!1),on_save:a=>{j({description:a}),B(!1)}}):(0,b.jsxs)("div",{className:"inline-flex max-w-full flex-wrap items-center gap-1",children:[(0,b.jsx)("h2",{className:"m-0 text-xl font-[650] leading-tight tracking-tight",children:a.description||"Untitled entry"}),(0,b.jsx)("button",{type:"button",className:"inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border-0 bg-transparent p-0 text-muted hover:bg-surface-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55","aria-label":"Edit description",title:"Edit description",disabled:p||E,onClick:()=>B(!0),children:(0,b.jsx)(R,{})})]})]}),(0,b.jsx)(M,{current_sheet_name:a.sheetName,sheets:d,is_pending:p,on_edit:()=>D(!0),on_show_add_note_form:()=>F(!0),on_move:k,on_delete:async()=>{(!v||await u(af(a)))&&i()}})]}),(0,b.jsxs)("div",{className:"flex items-end justify-between gap-4 max-[860px]:flex-col max-[860px]:items-stretch",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,b.jsx)("p",{className:"m-0 font-mono text-[2rem] font-medium leading-none tracking-tight text-accent",children:(0,ag.format_duration)(y,w,x)}),!A&&a.tags.length>0?(0,b.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1.5 p-0",children:a.tags.map(a=>(0,b.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,r.format_display_tag)(a)},a))}):null]}),(0,b.jsxs)("div",{className:`inline-flex shrink-0 items-center gap-2 ${g?"min-w-0 max-[860px]:w-full max-[860px]:justify-end":"min-w-30 max-[860px]:w-full max-[860px]:justify-stretch"}`,children:[E?null:(0,b.jsx)("button",{type:"button",className:`${(0,e.get_button_class_name)("ghost")} max-[860px]:flex-1`,disabled:p||A,onClick:()=>F(!0),children:"Add note"}),(0,b.jsx)(ar,{in_bar:g,is_pending:p,on_check_out:h})]})]}),(0,b.jsx)(W,{notes:a.notes,variant:"panel",in_bar:g,is_pending:p,on_edit_note:n,on_delete_note:H}),E?(0,b.jsx)(as,{in_active_panel:!0,in_bar:g,allow_at:!0,is_pending:p,on_cancel:()=>F(!1),on_submit:(a,b)=>{l(a,b),F(!1)}}):null]})}),aw=(0,c.forwardRef)(function({active_entry:a,sheets:c,known_tags:d,is_pending:e,on_check_out:f,on_delete:g,on_edit:h,on_move:i,on_add_note:j,on_edit_note:k,on_delete_note:l},m){return(0,b.jsx)("div",{className:"w-full border-b border-panel-border bg-[color-mix(in_srgb,var(--accent-soft)_55%,var(--panel))]",children:(0,b.jsx)("div",{className:"mx-auto flex w-full max-w-[1120px] flex-col gap-3 px-5 py-3.5 max-[860px]:gap-2.5 max-[860px]:py-3",children:null!==a?(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted whitespace-nowrap truncate",children:["Sheet ",a.sheetName]}),(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"})]}),(0,b.jsx)(av,{ref:m,entry:a,sheets:c,known_tags:d,in_bar:!0,is_pending:e,on_check_out:f,on_delete:g,on_edit:h,on_move:i,on_add_note:j,on_edit_note:k,on_delete_note:l},`${a.sheetName}-${a.id}`)]}):(0,b.jsx)("p",{className:"m-0 text-[0.85rem] leading-tight text-muted",children:"Not tracking"})})})});var ax=a.i(6128);let ay="super-time-tracker";function az({active_entry:a}){let b="true"===(0,c.useSyncExternalStore)(ax.timer_in_title_preference.subscribe,ax.timer_in_title_preference.get_snapshot,ax.timer_in_title_preference.get_server_snapshot),d=(0,ak.use_duration_format)(),e=au(),[f,g]=(0,c.useState)(a?.durationMs??0);return(0,c.useEffect)(()=>{if(null===a)return void g(0);g(a.durationMs);let b=window.setInterval(()=>{g(Date.now()-new Date(a.start).getTime())},1e3);return()=>window.clearInterval(b)},[a]),(0,c.useEffect)(()=>{if(!b||null===a){document.title=ay;return}let c=a.description.trim()||"Tracking",g=(0,ag.format_duration)(f,d,e);return document.title=`${g} — ${c}`,()=>{document.title=ay}},[a,d,f,e,b]),null}var aA=a.i(98790),aB=a.i(84365);async function aC(a,b){let c=await fetch(a,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json()).error??"Request failed");return await c.json()}async function aD(a,b){let c=await fetch(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json()).error??"Request failed");return await c.json()}async function aE(a,b){let c=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json()).error??"Request failed");return await c.json()}function aF(a){}var aG=a.i(35822);a.s(["TrackerApp",0,function({initial_state:a}){let[d,e]=(0,c.useState)(a),[f,g]=(0,c.useState)(null),[h,j]=(0,c.useState)(!1);(0,c.useEffect)(()=>{aF(a)},[a]);let k=async a=>{j(!0),g(null);try{let b=await a();aF(b),e(b)}catch(a){g(a instanceof Error?a.message:String(a))}finally{j(!1)}},l=d.sheets.find(a=>a.isActive)?.name??"main",m=E(),n=ac(),o="true"===(0,c.useSyncExternalStore)(aG.clear_tag_filters_on_sheet_change_preference.subscribe,aG.clear_tag_filters_on_sheet_change_preference.get_snapshot,aG.clear_tag_filters_on_sheet_change_preference.get_server_snapshot),p=(0,c.useRef)(null),r=(0,c.useRef)(null),t=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!o||null===p.current||p.current===l){p.current=l;return}B(l,[]),p.current=l},[l,o]);let u=(0,c.useSyncExternalStore)(z,()=>w(l),x),v=(0,c.useMemo)(()=>(function(a){let b=new Map;for(let c of a){let a=new Set;for(let d of c.tags)try{let c=s(d);if(a.has(c))continue;a.add(c),b.set(c,(b.get(c)??0)+1)}catch{continue}}return[...b.entries()].map(([a,b])=>({name:a,entryCount:b})).sort((a,b)=>a.name.localeCompare(b.name))})(d.activeSheetEntries),[d.activeSheetEntries]),y=(0,c.useMemo)(()=>{let a=[...function(a,b,c="all"){return 0===b.length?a:a.filter(a=>(function(a,b,c="all"){return 0===b.length||("any"===c?b.some(b=>a.tags.some(a=>C(a,b))):b.every(b=>a.tags.some(a=>C(a,b))))})(a,b,c))}(d.activeSheetEntries,u,m)];switch(n){case"oldest":return a.sort((a,b)=>new Date(a.start).getTime()-new Date(b.start).getTime());case"duration":return a.sort((a,b)=>b.durationMs-a.durationMs);case"description":return a.sort((a,b)=>{let c=a.description.trim()||"Untitled entry",d=b.description.trim()||"Untitled entry";return c.localeCompare(d)});default:return a.sort((a,b)=>new Date(b.start).getTime()-new Date(a.start).getTime())}},[d.activeSheetEntries,u,m,n]),A=(0,c.useMemo)(()=>(0,aB.get_serialized_entries_total_ms)(y),[y]),D=u.length>0?"any"===m?`No entries on sheet "${l}" match any selected tag.`:`No entries on sheet "${l}" match all selected tags.`:`No entries on sheet "${l}".`,G=(a,b,c)=>aD("/api/entry",{sheetName:a,entryId:b,...c});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(az,{active_entry:d.activeEntry}),(0,b.jsx)(q,{sheets:d.sheets,active_sheet_name:l,active_entry:d.activeEntry,is_pending:h,check_in_form_ref:r,active_entry_panel_ref:t,on_select_sheet:a=>k(()=>aE("/api/sheet",{name:a})),on_check_out:a=>k(()=>aE("/api/out",{sheetName:l,...void 0!==a?{at:a}:{}}))}),(0,b.jsxs)("div",{className:"relative z-1",children:[(0,b.jsx)(aA.TrackerTopbar,{}),(0,b.jsx)(aw,{ref:t,active_entry:d.activeEntry,sheets:d.sheets,known_tags:d.knownTags,is_pending:h,on_check_out:a=>k(()=>aE("/api/out",{sheetName:l,...void 0!==a?{at:a}:{}})),on_delete:()=>k(()=>aE("/api/entry",{sheetName:l,entryId:d.activeEntry?.id})),on_edit:a=>k(()=>G(l,d.activeEntry?.id??0,a)),on_move:a=>k(()=>aE("/api/entry/move",{sheetName:l,entryId:d.activeEntry?.id,targetSheetName:a})),on_add_note:(a,b)=>k(()=>aE("/api/note",{text:a,...void 0!==b?{at:b}:{},sheetName:l,entryId:d.activeEntry?.id})),on_edit_note:(a,b)=>k(()=>aD("/api/note",{sheetName:l,entryId:d.activeEntry?.id,timestamp:a,text:b})),on_delete_note:a=>k(()=>aC("/api/note",{sheetName:l,entryId:d.activeEntry?.id,timestamp:a}))})]}),(0,b.jsxs)("div",{className:"mx-auto max-w-[1120px] px-5 pb-10 pt-5",children:[null!==f?(0,b.jsx)("p",{className:"mb-4 rounded-[0.65rem] border border-danger-border bg-danger-soft px-3 py-2.5 text-danger-text",children:f}):null,(0,b.jsxs)("div",{className:"grid grid-cols-[minmax(16rem,20rem)_minmax(0,1fr)] items-start gap-4 max-[860px]:grid-cols-1",children:[(0,b.jsx)(ao,{sheets:d.sheets,db_path:d.dbPath,is_pending:h,on_select:a=>k(()=>aE("/api/sheet",{name:a})),on_create:a=>k(()=>aE("/api/sheet",{name:a})),on_rename:(a,b)=>k(()=>aD("/api/sheet",{name:a,newName:b})),on_delete:a=>k(()=>aE("/api/sheet",{name:a,delete:!0}))}),(0,b.jsxs)("main",{className:"flex min-w-0 flex-col gap-4 rounded-lg border border-panel-border bg-panel p-4 shadow-sm",children:[null===d.activeEntry?(0,b.jsx)(i,{ref:r,known_tags:d.knownTags,is_pending:h,on_submit:a=>k(()=>aE("/api/in",{...a,sheetName:l}))}):null,(0,b.jsx)(F,{sheet_name:l,sheet_tags:v}),(0,b.jsx)(al,{title:"Entries",entries:y,sheets:d.sheets,known_tags:d.knownTags,total_ms:A,empty_message:D,is_pending:h,show_sheet_name:!1,on_delete:a=>k(()=>aE("/api/entry",{sheetName:a.sheetName,entryId:a.id})),on_edit:(a,b)=>k(()=>G(a.sheetName,a.id,b)),on_move:(a,b)=>k(()=>aE("/api/entry/move",{sheetName:a.sheetName,entryId:a.id,targetSheetName:b})),on_move_many:(a,b)=>k(()=>aE("/api/entry/move-bulk",{entries:a.map(a=>({sheetName:a.sheetName,entryId:a.id})),targetSheetName:b})),on_delete_many:a=>k(()=>aE("/api/entry/delete-bulk",{entries:a.map(a=>({sheetName:a.sheetName,entryId:a.id}))})),on_edit_note:(a,b,c)=>k(()=>aD("/api/note",{sheetName:a.sheetName,entryId:a.id,timestamp:b,text:c})),on_add_note:(a,b)=>k(()=>aE("/api/note",{sheetName:a.sheetName,entryId:a.id,text:b})),on_resume:a=>k(()=>aE("/api/in",{description:Y(a.description,a.tags),sheetName:a.sheetName}))})]})]})]})]})}],12584)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=components_tracker-app_tsx_0qs9.7y._.js.map
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/03~yq9q893hmn.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/wHoiBM1uMbUIrfXkizlyC/_buildManifest.js",
|
|
11
|
+
"static/wHoiBM1uMbUIrfXkizlyC/_ssgManifest.js",
|
|
12
|
+
"static/wHoiBM1uMbUIrfXkizlyC/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/0koldw9zjijry.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="geist_f53a3a98-module__E6rLHq__variable geist_mono_a0a08e0-module__UZhpWW__variable h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0sqkcyb268i44.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0koldw9zjijry.js"/><script src="/_next/static/chunks/05161-t.3egqv.js" async=""></script><script src="/_next/static/chunks/0708yw9dysifo.js" async=""></script><script src="/_next/static/chunks/0uezeykgodd86.js" async=""></script><script src="/_next/static/chunks/turbopack-0st0r~j~gn7ke.js" async=""></script><script src="/_next/static/chunks/0zwqf-1atzont.js" async=""></script><script src="/_next/static/chunks/0n~v8~rri7~t2.js" async=""></script><title>404: This page could not be found.</title><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>super-time-tracker</title><meta name="description" content="Web UI for the super-time-tracker CLI time sheets"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="min-h-full font-sans transition-[background-color,color] duration-200"><div hidden=""><!--$--><!--/$--></div><script>(self.__next_s=self.__next_s||[]).push([0,{"children":"(function(){try{var mk=\"super-time-tracker-theme-mode\";var tk=\"super-time-tracker-theme\";var m=localStorage.getItem(mk);if(m!=='light'\u0026\u0026m!=='dark'\u0026\u0026m!=='system'){var legacy=localStorage.getItem(tk);m=legacy==='light'||legacy==='dark'?legacy:'system';localStorage.setItem(mk,m)}var resolve=function(mode){if(mode==='light'||mode==='dark')return mode;return window.matchMedia('(prefers-color-scheme: light)').matches?'light':'dark'};var t=resolve(m);document.documentElement.setAttribute('data-theme',t);localStorage.setItem(tk,t)}catch(e){document.documentElement.setAttribute('data-theme','dark')}})();","id":"theme-init"}])</script><script>(self.__next_s=self.__next_s||[]).push([0,{"children":"(function(){try{var k=\"super-time-tracker-compact-lists\";var s=localStorage.getItem(k);var c=s==='true';document.documentElement.setAttribute('data-compact-lists',c?'true':'false');var pk=\"super-time-tracker-color-palette\";var pv=localStorage.getItem(pk);var palettes=[\"default\",\"midnight\",\"warm\",\"ocean\",\"forest\",\"contrast\"];var migrate={\"teal\":\"default\",\"blue\":\"ocean\",\"violet\":\"midnight\",\"rose\":\"warm\",\"amber\":\"warm\",\"emerald\":\"forest\"};var ak=\"super-time-tracker-accent-color\";var p=palettes.indexOf(pv)\u003e=0?pv:(migrate[localStorage.getItem(ak)]||\"default\");document.documentElement.setAttribute('data-palette',p);if(palettes.indexOf(pv)\u003c0){localStorage.setItem(pk,p)}}catch(e){document.documentElement.setAttribute('data-compact-lists','false');document.documentElement.setAttribute('data-palette',\"default\")}})();","id":"ui-settings-init"}])</script><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0koldw9zjijry.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[2263,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"\"]\n3:I[89391,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"ThemeModeSystemListener\"]\n4:I[14974,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"ConfirmDialogProvider\"]\n5:I[45452,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"AppKeyboardShortcuts\"]\n6:I[5233,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"default\"]\n7:I[73632,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"default\"]\nb:I[51709,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0sqkcyb268i44.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0sqkcyb268i44.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0zwqf-1atzont.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0n~v8~rri7~t2.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"geist_f53a3a98-module__E6rLHq__variable geist_mono_a0a08e0-module__UZhpWW__variable h-full antialiased\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full font-sans transition-[background-color,color] duration-200\",\"children\":[[\"$\",\"$L2\",null,{\"id\":\"theme-init\",\"strategy\":\"beforeInteractive\",\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var mk=\\\"super-time-tracker-theme-mode\\\";var tk=\\\"super-time-tracker-theme\\\";var m=localStorage.getItem(mk);if(m!=='light'\u0026\u0026m!=='dark'\u0026\u0026m!=='system'){var legacy=localStorage.getItem(tk);m=legacy==='light'||legacy==='dark'?legacy:'system';localStorage.setItem(mk,m)}var resolve=function(mode){if(mode==='light'||mode==='dark')return mode;return window.matchMedia('(prefers-color-scheme: light)').matches?'light':'dark'};var t=resolve(m);document.documentElement.setAttribute('data-theme',t);localStorage.setItem(tk,t)}catch(e){document.documentElement.setAttribute('data-theme','dark')}})();\"}}],[\"$\",\"$L2\",null,{\"id\":\"ui-settings-init\",\"strategy\":\"beforeInteractive\",\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var k=\\\"super-time-tracker-compact-lists\\\";var s=localStorage.getItem(k);var c=s==='true';document.documentElement.setAttribute('data-compact-lists',c?'true':'false');var pk=\\\"super-time-tracker-color-palette\\\";var pv=localStorage.getItem(pk);var palettes=[\\\"default\\\",\\\"midnight\\\",\\\"warm\\\",\\\"ocean\\\",\\\"forest\\\",\\\"contrast\\\"];var migrate={\\\"teal\\\":\\\"default\\\",\\\"blue\\\":\\\"ocean\\\",\\\"violet\\\":\\\"midnight\\\",\\\"rose\\\":\\\"warm\\\",\\\"amber\\\":\\\"warm\\\",\\\"emerald\\\":\\\"forest\\\"};var ak=\\\"super-time-tracker-accent-color\\\";var p=palettes.indexOf(pv)\u003e=0?pv:(migrate[localStorage.getItem(ak)]||\\\"default\\\");document.documentElement.setAttribute('data-palette',p);if(palettes.indexOf(pv)\u003c0){localStorage.setItem(pk,p)}}catch(e){document.documentElement.setAttribute('data-compact-lists','false');document.documentElement.setAttribute('data-palette',\\\"default\\\")}})();\"}}],[\"$\",\"$L3\",null,{}],[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"$L8\",{},null,false,null]},null,false,\"$@9\"]},null,false,null],\"$La\",false]],\"m\":\"$undefined\",\"G\":[\"$b\",[\"$Lc\"]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"nCFHHujcYM5EFaWSlUj2N\"}\n"])</script><script>self.__next_f.push([1,"d:I[83775,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"OutletBoundary\"]\ne:\"$Sreact.suspense\"\n11:I[83775,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"ViewportBoundary\"]\n13:I[83775,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"MetadataBoundary\"]\n8:[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:3:props:children:1:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:3:props:children:1:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:3:props:children:1:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:3:props:children:1:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$e\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@f\"}]}]]}]\n10:[]\n9:\"$W10\"\na:[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L11\",null,{\"children\":\"$L12\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L13\",null,{\"children\":[\"$\",\"$e\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L14\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]\nc:[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0sqkcyb268i44.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\n"])</script><script>self.__next_f.push([1,"12:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"15:I[31415,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"IconMark\"]\nf:null\n14:[[\"$\",\"title\",\"0\",{\"children\":\"super-time-tracker\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Web UI for the super-time-tracker CLI time sheets\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L15\",\"3\",{}]]\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="geist_f53a3a98-module__E6rLHq__variable geist_mono_a0a08e0-module__UZhpWW__variable h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0ewk7kj3yfts~.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0koldw9zjijry.js"/><script src="/_next/static/chunks/05161-t.3egqv.js" async=""></script><script src="/_next/static/chunks/0708yw9dysifo.js" async=""></script><script src="/_next/static/chunks/0uezeykgodd86.js" async=""></script><script src="/_next/static/chunks/turbopack-0st0r~j~gn7ke.js" async=""></script><script src="/_next/static/chunks/0zwqf-1atzont.js" async=""></script><script src="/_next/static/chunks/0n~v8~rri7~t2.js" async=""></script><title>404: This page could not be found.</title><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>super-time-tracker</title><meta name="description" content="Web UI for the super-time-tracker CLI time sheets"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="min-h-full font-sans transition-[background-color,color] duration-200"><div hidden=""><!--$--><!--/$--></div><script>(self.__next_s=self.__next_s||[]).push([0,{"children":"(function(){try{var mk=\"super-time-tracker-theme-mode\";var tk=\"super-time-tracker-theme\";var m=localStorage.getItem(mk);if(m!=='light'\u0026\u0026m!=='dark'\u0026\u0026m!=='system'){var legacy=localStorage.getItem(tk);m=legacy==='light'||legacy==='dark'?legacy:'system';localStorage.setItem(mk,m)}var resolve=function(mode){if(mode==='light'||mode==='dark')return mode;return window.matchMedia('(prefers-color-scheme: light)').matches?'light':'dark'};var t=resolve(m);document.documentElement.setAttribute('data-theme',t);localStorage.setItem(tk,t)}catch(e){document.documentElement.setAttribute('data-theme','dark')}})();","id":"theme-init"}])</script><script>(self.__next_s=self.__next_s||[]).push([0,{"children":"(function(){try{var k=\"super-time-tracker-compact-lists\";var s=localStorage.getItem(k);var c=s==='true';document.documentElement.setAttribute('data-compact-lists',c?'true':'false');var pk=\"super-time-tracker-color-palette\";var pv=localStorage.getItem(pk);var palettes=[\"default\",\"midnight\",\"warm\",\"ocean\",\"forest\",\"contrast\"];var migrate={\"teal\":\"default\",\"blue\":\"ocean\",\"violet\":\"midnight\",\"rose\":\"warm\",\"amber\":\"warm\",\"emerald\":\"forest\"};var ak=\"super-time-tracker-accent-color\";var p=palettes.indexOf(pv)\u003e=0?pv:(migrate[localStorage.getItem(ak)]||\"default\");document.documentElement.setAttribute('data-palette',p);if(palettes.indexOf(pv)\u003c0){localStorage.setItem(pk,p)}}catch(e){document.documentElement.setAttribute('data-compact-lists','false');document.documentElement.setAttribute('data-palette',\"default\")}})();","id":"ui-settings-init"}])</script><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0koldw9zjijry.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[2263,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"\"]\n3:I[89391,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"ThemeModeSystemListener\"]\n4:I[14974,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"ConfirmDialogProvider\"]\n5:I[45452,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"AppKeyboardShortcuts\"]\n6:I[5233,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"default\"]\n7:I[73632,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"default\"]\nb:I[51709,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0ewk7kj3yfts~.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0ewk7kj3yfts~.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0zwqf-1atzont.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0n~v8~rri7~t2.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"geist_f53a3a98-module__E6rLHq__variable geist_mono_a0a08e0-module__UZhpWW__variable h-full antialiased\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full font-sans transition-[background-color,color] duration-200\",\"children\":[[\"$\",\"$L2\",null,{\"id\":\"theme-init\",\"strategy\":\"beforeInteractive\",\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var mk=\\\"super-time-tracker-theme-mode\\\";var tk=\\\"super-time-tracker-theme\\\";var m=localStorage.getItem(mk);if(m!=='light'\u0026\u0026m!=='dark'\u0026\u0026m!=='system'){var legacy=localStorage.getItem(tk);m=legacy==='light'||legacy==='dark'?legacy:'system';localStorage.setItem(mk,m)}var resolve=function(mode){if(mode==='light'||mode==='dark')return mode;return window.matchMedia('(prefers-color-scheme: light)').matches?'light':'dark'};var t=resolve(m);document.documentElement.setAttribute('data-theme',t);localStorage.setItem(tk,t)}catch(e){document.documentElement.setAttribute('data-theme','dark')}})();\"}}],[\"$\",\"$L2\",null,{\"id\":\"ui-settings-init\",\"strategy\":\"beforeInteractive\",\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var k=\\\"super-time-tracker-compact-lists\\\";var s=localStorage.getItem(k);var c=s==='true';document.documentElement.setAttribute('data-compact-lists',c?'true':'false');var pk=\\\"super-time-tracker-color-palette\\\";var pv=localStorage.getItem(pk);var palettes=[\\\"default\\\",\\\"midnight\\\",\\\"warm\\\",\\\"ocean\\\",\\\"forest\\\",\\\"contrast\\\"];var migrate={\\\"teal\\\":\\\"default\\\",\\\"blue\\\":\\\"ocean\\\",\\\"violet\\\":\\\"midnight\\\",\\\"rose\\\":\\\"warm\\\",\\\"amber\\\":\\\"warm\\\",\\\"emerald\\\":\\\"forest\\\"};var ak=\\\"super-time-tracker-accent-color\\\";var p=palettes.indexOf(pv)\u003e=0?pv:(migrate[localStorage.getItem(ak)]||\\\"default\\\");document.documentElement.setAttribute('data-palette',p);if(palettes.indexOf(pv)\u003c0){localStorage.setItem(pk,p)}}catch(e){document.documentElement.setAttribute('data-compact-lists','false');document.documentElement.setAttribute('data-palette',\\\"default\\\")}})();\"}}],[\"$\",\"$L3\",null,{}],[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"$L8\",{},null,false,null]},null,false,\"$@9\"]},null,false,null],\"$La\",false]],\"m\":\"$undefined\",\"G\":[\"$b\",[\"$Lc\"]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"wHoiBM1uMbUIrfXkizlyC\"}\n"])</script><script>self.__next_f.push([1,"d:I[83775,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"OutletBoundary\"]\ne:\"$Sreact.suspense\"\n11:I[83775,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"ViewportBoundary\"]\n13:I[83775,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"MetadataBoundary\"]\n8:[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:3:props:children:1:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:3:props:children:1:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:3:props:children:1:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:3:props:children:1:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$e\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@f\"}]}]]}]\n10:[]\n9:\"$W10\"\na:[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L11\",null,{\"children\":\"$L12\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L13\",null,{\"children\":[\"$\",\"$e\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L14\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]\nc:[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0ewk7kj3yfts~.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\n"])</script><script>self.__next_f.push([1,"12:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"15:I[31415,[\"/_next/static/chunks/0zwqf-1atzont.js\",\"/_next/static/chunks/0n~v8~rri7~t2.js\"],\"IconMark\"]\nf:null\n14:[[\"$\",\"title\",\"0\",{\"children\":\"super-time-tracker\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Web UI for the super-time-tracker CLI time sheets\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L15\",\"3\",{}]]\n"])</script></body></html>
|