@nightkatana/kronosys-app 1.0.0-beta.47 → 1.0.0-beta.49
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/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/action/route.js +2 -2
- package/.next/standalone/.next/server/app/changelog/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/guide/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/implementation/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/licenses/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/reporting/page.js +2 -2
- package/.next/standalone/.next/server/app/reporting/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/23.js +1 -1
- package/.next/standalone/.next/server/chunks/277.js +1 -1
- package/.next/standalone/.next/server/chunks/752.js +1 -1
- package/.next/standalone/.next/server/chunks/833.js +4 -4
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/static/chunks/{263-03252f2d2bb890f6.js → 263-ac204e69a784c66c.js} +4 -4
- package/.next/standalone/.next/static/chunks/400-cac6dc0640f386c4.js +1 -0
- package/.next/standalone/.next/static/chunks/569-c51ef642c85ebfa7.js +1 -0
- package/.next/standalone/.next/static/chunks/840-28f9828e00e2f8c3.js +1 -0
- package/.next/standalone/.next/static/chunks/app/{page-c5be0f23f5bc42fd.js → page-1766656a21070335.js} +2 -2
- package/.next/standalone/.next/static/chunks/app/reporting/page-0615e693da39c7c7.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/page-4c3075515a042cab.js +1 -0
- package/.next/standalone/.next/static/css/4405bf3014ccb6d4.css +1 -0
- package/.next/standalone/kronosys-package-meta.json +1 -1
- package/.next/standalone/package.json +1 -1
- package/package.json +1 -1
- package/.next/standalone/.next/static/chunks/400-0712be036ac1563b.js +0 -1
- package/.next/standalone/.next/static/chunks/569-888194622184e2b5.js +0 -1
- package/.next/standalone/.next/static/chunks/840-83aa65cc3eee5ac5.js +0 -1
- package/.next/standalone/.next/static/chunks/app/reporting/page-1738eebf3ccd3c9b.js +0 -1
- package/.next/standalone/.next/static/chunks/app/settings/page-6bc04b3bf71dae02.js +0 -1
- package/.next/standalone/.next/static/css/41cda4997910c076.css +0 -1
- /package/.next/standalone/.next/static/{avcm-ovgKMfMptYtGWnMT → 3fUAt3ojvE1CqWQDFTi7g}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{avcm-ovgKMfMptYtGWnMT → 3fUAt3ojvE1CqWQDFTi7g}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[662],{434:(e,t,a)=>{Promise.resolve().then(a.bind(a,1465))},1465:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>ev});var s=a(5155),r=a(2115),n=a(8500),i=a.n(n),l=a(3321),o=a(3098),d=a(8428),c=a(8090),m=a(4562),u=a(21),x=a(7856);function h({t:e,sync:t,mongoEnabled:a}){if(!a||!t||"disabled"===t.status)return null;let r=null===t.mongoDocumentCount?"—":String(t.mongoDocumentCount),n="aligned"===t.status?e.mongoSyncStatusAligned:"unknown"===t.status?e.mongoSyncStatusUnknown:"localAhead"===t.status?e.mongoSyncStatusLocalAhead:e.mongoSyncStatusMongoAhead,i="aligned"===t.status?"text-emerald-400/90":"text-amber-400/90";return(0,s.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-[11px] text-zinc-400",role:"status","aria-live":"polite",children:[(0,s.jsxs)("span",{children:[(0,s.jsxs)("span",{className:"text-zinc-500",children:[e.mongoSyncLocalLabel,":"]})," ",t.localPersistedCount,(0,s.jsx)("span",{className:"mx-1.5 text-zinc-600","aria-hidden":!0,children:"\xb7"}),(0,s.jsxs)("span",{className:"text-zinc-500",children:[e.mongoSyncMongoLabel,":"]})," ",r]}),(0,s.jsx)("span",{className:`font-medium ${i}`,children:n}),(0,s.jsx)(x.p,{ariaLabel:e.mongoSyncHelpAriaLabel,body:e.mongoSyncHelpBody})]})}var b=a(8783),g=a(8578),p=a(9840),v=a(8778),f=a(7634),k=a(2725),y=a(6664),j=a(2094),N=a(6830),z=a(7792),w=a(6032),S=a(1996),T=a(1773),C=a(2194),D=a(1555);let E=["node_modules",".git","dist","out","build",".next","coverage","target","__pycache__",".venv","venv","vendor",".turbo",".cache",".idea"];var P=a(9281),L=a(3030),A=a(1913),I=a(6523),B=a(7262),M=a(3478),H=a(7650),R=a(4747);let F=["#settings-tour-anchor-intro","#settings-usage-profile","#settings-history","#settings-git","#settings-workspace-loc","#settings-schedule"];function U({open:e,onOpenChange:t,dt:a}){var n;let[i,l]=(0,r.useState)(0),[d,c]=(0,r.useState)(null),[m,u]=(0,r.useState)({}),x=(0,r.useRef)(null),h=(0,r.useRef)(null),b=(0,r.useMemo)(()=>[{title:a.settingsTourStep1Title,body:a.settingsTourStep1Body},{title:a.settingsTourStep2Title,body:a.settingsTourStep2Body},{title:a.settingsTourStep3Title,body:a.settingsTourStep3Body},{title:a.settingsTourStep4Title,body:a.settingsTourStep4Body},{title:a.settingsTourStep5Title,body:a.settingsTourStep5Body},{title:a.settingsTourStep6Title,body:a.settingsTourStep6Body}],[a]),g=b.length,p=i>=g-1,v=b[i]??b[0],f=F[Math.min(i,F.length-1)];(0,r.useEffect)(()=>{e&&l(0)},[e]);let k=(0,r.useCallback)(e=>{(0,o.$)({type:"tourInteraction",tour:"settings_spotlight",action:e,stepIndex:i,stepTotal:g}).catch(()=>void 0),R.r.getState().markSettingsCompleted(),t(!1)},[t,i,g]);n=()=>k("escape"),(0,r.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&(e.preventDefault(),n())};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,n]);let y=(0,r.useCallback)(()=>{var t;if(!e)return void c(null);let a=document.querySelector(f);a&&a instanceof HTMLElement?c({top:(t=a.getBoundingClientRect()).top-10,left:t.left-10,width:t.width+20,height:t.height+20}):c(null)},[e,f]);if((0,r.useLayoutEffect)(()=>{if(!e)return void c(null);let t=document.querySelector(f);t instanceof HTMLElement&&t.scrollIntoView({block:"center",inline:"nearest",behavior:"auto"}),y();let a=requestAnimationFrame(y);window.addEventListener("scroll",y,!0),window.addEventListener("resize",y);let s=t instanceof HTMLElement?t:null,r=s&&"u">typeof ResizeObserver?new ResizeObserver(()=>y()):null;return s&&r&&r.observe(s),()=>{cancelAnimationFrame(a),window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",y),r?.disconnect()}},[e,f,i,y]),(0,r.useLayoutEffect)(()=>{if(!e)return;let t=window.innerWidth,a=window.innerHeight,s=Math.min(360,t-24);if(!d)return void u({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:s,maxWidth:"calc(100vw - 2rem)",zIndex:212});let r=x.current,n=r?.getBoundingClientRect().height??220,i=d.top+d.height+12;i+n>a-12&&d.top-12-n>=12&&(i=d.top-12-n),i=Math.max(12,Math.min(i,a-n-12));let l=d.left+d.width/2-s/2;u({position:"fixed",top:i,left:l=Math.max(12,Math.min(l,t-s-12)),transform:void 0,width:s,maxWidth:void 0,zIndex:212})},[e,d,i,v.title,v.body]),(0,r.useEffect)(()=>{if(!e)return;let t=window.setTimeout(()=>h.current?.focus(),80);return()=>window.clearTimeout(t)},[e,i]),!e)return null;let j=a.settingsTourProgressLabel.replace("{n}",String(i+1)).replace("{total}",String(g)),N="rounded-lg bg-violet-600 px-4 py-2 text-sm font-medium text-white transition hover:bg-violet-700 focus:outline-none focus:ring-2 focus:ring-violet-500 focus:ring-offset-2 dark:bg-violet-500 dark:hover:bg-violet-600 dark:focus:ring-offset-zinc-900",z=window.innerWidth,w=window.innerHeight,S=d?null:(0,s.jsx)("div",{className:"fixed inset-0 z-[210] bg-black/55","aria-hidden":!0}),T=d&&z>0&&w>0?(()=>{let{top:e,left:t,width:a,height:r}=d,n=Math.max(0,e),i=e+r,l=Math.max(0,w-i),o=Math.max(0,t),c=t+a,m=Math.max(0,z-c);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed bg-black/55",style:{top:0,left:0,width:z,height:n,zIndex:210},"aria-hidden":!0}),(0,s.jsx)("div",{className:"fixed bg-black/55",style:{top:i,left:0,width:z,height:l,zIndex:210},"aria-hidden":!0}),(0,s.jsx)("div",{className:"fixed bg-black/55",style:{top:e,left:0,width:o,height:r,zIndex:210},"aria-hidden":!0}),(0,s.jsx)("div",{className:"fixed bg-black/55",style:{top:e,left:c,width:m,height:r,zIndex:210},"aria-hidden":!0}),(0,s.jsx)("div",{className:"pointer-events-none fixed rounded-xl border-2 border-violet-500 shadow-[0_0_0_1px_rgba(139,92,246,0.35)] dark:border-violet-400 dark:shadow-[0_0_0_1px_rgba(167,139,250,0.35)]",style:{top:e,left:t,width:a,height:r,zIndex:211},"aria-hidden":!0})]})})():null;return(0,H.createPortal)((0,s.jsxs)(s.Fragment,{children:[S,T,(0,s.jsxs)("div",{ref:x,role:"dialog","aria-modal":"true","aria-labelledby":"settings-tour-title","aria-describedby":"settings-tour-body",className:"rounded-xl border border-zinc-300 bg-white shadow-2xl dark:border-zinc-600 dark:bg-zinc-900",style:m,onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"border-b border-zinc-200 px-4 py-3 dark:border-zinc-700",children:[(0,s.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-violet-600 dark:text-violet-300",children:j}),(0,s.jsx)("h2",{id:"settings-tour-title",className:"mt-1 text-base font-semibold text-zinc-900 dark:text-zinc-100",children:v.title})]}),(0,s.jsx)("div",{id:"settings-tour-body",className:"max-h-[min(42vh,18rem)] overflow-y-auto px-4 py-3",children:(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:v.body})}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-zinc-200 px-4 py-3 dark:border-zinc-700",children:[(0,s.jsx)("div",{className:"flex gap-1.5",role:"presentation","aria-hidden":!0,children:b.map((e,t)=>(0,s.jsx)("span",{className:`h-2 w-2 rounded-full ${t===i?"bg-violet-500 dark:bg-violet-400":"bg-zinc-300 dark:bg-zinc-600"}`},t))}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,s.jsx)("button",{type:"button",className:"text-sm text-zinc-500 underline-offset-2 hover:text-zinc-800 hover:underline dark:text-zinc-400 dark:hover:text-zinc-200",onClick:()=>k("skip"),children:a.settingsTourSkipBtn}),i>0?(0,s.jsx)("button",{type:"button",className:"rounded-lg border border-zinc-300 bg-white px-4 py-2 text-sm font-medium text-zinc-800 transition hover:bg-zinc-50 dark:border-zinc-600 dark:bg-zinc-800 dark:text-zinc-200 dark:hover:bg-zinc-700",onClick:()=>l(e=>Math.max(0,e-1)),children:a.settingsTourBackBtn}):null,p?(0,s.jsx)("button",{ref:h,type:"button",className:N,onClick:()=>k("done"),children:a.settingsTourDoneBtn}):(0,s.jsx)("button",{ref:h,type:"button",className:N,onClick:()=>l(e=>Math.min(g-1,e+1)),children:a.settingsTourNextBtn})]})]})]})]}),document.body)}var $=a(7134),W=a(1909),O=a(6813),q=a(4548),G=a(3173),V=a(4577),_=a(6923);let K=/^([01]?\d|2[0-3]):([0-5]\d)$/;function Z(e){return String(e).padStart(2,"0")}function J(e){let t=e.trim(),a=K.exec(t);return a?{h:Number(a[1]),m:Number(a[2])}:{h:9,m:0}}function Y(e,t){return`${Z((e%24+24)%24)}:${Z((t%60+60)%60)}`}function Q({value:e,onChange:t,disabled:a,className:n="","aria-label":i,lang:l,use24HourClock:o=!0,t:d}){let c,[m,u]=(0,r.useState)(!1),[x,h]=(0,r.useState)({top:0,left:0,maxW:280}),b=(0,r.useRef)(null),g=(0,r.useRef)(null),p=J(e),[v,f]=(0,r.useState)(p.h),[k,y]=(0,r.useState)(p.m);(0,r.useEffect)(()=>{let{h:t,m:a}=J(e);f(t),y(a)},[e]);let j=(0,r.useCallback)((e,a)=>{t(Y(e,a))},[t]),N=Y(v,k),z=((c=new Date).setHours(v,k,0,0),new Intl.DateTimeFormat("fr"===l?"fr-CA":"en-CA",{timeStyle:"short",hour12:!o}).format(c)),w=(0,r.useCallback)(()=>{let e=b.current;if(!e)return;let t=e.getBoundingClientRect(),a=window.innerWidth,s=window.innerHeight,r=Math.min(280,a-16),n=t.bottom+8,i=t.left+t.width/2-r/2;i=Math.max(8,Math.min(i,a-r-8)),n+200>s-8&&(n=Math.max(8,t.top-8-200)),h({top:n,left:i,maxW:r})},[]);(0,r.useLayoutEffect)(()=>{if(!m||a)return;w();let e=()=>w();return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[m,a,w]),(0,r.useEffect)(()=>{if(!m||a)return;let e=e=>{let t=e.target;g.current?.contains(t)||b.current?.contains(t)||u(!1)},t=e=>{"Escape"===e.key&&u(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[m,a]);let S=Array.from({length:24},(e,t)=>t),T=Array.from({length:60},(e,t)=>t),C=m&&!a&&"u">typeof document?(0,H.createPortal)((0,s.jsxs)("div",{ref:g,role:"dialog","aria-modal":"true","aria-label":i,className:"kronosys-time-popover fixed z-[200] rounded-xl border border-violet-500/45 bg-zinc-50 p-3 shadow-2xl dark:border-violet-400/45 dark:bg-zinc-900",style:{top:x.top,left:x.left,width:x.maxW,maxHeight:200},children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-zinc-600 dark:text-zinc-400",children:d.timePickerPopoverTimeLabel}),(0,s.jsxs)("div",{className:"inline-flex items-center gap-1.5",children:[(0,s.jsx)("select",{className:"h-9 rounded-lg border border-violet-500/45 bg-white px-2.5 text-sm font-mono text-zinc-900 outline-none dark:border-violet-400/50 dark:bg-zinc-800 dark:text-zinc-100",value:v,onChange:e=>{let t=Number(e.target.value);f(t),j(t,k)},"aria-label":d.timePickerPopoverHourAria,children:S.map(e=>(0,s.jsx)("option",{value:e,children:Z(e)},e))}),(0,s.jsx)("span",{className:"font-mono text-zinc-500",children:":"}),(0,s.jsx)("select",{className:"h-9 rounded-lg border border-violet-500/45 bg-white px-2.5 text-sm font-mono text-zinc-900 outline-none dark:border-violet-400/50 dark:bg-zinc-800 dark:text-zinc-100",value:k,onChange:e=>{let t=Number(e.target.value);y(t),j(v,t)},"aria-label":d.timePickerPopoverMinuteAria,children:T.map(e=>(0,s.jsx)("option",{value:e,children:Z(e)},e))})]}),(0,s.jsx)("button",{type:"button",className:"inline-flex h-9 w-9 items-center justify-center rounded-lg border border-emerald-500/50 bg-emerald-50 text-emerald-700 hover:bg-emerald-100 dark:border-emerald-400/60 dark:bg-emerald-950/35 dark:text-emerald-200 dark:hover:bg-emerald-900/40","aria-label":"fr"===l?"Accepter l'heure":"Accept time",onClick:()=>{j(v,k),u(!1)},children:(0,s.jsx)(V.A,{className:"h-4 w-4",strokeWidth:2.5,"aria-hidden":!0})})]}),(0,s.jsxs)("p",{className:"mt-2 text-center text-xs text-zinc-500 dark:text-zinc-400","aria-hidden":!0,children:[N," \xb7 ",z]})]}),document.body):null;return(0,s.jsxs)("div",{className:`inline-flex min-w-0 max-w-full ${n}`,children:[(0,s.jsxs)("button",{ref:b,type:"button",disabled:a,className:"inline-flex w-full max-w-md items-center justify-between gap-2 rounded-lg border border-zinc-300 bg-white px-3 py-2 text-left text-sm outline-none ring-violet-500/30 focus:ring-2 dark:border-zinc-700 dark:bg-zinc-950 "+(a?"cursor-not-allowed opacity-50":"cursor-pointer hover:border-zinc-400 dark:hover:border-zinc-600"),"aria-label":i,"aria-expanded":m,"aria-haspopup":"dialog",onClick:()=>{a||u(e=>!e)},children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-sm tabular-nums text-zinc-900 dark:text-zinc-100",children:N}),(0,s.jsx)(_.A,{className:"h-4 w-4 shrink-0 opacity-70",strokeWidth:2,"aria-hidden":!0})]}),C]})}let X=["qc","on","bc","ab","mb","sk","nb","ns","pe","nl","nt","yt","nu"],ee={qc:{en:"Quebec",fr:"Qu\xe9bec"},on:{en:"Ontario",fr:"Ontario"},bc:{en:"British Columbia",fr:"Colombie-Britannique"},ab:{en:"Alberta",fr:"Alberta"},mb:{en:"Manitoba",fr:"Manitoba"},sk:{en:"Saskatchewan",fr:"Saskatchewan"},nb:{en:"New Brunswick",fr:"Nouveau-Brunswick"},ns:{en:"Nova Scotia",fr:"Nouvelle-\xc9cosse"},pe:{en:"Prince Edward Island",fr:"\xcele-du-Prince-\xc9douard"},nl:{en:"Newfoundland and Labrador",fr:"Terre-Neuve-et-Labrador"},nt:{en:"Northwest Territories",fr:"Territoires du Nord-Ouest"},yt:{en:"Yukon",fr:"Yukon"},nu:{en:"Nunavut",fr:"Nunavut"}};function et(e,t){return a=>({month:e,day:t})}function ea(e){return t=>{let a,s,r,n,i,l,o,d,c,m=new Date((a=t%19,s=Math.floor(t/100),r=t%100,n=Math.floor(s/4),i=Math.floor((s+8)/25),l=Math.floor((s-i+1)/3),o=(19*a+s-n-l+15)%30,d=(32+s%4*2+2*Math.floor(r/4)-o-r%4)%7,c=Math.floor((a+11*o+22*d)/451),new Date(t,Math.floor((o+d-7*c+114)/31)-1,(o+d-7*c+114)%31+1)));return m.setDate(m.getDate()+e),{month:m.getMonth()+1,day:m.getDate()}}}function es(e,t,a){return s=>{let r=new Date(s,e-1,1),n=0;for(;r.getMonth()===e-1;){if(r.getDay()===t&&++n===a)return{month:e,day:r.getDate()};r.setDate(r.getDate()+1)}return{month:e,day:1}}}et(1,1),ea(-2),ea(1),es(5,1,3),es(5,1,3),et(6,24),et(7,1),es(8,1,1),es(9,1,1),et(9,30),es(10,1,2),et(11,11),et(12,25),et(12,26);var er=a(5377),en=a(6483),ei=a(9137);function el(e,t){return"qa"===e?t.dataEnvActiveQa:t.dataEnvActiveProduction}function eo(e,t){return e.replace(/\{(\w+)\}/g,(e,a)=>t[a]??`{${a}}`)}function ed(e){let t,a,s=(e,t)=>"number"==typeof e&&Number.isFinite(e)?e:t,r=(e,t)=>"boolean"==typeof e?e:t,n=(e,t)=>"string"==typeof e?e:t,i=n(e?.historyPartition,"daily"),l=["daily","weekly","monthly"].includes(i)?i:"daily",o=n(e?.sessionExportFormat,"json"),d=["json","csv","jiraTable","sap"].includes(o)?o:"json",c=n(e?.sessionStartMode,"continue"),m=["continue","new"].includes(c)?c:"continue",u=n(e?.usageProfile,"manager"),x=Array.isArray(t=e?.workspaceLocExcludedDirectoryNames)?t.map(e=>String(e).trim()).filter(Boolean).join("\n"):[...E].join("\n"),h=Array.isArray(a=e?.workspaceLocExcludedPathPatterns)?a.map(e=>String(e).trim()).filter(Boolean).join("\n"):"",b=e?.scheduleDays,g=Array.isArray(b)?b.filter(e=>"number"==typeof e):[1,2,3,4,5],p=(Array.isArray(e?.plannedSessions)?e.plannedSessions:[]).map(e=>{let t="object"==typeof e&&null!==e?e:{};return{id:n(t.id,Math.random().toString(36).slice(2,11)),name:n(t.name,""),days:Array.isArray(t.days)?t.days.filter(e=>"number"==typeof e):[],startTime:n(t.startTime,"10:00"),endTime:n(t.endTime,"11:00"),createSession:r(t.createSession,!0),transferTasks:r(t.transferTasks,!0),pauseTasks:r(t.pauseTasks,!0),tagsText:Array.isArray(t.tags)?t.tags.join(", "):"",project:n(t.project,"")}});return{usageProfile:"developer"===u?"developer":"manager",enabled:r(e?.enabled,!0),autoStart:r(e?.autoStart,!0),showWelcomeOnStartup:r(e?.showWelcomeOnStartup,!0),anonymizePaths:r(e?.anonymizePaths,!1),flushIntervalSeconds:s(e?.flushIntervalSeconds,15),heartbeatIntervalSeconds:s(e?.heartbeatIntervalSeconds,120),maxBufferedEvents:s(e?.maxBufferedEvents,500),historyStoragePath:n(e?.historyStoragePath,""),localPersistenceDriver:"json"===n(e?.localPersistenceDriver,"sqlite")?"json":"sqlite",historyPartition:l,sessionExportFormat:d,csvDelimiter:n(e?.csvDelimiter,","),sessionStartMode:m,autoGitSync:r(e?.autoGitSync,!1),gitRemoteUrl:n(e?.gitRemoteUrl,""),gitlabApiBaseUrl:n(e?.gitlabApiBaseUrl,""),mongodbEnabled:r(e?.mongodbEnabled,!1),mongodbDatabaseName:n(e?.mongodbDatabaseName,"kronosys"),mongodbCollectionName:n(e?.mongodbCollectionName,"sessions"),mongodbHost:n(e?.mongodbHost,"127.0.0.1"),mongodbPort:s(e?.mongodbPort,27017),mongodbUsername:n(e?.mongodbUsername,""),mongodbAuthSource:n(e?.mongodbAuthSource,"admin"),localApiPort:s(e?.localApiPort,5566),dashboardWebUrl:n(e?.dashboardWebUrl,"http://kronosys:5555"),dashboardDisplayTimeZone:(0,D.g8)(e),dashboardUse24HourClock:(0,T.m)(e),dashboardCalendarWeekStartsOn:(0,C.dM)(e),dashboardLightThemeVariant:(0,$.bb)(e)??$.dO,dashboardDefaultSessionNameTemplate:n(e?.dashboardDefaultSessionNameTemplate,"").slice(0,400),dashboardBaseDailyHours:s(e?.dashboardBaseDailyHours,7.5),dashboardBaseDailyToleranceMinutes:s(e?.dashboardBaseDailyToleranceMinutes,10),dashboardSessionDurationAlertHours:Math.min(Math.max(s(e?.dashboardSessionDurationAlertHours,24),1),8760),dashboardShowKronoFocusInHeader:r(e?.dashboardShowKronoFocusInHeader,!0),dashboardShowKronoFocusInTaskOps:r(e?.dashboardShowKronoFocusInTaskOps,!0),taskDefaultTagBucketEnabled:r(e?.taskDefaultTagBucketEnabled,!0),dashboardAllowTaskStartTimeEdit:r(e?.dashboardAllowTaskStartTimeEdit,!0),dashboardAllowSessionStartTimeEdit:r(e?.dashboardAllowSessionStartTimeEdit,!0),dashboardAllowTaskEndTimeEdit:r(e?.dashboardAllowTaskEndTimeEdit,!0),dashboardAllowSessionEndTimeEdit:r(e?.dashboardAllowSessionEndTimeEdit,!0),developmentUseProductionData:r(e?.developmentUseProductionData,!1),dualDataEnvironmentEnabled:r(e?.dualDataEnvironmentEnabled,!1),activeDataEnvironment:e?.activeDataEnvironment==="qa"?"qa":"production",workspaceLocExcludedDirsText:x,workspaceLocExcludedPathPatternsText:h,scheduleEnabled:r(e?.scheduleEnabled,!1),scheduleDays:g,scheduleStartTime:n(e?.scheduleStartTime,"09:00"),scheduleEndTime:n(e?.scheduleEndTime,"17:00"),scheduleCreateDailySession:r(e?.scheduleCreateDailySession,!0),scheduleTransferTasks:r(e?.scheduleTransferTasks,!0),schedulePauseTasks:r(e?.schedulePauseTasks,!0),plannedSessions:p}}function ec(e){return`w-full max-w-md rounded-lg border border-zinc-300 bg-white px-3 py-2 text-sm text-zinc-900 outline-none ring-violet-500/30 focus:ring-2 dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-100 ${e?"opacity-50":""}`}function em(e){return`w-full max-w-xl min-h-[9rem] rounded-lg border border-zinc-300 bg-white px-3 py-2 font-mono text-xs leading-relaxed text-zinc-900 outline-none ring-violet-500/30 focus:ring-2 dark:border-zinc-700 dark:bg-zinc-950 dark:text-zinc-100 ${e?"opacity-50":""}`}function eu({label:e,description:t,children:a}){let n=(0,r.useId)(),i=`${n}-label`,l=`${n}-desc`;return(0,s.jsxs)("div",{role:"group","aria-labelledby":i,"aria-describedby":l,className:"flex flex-col gap-1.5 sm:flex-row sm:items-start sm:gap-6",children:[(0,s.jsxs)("div",{className:"min-w-0 shrink-0 sm:w-52",children:[(0,s.jsx)("div",{id:i,className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:e}),(0,s.jsx)("p",{id:l,className:"mt-0.5 text-xs leading-snug text-zinc-600 dark:text-zinc-500",children:t})]}),(0,s.jsx)("div",{className:"min-w-0 flex-1",children:a})]})}function ex({checked:e,onChange:t,disabled:a,ariaLabel:r}){return(0,s.jsx)("button",{type:"button",role:"switch","aria-checked":e?"true":"false","aria-label":r,disabled:a,className:`relative h-7 w-12 shrink-0 rounded-full transition ${e?"bg-violet-600":"bg-zinc-700"} ${a?"opacity-50":""}`,onClick:()=>t(!e),children:(0,s.jsx)("span",{className:`absolute top-0.5 left-0.5 h-6 w-6 rounded-full bg-white transition ${e?"translate-x-5":"translate-x-0"}`})})}function eh({checked:e,onChange:t,disabled:a,ariaLabel:r}){return(0,s.jsx)("input",{type:"checkbox",checked:e,disabled:a,onChange:e=>t(e.target.checked),"aria-label":r,className:`h-4 w-4 shrink-0 rounded border border-zinc-400 bg-white text-violet-600 accent-violet-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-500/70 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:border-zinc-600 dark:bg-zinc-950 dark:focus-visible:ring-offset-zinc-950 ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`})}let eb="scroll-mt-24 space-y-6 border-b border-zinc-200 pb-10 last:border-b-0 last:pb-4 dark:border-zinc-800";function eg({s:e,filter:t,showDevDataInGeneral:a}){let r="rounded text-zinc-700 underline-offset-2 hover:text-violet-700 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-500/80 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:text-zinc-300 dark:hover:text-violet-300 dark:focus-visible:ring-offset-zinc-950",n=(...e)=>(function(e,...t){let a=e.trim().toLowerCase();return!a||t.join(" ").toLowerCase().includes(a)})(t,...e),l=n(e.sectionUsageProfile,"settings-usage-profile"),o=n(e.sectionGeneral,"settings-general","g\xe9n\xe9ral","general","v4","v4-dev","next","dev","sqlite","donn\xe9es","data","d\xe9veloppement","development"),d=n(e.sectionSchedule,"settings-schedule","schedule","horaire","travail","weekday","automatique"),c=n(e.sectionPlannedSessions,"settings-planned-sessions","planned","planifi","r\xe9current","recurring"),m=n(e.sectionPrivacy,"settings-privacy"),u=n(e.sectionKronoFocus,"settings-kronoFocus","kronoFocus"),x=n(e.sectionTaskTags,"settings-task-tags","task","tag","\xe9tiquette","default","d\xe9faut","bucket"),h=n(e.sectionCollection,"settings-collection","buffer"),b=n(e.sectionHistory,"settings-history"),g=n(e.sectionTagsProjects,"settings-tags-projects")||n(e.tocSubTagsGlobal,"settings-tags-global"),p=n(e.sectionTagsProjects,"settings-tags-projects")||n(e.tocSubTagsProjects,"settings-tags-saved-projects"),v=n(e.sectionTagsProjects,"settings-tags-projects")||n(e.tocSubTagsByProject,"settings-tags-by-project"),f=g||p||v,k=n(e.sectionTaskTemplates,"settings-task-templates","template","mod\xe8le","task template","gabarit"),y=n(e.sectionDangerZone,"settings-danger-zone"),j=n(e.sectionArchivedSessions,"settings-archived-sessions","archived"),N=n(e.sectionExport,"settings-export"),z=n(e.sectionGit,"settings-git","gitlab")||n(e.tocSubGitIdentity,"settings-git-identity","author","identity","forge"),w=n(e.sectionMongo,"settings-mongo","mongodb")||n(e.sectionMongoConnection,"settings-mongo-connection"),S=n(e.sectionWorkspaceLoc,"settings-workspace-loc","snapshot","reporting"),T=n(e.sectionWeb,"settings-web","dashboard","api")||n(e.tocSubDashboardTour,"settings-dashboard-tour")||n(e.tocSubReportingTour,"settings-reporting-tour")||n(e.tocSubDashboardColumnHints,"settings-dashboard-column-hints","column","colonnes","three","trois")||n(e.dashboardDisplayTimeZone,"fuseau","timezone","time zone","iana","horaire")||n(e.dashboardClockFormat,"12h","12 h","24h","24 h","am/pm","horloge","clock format","heure"),C=n(e.sectionWeb,"settings-web","dashboard","api")||n(e.tocSubSessionDurationAlert,"settings-session-duration-alert","duration"),D=n(e.sectionWeb,"settings-web","dashboard","api")||n(e.tocSubDefaultSessionNameTemplate,"settings-default-session-name","default session","session name","%UUID","strftime","gabarit","nom de session")||n(e.dashboardDefaultSessionNameTemplate,"template","uuid"),E=T||C||D,P=n(e.licensesPageLink,"/licenses","license","licence","third-party","notices","logiciels"),L=l||o||d||c||m||u||x||h||b||f||k||y||j||N||z||w||S||E||P,A="mt-1.5 ml-2 space-y-1 border-l border-zinc-700 pl-3 dark:border-zinc-600";return(0,s.jsxs)("nav",{"aria-label":e.tocNavAriaLabel,className:"rounded-xl border border-zinc-200 bg-zinc-50/90 p-4 lg:max-h-[calc(100dvh-14rem)] lg:overflow-y-scroll lg:overscroll-contain dark:border-zinc-800 dark:bg-zinc-900/40",children:[(0,s.jsx)("p",{className:"mb-3 text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-500",children:e.tocHeading}),t.trim()&&!L?(0,s.jsx)("p",{className:"text-sm text-zinc-600 dark:text-zinc-400",role:"status",children:e.tocSearchNoResults}):(0,s.jsxs)("ul",{className:"space-y-2 text-sm",children:[l?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-usage-profile",className:r,children:e.sectionUsageProfile})}):null,o?(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:"#settings-general",className:r,children:e.sectionGeneral}),a?(0,s.jsx)("ul",{className:A,children:(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-dev-data",className:r,children:e.devDataBlockTitle})})}):null]}):null,d?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-schedule",className:r,children:e.sectionSchedule})}):null,c?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-planned-sessions",className:r,children:e.sectionPlannedSessions})}):null,m?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-privacy",className:r,children:e.sectionPrivacy})}):null,u?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-kronoFocus",className:r,children:e.sectionKronoFocus})}):null,x?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-task-tags",className:r,children:e.sectionTaskTags})}):null,h?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-collection",className:r,children:e.sectionCollection})}):null,b?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-history",className:r,children:e.sectionHistory})}):null,N?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-export",className:r,children:e.sectionExport})}):null,f?(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:"#settings-tags-projects",className:r,children:e.sectionTagsProjects}),g||p||v?(0,s.jsxs)("ul",{className:A,children:[g?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-tags-global",className:r,children:e.tocSubTagsGlobal})}):null,p?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-tags-saved-projects",className:r,children:e.tocSubTagsProjects})}):null,v?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-tags-by-project",className:r,children:e.tocSubTagsByProject})}):null]}):null]}):null,k?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-task-templates",className:r,children:e.sectionTaskTemplates})}):null,z?(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:"#settings-git",className:r,children:e.sectionGit}),(0,s.jsx)("ul",{className:"mt-1.5 ml-2 space-y-1 border-l border-zinc-700 pl-3",children:(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-git-identity",className:r,children:e.tocSubGitIdentity})})})]}):null,w?(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:"#settings-mongo",className:r,children:e.sectionMongo}),w?(0,s.jsx)("ul",{className:"mt-1.5 ml-2 space-y-1 border-l border-zinc-700 pl-3",children:(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-mongo-connection",className:r,children:e.sectionMongoConnection})})}):null]}):null,S?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-workspace-loc",className:r,children:e.sectionWorkspaceLoc})}):null,E?(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:"#settings-web",className:r,children:e.sectionWeb}),T||C||D?(0,s.jsxs)("ul",{className:A,children:[T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-dashboard-tour",className:r,children:e.tocSubDashboardTour})}),(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-dashboard-column-hints",className:r,children:e.tocSubDashboardColumnHints})}),(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-reporting-tour",className:r,children:e.tocSubReportingTour})})]}):null,D?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-default-session-name",className:r,children:e.tocSubDefaultSessionNameTemplate})}):null,C?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-session-duration-alert",className:r,children:e.tocSubSessionDurationAlert})}):null]}):null]}):null,j?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-archived-sessions",className:r,children:e.sectionArchivedSessions})}):null,y?(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#settings-danger-zone",className:r,children:e.sectionDangerZone})}):null,P?(0,s.jsx)("li",{children:(0,s.jsx)(i(),{href:"/licenses",className:r,children:e.licensesPageLink})}):null]})]})}function ep(){let e=(0,r.useId)(),t=(0,r.useId)(),{payload:a,error:n,refresh:x,getLatestPayload:T,connectionPhase:C}=(0,d.y)(),[E,H]=(0,r.useState)(!1),[F,V]=(0,r.useState)(null),[_,K]=(0,r.useState)(!1),[Z,J]=(0,r.useState)(null),[Y,et]=(0,r.useState)(!1),[ea,es]=(0,r.useState)(!1),[ep,ev]=(0,r.useState)(""),[ef,ek]=(0,r.useState)(!1),[ey,ej]=(0,r.useState)(""),[eN,ez]=(0,r.useState)(!1),[ew,eS]=(0,r.useState)(!1),[eT,eC]=(0,r.useState)(!1),[eD,eE]=(0,r.useState)(""),[eP,eL]=(0,r.useState)(!1),[eA,eI]=(0,r.useState)(!1),[eB,eM]=(0,r.useState)(null),[eH,eR]=(0,r.useState)(""),[eF,eU]=(0,r.useState)(""),[e$,eW]=(0,r.useState)(""),[eO,eq]=(0,r.useState)(!1),[eG,eV]=(0,r.useState)(!1),[e_,eK]=(0,r.useState)(!1),[eZ,eJ]=(0,r.useState)(null),[eY,eQ]=(0,r.useState)(!1),[eX,e0]=(0,r.useState)(null),[e5,e1]=(0,r.useState)(!1),[e2,e4]=(0,r.useState)(0),[e3,e6]=(0,r.useState)(null),[e8,e9]=(0,r.useState)(!1),[e7,te]=(0,r.useState)(!1),[tt,ta]=(0,r.useState)(!1),[ts,tr]=(0,r.useState)(!1),[tn,ti]=(0,r.useState)(null),tl=(0,r.useRef)(null),[to,td]=(0,r.useState)(""),[tc,tm]=(0,r.useState)(!1),[tu,tx]=(0,r.useState)(""),[th,tb]=(0,r.useState)(!1),[tg,tp]=(0,r.useState)(!1);(0,r.useEffect)(()=>{a&&!R.r.getState().settings&&tm(!0)},[a]);let tv=(0,l.useRouter)(),tf=(0,l.useSearchParams)().get("session"),tk=(0,r.useCallback)(async e=>{let t=await x({routerInvalidate:e?.routerInvalidate===!0,resetBootstrapFailures:e?.resetBootstrapFailures===!0});if(t&&e?.preserveForm!==!0){let e=T();e&&V(ed(e.cfg))}return t},[T,x]),ty=(0,r.useRef)(!1);(0,r.useEffect)(()=>{a&&!ty.current&&(ty.current=!0,V(ed(a.cfg)))},[a]),(0,r.useEffect)(()=>{if(eO)return;let e=a?.gitIdentity;eR("string"==typeof e?.gitUserName?e.gitUserName:""),eU("string"==typeof e?.gitUserEmail?e.gitUserEmail:""),eW("string"==typeof e?.gitAccountLogin?e.gitAccountLogin:"")},[a?.gitIdentity,eO]);let tj=(0,r.useCallback)(async()=>{eq(!0);try{await (0,o.$)({type:"setGitIdentity",gitUserName:eH,gitUserEmail:eF,gitAccountLogin:e$}),await tk({preserveForm:!0}),eV(!0),window.setTimeout(()=>eV(!1),3500)}catch(e){e0(e instanceof Error?e.message:String(e))}finally{eq(!1)}},[eF,e$,eH,tk]),tN=a?.current,tz=tN?.language==="fr"?"fr":"en",tw=(0,g.C)(tz),tS=(0,p.J)(tz),tT=a?.devDataRuntime,tC=a?.dataEnvironmentRuntime,tD=tT?.isNextDevelopment===!0,tE=_||ea,tP=(0,u.z)(tz),tL=(0,r.useCallback)(async()=>await tk({routerInvalidate:!0,preserveForm:!0}),[tk]),tA=(0,r.useCallback)(async e=>{await (0,o.$)(e),await tk({routerInvalidate:!0,preserveForm:!0})},[tk]),tI=(0,r.useCallback)(()=>{O.P.getState().reset(),eK(!0),window.setTimeout(()=>eK(!1),3500)},[]),tB=(0,r.useMemo)(()=>(function(e,t,a,s){let r=a?.traceDataDirOverride===!0?a.activeDataDirectory:s?.traceDataDirOverride===!0?s.activeDataDirectory:null;if(r)return{title:t.dangerClearHistoryVaultTargetTitle,environmentLabel:"TRACE_DATA_DIR",body:eo(t.dangerClearHistoryVaultTargetTrace,{path:r}),dataDirectory:r,mismatchWarning:null,accent:"neutral"};let n=a?.dualDataEnvironmentEnabled===!0,i=a?.activeDataDirectory?.trim()||s?.activeDataDirectory?.trim()||"",l=a?.effectiveActiveDataEnvironment==="qa"?"qa":"production";if(n&&a){let e=el(l,t),s="qa"===l?el("production",t):el("qa",t),r="qa"===l?a.productionDataDirectory:a.qaDataDirectory,n=!0===a.dataDirectoryResolutionMismatch?eo(t.dangerClearHistoryVaultMismatch,{preferredEnv:el(a.preferredActiveDataEnvironment,t),preferredPath:a.preferredDataDirectory,activePath:a.activeDataDirectory}):null;return{title:t.dangerClearHistoryVaultTargetTitle,environmentLabel:e,body:eo(t.dangerClearHistoryVaultTargetDual,{env:e,path:a.activeDataDirectory,otherEnv:s,otherPath:r}),dataDirectory:i,mismatchWarning:n,accent:"qa"===l?"qa":"production"}}if(s?.isNextDevelopment===!0&&!n){let a=!0===s.dataDirectoryResolutionMismatch?eo(t.dangerClearHistoryVaultMismatch,{preferredEnv:"fr"===e?"pr\xe9f\xe9rence enregistr\xe9e":"saved preference",preferredPath:s.preferredDataDirectory,activePath:s.activeDataDirectory}):null;return{title:t.dangerClearHistoryVaultTargetTitle,environmentLabel:"fr"===e?"D\xe9veloppement (next dev)":"Development (next dev)",body:eo(t.dangerClearHistoryVaultTargetDev,{path:s.activeDataDirectory}),dataDirectory:s.activeDataDirectory,mismatchWarning:a,accent:"neutral"}}let o=a?.dataDirectoryResolutionMismatch===!0?eo(t.dangerClearHistoryVaultMismatch,{preferredEnv:el(a.preferredActiveDataEnvironment,t),preferredPath:a.preferredDataDirectory,activePath:a.activeDataDirectory}):null;return{title:t.dangerClearHistoryVaultTargetTitle,environmentLabel:el(l,t),body:eo(t.dangerClearHistoryVaultTargetSingle,{path:i||(a?.activeDataDirectory??"")}),dataDirectory:i||(a?.activeDataDirectory??""),mismatchWarning:o,accent:"qa"===l?"qa":"production"}})(tz,tS,tC,tT),[tz,tS,tC,tT]),tM=(0,r.useMemo)(()=>{let e="qa"===tB.accent?"border-violet-400/70 bg-violet-50/95 text-violet-950 dark:border-violet-600/50 dark:bg-violet-950/40 dark:text-violet-100":"production"===tB.accent?"border-zinc-300 bg-zinc-50/95 text-zinc-900 dark:border-zinc-600 dark:bg-zinc-900/55 dark:text-zinc-100":"border-zinc-200 bg-zinc-50/90 text-zinc-800 dark:border-zinc-600 dark:bg-zinc-900/50 dark:text-zinc-200";return(0,s.jsxs)("div",{className:`space-y-3 ${e7?"pointer-events-none opacity-50":""}`,children:[(0,s.jsxs)("div",{className:`rounded-lg border p-3 ${e}`,role:"note",children:[(0,s.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wide",children:tB.title}),(0,s.jsx)("p",{className:"mt-1.5 text-sm font-medium leading-snug",children:tB.environmentLabel}),(0,s.jsx)("p",{className:"mt-1 text-xs leading-relaxed",children:tB.body}),tB.mismatchWarning?(0,s.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-amber-900 dark:text-amber-200",children:tB.mismatchWarning}):null]}),(0,s.jsxs)("div",{className:"rounded-lg border border-zinc-200 bg-zinc-50/90 p-3 text-zinc-800 dark:border-zinc-600 dark:bg-zinc-900/50 dark:text-zinc-200",children:[(0,s.jsx)("p",{className:"text-xs font-medium leading-snug",children:tS.dangerClearHistoryBackupIntro}),(0,s.jsxs)("ul",{className:"mt-2 space-y-2.5 text-sm",children:[(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:"/api/backup?format=json",download:!0,className:"font-medium text-violet-700 underline decoration-violet-400 underline-offset-2 hover:text-violet-600 dark:text-violet-300 dark:hover:text-violet-200",children:tS.dangerClearHistoryBackupJson}),(0,s.jsx)("p",{className:"mt-0.5 text-[11px] leading-relaxed text-zinc-500 dark:text-zinc-400",children:tS.dangerClearHistoryBackupJsonHint})]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:"/api/backup?format=csv",download:!0,className:"font-medium text-violet-700 underline decoration-violet-400 underline-offset-2 hover:text-violet-600 dark:text-violet-300 dark:hover:text-violet-200",children:tS.dangerClearHistoryBackupCsvZip}),(0,s.jsx)("p",{className:"mt-0.5 text-[11px] leading-relaxed text-zinc-500 dark:text-zinc-400",children:tS.dangerClearHistoryBackupCsvZipHint})]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:"/api/backup?format=sqlite",download:!0,className:"font-medium text-violet-700 underline decoration-violet-400 underline-offset-2 hover:text-violet-600 dark:text-violet-300 dark:hover:text-violet-200",children:tS.dangerClearHistoryBackupSqlite}),(0,s.jsx)("p",{className:"mt-0.5 text-[11px] leading-relaxed text-zinc-500 dark:text-zinc-400",children:tS.dangerClearHistoryBackupSqliteHint})]})]})]})]})},[tB,tS,e7]),tH=(0,r.useMemo)(()=>[...a?.historyArchived||[]].sort((e,t)=>{let a=Date.parse(e.savedAt||e.startAt||"")||0;return(Date.parse(t.savedAt||t.startAt||"")||0)-a}),[a?.historyArchived]),tR=tH.length,tF=Math.max(0,Math.ceil(tR/10)-1),tU=Math.min(e2,tF),t$=10*tU,tW=tH.slice(t$,t$+10),tO=0===tR?0:Math.min(t$+tW.length,tR);(0,r.useEffect)(()=>{e4(e=>Math.min(e,tF))},[tF]),(0,r.useEffect)(()=>{if(!F||!a||"#settings-archived-sessions"!==window.location.hash)return;let e=document.getElementById("settings-archived-sessions");if(!e)return;let t=window.setTimeout(()=>{e.scrollIntoView({behavior:"smooth",block:"start"})},80);return()=>window.clearTimeout(t)},[F,a]);let tq=a?.cfg,tG="string"==typeof tq?.reportingCalendarProvince?tq.reportingCalendarProvince:"",tV=tq?.mongodbUriConfigured===!0,t_=tq?.mongodbManualUriConfigured===!0,tK=tq?.mongodbPasswordConfigured===!0,tZ=a?.remoteStatus,tJ=tq?.mongodbEnabled===!0,tY=(0,r.useMemo)(()=>{let e=(0,w.Vc)(a);if(e.length>0)return e;let t=a?.cfg,s=(0,w.Vc)(t);if(s.length>0)return s;let r=a?.workspaceCodeSnapshot;if(r?.ok===!0){let e=r.workspaceFolder?.trim();if(e)return[e]}return[]},[a]),tQ=(0,S.Me)(a,tY.length),tX=tq?.suggestGlabRemoteRepo===!0,t0=tq?.gitlabTokenStored===!0,t5=tq?.gitlabTokenFromEnv===!0,t1=tq?.gitlabApiVerified===!0,t2=eD.trim().length>0||t5,t4=t0?tS.gitlabTokenStoredYes:t5?tS.gitlabTokenFromEnvYes:tS.gitlabTokenNone;(0,r.useEffect)(()=>{tG&&!tu&&tx(tG)},[tG,tu]);let t3=(0,r.useCallback)(async()=>{tb(!0),tp(!1);try{await (0,o.$)({type:"applyProvinceHolidays",province:tu}),await tk(),tp(!0),setTimeout(()=>tp(!1),4e3)}finally{tb(!1)}},[tu,tk]),t6=async e=>{await (0,o.$)({type:"setLanguage",lang:e}),await tk()},t8=async()=>{if(F){K(!0),J(null);try{let e=ep.trim();if(e.length>0){let t=await (0,o.$)({type:"setMongoDbConnectionUri",uri:e}),a=t.result?.settingsError;if(a)return void e0("string"==typeof a?a:String(a))}let t=ey.trim();if(t.length>0){let e=await (0,o.$)({type:"setMongoDbPassword",password:t}),a=e.result?.settingsError;if(a)return void e0("string"==typeof a?a:String(a))}let a=eD.trim();if(a.length>0){let e=await (0,o.$)({type:"setGitlabToken",token:a}),t=e.result?.settingsError;if(t)return void e0("string"==typeof t?t:String(t))}let{workspaceLocExcludedDirsText:s,workspaceLocExcludedPathPatternsText:r,plannedSessions:n,...i}=F,l=await (0,o.$)({type:"updateKronosysSettings",settings:{...i,dashboardShowKronoFocusInHeader:!0,workspaceLocExcludedDirectoryNames:[...new Set(s.split("\n").map(e=>e.trim()).filter(e=>e.length>0&&e.length<=256&&!e.includes("/")&&!e.includes("\\")))].slice(0,500),workspaceLocExcludedPathPatterns:[...new Set(r.split("\n").map(e=>e.trim().replace(/\\/g,"/")).filter(e=>e.length>0&&e.length<=512))].slice(0,200),plannedSessions:n.map(e=>{let{tagsText:t,...a}=e;return{...a,tags:t.split(",").map(e=>e.trim()).filter(Boolean)}})}}),d=l.result?.settingsError;if(d)return void e0("string"==typeof d?d:String(d));ev(""),ej(""),eE(""),J("save"),await tk(),setTimeout(()=>J(null),4e3)}finally{K(!1)}}},t9=async()=>{await (0,o.$)({type:"pickStoragePath"}),await tk()},t7=async e=>{let t=e.trim();if(0!==t.length){eL(!0);try{let e=await (0,o.$)({type:"setGitlabToken",token:t}),a=e.result?.settingsError;if(a)return void e0("string"==typeof a?a:String(a));eE(""),eM(null),await tk({preserveForm:!0})}finally{eL(!1)}}},ae=async()=>{eL(!0);try{let e=await (0,o.$)({type:"setGitlabToken",token:""}),t=e.result?.settingsError;if(t)return void e0("string"==typeof t?t:String(t));eE(""),eM(null),await tk({preserveForm:!0})}finally{eL(!1)}},at=async e=>{eI(!0),eM(null);try{let t=await (0,o.$)({type:"testGitlabConnection",token:eD.trim(),lang:tz,gitlabApiBaseUrl:F?.gitlabApiBaseUrl?.trim()??""}),a=t.result?.gitlabConnectionTest;if(await tk({preserveForm:!0}),a?.outcome==="connected")eM({tone:"ok",text:e.gitlabTestOk});else if(a?.outcome==="failed")if("no_token"===a.reason)eM({tone:"bad",text:e.gitlabTestNoToken});else{let t="string"==typeof a.message&&a.message.trim()?` (${a.message.trim()})`:"";eM({tone:"bad",text:`${e.gitlabTestFail}${t}`})}else eM({tone:"bad",text:e.gitlabTestErrorGeneric})}catch{eM({tone:"bad",text:e.gitlabTestErrorGeneric})}finally{eI(!1)}},aa=async()=>{eC(!0);try{let e=await (0,o.$)({type:"createGlabRemoteRepo"}),t=e.result?.glabRepoCreate;if(t&&!1===t.ok&&t.error)return void e0(t.error);await tk()}finally{eC(!1)}},as=async e=>{ek(!0);try{let t=await (0,o.$)({type:"setMongoDbConnectionUri",uri:e}),a=t.result?.settingsError;if(a)return void e0("string"==typeof a?a:String(a));ev(""),await tk({preserveForm:!0})}finally{ek(!1)}},ar=async e=>{ez(!0);try{let t=await (0,o.$)({type:"setMongoDbPassword",password:e}),a=t.result?.settingsError;if(a)return void e0("string"==typeof a?a:String(a));ej(""),await tk({preserveForm:!0})}finally{ez(!1)}},an=async(e,t)=>{eS(!0),eJ(null);try{let a=await (0,o.$)({type:"testMongoDbConnection",settings:{mongodbEnabled:t.mongodbEnabled,mongodbDatabaseName:t.mongodbDatabaseName,mongodbCollectionName:t.mongodbCollectionName,mongodbHost:t.mongodbHost,mongodbPort:t.mongodbPort,mongodbUsername:t.mongodbUsername,mongodbAuthSource:t.mongodbAuthSource}}),s=a.result?.mongoConnectionTest?.outcome;await tk({preserveForm:!0}),"connected"===s?eJ({tone:"ok",text:e.mongoTestOk}):"failed"===s?eJ({tone:"bad",text:e.mongoTestFail}):"disabled"===s&&eJ({tone:"warn",text:e.mongoTestDisabled})}catch{eJ({tone:"bad",text:e.mongoTestErrorGeneric})}finally{eS(!1)}},ai=(0,r.useCallback)(()=>{e1(!0)},[]),al=(0,r.useCallback)(async()=>{e1(!1);let e=(0,p.J)(tz);eQ(!0);try{let t=await (0,o.$)({type:"resyncMongoMirror"}),a=t.result?.mongoResync;await tk({preserveForm:!0}),a&&!0===a.ok?e0(e.mongoResyncDone.replace("{upserted}",String(a.upserted)).replace("{failed}",String(a.failed))):a&&!1===a.ok?"disabled"===a.reason?e0(e.mongoResyncDisabled):"unsupported"===a.reason?e0(e.mongoResyncUnsupported):"failed"===a.reason?e0(e.mongoResyncErrorDetail.replace("{detail}",String(a.message))):e0(e.mongoResyncErrorGeneric):e0(e.mongoResyncErrorGeneric)}catch(a){let t=a instanceof Error?a.message:String(a);e0(e.mongoResyncErrorDetail.replace("{detail}",t))}finally{eQ(!1)}},[tz,tk]),ao=(e,t)=>{V(a=>a?{...a,[e]:t}:a)},ad=async e=>{e6(e);try{let t=await (0,o.$)({type:"archiveSession",sessionId:e,archived:!1}),a=t.result?.sessionOp;a&&!a.ok&&a.message&&e0("string"==typeof a.message?a.message:String(a.message)),await tk({preserveForm:!0})}finally{e6(null)}},ac=(0,r.useCallback)(async()=>{te(!0);try{await (0,o.$)({type:"clearHistory"}),R.r.getState().resetDashboard(),G.h.getState().reset(),W.e.getState().resetLightThemeVariant(),q.B.getState().resetGitIdentityBannerDismissed(),await tk({preserveForm:!0}),e9(!1),tv.push("/?tour=replay")}catch(e){e0(e instanceof Error?e.message:String(e))}finally{te(!1)}},[tk,tv]),am=(0,r.useCallback)(async()=>{if(!tn)return void e0(tS.dangerRestoreNoFile);tr(!0);try{let e=new FormData;e.set("file",tn);let t=tn.name.toLowerCase().endsWith(".json")?"json":"sqlite";e.set("format",t);let a=await fetch("/api/restore",{method:"POST",body:e}),s=await a.text(),r={};try{r=s?JSON.parse(s):{}}catch{r={}}if(!a.ok||!0!==r.ok){let e="string"==typeof r.detail?r.detail:"string"==typeof r.error?r.error:s||`HTTP ${a.status}`;e0(`${tS.dangerRestoreFailed.replace("{detail}",e)}`);return}ta(!1),ti(null),tl.current&&(tl.current.value=""),await tk({preserveForm:!1,routerInvalidate:!0}),e0("json"===t?tS.dangerRestoreDoneJson:tS.dangerRestoreDoneSqlite)}finally{tr(!1)}},[tk,tn,tS]),au=(0,r.useCallback)(async()=>{es(!0),J(null);try{await (0,o.$)({type:"resetKronosysSettings"}),q.B.getState().resetGitIdentityBannerDismissed(),ev(""),ej(""),eE(""),J("reset"),await tk(),setTimeout(()=>J(null),4e3)}catch(e){e0(e instanceof Error?e.message:String(e))}finally{es(!1)}},[tk]);return(0,s.jsxs)("div",{className:"min-h-screen bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:[(0,s.jsxs)("header",{className:v.cI,children:[(0,s.jsxs)("div",{className:v.hu,children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsx)(i(),{href:(0,ei.c)("/",tf),className:"w-fit text-xl font-semibold tracking-tight text-zinc-900 hover:text-violet-700 dark:text-zinc-100 dark:hover:text-violet-300",children:"Kronosys"}),(0,s.jsxs)("p",{className:"flex flex-wrap items-center gap-x-2 text-xs font-medium leading-snug text-zinc-500 dark:text-zinc-400",children:[(0,s.jsx)("span",{children:tP.brandTagline}),(0,s.jsx)("span",{className:"text-zinc-400/70 dark:text-zinc-600","aria-hidden":!0,children:"\xb7"}),(0,s.jsx)(m.h,{ariaLabelTemplate:tP.appVersionAriaLabel})]})]}),(0,s.jsx)(y._,{payload:a,dt:tP})]}),(0,s.jsx)(f.u,{leading:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.x,{lang:tz,dt:tP}),(0,s.jsx)(N.a,{payload:a,dt:tP,post:tA}),(0,s.jsx)(k.p,{dt:tP,lang:tz,dashboardSessionNavId:tf,onManualRefresh:tL})]}),nav:(0,s.jsx)(B.b,{current:"settings",labels:tw,navAriaLabel:tP.appShellRouteNavAria,dashboardSessionId:tf,lang:tz,dt:tP}),trailing:(0,s.jsxs)(z.b,{ariaLabel:tP.appShellUtilityToolbarGroupAria,children:[(0,s.jsx)(A.U,{lang:tz}),(0,s.jsx)(I.r,{title:tP.pageRefreshTitle,ariaLabel:tP.pageRefreshAriaLabel,inlineMessages:{loading:tP.pageRefreshProgressLabel,success:tP.pageRefreshDoneToast,error:tP.pageRefreshFailedToast},onRefresh:tL}),(0,s.jsx)(P.o,{lang:tz,menuHeading:"fr"===tz?"Langue":"Language",triggerAriaLabel:"fr"===tz?"Langue de l’interface":"Interface language",onSelect:e=>void t6(e)})]})})]}),(0,s.jsxs)("main",{className:"mx-auto w-full max-w-[1920px] px-5 py-8 sm:px-8 lg:px-10 xl:px-12 2xl:px-14",children:[(0,s.jsxs)("div",{id:"settings-tour-anchor-intro",className:"scroll-mt-32",children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold text-zinc-900 dark:text-zinc-50",children:tS.title}),(0,s.jsx)("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:tS.subtitle})]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500 dark:text-zinc-500",children:tS.openIdeSettings}),n&&"ready"===C?(0,s.jsx)("div",{className:"mt-6 rounded-lg border border-amber-300/80 bg-amber-50/90 px-4 py-3 text-sm text-amber-950 dark:border-amber-800/50 dark:bg-amber-950/35 dark:text-amber-100",role:"status",children:tP.dashboardSyncErrorBanner}):null,"ready"!==C?(0,s.jsx)(c.v,{phase:"unavailable"===C?"unavailable":"loading",dt:tP,lang:tz,technicalDetail:n,retryBusy:E,onRetry:"unavailable"===C?()=>{H(!0),tk({resetBootstrapFailures:!0}).finally(()=>{H(!1)})}:void 0}):null,F?(0,s.jsxs)("div",{className:"mt-8 lg:grid lg:grid-cols-[minmax(0,13rem)_minmax(0,1fr)] lg:items-start lg:gap-10",children:[(0,s.jsxs)("aside",{className:"mb-8 lg:sticky lg:top-6 lg:mb-0 lg:self-start",children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)("label",{htmlFor:t,className:"sr-only",children:tS.tocSearchAriaLabel}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(er.A,{className:"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-zinc-400 dark:text-zinc-500","aria-hidden":!0}),(0,s.jsx)("input",{id:t,type:"search",value:to,onChange:e=>td(e.target.value),placeholder:tS.tocSearchPlaceholder,className:"w-full rounded-lg border border-zinc-300 bg-white py-2 pl-9 pr-3 text-sm text-zinc-900 outline-none ring-violet-500/30 placeholder:text-zinc-400 focus:ring-2 dark:border-zinc-600 dark:bg-zinc-950 dark:text-zinc-100 dark:placeholder:text-zinc-500"})]})]}),(0,s.jsx)(eg,{s:tS,filter:to,showDevDataInGeneral:tD})]}),(0,s.jsxs)("div",{className:"min-w-0 space-y-10",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("button",{type:"button",disabled:tE,className:"rounded-lg bg-violet-600 px-4 py-2 text-sm font-medium text-white hover:bg-violet-500 disabled:opacity-50",onClick:()=>void t8(),children:_?tS.saving:tS.save}),(0,s.jsx)("button",{type:"button",disabled:tE,className:"rounded-lg border border-zinc-600 px-4 py-2 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50",onClick:()=>void tk(),children:tS.reload}),(0,s.jsx)("button",{type:"button",disabled:tE,className:"rounded-lg border border-zinc-500 px-4 py-2 text-sm text-zinc-700 hover:bg-zinc-200 disabled:opacity-50 dark:border-zinc-600 dark:text-zinc-200 dark:hover:bg-zinc-800",onClick:()=>et(!0),children:ea?tS.resettingDefaults:tS.resetToDefaults}),"save"===Z?(0,s.jsx)("span",{className:"text-sm text-emerald-400",children:tS.savedOk}):"reset"===Z?(0,s.jsx)("span",{className:"text-sm text-emerald-400",children:tS.resetDefaultsDone}):null]}),(0,s.jsxs)("section",{id:"settings-usage-profile",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionUsageProfile}),(0,s.jsx)(eu,{label:tS.usageProfile,description:tS.usageProfileDesc,children:(0,s.jsxs)("select",{className:ec(tE),value:F.usageProfile,onChange:e=>ao("usageProfile",e.target.value),disabled:tE,"aria-label":tS.usageProfile,children:[(0,s.jsxs)("option",{value:"developer",disabled:!0,children:[tS.profileDeveloper," ","fr"===tz?"(D\xe9sactiv\xe9)":"(Disabled)"]}),(0,s.jsx)("option",{value:"manager",children:tS.profileManager})]})})]}),(0,s.jsxs)("section",{id:"settings-general",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionGeneral}),(0,s.jsx)(eu,{label:tS.enabled,description:tS.enabledDesc,children:(0,s.jsx)(ex,{checked:F.enabled,onChange:e=>ao("enabled",e),disabled:tE,ariaLabel:tS.enabled})}),(0,s.jsx)(eu,{label:tS.autoStart,description:tS.autoStartDesc,children:(0,s.jsx)(ex,{checked:F.autoStart,onChange:e=>ao("autoStart",e),disabled:tE,ariaLabel:tS.autoStart})}),(0,s.jsx)(eu,{label:tS.showWelcome,description:tS.showWelcomeDesc,children:(0,s.jsx)(ex,{checked:F.showWelcomeOnStartup,onChange:e=>ao("showWelcomeOnStartup",e),disabled:tE,ariaLabel:tS.showWelcome})}),tC?(0,s.jsxs)("div",{id:"settings-data-environment",className:"scroll-mt-24 space-y-4 border-t border-zinc-200 pt-6 dark:border-zinc-800",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-zinc-800 dark:text-zinc-200",children:tS.dataEnvBlockTitle}),(0,s.jsx)("p",{className:"text-sm leading-relaxed text-zinc-600 dark:text-zinc-400",children:tS.dataEnvIntro}),tC.traceDataDirOverride?(0,s.jsx)("p",{className:"text-sm text-amber-700 dark:text-amber-300/90",role:"status",children:tS.dataEnvTraceOverride}):null,tC.dataDirectoryResolutionMismatch?(0,s.jsx)("p",{className:"text-sm text-amber-700 dark:text-amber-300/90",role:"status",children:tS.dataEnvRestartHint}):null,(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-6",children:[(0,s.jsxs)("div",{className:"min-w-0 sm:max-w-md",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:tS.dataEnvDualLabel}),(0,s.jsx)("p",{className:"mt-0.5 text-xs leading-snug text-zinc-600 dark:text-zinc-500",children:tS.dataEnvDualDesc})]}),(0,s.jsx)(ex,{checked:F.dualDataEnvironmentEnabled,onChange:e=>{ao("dualDataEnvironmentEnabled",e),e||ao("activeDataEnvironment","production")},disabled:tE||tC.traceDataDirOverride,ariaLabel:tS.dataEnvDualLabel})]}),F.dualDataEnvironmentEnabled?(0,s.jsx)(eu,{label:tS.dataEnvActiveLabel,description:tS.dataEnvActiveDesc,children:(0,s.jsxs)("select",{className:ec(tE||tC.traceDataDirOverride),value:F.activeDataEnvironment,disabled:tE||tC.traceDataDirOverride,onChange:e=>ao("activeDataEnvironment","qa"===e.target.value?"qa":"production"),"aria-label":tS.dataEnvActiveLabel,children:[(0,s.jsx)("option",{value:"production",children:tS.dataEnvActiveProduction}),(0,s.jsx)("option",{value:"qa",children:tS.dataEnvActiveQa})]})}):null,(0,s.jsxs)("div",{className:"space-y-2 rounded-lg border border-zinc-200 bg-zinc-50/80 p-3 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-900/50 dark:text-zinc-300",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 font-medium text-zinc-500 dark:text-zinc-500",children:tS.dataEnvActivePath}),(0,s.jsx)("div",{className:"break-all font-mono text-[0.7rem] leading-relaxed",children:tC.activeDataDirectory})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 font-medium text-zinc-500 dark:text-zinc-500",children:tS.dataEnvPreferredPath}),(0,s.jsx)("div",{className:"break-all font-mono text-[0.7rem] leading-relaxed",children:tC.preferredDataDirectory})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 font-medium text-zinc-500 dark:text-zinc-500",children:tS.dataEnvProdPath}),(0,s.jsx)("div",{className:"break-all font-mono text-[0.7rem] leading-relaxed",children:tC.productionDataDirectory})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 font-medium text-zinc-500 dark:text-zinc-500",children:tS.dataEnvQaPath}),(0,s.jsx)("div",{className:"break-all font-mono text-[0.7rem] leading-relaxed",children:tC.qaDataDirectory})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 font-medium text-zinc-500 dark:text-zinc-500",children:tS.dataEnvPrefsFile}),(0,s.jsx)("div",{className:"break-all font-mono text-[0.7rem] leading-relaxed",children:tC.preferencesFilePath})]})]})]}):null,tD&&tT?(0,s.jsxs)("div",{id:"settings-dev-data",className:"scroll-mt-24 space-y-4 border-t border-zinc-200 pt-6 dark:border-zinc-800",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-zinc-800 dark:text-zinc-200",children:tS.devDataBlockTitle}),(0,s.jsx)("p",{className:"text-sm leading-relaxed text-zinc-600 dark:text-zinc-400",children:tS.devDataIntro}),tT.traceDataDirOverride?(0,s.jsx)("p",{className:"text-sm text-amber-700 dark:text-amber-300/90",role:"status",children:tS.devDataTraceOverride}):null,tT.envForcesProductionData&&!tT.traceDataDirOverride?(0,s.jsx)("p",{className:"text-sm text-amber-700 dark:text-amber-300/90",role:"status",children:tS.devDataEnvOverride}):null,tT.dataDirectoryResolutionMismatch?(0,s.jsx)("p",{className:"text-sm text-amber-700 dark:text-amber-300/90",role:"status",children:tS.devDataRestartHint}):null,(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-6",children:[(0,s.jsxs)("div",{className:"min-w-0 sm:max-w-md",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:tS.devDataUseProdLabel}),(0,s.jsx)("p",{className:"mt-0.5 text-xs leading-snug text-zinc-600 dark:text-zinc-500",children:tS.devDataUseProdDesc})]}),(0,s.jsx)(ex,{checked:tT.envForcesProductionData||F.developmentUseProductionData,onChange:e=>ao("developmentUseProductionData",e),disabled:tE||tT.traceDataDirOverride||tT.envForcesProductionData,ariaLabel:tS.devDataUseProdLabel})]}),(0,s.jsxs)("div",{className:"space-y-2 rounded-lg border border-zinc-200 bg-zinc-50/80 p-3 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-900/50 dark:text-zinc-300",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 font-medium text-zinc-500 dark:text-zinc-500",children:tS.devDataActivePath}),(0,s.jsx)("div",{className:"break-all font-mono text-[0.7rem] leading-relaxed",children:tT.activeDataDirectory})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 font-medium text-zinc-500 dark:text-zinc-500",children:tS.devDataPreferredPath}),(0,s.jsx)("div",{className:"break-all font-mono text-[0.7rem] leading-relaxed",children:tT.preferredDataDirectory})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 font-medium text-zinc-500 dark:text-zinc-500",children:tS.devDataProdPath}),(0,s.jsx)("div",{className:"break-all font-mono text-[0.7rem] leading-relaxed",children:tT.productionDataDirectory})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-0.5 font-medium text-zinc-500 dark:text-zinc-500",children:tS.devDataPrefsFile}),(0,s.jsx)("div",{className:"break-all font-mono text-[0.7rem] leading-relaxed",children:tT.preferencesFilePath})]})]})]}):null]}),(0,s.jsxs)("section",{id:"settings-schedule",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionSchedule}),(0,s.jsx)(eu,{label:tS.scheduleEnabled,description:tS.scheduleEnabledDesc,children:(0,s.jsx)(ex,{checked:F.scheduleEnabled,onChange:e=>ao("scheduleEnabled",e),disabled:tE,ariaLabel:tS.scheduleEnabled})}),F.scheduleEnabled&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eu,{label:tS.scheduleDays,description:tS.scheduleDaysDesc,children:(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:[1,2,3,4,5,6,7].map(e=>{let t=F.scheduleDays.includes(e),a="fr"===tz?["L","M","M","J","V","S","D"][e-1]:["M","T","W","T","F","S","S"][e-1];return(0,s.jsx)("button",{type:"button",disabled:tE,onClick:()=>{ao("scheduleDays",t?F.scheduleDays.filter(t=>t!==e):[...F.scheduleDays,e].sort((e,t)=>e-t))},className:`flex h-8 w-8 items-center justify-center rounded-md border text-sm font-medium transition-colors ${t?"border-violet-600 bg-violet-600 text-white hover:bg-violet-500":"border-zinc-300 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800"}`,children:a},e)})})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:[(0,s.jsx)(eu,{label:tS.scheduleStartTime,description:"",children:(0,s.jsx)(Q,{value:F.scheduleStartTime,onChange:e=>ao("scheduleStartTime",e),disabled:tE,"aria-label":tS.scheduleStartTime,lang:tz,use24HourClock:F.dashboardUse24HourClock,t:tS})}),(0,s.jsx)(eu,{label:tS.scheduleEndTime,description:"",children:(0,s.jsx)(Q,{value:F.scheduleEndTime,onChange:e=>ao("scheduleEndTime",e),disabled:tE,"aria-label":tS.scheduleEndTime,lang:tz,use24HourClock:F.dashboardUse24HourClock,t:tS})})]}),(0,s.jsx)(eu,{label:tS.scheduleCreateDailySession,description:tS.scheduleCreateDailySessionDesc,children:(0,s.jsx)(ex,{checked:F.scheduleCreateDailySession,onChange:e=>ao("scheduleCreateDailySession",e),disabled:tE,ariaLabel:tS.scheduleCreateDailySession})}),(0,s.jsx)(eu,{label:tS.scheduleTransferTasks,description:tS.scheduleTransferTasksDesc,children:(0,s.jsx)(ex,{checked:F.scheduleTransferTasks,onChange:e=>ao("scheduleTransferTasks",e),disabled:tE,ariaLabel:tS.scheduleTransferTasks})}),(0,s.jsx)(eu,{label:tS.schedulePauseTasks,description:tS.schedulePauseTasksDesc,children:(0,s.jsx)(ex,{checked:F.schedulePauseTasks,onChange:e=>ao("schedulePauseTasks",e),disabled:tE,ariaLabel:tS.schedulePauseTasks})})]})]}),(0,s.jsxs)("section",{id:"settings-planned-sessions",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionPlannedSessions}),(0,s.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-zinc-500",children:tS.plannedSessionsIntro}),(0,s.jsxs)("div",{className:"mt-6 flex flex-col gap-4",children:[F.plannedSessions.map((e,t)=>(0,s.jsxs)("div",{className:"rounded-lg border border-zinc-200 bg-white p-4 shadow-sm dark:border-zinc-800 dark:bg-zinc-900",children:[(0,s.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:[tS.plannedSessionName," ",t+1]}),(0,s.jsx)("button",{type:"button",disabled:tE,onClick:()=>{ao("plannedSessions",F.plannedSessions.filter((e,a)=>a!==t))},className:"text-xs text-red-600 hover:text-red-500 disabled:opacity-50 dark:text-red-400",children:tS.plannedSessionRemove})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:[(0,s.jsx)(eu,{label:tS.plannedSessionName,description:"",children:(0,s.jsx)("input",{type:"text",className:ec(tE),value:e.name,onChange:e=>{let a=[...F.plannedSessions];a[t]={...a[t],name:e.target.value},ao("plannedSessions",a)},disabled:tE})}),(0,s.jsx)(eu,{label:tS.scheduleDays,description:"",children:(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:[1,2,3,4,5,6,7].map(a=>{let r=e.days.includes(a),n="fr"===tz?["L","M","M","J","V","S","D"][a-1]:["M","T","W","T","F","S","S"][a-1];return(0,s.jsx)("button",{type:"button",disabled:tE,onClick:()=>{let s=r?e.days.filter(e=>e!==a):[...e.days,a].sort((e,t)=>e-t),n=[...F.plannedSessions];n[t]={...n[t],days:s},ao("plannedSessions",n)},className:`flex h-7 w-7 items-center justify-center rounded border text-xs font-medium transition-colors ${r?"border-violet-600 bg-violet-600 text-white hover:bg-violet-500":"border-zinc-300 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800"}`,children:n},a)})})}),(0,s.jsx)(eu,{label:tS.scheduleStartTime,description:"",children:(0,s.jsx)(Q,{value:e.startTime,onChange:e=>{let a=[...F.plannedSessions];a[t]={...a[t],startTime:e},ao("plannedSessions",a)},disabled:tE,"aria-label":tS.scheduleStartTime,lang:tz,use24HourClock:F.dashboardUse24HourClock,t:tS})}),(0,s.jsx)(eu,{label:tS.scheduleEndTime,description:"",children:(0,s.jsx)(Q,{value:e.endTime,onChange:e=>{let a=[...F.plannedSessions];a[t]={...a[t],endTime:e},ao("plannedSessions",a)},disabled:tE,"aria-label":tS.scheduleEndTime,lang:tz,use24HourClock:F.dashboardUse24HourClock,t:tS})}),(0,s.jsx)(eu,{label:tS.plannedSessionProject,description:"",children:(0,s.jsx)("input",{type:"text",className:ec(tE),value:e.project,onChange:e=>{let a=[...F.plannedSessions];a[t]={...a[t],project:e.target.value},ao("plannedSessions",a)},disabled:tE,placeholder:"e.g. Deep work"})}),(0,s.jsx)(eu,{label:tS.plannedSessionTags,description:"",children:(0,s.jsx)("input",{type:"text",className:ec(tE),value:e.tagsText,onChange:e=>{let a=[...F.plannedSessions];a[t]={...a[t],tagsText:e.target.value},ao("plannedSessions",a)},disabled:tE,placeholder:"e.g. meeting, frontend"})})]}),(0,s.jsxs)("div",{className:"mt-6 flex flex-col gap-4 border-t border-zinc-100 pt-4 dark:border-zinc-800",children:[(0,s.jsx)(eu,{label:tS.scheduleCreateDailySession,description:"",children:(0,s.jsx)(ex,{checked:e.createSession,onChange:e=>{let a=[...F.plannedSessions];a[t]={...a[t],createSession:e},ao("plannedSessions",a)},disabled:tE,ariaLabel:tS.scheduleCreateDailySession})}),(0,s.jsx)(eu,{label:tS.scheduleTransferTasks,description:"",children:(0,s.jsx)(ex,{checked:e.transferTasks,onChange:e=>{let a=[...F.plannedSessions];a[t]={...a[t],transferTasks:e},ao("plannedSessions",a)},disabled:tE,ariaLabel:tS.scheduleTransferTasks})}),(0,s.jsx)(eu,{label:tS.schedulePauseTasks,description:"",children:(0,s.jsx)(ex,{checked:e.pauseTasks,onChange:e=>{let a=[...F.plannedSessions];a[t]={...a[t],pauseTasks:e},ao("plannedSessions",a)},disabled:tE,ariaLabel:tS.schedulePauseTasks})})]})]},e.id)),(0,s.jsxs)("button",{type:"button",onClick:()=>{ao("plannedSessions",[...F.plannedSessions,{id:Math.random().toString(36).slice(2,11),name:"",days:[1,2,3,4,5],startTime:"10:00",endTime:"11:00",createSession:!0,transferTasks:!0,pauseTasks:!0,tagsText:"",project:""}])},disabled:tE,className:"w-fit rounded-lg border border-dashed border-zinc-300 px-4 py-2 text-sm font-medium text-zinc-600 hover:border-violet-500 hover:text-violet-600 disabled:opacity-50 dark:border-zinc-700 dark:text-zinc-400 dark:hover:border-violet-500 dark:hover:text-violet-400",children:["+ ",tS.plannedSessionAdd]})]})]}),(0,s.jsxs)("section",{id:"settings-privacy",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionPrivacy}),(0,s.jsx)(eu,{label:tS.anonymizePaths,description:tS.anonymizePathsDesc,children:(0,s.jsx)(ex,{checked:F.anonymizePaths,onChange:e=>ao("anonymizePaths",e),disabled:tE,ariaLabel:tS.anonymizePaths})})]}),(0,s.jsxs)("section",{id:"settings-kronoFocus",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionKronoFocus}),(0,s.jsx)("p",{className:"mb-4 text-sm leading-relaxed text-zinc-600 dark:text-zinc-400",children:tS.kronoFocusHeaderPinnedNote}),(0,s.jsx)(eu,{label:tS.kronoFocusShowInTaskOps,description:tS.kronoFocusShowInTaskOpsDesc,children:(0,s.jsx)(eh,{checked:F.dashboardShowKronoFocusInTaskOps,onChange:e=>ao("dashboardShowKronoFocusInTaskOps",e),disabled:tE,ariaLabel:tS.kronoFocusShowInTaskOps})})]}),(0,s.jsxs)("section",{id:"settings-task-tags",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionTaskTags}),(0,s.jsx)(eu,{label:tS.taskDefaultTagBucketEnabled,description:tS.taskDefaultTagBucketEnabledDesc,children:(0,s.jsx)(eh,{checked:F.taskDefaultTagBucketEnabled,onChange:e=>ao("taskDefaultTagBucketEnabled",e),disabled:tE,ariaLabel:tS.taskDefaultTagBucketEnabled})}),(0,s.jsx)(eu,{label:tS.dashboardAllowTaskStartTimeEdit,description:tS.dashboardAllowTaskStartTimeEditDesc,children:(0,s.jsx)(eh,{checked:F.dashboardAllowTaskStartTimeEdit,onChange:e=>ao("dashboardAllowTaskStartTimeEdit",e),disabled:tE,ariaLabel:tS.dashboardAllowTaskStartTimeEdit})}),(0,s.jsx)(eu,{label:tS.dashboardAllowSessionStartTimeEdit,description:tS.dashboardAllowSessionStartTimeEditDesc,children:(0,s.jsx)(eh,{checked:F.dashboardAllowSessionStartTimeEdit,onChange:e=>ao("dashboardAllowSessionStartTimeEdit",e),disabled:tE,ariaLabel:tS.dashboardAllowSessionStartTimeEdit})}),(0,s.jsx)(eu,{label:tS.dashboardAllowTaskEndTimeEdit,description:tS.dashboardAllowTaskEndTimeEditDesc,children:(0,s.jsx)(eh,{checked:F.dashboardAllowTaskEndTimeEdit,onChange:e=>ao("dashboardAllowTaskEndTimeEdit",e),disabled:tE,ariaLabel:tS.dashboardAllowTaskEndTimeEdit})}),(0,s.jsx)(eu,{label:tS.dashboardAllowSessionEndTimeEdit,description:tS.dashboardAllowSessionEndTimeEditDesc,children:(0,s.jsx)(eh,{checked:F.dashboardAllowSessionEndTimeEdit,onChange:e=>ao("dashboardAllowSessionEndTimeEdit",e),disabled:tE,ariaLabel:tS.dashboardAllowSessionEndTimeEdit})})]}),(0,s.jsxs)("section",{id:"settings-collection",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionCollection}),(0,s.jsx)(eu,{label:tS.flushInterval,description:tS.flushIntervalDesc,children:(0,s.jsx)("input",{type:"number",min:5,max:3600,className:ec(tE),value:F.flushIntervalSeconds,onChange:e=>ao("flushIntervalSeconds",Number(e.target.value)),disabled:tE})}),(0,s.jsx)(eu,{label:tS.heartbeatInterval,description:tS.heartbeatIntervalDesc,children:(0,s.jsx)("input",{type:"number",min:30,max:86400,className:ec(tE),value:F.heartbeatIntervalSeconds,onChange:e=>ao("heartbeatIntervalSeconds",Number(e.target.value)),disabled:tE})}),(0,s.jsx)(eu,{label:tS.maxBuffered,description:tS.maxBufferedDesc,children:(0,s.jsx)("input",{type:"number",min:100,max:1e5,className:ec(tE),value:F.maxBufferedEvents,onChange:e=>ao("maxBufferedEvents",Number(e.target.value)),disabled:tE})})]}),(0,s.jsxs)("section",{id:"settings-history",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionHistory}),(0,s.jsx)("p",{className:"text-xs leading-relaxed text-zinc-500",children:tS.historyLocalFirstHint}),(0,s.jsx)(eu,{label:tS.historyPath,description:tS.historyPathDesc,children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("input",{type:"text",className:`${ec(tE)} max-w-xl flex-1`,value:F.historyStoragePath,onChange:e=>ao("historyStoragePath",e.target.value),disabled:tE,autoComplete:"off"}),(0,s.jsx)("button",{type:"button",className:"shrink-0 rounded-lg border border-zinc-600 px-3 py-2 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50",disabled:tE,onClick:()=>void t9(),children:tS.pickStorageFolder})]})}),(0,s.jsxs)(eu,{label:tS.localPersistenceDriver,description:tS.localPersistenceDriverDesc,children:[(0,s.jsxs)("select",{className:ec(tE),value:F.localPersistenceDriver,onChange:e=>ao("localPersistenceDriver",e.target.value),disabled:tE,"aria-label":tS.localPersistenceDriver,children:[(0,s.jsx)("option",{value:"json",children:tS.persistenceDriverJson}),(0,s.jsx)("option",{value:"sqlite",children:tS.persistenceDriverSqlite})]}),(0,s.jsx)("p",{className:"mt-2 max-w-xl text-xs text-zinc-500 dark:text-zinc-400",children:tS.localPersistenceReloadHint})]}),(0,s.jsx)(eu,{label:tS.historyPartition,description:tS.historyPartitionDesc,children:(0,s.jsxs)("select",{className:ec(tE),value:F.historyPartition,onChange:e=>ao("historyPartition",e.target.value),disabled:tE,children:[(0,s.jsx)("option",{value:"daily",children:tS.partitionDaily}),(0,s.jsx)("option",{value:"weekly",children:tS.partitionWeekly}),(0,s.jsx)("option",{value:"monthly",children:tS.partitionMonthly})]})}),(0,s.jsx)(eu,{label:tS.sessionStartMode,description:tS.sessionStartModeDesc,children:(0,s.jsxs)("select",{className:ec(tE),value:F.sessionStartMode,onChange:e=>ao("sessionStartMode",e.target.value),disabled:tE,children:[(0,s.jsx)("option",{value:"continue",children:tS.modeContinue}),(0,s.jsx)("option",{value:"new",children:tS.modeNew})]})})]}),(0,s.jsxs)("section",{id:"settings-export",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionExport}),(0,s.jsx)(eu,{label:tS.exportFormat,description:tS.exportFormatDesc,children:(0,s.jsxs)("select",{className:ec(tE),value:F.sessionExportFormat,onChange:e=>ao("sessionExportFormat",e.target.value),disabled:tE,children:[(0,s.jsx)("option",{value:"json",children:tS.fmtJson}),(0,s.jsx)("option",{value:"csv",children:tS.fmtCsv}),(0,s.jsx)("option",{value:"jiraTable",children:tS.fmtJira}),(0,s.jsx)("option",{value:"sap",children:tS.fmtSap})]})}),(0,s.jsx)(eu,{label:tS.csvDelimiter,description:tS.csvDelimiterDesc,children:(0,s.jsx)("input",{type:"text",maxLength:4,className:ec(tE),value:F.csvDelimiter,onChange:e=>ao("csvDelimiter",e.target.value),disabled:tE})})]}),a?(0,s.jsx)(M.u,{s:tS,lang:tz,payload:a,saving:tE,refresh:tk}):null,(0,s.jsxs)("section",{id:"settings-git",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionGit}),(0,s.jsxs)("div",{id:"settings-git-identity",className:"scroll-mt-24 space-y-4 rounded-lg border border-zinc-200 bg-zinc-50/80 p-4 dark:border-zinc-700/80 dark:bg-zinc-950/40",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:tS.gitIdentitySubheading}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-600 dark:text-zinc-400",children:tS.gitIdentityIntro})]}),(0,s.jsx)(eu,{label:tS.gitIdentityNameLabel,description:tS.gitIdentityNameDesc,children:(0,s.jsx)("input",{type:"text",className:ec(tE||eO),value:eH,onChange:e=>eR(e.target.value),disabled:tE||eO,autoComplete:"name",spellCheck:!1})}),(0,s.jsx)(eu,{label:tS.gitIdentityEmailLabel,description:tS.gitIdentityEmailDesc,children:(0,s.jsx)("input",{type:"email",className:ec(tE||eO),value:eF,onChange:e=>eU(e.target.value),disabled:tE||eO,autoComplete:"email",spellCheck:!1})}),(0,s.jsx)(eu,{label:tS.gitIdentityLoginLabel,description:tS.gitIdentityLoginDesc,children:(0,s.jsx)("input",{type:"text",className:ec(tE||eO),value:e$,onChange:e=>eW(e.target.value),disabled:tE||eO,autoComplete:"username",spellCheck:!1})}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("button",{type:"button",className:"rounded-lg bg-violet-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-violet-500 disabled:opacity-50",disabled:tE||eO,onClick:()=>void tj(),children:eO?tS.gitIdentitySaving:tS.gitIdentitySave}),eG?(0,s.jsx)("span",{className:"text-sm text-emerald-600 dark:text-emerald-400",children:tS.gitIdentitySavedFlash}):null]})]}),(0,s.jsx)(eu,{label:tS.autoGitSync,description:tS.autoGitSyncDesc,children:(0,s.jsx)(ex,{checked:F.autoGitSync,onChange:e=>ao("autoGitSync",e),disabled:tE,ariaLabel:tS.autoGitSync})}),(0,s.jsxs)(eu,{label:tS.gitlabInstanceUrl,description:tS.gitlabInstanceUrlDesc,children:[(0,s.jsx)("input",{type:"url",className:ec(tE),value:F.gitlabApiBaseUrl,onChange:e=>ao("gitlabApiBaseUrl",e.target.value),disabled:tE,autoComplete:"off",spellCheck:!1,placeholder:"https://gitlab.com","aria-label":tS.gitlabInstanceUrl}),(0,s.jsx)("p",{className:"mt-1.5 text-xs leading-relaxed text-zinc-500 dark:text-zinc-400",children:tS.gitlabTest401Help})]}),(0,s.jsxs)(eu,{label:tS.gitlabToken,description:tS.gitlabTokenDesc,children:[(0,s.jsx)("p",{className:"mb-2 text-xs text-zinc-400",children:t4}),(0,s.jsx)("input",{type:"password",className:ec(tE||eP||eT),value:eD,onChange:e=>eE(e.target.value),disabled:tE||eP||eT,autoComplete:"off",spellCheck:!1,placeholder:t0?"••••••••":"","aria-label":tS.gitlabToken}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",className:"rounded-lg bg-violet-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-violet-500 disabled:opacity-50",disabled:tE||eP||eT||0===eD.trim().length,title:0===eD.trim().length?tS.gitlabTokenSaveNeedValue:void 0,onClick:()=>void t7(eD),children:eP?tS.saving:tS.gitlabTokenSave}),(0,s.jsx)("button",{type:"button",className:"rounded-lg border border-zinc-600 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50",disabled:tE||eP||eT||!t0,onClick:()=>void ae(),children:tS.gitlabTokenClear})]}),t0&&""===eD.trim()&&!t5?(0,s.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-zinc-500 dark:text-zinc-400",children:tS.gitlabTestPasteStoredHint}):null,(0,s.jsx)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:(0,s.jsx)("button",{type:"button",className:"rounded-lg border border-zinc-600 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50",disabled:tE||eP||eT||eA||!t2,"aria-label":tS.gitlabTestConnectionAria,onClick:()=>void at(tS),children:eA?tS.gitlabTestRunning:tS.gitlabTestConnection})}),eB?(0,s.jsx)("p",{className:"ok"===eB.tone?"mt-2 text-sm text-emerald-600 dark:text-emerald-400":"warn"===eB.tone?"mt-2 text-sm text-amber-600 dark:text-amber-400":"mt-2 text-sm text-red-600 dark:text-red-400",children:eB.text}):null,t0||t5?(0,s.jsx)("p",{className:t1?"mt-2 text-xs text-emerald-600 dark:text-emerald-400":"mt-2 text-xs text-zinc-500 dark:text-zinc-400",children:t1?tS.gitlabApiVerifiedYes:tS.gitlabApiVerifiedNo}):null]}),tX?(0,s.jsxs)("div",{className:"max-w-md rounded-lg border border-violet-500/35 bg-violet-950/25 px-3 py-3 text-sm text-zinc-200",children:[(0,s.jsx)("p",{id:e,className:"leading-snug text-zinc-300",children:tS.glabRemoteSuggest}),(0,s.jsx)("button",{type:"button",className:"mt-3 w-fit rounded-lg border border-violet-500/60 bg-violet-600/20 px-3 py-1.5 text-sm text-violet-100 hover:bg-violet-600/35 disabled:opacity-50",disabled:tE||eT||eP,"aria-label":tS.glabRemoteCreate,"aria-describedby":e,onClick:()=>void aa(),children:eT?tS.glabRemoteCreating:tS.glabRemoteCreate})]}):null,(0,s.jsx)(eu,{label:tS.gitRemoteUrl,description:tS.gitRemoteUrlDesc,children:(0,s.jsx)("input",{type:"text",className:ec(tE),value:F.gitRemoteUrl,onChange:e=>ao("gitRemoteUrl",e.target.value),disabled:tE,autoComplete:"off"})})]}),(0,s.jsxs)("section",{id:"settings-mongo",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionMongo}),(0,s.jsx)(eu,{label:tS.mongoEnabled,description:tS.mongoEnabledDesc,children:(0,s.jsx)(ex,{checked:F.mongodbEnabled,onChange:e=>ao("mongodbEnabled",e),disabled:tE,ariaLabel:tS.mongoEnabled})}),(0,s.jsx)(eu,{label:tS.mongoDatabase,description:tS.mongoDatabaseDesc,children:(0,s.jsx)("input",{type:"text",className:ec(tE||!F.mongodbEnabled),value:F.mongodbDatabaseName,onChange:e=>ao("mongodbDatabaseName",e.target.value),disabled:tE||!F.mongodbEnabled,autoComplete:"off",spellCheck:!1,"aria-label":tS.mongoDatabase})}),(0,s.jsx)(eu,{label:tS.mongoCollection,description:tS.mongoCollectionDesc,children:(0,s.jsx)("input",{type:"text",className:ec(tE||!F.mongodbEnabled),value:F.mongodbCollectionName,onChange:e=>ao("mongodbCollectionName",e.target.value),disabled:tE||!F.mongodbEnabled,autoComplete:"off",spellCheck:!1,"aria-label":tS.mongoCollection})}),(0,s.jsxs)("div",{id:"settings-mongo-connection",className:"scroll-mt-24 border-t border-zinc-800 pt-6",children:[(0,s.jsx)("h3",{className:"text-sm font-medium text-zinc-200",children:tS.sectionMongoConnection}),(0,s.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-zinc-500",children:tS.mongoConnectionIntro}),F.mongodbEnabled?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"mt-3 text-xs text-zinc-500",children:[tS.mongoRemoteStatus,":"," ","connected"===tZ?tS.mongoStatusConnected:"failed"===tZ?tS.mongoStatusFailed:tS.mongoStatusPending," \xb7 ",tV?(0,s.jsx)("span",{className:"text-emerald-400/90",children:tS.mongoConnectionResolvableYes}):(0,s.jsx)("span",{className:"text-amber-400/90",children:tS.mongoConnectionResolvableNo})]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center",children:[(0,s.jsx)("button",{type:"button",className:"w-fit rounded-lg border border-zinc-600 px-3 py-1.5 text-sm text-zinc-200 hover:bg-zinc-800 disabled:opacity-50",disabled:tE||ew||ef||eN,"aria-label":tS.mongoTestConnectionAria,onClick:()=>void an(tS,F),children:ew?tS.mongoTestRunning:tS.mongoTestConnection}),eZ?(0,s.jsx)("p",{role:"status",className:`text-sm ${"ok"===eZ.tone?"text-emerald-400":"warn"===eZ.tone?"text-amber-400":"text-red-300"}`,children:eZ.text}):null]}),(0,s.jsx)("p",{className:"mt-2 max-w-xl text-xs text-zinc-500",children:tS.mongoTestUsesSavedConfigHint}),(0,s.jsxs)("div",{className:"mt-4 border-t border-zinc-800 pt-4",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.mongoSyncSectionTitle}),(0,s.jsx)(h,{t:tP,sync:a?.mongoMirrorSync,mongoEnabled:tJ}),(0,s.jsxs)("section",{className:"mt-2 space-y-1 border-t border-zinc-800/80 pt-2","aria-labelledby":"settings-kronosys-workspace-paths",children:[(0,s.jsx)("p",{id:"settings-kronosys-workspace-paths",className:"text-[11px] font-medium text-zinc-500",children:tS.workspaceFoldersLabel}),tQ?(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:tS.workspaceFoldersEmpty}):tY.length>0?(0,s.jsx)("ul",{className:"list-none space-y-1 font-mono text-[11px] leading-snug text-zinc-400",children:tY.map(e=>(0,s.jsx)("li",{className:"break-all",children:e},e))}):null]}),(0,s.jsx)("button",{type:"button",className:"mt-3 rounded-lg border border-zinc-600 px-3 py-1.5 text-sm text-zinc-200 hover:bg-zinc-800 disabled:opacity-50",disabled:tE||eY||ew||ef||eN||!tJ,"aria-label":tS.mongoResyncAriaLabel,onClick:()=>ai(),children:eY?tS.mongoResyncRunning:tS.mongoResyncButton}),(0,s.jsx)("p",{className:"mt-2 max-w-xl text-xs text-zinc-500",children:tS.mongoResyncHint})]})]}):null]}),(0,s.jsx)(eu,{label:tS.mongoHost,description:tS.mongoHostDesc,children:(0,s.jsx)("input",{type:"text",className:ec(tE||!F.mongodbEnabled),value:F.mongodbHost,onChange:e=>ao("mongodbHost",e.target.value),disabled:tE||!F.mongodbEnabled,autoComplete:"off",spellCheck:!1,"aria-label":tS.mongoHost})}),(0,s.jsx)(eu,{label:tS.mongoPort,description:tS.mongoPortDesc,children:(0,s.jsx)("input",{type:"number",min:1,max:65535,className:ec(tE||!F.mongodbEnabled),value:F.mongodbPort,onChange:e=>ao("mongodbPort",Number(e.target.value)),disabled:tE||!F.mongodbEnabled,"aria-label":tS.mongoPort})}),(0,s.jsx)(eu,{label:tS.mongoUser,description:tS.mongoUserDesc,children:(0,s.jsx)("input",{type:"text",className:ec(tE||!F.mongodbEnabled),value:F.mongodbUsername,onChange:e=>ao("mongodbUsername",e.target.value),disabled:tE||!F.mongodbEnabled,autoComplete:"off",spellCheck:!1,"aria-label":tS.mongoUser})}),(0,s.jsx)(eu,{label:tS.mongoAuthSource,description:tS.mongoAuthSourceDesc,children:(0,s.jsx)("input",{type:"text",className:ec(tE||!F.mongodbEnabled),value:F.mongodbAuthSource,onChange:e=>ao("mongodbAuthSource",e.target.value),disabled:tE||!F.mongodbEnabled,autoComplete:"off",spellCheck:!1,"aria-label":tS.mongoAuthSource})}),(0,s.jsxs)(eu,{label:tS.mongoPassword,description:tS.mongoPasswordDesc,children:[(0,s.jsx)("p",{className:"mb-2 text-xs text-zinc-400",children:tK?tS.mongoPasswordConfiguredYes:tS.mongoPasswordConfiguredNo}),(0,s.jsx)("input",{type:"password",className:ec(tE||eN||ef||!F.mongodbEnabled),value:ey,onChange:e=>ej(e.target.value),disabled:tE||eN||ef||!F.mongodbEnabled,autoComplete:"new-password",placeholder:tK?"••••••••":"","aria-label":tS.mongoPassword}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",className:"rounded-lg bg-violet-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-violet-500 disabled:opacity-50",disabled:tE||eN||ef||!F.mongodbEnabled,onClick:()=>void ar(ey),children:eN?tS.saving:tS.mongoPasswordSave}),(0,s.jsx)("button",{type:"button",className:"rounded-lg border border-zinc-600 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50",disabled:tE||eN||ef||!F.mongodbEnabled,onClick:()=>void ar(""),children:tS.mongoPasswordClear})]})]}),(0,s.jsxs)(eu,{label:tS.mongoManualUri,description:tS.mongoManualUriDesc,children:[(0,s.jsx)("p",{className:"mb-2 text-xs text-zinc-400",children:t_?tS.mongoUriConfiguredYes:tS.mongoUriConfiguredNo}),(0,s.jsx)("input",{type:"password",className:ec(tE||ef||eN||!F.mongodbEnabled),value:ep,onChange:e=>ev(e.target.value),disabled:tE||ef||eN||!F.mongodbEnabled,autoComplete:"off",placeholder:t_?"••••••••":"","aria-label":tS.mongoUri}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:tS.mongoUriDesc}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",className:"rounded-lg bg-violet-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-violet-500 disabled:opacity-50",disabled:tE||ef||eN||!F.mongodbEnabled,onClick:()=>void as(ep),children:ef?tS.saving:tS.mongoUriSave}),(0,s.jsx)("button",{type:"button",className:"rounded-lg border border-zinc-600 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:opacity-50",disabled:tE||ef||eN||!F.mongodbEnabled,onClick:()=>void as(""),children:tS.mongoUriClear})]})]})]}),(0,s.jsxs)("section",{id:"settings-workspace-loc",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionWorkspaceLoc}),"manager"===F.usageProfile?(0,s.jsx)("p",{className:"mt-2 text-sm text-zinc-500",children:tS.workspaceLocSectionHiddenManager}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eu,{label:tS.workspaceLocExcludedDirs,description:tS.workspaceLocExcludedDirsDesc,children:(0,s.jsx)("textarea",{className:em(tE),value:F.workspaceLocExcludedDirsText,onChange:e=>ao("workspaceLocExcludedDirsText",e.target.value),disabled:tE,spellCheck:!1,"aria-label":tS.workspaceLocExcludedDirs})}),(0,s.jsx)(eu,{label:tS.workspaceLocExcludedPatterns,description:tS.workspaceLocExcludedPatternsDesc,children:(0,s.jsx)("textarea",{className:em(tE),value:F.workspaceLocExcludedPathPatternsText,onChange:e=>ao("workspaceLocExcludedPathPatternsText",e.target.value),disabled:tE,spellCheck:!1,"aria-label":tS.workspaceLocExcludedPatterns})})]})]}),(0,s.jsxs)("section",{id:"settings-web",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionWeb}),(0,s.jsxs)("div",{className:"flex flex-col gap-8 mb-10",children:[(0,s.jsx)(eu,{label:tS.dashboardDisplayTimeZone,description:tS.dashboardDisplayTimeZoneDesc,children:(0,s.jsx)("select",{className:ec(tE),value:F.dashboardDisplayTimeZone,onChange:e=>ao("dashboardDisplayTimeZone",e.target.value),disabled:tE,children:D.U$.map(e=>(0,s.jsx)("option",{value:e.id,children:"fr"===tz?e.labelFr:e.labelEn},e.id))})}),(0,s.jsx)(eu,{label:tS.dashboardClockFormat,description:tS.dashboardClockFormatDesc,children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-zinc-700 dark:text-zinc-300",children:[(0,s.jsx)("input",{type:"radio",name:"dashboardUse24HourClock",checked:!1===F.dashboardUse24HourClock,onChange:()=>ao("dashboardUse24HourClock",!1),disabled:tE,className:"h-4 w-4 accent-violet-600"}),tS.dashboardClock12hOption]}),(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-zinc-700 dark:text-zinc-300",children:[(0,s.jsx)("input",{type:"radio",name:"dashboardUse24HourClock",checked:!0===F.dashboardUse24HourClock,onChange:()=>ao("dashboardUse24HourClock",!0),disabled:tE,className:"h-4 w-4 accent-violet-600"}),tS.dashboardClock24hOption]})]})}),(0,s.jsx)(eu,{label:tS.dashboardLightThemeVariant,description:tS.dashboardLightThemeVariantDesc,children:(0,s.jsx)("div",{className:"flex flex-wrap gap-2",role:"radiogroup","aria-label":tS.dashboardLightThemeVariant,children:[["warm",tS.dashboardLightThemeWarm],["soft",tS.dashboardLightThemeSoft],["contrast",tS.dashboardLightThemeContrast]].map(([e,t])=>(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-lg border border-zinc-300 px-3 py-2 text-sm text-zinc-700 has-[:checked]:border-violet-500/60 has-[:checked]:bg-violet-50 dark:border-zinc-600 dark:text-zinc-300 dark:has-[:checked]:border-violet-500/60 dark:has-[:checked]:bg-violet-950/35",children:[(0,s.jsx)("input",{type:"radio",name:"dashboardLightThemeVariant",value:e,checked:F.dashboardLightThemeVariant===e,onChange:()=>{ao("dashboardLightThemeVariant",e),W.e.getState().setLightThemeVariant(e),(0,$.jW)(e)},disabled:tE,className:"h-4 w-4 accent-violet-600"}),t]},e))})}),(0,s.jsx)(eu,{label:tS.dashboardCalendarWeekStartsOn,description:tS.dashboardCalendarWeekStartsOnDesc,children:(0,s.jsx)("div",{className:"flex flex-wrap gap-2",role:"radiogroup","aria-label":tS.dashboardCalendarWeekStartsOn,children:[["sunday",tS.calendarWeekStartsSunday],["monday",tS.calendarWeekStartsMonday],["saturday",tS.calendarWeekStartsSaturday]].map(([e,t])=>(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-lg border border-zinc-300 px-3 py-2 text-sm text-zinc-700 has-[:checked]:border-violet-500/60 has-[:checked]:bg-violet-50 dark:border-zinc-600 dark:text-zinc-300 dark:has-[:checked]:border-violet-500/60 dark:has-[:checked]:bg-violet-950/35",children:[(0,s.jsx)("input",{type:"radio",name:"dashboardCalendarWeekStartsOn",value:e,checked:F.dashboardCalendarWeekStartsOn===e,onChange:()=>ao("dashboardCalendarWeekStartsOn",e),disabled:tE,className:"h-4 w-4 accent-violet-600"}),t]},e))})}),(0,s.jsxs)(eu,{label:tS.holidayCalendarProvince,description:tS.holidayCalendarProvinceDesc,children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("select",{className:ec(tE),value:tu,disabled:tE,onChange:e=>tx(e.target.value),children:[(0,s.jsx)("option",{value:"",children:tS.holidayCalendarProvinceNone}),X.map(e=>(0,s.jsx)("option",{value:e,children:"fr"===tz?ee[e].fr:ee[e].en},e))]}),(0,s.jsx)("button",{type:"button",className:"inline-flex items-center justify-center rounded-lg border border-violet-500/50 bg-violet-500/10 px-4 py-2 text-sm font-medium text-violet-800 transition hover:border-violet-500/75 hover:bg-violet-500/18 disabled:opacity-50 dark:border-violet-400/45 dark:bg-violet-600/20 dark:text-violet-100 dark:hover:border-violet-400/60 dark:hover:bg-violet-600/30",disabled:tE||th,onClick:t3,children:th?"…":tS.holidayCalendarApplyBtn}),tg?(0,s.jsx)("span",{className:"text-sm text-emerald-600 dark:text-emerald-400",role:"status",children:tS.holidayCalendarApplied}):null]}),(0,s.jsx)("p",{className:"mt-1.5 text-xs leading-relaxed text-zinc-500 dark:text-zinc-400",children:tS.holidayCalendarHint})]}),(0,s.jsx)("div",{id:"settings-default-session-name",className:"scroll-mt-24",children:(0,s.jsx)(eu,{label:tS.dashboardDefaultSessionNameTemplate,description:tS.dashboardDefaultSessionNameTemplateDesc,children:(0,s.jsx)("input",{type:"text",className:ec(tE),value:F.dashboardDefaultSessionNameTemplate,onChange:e=>ao("dashboardDefaultSessionNameTemplate",e.target.value.slice(0,400)),disabled:tE,spellCheck:!1,autoComplete:"off",placeholder:"Session %F %UUID","aria-label":tS.dashboardDefaultSessionNameTemplate})})})]}),(0,s.jsxs)("div",{id:"settings-dashboard-tour",className:"scroll-mt-24 mb-8 rounded-xl border border-zinc-200 bg-zinc-50/80 p-4 dark:border-zinc-700 dark:bg-zinc-900/50",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:tS.dashboardTourBlockTitle}),(0,s.jsx)("p",{className:"mt-2 text-sm leading-relaxed text-zinc-600 dark:text-zinc-400",children:tS.dashboardTourBlockIntro}),(0,s.jsx)(i(),{href:"/?tour=replay",className:"mt-4 inline-flex items-center justify-center rounded-lg border border-violet-500/50 bg-violet-500/10 px-4 py-2 text-sm font-medium text-violet-800 transition hover:border-violet-500/75 hover:bg-violet-500/18 dark:border-violet-400/45 dark:bg-violet-600/20 dark:text-violet-100 dark:hover:border-violet-400/60 dark:hover:bg-violet-600/30",children:tS.dashboardTourReplayLinkLabel}),(0,s.jsx)("button",{type:"button",className:"mt-4 ml-3 inline-flex items-center justify-center rounded-lg border border-zinc-500/50 bg-zinc-500/10 px-4 py-2 text-sm font-medium text-zinc-800 transition hover:border-zinc-500/75 hover:bg-zinc-500/18 dark:border-zinc-400/45 dark:bg-zinc-600/20 dark:text-zinc-100 dark:hover:border-zinc-400/60 dark:hover:bg-zinc-600/30",onClick:()=>{R.r.getState().resetDashboard(),R.r.getState().resetSettings(),tm(!0)},children:tP.tourUndismissBtn})]}),(0,s.jsxs)("div",{id:"settings-dashboard-column-hints",className:"scroll-mt-24 mb-8 rounded-xl border border-zinc-200 bg-zinc-50/80 p-4 dark:border-zinc-700 dark:bg-zinc-900/50",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:tS.dashboardColumnHintsBlockTitle}),(0,s.jsx)("p",{className:"mt-2 text-sm leading-relaxed text-zinc-600 dark:text-zinc-400",children:tS.dashboardColumnHintsBlockIntro}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,s.jsx)("button",{type:"button",className:"inline-flex items-center justify-center rounded-lg border border-zinc-500/50 bg-zinc-500/10 px-4 py-2 text-sm font-medium text-zinc-800 transition hover:border-zinc-500/75 hover:bg-zinc-500/18 dark:border-zinc-400/45 dark:bg-zinc-600/20 dark:text-zinc-100 dark:hover:border-zinc-400/60 dark:hover:bg-zinc-600/30",onClick:tI,children:tS.dashboardColumnHintsRestoreBtn}),e_?(0,s.jsx)("span",{className:"text-sm text-emerald-600 dark:text-emerald-400",role:"status",children:tS.dashboardColumnHintsRestoreDone}):null]})]}),(0,s.jsxs)("div",{id:"settings-reporting-tour",className:"scroll-mt-24 mb-8 rounded-xl border border-zinc-200 bg-zinc-50/80 p-4 dark:border-zinc-700 dark:bg-zinc-900/50",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:tS.reportingTourBlockTitle}),(0,s.jsx)("p",{className:"mt-2 text-sm leading-relaxed text-zinc-600 dark:text-zinc-400",children:tS.reportingTourBlockIntro}),(0,s.jsx)(i(),{href:"/reporting?tour=replay",className:"mt-4 inline-flex items-center justify-center rounded-lg border border-violet-500/50 bg-violet-500/10 px-4 py-2 text-sm font-medium text-violet-800 transition hover:border-violet-500/75 hover:bg-violet-500/18 dark:border-violet-400/45 dark:bg-violet-600/20 dark:text-violet-100 dark:hover:border-violet-400/60 dark:hover:bg-violet-600/30",children:tS.reportingTourReplayLinkLabel})]}),(0,s.jsxs)(eu,{label:tS.localApiPort,description:tS.localApiPortDesc,children:[(0,s.jsx)("input",{type:"number",min:1024,max:65535,className:ec(tE),value:F.localApiPort,onChange:e=>ao("localApiPort",Number(e.target.value)),disabled:tE}),(0,s.jsx)("p",{className:"mt-2 text-xs text-amber-200/80",children:tS.hintPortRestart})]}),(0,s.jsxs)(eu,{label:tS.dashboardWebUrl,description:tS.dashboardWebUrlDesc,children:[(0,s.jsx)("input",{type:"url",className:ec(tE),value:F.dashboardWebUrl,onChange:e=>ao("dashboardWebUrl",e.target.value),disabled:tE}),(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:tS.hintDashboardUrl})]}),(0,s.jsx)("div",{id:"settings-session-duration-alert",className:"scroll-mt-24",children:(0,s.jsx)(eu,{label:tS.dashboardSessionDurationAlertHours,description:tS.dashboardSessionDurationAlertHoursDesc,children:(0,s.jsx)("input",{type:"number",min:1,max:8760,className:ec(tE),value:F.dashboardSessionDurationAlertHours,onChange:e=>ao("dashboardSessionDurationAlertHours",Number(e.target.value)),disabled:tE,"aria-label":tS.dashboardSessionDurationAlertHours})})}),(0,s.jsx)("div",{id:"settings-base-daily-hours",className:"scroll-mt-24",children:(0,s.jsx)(eu,{label:tS.dashboardBaseDailyHours,description:tS.dashboardBaseDailyHoursDesc,children:(0,s.jsx)("input",{type:"number",min:0,max:24,step:.25,className:ec(tE),value:F.dashboardBaseDailyHours,onChange:e=>ao("dashboardBaseDailyHours",Math.min(24,Math.max(0,Number(e.target.value)))),disabled:tE,"aria-label":tS.dashboardBaseDailyHours})})}),(0,s.jsx)("div",{id:"settings-base-daily-tolerance",className:"scroll-mt-24",children:(0,s.jsx)(eu,{label:tS.dashboardBaseDailyToleranceMinutes,description:tS.dashboardBaseDailyToleranceMinutesDesc,children:(0,s.jsx)("input",{type:"number",min:0,max:120,step:1,className:ec(tE),value:F.dashboardBaseDailyToleranceMinutes,onChange:e=>ao("dashboardBaseDailyToleranceMinutes",Math.min(120,Math.max(0,Math.round(Number(e.target.value))))),disabled:tE,"aria-label":tS.dashboardBaseDailyToleranceMinutes})})})]}),(0,s.jsxs)("section",{id:"settings-archived-sessions",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-zinc-500",children:tS.sectionArchivedSessions}),(0,s.jsx)("p",{className:"text-xs leading-relaxed text-zinc-500",children:tS.archivedSessionsIntro}),(0,s.jsx)("ul",{className:"mt-4 divide-y divide-zinc-800 rounded-lg border border-zinc-800",children:0===tR?(0,s.jsx)("li",{className:"px-3 py-8 text-center text-sm text-zinc-500",children:tP.archivesEmpty}):tW.map(e=>{let t=e.sessionName?.trim()||e.sessionId.slice(0,8),a=("string"==typeof e.sessionNote?e.sessionNote.trim():"").replaceAll(/\s+/g," "),r=a.length>0,n=(e.tasks?.length??0)+(Array.isArray(e.activeTasks)&&e.activeTasks.length>0?e.activeTasks.length:+!!e.activeTask),i=e3===e.sessionId;return(0,s.jsxs)("li",{className:"flex items-center justify-between gap-2 px-3 py-2.5 hover:bg-zinc-800/40",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"truncate font-medium text-zinc-200",children:t}),(0,s.jsxs)("div",{className:"text-[0.7rem] text-zinc-500",children:[n," ",(0,u.r)(n,tP,tz)]}),r?(0,s.jsxs)("div",{className:"mt-1 inline-flex min-w-0 max-w-full items-center gap-1 text-[0.7rem] text-zinc-500",title:a,children:[(0,s.jsx)(en.A,{size:12,className:"shrink-0","aria-hidden":!0}),(0,s.jsx)("span",{className:"truncate",children:a})]}):null]}),(0,s.jsx)("button",{type:"button",disabled:i||tE,className:"shrink-0 rounded-lg border border-violet-600/50 px-3 py-1.5 text-sm text-violet-200 hover:bg-violet-950/40 disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>void ad(e.sessionId),children:tP.sessionRestoreBtn})]},e.sessionId)})}),tR>10?(0,s.jsxs)("nav",{className:"mt-3 flex flex-wrap items-center justify-between gap-2","aria-label":tS.archivesPaginationNavAria,children:[(0,s.jsx)("button",{type:"button",disabled:tU<=0||tE,className:"rounded-lg border border-zinc-600 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:cursor-not-allowed disabled:opacity-40",onClick:()=>e4(e=>Math.max(0,e-1)),children:tS.archivesPaginationPrev}),(0,s.jsx)("span",{className:"text-xs tabular-nums text-zinc-500",children:tS.archivesPaginationRange.replace("{from}",String(0===tR?0:t$+1)).replace("{to}",String(tO)).replace("{total}",String(tR))}),(0,s.jsx)("button",{type:"button",disabled:tU>=tF||tE,className:"rounded-lg border border-zinc-600 px-3 py-1.5 text-sm text-zinc-300 hover:bg-zinc-800 disabled:cursor-not-allowed disabled:opacity-40",onClick:()=>e4(e=>Math.min(tF,e+1)),children:tS.archivesPaginationNext})]}):tR>0?(0,s.jsx)("p",{className:"mt-2 text-xs tabular-nums text-zinc-500",children:tS.archivesPaginationRange.replace("{from}",String(t$+1)).replace("{to}",String(tO)).replace("{total}",String(tR))}):null]}),(0,s.jsxs)("section",{id:"settings-danger-zone",className:eb,children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-red-700 dark:text-red-400/95",children:tS.sectionDangerZone}),(0,s.jsxs)("div",{className:"max-w-xl rounded-xl border border-red-300/90 bg-red-50/80 p-4 dark:border-red-900/55 dark:bg-red-950/30",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-red-900 dark:text-red-200",children:tS.dangerBackupRestoreTitle}),(0,s.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-red-900/85 dark:text-red-200/85",children:tS.dangerBackupRestoreIntro}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)("a",{href:"/api/backup?format=json",download:!0,className:"rounded-lg border border-red-500/70 px-3 py-1.5 text-xs font-medium text-red-900 hover:bg-red-100 dark:text-red-200 dark:hover:bg-red-900/40",children:tS.dangerClearHistoryBackupJson}),(0,s.jsx)("a",{href:"/api/backup?format=csv-zip",download:!0,className:"rounded-lg border border-red-500/70 px-3 py-1.5 text-xs font-medium text-red-900 hover:bg-red-100 dark:text-red-200 dark:hover:bg-red-900/40",children:tS.dangerClearHistoryBackupCsvZip}),(0,s.jsx)("a",{href:"/api/backup?format=sqlite",download:!0,className:"rounded-lg border border-red-500/70 px-3 py-1.5 text-xs font-medium text-red-900 hover:bg-red-100 dark:text-red-200 dark:hover:bg-red-900/40",children:tS.dangerClearHistoryBackupSqlite})]}),(0,s.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,s.jsx)("label",{className:"block text-xs font-medium text-red-900/90 dark:text-red-200/90",children:tS.dangerRestorePickFile}),(0,s.jsx)("input",{ref:tl,type:"file",accept:".json,.sqlite,.db,application/json,application/vnd.sqlite3",disabled:ts||e7,className:"block w-full rounded-lg border border-red-300 bg-white px-3 py-2 text-xs text-zinc-800 file:mr-3 file:rounded file:border-0 file:bg-red-100 file:px-2.5 file:py-1 file:text-xs file:font-medium file:text-red-900 dark:border-red-900/60 dark:bg-zinc-950 dark:text-zinc-200 dark:file:bg-red-900/35 dark:file:text-red-200",onChange:e=>{ti(e.target.files?.[0]??null)}}),(0,s.jsx)("p",{className:"text-[11px] leading-relaxed text-red-900/80 dark:text-red-300/80",children:tS.dangerRestoreHint}),(0,s.jsx)("button",{type:"button",disabled:!tn||ts||e7,className:"rounded-lg border border-red-600/80 bg-red-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-red-600 disabled:cursor-not-allowed disabled:opacity-50 dark:border-red-500 dark:bg-red-800/90 dark:hover:bg-red-700",onClick:()=>ta(!0),children:ts?tS.dangerRestoreBusy:tS.dangerRestoreButton})]}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-red-900 dark:text-red-200",children:tS.dangerClearHistoryTitle}),(0,s.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-red-900/85 dark:text-red-200/85",children:tS.dangerClearHistoryBodyIntro}),(0,s.jsx)("ul",{className:"mt-2 list-disc space-y-1.5 pl-5 text-xs leading-relaxed text-red-900/85 dark:text-red-200/85",children:tS.dangerClearHistoryBodyBullets.map(e=>(0,s.jsx)("li",{children:e},e))}),(0,s.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-red-900/85 dark:text-red-200/85",children:tS.dangerClearHistoryBodyAfterList1}),(0,s.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-red-900/85 dark:text-red-200/85",children:tS.dangerClearHistoryBodyAfterList2}),(0,s.jsx)("button",{type:"button",className:"mt-4 rounded-lg border border-red-600/80 bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-500 dark:border-red-500 dark:bg-red-800/90 dark:hover:bg-red-700",onClick:()=>e9(!0),children:tS.dangerClearHistoryButton})]})]})]})]}):null]}),(0,s.jsx)(b.qS,{open:null!==eX,message:eX??"",okLabel:tS.dialogOkBtn,onClose:()=>e0(null)}),(0,s.jsx)(b.qR,{open:e5,message:tS.mongoResyncConfirm,cancelLabel:tS.dialogCancelBtn,confirmLabel:tS.dialogConfirmBtn,onCancel:()=>e1(!1),onConfirm:()=>void al()}),(0,s.jsx)(b.qR,{open:tt,title:tS.dangerRestoreButton,message:tS.dangerRestoreConfirm,cancelLabel:tS.dialogCancelBtn,confirmLabel:tS.dialogConfirmBtn,confirmVariant:"danger",pending:ts,onCancel:()=>{ts||ta(!1)},onConfirm:()=>{am()}}),(0,s.jsx)(b.qR,{open:e8,title:tS.dangerClearHistoryTitle,message:tS.dangerClearHistoryConfirm,cancelLabel:tS.dialogCancelBtn,confirmLabel:tS.dialogConfirmBtn,confirmVariant:"danger",extra:tM,pending:e7,typeToConfirm:{expected:tS.dangerClearHistoryConfirmPhrase,instruction:tS.dangerClearHistoryTypeInstruction.replace("{phrase}",tS.dangerClearHistoryConfirmPhrase),label:tS.dangerClearHistoryTypeFieldLabel,inputAriaLabel:tS.dangerClearHistoryTypeInputAria},onCancel:()=>{e7||e9(!1)},onConfirm:()=>{ac()}}),(0,s.jsx)(b.qR,{open:Y,title:tS.resetToDefaults,message:tS.resetToDefaultsConfirm,cancelLabel:tS.dialogCancelBtn,confirmLabel:tS.dialogConfirmBtn,onCancel:()=>{ea||et(!1)},onConfirm:()=>{et(!1),au()}}),(0,s.jsx)(L.n,{ariaLabel:tS.scrollToTopAria}),(0,s.jsx)(U,{open:tc,onOpenChange:tm,dt:tP})]})}function ev(){return(0,s.jsx)(r.Suspense,{fallback:(0,s.jsx)("div",{className:"min-h-screen bg-zinc-100 px-6 py-10 text-sm text-zinc-500 dark:bg-zinc-900",children:"Kronosys…"}),children:(0,s.jsx)(ep,{})})}},2194:(e,t,a)=>{"use strict";a.d(t,{F7:()=>d,I2:()=>o,dM:()=>l});var s=a(5112);let r="dashboardCalendarWeekStartsOn",n={sunday:0,monday:1,saturday:6};function i(e){return"monday"===e||"sunday"===e||"saturday"===e}function l(e){let t=e?.[r];return i(t)?t:"sunday"}function o(e){let t=e?.[r];return i(t)?t:(0,s.EU)()}function d(e){return n[e]}},2725:(e,t,a)=>{"use strict";a.d(t,{p:()=>p});var s=a(5155),r=a(2115),n=a(3321),i=a(8428),l=a(3098),o=a(8646),d=a(6383),c=a(3666),m=a(9137),u=a(3996),x=a(2635);function h(e,t){let a=e?.current,s=e?.historyArchived||[],r=e?(0,u.t)(e.history||[],a):[],n=e?.inspectingSessionId,i=(0,x.k)(t,e,a,r,s),l="ok"===i.mode,o="string"==typeof a?.sessionId?a.sessionId.trim():"",d="ok"===i.mode?i.id.trim():"",c=l&&d!==o?d:"string"==typeof n&&""!==n.trim()?n.trim():null,m=(c?r.find(e=>e.sessionId===c)||s.find(e=>e.sessionId===c):void 0)??a;return{live:a,history:r,historyArchived:s,sessionCurrent:m}}var b=a(3228),g=a(4695);function p({dt:e,lang:t,dashboardSessionNavId:a,onManualRefresh:u,toolbarDomId:x}){let v=(0,n.useRouter)(),{payload:f,refresh:k}=(0,i.y)(),y="string"==typeof a?a.trim():"",j=(0,r.useCallback)(e=>{v.push((0,m.c)("/","string"==typeof e&&""!==e.trim()?e.trim():void 0))},[v]),N=(0,r.useCallback)(async e=>{await (0,l.$)(e),await k({routerInvalidate:!0})},[k]),z=(0,r.useCallback)(async e=>{let{live:t}=h(f,y),a=e===("string"==typeof t?.sessionId?t.sessionId.trim():"");a?(await (0,l.$)({type:"inspectSession",sessionId:null}),await (0,l.$)({type:"setPaused",paused:!1})):await (0,l.$)({type:"inspectSession",sessionId:e}),await k({routerInvalidate:!0}),j(a?null:e)},[y,f,j,k]),w=(0,r.useMemo)(()=>({newSession:()=>{(0,b.IX)(),j(""!==y?y:null)},refresh:()=>void u(),openReporting:()=>void v.push((0,m.c)("/reporting",y||void 0)),openSettings:()=>void v.push((0,m.c)("/settings",y||void 0)),openUserGuide:()=>void v.push((0,m.c)("/guide",y||void 0)),focusSessions:()=>{(0,b.Bj)("sessions"),j(""!==y?y:null)},focusTasks:()=>{(0,b.Bj)("tasks"),j(""!==y?y:null)},focusTags:()=>{(0,b.Bj)("tags"),j(""!==y?y:null)},toggleLang:()=>void N({type:"setLanguage",lang:"fr"===t?"en":"fr"}),toggleFocusMode:()=>{g.Z.getState().toggleFocusMode(),j(""!==y?y:null)}}),[t,y,u,N,j,v]),{history:S,historyArchived:T,sessionCurrent:C,live:D}=(0,r.useMemo)(()=>h(f,y),[y,f]),E=D&&"string"==typeof D.sessionId&&""!==D.sessionId.trim()?{sessionId:D.sessionId.trim(),sessionPaused:!0===D.isPaused}:null,P=(0,r.useMemo)(()=>(0,c.EW)(f?.taskTemplates),[f]),L=(0,r.useMemo)(()=>(0,d.g)({history:S,historyArchived:T,sessionCurrent:C,dt:e,liveSearchContext:E,taskTemplates:P,onSelectTaskTemplate:e=>{(0,b.Ef)(e),(0,b.Bj)("tasks");let t="string"==typeof C?.sessionId?C.sessionId.trim():"string"==typeof D?.sessionId?D.sessionId.trim():""!==y?y:"";j(""!==t?t:null)},onSelectSession:e=>{z(e)},scrollToSession:e=>{(0,b.YG)(e),z(e)},focusTasksColumn:()=>{(0,b.Bj)("tasks"),j(""!==y?y:null)},scrollToTask:e=>{(0,b.Tr)(e),(0,b.Bj)("tasks");let t="string"==typeof C?.sessionId?C.sessionId.trim():"string"==typeof D?.sessionId?D.sessionId.trim():""!==y?y:"";j(""!==t?t:null)}}),[e,S,T,D,E,y,j,z,C,P]);return(0,s.jsx)(o.L,{dt:e,handlers:w,searchItems:L,toolbarDomId:x})}},3030:(e,t,a)=>{"use strict";a.d(t,{n:()=>i});var s=a(5155),r=a(4088),n=a(2115);function i({ariaLabel:e}){let[t,a]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=()=>{a(globalThis.scrollY>320)};return e(),globalThis.addEventListener("scroll",e,{passive:!0}),()=>globalThis.removeEventListener("scroll",e)},[]);let l=(0,n.useCallback)(()=>{globalThis.scrollTo({top:0,behavior:"function"==typeof globalThis.matchMedia&&globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"})},[]);return t?(0,s.jsx)("button",{type:"button",onClick:l,"aria-label":e,className:"fixed bottom-6 right-4 z-40 flex h-11 w-11 items-center justify-center rounded-full border border-zinc-300 bg-white/95 text-zinc-700 shadow-lg shadow-zinc-900/10 backdrop-blur-sm transition-colors hover:border-violet-500/60 hover:bg-violet-50 hover:text-violet-800 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-violet-500 dark:border-zinc-600 dark:bg-zinc-900/95 dark:text-zinc-200 dark:shadow-black/40 dark:hover:border-violet-500/70 dark:hover:bg-zinc-800 dark:hover:text-violet-100 sm:right-6",children:(0,s.jsx)(r.A,{className:"h-6 w-6",strokeWidth:2.25,"aria-hidden":!0})}):null}},4747:(e,t,a)=>{"use strict";a.d(t,{r:()=>l});var s=a(1934),r=a(9311);let n={dashboard:"kronosys.dashboard.tour.completed.v1",settings:"kronosys.settings.tour.completed.v1",reporting:"kronosys.reporting.tour.completed.v1"},i="kronosys.dashboard.tours.v2";!function(){if(window.localStorage.getItem(i))return;let e={},t=!1;for(let[a,s]of Object.entries(n))if("1"===window.localStorage.getItem(s)){e[a]=!0,t=!0;try{window.localStorage.removeItem(s)}catch{}}if(t)try{window.localStorage.setItem(i,JSON.stringify({state:e,version:0}))}catch{}}();let l=(0,s.v)()((0,r.Zr)(e=>({dashboard:!1,settings:!1,reporting:!1,markDashboardCompleted:()=>e({dashboard:!0}),markSettingsCompleted:()=>e({settings:!0}),markReportingCompleted:()=>e({reporting:!0}),resetDashboard:()=>e({dashboard:!1}),resetSettings:()=>e({settings:!1}),resetReporting:()=>e({reporting:!1})}),{name:i,partialize:e=>({dashboard:e.dashboard,settings:e.settings,reporting:e.reporting})}))},7856:(e,t,a)=>{"use strict";a.d(t,{p:()=>d});var s=a(5155),r=a(2115),n=a(7650),i=a(7356),l=a(1908);let o={position:"fixed",top:0,left:0,width:288,zIndex:80,visibility:"hidden",pointerEvents:"none"};function d({ariaLabel:e,body:t,align:a="start",preserveLineBreaks:c=!1,panelClassName:m}){let[u,x]=(0,r.useState)(!1),h=(0,r.useRef)(null),b=(0,r.useRef)(null),g=(0,r.useId)(),p=(0,l.l)(u,h,b,{align:a,maxWidthRem:m?24:18});(0,r.useEffect)(()=>{if(!u)return;let e=e=>{let t=e.target;h.current?.contains(t)||b.current?.contains(t)||x(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[u]);let v=p??(u?o:void 0),f=u&&"u">typeof document&&v?(0,n.createPortal)((0,s.jsx)("div",{ref:b,id:`${g}-metric-help`,style:v,className:`rounded-lg border border-zinc-200 bg-white p-2.5 text-left shadow-lg normal-case dark:border-zinc-600 dark:bg-zinc-900${m?` ${m}`:""}`,role:"region","aria-label":e,children:(0,s.jsx)("p",{className:`text-[0.7rem] leading-snug text-zinc-700 dark:text-zinc-300${c?" whitespace-pre-line":""} ${!m?"max-w-full":""}`,children:t})}),document.body):null;return(0,s.jsxs)("div",{className:"relative inline-flex shrink-0",ref:h,children:[(0,s.jsx)("button",{type:"button",className:"rounded p-0.5 text-zinc-500 hover:bg-zinc-200/90 hover:text-zinc-800 dark:hover:bg-zinc-800 dark:hover:text-zinc-300","aria-label":e,"aria-expanded":u?"true":"false","aria-controls":`${g}-metric-help`,onClick:()=>x(e=>!e),children:(0,s.jsx)(i.A,{size:13,strokeWidth:1.75,"aria-hidden":!0})}),f]})}},8090:(e,t,a)=>{"use strict";a.d(t,{v:()=>o});var s=a(5155),r=a(2571),n=a(5878),i=a(2749),l=a(4897);function o({phase:e,dt:t,lang:a,technicalDetail:d,onRetry:c,retryBusy:m}){let u="loading"===e,x=(0,l.iM)(d,a),h="string"==typeof d?d.trim():"",b=h.length>0&&"string"==typeof x&&h!==x;return(0,s.jsx)("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-zinc-200/55 backdrop-blur-sm dark:bg-black/45",role:"status","aria-live":"polite","aria-busy":u?"true":"false","aria-label":u?t.dashboardLoadingAriaLabel:t.dashboardConnectionErrorAriaLabel,children:(0,s.jsxs)("div",{className:"flex min-h-[10.5rem] max-w-sm flex-col items-center justify-center gap-4 rounded-2xl border border-zinc-200/90 bg-white/95 px-10 py-9 shadow-2xl dark:border-zinc-600/60 dark:bg-zinc-900/95",children:[u?(0,s.jsx)(r.A,{className:"size-12 shrink-0 animate-spin text-violet-600 dark:text-violet-400",strokeWidth:2,"aria-hidden":!0}):(0,s.jsx)(n.A,{className:"size-12 shrink-0 text-amber-600 dark:text-amber-400",strokeWidth:2,"aria-hidden":!0}),(0,s.jsxs)("div",{className:"flex min-h-[2.75rem] flex-col items-center justify-center gap-2 text-center",children:[(0,s.jsx)("p",{className:"text-sm font-medium leading-snug text-zinc-800 dark:text-zinc-100",children:u?t.dashboardLoadingMessage:t.dashboardConnectionErrorTitle}),u?null:(0,s.jsx)("p",{className:"max-w-[22rem] text-sm leading-snug text-zinc-600 dark:text-zinc-300",children:t.dashboardConnectionErrorBody}),!u&&x?(0,s.jsx)("p",{className:"max-w-[22rem] text-xs leading-snug text-zinc-500 dark:text-zinc-400",children:x}):null]}),!u&&c?(0,s.jsxs)("button",{type:"button",className:"mt-1 inline-flex items-center justify-center gap-2 rounded-lg bg-violet-600 px-4 py-2 text-sm font-medium text-white hover:bg-violet-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-violet-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-wait disabled:opacity-70 dark:focus-visible:ring-offset-zinc-900",onClick:c,disabled:!0===m,children:[(0,s.jsx)(i.A,{className:`size-4 shrink-0 ${m?"animate-spin":""}`,"aria-hidden":!0}),t.dashboardConnectionRetryLabel]}):null,!u&&b?(0,s.jsxs)("details",{className:"mt-2 max-w-sm text-left",children:[(0,s.jsx)("summary",{className:"cursor-pointer text-xs text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200",children:t.dashboardConnectionTechnicalDetailsLabel}),(0,s.jsx)("pre",{className:"mt-2 max-h-32 overflow-auto rounded-md border border-zinc-200/80 bg-zinc-50/90 px-3 py-2 text-[0.65rem] leading-relaxed text-zinc-700 dark:border-zinc-600/50 dark:bg-zinc-950/80 dark:text-zinc-300",children:d})]}):null]})})}}},e=>{e.O(0,[185,356,227,569,840,702,441,794,358],()=>e(e.s=434)),_N_E=e.O()}]);
|