super-time-tracker-ui 0.1.30 → 0.1.31
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/dist/standalone/next-output/BUILD_ID +1 -1
- package/dist/standalone/next-output/app-path-routes-manifest.json +1 -0
- package/dist/standalone/next-output/build-manifest.json +3 -3
- package/dist/standalone/next-output/routes-manifest.json +6 -0
- 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.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/build-manifest.json +17 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/next-font-manifest.json +11 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/react-loadable-manifest.json +1 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js +16 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app-paths-manifest.json +1 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0.ztg_g._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0a7wn1j._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0r4hd.l.js +4 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0bowsf1._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0k~hq1g._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0oqgod_._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_002dssm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_00_8gfw._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_00ic3j9._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_00x~ete._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_059wg4v._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/{_10n~~xo._.js → _088~qfj._.js} +3 -3
- package/dist/standalone/next-output/server/chunks/ssr/_08qe8j9._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0agxxbf._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0c0txs~._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0cxg26n._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0hs4c5u._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0l6-7m4._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0nz4ym1._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0wg9~zr._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0y3ypyx._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_13crob-._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_13y76jr._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_settings_quick-actions_page_actions_031bu28.js +3 -0
- 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/middleware-manifest.json +1 -1
- package/dist/standalone/next-output/server/next-font-manifest.js +1 -1
- package/dist/standalone/next-output/server/next-font-manifest.json +4 -0
- package/dist/standalone/next-output/server/pages/500.html +1 -1
- package/dist/standalone/next-output/static/chunks/0.04y~4c8a5xc.js +1 -0
- package/dist/standalone/next-output/static/chunks/01jy.t2pk-fa6.js +1 -0
- package/dist/standalone/next-output/static/chunks/02i4jl0xp426g.js +1 -0
- package/dist/standalone/next-output/static/chunks/04_-q9c5inknj.js +1 -0
- package/dist/standalone/next-output/static/chunks/06y4x2vr8z2ur.js +1 -0
- package/dist/standalone/next-output/static/chunks/075ldqatokyh9.js +1 -0
- package/dist/standalone/next-output/static/chunks/090ac~je_jd8e.js +1 -0
- package/dist/standalone/next-output/static/chunks/09tjbwcc~3p_e.js +1 -0
- package/dist/standalone/next-output/static/chunks/0i41ijcz4sls2.js +1 -0
- package/dist/standalone/next-output/static/chunks/0phd4iuqah0hn.js +1 -0
- package/dist/standalone/next-output/static/chunks/0pqilbd~jphqs.css +3 -0
- package/dist/standalone/next-output/static/chunks/0q05k1wfzh4_a.js +1 -0
- package/dist/standalone/next-output/static/chunks/0r35q73w_j-ra.js +1 -0
- package/dist/standalone/next-output/static/chunks/0sywmu6t~l1c8.js +1 -0
- package/dist/standalone/next-output/static/chunks/0x91bm-1.c.17.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0znvz4n7decra.js → 0x9s1xcq69ppx.js} +5 -5
- package/dist/standalone/next-output/static/chunks/10b~ujyr8lius.js +1 -0
- package/dist/standalone/next-output/static/chunks/131q78th6a65i.js +1 -0
- package/dist/standalone/next-output/static/chunks/132642_08w2fh.js +1 -0
- package/dist/standalone/next-output/static/chunks/16u2fvwy8kata.js +1 -0
- package/dist/standalone/package.json +1 -1
- package/package.json +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0-hc~ba._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_08dnxqq._.js +0 -3
- package/dist/standalone/next-output/static/chunks/00rjs5ywh4_np.css +0 -3
- package/dist/standalone/next-output/static/chunks/03d24rbiv.lx7.js +0 -1
- package/dist/standalone/next-output/static/chunks/03flgrd7bw9r5.js +0 -1
- package/dist/standalone/next-output/static/chunks/041fttxys-zjw.js +0 -1
- package/dist/standalone/next-output/static/chunks/055~9w5b9lao5.js +0 -1
- package/dist/standalone/next-output/static/chunks/09mbpw08eiqwx.js +0 -1
- package/dist/standalone/next-output/static/chunks/0bw3uow4-~3fr.js +0 -1
- package/dist/standalone/next-output/static/chunks/0d2d-s..s8cfz.js +0 -1
- package/dist/standalone/next-output/static/chunks/0h72~3~6gq3fn.js +0 -1
- package/dist/standalone/next-output/static/chunks/0hhu330gm_fnl.js +0 -1
- package/dist/standalone/next-output/static/chunks/0ls_5qyf15z5_.js +0 -1
- package/dist/standalone/next-output/static/chunks/0n0.21h11yrv2.js +0 -1
- package/dist/standalone/next-output/static/chunks/0n2~cs.u7bygu.js +0 -1
- package/dist/standalone/next-output/static/chunks/0sywv5h95uodq.js +0 -1
- package/dist/standalone/next-output/static/chunks/0xccil3r~k_7n.js +0 -1
- package/dist/standalone/next-output/static/chunks/0~z41.7~3tpw3.js +0 -1
- package/dist/standalone/next-output/static/chunks/14oa3e0hktvxi.js +0 -1
- package/dist/standalone/next-output/static/chunks/15ixzo9s2kj_o.js +0 -1
- /package/dist/standalone/next-output/static/{Ohbr2ePvonj7GxdJPkXBY → Y1yPgSHwp9h2rIpwS9SZf}/_buildManifest.js +0 -0
- /package/dist/standalone/next-output/static/{Ohbr2ePvonj7GxdJPkXBY → Y1yPgSHwp9h2rIpwS9SZf}/_clientMiddlewareManifest.js +0 -0
- /package/dist/standalone/next-output/static/{Ohbr2ePvonj7GxdJPkXBY → Y1yPgSHwp9h2rIpwS9SZf}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(78677)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",i=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),s&&"/"!==s[0]&&(s="/"+s)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${s}${c}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(29158);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),s=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return x}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),o=e.r(54710),i=a._(e.r(29158)),l=e.r(42552),u=e.r(61717),c=e.r(37879),d=e.r(31047),m=e.r(20321);e.r(90503);let h=e.r(38520),p=e.r(19947),f=e.r(59246),_=e.r(99046);function b(t){var r,n;let s,a,b,[x,y]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),k=(0,i.useRef)(null),{href:w,as:v,children:j,prefetch:N=null,passHref:S,replace:O,shallow:E,scroll:T,onClick:P,onMouseEnter:C,onTouchStart:D,legacyBehavior:R=!1,onNavigate:L,transitionTypes:M,ref:A,unstable_dynamicOnHover:I,...F}=t;s=j,R&&("string"==typeof s||"number"==typeof s)&&(s=(0,o.jsx)("a",{children:s}));let $=i.default.useContext(u.AppRouterContext),U=!1!==N,K=!1!==N?null===(n=N)||"auto"===n?_.FetchStrategy.PPR:_.FetchStrategy.Full:_.FetchStrategy.PPR,q="string"==typeof(r=v||w)?r:(0,l.formatUrl)(r);if(R){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=i.default.Children.only(s)}let W=R?a&&"object"==typeof a&&a.ref:A,B=i.default.useCallback(e=>(null!==$&&(k.current=(0,p.mountLinkInstance)(e,q,$,K,U,y)),()=>{k.current&&((0,p.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,q,$,K,y]),G={ref:(0,c.useMergedRef)(B,W),onClick(t){R||"function"!=typeof P||P(t),R&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,s,a,o,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,f.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);i.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,q,k,O,T,L,M)},onMouseEnter(e){R||"function"!=typeof C||C(e),R&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){R||"function"!=typeof D||D(e),R&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(q)?G.href=q:R&&!S&&("a"!==a.type||"href"in a.props)||(G.href=(0,m.addBasePath)(q)),b=R?i.default.cloneElement(a,G):(0,o.jsx)("a",{...F,...G,children:s}),(0,o.jsx)(g.Provider,{value:x,children:b})}e.r(10364);let g=(0,i.createContext)(p.IDLE_LINK_STATUS),x=()=>(0,i.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),s=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[o,i]=(0,r.useState)(null),[l,u]=(0,r.useState)(!1),c=(0,s.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!c)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{i(e?.user.email??null)}).catch(()=>{i(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{i(t?.user.email??null)});return()=>{t.unsubscribe()}},[c]),{is_configured:c,email:o,is_pending:l,sign_out:(0,r.useCallback)(async()=>{u(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{u(!1)}},[e])}}])},45200,73205,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158);let a=new Set(e.i(22373).topbar_quick_action_ids),o=["today","reporting","pomodoro"];function i(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return o;let r=t.filter(e=>"string"==typeof e&&a.has(e));return Array.from(new Set(r))}catch{return o}}e.s(["parse_topbar_quick_actions",0,i],73205);var l=e.i(32792);let u=[{href:"/",label:"Tracker",match:e=>"/"===e},{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")}],c={today:{href:"/today",label:"Today",match:e=>e.startsWith("/today")},sheets:{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")},reporting:{href:"/reporting",label:"Reporting",match:e=>e.startsWith("/reporting")},pomodoro:{href:"/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/pomodoro")},"manage-tags":{href:"/settings/tags",label:"Tags",match:e=>e.startsWith("/settings/tags")},"sync-settings":{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")}};function d(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/",a=(0,s.useSyncExternalStore)(l.topbar_quick_actions_preference.subscribe,l.topbar_quick_actions_preference.get_snapshot,l.topbar_quick_actions_preference.get_server_snapshot),o=(0,s.useMemo)(()=>i(a),[a]),d=(0,s.useMemo)(()=>[...u,...o.map(e=>c[e]).filter(e=>void 0!==e)].filter((e,t,r)=>r.findIndex(t=>t.href===e.href)===t),[o]);return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:d.map(n=>{let s=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":s?"page":void 0,children:n.label},n.href)})})}],45200);var m=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,m.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(d,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},2268,76003,38240,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:r.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function s(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,n],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return s()}],76003);var a=e.i(17798),o=e.i(46549),i=e.i(10464),l=e.i(35434),u=e.i(61834),c=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===s()?"light":"dark";(0,a.apply_theme)(e),(0,c.write_stored_theme)(e),i.theme_mode_preference.write(e),(0,u.write_document_preference_cookies)({theme_mode:e,theme:e}),i.theme_mode_preference.notify(),(0,l.notify_theme_subscribers)(),(0,o.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let s=(0,t.useRef)(e);s.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158),a=e.i(37399),o=e.i(90463),i=e.i(46549),l=e.i(73205),u=e.i(66295),c=e.i(2268),d=e.i(32792),m=e.i(90299),h=e.i(28274),p=e.i(76003),f=e.i(35434),_=e.i(38240),b=e.i(22373),g=e.i(25204),x=e.i(77882);let y="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",k={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},w=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),v=(0,n.usePathname)()??"/",j=(0,s.useSyncExternalStore)(f.subscribe_theme,p.get_theme_snapshot,p.get_theme_server_snapshot),N=(0,s.useSyncExternalStore)(c.cloud_sync_enabled_preference.subscribe,c.cloud_sync_enabled_preference.get_snapshot,c.cloud_sync_enabled_preference.get_server_snapshot),S=(0,s.useSyncExternalStore)(m.tracker_shortcut_map_preference.subscribe,m.tracker_shortcut_map_preference.get_snapshot,m.tracker_shortcut_map_preference.get_server_snapshot),O=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),E=(0,u.parse_tracker_shortcut_map)(S),T=new Set((0,l.parse_topbar_quick_actions)(O)),P=b.topbar_quick_action_ids.filter(e=>!T.has(e)),C=Array.from(new Set([...Array.from(w),...P])),{email:D,is_configured:R,is_pending:L,sign_out:M}=(0,x.use_supabase_auth_session)(),[A,I]=(0,s.useState)(!1),F=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!A)return;let e=e=>{null===F.current||F.current.contains(e.target)||I(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[A]);let $=()=>{I(!1)};return(0,g.use_escape_to_cancel)($,A),(0,t.jsxs)("div",{className:"relative shrink-0",ref:F,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":A,"aria-haspopup":"menu",onClick:()=>I(e=>!e),children:(0,t.jsx)(a.HamburgerIcon,{})}),A?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[R&&null!==D?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:D,children:D})}):null,C.map(e=>{let n=k[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:y,role:"menuitem",onClick:$,children:n.label})},e)}),R?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===N,onClick:()=>{let e="true"===N?"false":"true";c.cloud_sync_enabled_preference.write(e),c.cloud_sync_enabled_preference.notify(),(0,i.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==D&&(0,h.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===N?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===N?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{$(),(0,_.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===j?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===j?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;$(),e=E.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),R?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===D?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{$(),e.push((0,o.build_auth_page_href)("sign_in",v))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:L,onClick:()=>{$(),M()},children:L?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let v=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",a=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),o=(0,s.useMemo)(()=>(0,l.parse_topbar_quick_actions)(a),[a]);if(0===o.length)return null;let i=v.filter(e=>o.includes(e.id));return 0===i.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:i.map(n=>{let s=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":s?"page":void 0,children:n.label},n.id)})})}],76080)},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),s=e.i(1976),a=e.i(76080),o=e.i(45958),i=e.i(71060),l=e.i(29539);function u(){let e=((0,i.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(o.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(l.SettingsIcon,{})})}function c({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(o.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(o.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(c,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(a.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(u,{}),(0,t.jsx)(s.TopbarOverflowMenu,{})]})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},31113,e=>{"use strict";e.s(["normalize_stored_tag",0,function(e){let t=e.trim().replace(/^@+/,"");if(0===t.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(t))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${t}`}])},18774,e=>{"use strict";e.s(["format_display_tag",0,function(e){return e.startsWith("@")?e:`@${e}`}])},14260,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(18774),s=e.i(52405),a=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:o,known_tags:i,placeholder:l,disabled:u=!1,autoFocus:c=!1,on_change:d}){let m=(0,r.useRef)(null),h=(0,r.useRef)(null),p=(0,r.useRef)(null),[f,_]=(0,r.useState)(0),[b,g]=(0,r.useState)(0),x=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("@");if(-1===n)return null;let s=r.slice(n+1);return/\s/.test(s)?null:{query:s,start_index:n,end_index:t}}(o,f),y=null===x?[]:function(e,t,r=10){let n=t.toLowerCase();return e.filter(e=>{let t=e.replace(/^@/,"").toLowerCase();return 0===n.length||t.startsWith(n)}).slice(0,r)}(i,x.query),k=null!==x&&function(e,t){if(!/^\w+$/.test(e))return!1;let r=e.toLowerCase();return t.some(e=>{try{return(0,a.normalize_stored_tag)(e).slice(1).toLowerCase()===r}catch{return!1}})}(x.query,i),w=null!==x&&y.length>0&&!k&&!u;(0,r.useLayoutEffect)(()=>{null!==p.current&&null!==m.current&&(m.current.setSelectionRange(p.current,p.current),_(p.current),p.current=null)},[o]),(0,r.useEffect)(()=>{g(0)},[o,f,y.length]);let v=()=>{_(m.current?.selectionStart??o.length)},j=()=>{g(0)},N=e=>{let t,r,s;if(null===x)return;let{next_text:a,next_cursor:i}=(t=(0,n.format_display_tag)(e),r=o.slice(0,x.start_index),s=o.slice(x.end_index),{next_text:`${r}${t}${s}`,next_cursor:r.length+t.length});p.current=i,d(a),j()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:m,id:e,type:"text",className:(0,s.get_input_class_name)(),value:o,placeholder:l,disabled:u,autoFocus:c,autoComplete:"off","aria-autocomplete":"list","aria-expanded":w,"aria-controls":w?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),_(e.target.selectionStart??e.target.value.length)},onClick:v,onKeyUp:v,onKeyDown:e=>{if(w){if("ArrowDown"===e.key){e.preventDefault(),g(e=>(e+1)%y.length);return}if("ArrowUp"===e.key){e.preventDefault(),g(e=>(e-1+y.length)%y.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=y[b];void 0!==t&&N(t);return}"Escape"===e.key&&(e.preventDefault(),j())}},onBlur:()=>{window.setTimeout(j,120)}}),w?(0,t.jsx)("ul",{ref:h,id:`${e}-tag-suggestions`,role:"listbox",className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-48 list-none overflow-y-auto rounded-md border border-panel-border bg-panel p-1.5 shadow-md",children:y.map((e,r)=>(0,t.jsx)("li",{role:"option","aria-selected":r===b,children:(0,t.jsx)("button",{type:"button",className:`block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover ${r===b?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),N(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},85323,e=>{"use strict";var t=e.i(49087);e.s(["notify_desktop",0,function(e){if((0,t.notify_in_app)({title:e.title,body:e.body}),"u"<typeof Notification||"u">typeof document&&"visible"===document.visibilityState&&document.hasFocus()||"granted"!==Notification.permission)return;let{body:r,tag:n,title:s}=e,a={body:r,...void 0!==n?{tag:n}:{}};try{new Notification(s,a)}catch{}},"supports_desktop_notifications",0,function(){return"u">typeof Notification}])},15526,e=>{"use strict";let t="super-time-tracker-pomodoro-active-entry";e.s(["clear_pomodoro_task_entry_marker",0,function(){try{window.localStorage.removeItem(t)}catch{}},"is_pomodoro_task_entry",0,function(e){let r=(()=>{try{let e=window.localStorage.getItem(t);if(null===e)return null;try{let t=JSON.parse(e);if("string"==typeof t.sheetName&&t.sheetName.length>0&&"number"==typeof t.entryId&&Number.isInteger(t.entryId))return{sheetName:t.sheetName,entryId:t.entryId}}catch{}return null}catch{return null}})();return null!==r&&r.sheetName===e.sheetName&&r.entryId===e.id},"mark_pomodoro_task_entry",0,function(e){try{let r={sheetName:e.sheetName,entryId:e.id};window.localStorage.setItem(t,JSON.stringify(r))}catch{}}])},7668,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(29158),s=e.i(29539),a=e.i(14260),o=e.i(75404),i=e.i(52663),l=e.i(85323),u=e.i(15526),c=e.i(72550),d=e.i(26740);e.s(["PomodoroView",0,function({known_tags:e}){let[m,h]=(0,n.useState)(d.POMODORO_DEFAULT_SETTINGS),[p,f]=(0,n.useState)(d.POMODORO_DEFAULT_STATE),[_,b]=(0,n.useState)(()=>Date.now()),[g,x]=(0,n.useState)(!1),[y,k]=(0,n.useState)(null),[w,v]=(0,n.useState)(!1),j=(0,n.useRef)(null),N=(0,n.useRef)(d.POMODORO_DEFAULT_SETTINGS),S=(0,n.useRef)(d.POMODORO_DEFAULT_STATE),O=(0,n.useCallback)((e,t)=>{(0,l.notify_desktop)({title:e,body:t,tag:"pomodoro-phase-event"})},[]);(0,n.useEffect)(()=>{let e=window.setTimeout(()=>{try{let e=window.localStorage.getItem(d.POMODORO_STORAGE_KEY);if(null!==e){let t=JSON.parse(e),r=t.settings,n=t.state;if(void 0!==r&&h({work_minutes:"number"==typeof r.work_minutes&&Number.isFinite(r.work_minutes)&&r.work_minutes>0?Math.round(r.work_minutes):d.POMODORO_DEFAULT_SETTINGS.work_minutes,short_break_minutes:"number"==typeof r.short_break_minutes&&Number.isFinite(r.short_break_minutes)&&r.short_break_minutes>0?Math.round(r.short_break_minutes):d.POMODORO_DEFAULT_SETTINGS.short_break_minutes,long_break_minutes:"number"==typeof r.long_break_minutes&&Number.isFinite(r.long_break_minutes)&&r.long_break_minutes>0?Math.round(r.long_break_minutes):d.POMODORO_DEFAULT_SETTINGS.long_break_minutes,rounds_before_long_break:"number"==typeof r.rounds_before_long_break&&Number.isFinite(r.rounds_before_long_break)&&r.rounds_before_long_break>0?Math.round(r.rounds_before_long_break):d.POMODORO_DEFAULT_SETTINGS.rounds_before_long_break,auto_start_next_phase:"boolean"==typeof r.auto_start_next_phase?r.auto_start_next_phase:d.POMODORO_DEFAULT_SETTINGS.auto_start_next_phase,check_in_on_work_start:"boolean"==typeof r.check_in_on_work_start?r.check_in_on_work_start:d.POMODORO_DEFAULT_SETTINGS.check_in_on_work_start,work_entry_description:"string"==typeof r.work_entry_description?r.work_entry_description:d.POMODORO_DEFAULT_SETTINGS.work_entry_description}),void 0!==n){let e=n.phase,t=n.status,r={phase:"short_break"===e||"long_break"===e||"work"===e?e:d.POMODORO_DEFAULT_STATE.phase,status:"idle"===t||"paused"===t||"running"===t?t:d.POMODORO_DEFAULT_STATE.status,completed_work_sessions:"number"==typeof n.completed_work_sessions&&Number.isFinite(n.completed_work_sessions)&&n.completed_work_sessions>=0?Math.round(n.completed_work_sessions):d.POMODORO_DEFAULT_STATE.completed_work_sessions,deadline_at_ms:"number"==typeof n.deadline_at_ms&&Number.isFinite(n.deadline_at_ms)?n.deadline_at_ms:null,paused_remaining_ms:"number"==typeof n.paused_remaining_ms&&Number.isFinite(n.paused_remaining_ms)&&n.paused_remaining_ms>=0?Math.round(n.paused_remaining_ms):null};S.current=r,f(r)}}}catch{}x(!0)},0);return()=>{window.clearTimeout(e)}},[]),(0,n.useEffect)(()=>{N.current=m},[m]),(0,n.useEffect)(()=>{S.current=p},[p]);let E=(0,n.useCallback)((e,t)=>{try{window.localStorage.setItem(d.POMODORO_STORAGE_KEY,JSON.stringify({settings:e,state:t}))}catch{}},[]),T=(0,n.useCallback)(e=>{f(t=>{let r="function"==typeof e?e(t):e;return S.current=r,E(N.current,r),r})},[E]);(0,n.useEffect)(()=>{g&&E(m,p)},[g,E,m,p]),(0,n.useEffect)(()=>{let e=()=>{E(N.current,S.current)};return window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),()=>{window.removeEventListener("pagehide",e),window.removeEventListener("beforeunload",e)}},[E]),(0,n.useEffect)(()=>{if("running"!==p.status)return;let e=window.setInterval(()=>{b(Date.now())},1e3);return()=>{window.clearInterval(e)}},[p.status,p.deadline_at_ms]);let P=(0,n.useCallback)(e=>{switch(e){case"work":return 6e4*m.work_minutes;case"short_break":return 6e4*m.short_break_minutes;case"long_break":return 6e4*m.long_break_minutes}},[m.long_break_minutes,m.short_break_minutes,m.work_minutes]),C=(0,n.useCallback)(async()=>{let e=await fetch("/api/state",{method:"GET",cache:"no-store"});if(!e.ok)throw Error((await e.json().catch(()=>({}))).error??"Failed to read tracker state");let t=await e.json().catch(()=>null);return t?.runningEntry!==null&&t?.runningEntry!==void 0},[]),D=(0,n.useCallback)(async()=>{try{v(await C())}catch{}},[C]),R=async()=>{let e=m.work_entry_description.trim();if(0===e.length)return;if(await C())return void v(!0);let t=await fetch("/api/in",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:e,sheetName:function(){try{let e=window.localStorage.getItem(c.ACTIVE_SHEET_STORAGE_KEY)?.trim()??"";return e.length>0?e:null}catch{return null}}()??void 0})});if(t.ok){let e=await t.json().catch(()=>null),r=e?.activeEntry;null!=r&&(0,u.mark_pomodoro_task_entry)({id:r.id,sheetName:r.sheetName}),v(!0);return}throw Error((await t.json().catch(()=>({}))).error??"Failed to start tracker entry for Pomodoro")},L=async()=>{let e=await fetch("/api/out",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){(0,u.clear_pomodoro_task_entry_marker)(),v(!1);return}let t=(await e.json().catch(()=>({}))).error??"Failed to check out active tracker entry";if(!t.includes("No active entry"))throw Error(t)},M=async()=>{k(null);try{let e=await fetch("/api/state",{method:"GET",cache:"no-store"});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??"Failed to read tracker state")}let t=await e.json().catch(()=>null),r=t?.runningEntry;if(r?.start===void 0)throw Error("No active task found to start from");let n=Date.parse(r.start);if(!Number.isFinite(n))throw Error("Active task start time is invalid");let s=Math.max(0,Date.now()-n),a=P(p.phase),o=Math.max(0,a-s);T(e=>({...e,status:"running",deadline_at_ms:Date.now()+o,paused_remaining_ms:null}))}catch(e){k(e instanceof Error?e.message:String(e))}},A=(0,n.useCallback)(()=>{let e="work"===p.phase,t=p.completed_work_sessions+1;if(T(e=>{let t="work"===e.phase?e.completed_work_sessions+1:e.completed_work_sessions,r="work"===e.phase?t%m.rounds_before_long_break==0?"long_break":"short_break":"work",n=P(r);return m.auto_start_next_phase?{phase:r,status:"running",completed_work_sessions:t,deadline_at_ms:Date.now()+n,paused_remaining_ms:null}:{phase:r,status:"idle",completed_work_sessions:t,deadline_at_ms:null,paused_remaining_ms:null}}),e&&O("Pomodoro focus session complete",`Completed focus session ${t}.`),m.auto_start_next_phase){let e="work"===p.phase?p.completed_work_sessions%m.rounds_before_long_break==m.rounds_before_long_break-1?"long break":"short break":"focus";O("work"===p.phase?"Pomodoro break started":"Pomodoro focus started",`Auto-started ${e} timer.`)}},[P,O,T,p.completed_work_sessions,p.phase,m.auto_start_next_phase,m.rounds_before_long_break]);(0,n.useEffect)(()=>{let e=window.setTimeout(()=>{D()},0);return()=>{window.clearTimeout(e)}},[D]),(0,n.useEffect)(()=>{let e=window.setInterval(()=>{D()},5e3);return()=>{window.clearInterval(e)}},[D]),(0,n.useEffect)(()=>{if("running"!==p.status||null===p.deadline_at_ms||_<p.deadline_at_ms)return;let e=window.setTimeout(()=>{A()},0);return()=>{window.clearTimeout(e)}},[A,_,p.deadline_at_ms,p.status]);let I=P(p.phase),F="running"===p.status&&null!==p.deadline_at_ms?Math.max(0,p.deadline_at_ms-_):"paused"===p.status?p.paused_remaining_ms??I:I,$=Math.min(100,Math.max(0,(I-F)/I*100)),U=`${Math.floor(F/6e4).toString().padStart(2,"0")}:${Math.floor(F%6e4/1e3).toString().padStart(2,"0")}`,K={work:"Focus",short_break:"Short break",long_break:"Long break"}[p.phase],q="work"===p.phase?p.completed_work_sessions%m.rounds_before_long_break==m.rounds_before_long_break-1?"long_break":"short_break":"work",W="work"===p.phase?`${p.completed_work_sessions+1} / ${m.rounds_before_long_break} focus rounds`:"short_break"===p.phase?"Recover before the next focus block.":"Take the long break before the next round.",B="running"===p.status?"Pause":"paused"===p.status?"Resume":"Start",G=`${U} \xb7 ${K} \xb7 Pomodoro`;return(0,n.useEffect)(()=>{if("u">typeof document)return null===j.current&&(j.current=document.title),()=>{null!==j.current&&(document.title=j.current)}},[]),(0,n.useEffect)(()=>{"u">typeof document&&(document.title=G)},[G]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.TrackerTopbar,{breadcrumb:{current:"Pomodoro"}}),(0,t.jsxs)("main",{className:"mx-auto flex w-full max-w-2xl flex-col gap-6 px-5 pb-12 pt-6",children:[(0,t.jsxs)("header",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"m-0 text-[1.5rem] font-[650] tracking-tight",children:"Pomodoro"}),(0,t.jsx)("p",{className:"m-0 mt-2 text-[0.9rem] leading-relaxed text-muted",children:"Keep a simple focus cycle running alongside your time tracker."})]}),(0,t.jsx)(r.default,{href:"/settings/pomodoro",className:"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Pomodoro settings",title:"Pomodoro settings",children:(0,t.jsx)(s.SettingsIcon,{})})]}),(0,t.jsx)("section",{className:"rounded-md border border-panel-border bg-panel p-5 shadow-sm",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Current phase"}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[1.3rem] font-semibold",children:K}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.88rem] leading-relaxed text-muted",children:W})]}),(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Next phase"}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.95rem] font-semibold text-accent",children:{work:"Focus",short_break:"Short break",long_break:"Long break"}[q]}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.84rem] text-muted",children:m.auto_start_next_phase?"Auto-start enabled":"Waiting for you"})]})]}),(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-background px-4 py-5 text-center",children:[(0,t.jsx)("p",{className:"m-0 font-mono text-[3rem] font-semibold tracking-tight text-accent","aria-live":"polite",children:U}),(0,t.jsx)("div",{className:"mt-4 h-2 overflow-hidden rounded-full bg-surface-strong",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-accent transition-[width] duration-200",style:{width:`${$}%`}})}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-2 text-[0.82rem] text-muted",children:[(0,t.jsxs)("span",{children:[p.completed_work_sessions," focus sessions done"]}),(0,t.jsx)("span",{children:"•"}),(0,t.jsx)("span",{children:"running"===p.status?"Running":"paused"===p.status?"Paused":"Idle"})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",className:(0,i.get_button_class_name)("primary"),onClick:()=>{let e,t,r;"running"===p.status?(k(null),T(e=>"running"!==e.status||null===e.deadline_at_ms?e:{...e,status:"paused",deadline_at_ms:null,paused_remaining_ms:Math.max(0,e.deadline_at_ms-Date.now())}),L().catch(e=>{k(e instanceof Error?e.message:String(e))})):(k(null),T(e=>{let t="paused"===e.status&&null!==e.paused_remaining_ms?e.paused_remaining_ms:P(e.phase);return{...e,status:"running",deadline_at_ms:Date.now()+t,paused_remaining_ms:null}}),e="paused"===p.status,t="short_break"===p.phase||"long_break"===p.phase,r=e||"running"!==p.status&&"work"===p.phase&&m.check_in_on_work_start,e||"running"===p.status||O(t?"Pomodoro break started":"Pomodoro focus started",t?"Break timer is running.":"Focus timer is running."),r&&R().catch(e=>{k(e instanceof Error?e.message:String(e))}))},children:B}),(0,t.jsx)("button",{type:"button",className:(0,i.get_button_class_name)("ghost"),onClick:A,children:"Skip phase"}),(0,t.jsx)("button",{type:"button",className:(0,i.get_button_class_name)("ghost"),onClick:()=>{T(d.POMODORO_DEFAULT_STATE),b(Date.now())},children:"Reset"}),(0,t.jsx)("button",{type:"button",className:(0,i.get_button_class_name)("ghost"),disabled:"running"===p.status,onClick:()=>{M()},children:"Start from active task start time"})]}),null!==y?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:y}):null,m.check_in_on_work_start&&!w?(0,t.jsx)("div",{className:"grid gap-2 rounded-md border border-panel-border bg-background p-3 md:grid-cols-2",children:(0,t.jsxs)("label",{className:"flex flex-col gap-1.5 md:col-span-2",children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold text-muted",children:"New entry description (supports @tags)"}),(0,t.jsx)(a.TagAutocompleteInput,{id:"pomodoro-work-entry-description",value:m.work_entry_description,known_tags:e,placeholder:"Pomodoro focus @pomodoro @focus",on_change:e=>{h(t=>({...t,work_entry_description:e}))}})]})}):null]})})]})]})}],7668)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(78677)),o=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",l=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${l}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(29158);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),s=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return _}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),o=e.r(54710),l=a._(e.r(29158)),i=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),h=e.r(20321);e.r(90503);let p=e.r(38520),f=e.r(19947),m=e.r(59246),g=e.r(99046);function b(t){var r,n;let s,a,b,[_,y]=(0,l.useOptimistic)(f.IDLE_LINK_STATUS),v=(0,l.useRef)(null),{href:j,as:w,children:k,prefetch:S=null,passHref:N,replace:E,shallow:O,scroll:C,onClick:T,onMouseEnter:R,onTouchStart:L,legacyBehavior:P=!1,onNavigate:$,transitionTypes:D,ref:A,unstable_dynamicOnHover:M,...I}=t;s=k,P&&("string"==typeof s||"number"==typeof s)&&(s=(0,o.jsx)("a",{children:s}));let U=l.default.useContext(c.AppRouterContext),W=!1!==S,B=!1!==S?null===(n=S)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,q="string"==typeof(r=w||j)?r:(0,i.formatUrl)(r);if(P){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=l.default.Children.only(s)}let K=P?a&&"object"==typeof a&&a.ref:A,F=l.default.useCallback(e=>(null!==U&&(v.current=(0,f.mountLinkInstance)(e,q,U,B,W,y)),()=>{v.current&&((0,f.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,f.unmountPrefetchableInstance)(e)}),[W,q,U,B,y]),z={ref:(0,u.useMergedRef)(F,K),onClick(t){P||"function"!=typeof T||T(t),P&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!U||t.defaultPrevented||function(t,r,n,s,a,o,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);l.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,i)})}}(t,q,v,E,C,$,D)},onMouseEnter(e){P||"function"!=typeof R||R(e),P&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),U&&W&&(0,f.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){P||"function"!=typeof L||L(e),P&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),U&&W&&(0,f.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,d.isAbsoluteUrl)(q)?z.href=q:P&&!N&&("a"!==a.type||"href"in a.props)||(z.href=(0,h.addBasePath)(q)),b=P?l.default.cloneElement(a,z):(0,o.jsx)("a",{...I,...z,children:s}),(0,o.jsx)(x.Provider,{value:_,children:b})}e.r(10364);let x=(0,l.createContext)(f.IDLE_LINK_STATUS),_=()=>(0,l.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),s=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[o,l]=(0,r.useState)(null),[i,c]=(0,r.useState)(!1),u=(0,s.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{l(e?.user.email??null)}).catch(()=>{l(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{l(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:o,is_pending:i,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},45200,73205,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158);let a=new Set(e.i(22373).topbar_quick_action_ids),o=["today","reporting","pomodoro"];function l(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return o;let r=t.filter(e=>"string"==typeof e&&a.has(e));return Array.from(new Set(r))}catch{return o}}e.s(["parse_topbar_quick_actions",0,l],73205);var i=e.i(32792);let c=[{href:"/",label:"Tracker",match:e=>"/"===e},{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")}],u={today:{href:"/today",label:"Today",match:e=>e.startsWith("/today")},sheets:{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")},reporting:{href:"/reporting",label:"Reporting",match:e=>e.startsWith("/reporting")},pomodoro:{href:"/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/pomodoro")},"manage-tags":{href:"/settings/tags",label:"Tags",match:e=>e.startsWith("/settings/tags")},"sync-settings":{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")}};function d(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/",a=(0,s.useSyncExternalStore)(i.topbar_quick_actions_preference.subscribe,i.topbar_quick_actions_preference.get_snapshot,i.topbar_quick_actions_preference.get_server_snapshot),o=(0,s.useMemo)(()=>l(a),[a]),d=(0,s.useMemo)(()=>[...c,...o.map(e=>u[e]).filter(e=>void 0!==e)].filter((e,t,r)=>r.findIndex(t=>t.href===e.href)===t),[o]);return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:d.map(n=>{let s=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":s?"page":void 0,children:n.label},n.href)})})}],45200);var h=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,h.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(d,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},2268,76003,38240,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:r.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function s(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,n],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return s()}],76003);var a=e.i(17798),o=e.i(46549),l=e.i(10464),i=e.i(35434),c=e.i(61834),u=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===s()?"light":"dark";(0,a.apply_theme)(e),(0,u.write_stored_theme)(e),l.theme_mode_preference.write(e),(0,c.write_document_preference_cookies)({theme_mode:e,theme:e}),l.theme_mode_preference.notify(),(0,i.notify_theme_subscribers)(),(0,o.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let s=(0,t.useRef)(e);s.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158),a=e.i(37399),o=e.i(90463),l=e.i(46549),i=e.i(73205),c=e.i(66295),u=e.i(2268),d=e.i(32792),h=e.i(90299),p=e.i(28274),f=e.i(76003),m=e.i(35434),g=e.i(38240),b=e.i(22373),x=e.i(25204),_=e.i(77882);let y="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},j=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),w=(0,n.usePathname)()??"/",k=(0,s.useSyncExternalStore)(m.subscribe_theme,f.get_theme_snapshot,f.get_theme_server_snapshot),S=(0,s.useSyncExternalStore)(u.cloud_sync_enabled_preference.subscribe,u.cloud_sync_enabled_preference.get_snapshot,u.cloud_sync_enabled_preference.get_server_snapshot),N=(0,s.useSyncExternalStore)(h.tracker_shortcut_map_preference.subscribe,h.tracker_shortcut_map_preference.get_snapshot,h.tracker_shortcut_map_preference.get_server_snapshot),E=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),O=(0,c.parse_tracker_shortcut_map)(N),C=new Set((0,i.parse_topbar_quick_actions)(E)),T=b.topbar_quick_action_ids.filter(e=>!C.has(e)),R=Array.from(new Set([...Array.from(j),...T])),{email:L,is_configured:P,is_pending:$,sign_out:D}=(0,_.use_supabase_auth_session)(),[A,M]=(0,s.useState)(!1),I=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!A)return;let e=e=>{null===I.current||I.current.contains(e.target)||M(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[A]);let U=()=>{M(!1)};return(0,x.use_escape_to_cancel)(U,A),(0,t.jsxs)("div",{className:"relative shrink-0",ref:I,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":A,"aria-haspopup":"menu",onClick:()=>M(e=>!e),children:(0,t.jsx)(a.HamburgerIcon,{})}),A?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[P&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,R.map(e=>{let n=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:y,role:"menuitem",onClick:U,children:n.label})},e)}),P?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===S,onClick:()=>{let e="true"===S?"false":"true";u.cloud_sync_enabled_preference.write(e),u.cloud_sync_enabled_preference.notify(),(0,l.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,p.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===S?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===S?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{U(),(0,g.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===k?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===k?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;U(),e=O.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),P?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{U(),e.push((0,o.build_auth_page_href)("sign_in",w))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:$,onClick:()=>{U(),D()},children:$?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let w=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",a=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),o=(0,s.useMemo)(()=>(0,i.parse_topbar_quick_actions)(a),[a]);if(0===o.length)return null;let l=w.filter(e=>o.includes(e.id));return 0===l.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:l.map(n=>{let s=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":s?"page":void 0,children:n.label},n.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),s=e.i(1976),a=e.i(76080),o=e.i(45958),l=e.i(71060),i=e.i(29539);function c(){let e=((0,l.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(o.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(i.SettingsIcon,{})})}function u({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(o.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(o.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(u,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(a.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(c,{}),(0,t.jsx)(s.TopbarOverflowMenu,{})]})]})]})})}],75404)},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:n.href,"aria-current":s?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},39474,20993,e=>{"use strict";var t=e.i(13349),r=e.i(32417),n=e.i(44171),s=e.i(28274);let a=null,o=Promise.resolve();function l(){(0,r.is_supabase_configured)()&&(0,n.is_cloud_sync_enabled)()&&(null!==a&&clearTimeout(a),a=setTimeout(()=>{a=null,o=o.then(()=>(0,s.run_tracker_db_cloud_sync)()).catch(()=>{})},400))}function i(){(0,t.is_greedy_cloud_sync_enabled)()&&l()}e.s(["schedule_tracker_db_cloud_sync",0,i],20993),e.s(["push_tracker_db_cloud_after_change",0,function(){(0,t.is_greedy_cloud_sync_enabled)()?i():l()}],39474)},6216,e=>{"use strict";var t=e.i(54710),r=e.i(71060),n=e.i(29158),s=e.i(39474),a=e.i(14974),o=e.i(52663);e.s(["BackupRestoreSetting",0,function({db_path:e}){let l=(0,r.useRouter)(),{confirm:i}=(0,a.use_confirm_dialog)(),c=(0,n.useRef)(null),[u,d]=(0,n.useState)(null),[h,p]=(0,n.useState)(null),[f,m]=(0,n.useState)(!1),[g,b]=(0,n.useState)(!1),x=async()=>{m(!0),d(null),p(null);try{let e=await fetch("/api/backup");if(!e.ok){let t=await e.json();throw Error(t.error??"Download failed")}let t=await e.blob(),r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download="db.json",n.click(),URL.revokeObjectURL(r),p("Backup downloaded.")}catch(e){d(e instanceof Error?e.message:String(e))}finally{m(!1)}},_=async e=>{let t=e.target.files?.[0];if((e.target.value="",void 0!==t)&&await i({title:"Restore backup?",message:"This will replace your current time tracker data with the uploaded backup file. This cannot be undone.",confirmLabel:"Restore",variant:"danger"})){b(!0),d(null),p(null);try{let e,r=await t.text();try{e=JSON.parse(r)}catch{throw Error("Invalid backup file: file is not valid JSON.")}let n=await fetch("/api/backup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok){let e=await n.json();throw Error(e.error??"Restore failed")}p("Backup restored. Opening tracker…"),(0,s.push_tracker_db_cloud_after_change)(),l.push("/"),l.refresh()}catch(e){d(e instanceof Error?e.message:String(e))}finally{b(!1)}}},y=f||g;return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Backup and restore"}),(0,t.jsx)("p",{className:"m-0 text-[0.8rem] leading-snug text-muted",children:"Download a copy of your database or replace it with a previously saved backup file."})]}),(0,t.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-mono text-[0.65rem] leading-snug text-muted",title:e,children:e}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost","small"),disabled:y,onClick:()=>void x(),children:f?"Downloading…":"Download backup"}),(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("danger","small"),disabled:y,onClick:()=>{c.current?.click()},children:g?"Restoring…":"Restore from file"}),(0,t.jsx)("input",{ref:c,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>void _(e)})]}),null!==h?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:h}):null,null!==u?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:u}):null]})}],6216)},66764,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(52663);function s(e){let t=e.replaceAll('"','""');return`"${t}"`}function a(e){return e.replaceAll("|","\\|").replaceAll("\n"," ")}e.s(["DbExportSetting",0,function({db:e}){let[o,l]=(0,r.useState)(null),[i,c]=(0,r.useState)(null),u=(0,r.useMemo)(()=>e.sheets.reduce((e,t)=>e+t.entries.length,0),[e.sheets]),d=t=>{c(null),l(null);try{var r,n,o,i,u,d;let c,h,p,f,m="json"===t?(r=e,JSON.stringify(r,null,2)):"csv"===t?(c=e.sheets.flatMap(e=>e.entries.map(t=>{let r=new Date(t.start).toISOString(),n=null===t.end?"":new Date(t.end).toISOString(),a=null===t.end?"":String(Math.max(0,t.end-t.start)/6e4),o=t.notes.map(e=>e.text).join(" | ");return[e.name,String(t.id),t.description,t.tags.join(" "),r,n,a,String(t.notes.length),o].map(s).join(",")})),["sheet_name,entry_id,description,tags,start_iso,end_iso,duration_minutes,note_count,notes",...c].join("\n")):function(e){let t=[],r=new Date().toISOString(),n=e.sheets.reduce((e,t)=>e+t.entries.length,0);for(let s of(t.push("# super-time-tracker export"),t.push(""),t.push(`- Exported at: ${r}`),t.push(`- Active sheet: ${e.activeSheetName??"none"}`),t.push(`- Sheets: ${e.sheets.length}`),t.push(`- Entries: ${n}`),t.push(""),e.sheets)){if(t.push(`## ${s.name}`),t.push(""),t.push(`- Active entry ID: ${s.activeEntryID??"none"}`),t.push(`- Entries: ${s.entries.length}`),t.push(""),0===s.entries.length){t.push("_No entries_"),t.push("");continue}for(let e of(t.push("| ID | Description | Tags | Start | End | Duration | Notes |"),t.push("| --- | --- | --- | --- | --- | --- | --- |"),s.entries)){let r=new Date(e.start).toISOString(),n=null===e.end?"running":new Date(e.end).toISOString(),s=null===e.end?"running":`${Math.max(0,e.end-e.start)/6e4} min`,o=0===e.tags.length?"-":e.tags.map(e=>`@${e}`).join(" "),l=0===e.notes.length?"-":e.notes.map(e=>e.text).join(" / ");t.push(`| ${e.id} | ${a(e.description)} | ${a(o)} | ${r} | ${n} | ${s} | ${a(l)} |`)}t.push("")}return t.join("\n")}(e),g=`super-time-tracker-export.${(n=t,"json"===n?"json":"csv"===n?"csv":"md")}`,b=(o=t,"json"===o?"application/json":"csv"===o?"text/csv;charset=utf-8":"text/markdown;charset=utf-8");i=g,u=m,d=b,h=new Blob([u],{type:d}),p=URL.createObjectURL(h),(f=document.createElement("a")).href=p,f.download=i,f.click(),URL.revokeObjectURL(p),l(`Downloaded ${g}`)}catch(e){c(e instanceof Error?e.message:String(e))}};return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Database export"}),(0,t.jsxs)("p",{className:"m-0 text-[0.8rem] leading-snug text-muted",children:[e.sheets.length," sheets and ",u," entries ready to export."]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",className:(0,n.get_button_class_name)("ghost","small"),onClick:()=>d("json"),children:"Export JSON"}),(0,t.jsx)("button",{type:"button",className:(0,n.get_button_class_name)("ghost","small"),onClick:()=>d("csv"),children:"Export CSV"}),(0,t.jsx)("button",{type:"button",className:(0,n.get_button_class_name)("ghost","small"),onClick:()=>d("markdown"),children:"Export Markdown"})]}),null!==o?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:o}):null,null!==i?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:i}):null]})}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},39474,20993,e=>{"use strict";var t=e.i(13349),r=e.i(32417),n=e.i(44171),a=e.i(28274);let i=null,o=Promise.resolve();function s(){(0,r.is_supabase_configured)()&&(0,n.is_cloud_sync_enabled)()&&(null!==i&&clearTimeout(i),i=setTimeout(()=>{i=null,o=o.then(()=>(0,a.run_tracker_db_cloud_sync)()).catch(()=>{})},400))}function l(){(0,t.is_greedy_cloud_sync_enabled)()&&s()}e.s(["schedule_tracker_db_cloud_sync",0,l],20993),e.s(["push_tracker_db_cloud_after_change",0,function(){(0,t.is_greedy_cloud_sync_enabled)()?l():s()}],39474)},42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(44066)._(e.r(78677)),o=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(29158);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=i(e,n)),t&&(a.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(31047),a=e.r(63334);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return y}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(44066),o=e.r(54710),s=i._(e.r(29158)),l=e.r(42552),u=e.r(61717),c=e.r(37879),d=e.r(31047),f=e.r(20321);e.r(90503);let h=e.r(38520),p=e.r(19947),_=e.r(59246),m=e.r(99046);function g(t){var r,n;let a,i,g,[y,x]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),w=(0,s.useRef)(null),{href:v,as:k,children:E,prefetch:S=null,passHref:O,replace:T,shallow:j,scroll:N,onClick:A,onMouseEnter:D,onTouchStart:L,legacyBehavior:C=!1,onNavigate:P,transitionTypes:M,ref:R,unstable_dynamicOnHover:G,...F}=t;a=E,C&&("string"==typeof a||"number"==typeof a)&&(a=(0,o.jsx)("a",{children:a}));let Y=s.default.useContext(u.AppRouterContext),I=!1!==S,U=!1!==S?null===(n=S)||"auto"===n?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=k||v)?r:(0,l.formatUrl)(r);if(C){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(a)}let $=C?i&&"object"==typeof i&&i.ref:R,q=s.default.useCallback(e=>(null!==Y&&(w.current=(0,p.mountLinkInstance)(e,K,Y,U,I,x)),()=>{w.current&&((0,p.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,p.unmountPrefetchableInstance)(e)}),[I,K,Y,U,x]),W={ref:(0,c.useMergedRef)(q,$),onClick(t){C||"function"!=typeof A||A(t),C&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!Y||t.defaultPrevented||function(t,r,n,a,i,o,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,_.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);s.default.startTransition(()=>{d(r,a?"replace":"push",!1===i?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,K,w,T,N,P,M)},onMouseEnter(e){C||"function"!=typeof D||D(e),C&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),Y&&I&&(0,p.onNavigationIntent)(e.currentTarget,!0===G)},onTouchStart:function(e){C||"function"!=typeof L||L(e),C&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),Y&&I&&(0,p.onNavigationIntent)(e.currentTarget,!0===G)}};return(0,d.isAbsoluteUrl)(K)?W.href=K:C&&!O&&("a"!==i.type||"href"in i.props)||(W.href=(0,f.addBasePath)(K)),g=C?s.default.cloneElement(i,W):(0,o.jsx)("a",{...F,...W,children:a}),(0,o.jsx)(b.Provider,{value:y,children:g})}e.r(10364);let b=(0,s.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),a.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),a=e.i(32417),i=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[o,s]=(0,r.useState)(null),[l,u]=(0,r.useState)(!1),c=(0,a.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!c)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{s(e?.user.email??null)}).catch(()=>{s(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{s(t?.user.email??null)});return()=>{t.unsubscribe()}},[c]),{is_configured:c,email:o,is_pending:l,sign_out:(0,r.useCallback)(async()=>{u(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,i.notify_settings_saved)("Signed out"),e.refresh()}finally{u(!1)}},[e])}}])},45200,73205,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(29158);let i=new Set(e.i(22373).topbar_quick_action_ids),o=["today","reporting","pomodoro"];function s(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return o;let r=t.filter(e=>"string"==typeof e&&i.has(e));return Array.from(new Set(r))}catch{return o}}e.s(["parse_topbar_quick_actions",0,s],73205);var l=e.i(32792);let u=[{href:"/",label:"Tracker",match:e=>"/"===e},{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")}],c={today:{href:"/today",label:"Today",match:e=>e.startsWith("/today")},sheets:{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")},reporting:{href:"/reporting",label:"Reporting",match:e=>e.startsWith("/reporting")},pomodoro:{href:"/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/pomodoro")},"manage-tags":{href:"/settings/tags",label:"Tags",match:e=>e.startsWith("/settings/tags")},"sync-settings":{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")}};function d(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/",i=(0,a.useSyncExternalStore)(l.topbar_quick_actions_preference.subscribe,l.topbar_quick_actions_preference.get_snapshot,l.topbar_quick_actions_preference.get_server_snapshot),o=(0,a.useMemo)(()=>s(i),[i]),d=(0,a.useMemo)(()=>[...u,...o.map(e=>c[e]).filter(e=>void 0!==e)].filter((e,t,r)=>r.findIndex(t=>t.href===e.href)===t),[o]);return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:d.map(n=>{let a=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":a?"page":void 0,children:n.label},n.href)})})}],45200);var f=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,f.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(d,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},2268,76003,38240,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:r.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function a(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,n],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return a()}],76003);var i=e.i(17798),o=e.i(46549),s=e.i(10464),l=e.i(35434),u=e.i(61834),c=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===a()?"light":"dark";(0,i.apply_theme)(e),(0,c.write_stored_theme)(e),s.theme_mode_preference.write(e),(0,u.write_document_preference_cookies)({theme_mode:e,theme:e}),s.theme_mode_preference.notify(),(0,l.notify_theme_subscribers)(),(0,o.notify_settings_saved)()}],38240)},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(29158),i=e.i(37399),o=e.i(90463),s=e.i(46549),l=e.i(73205),u=e.i(66295),c=e.i(2268),d=e.i(32792),f=e.i(90299),h=e.i(28274),p=e.i(76003),_=e.i(35434),m=e.i(38240),g=e.i(22373),b=e.i(25204),y=e.i(77882);let x="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",w={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},v=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),k=(0,n.usePathname)()??"/",E=(0,a.useSyncExternalStore)(_.subscribe_theme,p.get_theme_snapshot,p.get_theme_server_snapshot),S=(0,a.useSyncExternalStore)(c.cloud_sync_enabled_preference.subscribe,c.cloud_sync_enabled_preference.get_snapshot,c.cloud_sync_enabled_preference.get_server_snapshot),O=(0,a.useSyncExternalStore)(f.tracker_shortcut_map_preference.subscribe,f.tracker_shortcut_map_preference.get_snapshot,f.tracker_shortcut_map_preference.get_server_snapshot),T=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),j=(0,u.parse_tracker_shortcut_map)(O),N=new Set((0,l.parse_topbar_quick_actions)(T)),A=g.topbar_quick_action_ids.filter(e=>!N.has(e)),D=Array.from(new Set([...Array.from(v),...A])),{email:L,is_configured:C,is_pending:P,sign_out:M}=(0,y.use_supabase_auth_session)(),[R,G]=(0,a.useState)(!1),F=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!R)return;let e=e=>{null===F.current||F.current.contains(e.target)||G(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[R]);let Y=()=>{G(!1)};return(0,b.use_escape_to_cancel)(Y,R),(0,t.jsxs)("div",{className:"relative shrink-0",ref:F,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":R,"aria-haspopup":"menu",onClick:()=>G(e=>!e),children:(0,t.jsx)(i.HamburgerIcon,{})}),R?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[C&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,D.map(e=>{let n=w[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:x,role:"menuitem",onClick:Y,children:n.label})},e)}),C?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitemcheckbox","aria-checked":"true"===S,onClick:()=>{let e="true"===S?"false":"true";c.cloud_sync_enabled_preference.write(e),c.cloud_sync_enabled_preference.notify(),(0,s.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,h.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===S?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===S?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitem",onClick:()=>{Y(),(0,m.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===E?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===E?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitem",onClick:()=>{let e;Y(),e=j.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),C?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitem",onClick:()=>{Y(),e.push((0,o.build_auth_page_href)("sign_in",k))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${x} text-danger`,role:"menuitem",disabled:P,onClick:()=>{Y(),M()},children:P?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let k=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",i=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),o=(0,a.useMemo)(()=>(0,l.parse_topbar_quick_actions)(i),[i]);if(0===o.length)return null;let s=k.filter(e=>o.includes(e.id));return 0===s.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:s.map(n=>{let a=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":a?"page":void 0,children:n.label},n.id)})})}],76080)},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),a=e.i(1976),i=e.i(76080),o=e.i(45958),s=e.i(71060),l=e.i(29539);function u(){let e=((0,s.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(o.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(l.SettingsIcon,{})})}function c({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(o.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(o.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(c,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(i.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(u,{}),(0,t.jsx)(a.TopbarOverflowMenu,{})]})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},31113,e=>{"use strict";e.s(["normalize_stored_tag",0,function(e){let t=e.trim().replace(/^@+/,"");if(0===t.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(t))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${t}`}])},18774,e=>{"use strict";e.s(["format_display_tag",0,function(e){return e.startsWith("@")?e:`@${e}`}])},14260,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(18774),a=e.i(52405),i=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:o,known_tags:s,placeholder:l,disabled:u=!1,autoFocus:c=!1,on_change:d}){let f=(0,r.useRef)(null),h=(0,r.useRef)(null),p=(0,r.useRef)(null),[_,m]=(0,r.useState)(0),[g,b]=(0,r.useState)(0),y=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("@");if(-1===n)return null;let a=r.slice(n+1);return/\s/.test(a)?null:{query:a,start_index:n,end_index:t}}(o,_),x=null===y?[]:function(e,t,r=10){let n=t.toLowerCase();return e.filter(e=>{let t=e.replace(/^@/,"").toLowerCase();return 0===n.length||t.startsWith(n)}).slice(0,r)}(s,y.query),w=null!==y&&function(e,t){if(!/^\w+$/.test(e))return!1;let r=e.toLowerCase();return t.some(e=>{try{return(0,i.normalize_stored_tag)(e).slice(1).toLowerCase()===r}catch{return!1}})}(y.query,s),v=null!==y&&x.length>0&&!w&&!u;(0,r.useLayoutEffect)(()=>{null!==p.current&&null!==f.current&&(f.current.setSelectionRange(p.current,p.current),m(p.current),p.current=null)},[o]),(0,r.useEffect)(()=>{b(0)},[o,_,x.length]);let k=()=>{m(f.current?.selectionStart??o.length)},E=()=>{b(0)},S=e=>{let t,r,a;if(null===y)return;let{next_text:i,next_cursor:s}=(t=(0,n.format_display_tag)(e),r=o.slice(0,y.start_index),a=o.slice(y.end_index),{next_text:`${r}${t}${a}`,next_cursor:r.length+t.length});p.current=s,d(i),E()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:f,id:e,type:"text",className:(0,a.get_input_class_name)(),value:o,placeholder:l,disabled:u,autoFocus:c,autoComplete:"off","aria-autocomplete":"list","aria-expanded":v,"aria-controls":v?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),m(e.target.selectionStart??e.target.value.length)},onClick:k,onKeyUp:k,onKeyDown:e=>{if(v){if("ArrowDown"===e.key){e.preventDefault(),b(e=>(e+1)%x.length);return}if("ArrowUp"===e.key){e.preventDefault(),b(e=>(e-1+x.length)%x.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=x[g];void 0!==t&&S(t);return}"Escape"===e.key&&(e.preventDefault(),E())}},onBlur:()=>{window.setTimeout(E,120)}}),v?(0,t.jsx)("ul",{ref:h,id:`${e}-tag-suggestions`,role:"listbox",className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-48 list-none overflow-y-auto rounded-md border border-panel-border bg-panel p-1.5 shadow-md",children:x.map((e,r)=>(0,t.jsx)("li",{role:"option","aria-selected":r===g,children:(0,t.jsx)("button",{type:"button",className:`block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover ${r===g?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),S(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},66770,e=>{"use strict";e.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"}]}])},35877,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DEBUG_LOGGING_STORAGE_KEY,default_value:r.DEBUG_LOGGING_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["debug_logging_preference",0,n])},85323,e=>{"use strict";var t=e.i(49087);e.s(["notify_desktop",0,function(e){if((0,t.notify_in_app)({title:e.title,body:e.body}),"u"<typeof Notification||"u">typeof document&&"visible"===document.visibilityState&&document.hasFocus()||"granted"!==Notification.permission)return;let{body:r,tag:n,title:a}=e,i={body:r,...void 0!==n?{tag:n}:{}};try{new Notification(a,i)}catch{}},"supports_desktop_notifications",0,function(){return"u">typeof Notification}])},48541,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DESKTOP_NOTIFICATIONS_STORAGE_KEY,default_value:r.DESKTOP_NOTIFICATIONS_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["desktop_notifications_preference",0,n])},69472,84545,50937,83327,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLAUDE_API_KEY_STORAGE_KEY,default_value:r.CLAUDE_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["claude_api_key_preference",0,n],69472);let a=(0,t.create_ui_preference_store)({storage_key:r.ENTRY_SUGGESTION_PROVIDER_STORAGE_KEY,default_value:r.ENTRY_SUGGESTION_PROVIDER_DEFAULT,is_valid:e=>"none"===e||"openai"===e||"claude"===e||"google_ai"===e});e.s(["entry_suggestion_provider_preference",0,a],84545);let i=(0,t.create_ui_preference_store)({storage_key:r.GOOGLE_AI_API_KEY_STORAGE_KEY,default_value:r.GOOGLE_AI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["google_ai_api_key_preference",0,i],50937);let o=(0,t.create_ui_preference_store)({storage_key:r.OPENAI_API_KEY_STORAGE_KEY,default_value:r.OPENAI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["openai_api_key_preference",0,o],83327)},90873,e=>{"use strict";var t=e.i(54710),r=e.i(29158);let n="inline-flex shrink-0 cursor-pointer items-center gap-1.5";e.s(["Checkbox",0,function({checked:e,disabled:a=!1,indeterminate:i=!1,nested:o=!1,on_change:s,label:l,aria_label:u,className:c}){let d=(0,r.useRef)(null);(0,r.useEffect)(()=>{null!==d.current&&(d.current.indeterminate=i)},[i]);let f=void 0===c?n:`${n} ${c}`,h=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{ref:d,type:"checkbox",className:"peer absolute m-0 h-px w-px overflow-hidden opacity-0",checked:e,disabled:a,"aria-label":o&&void 0===l?u:void 0,onChange:s}),(0,t.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 o?(0,t.jsx)("span",{className:f,children:h}):(0,t.jsxs)("label",{className:f,children:[h,void 0!==l?(0,t.jsx)("span",{className:"select-none text-[0.8rem] leading-tight text-muted",children:l}):null]})}])},83821,60145,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=30&&t<=720}});e.s(["daily_focus_target_minutes_preference",0,n],83821);let a=(0,t.create_ui_preference_store)({storage_key:r.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=60&&t<=4200}});e.s(["weekly_focus_target_minutes_preference",0,a],60145)},1238,51703,74597,77130,56442,73228,e=>{"use strict";e.s(["parse_focus_goals_by_name",0,function(e){if(0===e.length)return{};try{let t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))return{};let r={};for(let[e,n]of Object.entries(t)){if(null===n||"object"!=typeof n)continue;let t={};"string"==typeof n.daily&&n.daily.length>0&&(t.daily=n.daily),"string"==typeof n.weekly&&n.weekly.length>0&&(t.weekly=n.weekly),(void 0!==t.daily||void 0!==t.weekly)&&(r[e]=t)}return r}catch{return{}}}],1238);var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SCOPE_STORAGE_KEY,default_value:r.FOCUS_GOAL_SCOPE_DEFAULT,is_valid:e=>"global"===e||"sheet"===e||"tag"===e});e.s(["focus_goal_scope_preference",0,n],51703);let a=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SHEET_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_SHEET_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_sheet_name_preference",0,a],74597);let i=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_TAG_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_TAG_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_tag_name_preference",0,i],77130);let o=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_SHEET_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_SHEET_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_sheet_preference",0,o],56442);let s=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_TAG_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_TAG_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_tag_preference",0,s],73228)},39552,36519,35292,7312,43360,69978,42874,66852,16245,93415,e=>{"use strict";var t=e.i(26313),r=e.i(36145),n=e.i(72424),a=e.i(16913),i=e.i(8627),o=e.i(29263);function s(e,t){let r=(0,o.toDate)(e,t?.in);return r.setHours(0,0,0,0),r}function l(e,t){let r=(0,o.toDate)(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function u(e,t){let n=(0,r.getDefaultOptions)(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=(0,o.toDate)(e,t?.in),s=i.getDay();return i.setDate(i.getDate()-(7*(s<a)+s-a)),i.setHours(0,0,0,0),i}function c(e,t){return u(e,{...t,weekStartsOn:1})}e.s(["startOfDay",0,s],36519),e.s(["startOfYear",0,l],35292),e.s(["startOfWeek",0,u],7312),e.s(["startOfISOWeek",0,c],43360);var d=e.i(25402);function f(e,t){let r=(0,o.toDate)(e,t?.in),n=r.getFullYear(),a=(0,d.constructFrom)(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);let i=c(a),s=(0,d.constructFrom)(r,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);let l=c(s);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function h(e,t){let r,n,a=(0,o.toDate)(e,t?.in);return Math.round((c(a)-(r=f(a,void 0),(n=(0,d.constructFrom)(a,0)).setFullYear(r,0,4),n.setHours(0,0,0,0),c(n)))/i.millisecondsInWeek)+1}function p(e,t){let n=(0,o.toDate)(e,t?.in),a=n.getFullYear(),i=(0,r.getDefaultOptions)(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=(0,d.constructFrom)(t?.in||e,0);l.setFullYear(a+1,0,s),l.setHours(0,0,0,0);let c=u(l,t),f=(0,d.constructFrom)(t?.in||e,0);f.setFullYear(a,0,s),f.setHours(0,0,0,0);let h=u(f,t);return+n>=+c?a+1:+n>=+h?a:a-1}function _(e,t){let n,a,s,l,c=(0,o.toDate)(e,t?.in);return Math.round((u(c,t)-(n=(0,r.getDefaultOptions)(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=p(c,t),(l=(0,d.constructFrom)(t?.in||c,0)).setFullYear(s,0,a),l.setHours(0,0,0,0),u(l,t)))/i.millisecondsInWeek)+1}function m(e,t){let r=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+r}e.s(["getISOWeek",0,h],69978),e.s(["getWeekYear",0,p],42874),e.s(["getWeek",0,_],66852);let g={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return m("yy"===t?n%100:n,t.length)},M(e,t){let r=e.getMonth();return"M"===t?String(r+1):m(r+1,2)},d:(e,t)=>m(e.getDate(),t.length),a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>m(e.getHours()%12||12,t.length),H:(e,t)=>m(e.getHours(),t.length),m:(e,t)=>m(e.getMinutes(),t.length),s:(e,t)=>m(e.getSeconds(),t.length),S(e,t){let r=t.length;return m(Math.trunc(e.getMilliseconds()*Math.pow(10,r-3)),t.length)}},b={G:function(e,t,r){let n=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){let t=e.getFullYear();return r.ordinalNumber(t>0?t:1-t,{unit:"year"})}return g.y(e,t)},Y:function(e,t,r,n){let a=p(e,n),i=a>0?a:1-a;return"YY"===t?m(i%100,2):"Yo"===t?r.ordinalNumber(i,{unit:"year"}):m(i,t.length)},R:function(e,t){return m(f(e),t.length)},u:function(e,t){return m(e.getFullYear(),t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return m(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return m(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return g.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return m(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let a=_(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):m(a,t.length)},I:function(e,t,r){let n=h(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):m(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):g.d(e,t)},D:function(e,t,r){let u,c=function(e,t){let[r,o]=(0,a.normalizeDates)(void 0,e,t),l=s(r),u=s(o);return Math.round((l-(0,n.getTimezoneOffsetInMilliseconds)(l)-(u-(0,n.getTimezoneOffsetInMilliseconds)(u)))/i.millisecondsInDay)}(u=(0,o.toDate)(e,void 0),l(u))+1;return"Do"===t?r.ordinalNumber(c,{unit:"dayOfYear"}):m(c,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return m(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return m(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return m(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n,a=e.getHours();switch(n=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n,a=e.getHours();switch(n=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return g.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):g.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},k:function(e,t,r){let n=e.getHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):g.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):g.s(e,t)},S:function(e,t){return g.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return x(n);case"XXXX":case"XX":return w(n);default:return w(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return x(n);case"xxxx":case"xx":return w(n);default:return w(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y(n,":");default:return"GMT"+w(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y(n,":");default:return"GMT"+w(n,":")}},t:function(e,t,r){return m(Math.trunc(e/1e3),t.length)},T:function(e,t,r){return m(+e,t.length)}};function y(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return 0===i?r+String(a):r+String(a)+t+m(i,2)}function x(e,t){return e%60==0?(e>0?"-":"+")+m(Math.abs(e)/60,2):w(e,t)}function w(e,t=""){let r=Math.abs(e);return(e>0?"-":"+")+m(Math.trunc(r/60),2)+t+m(r%60,2)}let v=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},k=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},E={p:k,P:(e,t)=>{let r,n=e.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return v(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",v(a,t)).replace("{{time}}",k(i,t))}};e.s(["longFormatters",0,E],16245);let S=/^D+$/,O=/^Y+$/,T=["D","DD","YY","YYYY"];function j(e){return S.test(e)}function N(e){return O.test(e)}function A(e,t,r){var n,a,i;let o,s=(n=e,a=t,i=r,o="Y"===n[0]?"years":"days of the month",`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${a}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(s),T.includes(e))throw RangeError(s)}e.s(["isProtectedDayOfYearToken",0,j,"isProtectedWeekYearToken",0,N,"warnOrThrowProtectedError",0,A],93415);let D=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,C=/^'([^]*?)'?$/,P=/''/g,M=/[a-zA-Z]/;e.s(["format",0,function(e,n,a){let i=(0,r.getDefaultOptions)(),s=a?.locale??i.locale??t.defaultLocale,l=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,u=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,c=(0,o.toDate)(e,a?.in);if(!(c instanceof Date||"object"==typeof c&&"[object Date]"===Object.prototype.toString.call(c))&&"number"!=typeof c||isNaN(+(0,o.toDate)(c)))throw RangeError("Invalid time value");let d=n.match(L).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,E[t])(e,s.formatLong):e}).join("").match(D).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t){var r;let t;return{isToken:!1,value:(t=(r=e).match(C))?t[1].replace(P,"'"):r}}if(b[t])return{isToken:!0,value:e};if(t.match(M))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});s.localize.preprocessor&&(d=s.localize.preprocessor(c,d));let f={firstWeekContainsDate:l,weekStartsOn:u,locale:s};return d.map(t=>{if(!t.isToken)return t.value;let r=t.value;return(!a?.useAdditionalWeekYearTokens&&N(r)||!a?.useAdditionalDayOfYearTokens&&j(r))&&A(r,n,String(e)),(0,b[r[0]])(c,r,s.localize,f)}).join("")}],39552)},67999,e=>{"use strict";e.s(["get_serialized_entries_total_ms",0,function(e){return e.reduce((e,t)=>e+t.durationMs,0)}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,90503,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},31047,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return v},NormalizeError:function(){return b},PageNotFoundError:function(){return y},SP:function(){return p},ST:function(){return h},WEB_VITALS:function(){return o},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return _},stringifyError:function(){return x}};for(var s in n)Object.defineProperty(t,s,{enumerable:!0,get:n[s]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let r,t=!1;return(...n)=>(t||(t=!0,r=e(...n)),r)}let a=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>a.test(e);function u(){let{protocol:e,hostname:r,port:t}=window.location;return`${e}//${r}${t?":"+t:""}`}function c(){let{href:e}=window.location,r=u();return e.substring(r.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function _(e){let r=e.split("?");return r[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(r[1]?`?${r.slice(1).join("?")}`:"")}async function m(e,r){let t=r.res||r.ctx&&r.ctx.res;if(!e.getInitialProps)return r.ctx&&r.Component?{pageProps:await m(r.Component,r.ctx)}:{};let n=await e.getInitialProps(r);if(t&&f(t))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let p="u">typeof performance,h=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class b extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,r){super(),this.message=`Failed to load static file for page: ${e} ${r}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function x(e){return JSON.stringify({message:e.message,stack:e.stack})}},78677,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return a}};for(var s in n)Object.defineProperty(t,s,{enumerable:!0,get:n[s]});function o(e){let r={};for(let[t,n]of e.entries()){let e=r[t];void 0===e?r[t]=n:Array.isArray(e)?e.push(n):r[t]=[e,n]}return r}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function a(e){let r=new URLSearchParams;for(let[t,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)r.append(t,i(e));else r.set(t,i(n));return r}function l(e,...r){for(let t of r){for(let r of t.keys())e.delete(r);for(let[r,n]of t.entries())e.append(r,n)}return e}},52663,e=>{"use strict";e.s(["get_button_class_name",0,function(e="ghost",r="default"){return`cursor-pointer appearance-none rounded-[0.65rem] border border-transparent font-inherit font-semibold disabled:cursor-not-allowed disabled:opacity-55 ${({default:"px-3.5 py-2.5",small:"px-2.5 py-1.5 text-xs"})[r]} ${({primary:"border-accent-border bg-[var(--accent)] text-[var(--accent-text-on)]",ghost:"border-panel-border bg-ghost-bg text-inherit",danger:"border-danger-border bg-danger-soft text-danger","danger-solid":"border-danger-border bg-[var(--danger-solid)] text-[var(--danger-text-on)]"})[e]}`}])},14974,e=>{"use strict";var r=e.i(54710),t=e.i(29158),n=e.i(52663);function s({options:e,on_confirm:o,on_cancel:i}){let a=(0,t.useId)(),l=(0,t.useRef)(null),{cancelLabel:u="Cancel",confirmLabel:c="Confirm",message:d,title:f,variant:_="default"}=e;return(0,t.useEffect)(()=>{l.current?.focus();let e=e=>{"Escape"===e.key&&i()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[i]),(0,r.jsxs)("div",{className:"fixed inset-0 z-100 flex items-center justify-center p-5",role:"presentation",children:[(0,r.jsx)("button",{type:"button",className:"absolute inset-0 cursor-default border-0 bg-overlay p-0","aria-label":"Dismiss dialog",onClick:i}),(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":a,className:"relative z-1 w-full max-w-md rounded-lg border border-panel-border bg-panel p-5 shadow-md",children:[(0,r.jsx)("h2",{id:a,className:"m-0 text-[1.1rem] font-[650] tracking-tight",children:f}),(0,r.jsx)("p",{className:"m-0 mt-2 text-[0.9rem] leading-relaxed text-muted",children:d}),(0,r.jsxs)("div",{className:"mt-5 flex flex-wrap justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",className:(0,n.get_button_class_name)("ghost"),onClick:i,children:u}),(0,r.jsx)("button",{ref:l,type:"button",className:(0,n.get_button_class_name)("danger"===_?"danger":"primary"),onClick:o,children:c})]})]})]})}let o=(0,t.createContext)(null);e.s(["ConfirmDialogProvider",0,function({children:e}){let[n,i]=(0,t.useState)(null),a=(0,t.useCallback)(e=>new Promise(r=>{i({options:e,resolve:r})}),[]),l=e=>{n?.resolve(e),i(null)};return(0,r.jsxs)(o.Provider,{value:{confirm:a},children:[e,null!==n?(0,r.jsx)(s,{options:n.options,on_confirm:()=>l(!0),on_cancel:()=>l(!1)}):null]})},"use_confirm_dialog",0,function(){let e=(0,t.useContext)(o);if(null===e)throw Error("use_confirm_dialog must be used within ConfirmDialogProvider");return e}],14974)},13349,e=>{"use strict";var r=e.i(410);e.s(["is_greedy_cloud_sync_enabled",0,function(){return"true"===r.greedy_cloud_sync_preference.read()}])},49087,e=>{"use strict";let r=new Set;e.s(["notify_in_app",0,function(e){r.forEach(r=>{r(e)})},"subscribe_in_app_notifications",0,function(e){return r.add(e),()=>{r.delete(e)}}])},56996,8654,76900,e=>{"use strict";var r=e.i(34869),t=e.i(92629);let n=(0,r.create_ui_preference_store)({storage_key:t.FOCUS_NUDGES_ENABLED_STORAGE_KEY,default_value:t.FOCUS_NUDGES_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["focus_nudges_enabled_preference",0,n],56996);let s=(0,r.create_ui_preference_store)({storage_key:t.NO_LOG_REMINDER_MINUTES_STORAGE_KEY,default_value:t.NO_LOG_REMINDER_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let r=Number.parseInt(e,10);return r>=5&&r<=240}});e.s(["no_log_reminder_minutes_preference",0,s],8654);let o=(0,r.create_ui_preference_store)({storage_key:t.OVERWORK_ALERT_HOURS_STORAGE_KEY,default_value:t.OVERWORK_ALERT_HOURS_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let r=Number.parseInt(e,10);return r>=1&&r<=16}});e.s(["overwork_alert_hours_preference",0,o],76900)},80808,71122,e=>{"use strict";var r=e.i(34869),t=e.i(92629);let n=/^([01]\d|2[0-3]):[0-5]\d$/,s=(0,r.create_ui_preference_store)({storage_key:t.WORK_HOURS_END_STORAGE_KEY,default_value:t.WORK_HOURS_END_DEFAULT,is_valid:e=>n.test(e)});e.s(["work_hours_end_preference",0,s],80808);let o=/^([01]\d|2[0-3]):[0-5]\d$/,i=(0,r.create_ui_preference_store)({storage_key:t.WORK_HOURS_START_STORAGE_KEY,default_value:t.WORK_HOURS_START_DEFAULT,is_valid:e=>o.test(e)});e.s(["work_hours_start_preference",0,i],71122)},83391,14574,99211,e=>{"use strict";var r=e.i(54710),t=e.i(29158);function n({label:e,description:t,compact:s}){return(0,r.jsxs)("div",{className:"contents",children:[(0,r.jsx)("dt",{className:"m-0",children:(0,r.jsx)("kbd",{className:`inline-block min-w-7 rounded border border-panel-border bg-surface text-center font-mono font-semibold text-foreground ${s?"px-1 py-0.5 text-[0.7rem]":"px-1.5 py-0.5 text-[0.78rem]"}`,children:e})}),(0,r.jsx)("dd",{className:`m-0 self-center leading-snug text-muted ${s?"text-[0.8rem]":"text-[0.9rem]"}`,children:t})]})}function s({sections:e,compact:t=!1}){return(0,r.jsx)("div",{className:`flex flex-col ${t?"gap-2.5":"gap-4"}`,children:e.map(e=>(0,r.jsxs)("section",{children:[(0,r.jsx)("h3",{className:`m-0 font-semibold uppercase tracking-[0.04em] text-muted ${t?"text-[0.65rem]":"text-[0.72rem]"}`,children:e.title}),(0,r.jsx)("dl",{className:`m-0 grid grid-cols-[auto_minmax(0,1fr)] ${t?"mt-1.5 gap-x-3 gap-y-1.5":"mt-2 gap-x-4 gap-y-2"}`,children:e.entries.map(s=>(0,r.jsx)(n,{label:s.label,description:s.description,compact:t},`${e.title}-${s.label}-${s.description}`))})]},e.title))})}var o=e.i(52663);e.s(["KeyboardShortcutsDialog",0,function({sections:e,on_close:n}){let i=(0,t.useId)(),a=(0,t.useRef)(null);return(0,t.useEffect)(()=>{a.current?.focus();let e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n]),(0,r.jsxs)("div",{className:"fixed inset-0 z-100 flex items-center justify-center p-5",role:"presentation",children:[(0,r.jsx)("button",{type:"button",className:"absolute inset-0 cursor-default border-0 bg-overlay p-0","aria-label":"Dismiss dialog",onClick:n}),(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":i,className:"relative z-1 w-full max-w-lg rounded-lg border border-panel-border bg-panel p-5 shadow-md",children:[(0,r.jsx)("h2",{id:i,className:"m-0 text-[1.1rem] font-[650] tracking-tight",children:"Keyboard shortcuts"}),(0,r.jsx)("div",{className:"mt-4 max-h-[min(28rem,70vh)] overflow-y-auto pr-1",children:(0,r.jsx)(s,{sections:e})}),(0,r.jsx)("div",{className:"mt-5 flex justify-end",children:(0,r.jsx)("button",{ref:a,type:"button",className:(0,o.get_button_class_name)("primary"),onClick:n,children:"Close"})})]})]})}],83391);var i=e.i(22373);e.s(["get_tracker_keyboard_shortcut_sections",0,function(e=i.tracker_shortcut_defaults){return[...function(e="?"){return[{title:"General",entries:[{label:e,description:"Show keyboard shortcuts"}]}]}("?"===e.help?"?":e.help.toUpperCase()),{title:"Tracker",entries:[{label:e["check-in"].toUpperCase(),description:"Check in (focus description)"},{label:e["check-out"].toUpperCase(),description:"Check out"},{label:e["edit-entry"].toUpperCase(),description:"Edit active entry description"},{label:e["add-note"].toUpperCase(),description:"Add note to active entry"},{label:e.pomodoro.toUpperCase(),description:"Open Pomodoro"},{label:e["previous-sheet"],description:"Previous sheet"},{label:e["next-sheet"],description:"Next sheet"}]}]}],14574);var a=e.i(72074);e.s(["use_document_keyboard_shortcuts",0,function(e){let r=(0,t.useRef)(e);r.current=e,(0,t.useEffect)(()=>{let e=e=>{if(!function(e){let r=e.target;if(!(r instanceof HTMLElement))return!1;if(r.isContentEditable)return!0;let t=r.tagName;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t}(e)&&!(0,a.is_modal_dialog_open)()){for(let t of r.current)if(t.is_available?.()!==!1&&function(e,r){let t=r.modifiers??[],n=t.includes("alt"),s=t.includes("ctrl"),o=t.includes("meta"),i=t.includes("shift");return e.altKey===n&&e.ctrlKey===s&&e.metaKey===o&&e.shiftKey===i&&(1===e.key.length?e.key.toLowerCase():e.key)===(1===r.key.length?r.key.toLowerCase():r.key)}(e,t)){e.preventDefault(),t.action();return}}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[])}],99211)},45452,e=>{"use strict";var r=e.i(54710),t=e.i(71060),n=e.i(29158),s=e.i(83391),o=e.i(14574),i=e.i(66295),a=e.i(90299),l=e.i(99211);e.s(["AppKeyboardShortcuts",0,function(){let e=(0,t.usePathname)(),[u,c]=(0,n.useState)(!1),d="/"===e,f=(0,n.useSyncExternalStore)(a.tracker_shortcut_map_preference.subscribe,a.tracker_shortcut_map_preference.get_snapshot,a.tracker_shortcut_map_preference.get_server_snapshot),_=(0,n.useMemo)(()=>(0,i.parse_tracker_shortcut_map)(f),[f]),m=_.help,p="?"===m?["shift"]:[],h=(0,n.useMemo)(()=>d?[]:[{id:"help",label:"?"===m?"?":m.toUpperCase(),description:"Show keyboard shortcuts",key:m,modifiers:p,action:()=>{c(e=>!e)}}],[m,p,d]);return((0,l.use_document_keyboard_shortcuts)(h),!u||d)?null:(0,r.jsx)(s.KeyboardShortcutsDialog,{sections:(0,o.get_tracker_keyboard_shortcut_sections)(_),on_close:()=>c(!1)})}])},28302,e=>{"use strict";var r=e.i(54710),t=e.i(71060),n=e.i(29158),s=e.i(83105),o=e.i(18324),i=e.i(89497),a=e.i(13582);async function l(){await (0,a.with_ui_preferences_merge_guard)(async()=>{let e=(0,i.collect_ui_preferences_from_window)(),r=await fetch("/api/ui-preferences/merge-on-load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:e})});if(!r.ok)throw Error((await r.json()).error??"UI preferences merge on load failed");let t=await r.json();(0,o.apply_ui_preferences_from_record)(t.preferences??{})})}var u=e.i(76670),c=e.i(44171),d=e.i(32417),f=e.i(28274),_=e.i(13349);function m(){return(0,_.is_greedy_cloud_sync_enabled)()}e.s(["CloudSyncProvider",0,function({children:e}){let o=(0,t.useRouter)(),i=(0,t.usePathname)(),a=(0,n.useRef)(null),_=(0,n.useRef)(!0);return(0,n.useEffect)(()=>{if(!(0,d.is_supabase_configured)()||!(0,c.is_cloud_sync_enabled)())return;let e=(0,s.create_browser_supabase_client)(),r=e=>{!m()&&(0,u.has_tracker_db_merged_this_browser_session)()?l().catch(()=>{}):(0,f.run_tracker_db_cloud_sync)({merge_on_load:!0,on_complete:e?()=>{o.refresh()}:void 0}).catch(()=>{})};e.auth.getSession().then(({data:{session:e}})=>{null!==e&&r(!1)});let{data:{subscription:t}}=e.auth.onAuthStateChange(e=>{if("SIGNED_IN"===e){(0,u.clear_tracker_db_merged_this_browser_session)(),a.current=null,_.current=!0,r(!0);return}"SIGNED_OUT"===e&&((0,u.clear_tracker_db_merged_this_browser_session)(),a.current=null,_.current=!0,o.refresh())});return()=>{t.unsubscribe()}},[o]),(0,n.useEffect)(()=>{if((0,d.is_supabase_configured)()&&(0,c.is_cloud_sync_enabled)()&&m()){if(_.current){_.current=!1,a.current=i;return}a.current!==i&&(a.current=i,(0,f.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{}))}},[i]),(0,r.jsx)(r.Fragment,{children:e})}],28302)},79957,e=>{"use strict";var r=e.i(54710),t=e.i(29158),n=e.i(47149);function s(){let[e,s]=(0,t.useState)(null);if((0,t.useEffect)(()=>{let e=null,r=(0,n.subscribe_cloud_db_sync)(r=>{s(r),null!==e&&(clearTimeout(e),e=null),(r?.phase==="success"||r?.phase==="error")&&(e=setTimeout(()=>{s(null),e=null},2800))});return()=>{r(),null!==e&&clearTimeout(e)}},[]),null===e)return null;let o="syncing"===e.phase,i="error"===e.phase,a="success"===e.phase?100:"error"===e.phase?0:null;return(0,r.jsxs)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"w-full rounded-md border border-accent-border bg-panel px-4 py-3 text-[0.88rem] font-medium text-foreground shadow-md",children:[(0,r.jsx)("p",{className:"m-0 mb-2.5 leading-snug",children:e.message}),(0,r.jsx)("div",{className:"h-1 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--accent)_22%,var(--panel-border))]","aria-hidden":"true",children:o?(0,r.jsx)("div",{className:"cloud-db-sync-progress-indeterminate h-full w-1/3 rounded-full bg-accent"}):(0,r.jsx)("div",{className:`h-full rounded-full transition-[width] duration-300 ease-out ${i?"bg-danger":"bg-accent"}`,style:{width:`${a??0}%`}})})]})}var o=e.i(49087);function i(){let[e,n]=(0,t.useState)(null);return((0,t.useEffect)(()=>{let e=null,r=(0,o.subscribe_in_app_notifications)(r=>{n(r),null!==e&&clearTimeout(e),e=setTimeout(()=>{n(null),e=null},3200)});return()=>{r(),null!==e&&clearTimeout(e)}},[]),null===e)?null:(0,r.jsxs)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"w-full rounded-md border border-accent-border bg-panel px-4 py-2.5 text-foreground shadow-md",children:[(0,r.jsx)("p",{className:"m-0 text-[0.84rem] font-semibold",children:e.title}),(0,r.jsx)("p",{className:"m-0 mt-0.5 text-[0.8rem] leading-snug text-muted",children:e.body})]})}var a=e.i(46549);function l(){let[e,n]=(0,t.useState)(null);return((0,t.useEffect)(()=>{let e=null,r=(0,a.subscribe_settings_saved)(r=>{n(r),null!==e&&clearTimeout(e),e=setTimeout(()=>{n(null),e=null},2800)});return()=>{r(),null!==e&&clearTimeout(e)}},[]),null===e)?null:(0,r.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"w-full 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:e||a.SETTINGS_SAVED_DEFAULT_MESSAGE})}e.s(["ToastNotifications",0,function(){return(0,r.jsxs)("div",{className:"pointer-events-none fixed z-50 flex w-[min(22rem,calc(100vw-2rem))] flex-col items-end gap-2 right-[max(1rem,env(safe-area-inset-right,0px))] bottom-[max(1rem,env(safe-area-inset-bottom,0px))]",children:[(0,r.jsx)(i,{}),(0,r.jsx)(s,{}),(0,r.jsx)(l,{})]})}],79957)},19943,e=>{"use strict";var r=e.i(29158),t=e.i(53602);e.s(["DocumentPreferencesInit",0,function(){return(0,r.useLayoutEffect)(()=>{(0,t.apply_ui_preferences_dom_from_window)()},[]),null}])},93626,e=>{"use strict";var r=e.i(29158),t=e.i(56996),n=e.i(8654),s=e.i(76900),o=e.i(80808),i=e.i(71122);let a=e=>{let r=/^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);return null===r?null:60*Number.parseInt(r[1],10)+Number.parseInt(r[2],10)};e.s(["NotificationRulesRunner",0,function(){let e=(0,r.useSyncExternalStore)(t.focus_nudges_enabled_preference.subscribe,t.focus_nudges_enabled_preference.get_snapshot,t.focus_nudges_enabled_preference.get_server_snapshot),l=(0,r.useSyncExternalStore)(n.no_log_reminder_minutes_preference.subscribe,n.no_log_reminder_minutes_preference.get_snapshot,n.no_log_reminder_minutes_preference.get_server_snapshot),u=(0,r.useSyncExternalStore)(s.overwork_alert_hours_preference.subscribe,s.overwork_alert_hours_preference.get_snapshot,s.overwork_alert_hours_preference.get_server_snapshot),c=(0,r.useSyncExternalStore)(i.work_hours_start_preference.subscribe,i.work_hours_start_preference.get_snapshot,i.work_hours_start_preference.get_server_snapshot),d=(0,r.useSyncExternalStore)(o.work_hours_end_preference.subscribe,o.work_hours_end_preference.get_snapshot,o.work_hours_end_preference.get_server_snapshot),f=(0,r.useRef)(0),_=(0,r.useRef)(null);return(0,r.useEffect)(()=>{"Notification"in window&&"true"===e&&"default"===window.Notification.permission&&window.Notification.requestPermission()},[e]),(0,r.useEffect)(()=>{if(!("Notification"in window)||"true"!==e)return;let r=60*Math.max(1,Number.parseInt(u,10)||1)*6e4,t=60*Math.max(1,Number.parseInt(l,10)||1)*1e3,n=(e,r)=>{"granted"===window.Notification.permission&&new window.Notification(e,{body:r})},s=async()=>{try{let e=await fetch("/api/state",{cache:"no-store"});if(!e.ok)return;let s=(await e.json()).runningEntry,o=new Date,i=o.getTime();if(null===s&&((e,r,t)=>{let n=a(r),s=a(t);if(null===n||null===s)return!1;let o=e.getDay();if(0===o||6===o)return!1;let i=60*e.getHours()+e.getMinutes();return n<=s?i>=n&&i<s:i>=n||i<s})(o,c,d)&&i-f.current>=t&&(n("No active timer during work hours","Start tracking or check in to keep your work log current."),f.current=i),null!=s){let e=Date.parse(s.start);if(Number.isFinite(e)){let t=`${s.sheetName}-${s.id}`;i-e>=r&&_.current!==t&&(n("Long-running timer detected",`Timer has been running for over ${u}h. Consider splitting: ${s.description}`),_.current=t)}}else _.current=null}catch{}};s();let o=window.setInterval(()=>{s()},6e4);return()=>{window.clearInterval(o)}},[e,l,u,d,c]),null}])},8091,e=>{"use strict";var r=e.i(54710),t=e.i(29158),n=e.i(52663);let s="super-time-tracker-pwa-install-notice-dismissed";e.s(["PwaInstallNotice",0,function(){let[e,o]=(0,t.useState)(null),[i,a]=(0,t.useState)(!0),[l,u]=(0,t.useState)(!1);return((0,t.useEffect)(()=>{let e=window.matchMedia("(display-mode: standalone)").matches||"standalone"in navigator&&!0===navigator.standalone,r="true"===window.localStorage.getItem(s);if(e||r)return void a(!0);a(!1);let t=e=>{e.preventDefault(),o(e)},n=()=>{window.localStorage.setItem(s,"true"),a(!0),o(null)};return window.addEventListener("beforeinstallprompt",t),window.addEventListener("appinstalled",n),()=>{window.removeEventListener("beforeinstallprompt",t),window.removeEventListener("appinstalled",n)}},[]),i)?null:(0,r.jsxs)("aside",{className:"fixed right-4 bottom-4 z-50 w-[min(22rem,calc(100vw-2rem))] rounded-md border border-accent-border bg-panel p-3.5 shadow-md",children:[(0,r.jsx)("p",{className:"m-0 text-[0.9rem] font-semibold",children:"Install app"}),(0,r.jsx)("p",{className:"m-0 mt-1 text-[0.82rem] leading-snug text-muted",children:null!==e?"Install Super Time Tracker for offline use and a faster startup.":"Install from your browser menu to enable app-style launch and offline support."}),(0,r.jsxs)("div",{className:"mt-3 flex gap-2",children:[null!==e?(0,r.jsx)("button",{type:"button",className:(0,n.get_button_class_name)("primary","small"),disabled:l,onClick:()=>{u(!0),e.prompt().then(async()=>{"accepted"===(await e.userChoice).outcome&&(window.localStorage.setItem(s,"true"),a(!0))}).finally(()=>{u(!1),o(null)})},children:l?"Opening…":"Install"}):null,(0,r.jsx)("button",{type:"button",className:(0,n.get_button_class_name)("ghost","small"),onClick:()=>{window.localStorage.setItem(s,"true"),a(!0)},children:"Dismiss"})]})]})}])},33334,e=>{"use strict";var r=e.i(29158);e.s(["PwaRegister",0,function(){return(0,r.useEffect)(()=>{"serviceWorker"in navigator&&"caches"in window&&navigator.serviceWorker.register("/sw.js").then(()=>{let e;0!==(e="u"<typeof document?[]:[...new Set([...Array.from(document.querySelectorAll("script[src]")).map(e=>e.src).filter(e=>e.length>0),...Array.from(document.querySelectorAll('link[rel="stylesheet"],link[rel="modulepreload"],link[rel="preload"][as="script"],link[rel="preload"][as="style"]')).map(e=>e.href).filter(e=>e.length>0)])].filter(e=>{try{return new URL(e).origin===window.location.origin}catch{return!1}})).length&&caches.open("super-time-tracker-shell-v1").then(r=>Promise.all(e.map(e=>fetch(e,{cache:"no-store"}).then(t=>t.ok?r.put(e,t.clone()):Promise.resolve()).catch(()=>Promise.resolve()))))})},[]),null}])},89391,e=>{"use strict";var r=e.i(29158),t=e.i(17798),n=e.i(35434),s=e.i(70223),o=e.i(10464),i=e.i(61834),a=e.i(81553);e.s(["ThemeModeSystemListener",0,function(){return(0,r.useEffect)(()=>{let e=window.matchMedia("(prefers-color-scheme: light)"),r=()=>{if("system"!==o.theme_mode_preference.read())return;let e=(0,s.resolve_theme_mode_to_theme)("system");(0,t.apply_theme)(e),(0,a.write_stored_theme)(e),(0,i.write_document_preference_cookies)({theme_mode:"system",theme:e}),(0,n.notify_theme_subscribers)()};return e.addEventListener("change",r),()=>{e.removeEventListener("change",r)}},[]),null}])},10289,e=>{"use strict";var r=e.i(29158),t=e.i(53602),n=e.i(60609);e.s(["UiPreferencesDocumentSync",0,function(){return(0,r.useEffect)(()=>{let e=()=>{(0,t.apply_ui_preferences_dom_from_window)()};return window.addEventListener(n.UI_PREFERENCES_APPLIED_EVENT,e),()=>{window.removeEventListener(n.UI_PREFERENCES_APPLIED_EVENT,e)}},[]),null}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(78677)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",o=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(29158);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),s=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return x}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),i=e.r(54710),o=a._(e.r(29158)),l=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),f=e.r(20321);e.r(90503);let h=e.r(38520),p=e.r(19947),m=e.r(59246),b=e.r(99046);function g(t){var r,n;let s,a,g,[x,y]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:j,as:k,children:w,prefetch:N=null,passHref:S,replace:T,shallow:C,scroll:E,onClick:O,onMouseEnter:P,onTouchStart:L,legacyBehavior:A=!1,onNavigate:R,transitionTypes:M,ref:W,unstable_dynamicOnHover:I,...D}=t;s=w,A&&("string"==typeof s||"number"==typeof s)&&(s=(0,i.jsx)("a",{children:s}));let q=o.default.useContext(c.AppRouterContext),U=!1!==N,$=!1!==N?null===(n=N)||"auto"===n?b.FetchStrategy.PPR:b.FetchStrategy.Full:b.FetchStrategy.PPR,K="string"==typeof(r=k||j)?r:(0,l.formatUrl)(r);if(A){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(s)}let B=A?a&&"object"==typeof a&&a.ref:W,F=o.default.useCallback(e=>(null!==q&&(v.current=(0,p.mountLinkInstance)(e,K,q,$,U,y)),()=>{v.current&&((0,p.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,K,q,$,y]),z={ref:(0,u.useMergedRef)(F,B),onClick(t){A||"function"!=typeof O||O(t),A&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!q||t.defaultPrevented||function(t,r,n,s,a,i,l){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);o.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,K,v,T,E,R,M)},onMouseEnter(e){A||"function"!=typeof P||P(e),A&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),q&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){A||"function"!=typeof L||L(e),A&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),q&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(K)?z.href=K:A&&!S&&("a"!==a.type||"href"in a.props)||(z.href=(0,f.addBasePath)(K)),g=A?o.default.cloneElement(a,z):(0,i.jsx)("a",{...D,...z,children:s}),(0,i.jsx)(_.Provider,{value:x,children:g})}e.r(10364);let _=(0,o.createContext)(p.IDLE_LINK_STATUS),x=()=>(0,o.useContext)(_);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),s=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[i,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(!1),u=(0,s.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{o(e?.user.email??null)}).catch(()=>{o(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{o(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:i,is_pending:l,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},45200,73205,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158);let a=new Set(e.i(22373).topbar_quick_action_ids),i=["today","reporting","pomodoro"];function o(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return i;let r=t.filter(e=>"string"==typeof e&&a.has(e));return Array.from(new Set(r))}catch{return i}}e.s(["parse_topbar_quick_actions",0,o],73205);var l=e.i(32792);let c=[{href:"/",label:"Tracker",match:e=>"/"===e},{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")}],u={today:{href:"/today",label:"Today",match:e=>e.startsWith("/today")},sheets:{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")},reporting:{href:"/reporting",label:"Reporting",match:e=>e.startsWith("/reporting")},pomodoro:{href:"/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/pomodoro")},"manage-tags":{href:"/settings/tags",label:"Tags",match:e=>e.startsWith("/settings/tags")},"sync-settings":{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")}};function d(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/",a=(0,s.useSyncExternalStore)(l.topbar_quick_actions_preference.subscribe,l.topbar_quick_actions_preference.get_snapshot,l.topbar_quick_actions_preference.get_server_snapshot),i=(0,s.useMemo)(()=>o(a),[a]),d=(0,s.useMemo)(()=>[...c,...i.map(e=>u[e]).filter(e=>void 0!==e)].filter((e,t,r)=>r.findIndex(t=>t.href===e.href)===t),[i]);return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:d.map(n=>{let s=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":s?"page":void 0,children:n.label},n.href)})})}],45200);var f=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,f.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(d,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},2268,76003,38240,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:r.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function s(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,n],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return s()}],76003);var a=e.i(17798),i=e.i(46549),o=e.i(10464),l=e.i(35434),c=e.i(61834),u=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===s()?"light":"dark";(0,a.apply_theme)(e),(0,u.write_stored_theme)(e),o.theme_mode_preference.write(e),(0,c.write_document_preference_cookies)({theme_mode:e,theme:e}),o.theme_mode_preference.notify(),(0,l.notify_theme_subscribers)(),(0,i.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let s=(0,t.useRef)(e);s.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158),a=e.i(37399),i=e.i(90463),o=e.i(46549),l=e.i(73205),c=e.i(66295),u=e.i(2268),d=e.i(32792),f=e.i(90299),h=e.i(28274),p=e.i(76003),m=e.i(35434),b=e.i(38240),g=e.i(22373),_=e.i(25204),x=e.i(77882);let y="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},j=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),k=(0,n.usePathname)()??"/",w=(0,s.useSyncExternalStore)(m.subscribe_theme,p.get_theme_snapshot,p.get_theme_server_snapshot),N=(0,s.useSyncExternalStore)(u.cloud_sync_enabled_preference.subscribe,u.cloud_sync_enabled_preference.get_snapshot,u.cloud_sync_enabled_preference.get_server_snapshot),S=(0,s.useSyncExternalStore)(f.tracker_shortcut_map_preference.subscribe,f.tracker_shortcut_map_preference.get_snapshot,f.tracker_shortcut_map_preference.get_server_snapshot),T=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),C=(0,c.parse_tracker_shortcut_map)(S),E=new Set((0,l.parse_topbar_quick_actions)(T)),O=g.topbar_quick_action_ids.filter(e=>!E.has(e)),P=Array.from(new Set([...Array.from(j),...O])),{email:L,is_configured:A,is_pending:R,sign_out:M}=(0,x.use_supabase_auth_session)(),[W,I]=(0,s.useState)(!1),D=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!W)return;let e=e=>{null===D.current||D.current.contains(e.target)||I(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[W]);let q=()=>{I(!1)};return(0,_.use_escape_to_cancel)(q,W),(0,t.jsxs)("div",{className:"relative shrink-0",ref:D,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":W,"aria-haspopup":"menu",onClick:()=>I(e=>!e),children:(0,t.jsx)(a.HamburgerIcon,{})}),W?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[A&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,P.map(e=>{let n=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:y,role:"menuitem",onClick:q,children:n.label})},e)}),A?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===N,onClick:()=>{let e="true"===N?"false":"true";u.cloud_sync_enabled_preference.write(e),u.cloud_sync_enabled_preference.notify(),(0,o.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,h.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===N?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===N?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{q(),(0,b.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===w?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===w?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;q(),e=C.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{q(),e.push((0,i.build_auth_page_href)("sign_in",k))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:R,onClick:()=>{q(),M()},children:R?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let k=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",a=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),i=(0,s.useMemo)(()=>(0,l.parse_topbar_quick_actions)(a),[a]);if(0===i.length)return null;let o=k.filter(e=>i.includes(e.id));return 0===o.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:o.map(n=>{let s=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":s?"page":void 0,children:n.label},n.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),s=e.i(1976),a=e.i(76080),i=e.i(45958),o=e.i(71060),l=e.i(29539);function c(){let e=((0,o.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(i.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(l.SettingsIcon,{})})}function u({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(i.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(i.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(u,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(a.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(c,{}),(0,t.jsx)(s.TopbarOverflowMenu,{})]})]})]})})}],75404)},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:n.href,"aria-current":s?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},85323,e=>{"use strict";var t=e.i(49087);e.s(["notify_desktop",0,function(e){if((0,t.notify_in_app)({title:e.title,body:e.body}),"u"<typeof Notification||"u">typeof document&&"visible"===document.visibilityState&&document.hasFocus()||"granted"!==Notification.permission)return;let{body:r,tag:n,title:s}=e,a={body:r,...void 0!==n?{tag:n}:{}};try{new Notification(s,a)}catch{}},"supports_desktop_notifications",0,function(){return"u">typeof Notification}])},48541,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DESKTOP_NOTIFICATIONS_STORAGE_KEY,default_value:r.DESKTOP_NOTIFICATIONS_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["desktop_notifications_preference",0,n])},70957,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(48541),s=e.i(7902),a=e.i(85323);e.s(["DesktopNotificationsSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.desktop_notifications_preference.subscribe,n.desktop_notifications_preference.get_snapshot,n.desktop_notifications_preference.get_server_snapshot),i=(0,a.supports_desktop_notifications)(),[o,l]=(0,r.useState)(()=>i?Notification.permission:null);return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-2.5",children:[(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,disabled:!i,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.desktop_notifications_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Desktop notifications"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show browser notifications when tracking starts or stops."})]})]}),i?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("p",{className:"m-0 text-[0.78rem] text-muted",children:["Permission: ",o??"default"]}),"granted"!==o?(0,t.jsx)("button",{type:"button",className:"rounded-md border border-panel-border bg-surface-raised px-2 py-1 text-[0.78rem] font-semibold hover:bg-surface-hover",onClick:async()=>{l(await Notification.requestPermission())},children:"Allow notifications"}):null]}):(0,t.jsx)("p",{className:"m-0 text-[0.78rem] text-muted",children:"Your browser does not support desktop notifications."})]})}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let a=e.r(44066)._(e.r(78677)),l=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||l.test(s))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${s}${c}${n}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let s=e.r(29158);function n(e,t){let r=(0,s.useRef)(null),n=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=a(e,s)),t&&(n.current=a(t,s))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let s=e.r(31047),n=e.r(63334);function a(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return g},useLinkStatus:function(){return b}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let a=e.r(44066),l=e.r(54710),o=a._(e.r(29158)),i=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),p=e.r(20321);e.r(90503);let _=e.r(38520),f=e.r(19947),h=e.r(59246),m=e.r(99046);function g(t){var r,s;let n,a,g,[b,y]=(0,o.useOptimistic)(f.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:j,as:k,children:w,prefetch:S=null,passHref:N,replace:E,shallow:T,scroll:O,onClick:A,onMouseEnter:C,onTouchStart:L,legacyBehavior:P=!1,onNavigate:R,transitionTypes:U,ref:M,unstable_dynamicOnHover:F,...G}=t;n=w,P&&("string"==typeof n||"number"==typeof n)&&(n=(0,l.jsx)("a",{children:n}));let W=o.default.useContext(c.AppRouterContext),D=!1!==S,I=!1!==S?null===(s=S)||"auto"===s?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,$="string"==typeof(r=k||j)?r:(0,i.formatUrl)(r);if(P){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(n)}let K=P?a&&"object"==typeof a&&a.ref:M,q=o.default.useCallback(e=>(null!==W&&(v.current=(0,f.mountLinkInstance)(e,$,W,I,D,y)),()=>{v.current&&((0,f.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,f.unmountPrefetchableInstance)(e)}),[D,$,W,I,y]),B={ref:(0,u.useMergedRef)(q,K),onClick(t){P||"function"!=typeof A||A(t),P&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!W||t.defaultPrevented||function(t,r,s,n,a,l,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);o.default.startTransition(()=>{d(r,n?"replace":"push",!1===a?_.ScrollBehavior.NoScroll:_.ScrollBehavior.Default,s.current,i)})}}(t,$,v,E,O,R,U)},onMouseEnter(e){P||"function"!=typeof C||C(e),P&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),W&&D&&(0,f.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){P||"function"!=typeof L||L(e),P&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),W&&D&&(0,f.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,d.isAbsoluteUrl)($)?B.href=$:P&&!N&&("a"!==a.type||"href"in a.props)||(B.href=(0,p.addBasePath)($)),g=P?o.default.cloneElement(a,B):(0,l.jsx)("a",{...G,...B,children:n}),(0,l.jsx)(x.Provider,{value:b,children:g})}e.r(10364);let x=(0,o.createContext)(f.IDLE_LINK_STATUS),b=()=>(0,o.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),s=e.i(83105),n=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[l,o]=(0,r.useState)(null),[i,c]=(0,r.useState)(!1),u=(0,n.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,s.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{o(e?.user.email??null)}).catch(()=>{o(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{o(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:l,is_pending:i,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,s.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},45200,73205,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),s=e.i(71060),n=e.i(29158);let a=new Set(e.i(22373).topbar_quick_action_ids),l=["today","reporting","pomodoro"];function o(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return l;let r=t.filter(e=>"string"==typeof e&&a.has(e));return Array.from(new Set(r))}catch{return l}}e.s(["parse_topbar_quick_actions",0,o],73205);var i=e.i(32792);let c=[{href:"/",label:"Tracker",match:e=>"/"===e},{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")}],u={today:{href:"/today",label:"Today",match:e=>e.startsWith("/today")},sheets:{href:"/sheets",label:"Sheets",match:e=>e.startsWith("/sheets")},reporting:{href:"/reporting",label:"Reporting",match:e=>e.startsWith("/reporting")},pomodoro:{href:"/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/pomodoro")},"manage-tags":{href:"/settings/tags",label:"Tags",match:e=>e.startsWith("/settings/tags")},"sync-settings":{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")}};function d(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,s.usePathname)()??"/",a=(0,n.useSyncExternalStore)(i.topbar_quick_actions_preference.subscribe,i.topbar_quick_actions_preference.get_snapshot,i.topbar_quick_actions_preference.get_server_snapshot),l=(0,n.useMemo)(()=>o(a),[a]),d=(0,n.useMemo)(()=>[...c,...l.map(e=>u[e]).filter(e=>void 0!==e)].filter((e,t,r)=>r.findIndex(t=>t.href===e.href)===t),[l]);return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:d.map(s=>{let n=s.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${n?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:s.href,"aria-current":n?"page":void 0,children:s.label},s.href)})})}],45200);var p=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,p.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(d,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",s=t.trim();return 0===s.length||"/"===s?r:`${r}?next=${encodeURIComponent(s)}`}])},2268,76003,38240,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let s=(0,t.create_ui_preference_store)({storage_key:r.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:r.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function n(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,s],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return n()}],76003);var a=e.i(17798),l=e.i(46549),o=e.i(10464),i=e.i(35434),c=e.i(61834),u=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===n()?"light":"dark";(0,a.apply_theme)(e),(0,u.write_stored_theme)(e),o.theme_mode_preference.write(e),(0,c.write_document_preference_cookies)({theme_mode:e,theme:e}),o.theme_mode_preference.notify(),(0,i.notify_theme_subscribers)(),(0,l.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,s=!0){let n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if(!s)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),n.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),s=e.i(71060),n=e.i(29158),a=e.i(37399),l=e.i(90463),o=e.i(46549),i=e.i(73205),c=e.i(66295),u=e.i(2268),d=e.i(32792),p=e.i(90299),_=e.i(28274),f=e.i(76003),h=e.i(35434),m=e.i(38240),g=e.i(22373),x=e.i(25204),b=e.i(77882);let y="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},j=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,s.useRouter)(),k=(0,s.usePathname)()??"/",w=(0,n.useSyncExternalStore)(h.subscribe_theme,f.get_theme_snapshot,f.get_theme_server_snapshot),S=(0,n.useSyncExternalStore)(u.cloud_sync_enabled_preference.subscribe,u.cloud_sync_enabled_preference.get_snapshot,u.cloud_sync_enabled_preference.get_server_snapshot),N=(0,n.useSyncExternalStore)(p.tracker_shortcut_map_preference.subscribe,p.tracker_shortcut_map_preference.get_snapshot,p.tracker_shortcut_map_preference.get_server_snapshot),E=(0,n.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),T=(0,c.parse_tracker_shortcut_map)(N),O=new Set((0,i.parse_topbar_quick_actions)(E)),A=g.topbar_quick_action_ids.filter(e=>!O.has(e)),C=Array.from(new Set([...Array.from(j),...A])),{email:L,is_configured:P,is_pending:R,sign_out:U}=(0,b.use_supabase_auth_session)(),[M,F]=(0,n.useState)(!1),G=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!M)return;let e=e=>{null===G.current||G.current.contains(e.target)||F(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[M]);let W=()=>{F(!1)};return(0,x.use_escape_to_cancel)(W,M),(0,t.jsxs)("div",{className:"relative shrink-0",ref:G,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":M,"aria-haspopup":"menu",onClick:()=>F(e=>!e),children:(0,t.jsx)(a.HamburgerIcon,{})}),M?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[P&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,C.map(e=>{let s=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:s.href,className:y,role:"menuitem",onClick:W,children:s.label})},e)}),P?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===S,onClick:()=>{let e="true"===S?"false":"true";u.cloud_sync_enabled_preference.write(e),u.cloud_sync_enabled_preference.notify(),(0,o.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,_.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===S?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===S?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{W(),(0,m.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===w?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===w?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;W(),e=T.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),P?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{W(),e.push((0,l.build_auth_page_href)("sign_in",k))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:R,onClick:()=>{W(),U()},children:R?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let k=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,s.usePathname)()??"/",a=(0,n.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),l=(0,n.useMemo)(()=>(0,i.parse_topbar_quick_actions)(a),[a]);if(0===l.length)return null;let o=k.filter(e=>l.includes(e.id));return 0===o.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:o.map(s=>{let n=e.startsWith(s.href);return(0,t.jsx)(r.default,{href:s.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${n?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":n?"page":void 0,children:s.label},s.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),s=e.i(648),n=e.i(1976),a=e.i(76080),l=e.i(45958),o=e.i(71060),i=e.i(29539);function c(){let e=((0,o.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(l.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(i.SettingsIcon,{})})}function u({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(l.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(l.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(u,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(a.TopbarQuickActions,{}),(0,t.jsx)(s.TopbarCloudStatus,{}),(0,t.jsx)(c,{}),(0,t.jsx)(n.TopbarOverflowMenu,{})]})]})]})})}],75404)},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),s=e.i(71060);let n=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,s.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:n.map(s=>{let n=s.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:s.href,"aria-current":n?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${n?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:s.label})},s.href)})})})}])},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},83821,60145,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let s=(0,t.create_ui_preference_store)({storage_key:r.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=30&&t<=720}});e.s(["daily_focus_target_minutes_preference",0,s],83821);let n=(0,t.create_ui_preference_store)({storage_key:r.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=60&&t<=4200}});e.s(["weekly_focus_target_minutes_preference",0,n],60145)},1238,51703,74597,77130,56442,73228,e=>{"use strict";e.s(["parse_focus_goals_by_name",0,function(e){if(0===e.length)return{};try{let t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))return{};let r={};for(let[e,s]of Object.entries(t)){if(null===s||"object"!=typeof s)continue;let t={};"string"==typeof s.daily&&s.daily.length>0&&(t.daily=s.daily),"string"==typeof s.weekly&&s.weekly.length>0&&(t.weekly=s.weekly),(void 0!==t.daily||void 0!==t.weekly)&&(r[e]=t)}return r}catch{return{}}}],1238);var t=e.i(34869),r=e.i(92629);let s=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SCOPE_STORAGE_KEY,default_value:r.FOCUS_GOAL_SCOPE_DEFAULT,is_valid:e=>"global"===e||"sheet"===e||"tag"===e});e.s(["focus_goal_scope_preference",0,s],51703);let n=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SHEET_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_SHEET_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_sheet_name_preference",0,n],74597);let a=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_TAG_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_TAG_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_tag_name_preference",0,a],77130);let l=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_SHEET_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_SHEET_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_sheet_preference",0,l],56442);let o=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_TAG_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_TAG_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_tag_preference",0,o],73228)},34032,e=>{"use strict";var t=e.i(54710),r=e.i(29158),s=e.i(1238);function n(e,t,r,n){if(0===t.length)return e;let a=(0,s.parse_focus_goals_by_name)(e),l=a[t]??{};if(0===n.length){let e={...l};delete e[r],void 0===e.daily&&void 0===e.weekly?delete a[t]:a[t]=e}else a[t]={...l,[r]:n};return JSON.stringify(a)}var a=e.i(83821),l=e.i(51703),o=e.i(74597),i=e.i(77130),c=e.i(56442),u=e.i(73228),d=e.i(56996),p=e.i(8654),_=e.i(76900),f=e.i(80808),h=e.i(71122),m=e.i(60145),g=e.i(7902);let x=[120,180,240,300,360,420,480],b=[600,900,1200,1500,1800,2100,2400],y=[15,30,45,60,90,120],v=[6,8,10,12,14],j=[{value:"global",label:"Global"},{value:"sheet",label:"Per-sheet"},{value:"tag",label:"Per-tag"}];function k({disabled:e,daily_target_minutes:r,weekly_target_minutes:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Global targets"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Daily target"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:r,disabled:e,onChange:e=>(0,g.persist_ui_preference)(a.daily_focus_target_minutes_preference,e.target.value),children:x.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Weekly target"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:s,disabled:e,onChange:e=>(0,g.persist_ui_preference)(m.weekly_focus_target_minutes_preference,e.target.value),children:b.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))})]})]})]})}function w({kind:e,names:r,disabled:s,active_name:a,map:l,json:d}){let p="sheet"===e?"Per-sheet targets":"Per-tag targets";if(0===r.length)return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:p}),(0,t.jsx)("p",{className:"m-0 text-[0.85rem] text-muted",children:"sheet"===e?"Create a sheet to configure per-sheet goals.":"Add a tag to a time entry to configure per-tag goals."})]});let _=`focus-goal-active-${e}`;return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:p}),(0,t.jsxs)("span",{className:"text-[0.75rem] text-muted",children:["Pick the ",e," shown in the focus banner."]})]}),(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:r.map(r=>{let p=l[r]??{},f=p.daily??"",h=p.weekly??"",m=a===r;return(0,t.jsxs)("li",{className:`grid items-center gap-2 rounded-md border bg-panel px-3 py-2.5 transition-colors md:grid-cols-[auto_minmax(0,1fr)_minmax(0,11rem)_minmax(0,11rem)] grid-cols-[auto_minmax(0,1fr)] ${m?"border-accent-border bg-accent-soft":"border-panel-border"}`,children:[(0,t.jsx)("label",{className:"flex shrink-0 cursor-pointer items-center justify-center",children:(0,t.jsx)("input",{type:"radio",name:_,className:"cursor-pointer",checked:m,disabled:s,"aria-label":`Show ${r} in focus banner`,onChange:()=>(0,g.persist_ui_preference)("sheet"===e?o.focus_goal_sheet_name_preference:i.focus_goal_tag_name_preference,r)})}),(0,t.jsx)("span",{className:"truncate text-[0.9rem] font-medium",title:r,children:"tag"!==e||r.startsWith("@")?r:`@${r}`}),(0,t.jsxs)("label",{className:"flex items-center gap-2 md:col-start-3",children:[(0,t.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Daily"}),(0,t.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:f,disabled:s,onChange:t=>(0,g.persist_ui_preference)("sheet"===e?c.focus_goals_per_sheet_preference:u.focus_goals_per_tag_preference,n(d,r,"daily",t.target.value)),children:[(0,t.jsx)("option",{value:"",children:"Not set"}),x.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))]})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 md:col-start-4",children:[(0,t.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Weekly"}),(0,t.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:h,disabled:s,onChange:t=>(0,g.persist_ui_preference)("sheet"===e?c.focus_goals_per_sheet_preference:u.focus_goals_per_tag_preference,n(d,r,"weekly",t.target.value)),children:[(0,t.jsx)("option",{value:"",children:"Not set"}),b.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))]})]})]},r)})})]})}e.s(["FocusGoalsNudgesSetting",0,function({sheet_names:e,tag_names:n}){let x=(0,r.useSyncExternalStore)(d.focus_nudges_enabled_preference.subscribe,d.focus_nudges_enabled_preference.get_snapshot,d.focus_nudges_enabled_preference.get_server_snapshot),b=(0,r.useSyncExternalStore)(a.daily_focus_target_minutes_preference.subscribe,a.daily_focus_target_minutes_preference.get_snapshot,a.daily_focus_target_minutes_preference.get_server_snapshot),S=(0,r.useSyncExternalStore)(m.weekly_focus_target_minutes_preference.subscribe,m.weekly_focus_target_minutes_preference.get_snapshot,m.weekly_focus_target_minutes_preference.get_server_snapshot),N=(0,r.useSyncExternalStore)(p.no_log_reminder_minutes_preference.subscribe,p.no_log_reminder_minutes_preference.get_snapshot,p.no_log_reminder_minutes_preference.get_server_snapshot),E=(0,r.useSyncExternalStore)(_.overwork_alert_hours_preference.subscribe,_.overwork_alert_hours_preference.get_snapshot,_.overwork_alert_hours_preference.get_server_snapshot),T=(0,r.useSyncExternalStore)(h.work_hours_start_preference.subscribe,h.work_hours_start_preference.get_snapshot,h.work_hours_start_preference.get_server_snapshot),O=(0,r.useSyncExternalStore)(f.work_hours_end_preference.subscribe,f.work_hours_end_preference.get_snapshot,f.work_hours_end_preference.get_server_snapshot),A=(0,r.useSyncExternalStore)(l.focus_goal_scope_preference.subscribe,l.focus_goal_scope_preference.get_snapshot,l.focus_goal_scope_preference.get_server_snapshot),C=(0,r.useSyncExternalStore)(o.focus_goal_sheet_name_preference.subscribe,o.focus_goal_sheet_name_preference.get_snapshot,o.focus_goal_sheet_name_preference.get_server_snapshot),L=(0,r.useSyncExternalStore)(i.focus_goal_tag_name_preference.subscribe,i.focus_goal_tag_name_preference.get_snapshot,i.focus_goal_tag_name_preference.get_server_snapshot),P=(0,r.useSyncExternalStore)(c.focus_goals_per_sheet_preference.subscribe,c.focus_goals_per_sheet_preference.get_snapshot,c.focus_goals_per_sheet_preference.get_server_snapshot),R=(0,r.useSyncExternalStore)(u.focus_goals_per_tag_preference.subscribe,u.focus_goals_per_tag_preference.get_snapshot,u.focus_goals_per_tag_preference.get_server_snapshot),U=(0,s.parse_focus_goals_by_name)(P),M=(0,s.parse_focus_goals_by_name)(R);(0,r.useEffect)(()=>{"sheet"===A&&0===C.length&&e.length>0&&(0,g.persist_ui_preference)(o.focus_goal_sheet_name_preference,e[0])},[A,C,e]),(0,r.useEffect)(()=>{"tag"===A&&0===L.length&&n.length>0&&(0,g.persist_ui_preference)(i.focus_goal_tag_name_preference,n[0])},[A,L,n]);let F="true"!==x;return(0,t.jsxs)("div",{id:"focus-goals-nudges",className:"flex w-full flex-col gap-4",children:[(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===x,onChange:e=>(0,g.persist_ui_preference)(d.focus_nudges_enabled_preference,e.target.checked?"true":"false")}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Goals + nudges"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Track daily/weekly focus goals, overwork alerts, and no-log reminders."})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Focus goal scope"}),(0,t.jsx)("div",{role:"radiogroup","aria-label":"Focus goal scope",className:"inline-flex w-full flex-wrap gap-1 rounded-md border border-panel-border bg-panel p-0.5",children:j.map(e=>{let r=A===e.value;return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":r,disabled:F,className:`flex-1 min-w-24 cursor-pointer rounded px-3 py-1.5 text-[0.85rem] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-55 ${r?"bg-accent-soft text-foreground":"bg-transparent text-muted hover:bg-surface-hover hover:text-foreground"}`,onClick:()=>(0,g.persist_ui_preference)(l.focus_goal_scope_preference,e.value),children:e.label},e.value)})})]}),"global"===A?(0,t.jsx)(k,{disabled:F,daily_target_minutes:b,weekly_target_minutes:S}):null,"sheet"===A?(0,t.jsx)(w,{kind:"sheet",names:e,disabled:F,active_name:C,map:U,json:P}):null,"tag"===A?(0,t.jsx)(w,{kind:"tag",names:n,disabled:F,active_name:L,map:M,json:R}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Behavior nudges"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours start"}),(0,t.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:T,disabled:F,onChange:e=>(0,g.persist_ui_preference)(h.work_hours_start_preference,e.target.value)})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours end"}),(0,t.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:O,disabled:F,onChange:e=>(0,g.persist_ui_preference)(f.work_hours_end_preference,e.target.value)})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"No-log reminder"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:N,disabled:F,onChange:e=>(0,g.persist_ui_preference)(p.no_log_reminder_minutes_preference,e.target.value),children:y.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Overwork alert"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:E,disabled:F,onChange:e=>(0,g.persist_ui_preference)(_.overwork_alert_hours_preference,e.target.value),children:v.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," hours"]},e))})]})]}),(0,t.jsx)("p",{className:"m-0 text-[0.78rem] leading-snug text-muted",children:"Rule reminders: notify when no active timer during work hours, and alert when an active timer runs longer than the overwork threshold."})]})]})}],34032)}]);
|