@loicngr/kobo 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/server/db/migrations.js +8 -0
  3. package/dist/server/db/schema.js +2 -0
  4. package/dist/server/routes/usage.js +28 -2
  5. package/dist/server/services/agent/engines/claude-code/engine.js +37 -4
  6. package/dist/server/services/usage/reliability.js +24 -0
  7. package/package.json +1 -1
  8. package/src/client/dist/pwa/assets/{ActivityFeed-DRgetl1M.js → ActivityFeed-DeJ0V6CW.js} +1 -1
  9. package/src/client/dist/pwa/assets/{ChangelogPage-BJdICFvz.js → ChangelogPage-OoOnn4q9.js} +1 -1
  10. package/src/client/dist/pwa/assets/{ComparisonPanel-2GLd8KIy.js → ComparisonPanel-BYpe6Nch.js} +1 -1
  11. package/src/client/dist/pwa/assets/{CreatePage-B9AdNJZj.js → CreatePage-COQwHyqL.js} +1 -1
  12. package/src/client/dist/pwa/assets/DashboardPage-CZ2036MC.js +1 -0
  13. package/src/client/dist/pwa/assets/DashboardPage-XiCj24i2.css +1 -0
  14. package/src/client/dist/pwa/assets/{DiffViewer-X25vuf83.js → DiffViewer-CXBmMV9R.js} +3 -3
  15. package/src/client/dist/pwa/assets/{DocumentsPanel-BastjrEm.js → DocumentsPanel-mLGU5aTb.js} +1 -1
  16. package/src/client/dist/pwa/assets/{DrawerToggleButton-DbipGmBL.js → DrawerToggleButton-C39pfWBD.js} +1 -1
  17. package/src/client/dist/pwa/assets/{GitPanel-CnW4iVao.js → GitPanel-BQk7kJO-.js} +3 -3
  18. package/src/client/dist/pwa/assets/{HealthPage-aieNQly-.js → HealthPage-CnJWXfa8.js} +1 -1
  19. package/src/client/dist/pwa/assets/{MainLayout-DqBbE8o4.js → MainLayout-D3zfT61Y.js} +2 -2
  20. package/src/client/dist/pwa/assets/{QBtnDropdown-BWy-rh45.js → QBtnDropdown-DGLLlBf3.js} +1 -1
  21. package/src/client/dist/pwa/assets/{QExpansionItem-DfmdBGuW.js → QExpansionItem-CQ2LzM8P.js} +1 -1
  22. package/src/client/dist/pwa/assets/{QSelect-BfqaWakg.js → QSelect-DoTWgQAO.js} +1 -1
  23. package/src/client/dist/pwa/assets/{QTooltip-Cy0T0vk2.js → QTooltip-DKvUeiR_.js} +1 -1
  24. package/src/client/dist/pwa/assets/{SchedulePanel-YQPObRR3.js → SchedulePanel-DIMzNIO3.js} +1 -1
  25. package/src/client/dist/pwa/assets/{SearchPage-BoBjmItc.js → SearchPage-COWnMxRZ.js} +1 -1
  26. package/src/client/dist/pwa/assets/{SettingsPage-0GtDcXRC.js → SettingsPage-B9cLhFnO.js} +1 -1
  27. package/src/client/dist/pwa/assets/{SplitWorkspacePage-4wFh65Lh.js → SplitWorkspacePage-BJKssJyI.js} +1 -1
  28. package/src/client/dist/pwa/assets/{TerminalPanel-b70x_jqH.js → TerminalPanel-C_HNpN1X.js} +1 -1
  29. package/src/client/dist/pwa/assets/{TouchPan-CcTVcxwd.js → TouchPan-CCllyaAF.js} +1 -1
  30. package/src/client/dist/pwa/assets/{TourReplayButton-CpEMnQS8.js → TourReplayButton-Cp2UnxWa.js} +1 -1
  31. package/src/client/dist/pwa/assets/{WorkspaceAttentionLabels-C5lTHTp2.js → WorkspaceAttentionLabels-B-SuQuS_.js} +1 -1
  32. package/src/client/dist/pwa/assets/{WorkspacePage-D_V9gNON.js → WorkspacePage-6lN4iF5W.js} +3 -3
  33. package/src/client/dist/pwa/assets/{browser-LBbxVwWf.js → browser-uy3hmwKo.js} +1 -1
  34. package/src/client/dist/pwa/assets/{build-path-tree-DyvtWxb0.js → build-path-tree-DZrp6Aji.js} +1 -1
  35. package/src/client/dist/pwa/assets/{custom-sounds-BpeLZUDW.js → custom-sounds-Du8ReMlU.js} +1 -1
  36. package/src/client/dist/pwa/assets/{de-v6i2HlE2.js → de-CTE3Xb7Z.js} +1 -1
  37. package/src/client/dist/pwa/assets/{documents-Bjx8lz-h.js → documents-BtNrB6d0.js} +1 -1
  38. package/src/client/dist/pwa/assets/{editor.api-BC3PbJkx.js → editor.api-P-eJRcVK.js} +1 -1
  39. package/src/client/dist/pwa/assets/{efforts-BDHAnNUs.js → efforts-ChUC4xtk.js} +1 -1
  40. package/src/client/dist/pwa/assets/{engineFeatures-hlEiwqt-.js → engineFeatures-D-0NPZBE.js} +1 -1
  41. package/src/client/dist/pwa/assets/{es-Bc1KgkAT.js → es-CZxg1xjh.js} +1 -1
  42. package/src/client/dist/pwa/assets/{expand-template-DLDl1qPx.js → expand-template-ByoC_kxX.js} +1 -1
  43. package/src/client/dist/pwa/assets/{format-Q94deO3I.js → format-CeidAPFn.js} +1 -1
  44. package/src/client/dist/pwa/assets/{formatters-CWxRHuUu.js → formatters-BtG6lb4d.js} +1 -1
  45. package/src/client/dist/pwa/assets/{fr-ByYPK5vr.js → fr-C7HCclxj.js} +1 -1
  46. package/src/client/dist/pwa/assets/{freemarker2-MPhk0eTh.js → freemarker2-CDYXi2tK.js} +1 -1
  47. package/src/client/dist/pwa/assets/{handlebars-C60ru5gR.js → handlebars-AVkJuN-_.js} +1 -1
  48. package/src/client/dist/pwa/assets/{html-ClzchR9j.js → html-CpvEZlmO.js} +1 -1
  49. package/src/client/dist/pwa/assets/i18n-KVkTJG-4.js +1 -0
  50. package/src/client/dist/pwa/assets/{index-CqZ7sDcM.js → index-DsaWUT_Z.js} +3 -3
  51. package/src/client/dist/pwa/assets/{it-BYF_88z6.js → it-DoOWwqZz.js} +1 -1
  52. package/src/client/dist/pwa/assets/{javascript-C43UJmMx.js → javascript-BYnnBLH9.js} +1 -1
  53. package/src/client/dist/pwa/assets/{liquid-CYTrvTKF.js → liquid-CzqlB3Um.js} +1 -1
  54. package/src/client/dist/pwa/assets/{mdx-CxsXOvkQ.js → mdx-hrYFnJVZ.js} +1 -1
  55. package/src/client/dist/pwa/assets/{monaco-contributions-Cl4-iVpK.js → monaco-contributions-D2YXqNaH.js} +1 -1
  56. package/src/client/dist/pwa/assets/{monaco.contribution-DkjLUmyA.js → monaco.contribution-Dl22KqTL.js} +2 -2
  57. package/src/client/dist/pwa/assets/{network-auth-CXQn2wO7.js → network-auth-Dq0I5kjv.js} +1 -1
  58. package/src/client/dist/pwa/assets/{notify-theme-BrueBr2j.js → notify-theme-vV3Rm4_v.js} +1 -1
  59. package/src/client/dist/pwa/assets/{pending-diff-open-B4POItbR.js → pending-diff-open-BJYqBOUG.js} +1 -1
  60. package/src/client/dist/pwa/assets/{project-color-CM3hflLH.js → project-color-W5mMgIKK.js} +1 -1
  61. package/src/client/dist/pwa/assets/{python-s2IMpsoV.js → python-DafgCozG.js} +1 -1
  62. package/src/client/dist/pwa/assets/{razor-DVNXiVBh.js → razor-CWYrTLCm.js} +1 -1
  63. package/src/client/dist/pwa/assets/{render-chat-markdown-TU6CDfD8.js → render-chat-markdown-CE5RIL0s.js} +1 -1
  64. package/src/client/dist/pwa/assets/{typescript-BYT_8ABE.js → typescript-DLSIuW9u.js} +1 -1
  65. package/src/client/dist/pwa/assets/{use-tours-CNe8qb1q.js → use-tours-CDdnvIaG.js} +1 -1
  66. package/src/client/dist/pwa/assets/{workspace-templates-tBxXE52A.js → workspace-templates-C88VmFdQ.js} +1 -1
  67. package/src/client/dist/pwa/assets/{xml-BIG-fmxk.js → xml-BAmdYarn.js} +1 -1
  68. package/src/client/dist/pwa/assets/{yaml-D7gu2CQh.js → yaml-RQqNMXWh.js} +1 -1
  69. package/src/client/dist/pwa/index.html +1 -1
  70. package/src/client/dist/pwa/sw.js +1 -1
  71. package/src/client/dist/pwa/assets/DashboardPage-CzVOvjSP.js +0 -1
  72. package/src/client/dist/pwa/assets/DashboardPage-D8g7_r4S.css +0 -1
  73. package/src/client/dist/pwa/assets/i18n-Sy42tm-V.js +0 -1
@@ -1,7 +1,7 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MainLayout-DqBbE8o4.js","assets/reactivity.esm-bundler-Bo9anJjg.js","assets/runtime-core.esm-bundler-CNFKm4ij.js","assets/QBtn-DEdx_Y1V.js","assets/pinia-CTJ3OfP3.js","assets/use-id-wXd4c8FA.js","assets/QList-CHm4JNP0.js","assets/QSelect-BfqaWakg.js","assets/private.use-form-Bk8ti264.js","assets/QItemSection-BhqphaH6.js","assets/use-tours-CNe8qb1q.js","assets/use-tours-CTZuBZOi.css","assets/QChip-DCPUhqXX.js","assets/documents-Bjx8lz-h.js","assets/QTooltip-Cy0T0vk2.js","assets/render-chat-markdown-TU6CDfD8.js","assets/QBadge-FWC1zDCq.js","assets/ClosePopup-CWjIRHxu.js","assets/use-is-mobile-DpKI3XMy.js","assets/permissionModes-B-ciuUbz.js","assets/efforts-BDHAnNUs.js","assets/WorkspaceAttentionLabels-C5lTHTp2.js","assets/formatters-CWxRHuUu.js","assets/WorkspaceAttentionLabels-CrLP_I5S.css","assets/custom-sounds-BpeLZUDW.js","assets/TouchPan-CcTVcxwd.js","assets/QBanner-CcRI_QIy.js","assets/engineFeatures-hlEiwqt-.js","assets/engineFeatures-B-9jHocY.css","assets/project-color-CM3hflLH.js","assets/SettingsPage-0GtDcXRC.js","assets/QExpansionItem-DfmdBGuW.js","assets/use-slide-transition-CiaDm-tR.js","assets/QBtnDropdown-BWy-rh45.js","assets/QBtnGroup-CAoD6G0Q.js","assets/QPage-BXBw2Alx.js","assets/DrawerToggleButton-DbipGmBL.js","assets/TourReplayButton-CpEMnQS8.js","assets/workspace-templates-tBxXE52A.js","assets/workspace-page-layout-Dw9NhZsL.js","assets/SettingsPage-BYdLXJEJ.css","assets/MainLayout-Cc4XzCAy.css","assets/DashboardPage-CzVOvjSP.js","assets/QMarkupTable-CNpiA9oq.js","assets/DashboardPage-D8g7_r4S.css","assets/WorkspacePage-D_V9gNON.js","assets/QSpinnerDots-BkFiCsH3.js","assets/clipboard-t9qe6lK7.js","assets/expand-template-DLDl1qPx.js","assets/expand-template-CTUNyJrv.css","assets/use-search-index-status-Bluf9L99.js","assets/WorkspacePage--5HsnMQ1.css","assets/SplitWorkspacePage-4wFh65Lh.js","assets/SplitWorkspacePage-lWQO8xro.css","assets/CreatePage-B9AdNJZj.js","assets/QBtnToggle-C_hQ2UCQ.js","assets/CreatePage-B9C9J9Pw.css","assets/SearchPage-BoBjmItc.js","assets/SearchPage-BGc1oQSM.css","assets/HealthPage-aieNQly-.js","assets/HealthPage-CFZ-tdKK.css","assets/ChangelogPage-BJdICFvz.js","assets/ChangelogPage-DKJkFiU_.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MainLayout-D3zfT61Y.js","assets/reactivity.esm-bundler-Bo9anJjg.js","assets/runtime-core.esm-bundler-CNFKm4ij.js","assets/QBtn-DEdx_Y1V.js","assets/pinia-CTJ3OfP3.js","assets/use-id-wXd4c8FA.js","assets/QList-CHm4JNP0.js","assets/QSelect-DoTWgQAO.js","assets/private.use-form-Bk8ti264.js","assets/QItemSection-BhqphaH6.js","assets/use-tours-CDdnvIaG.js","assets/use-tours-CTZuBZOi.css","assets/QChip-DCPUhqXX.js","assets/documents-BtNrB6d0.js","assets/QTooltip-DKvUeiR_.js","assets/render-chat-markdown-CE5RIL0s.js","assets/QBadge-FWC1zDCq.js","assets/ClosePopup-CWjIRHxu.js","assets/use-is-mobile-DpKI3XMy.js","assets/permissionModes-B-ciuUbz.js","assets/efforts-ChUC4xtk.js","assets/WorkspaceAttentionLabels-B-SuQuS_.js","assets/formatters-BtG6lb4d.js","assets/WorkspaceAttentionLabels-CrLP_I5S.css","assets/custom-sounds-Du8ReMlU.js","assets/TouchPan-CCllyaAF.js","assets/QBanner-CcRI_QIy.js","assets/engineFeatures-D-0NPZBE.js","assets/engineFeatures-B-9jHocY.css","assets/project-color-W5mMgIKK.js","assets/SettingsPage-B9cLhFnO.js","assets/QExpansionItem-CQ2LzM8P.js","assets/use-slide-transition-CiaDm-tR.js","assets/QBtnDropdown-DGLLlBf3.js","assets/QBtnGroup-CAoD6G0Q.js","assets/QPage-BXBw2Alx.js","assets/DrawerToggleButton-C39pfWBD.js","assets/TourReplayButton-Cp2UnxWa.js","assets/workspace-templates-C88VmFdQ.js","assets/workspace-page-layout-Dw9NhZsL.js","assets/SettingsPage-BYdLXJEJ.css","assets/MainLayout-Cc4XzCAy.css","assets/DashboardPage-CZ2036MC.js","assets/QMarkupTable-CNpiA9oq.js","assets/DashboardPage-XiCj24i2.css","assets/WorkspacePage-6lN4iF5W.js","assets/QSpinnerDots-BkFiCsH3.js","assets/clipboard-t9qe6lK7.js","assets/expand-template-ByoC_kxX.js","assets/expand-template-CTUNyJrv.css","assets/use-search-index-status-Bluf9L99.js","assets/WorkspacePage--5HsnMQ1.css","assets/SplitWorkspacePage-BJKssJyI.js","assets/SplitWorkspacePage-lWQO8xro.css","assets/CreatePage-COQwHyqL.js","assets/QBtnToggle-C_hQ2UCQ.js","assets/CreatePage-B9C9J9Pw.css","assets/SearchPage-COWnMxRZ.js","assets/SearchPage-BGc1oQSM.css","assets/HealthPage-CnJWXfa8.js","assets/HealthPage-CFZ-tdKK.css","assets/ChangelogPage-OoOnn4q9.js","assets/ChangelogPage-DKJkFiU_.css"])))=>i.map(i=>d[i]);
2
2
  import{C as e,S as t,a as n,b as r,f as i,g as a,j as o,o as s,p as c,u as l,ut as u,v as d}from"./reactivity.esm-bundler-Bo9anJjg.js";import{C as f,F as p,J as m,L as h,M as g,N as _,O as v,P as y,R as b,T as x,V as S,Y as C,_ as w,b as T,d as E,f as D,j as O,k,l as A,p as j,r as M,s as ee,u as te,y as N}from"./runtime-core.esm-bundler-CNFKm4ij.js";import{$ as ne,A as re,F as ie,H as P,J as ae,M as oe,N as se,O as ce,S as F,U as le,V as ue,W as de,Y as I,Z as fe,at as pe,b as me,ct as he,d as ge,et as _e,f as ve,ft as ye,it as be,j as xe,k as Se,l as Ce,lt as we,m as L,o as Te,ot as Ee,p as De,rt as Oe,s as ke,st as Ae,t as je,tt as Me,u as Ne,ut as Pe,w as Fe,x as Ie,y as Le}from"./QBtn-DEdx_Y1V.js";import{a as Re,i as ze,n as Be,t as Ve}from"./pinia-CTJ3OfP3.js";import{S as He,_ as Ue,a as We,b as Ge,c as Ke,d as qe,g as Je,h as Ye,l as Xe,s as Ze,t as Qe,u as $e,v as et,x as tt,y as nt}from"./use-id-wXd4c8FA.js";import{i as rt,n as it,r as at}from"./private.use-form-Bk8ti264.js";import{a as ot,i as st,n as ct,r as lt,t as ut}from"./use-checkbox-CnvHBhSK.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var dt=[`sm`,`md`,`lg`,`xl`],{passive:ft}=ae,pt=Oe({width:0,height:0,name:`xs`,sizes:{sm:600,md:1024,lg:1440,xl:1920},lt:{sm:!0,md:!0,lg:!0,xl:!0},gt:{xs:!1,sm:!1,md:!1,lg:!1},xs:!0,sm:!1,md:!1,lg:!1,xl:!1},{setSizes:I,setDebounce:I,install({$q:e,onSSRHydrated:t}){if(e.screen=this,this.__installed){e.config.screen!==void 0&&(e.config.screen.bodyClasses?this.__update(!0):document.body.classList.remove(`screen--${this.name}`));return}let{visualViewport:n}=window,r=n||window,i=document.scrollingElement||document.documentElement,a=n===void 0||pe.is.mobile?()=>[Math.max(window.innerWidth,i.clientWidth),Math.max(window.innerHeight,i.clientHeight)]:()=>[n.width*n.scale+window.innerWidth-i.clientWidth,n.height*n.scale+window.innerHeight-i.clientHeight],o=e.config.screen?.bodyClasses===!0;this.__update=e=>{let[t,n]=a();if(n!==this.height&&(this.height=n),t!==this.width)this.width=t;else if(e!==!0)return;let r=this.sizes;this.gt.xs=t>=r.sm,this.gt.sm=t>=r.md,this.gt.md=t>=r.lg,this.gt.lg=t>=r.xl,this.lt.sm=t<r.sm,this.lt.md=t<r.md,this.lt.lg=t<r.lg,this.lt.xl=t<r.xl,this.xs=this.lt.sm,this.sm=this.gt.xs&&this.lt.md,this.md=this.gt.sm&&this.lt.lg,this.lg=this.gt.md&&this.lt.xl,this.xl=this.gt.lg,r=this.xs&&`xs`||this.sm&&`sm`||this.md&&`md`||this.lg&&`lg`||`xl`,r!==this.name&&(o&&(document.body.classList.remove(`screen--${this.name}`),document.body.classList.add(`screen--${r}`)),this.name=r)};let s,c={},l=16;this.setSizes=e=>{dt.forEach(t=>{e[t]!==void 0&&(c[t]=e[t])})},this.setDebounce=e=>{l=e};let u=()=>{let e=getComputedStyle(document.body);e.getPropertyValue(`--q-size-sm`)&&dt.forEach(t=>{this.sizes[t]=Number.parseInt(e.getPropertyValue(`--q-size-${t}`),10)}),this.setSizes=e=>{dt.forEach(t=>{e[t]&&(this.sizes[t]=e[t])}),this.__update(!0)},this.setDebounce=e=>{s!==void 0&&r.removeEventListener(`resize`,s,ft),s=e>0?de(this.__update,e):this.__update,r.addEventListener(`resize`,s,ft)},this.setDebounce(l),Object.keys(c).length===0?this.__update():(this.setSizes(c),c=void 0),o&&this.name===`xs`&&document.body.classList.add(`screen--xs`)};Ee.value?t.push(u):u()}}),mt=`data-dark-auto`,ht=Oe({isActive:!1,mode:!1},{__media:void 0,set(e){ht.mode=e,e===`auto`?(ht.__media===void 0&&(ht.__media=window.matchMedia(`(prefers-color-scheme: dark)`),ht.__updateMedia=()=>{ht.set(`auto`)},ht.__media.addListener(ht.__updateMedia)),e=ht.__media.matches):ht.__media!==void 0&&(ht.__media.removeListener(ht.__updateMedia),ht.__media=void 0),ht.isActive=e===!0,document.body.classList.remove(`body--${e===!0?`light`:`dark`}`),document.body.classList.add(`body--${e===!0?`dark`:`light`}`)},toggle(){ht.set(!ht.isActive)},install({$q:e,ssrContext:t,onSSRHydrated:n}){if(e.dark=this,!this.__installed){if(Ee.value){if(document.body.hasAttribute(mt)){this.mode=`auto`,n.push(()=>{document.body.removeAttribute(mt),this.mode===`auto`&&this.set(`auto`)});return}this.set(document.body.classList.contains(`body--dark`));return}this.set(e.config.dark??!1)}}});function gt(e,t,n=document.body){if(typeof e!=`string`)throw TypeError(`Expected a string as propName`);if(typeof t!=`string`)throw TypeError(`Expected a string as value`);if(!(n instanceof Element))throw TypeError(`Expected a DOM element`);n.style.setProperty(`--q-${e}`,t)}function _t(e){if(e.ios)return`ios`;if(e.android)return`android`}function vt({is:e,has:t,within:n},r){let i=[e.desktop?`desktop`:`mobile`,`${t.touch?``:`no-`}touch`];if(e.mobile){let t=_t(e);t!==void 0&&i.push(`platform-`+t)}if(e.nativeMobile){let t=e.nativeMobileWrapper,n=r[t];i.push(t,`native-mobile`),e.ios&&(n===void 0||n.iosStatusBarPadding)?i.push(`q-ios-padding`):e.android&&(n===void 0||n.androidStatusBarPadding!==!1)&&i.push(`q-safe-area-padding`)}else e.electron?i.push(`electron`):e.bex&&i.push(`bex`);return n.iframe&&i.push(`within-iframe`),i}function yt(){let{is:e}=pe,t=document.body.className,n=new Set(t.replaceAll(/ {2}/g,` `).split(` `));if(!e.nativeMobile&&!e.electron&&!e.bex){if(e.desktop)n.delete(`mobile`),n.delete(`platform-ios`),n.delete(`platform-android`),n.add(`desktop`);else if(e.mobile){n.delete(`desktop`),n.add(`mobile`),n.delete(`platform-ios`),n.delete(`platform-android`);let t=_t(e);t!==void 0&&n.add(`platform-${t}`)}}pe.has.touch&&(n.delete(`no-touch`),n.add(`touch`)),pe.within.iframe&&n.add(`within-iframe`);let r=[...n].join(` `);t!==r&&(document.body.className=r)}function bt(e){for(let t in e)gt(t,e[t])}var xt={install(e){if(!this.__installed){if(Ee.value)yt();else{let{$q:t}=e;t.config.brand!==void 0&&bt(t.config.brand),document.body.classList.add(...vt(pe,t.config))}pe.is.ios&&document.body.addEventListener(`touchstart`,I),window.addEventListener(`keydown`,P,!0)}}},St=()=>!0;function Ct(e){return typeof e==`string`&&e!==``&&e!==`/`&&e!==`#/`}function wt(e){return e.startsWith(`#`)&&(e=e.slice(1)),e.startsWith(`/`)||(e=`/`+e),e.endsWith(`/`)&&(e=e.slice(0,-1)),`#`+e}function Tt(e){if(e.backButtonExit===!1)return()=>!1;if(e.backButtonExit===`*`)return St;let t=[`#/`];return Array.isArray(e.backButtonExit)&&t.push(...e.backButtonExit.filter(Ct).map(wt)),()=>t.includes(window.location.hash)}var Et={__history:[],add:I,remove:I,install({$q:e}){if(this.__installed)return;let{cordova:t,capacitor:n}=pe.is;if(!t&&!n)return;let r=e.config[t?`cordova`:`capacitor`];if(r?.backButton===!1||n&&(window.Capacitor===void 0||window.Capacitor.Plugins.App===void 0))return;this.add=e=>{e.condition===void 0&&(e.condition=St),this.__history.push(e)},this.remove=e=>{let t=this.__history.indexOf(e);t!==-1&&this.__history.splice(t,1)};let i=Tt({backButtonExit:!0,...r}),a=()=>{if(this.__history.length!==0){let e=this.__history.at(-1);e.condition()&&(this.__history.pop(),e.handler())}else i()?navigator.app.exitApp():window.history.back()};t?document.addEventListener(`deviceready`,()=>{document.addEventListener(`backbutton`,a,!1)}):window.Capacitor.Plugins.App.addListener(`backButton`,a)}},Dt={isoName:`en-US`,nativeName:`English (US)`,label:{clear:`Clear`,ok:`OK`,cancel:`Cancel`,close:`Close`,set:`Set`,select:`Select`,reset:`Reset`,remove:`Remove`,update:`Update`,create:`Create`,search:`Search`,filter:`Filter`,refresh:`Refresh`,minimum:`Minimum`,maximum:`Maximum`,range:`Range`,noValue:`No value`,resize:`Resize`,expand:e=>e?`Expand "${e}"`:`Expand`,collapse:e=>e?`Collapse "${e}"`:`Collapse`},date:{days:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),daysShort:`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),monthsShort:`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),firstDayOfWeek:0,format24h:!1,pluralDay:`days`,prevMonth:`Previous month`,nextMonth:`Next month`,prevYear:`Previous year`,nextYear:`Next year`,today:`Today`,prevRangeYears:e=>`Previous ${e} years`,nextRangeYears:e=>`Next ${e} years`,hour:`Hour`,minute:`Minute`,second:`Second`,now:`Current time`},table:{noData:`No data available`,noResults:`No matching records found`,loading:`Loading...`,selectedRecords:e=>e===1?`1 record selected.`:(e===0?`No`:e)+` records selected.`,recordsPerPage:`Records per page:`,allRows:`All`,pagination:(e,t,n)=>e+`–`+t+` of `+n,columns:`Columns`,selectAllRows:`Select all rows`,selectRow:`Select row`},pagination:{label:`Pagination`,first:`First page`,prev:`Previous page`,next:`Next page`,last:`Last page`},carousel:{prevSlide:`Previous slide`,nextSlide:`Next slide`},colorPicker:{spectrum:`Spectrum`,tune:`Tune`,palette:`Palette`,value:`Color value`,hue:`Hue`,alpha:`Opacity`,saturation:`Saturation`,brightness:`Brightness`},uploader:{addFiles:`Pick files`,upload:`Upload files`,abort:`Abort upload`,removeQueued:`Remove queued files`,removeUploaded:`Remove uploaded files`,removeFile:`Remove file`},editor:{toolbar:`Editor toolbar`,url:`URL`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,underline:`Underline`,unorderedList:`Unordered List`,orderedList:`Ordered List`,subscript:`Subscript`,superscript:`Superscript`,hyperlink:`Hyperlink`,toggleFullscreen:`Toggle Fullscreen`,quote:`Quote`,left:`Left align`,center:`Center align`,right:`Right align`,justify:`Justify align`,print:`Print`,outdent:`Decrease indentation`,indent:`Increase indentation`,removeFormat:`Remove formatting`,formatting:`Formatting`,fontSize:`Font Size`,align:`Align`,hr:`Insert Horizontal Rule`,undo:`Undo`,redo:`Redo`,heading1:`Heading 1`,heading2:`Heading 2`,heading3:`Heading 3`,heading4:`Heading 4`,heading5:`Heading 5`,heading6:`Heading 6`,paragraph:`Paragraph`,code:`Code`,size1:`Very small`,size2:`A bit small`,size3:`Normal`,size4:`Medium-large`,size5:`Big`,size6:`Very big`,size7:`Maximum`,defaultFont:`Default Font`,viewSource:`View Source`},tree:{noNodes:`No nodes available`,noResults:`No matching nodes found`}};function Ot(e){return e.split(/[-_]/).map((e,t)=>t===0?e.toLowerCase():t>1||e.length<4?e.toUpperCase():e[0].toUpperCase()+e.slice(1).toLowerCase())}function kt(){let e=Array.isArray(navigator.languages)&&navigator.languages.length!==0?navigator.languages[0]:navigator.language;if(typeof e==`string`)return Ot(e).join(`-`)}function At(e){try{let{language:t,script:n,region:r}=new Intl.Locale(e).maximize();return{language:t,script:n,region:r}}catch{}}function jt(e,t){if(typeof e!=`string`||!Array.isArray(t))return;let n=new Map;for(let e of t){if(typeof e!=`string`)continue;let t=e.toLowerCase().replaceAll(`_`,`-`);n.has(t)||n.set(t,e)}if(n.size===0)return;let r=Ot(e),i=[];for(let e=r.length;e>1;e--)i.push(r.slice(0,e).join(`-`));if(r.length>2&&r[1].length===4){let e=[r[0],...r.slice(2)];for(let t=e.length;t>1;t--)i.push(e.slice(0,t).join(`-`))}i.push(r[0]);for(let e of i){let t=n.get(e.toLowerCase());if(t!==void 0)return t}let a=At(r.join(`-`));if(a===void 0)return;let o=At(a.language).region,s;for(let[e,t]of n){let n=At(e);if(n===void 0||n.language!==a.language)continue;let r=(n.script===a.script?4:0)+(n.region===a.region?2:0)+ +(n.region===o),i=e.split(`-`).length;(s===void 0||r>s.score||r===s.score&&i<s.depth)&&(s={tag:t,score:r,depth:i})}return s?.tag}var Mt=Oe({__qLang:{}},{getLocale:kt,getClosestIsoName:jt,set(e=Dt,t){let n={...e,rtl:e.rtl===!0,getLocale:kt,getClosestIsoName:jt};if(n.set=Mt.set,Mt.__langConfig===void 0||!Mt.__langConfig.noHtmlAttrs){let e=document.documentElement;e.setAttribute(`dir`,n.rtl?`rtl`:`ltr`),e.setAttribute(`lang`,n.isoName)}for(let e of Object.keys(Mt.__qLang))e in n||delete Mt.__qLang[e];Object.assign(Mt.__qLang,n)},install({$q:e,lang:t,ssrContext:n}){e.lang=Mt.__qLang,Mt.__langConfig=e.config.lang,this.__installed?t!==void 0&&this.set(t):(this.props=new Proxy(this.__qLang,{get:Reflect.get,ownKeys(e){return Reflect.ownKeys(e).filter(e=>e!==`set`&&e!==`getLocale`&&e!==`getClosestIsoName`)}}),this.set(t||Dt))}}),Nt={name:`material-icons`,type:{positive:`check_circle`,negative:`warning`,info:`info`,warning:`priority_high`},arrow:{up:`arrow_upward`,right:`arrow_forward`,down:`arrow_downward`,left:`arrow_back`,dropdown:`arrow_drop_down`},chevron:{left:`chevron_left`,right:`chevron_right`},colorPicker:{spectrum:`gradient`,tune:`tune`,palette:`style`},pullToRefresh:{icon:`refresh`},carousel:{left:`chevron_left`,right:`chevron_right`,up:`keyboard_arrow_up`,down:`keyboard_arrow_down`,navigationIcon:`lens`},chip:{remove:`cancel`,selected:`check`},datetime:{arrowLeft:`chevron_left`,arrowRight:`chevron_right`,now:`access_time`,today:`today`},editor:{bold:`format_bold`,italic:`format_italic`,strikethrough:`strikethrough_s`,underline:`format_underlined`,unorderedList:`format_list_bulleted`,orderedList:`format_list_numbered`,subscript:`vertical_align_bottom`,superscript:`vertical_align_top`,hyperlink:`link`,toggleFullscreen:`fullscreen`,quote:`format_quote`,left:`format_align_left`,center:`format_align_center`,right:`format_align_right`,justify:`format_align_justify`,print:`print`,outdent:`format_indent_decrease`,indent:`format_indent_increase`,removeFormat:`format_clear`,formatting:`text_format`,fontSize:`format_size`,align:`format_align_left`,hr:`remove`,undo:`undo`,redo:`redo`,heading:`format_size`,code:`code`,size:`format_size`,font:`font_download`,viewSource:`code`},expansionItem:{icon:`keyboard_arrow_down`,denseIcon:`arrow_drop_down`},fab:{icon:`add`,activeIcon:`close`},field:{clear:`cancel`,error:`error`},pagination:{first:`first_page`,prev:`keyboard_arrow_left`,next:`keyboard_arrow_right`,last:`last_page`},rating:{icon:`grade`},stepper:{done:`check`,active:`edit`,error:`warning`},tabs:{left:`chevron_left`,right:`chevron_right`,up:`keyboard_arrow_up`,down:`keyboard_arrow_down`},table:{arrowUp:`arrow_upward`,warning:`warning`,firstPage:`first_page`,prevPage:`chevron_left`,nextPage:`chevron_right`,lastPage:`last_page`},tree:{icon:`play_arrow`},uploader:{done:`done`,clear:`clear`,add:`add_box`,upload:`cloud_upload`,removeQueue:`clear_all`,removeUploaded:`done_all`}},Pt=Oe({iconMapFn:null,__qIconSet:{}},{set(e,t){let n={...e};n.set=Pt.set,Object.assign(Pt.__qIconSet,n)},install({$q:e,iconSet:t,ssrContext:n}){e.config.iconMapFn!==void 0&&(this.iconMapFn=e.config.iconMapFn),e.iconSet=this.__qIconSet,Ae(e,`iconMapFn`,()=>this.iconMapFn,e=>{this.iconMapFn=e}),this.__installed?t!==void 0&&this.set(t):(this.props=new Proxy(this.__qIconSet,{get:Reflect.get,ownKeys(e){return Reflect.ownKeys(e).filter(e=>e!==`set`)}}),this.set(t||Nt))}});function Ft(e){return e.constructor===ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function It(e,t,n){return typeof e==`function`&&e!==n&&typeof t==`function`&&t!==n}function Lt(e,t){if(e===t)return!0;if(e!==null&&t!==null&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;let n,r;if(e.constructor===Array){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lt(e[r],t[r]))return!1;return!0}if(e.constructor===Map){if(e.size!==t.size)return!1;let n=e.entries();for(r=n.next();!r.done;){if(!t.has(r.value[0]))return!1;r=n.next()}for(n=e.entries(),r=n.next();!r.done;){if(!Lt(r.value[1],t.get(r.value[0])))return!1;r=n.next()}return!0}if(e.constructor===Set){if(e.size!==t.size)return!1;let n=e.entries();for(r=n.next();!r.done;){if(!t.has(r.value[0]))return!1;r=n.next()}return!0}if(e.constructor===ArrayBuffer||e.constructor===DataView){if(e.byteLength!==t.byteLength)return!1;e=Ft(e),t=Ft(t)}if(ArrayBuffer.isView(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(It(e.valueOf,t.valueOf,Object.prototype.valueOf))return e.valueOf()===t.valueOf();if(It(e.toString,t.toString,Object.prototype.toString))return e.toString()===t.toString();let i=Object.keys(e).filter(t=>e[t]!==void 0);if(n=i.length,n!==Object.keys(t).filter(e=>t[e]!==void 0).length)return!1;for(r=n;r--!==0;){let n=i[r];if(!Lt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Rt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function zt(e){return Object.prototype.toString.call(e)===`[object Date]`}function Bt(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function Vt(e){return typeof e==`number`&&Number.isFinite(e)}var Ht={deepEqual:Lt,object:Rt,date:zt,regexp:Bt,number:Vt},Ut=[be,xt,ht,pt,Et,Mt,Pt];function Wt(e,t){let n=Pe(e);n.config.globalProperties=t.config.globalProperties;let{reload:r,...i}=t._context;return Object.assign(n._context,i),n}function Gt(e,t){t.forEach(t=>{t.install(e),t.__installed=!0})}function Kt(e,t,n){e.config.globalProperties.$q=n.$q,e.provide(`_q_`,n.$q),Gt(n,Ut),t.components!==void 0&&Object.values(t.components).forEach(t=>{Rt(t)&&t.name!==void 0&&e.component(t.name,t)}),t.directives!==void 0&&Object.values(t.directives).forEach(t=>{Rt(t)&&t.name!==void 0&&e.directive(t.name,t)}),t.plugins!==void 0&&Gt(n,Object.values(t.plugins).filter(e=>typeof e.install==`function`&&!Ut.includes(e))),Ee.value&&(n.$q.onSSRHydrated=()=>{n.onSSRHydrated.forEach(e=>{e()}),n.$q.onSSRHydrated=()=>{}})}var qt={name:`Quasar`,version:`2.33.1`,install:function(e,t={}){let n={version:`2.33.1`};se?n.config=t.config||{}:(t.config!==void 0&&Object.assign(oe,t.config),n.config={...oe},xe()),Kt(e,t,{parentApp:e,$q:n,lang:t.lang,iconSet:t.iconSet,onSSRHydrated:[]})},lang:Mt,iconSet:Pt},Jt=Me({name:`QCardSection`,props:{tag:{type:String,default:`div`},horizontal:Boolean},setup(e,{slots:t}){let n=A(()=>`q-card__section q-card__section--${e.horizontal?`horiz row no-wrap`:`vert`}`);return()=>f(e.tag,{class:n.value},F(t.default))}}),Yt=ce({xs:2,sm:4,md:6,lg:10,xl:14});function Xt(e){return{transform:`scaleX(${e})`}}var Zt=Me({name:`QLinearProgress`,props:{...Re,...re,value:{type:Number,default:0},buffer:Number,color:String,trackColor:String,reverse:Boolean,stripe:Boolean,indeterminate:Boolean,query:Boolean,rounded:Boolean,animationSpeed:{type:[String,Number],default:2100},instantFeedback:Boolean},setup(e,{slots:t}){let n=Le(),r=ze(e,n),i=A(()=>e.indeterminate||e.query),a=A(()=>({...Yt(e.size),"--q-linear-progress-speed":`${e.animationSpeed}ms`})),o=A(()=>`q-linear-progress`+(e.color===void 0?``:` text-${e.color}`)+(e.reverse||e.query?` q-linear-progress--reverse`:``)+(e.rounded?` rounded-borders`:``)),s=A(()=>Xt(e.buffer===void 0?1:e.buffer)),c=A(()=>`with${e.instantFeedback?`out`:``}-transition`),l=A(()=>`q-linear-progress__track absolute-full q-linear-progress__track--${c.value} q-linear-progress__track--${r()?`dark`:`light`}`+(e.trackColor===void 0?``:` bg-${e.trackColor}`)),u=A(()=>Xt(i.value?1:e.value)),d=A(()=>`q-linear-progress__model absolute-full q-linear-progress__model--${c.value} q-linear-progress__model--${i.value?`in`:``}determinate`),p=A(()=>({width:`${e.value*100}%`})),m=A(()=>`q-linear-progress__stripe absolute-${e.reverse?`right`:`left`} q-linear-progress__stripe--${c.value}`);return()=>{let n=[f(`div`,{class:l.value,style:s.value}),f(`div`,{class:d.value,style:u.value})];return e.stripe&&!i.value&&n.push(f(`div`,{class:m.value,style:p.value})),f(`div`,{class:o.value,style:a.value,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":e.indeterminate||e.query?void 0:e.value},me(t.default,n))}}}),Qt=Me({name:`QCard`,props:{...Re,tag:{type:String,default:`div`},square:Boolean,flat:Boolean,bordered:Boolean},setup(e,{slots:t}){let n=Le(),r=ze(e,n),i=A(()=>`q-card`+(r()?` q-card--dark q-dark`:``)+(e.bordered?` q-card--bordered`:``)+(e.square?` q-card--square no-border-radius`:``)+(e.flat?` q-card--flat no-shadow`:``));return()=>f(e.tag,{class:i.value},F(t.default))}});function $t(e,t,n){let r;function i(){r!==void 0&&(Et.remove(r),r=void 0)}return O(()=>{e.value&&i()}),{removeFromHistory:i,addToHistory(){r={condition:()=>n.value,handler:t},Et.add(r)}}}function en(e,t){let{proxy:n}=T(),r=null;function i(t){r=e.noRefocus||t===!0?null:document.activeElement}function a(e){r=e||null}function o(){r=null}function s(e){return(e?.type.indexOf(`key`)===0?r.closest(`[tabindex]:not([tabindex^="-"])`):void 0)||r}function c(e){if(r===null)return;let t=s(e);r=null;let i=Ye.indexOf(n);if(i!==-1){for(let e=Ye.length-1;e>i;e--)if(Ye[e].__adoptRefocusTarget?.(t,n.contentEl)===!0)return}$e(()=>{t.isConnected&&t.focus({preventScroll:!0})})}function l(e){r!==null&&(r.isConnected&&s(e).focus({preventScroll:!0}),r=null)}function u(n,i){return t()?(!e.noRefocus&&(r===null||i?.contains(r)===!0)&&(r=n),!0):!1}return{captureRefocusTarget:i,setRefocusTarget:a,clearRefocusTarget:o,restoreFocus:c,restoreFocusSync:l,adoptRefocusTarget:u}}var tn=[Element,String,Object],nn=[null,document,document.body,document.scrollingElement,document.documentElement];function rn(e,t){let n=ve(t);if(n!==void 0&&n!==window&&!(n instanceof Element)&&!nn.includes(n)&&(console.warn(`[Quasar] scroll-target: the specified value is not an Element nor a component with a root element; falling back to auto detection`),n=void 0),n===void 0){if(e==null)return window;n=e.closest(`.scroll,.scroll-y,.overflow-auto`)}return nn.includes(n)?window:n}function an(e){return e===window?window.scrollY:e.scrollTop}function on(e){return e===window?window.scrollX:e.scrollLeft}function sn(e,t,n=0,r){let i=r===void 0?performance.now():r,a=an(e);if(n<=0){a!==t&&ln(e,t);return}requestAnimationFrame(r=>{let o=r-i,s=a+(t-a)/Math.max(o,n)*o;ln(e,s),s!==t&&sn(e,t,n-o,r)})}function cn(e,t,n=0,r){let i=r===void 0?performance.now():r,a=on(e);if(n<=0){a!==t&&un(e,t);return}requestAnimationFrame(r=>{let o=r-i,s=a+(t-a)/Math.max(o,n)*o;un(e,s),s!==t&&cn(e,t,n-o,r)})}function ln(e,t){if(e===window){window.scrollTo(window.scrollX,t);return}e.scrollTop=t}function un(e,t){if(e===window){window.scrollTo(t,window.scrollY);return}e.scrollLeft=t}function dn(e,t,n){if(n){sn(e,t,n);return}ln(e,t)}function fn(e,t,n){if(n){cn(e,t,n);return}un(e,t)}var pn;function mn(){if(pn!==void 0)return pn;let e=document.createElement(`p`),t=document.createElement(`div`);ge(e,{width:`100%`,height:`200px`}),ge(t,{position:`absolute`,top:`0px`,left:`0px`,visibility:`hidden`,width:`200px`,height:`150px`,overflow:`hidden`}),t.append(e),document.body.append(t);let n=e.offsetWidth;t.style.overflow=`scroll`;let r=e.offsetWidth;return n===r&&(r=t.clientWidth),t.remove(),pn=n-r,pn}var hn=0,gn,_n,vn,yn=!1,bn,xn,Sn=!1,Cn,wn=null,Tn=new Set;function En(e){Tn.add(e)}function Dn(e){Tn.delete(e)}function On(e){yn||(yn=!0,requestAnimationFrame(()=>{yn=!1;let{height:t,scale:n}=e.target;if(Math.abs(n-1)>.01)return;let{clientHeight:r,scrollTop:i}=document.scrollingElement;(vn===void 0||t!==window.innerHeight)&&(vn=r-t,document.scrollingElement.scrollTop=i),i>vn&&(document.scrollingElement.scrollTop-=Math.ceil((i-vn)/8))}))}function kn(e){let t=document.body;if(e===`add`){gn=on(window),_n=an(window),Cn=window.location.pathname,Sn=pe.is.ios;let e=[`q-document--prevent-scroll`];Sn?(bn=t.style.left,xn=t.style.top,t.style.left=`-${gn}px`,t.style.top=`-${_n}px`,e.push(`q-document--pin-body`)):(e.push(`q-document--clip-scroll`),window.innerWidth-document.documentElement.clientWidth>0&&e.push(`q-document--reserve-scrollbar`)),document.documentElement.classList.add(...e),document.qScrollPrevented=!0,Sn&&(window.scrollTo(0,0),window.visualViewport?.addEventListener(`resize`,On,ae.passiveCapture),window.visualViewport?.addEventListener(`scroll`,On,ae.passiveCapture),window.scrollTo(0,0))}else Sn&&(window.visualViewport?.removeEventListener(`resize`,On,ae.passiveCapture),window.visualViewport?.removeEventListener(`scroll`,On,ae.passiveCapture)),document.documentElement.classList.remove(`q-document--prevent-scroll`,`q-document--clip-scroll`,`q-document--reserve-scrollbar`,`q-document--pin-body`),document.qScrollPrevented=!1,Sn&&(t.style.left=bn,t.style.top=xn),Sn&&window.location.pathname===Cn&&(on(window)!==gn||an(window)!==_n)?window.scrollTo(gn,_n):Tn.forEach(e=>{e()}),vn=void 0}function An(e){let t=`add`;if(e===!0){if(hn++,wn!==null){clearTimeout(wn),wn=null;return}if(hn>1)return}else{if(hn===0||(hn--,hn>0))return;if(t=`remove`,Sn&&pe.is.nativeMobile){wn!==null&&clearTimeout(wn),wn=setTimeout(()=>{kn(t),wn=null},100);return}}kn(t)}function jn(){let e;return{preventBodyScroll(t){t!==e&&(e!==void 0||t)&&(e=t,An(t))}}}var Mn=[];function Nn(e){Mn.at(-1)(e)}function Pn(e){Mn.push(e),Mn.length===1&&document.body.addEventListener(`focusin`,Nn)}function Fn(e){let t=Mn.indexOf(e);t!==-1&&(Mn.splice(t,1),Mn.length===0&&document.body.removeEventListener(`focusin`,Nn))}var In=0,Ln={standard:`fixed-full flex-center`,top:`fixed-top justify-center`,bottom:`fixed-bottom justify-center`,right:`fixed-right items-center`,left:`fixed-left items-center`},Rn={standard:[`scale`,`scale`],top:[`slide-down`,`slide-up`],bottom:[`slide-up`,`slide-down`],right:[`slide-left`,`slide-right`],left:[`slide-right`,`slide-left`]},zn=Me({name:`QDialog`,inheritAttrs:!1,props:{...Ge,...Ue,transitionShow:String,transitionHide:String,persistent:Boolean,autoClose:Boolean,allowFocusOutside:Boolean,noEscDismiss:Boolean,noBackdropDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,noShake:Boolean,seamless:Boolean,maximized:Boolean,fullWidth:Boolean,fullHeight:Boolean,square:Boolean,backdropFilter:String,position:{type:String,default:`standard`,validator:e=>[`standard`,`top`,`bottom`,`left`,`right`].includes(e)}},emits:[...nt,`shake`,`click`,`escapeKey`],setup(e,{slots:n,emit:r,attrs:i}){let a=T(),o=Le(),s=t(null),c=t(null),l=d(!1),u=d(!1),p=d(null),h=null,g=!1,_=!1,v=!1,y=A(()=>!e.persistent&&!e.noRouteDismiss&&!e.seamless),{preventBodyScroll:b}=jn(),{registerTransitionEnd:x}=He(e),{registerTick:S,removeTick:C}=tt(),{transitionProps:w,transitionStyle:E}=Je(e,()=>Rn[e.position][0],()=>Rn[e.position][1]),D=A(()=>E()+(e.backdropFilter===void 0?``:`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`)),{showPortal:k,hidePortal:j,portalIsOpening:M,renderPortal:ee}=Xe(a,c,Te,`dialog`),{captureRefocusTarget:te,setRefocusTarget:N,clearRefocusTarget:ne,restoreFocus:re,adoptRefocusTarget:ie}=en(e,()=>!e.noFocus&&M()),{hide:P}=et({showing:l,hideOnRouteChange:y,handleShow:me,handleHide:ge,handleRouteChange:_e,processOnMount:!0}),{addToHistory:oe,removeFromHistory:se}=$t(l,P,y),ce=A(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized?`maximized`:`minimized`} q-dialog__inner--${e.position} ${Ln[e.position]}`+(u.value?` q-dialog__inner--animating`:``)+(p.value===null?``:` q-dialog__inner--keyboard`)+(e.fullWidth?` q-dialog__inner--fullwidth`:``)+(e.fullHeight?` q-dialog__inner--fullheight`:``)+(e.square?` q-dialog__inner--square`:``)),le=A(()=>l.value&&!e.seamless),ue=A(()=>e.autoClose?{onClick:Ce}:{}),de=A(()=>`q-dialog fullscreen no-pointer-events q-dialog--${le.value?`modal`:`seamless`}`);m(()=>e.maximized,e=>{l.value&&Se(e)}),m(le,e=>{b(e),e?(Pn(L),Ze(be)):(Fn(L),Ke(be))});function I(){let{offsetTop:e,height:t,scale:n}=window.visualViewport,{innerHeight:r}=window;if(Math.abs(n-1)>.01||r-t<1){p.value=null;return}let i=Math.round(e),a=Math.round(r-e-t),o=p.value;(o===null||o.top!==i||o.bottom!==a)&&(p.value={top:i,bottom:a,height:Math.round(t)})}function fe(e){let t=e?`addEventListener`:`removeEventListener`;v=e,window.visualViewport?.[t](`resize`,I,ae.passive),window.visualViewport?.[t](`scroll`,I,ae.passive),e&&window.visualViewport!==void 0?I():p.value=null}function pe(){let t=p.value;return t===null?E():`${E()};--q-dialog-viewport-height:${t.height}px`+(e.position===`bottom`?``:`;top:${t.top}px`)+(e.position===`top`?``:`;bottom:${t.bottom}px`)}function me(t){oe(),te(),Se(e.maximized),k(),u.value=!0,o.platform.is.ios&&fe(!0),e.noFocus?C():(document.activeElement?.blur(),S(ve)),x(()=>{if(o.platform.is.ios){if(!e.seamless&&document.activeElement){let{top:e,bottom:t}=document.activeElement.getBoundingClientRect(),{innerHeight:n}=window,r=window.visualViewport?.height??n;e>0&&t>r/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-r,t>=n?1/0:Math.ceil(document.scrollingElement.scrollTop+t-r/2))),document.activeElement.scrollIntoView()}_=!0,c.value.click(),_=!1}k(!0),u.value=!1,r(`show`,t)})}function ge(e){C(),se(),xe(!0),u.value=!0,j(),re(e),x(()=>{j(!0),u.value=!1,r(`hide`,e)})}function _e(){ne()}function ve(e){$e(()=>{let t=c.value;if(t!==null&&t.contains!==void 0){if(e!==void 0){let n=t.querySelector(e);if(n!==null){n.focus({preventScroll:!0});return}}t.contains(document.activeElement)||(t=t.querySelector(`[autofocus][tabindex], [data-autofocus][tabindex]`)||t.querySelector(`[autofocus] [tabindex], [data-autofocus] [tabindex]`)||t.querySelector(`[autofocus], [data-autofocus]`)||t,t.focus({preventScroll:!0}))}})}function ye(e){e&&typeof e.focus==`function`?e.focus({preventScroll:!0}):ve(),r(`shake`);let t=c.value;t!==null&&(t.classList.remove(`q-animate--scale`),t.classList.add(`q-animate--scale`),h!==null&&clearTimeout(h),h=setTimeout(()=>{h=null,c.value!==null&&(t.classList.remove(`q-animate--scale`),ve())},170))}function be(t){e.seamless||(e.persistent||e.noEscDismiss?!e.maximized&&!e.noShake&&ye():(r(`escapeKey`),P(t)))}function xe(t){h!==null&&(clearTimeout(h),h=null),(t||l.value)&&(Se(!1),v&&fe(!1),e.seamless||(b(!1),Fn(L),Ke(be))),t||ne()}function Se(e){e?g||=(In<1&&document.body.classList.add(`q-body--dialog`),In++,!0):g&&=(In<2&&document.body.classList.remove(`q-body--dialog`),In--,!1)}function Ce(e){_||(P(e),r(`click`,e))}function we(t){t.button===0&&(!e.persistent&&!e.noBackdropDismiss?P(t):e.noShake||ye())}function L(t){!e.allowFocusOutside&&!M()&&!Ne(c.value,t.target)&&!We(c.value,t.target)&&ve(`[tabindex]:not([tabindex="-1"])`)}Object.assign(a.proxy,{focus:ve,shake:ye,__updateRefocusTarget:N,__adoptRefocusTarget:ie,__getAriaModalEl:()=>le.value?s.value:null}),O(xe);function Te(){return f(`div`,{ref:s,role:`dialog`,"aria-modal":le.value?`true`:`false`,...i,class:[de.value,i.class]},[f(he,{name:`q-transition--fade`,appear:!0},()=>le.value?f(`div`,{class:`q-dialog__backdrop fixed-full`,style:D.value,"aria-hidden":`true`,onMousedown:we}):null),f(he,w(),()=>l.value?f(`div`,{ref:c,class:ce.value,style:pe(),tabindex:-1,...ue.value},F(n.default)):null)])}return ee}});function Bn(e){"@babel/helpers - typeof";return Bn=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Bn(e)}function Vn(e,t){if(Bn(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Bn(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Hn(e){var t=Vn(e,`string`);return Bn(t)==`symbol`?t:t+``}function Un(e,t,n){return(t=Hn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn=Be(`migration`,()=>{let e=d({state:`idle`});async function t(){try{let t=await fetch(`/api/migration/status`);if(!t.ok)return;e.value=await t.json()}catch{}}function n(t){e.value={...t}}return{status:e,fetchInitial:t,update:n}}),Gn=typeof window<`u`,Kn=(e,t=!1)=>t?Symbol.for(e):Symbol(e),qn=(e,t,n)=>Jn({l:e,k:t,s:n}),Jn=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),R=e=>typeof e==`number`&&isFinite(e),Yn=e=>ar(e)===`[object Date]`,Xn=e=>ar(e)===`[object RegExp]`,Zn=e=>K(e)&&Object.keys(e).length===0,z=Object.assign,Qn=Object.create,B=(e=null)=>Qn(e),$n,er=()=>$n||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:B(),tr=Object.prototype.hasOwnProperty;function nr(e,t){return tr.call(e,t)}var V=Array.isArray,H=e=>typeof e==`function`,U=e=>typeof e==`string`,W=e=>typeof e==`boolean`,G=e=>typeof e==`object`&&!!e,rr=e=>G(e)&&H(e.then)&&H(e.catch),ir=Object.prototype.toString,ar=e=>ir.call(e),K=e=>ar(e)===`[object Object]`,or=e=>e==null?``:V(e)||K(e)&&e.toString===ir?JSON.stringify(e,null,2):String(e);function sr(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}function cr(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}function lr(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/\//g,`&#x2F;`).replace(/=/g,`&#x3D;`)}function ur(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}var dr=/^javascript:/i,fr=/^(?:href|src|action|formaction)$/i,pr=/&#(?:x([0-9a-f]+)|(\d+));?/gi,mr=/&(?:Tab|NewLine);/g,hr=/&colon;?/gi,gr=/[\u0000-\u0020\u007f-\u009f]/g,_r=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,vr=/(^|[\s"'<>/])on(\w+\s*=)/gi,yr=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function br(e,t,n){let r=t||n;if(!r)return e;let i=Number.parseInt(r,t?16:10);return i<=127?String.fromCharCode(i):e}function xr(e){let t=e.replace(pr,br).replace(mr,``).replace(hr,`:`).replace(gr,``);return dr.test(t)}function Sr(e){let t=/url\s*\(/gi,n=``,r=0,i;for(;(i=t.exec(e))!==null;){let a=i.index,o=t.lastIndex-1,s=o+1,c=1,l=null;for(;s<e.length;s++){let t=e[s];if(l){t===l&&(l=null);continue}if(t===`"`||t===`'`)l=t;else if(t===`(`)c++;else if(t===`)`&&(c--,c===0))break}if(c!==0)break;let u=e.slice(o+1,s).trim(),d=u.startsWith(`"`)&&u.endsWith(`"`)||u.startsWith(`'`)&&u.endsWith(`'`)?u.slice(1,-1).trim():u;n+=e.slice(r,a),n+=xr(d)?`url(about:blank)`:e.slice(a,s+1),r=s+1}return n+e.slice(r)}function Cr(e,t){return fr.test(e)&&xr(t)?`about:blank`:ur(e.toLowerCase()===`style`?Sr(t):t)}function wr(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${Cr(t,n)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${Cr(t,n)}'`),_r.test(e)&&(e=e.replace(vr,`$1&#111;n$2`)),e=e.replace(yr,(e,t,n,r)=>xr(r)?`${t}${n}about:blank`:e),e}var Tr=e=>!G(e)||V(e);function Er(e,t){if(Tr(e)||Tr(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{if(r===`__proto__`)return;let i=e[r];if(V(i)){let e=[];e.length=i.length,t[r]=e,n.push({src:i,des:e})}else G(i)?((!G(t[r])||V(t[r]))&&(t[r]=B()),n.push({src:i,des:t[r]})):t[r]=i})}}function Dr(e,t,n){return{line:e,column:t,offset:n}}function Or(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var q={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16};q.EXPECTED_TOKEN,q.INVALID_TOKEN_IN_PLACEHOLDER,q.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,q.UNKNOWN_ESCAPE_SEQUENCE,q.INVALID_UNICODE_ESCAPE_SEQUENCE,q.UNBALANCED_CLOSING_BRACE,q.UNTERMINATED_CLOSING_BRACE,q.EMPTY_PLACEHOLDER,q.NOT_ALLOW_NEST_PLACEHOLDER,q.INVALID_LINKED_FORMAT,q.MUST_HAVE_MESSAGES_IN_PLURAL,q.UNEXPECTED_EMPTY_LINKED_MODIFIER,q.UNEXPECTED_EMPTY_LINKED_KEY,q.UNEXPECTED_LEXICAL_ANALYSIS,q.UNHANDLED_CODEGEN_NODE_TYPE,q.UNHANDLED_MINIFIER_NODE_TYPE;function kr(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function Ar(e){throw e}var jr=` `,Mr=`\r`,Nr=`
3
3
  `,Pr=`\u2028`,Fr=`\u2029`;function Ir(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===Mr&&t[e+1]===Nr,s=e=>t[e]===Nr,c=e=>t[e]===Fr,l=e=>t[e]===Pr,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?Nr:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var Lr=void 0,Rr=`'`,zr=`tokenizer`;function Br(e,t={}){let n=t.location!==!1,r=Ir(e),i=()=>r.index(),a=()=>Dr(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();if(t.column+=r,t.offset+=r,u){let r=kr(e,n?Or(a.startLoc,t):null,{domain:zr,args:i});u(r)}}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=Or(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(q.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===jr||e.currentPeek()===Nr;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===Lr)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===Lr)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===Rr;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(n!==7&&n!==11)return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function T(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===jr||!t?!1:t===Nr?(e.peek(),r()):D(e,!1)},i=r();return e.resetPeek(),i}function E(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function D(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?r!==jr&&r!==Nr:i===jr?(e.peek(),n(!0,jr)):i!==Nr||(e.peek(),n(!0,Nr))},r=n();return t&&e.resetPeek(),r}function O(e,t){let n=e.currentChar();if(n!==Lr)return t(n)?(e.next(),n):null}function k(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function A(e){return O(e,k)}function j(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function M(e){return O(e,j)}function ee(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function te(e){return O(e,ee)}function N(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function ne(e){return O(e,N)}function re(e){let t=``,n=``;for(;t=te(e);)n+=t;return n}function ie(e){let t=``;for(;;){let n=e.currentChar();if(n===`\\`){let r=e.peek();r===`{`||r===`}`||r===`@`||r===`|`||r===`\\`?(t+=n+r,e.next(),e.next()):(e.resetPeek(),t+=n,e.next())}else if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;else if(n===jr||n===Nr){if(D(e))t+=n,e.next();else if(E(e))break;else t+=n,e.next()}else t+=n,e.next()}return t}function P(e){g(e);let t=``,n=``;for(;t=M(e);)n+=t;let r=e.currentChar();if(r&&r!==`}`&&r!==Lr&&r!==jr&&r!==Nr&&r!==` `){let t=ue(e);return d(q.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n+t),n+t}return e.currentChar()===Lr&&d(q.UNTERMINATED_CLOSING_BRACE,a(),0),n}function ae(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${re(e)}`):t+=re(e),e.currentChar()===Lr&&d(q.UNTERMINATED_CLOSING_BRACE,a(),0),t}function oe(e){return e!==Rr&&e!==Nr}function se(e){g(e),m(e,`'`);let t=``,n=``;for(;t=O(e,oe);)n+=t===`\\`?ce(e):t;let r=e.currentChar();return r===Nr||r===Lr?(d(q.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===Nr&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function ce(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return F(e,t,4);case`U`:return F(e,t,6);default:return d(q.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function F(e,t,n){m(e,t);let r=``;for(let i=0;i<n;i++){let n=ne(e);if(!n){d(q.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function le(e){return e!==`{`&&e!==`}`&&e!==jr&&e!==Nr}function ue(e){g(e);let t=``,n=``;for(;t=O(e,le);)n+=t;return n}function de(e){let t=``,n=``;for(;t=A(e);)n+=t;return n}function I(e){let t=n=>{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===jr?n:(n+=r,e.next(),t(n))};return t(``)}function fe(e){g(e);let t=m(e,`|`);return g(e),t}function pe(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(q.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(q.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(q.UNTERMINATED_CLOSING_BRACE,a(),0),n=me(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(E(e))return t.braceNest>0&&d(q.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,fe(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d(q.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,he(e,t);if(r=y(e,t))return n=f(t,4,P(e)),g(e),n;if(i=b(e,t))return n=f(t,5,ae(e)),g(e),n;if(o=x(e,t))return n=f(t,6,se(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,ue(e)),d(q.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function me(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===7||n===8||n===11||n===9)&&(i===Nr||i===jr)&&d(q.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return E(e)?(r=f(t,1,fe(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||w(e,t)?(g(e),me(e,t)):C(e,t)?(g(e),f(t,11,de(e))):T(e,t)?(g(e),i===`{`?pe(e,t)||r:f(t,10,I(e))):(n===7&&d(q.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,he(e,t))}}function he(e,t){let n={type:13};if(t.braceNest>0)return pe(e,t)||p(t);if(t.inLinked)return me(e,t)||p(t);switch(e.currentChar()){case`{`:return pe(e,t)||p(t);case`}`:return d(q.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return me(e,t)||p(t);default:if(E(e))return n=f(t,1,fe(e)),t.braceNest=0,t.inLinked=!1,n;if(D(e))return f(t,0,ie(e))}return n}function ge(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===Lr?f(c,13):he(r,c)}return{nextToken:ge,currentOffset:i,currentPosition:a,context:l}}var Vr=`parser`,Hr=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Ur=/\\([\\@{}|])/g;function Wr(e,t){return t}function Gr(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function Kr(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();if(s.offset+=a,s.column+=a,n){let e=kr(r,t?Or(i,s):null,{domain:Vr,args:o});n(e)}}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t.replace(Ur,Wr),a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(5,n,r);return o.index=parseInt(t,10),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function c(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(4,n,r);return o.key=t,e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(9,n,r);return o.value=t.replace(Hr,Gr),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,qr(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,q.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,qr(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,qr(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,qr(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,qr(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,qr(o)),n.key=l(e,o.value||``);break;default:{r(e,q.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=i(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let u=null;do{let i=u||e.nextToken();switch(u=null,i.type){case 0:i.value??r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,qr(i)),n.items.push(o(e,i.value||``));break;case 5:i.value??r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,qr(i)),n.items.push(s(e,i.value||``));break;case 4:i.value??r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,qr(i)),n.items.push(c(e,i.value||``));break;case 6:i.value??r(e,q.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,qr(i)),n.items.push(l(e,i.value||``));break;case 7:{let t=f(e);n.items.push(t.node),u=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);return a(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,q.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=Br(n,z({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,q.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function qr(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function Jr(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function Yr(e,t){for(let n=0;n<e.length;n++)Xr(e[n],t)}function Xr(e,t){switch(e.type){case 1:Yr(e.cases,t),t.helper(`plural`);break;case 2:Yr(e.items,t);break;case 6:Xr(e.key,t),t.helper(`linked`),t.helper(`type`);break;case 5:t.helper(`interpolate`),t.helper(`list`);break;case 4:t.helper(`interpolate`),t.helper(`named`)}}function Zr(e,t={}){let n=Jr(e);n.helper(`normalize`),e.body&&Xr(e.body,n);let r=n.context();e.helpers=Array.from(r.helpers)}function Qr(e){let t=e.body;return t.type===2?$r(t):t.cases.forEach(e=>$r(e)),e}function $r(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;n<e.items.length;n++){let r=e.items[n];if(r.type!==3&&r.type!==9||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=sr(t);for(let t=0;t<e.items.length;t++){let n=e.items[t];(n.type===3||n.type===9)&&delete n.value}}}}function ei(e){switch(e.t=e.type,e.type){case 0:{let t=e;ei(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,n=t.cases;for(let e=0;e<n.length;e++)ei(n[e]);t.c=n,delete t.cases;break}case 2:{let t=e,n=t.items;for(let e=0;e<n.length;e++)ei(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;ei(t.key),t.k=t.key,delete t.key,t.modifier&&(ei(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}}delete e.type}function ti(e,t){let{filename:n,breakLineCode:r,needIndent:i}=t,a=t.location!==!1,o={filename:n,code:``,column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:i,indentLevel:0};a&&e.loc&&(o.source=e.loc.source);let s=()=>o;function c(e,t){o.code+=e}function l(e,t=!0){let n=t?r:``;c(i?n+` `.repeat(e):n)}function u(e=!0){let t=++o.indentLevel;e&&l(t)}function d(e=!0){let t=--o.indentLevel;e&&l(t)}function f(){l(o.indentLevel)}return{context:s,push:c,indent:u,deindent:d,newline:f,helper:e=>`_${e}`,needIndent:()=>o.needIndent}}function ni(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),oi(e,t.key),t.modifier?(e.push(`, `),oi(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function ri(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n<i&&(oi(e,t.items[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}function ii(e,t){let{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n<i&&(oi(e,t.cases[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}}function ai(e,t){t.body?oi(e,t.body):e.push(`null`)}function oi(e,t){let{helper:n}=e;switch(t.type){case 0:ai(e,t);break;case 1:ii(e,t);break;case 2:ri(e,t);break;case 6:ni(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n(`interpolate`)}(${n(`list`)}(${t.index}))`,t);break;case 4:e.push(`${n(`interpolate`)}(${n(`named`)}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t)}}var si=(e,t={})=>{let n=U(t.mode)?t.mode:`normal`,r=U(t.filename)?t.filename:`message.intl`;t.sourceMap;let i=t.breakLineCode==null?n===`arrow`?`;`:`
4
- `:t.breakLineCode,a=t.needIndent?t.needIndent:n!==`arrow`,o=e.helpers||[],s=ti(e,{filename:r,breakLineCode:i,needIndent:a});s.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),s.indent(a),o.length>0&&(s.push(`const { ${sr(o.map(e=>`${e}: _${e}`),`, `)} } = ctx`),s.newline()),s.push(`return `),oi(s,e),s.deindent(a),s.push(`}`),delete e.helpers;let{code:c,map:l}=s.context();return{ast:e,code:c,map:l?l.toJSON():void 0}};function ci(e,t={}){let n=z({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null||n.optimize,o=Kr(n).parse(e);return r?(a&&Qr(o),i&&ei(o),{ast:o,code:``}):(Zr(o,n),si(o,n))}function li(){typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(er().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ui(e){return G(e)&&bi(e)===0&&(nr(e,`b`)||nr(e,`body`))}var di=[`b`,`body`];function fi(e){return Di(e,di)}var pi=[`c`,`cases`];function mi(e){return Di(e,pi,[])}var hi=[`s`,`static`];function gi(e){return Di(e,hi)}var _i=[`i`,`items`];function vi(e){return Di(e,_i,[])}var yi=[`t`,`type`];function bi(e){return Di(e,yi)}var xi=[`v`,`value`];function Si(e,t){let n=Di(e,xi);if(n!=null)return n;throw ki(t)}var Ci=[`m`,`modifier`];function wi(e){return Di(e,Ci)}var Ti=[`k`,`key`];function Ei(e){let t=Di(e,Ti);if(t)return t;throw ki(6)}function Di(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(nr(e,r)&&e[r]!=null)return e[r]}return n}var Oi=[...di,...pi,...hi,..._i,...Ti,...Ci,...xi,...yi];function ki(e){return Error(`unhandled node type: ${e}`)}function Ai(e){return t=>ji(t,e)}function ji(e,t){let n=fi(t);if(n==null)throw ki(0);if(bi(n)===1){let t=mi(n);return e.plural(t.reduce((t,n)=>[...t,Mi(e,n)],[]))}return Mi(e,n)}function Mi(e,t){let n=gi(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=vi(t).reduce((t,n)=>[...t,Ni(e,n)],[]);return e.normalize(n)}}function Ni(e,t){let n=bi(t);switch(n){case 3:return Si(t,n);case 9:return Si(t,n);case 4:{let r=t;if(nr(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(nr(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw ki(n)}case 5:{let r=t;if(nr(r,`i`)&&R(r.i))return e.interpolate(e.list(r.i));if(nr(r,`index`)&&R(r.index))return e.interpolate(e.list(r.index));throw ki(n)}case 6:{let n=t,r=wi(n),i=Ei(n);return e.linked(Ni(e,i),r?Ni(e,r):void 0,e.type)}case 7:return Si(t,n);case 8:return Si(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var Pi=e=>e,Fi=B();function Ii(e,t={}){let n=!1,r=t.onError||Ar;return t.onError=e=>{n=!0,r(e)},{...ci(e,t),detectError:n}}function Li(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&U(e)){W(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||Pi)(e),r=Fi[n];if(r)return r;let{ast:i,detectError:a}=Ii(e,{...t,location:!1,jit:!0}),o=Ai(i);return a?o:Fi[n]=o}{let t=e.cacheKey;return t?Fi[t]||(Fi[t]=Ai(e)):Ai(e)}}var Ri={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function zi(e){return kr(e,null,void 0)}Ri.INVALID_ARGUMENT,Ri.INVALID_DATE_ARGUMENT,Ri.INVALID_ISO_DATE_ARGUMENT,Ri.NOT_SUPPORT_NON_STRING_MESSAGE,Ri.NOT_SUPPORT_LOCALE_PROMISE_VALUE,Ri.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,Ri.NOT_SUPPORT_LOCALE_TYPE;function Bi(e,t){return t.locale==null?Hi(e.locale):Hi(t.locale)}var Vi;function Hi(e){if(U(e))return e;if(H(e)){if(e.resolvedOnce&&Vi!=null)return Vi;if(e.constructor.name===`Function`){let t=e();if(rr(t))throw zi(Ri.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Vi=t}throw zi(Ri.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw zi(Ri.NOT_SUPPORT_LOCALE_TYPE)}function Ui(e,t,n){return[...new Set([n,...V(t)?t:G(t)?Object.keys(t).filter(e=>e!=="default"):U(t)?[t]:[n]])]}function Wi(e,t,n){let r=U(n)?n:oa,i=e,a;G(t)?(i.__localeChainObjectCache||=new WeakMap,a=i.__localeChainObjectCache.get(t),a||(a=new Map,i.__localeChainObjectCache.set(t,a))):(i.__localeChainCache||=new Map,a=i.__localeChainCache.get(t),a||(a=new Map,i.__localeChainCache.set(t,a)));let o=a.get(r);if(o)return o;let s=[],c=[n];for(;V(c);)c=Gi(s,c,t);let l=V(t)||!K(t)?t:t.default?t.default:null;return c=U(l)?[l]:l,V(c)&&Gi(s,c,!1),a.set(r,s),s}function Gi(e,t,n){let r=!0;for(let i=0;i<t.length&&W(r);i++){let a=t[i];U(a)&&(r=Ki(e,t[i],n))}return r}function Ki(e,t,n){let r,i=t.split(`-`);do r=qi(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function qi(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(V(n)||K(n))&&n[i]&&(r=n[i])}return r}var Ji=[];Ji[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ji[1]={w:[1],".":[2],"[":[4],o:[7]},Ji[2]={w:[2],i:[3,0],0:[3,0]},Ji[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ji[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ji[5]={"'":[4,0],o:8,l:[5,0]},Ji[6]={'"':[4,0],o:8,l:[6,0]};var Yi=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Xi(e){return Yi.test(e)}function Zi(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function Qi(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function $i(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:Xi(t)?Zi(t):`*`+t}function ea(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=$i(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=Qi(a),d=Ji[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var ta=new Map;function na(e,t){return G(e)?e[t]:null}function ra(e,t){if(!G(e))return null;let n=ta.get(t);if(n||(n=ea(t),n&&ta.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(Oi.includes(e)&&ui(i)||!G(i)||!nr(i,e))return null;let t=i[e];if(t===void 0||H(i))return null;i=t,a++}return i}var ia={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,INVALID_NUMBER_ARGUMENT:8,INVALID_DATE_ARGUMENT:9};ia.NOT_FOUND_KEY,ia.FALLBACK_TO_TRANSLATE,ia.CANNOT_FORMAT_NUMBER,ia.FALLBACK_TO_NUMBER_FORMAT,ia.CANNOT_FORMAT_DATE,ia.FALLBACK_TO_DATE_FORMAT,ia.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER,ia.INVALID_NUMBER_ARGUMENT,ia.INVALID_DATE_ARGUMENT;var aa=`11.4.12`,oa=`en-US`,sa=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function ca(){return{upper:(e,t)=>t===`text`&&U(e)?e.toUpperCase():t===`vnode`&&G(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&U(e)?e.toLowerCase():t===`vnode`&&G(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&U(e)?sa(e):t===`vnode`&&G(e)&&`__v_isVNode`in e?sa(e.children):e}}var la;function ua(e){la=e}var da;function fa(e){da=e}var pa;function ma(e){pa=e}var ha=null,ga=e=>{ha=e},_a=()=>ha,va=0;function ya(e={}){let t=H(e.onWarn)?e.onWarn:cr,n=U(e.version)?e.version:aa,r=U(e.locale)||H(e.locale)?e.locale:oa,i=H(r)?oa:r,a=V(e.fallbackLocale)||K(e.fallbackLocale)||U(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=K(e.messages)?e.messages:ba(i),s=K(e.datetimeFormats)?e.datetimeFormats:ba(i),c=K(e.numberFormats)?e.numberFormats:ba(i),l=z(B(),e.modifiers,ca()),u=e.pluralRules||B(),d=H(e.missing)?e.missing:null,f=W(e.missingWarn)||Xn(e.missingWarn)?e.missingWarn:!0,p=W(e.fallbackWarn)||Xn(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=H(e.postTranslation)?e.postTranslation:null,_=K(e.processor)?e.processor:null,v=!W(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,b=H(e.messageCompiler)?e.messageCompiler:la,x=H(e.messageResolver)?e.messageResolver:da||na,S=H(e.localeFallbacker)?e.localeFallbacker:pa||Ui,C=G(e.fallbackContext)?e.fallbackContext:void 0,w=e,T=G(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,E=G(w.__numberFormatters)?w.__numberFormatters:new Map,D=G(w.__meta)?w.__meta:{};va++;let O={version:n,cid:va,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:C,onWarn:t,__meta:D};return O.datetimeFormats=s,O.numberFormats=c,O.__datetimeFormatters=T,O.__numberFormatters=E,O}var ba=e=>({[e]:B()});function xa(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return U(r)?r:t}return t}function Sa(e,t){let n=e;G(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function Ca(e,t,n){Sa(e,n),e.fallbackContext&&Sa(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function wa(e,t){return e!==t&&e.split(`-`)[0]===t.split(`-`)[0]}function Ta(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(wa(e,t[r]))return!0;return!1}function Ea(e,t,n,r,i,a,o){let{fallbackLocale:s,localeFallbacker:c,onWarn:l}=e,u=c(e,s,n);for(let n=0;n<u.length;n++){let a=u[n],s=(r[a]||{})[t];if(K(s)&&U(a))return a;xa(e,t,a,i,o)}return null}function Da(e,t,n){let r=`${e}__${t}`;return K(n)&&!Zn(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function Oa(e,t,n){for(let r in n){let n=`${t}__${r}`;for(let t of e.keys())(t===n||t.startsWith(`${n}__`))&&e.delete(t)}}function ka(e,t,n,r){let[,i,a,o]=e,s=n;return U(i)?t.key=i:K(i)&&Object.keys(i).forEach(e=>{r.includes(e)?s[e]=i[e]:t[e]=i[e]}),U(a)?t.locale=a:K(a)&&(s=a),K(o)&&(s=o),s}var Aa=typeof Intl<`u`;Aa&&Intl.DateTimeFormat,Aa&&Intl.NumberFormat;function ja(e,...t){let{datetimeFormats:n,unresolving:r,onWarn:i}=e,{__datetimeFormatters:a}=e;if(!U(t[0])&&!Yn(t[0])&&!R(t[0]))return``;let[o,s,c,l]=Na(...t),u=W(c.missingWarn)?c.missingWarn:e.missingWarn,d=W(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=Bi(e,c);if(!U(o)||o===``){let e=new Intl.DateTimeFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Ea(e,o,p,n,u,d,`datetime format`);if(!U(m))return r?-1:o;let h=n[m][o],g=Da(m,o,l),_=a.get(g);return _||(_=new Intl.DateTimeFormat(m,z({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var Ma=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function Na(...e){let[t]=e,n=B(),r=B(),i;if(U(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw zi(Ri.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();i=new Date(n);try{i.toISOString()}catch{throw zi(Ri.INVALID_ISO_DATE_ARGUMENT)}}else if(Yn(t)){if(isNaN(t.getTime()))throw zi(Ri.INVALID_DATE_ARGUMENT);i=t}else if(R(t))i=t;else throw zi(Ri.INVALID_ARGUMENT);let a=ka(e,n,r,Ma);return[n.key||``,i,n,a]}function Pa(e,t,n){Oa(e.__datetimeFormatters,t,n)}function Fa(e,...t){let{numberFormats:n,unresolving:r,onWarn:i}=e,{__numberFormatters:a}=e;if(!R(t[0]))return``;let[o,s,c,l]=La(...t),u=W(c.missingWarn)?c.missingWarn:e.missingWarn,d=W(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=Bi(e,c);if(!U(o)||o===``){let e=new Intl.NumberFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Ea(e,o,p,n,u,d,`number format`);if(!U(m))return r?-1:o;let h=n[m][o],g=Da(m,o,l),_=a.get(g);return _||(_=new Intl.NumberFormat(m,z({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var Ia=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function La(...e){let[t]=e,n=B(),r=B();if(!R(t))throw zi(Ri.INVALID_ARGUMENT);let i=t,a=ka(e,n,r,Ia);return[n.key||``,i,n,a]}function Ra(e,t,n){Oa(e.__numberFormatters,t,n)}var za=e=>e,Ba=e=>``,Va=`text`,Ha=e=>e.length===0?``:sr(e),Ua=or;function Wa(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function Ga(e){let t=R(e.pluralIndex)?e.pluralIndex:-1;return R(e.named?.count)?e.named.count:R(e.named?.n)?e.named.n:t}function Ka(e={}){let t=e.locale,n=Ga(e),r=U(t)&&H(e.pluralRules?.[t])?e.pluralRules[t]:Wa,i=r===Wa?void 0:Wa,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||B();R(e.pluralIndex)&&(c.count||=e.pluralIndex,c.n||=e.pluralIndex);let l=e=>c[e];function u(t,n){return(H(e.messages)?e.messages(t,!!n):G(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):Ba)}let d=t=>e.modifiers?e.modifiers[t]:za,f=H(e.processor?.normalize)?e.processor.normalize:Ha,p=H(e.processor?.interpolate)?e.processor.interpolate:Ua,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?G(n)?(a=n.modifier||a,i=n.type||i):U(n)&&(a=n||a):t.length===2&&(U(n)&&(a=n||a),U(r)&&(i=r||i));let o=u(e,!0)(m),s=o===``||o===void 0?e:o,c=i===`vnode`&&V(s)&&a?s[0]:s;return a?d(a)(c,i):c},message:u,type:U(e.processor?.type)?e.processor.type:Va,interpolate:p,normalize:f,values:z(B(),o,c)};return m}var qa=()=>``,Ja=e=>H(e);function Ya(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=eo(...t),u=W(l.missingWarn)?l.missingWarn:e.missingWarn,d=W(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=W(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=U(l.default)||W(l.default)?W(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(U(m)||H(m)),g=Bi(e,l);f&&Xa(l);let[_,v,y]=p?[c,g,s[g]||B()]:Za(e,c,g,o,d,u),b=_,x=c;if(!p&&!(U(b)||ui(b)||Ja(b))&&h&&(b=m,x=b),!p&&(!(U(b)||ui(b)||Ja(b))||!U(v)))return i?-1:c;let S=!1,C=Ja(b)?b:Qa(e,c,v,b,x,()=>{S=!0});if(S)return b;let w=$a(e,C,Ka(no(e,v,y,l))),T=r?r(w,c):w;return f&&U(T)&&(T=wr(T)),T}function Xa(e){V(e.list)?e.list=e.list.map(e=>U(e)?lr(e):e):G(e.named)&&Object.keys(e.named).forEach(t=>{U(e.named[t])&&(e.named[t]=lr(e.named[t]))})}function Za(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=B(),f,p=null;for(let n=0;n<u.length&&(f=u[n],d=o[f]||B(),(p=c(d,t))===null&&(p=d[t]),!(U(p)||ui(p)||Ja(p)));n++)if(!Ta(f,u)){let n=xa(e,t,f,a,`translate`);n!==t&&(p=n)}return[p,f,d]}function Qa(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(Ja(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=o(r,to(e,n,i,r,s,a));return c.locale=n,c.key=t,c.source=r,c}function $a(e,t,n){return t(n)}function eo(...e){let[t,n,r]=e,i=B();if(!U(t)&&!R(t)&&!Ja(t)&&!ui(t))throw zi(Ri.INVALID_ARGUMENT);let a=R(t)?String(t):(Ja(t),t);return R(n)?i.plural=n:U(n)?i.default=n:K(n)&&!Zn(n)?i.named=n:V(n)&&(i.list=n),R(r)?i.plural=r:U(r)?i.default=r:K(r)&&z(i,r),[a,i]}function to(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>qn(t,n,e)}}function no(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[n,,i]=Za(u||e,r,t,s,c,l);a=n??o(i,r)}if(U(a)||ui(a)){let n=!1,i=Qa(e,r,t,a,r,()=>{n=!0});return n?qa:i}return Ja(a)?a:qa}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),R(r.plural)&&(d.pluralIndex=r.plural),d}li();var ro=`11.4.12`;function io(){typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(er().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}var J={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function ao(e,...t){return kr(e,null,void 0)}J.UNEXPECTED_RETURN_TYPE,J.INVALID_ARGUMENT,J.MUST_BE_CALL_SETUP_TOP,J.NOT_INSTALLED,J.UNEXPECTED_ERROR,J.REQUIRED_VALUE,J.INVALID_VALUE,J.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN,J.NOT_INSTALLED_WITH_PROVIDE,J.NOT_COMPATIBLE_LEGACY_VUE_I18N,J.NOT_AVAILABLE_COMPOSITION_IN_LEGACY;var oo=Kn(`__translateVNode`),so=Kn(`__datetimeParts`),co=Kn(`__numberParts`),lo=Kn(`__setPluralRules`);Kn(`__intlifyMeta`);var uo=Kn(`__injectWithOption`),fo=Kn(`__dispose`),po={FALLBACK_TO_ROOT:10,NOT_FOUND_PARENT_SCOPE:11,IGNORE_OBJ_FLATTEN:12,DEPRECATE_LEGACY_MODE:13,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:14,DUPLICATE_USE_I18N_CALLING:15};po.FALLBACK_TO_ROOT,po.NOT_FOUND_PARENT_SCOPE,po.IGNORE_OBJ_FLATTEN,po.DEPRECATE_LEGACY_MODE,po.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE,po.DUPLICATE_USE_I18N_CALLING;var mo=null;{let e=er().__VUE_INSTANCE_SETTERS__;V(e)&&e.push(e=>{mo=e})}function ho(e){if(!G(e)||ui(e))return e;for(let t in e)if(nr(e,t)){if(!t.includes(`.`))G(e[t])&&ho(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=B()),!G(i[n[e]])){a=!0;break}i=i[n[e]]}if(a||(ui(i)?Oi.includes(n[r])||delete e[t]:(i[n[r]]=e[t],delete e[t])),!ui(i)){let e=i[n[r]];G(e)&&ho(e)}}}return e}function go(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=K(n)?n:V(r)?B():{[e]:B()};if(V(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||B(),Er(n,o[t])):Er(n,o)}else U(e)&&Er(JSON.parse(e),o)}),i==null&&a)for(let e in o)nr(o,e)&&ho(o[e]);return o}function _o(e){return e.type}function vo(e,t,n){let r=G(t.messages)?t.messages:B();`__i18nGlobal`in n&&(r=go(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),G(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(G(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function yo(e){return w(ee,null,e,0)}function bo(){return mo??T()}var xo=()=>[],So=()=>!1,Co=0;function wo(e){return((t,n,r,i)=>e(n,r,bo()||void 0,i))}function To(e={}){let{__root:n,__injectWithOption:r}=e,i=n===void 0,a=e.flatJson,o=Gn?d:t,s=!W(e.inheritLocale)||e.inheritLocale,c=o(n&&s?n.locale.value:U(e.locale)?e.locale:oa),l=o(n&&s?n.fallbackLocale.value:U(e.fallbackLocale)||V(e.fallbackLocale)||K(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:c.value),u=o(go(c.value,e)),f=o(K(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),p=o(K(e.numberFormats)?e.numberFormats:{[c.value]:{}}),h=n?n.missingWarn:W(e.missingWarn)||Xn(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:W(e.fallbackWarn)||Xn(e.fallbackWarn)?e.fallbackWarn:!0,_=n?n.fallbackRoot:!W(e.fallbackRoot)||e.fallbackRoot,v=!!e.fallbackFormat,y=H(e.missing)?e.missing:null,b=H(e.missing)?wo(e.missing):null,x=H(e.postTranslation)?e.postTranslation:null,S=n?n.warnHtmlMessage:!W(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter,w=n?n.modifiers:K(e.modifiers)?e.modifiers:{},T=e.pluralRules||n&&n.pluralRules,E;E=(()=>{i&&ga(null);let t={version:ro,locale:c.value,fallbackLocale:l.value,messages:u.value,modifiers:w,pluralRules:T,missing:b===null?void 0:b,missingWarn:h,fallbackWarn:g,fallbackFormat:v,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:S,escapeParameter:C,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=f.value,t.numberFormats=p.value,t.__datetimeFormatters=K(E)?E.__datetimeFormatters:void 0,t.__numberFormatters=K(E)?E.__numberFormatters:void 0;let n=ya(t);return i&&ga(n),n})(),Ca(E,c.value,l.value);function D(){return[c.value,l.value,u.value,f.value,p.value]}let O=A({get:()=>c.value,set:e=>{E.locale=e,c.value=e}});function k(e){i||(E.fallbackContext=n?_a():void 0);try{Ca(E,c.value,e)}finally{i||(E.fallbackContext=void 0)}}let j=A({get:()=>l.value,set:e=>{l.value=e,E.fallbackLocale=l.value,k(l.value)}}),M=A(()=>u.value),ee=A(()=>f.value),te=A(()=>p.value);function N(){return H(x)?x:null}function ne(e){x=e,E.postTranslation=e}function re(){return y}function ie(e){e!==null&&(b=wo(e)),y=e,E.missing=b}let P=(e,t,r,a,o,s)=>{D();let c;try{i||(E.fallbackContext=n?_a():void 0),c=e(E)}finally{i||(E.fallbackContext=void 0)}if(r!==`translate exists`&&R(c)&&c===-1||r===`translate exists`&&!c){let[e,r]=t();return n&&_?a(n):o(e)}if(s(c))return c;throw ao(J.UNEXPECTED_RETURN_TYPE)};function ae(...e){return P(t=>Reflect.apply(Ya,null,[t,...e]),()=>eo(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>U(e))}function oe(...e){let[t,n,r]=e;if(r&&!G(r))throw ao(J.INVALID_ARGUMENT);return ae(t,n,z({resolvedMessage:!0},r||{}))}function se(...e){return P(t=>Reflect.apply(ja,null,[t,...e]),()=>Na(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>U(e)||V(e))}function ce(...e){return P(t=>Reflect.apply(Fa,null,[t,...e]),()=>La(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>U(e)||V(e))}function F(e){return e.map(e=>U(e)||R(e)||W(e)?yo(String(e)):e)}let le={normalize:F,interpolate:e=>e,type:`vnode`};function ue(...e){return P(t=>{let n,r=t;try{r.processor=le,n=Reflect.apply(Ya,null,[r,...e])}finally{r.processor=null}return n},()=>eo(...e),`translate`,t=>t[oo](...e),e=>[yo(e)],e=>V(e))}function de(...e){return P(t=>Reflect.apply(Fa,null,[t,...e]),()=>La(...e),`number format`,t=>t[co](...e),xo,e=>U(e)||V(e))}function I(...e){return P(t=>Reflect.apply(ja,null,[t,...e]),()=>Na(...e),`datetime format`,t=>t[so](...e),xo,e=>U(e)||V(e))}function fe(e){T=e,E.pluralRules=T}function pe(e,t){return P(()=>{if(!e)return!1;let n=U(t)?t:c.value,r=U(t)?[n]:Wi(E,l.value,n);for(let t=0;t<r.length;t++){let n=ge(r[t]),i=E.messageResolver(n,e);if(i===null&&(i=n[e]),ui(i)||Ja(i)||U(i))return!0}return!1},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),So,e=>W(e))}function me(e){let t=null,n=Wi(E,l.value,c.value);for(let r=0;r<n.length;r++){let i=u.value[n[r]]||{},a=E.messageResolver(i,e);if(a!=null){t=a;break}}return t}function he(e){return me(e)??(n&&n.tm(e)||{})}function ge(e){return u.value[e]||{}}function _e(e,t){if(a){let n={[e]:t};for(let e in n)nr(n,e)&&ho(n[e]);t=n[e]}u.value[e]=t,E.messages=u.value}function ve(e,t){u.value[e]=u.value[e]||{};let n={[e]:t};if(a)for(let e in n)nr(n,e)&&ho(n[e]);t=n[e],Er(t,u.value[e]),E.messages=u.value}function ye(e){return f.value[e]||{}}function be(e,t){f.value[e]=t,E.datetimeFormats=f.value,Pa(E,e,t)}function xe(e,t){f.value[e]=z(f.value[e]||{},t),E.datetimeFormats=f.value,Pa(E,e,t)}function Se(e){return p.value[e]||{}}function Ce(e,t){p.value[e]=t,E.numberFormats=p.value,Ra(E,e,t)}function we(e,t){p.value[e]=z(p.value[e]||{},t),E.numberFormats=p.value,Ra(E,e,t)}Co++,m(l,()=>k(l.value),{deep:!0,flush:`sync`}),n&&Gn&&(m(n.locale,e=>{s&&(c.value=e,E.locale=e,Ca(E,c.value,l.value))}),m(n.fallbackLocale,e=>{s&&(l.value=e,E.fallbackLocale=l.value,Ca(E,c.value,l.value))}));let L={id:Co,locale:O,fallbackLocale:j,get inheritLocale(){return s},set inheritLocale(e){s=e,e&&n&&(O.value=n.locale.value,j.value=n.fallbackLocale.value)},get availableLocales(){return Object.keys(u.value).sort()},messages:M,get modifiers(){return w},get pluralRules(){return T||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(e){h=e,E.missingWarn=h},get fallbackWarn(){return g},set fallbackWarn(e){g=e,E.fallbackWarn=g},get fallbackRoot(){return _},set fallbackRoot(e){_=e},get fallbackFormat(){return v},set fallbackFormat(e){v=e,E.fallbackFormat=v},get warnHtmlMessage(){return S},set warnHtmlMessage(e){S=e,E.warnHtmlMessage=e},get escapeParameter(){return C},set escapeParameter(e){C=e,E.escapeParameter=e},t:ae,getLocaleMessage:ge,setLocaleMessage:_e,mergeLocaleMessage:ve,getPostTranslationHandler:N,setPostTranslationHandler:ne,getMissingHandler:re,setMissingHandler:ie,[lo]:fe};return L.datetimeFormats=ee,L.numberFormats=te,L.rt=oe,L.te=pe,L.tm=he,L.d=se,L.n=ce,L.getDateTimeFormat=ye,L.setDateTimeFormat=be,L.mergeDateTimeFormat=xe,L.getNumberFormat=Se,L.setNumberFormat=Ce,L.mergeNumberFormat=we,L[uo]=r,L[oo]=ue,L[so]=I,L[co]=de,L}var Eo={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function Do({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===M?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},B())}function Oo(){return M}var ko=N({name:`i18n-t`,props:z({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>R(e)||!isNaN(e)}},Eo),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||Bo({useScope:e.scope,__useComponent:!0});return()=>{let a=()=>{let r=Object.keys(n).filter(e=>e[0]!==`_`),a=B();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=U(e.plural)?+e.plural:e.plural);let o=Do(t,r);return i[oo](e.keypath,o,a)},o=z(B(),r),s=U(e.tag)||G(e.tag)?e.tag:Oo();return G(s)?f(s,o,{default:a}):f(s,o,a())}}});function Ao(e){return V(e)&&!U(e[0])}function jo(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t=()=>{let t={part:!0},a=B();e.locale&&(t.locale=e.locale),U(e.format)?t.key=e.format:G(e.format)&&(U(e.format.key)&&(t.key=e.format.key),a=Object.keys(e.format).reduce((t,r)=>n.includes(r)?z(B(),t,{[r]:e.format[r]}):t,B()));let o=r(e.value,t,a),s=[t.key];return V(o)?s=o.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:o}):[e.value];return Ao(r)&&(r[0].key=`${e.type}-${t}`),r}):U(o)&&(s=[o]),s},o=z(B(),a),s=U(e.tag)||G(e.tag)?e.tag:Oo();return G(s)?f(s,o,{default:t}):f(s,o,t())}}var Mo=N({name:`i18n-n`,props:z({value:{type:Number,required:!0},format:{type:[String,Object]}},Eo),setup(e,t){let n=e.i18n||Bo({useScope:e.scope,__useComponent:!0});return jo(e,t,Ia,(...e)=>n[co](...e))}});function No(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function Po(e){let t=t=>{let{instance:n,value:r}=t;if(!n||!n.$)throw ao(J.UNEXPECTED_ERROR);let i=No(e,n.$),a=Fo(r);return[Reflect.apply(i.t,i,[...Io(a)]),i]};return{created:(e,n)=>{let[r,i]=t(n);Gn&&(e.__i18nWatcher=m(i.locale,()=>{n.instance&&n.instance.$forceUpdate()})),e.__composer=i,e.textContent=r},unmounted:e=>{Gn&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=Fo(t);e.textContent=Reflect.apply(n.t,n,[...Io(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function Fo(e){if(U(e))return{path:e};if(K(e)){if(!(`path`in e))throw ao(J.REQUIRED_VALUE,`path`);return e}throw ao(J.INVALID_VALUE)}function Io(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return U(n)&&(o.locale=n),R(i)&&(o.plural=i),R(a)&&(o.plural=a),[t,s,o]}function Lo(e,t,...n){let r=K(n[0])?n[0]:{};(!W(r.globalInstall)||r.globalInstall)&&([ko.name,`I18nT`].forEach(t=>e.component(t,ko)),[Mo.name,`I18nN`].forEach(t=>e.component(t,Mo)),[Zo.name,`I18nD`].forEach(t=>e.component(t,Zo))),e.directive(`t`,Po(t))}var Ro=Kn(`global-vue-i18n`);function zo(e={}){let t=!W(e.globalInjection)||e.globalInjection,n=new Map,[r,i]=Vo(e,!1),a=Kn(``);function o(e){return n.get(e)||null}function s(e,t){n.set(e,t)}function c(e){n.delete(e)}let l={get mode(){return`composition`},async install(e,...n){if(e.__VUE_I18N_SYMBOL__=a,e.provide(e.__VUE_I18N_SYMBOL__,l),K(n[0])){let e=n[0];l.__composerExtend=e.__composerExtend,l.__vueI18nExtend=e.__vueI18nExtend}let r=null;t&&(r=Xo(e,l.global)),Lo(e,l,...n);let i=e.unmount;e.unmount=()=>{r&&r(),l.dispose(),i()}},get global(){return i},dispose(){r.stop()},__instances:n,__getInstance:o,__setInstance:s,__deleteInstance:c};return l}function Bo(e={}){let t=bo();if(t==null)throw ao(J.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ao(J.NOT_INSTALLED);let n=Ho(t),r=Wo(n),i=_o(t),a=Uo(e,i);if(a===`global`)return vo(r,e,i),r;if(a===`parent`){let i=Go(n,t,e.__useComponent);return i??=r,i}if(a===`isolated`){if(n.mode!==`composition`)throw ao(J.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);let i=n,a=z({},e);a.__root=Go(n,t)||r;let o=To(a);return i.__composerExtend&&(o[fo]=i.__composerExtend(o)),s()&&c(()=>{let e=o[fo];e&&(e(),delete o[fo])}),o}let o=n,l=o.__getInstance(t);if(l==null){let n=z({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),l=To(n),o.__composerExtend&&(l[fo]=o.__composerExtend(l)),qo(o,t,l),o.__setInstance(t,l)}return l}function Vo(e,t){let r=n(),i=r.run(()=>To(e));if(i==null)throw ao(J.UNEXPECTED_ERROR);return[r,i]}function Ho(e){let t=x(e.isCE?Ro:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ao(e.isCE?J.NOT_INSTALLED_WITH_PROVIDE:J.UNEXPECTED_ERROR);return t}function Uo(e,t){return Zn(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function Wo(e){return e.mode===`composition`?e.global:e.global.__composer}function Go(e,t,n=!1){let r=null,i=t.root,a=Ko(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`&&(r=t.__getInstance(a)),r!=null||i===a)break;a=a.parent}return r}function Ko(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function qo(e,t,n){y(()=>{},t),p(()=>{let r=n;e.__deleteInstance(t);let i=r[fo];i&&(i(),delete r[fo])},t)}var Jo=[`locale`,`fallbackLocale`,`availableLocales`],Yo=[`t`,`rt`,`d`,`n`,`tm`,`te`];function Xo(e,t){let n=Object.create(null);return Jo.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw ao(J.UNEXPECTED_ERROR);let i=l(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,Yo.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw ao(J.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,Yo.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}var Zo=N({name:`i18n-d`,props:z({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Eo),setup(e,t){let n=e.i18n||Bo({useScope:e.scope,__useComponent:!0});return jo(e,t,Ma,(...e)=>n[so](...e))}});io(),ua(Li),fa(ra),ma(Wi);var Qo={class:`text-h6`},$o={class:`text-h6`},es={class:`text-h6 text-negative`},ts={class:`q-mt-sm`},ns={key:0,class:`q-mt-md text-caption`},rs={class:`q-mt-md text-caption`},is=N({__name:`MigrationOverlay`,setup(e){let{t}=Bo(),n=Wn(),r=A(()=>[`backing-up`,`running`,`error`].includes(n.status.state));return y(()=>{n.fetchInitial()}),(e,i)=>(h(),E(zn,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,persistent:``,"no-backdrop-dismiss":``},{default:C(()=>[w(Qt,{style:{"min-width":`400px`}},{default:C(()=>[o(n).status.state===`backing-up`?(h(),E(Jt,{key:0},{default:C(()=>[te(`div`,Qo,u(o(t)(`migration.backing_up`)),1),w(Fe,{class:`q-mt-md`})]),_:1})):o(n).status.state===`running`?(h(),E(Jt,{key:1},{default:C(()=>[te(`div`,$o,u(o(t)(`migration.running`,{processed:o(n).status.processed,total:o(n).status.total})),1),w(Zt,{value:o(n).status.total>0?o(n).status.processed/o(n).status.total:0,class:`q-mt-md`},null,8,[`value`])]),_:1})):o(n).status.state===`error`?(h(),E(Jt,{key:2},{default:C(()=>[te(`div`,es,u(o(t)(`migration.error`)),1),te(`div`,ts,u(o(n).status.errorMessage),1),o(n).status.backupPath?(h(),j(`div`,ns,u(o(t)(`migration.backup_location`,{path:o(n).status.backupPath})),1)):D(``,!0),te(`div`,rs,u(o(t)(`migration.retry`)),1)]),_:1})):D(``,!0)]),_:1})]),_:1},8,[`modelValue`]))}});function as(e){if(e.codePointAt(0)!==111||e.codePointAt(1)!==110)return!1;let t=e.codePointAt(2);return t>=65&&t<=90}function os(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let r of n)if(e[r]!==t[r]||!(r in t))return!0;return!1}function ss(){let e=T(),{attrs:t}=e,n={listeners:d({}),attributes:d({})};function r(){let r={},i={};for(let e in t)e!==`class`&&e!==`style`&&!as(e)&&(r[e]=t[e]);for(let t in e.vnode.props)as(t)&&(i[t]=e.vnode.props[t]);os(r,n.attributes.value)&&(n.attributes.value=r),os(i,n.listeners.value)&&(n.listeners.value=i)}return g(r),r(),n}function cs({validate:e,resetValidation:t,requiresQForm:n}){let r=x(ie,!1);if(r!==!1){let{props:n,proxy:i}=T();Object.assign(i,{validate:e,resetValidation:t}),m(()=>n.disable,e=>{e?(typeof t==`function`&&t(),r.unbindComponent(i)):r.bindComponent(i)}),y(()=>{n.disable||r.bindComponent(i)}),O(()=>{n.disable||r.unbindComponent(i)})}else n&&console.error(`Parent QForm not found on useFormChild()!`)}var ls=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,us=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,ds=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,fs=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,ps=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0(\.[\d]+)?|1(\.0+)?)\)$/,ms=/^-?[\d]+\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])$/,hs=/^([0-1]?\d|2[0-3]):[0-5]\d$/,gs=/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/,_s=/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/,vs=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ys={date:e=>ms.test(e),time:e=>hs.test(e),fulltime:e=>gs.test(e),timeOrFulltime:e=>_s.test(e),email:e=>vs.test(e),hexColor:e=>ls.test(e),hexaColor:e=>us.test(e),hexOrHexaColor:e=>ds.test(e),rgbColor:e=>fs.test(e),rgbaColor:e=>ps.test(e),rgbOrRgbaColor:e=>fs.test(e)||ps.test(e),hexOrRgbColor:e=>ls.test(e)||fs.test(e),hexaOrRgbaColor:e=>us.test(e)||ps.test(e),anyColor:e=>ds.test(e)||fs.test(e)||ps.test(e)},bs=[!0,!1,`ondemand`],xs={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>bs.includes(e)}};function Ss(e,t){let{props:n,proxy:r}=T(),i=d(!1),a=d(null),o=d(!1);cs({validate:y,resetValidation:v});let s=0,c,l=!1,u=!1,f=A(()=>n.rules!==void 0&&n.rules!==null&&n.rules.length!==0),p=A(()=>!n.disable&&f.value&&!t.value),h=A(()=>n.error===!0||i.value),g=A(()=>typeof n.errorMessage==`string`&&n.errorMessage.length!==0?n.errorMessage:a.value);m(()=>n.modelValue,()=>{o.value=!0,p.value&&(n.lazyRules===!1||n.lazyRules===!0&&i.value)&&b()});function _(){n.lazyRules!==`ondemand`&&p.value&&o.value&&b()}m(()=>n.reactiveRules,e=>{e?c===void 0&&(c=m(()=>n.rules,_,{immediate:!0,deep:!0})):c!==void 0&&(c(),c=void 0)},{immediate:!0}),m(()=>n.lazyRules,_),m(e,e=>{e?o.value=!0:n.lazyRules!==`ondemand`&&(p.value?b():!n.disable&&f.value&&t.value&&(u=!0))});function v(){s++,t.value=!1,o.value=!1,i.value=!1,a.value=null,u=!1,b.cancel()}function y(e=n.modelValue){if(n.disable||!f.value)return!0;let r=++s,c=n.modelValue;u=!1;let d=()=>{let e=u;u=!1,!l&&n.modelValue!==c&&p.value&&n.lazyRules!==`ondemand`&&(n.lazyRules===!1||i.value||e)&&b()},m=t.value?()=>{}:()=>{o.value=!0},h=(e,n)=>{e&&m(),i.value=e,a.value=n||null,t.value=!1},g=[];for(let t=0;t<n.rules.length;t++){let r=n.rules[t],i;if(typeof r==`function`?i=r(e,ys):typeof r==`string`&&(ys[r]===void 0?(console.error(`Unknown validation pattern rule: "${r}"`),i=!1):i=ys[r](e)),i===!1||typeof i==`string`)return h(!0,i),!1;i!==!0&&i!==void 0&&g.push(i)}return g.length===0?(h(!1),!0):(t.value=!0,Promise.all(g).then(e=>{if(e===void 0||!Array.isArray(e)||e.length===0)return r===s&&(h(!1),d()),!0;let t=e.find(e=>e===!1||typeof e==`string`);return r===s&&(h(t!==void 0,t),d()),t===void 0},e=>(r===s&&(console.error(e),h(!0),d()),!1)))}let b=de(y,0);return O(()=>{l=!0,c?.(),b.cancel()}),Object.assign(r,{resetValidation:v,validate:y}),Ae(r,`hasError`,()=>h.value),{isDirtyModel:o,hasRules:f,hasError:h,errorMessage:g,validate:y,resetValidation:v}}function Cs(e){return e!=null&&String(e).length!==0}var ws={...Re,...xs,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String,maxlength:[Number,String]},Ts=[`update:modelValue`,`clear`,`focus`,`blur`];function Es({requiredForAttr:e=!0,tagProp:n,changeEvent:r=!1}={}){let{props:i}=T(),a=ze(i,Le()),o=Qe({required:e,getValue:()=>i.for});return{requiredForAttr:e,changeEvent:r,tag:n?{get value(){return i.tag}}:{value:`label`},isDark:a,editable:A(()=>!i.disable&&!i.readonly),innerLoading:d(!1),focused:d(!1),hasPopupOpen:!1,splitAttrs:ss(),targetUid:o,rootRef:t(null),targetRef:t(null),controlRef:t(null)}}var Ds={class:`q-field__prepend q-field__marginal row no-wrap items-center`,key:`prepend`,onClick:fe},Os={class:`q-field__append q-field__marginal row no-wrap items-center`,key:`append`,onClick:fe},ks=`input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), a[href], [tabindex]:not([disabled]), [contenteditable]:not([contenteditable="false"])`,As={class:`q-field__control-container col relative-position row no-wrap q-anchor--skip`},js={class:`q-field__prefix no-pointer-events row items-center`},Ms={class:`q-field__suffix no-pointer-events row items-center`},Ns={class:`q-field__inner relative-position col self-stretch`},Ps={class:`q-field__before q-field__marginal row no-wrap items-center`,onClick:fe},Fs={class:`q-field__after q-field__marginal row no-wrap items-center`,onClick:fe},Is={};function Ls(e,t){return t===null?null:f(`div`,{key:e,class:`q-field__append q-field__marginal row no-wrap items-center q-anchor--skip`},t)}function Rs(e){let{props:t,emit:n,slots:r,attrs:i,proxy:a}=T(),o=Le(),s=null;e.hasValue===void 0&&(e.hasValue=A(()=>Cs(t.modelValue))),e.emitValue===void 0&&(e.emitValue=e=>{n(`update:modelValue`,e)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:N,onFocusout:ne,onPopupShow:re,onPopupHide:ie}),Object.assign(e,{clearValue:P,onControlFocusin:N,onControlFocusout:ne,focus:M}),e.computedCounter===void 0&&(e.computedCounter=A(()=>{if(t.counter){let e=typeof t.modelValue==`string`||typeof t.modelValue==`number`?String(t.modelValue).length:Array.isArray(t.modelValue)?t.modelValue.length:0,n=t.maxlength===void 0?t.maxValues:t.maxlength;return e+(n===void 0?``:` / `+n)}}));let{isDirtyModel:c,hasRules:l,hasError:u,errorMessage:d,resetValidation:p}=Ss(e.focused,e.innerLoading),m=A(()=>u.value&&e.targetUid.value?`${e.targetUid.value}_error`:void 0);function h(e){if(u.value!==!0)return Is;let n={"aria-invalid":`true`};return m.value!==void 0&&(!t.hideBottomSpace||t.counter||r.counter!==void 0||d.value!==null||r.error!==void 0)&&(n[`aria-errormessage`]=e?.[`aria-errormessage`]===void 0?m.value:e[`aria-errormessage`],n[`aria-describedby`]=e?.[`aria-describedby`]===void 0?m.value:`${e[`aria-describedby`]} ${m.value}`),n}Object.assign(e,{hasError:u,errorMessage:d,errorMessageId:m,getErrorAriaAttrs:h});let g=e.floatingLabel===void 0?A(()=>t.stackLabel||e.focused.value||e.hasValue.value):A(()=>t.stackLabel||e.focused.value||e.floatingLabel.value),b=A(()=>t.bottomSlots||t.hint!==void 0||l.value||t.counter||t.error!==null),x=A(()=>`q-field row no-wrap items-start q-field--`+(t.filled?`filled`:t.outlined?`outlined`:t.borderless?`borderless`:t.standout?`standout`:`standard`)+(e.fieldClass===void 0?``:` ${e.fieldClass.value}`)+(t.rounded?` q-field--rounded`:``)+(t.square?` q-field--square`:``)+(g.value?` q-field--float`:``)+(C.value?` q-field--labeled`:``)+(t.dense?` q-field--dense`:``)+(t.itemAligned?` q-field--item-aligned q-item-type`:``)+(e.isDark()?` q-field--dark`:``)+(e.getControl===void 0?` q-field--auto-height`:``)+(e.focused.value?` q-field--focused`:``)+(u.value?` q-field--error`:``)+(u.value||e.focused.value?` q-field--highlighted`:``)+(!t.hideBottomSpace&&b.value?` q-field--with-bottom`:``)+(t.disable?` q-field--disabled`:t.readonly?` q-field--readonly`:``)),S=A(()=>`q-field__control relative-position row no-wrap`+(t.bgColor===void 0?``:` bg-${t.bgColor}`)+(u.value?` text-negative`:typeof t.standout==`string`&&t.standout.length!==0&&e.focused.value?` ${t.standout}`:t.color===void 0?``:` text-${t.color}`)),C=A(()=>t.labelSlot||t.label!==void 0),w=A(()=>`q-field__label no-pointer-events absolute ellipsis`+(t.labelColor!==void 0&&!u.value?` text-${t.labelColor}`:``)),E=A(()=>Ae({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:g.value,modelValue:t.modelValue,emitValue:e.emitValue,ariaInvalid:u.value===!0?`true`:void 0,ariaDescribedby:m.value,ariaErrormessage:m.value},`field`,()=>e.rootRef.value)),D=A(()=>{let n={};return e.targetUid.value&&(n.for=e.targetUid.value),t.disable&&(n[`aria-disabled`]=`true`),n});function j(){let t=document.activeElement,n=e.targetRef?.value;n&&(t===null||t.id!==e.targetUid.value)&&(n.hasAttribute(`tabindex`)||(n=n.querySelector(`[tabindex]`)),n!==t&&n?.focus({preventScroll:!0}))}function M(){$e(j)}function ee(t){let n=t.target,r=e.targetUid.value===null?null:document.getElementById(e.targetUid.value);if(!(r!==null&&n.contains(r)&&(r.focus({preventScroll:!0}),document.activeElement===r))){for(let e of n.querySelectorAll(ks))if(e.focus({preventScroll:!0}),document.activeElement===e)return}}function te(){qe(j);let t=document.activeElement;t!==null&&e.rootRef.value.contains(t)&&t.blur()}function N(r){s!==null&&(clearTimeout(s),s=null),!t.disable&&!e.focused.value&&(e.focused.value=!0,n(`focus`,r))}function ne(t,r){s!==null&&clearTimeout(s),s=setTimeout(()=>{s=null,!(document.hasFocus()&&(e.hasPopupOpen||e.controlRef===void 0||e.controlRef.value===null||e.controlRef.value.contains(document.activeElement)))&&(e.focused.value&&(e.focused.value=!1,n(`blur`,t)),r?.())},0)}function re(t){e.hasPopupOpen=!0,N(t)}function ie(t){e.hasPopupOpen=!1,ne(t)}function P(r){_e(r),o.platform.is.mobile?e.rootRef.value.contains(document.activeElement)&&document.activeElement.blur():(e.targetRef?.value||e.rootRef.value).focus(),t.type===`file`&&(e.inputRef.value.value=null),e.onClear?.(),n(`update:modelValue`,null),e.changeEvent&&n(`change`,null),n(`clear`,t.modelValue),v(()=>{let e=c.value;p(),c.value=e})}function ae(e){[13,32].includes(e.keyCode)&&P(e)}function oe(){let n=[];r.prepend!==void 0&&n.push(f(`div`,Ds,r.prepend())),n.push(f(`div`,As,se())),u.value&&!t.noErrorIcon&&n.push(Ls(`error`,[f(Ce,{name:o.iconSet.field.error,color:`negative`})]));let i=t.loading||e.innerLoading.value?r.loading===void 0?e.shouldHideLoadingIndicator?.()?null:[f(Fe,{color:t.color})]:r.loading():null;return i===null?t.clearable&&e.hasValue.value&&e.editable.value&&n.push(Ls(`inner-clearable-append`,[f(Ce,{class:`q-field__focusable-action`,name:t.clearIcon||o.iconSet.field.clear,tabindex:0,role:`button`,"aria-hidden":`false`,"aria-label":o.lang.label.clear,onKeyup:ae,onClick:P})])):n.push(Ls(`inner-loading-append`,i)),r.append!==void 0&&n.push(f(`div`,Os,r.append())),e.getInnerAppend!==void 0&&n.push(Ls(`inner-append`,e.getInnerAppend())),e.getControlChild!==void 0&&n.push(e.getControlChild()),n}function se(){let n=[];return t.prefix!==void 0&&t.prefix!==null&&n.push(f(`div`,js,t.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value&&n.push(e.getShadowControl()),C.value&&n.push(f(`div`,{class:w.value},F(r.label,t.label))),e.getControl===void 0?r.rawControl===void 0?r.control!==void 0&&n.push(f(`div`,{ref:e.targetRef,class:`q-field__native row`,tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus||void 0,onFocus:ee},r.control(E.value))):n.push(r.rawControl()):n.push(e.getControl()),t.suffix!==void 0&&t.suffix!==null&&n.push(f(`div`,Ms,t.suffix)),n.concat(F(r.default))}let ce=null,le=!1;function ue(){let n,i;u.value?d.value===null?(n=F(r.error),i=`q--slot-error`):(n=[f(`div`,{role:`alert`},d.value)],i=`q--slot-error-${d.value}`):(!t.hideHint||e.focused.value)&&(t.hint===void 0?(n=F(r.hint),i=`q--slot-hint`):(n=[f(`div`,t.hint)],i=`q--slot-hint-${t.hint}`));let a=t.counter||r.counter!==void 0;if(!t.hideBottomSpace||a||n!==void 0)return i!==ce&&(le=ce!==null,ce=i),f(`div`,{class:`q-field__bottom row items-start q-field__bottom--`+(t.hideBottomSpace?`stale`:`animated`),onClick:fe},[f(`div`,{key:i,id:u.value===!0?m.value:void 0,class:`q-field__messages col`+(le&&!t.hideBottomSpace?` q-field__messages--animated`:``)},n),a?f(`div`,{class:`q-field__counter`},r.counter===void 0?e.computedCounter.value:r.counter()):null])}let de=!1;return _(()=>{de=!0}),k(()=>{de&&t.autofocus&&a.focus()}),t.autofocus&&y(()=>{a.focus()}),O(()=>{s!==null&&clearTimeout(s)}),Object.assign(a,{focus:M,blur:te}),function(){let n=e.getControl===void 0&&r.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus||void 0,...D.value}:D.value;return f(e.tag.value,{ref:e.rootRef,class:[x.value,i.class],style:i.style,...n},[r.before===void 0?null:f(`div`,Ps,r.before()),f(`div`,Ns,[f(`div`,{ref:e.controlRef,class:S.value,tabindex:-1,...e.controlEvents},oe()),b.value?ue():null]),r.after===void 0?null:f(`div`,Fs,r.after())])}}var zs={date:`####/##/##`,datetime:`####/##/## ##:##`,time:`##:##`,fulltime:`##:##:##`,phone:`(###) ### - ####`,card:`#### #### #### ####`},Bs={"[\\d]":e=>{let t=e.codePointAt(0);return t>47&&t<58},"[a-zA-Z]":e=>{let t=e.codePointAt(0);return t>64&&t<91||t>96&&t<123},"[0-9a-zA-Z]":e=>{let t=e.codePointAt(0);return t>47&&t<58||t>64&&t<91||t>96&&t<123}},{tokenMap:Vs,tokenKeys:Hs}=Us({"#":{pattern:`[\\d]`,negate:`[^\\d]`},S:{pattern:`[a-zA-Z]`,negate:`[^a-zA-Z]`},N:{pattern:`[0-9a-zA-Z]`,negate:`[^0-9a-zA-Z]`},A:{pattern:`[a-zA-Z]`,negate:`[^a-zA-Z]`,transform:e=>e.toLocaleUpperCase()},a:{pattern:`[a-zA-Z]`,negate:`[^a-zA-Z]`,transform:e=>e.toLocaleLowerCase()},X:{pattern:`[0-9a-zA-Z]`,negate:`[^0-9a-zA-Z]`,transform:e=>e.toLocaleUpperCase()},x:{pattern:`[0-9a-zA-Z]`,negate:`[^0-9a-zA-Z]`,transform:e=>e.toLocaleLowerCase()}});function Us(e){let t=Object.keys(e),n={};return t.forEach(t=>{let r=e[t],i;if(Object.hasOwn(Bs,r.pattern))i=Bs[r.pattern];else{let e=new RegExp(r.pattern);i=t=>e.test(t)}n[t]={...r,test:i}}),{tokenMap:n,tokenKeys:t}}function Ws(e){return RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|(["+e.join(``)+`])|(.)`,`g`)}var Gs=[`insertText`,`deleteContentBackward`,`deleteContentForward`,`deleteWordBackward`,`deleteWordForward`,`deleteByCut`],Ks=/[.*+?^${}()|[\]\\]/g,qs=Ws(Hs),Y=String.fromCodePoint(1),Js={mask:String,reverseFillMask:Boolean,fillMask:[Boolean,String],unmaskedValue:Boolean,maskTokens:Object};function Ys(e,t,n,r,i){let a,o,s,c,l,u,f,p=A(()=>{if(e.maskTokens===void 0||e.maskTokens===null)return{tokenMap:Vs,tokenRegexMask:qs};let{tokenMap:t}=Us(e.maskTokens),n={...Vs,...t};return{tokenMap:n,tokenRegexMask:Ws(Object.keys(n))}}),h=d(null),g=d(y());function _(){return e.autogrow||[`textarea`,`text`,`search`,`url`,`tel`,`password`].includes(e.type)}m(()=>e.type+e.autogrow,x),m(()=>e.mask,n=>{if(n!==void 0)w(g.value,!0);else{let n=ee(h.value?te(g.value,f):g.value);x(),e.modelValue!==n&&t(`update:modelValue`,n)}}),m(()=>e.fillMask+e.reverseFillMask,()=>{h.value&&w(g.value,!0)}),m(()=>e.unmaskedValue,()=>{h.value&&w(g.value)}),m(()=>e.maskTokens,()=>{h.value&&w(g.value,!0)},{deep:!0});function y(){if(x(),h.value){let t=k(ee(e.modelValue));return f=t.length,e.fillMask===!1?t:N(t)}return f=0,e.modelValue}function b(e){if(e<a.length)return a.slice(-e);let t=``,n=a,r=n.indexOf(Y);if(r!==-1){for(let r=e-n.length;r>0;r--)t+=Y;n=n.slice(0,r)+t+n.slice(r)}return n}function x(){if(h.value=e.mask!==void 0&&e.mask.length!==0&&_(),!h.value){c=void 0,a=``,o=``;return}let t=zs[e.mask]===void 0?e.mask:zs[e.mask],n=typeof e.fillMask==`string`&&e.fillMask.length!==0?e.fillMask.slice(0,1):`_`,r=n.replace(Ks,String.raw`\$&`),i=[],l=[],u=[],d=e.reverseFillMask,f=``,m=``;t.replace(p.value.tokenRegexMask,(e,t,n,r,a)=>{if(r!==void 0){let e=p.value.tokenMap[r];u.push(e),m=e.negate,d&&=(l.push({c:e,overflow:!0}),!1),l.push({c:e});return}if(n!==void 0)f=`\\`+(n===`\\`?``:n),u.push(n);else{let e=t===void 0?a:t;f=e===`\\`?String.raw`\\\\`:e.replace(Ks,String.raw`\\$&`),u.push(e)}i.push(`([^`+f+`]+)?`+f+`?`)});let g=[...new Set(u.filter(e=>typeof e!=`string`).map(({pattern:e})=>e))],v=RegExp(`^`+i.join(``)+`(`+(f===``?`.`:`[^`+f+`]`)+`+)?`+(f===``?``:`[`+f+`]*`)+`$`),y=l.length-1,b=g.length===1?m:`(?:`+g.map(e=>`(?!`+e+`)`).join(``)+String.raw`[\s\S])`,x=({c:e,overflow:t})=>t===!0?`(?:`+b+`+)?(`+e.pattern+`+)?(?:`+b+`+)?(`+e.pattern+`+)?`:`(?:`+b+`+)?(`+e.pattern+`)?`,S=l.map((t,n)=>{let i=x(t);return n===0&&e.reverseFillMask?RegExp(`^`+r+`*`+i):RegExp(n===y?`^`+i+`(`+(m===``?`.`:m)+`+)?`+(e.reverseFillMask?`$`:r+`*`):`^`+i)});s=u,c=t=>{let n=v.exec(e.reverseFillMask?t:t.slice(0,u.length+1));n!==null&&(t=n.slice(1).join(``));let r=[],i=S.length;for(let e=0,n=t;e<i;e++){let t=S[e].exec(n);if(t===null)break;n=n.slice(t.shift().length),r.push(...t)}return r.length===0?t:r.join(``)},a=u.map(e=>typeof e==`string`?e:Y).join(``),o=a.split(Y).join(n)}function S(t,n){let r=t.length,i=e.reverseFillMask?b(r):a,o=e.reverseFillMask?s.length-r:0,c=e.reverseFillMask?0:Math.min(n,r),l=e.reverseFillMask?r-n:r;return e=>{if(i[e]!==Y||e>=c&&e<l)return!1;let n=s[o+e];return n===void 0||typeof n==`string`||n.test(t[e])}}function C(e,t,n){let r=S(e,n),i=0;for(let e=0;e<t;e++)r(e)&&i++;return i}function w(t,s,c){let u=r.value,d=u?.selectionEnd??0,p=u===null?0:u.value.length-d,m=s!==!0&&typeof g.value==`string`&&Gs.includes(c)?M(g.value,f,t,c):ee(t),h;s===!0&&u!==null&&a.length!==0&&(h=C(u.value,d,f)),s===!0&&x();let _=k(m,s),y=e.fillMask===!1?_:N(_),b=_.length,S=g.value!==y,w=S||b!==f;f=b;let T=e.fillMask!==!1&&b===0;u!==null&&u.value!==y&&(u.value=y),S&&(g.value=y),u!==null&&document.activeElement===u&&v(()=>{if(T){let t=e.reverseFillMask?o.length:0;u.setSelectionRange(t,t,`forward`);return}if(h!==void 0){let e=0,t=0;for(;e<y.length&&t<h;)t=C(y,e+1,b),e++;u.setSelectionRange(e,e,`forward`);return}if(c===`insertFromPaste`&&!e.reverseFillMask){let e=u.selectionEnd,t=d-1;for(let n=l;n<=t&&n<e;n++)a[n]!==Y&&t++;E.right(u,t);return}if([`deleteContentBackward`,`deleteContentForward`].includes(c)){let t=e.reverseFillMask?d===0?+(y.length>_.length):Math.max(0,y.length-(T?0:Math.min(_.length,p)+1))+1:d;u.setSelectionRange(t,t,`forward`);return}if(e.reverseFillMask){if(w){let e=Math.max(0,y.length-(T?0:Math.min(_.length,p+1)));e===1&&d===1?u.setSelectionRange(e,e,`forward`):E.rightReverse(u,e)}else{let e=y.length-p;u.setSelectionRange(e,e,`backward`)}}else if(w){let e=Math.max(0,a.indexOf(Y),Math.min(_.length,d)-1);E.right(u,e)}else{let e=d-1;E.right(u,e)}});let D=e.unmaskedValue?ee(_):y;String(e.modelValue)!==D&&(e.modelValue!==null||D!==``)?n(D,!0):i!==void 0&&i()}function T(e,t,n){let r=k(ee(e.value));t=Math.max(0,a.indexOf(Y),Math.min(r.length,t)),l=t,e.setSelectionRange(t,n,`forward`)}let E={left(e,t){let n=!a.slice(t-1).includes(Y),r=Math.max(0,t-1);for(;r>=0;r--)if(a[r]===Y){t=r,n&&t++;break}if(r<0&&a[t]!==void 0&&a[t]!==Y)return E.right(e,0);t>=0&&e.setSelectionRange(t,t,`backward`)},right(e,t){let n=e.value.length,r=Math.min(n,t+1);for(;r<=n;r++)if(a[r]===Y){t=r;break}else a[r-1]===Y&&(t=r);if(r>n&&a[t-1]!==void 0&&a[t-1]!==Y)return E.left(e,n);e.setSelectionRange(t,t,`forward`)},leftReverse(e,t){let n=b(e.value.length),r=Math.max(0,t-1);for(;r>=0;r--)if(n[r-1]===Y){t=r;break}else if(n[r]===Y&&(t=r,r===0))break;if(r<0&&n[t]!==void 0&&n[t]!==Y)return E.rightReverse(e,0);t>=0&&e.setSelectionRange(t,t,`backward`)},rightReverse(e,t){let n=e.value.length,r=b(n),i=!r.slice(0,t+1).includes(Y),a=Math.min(n,t+1);for(;a<=n;a++)if(r[a-1]===Y){t=a,t>0&&i&&t--;break}if(a>n&&r[t-1]!==void 0&&r[t-1]!==Y)return E.leftReverse(e,n);e.setSelectionRange(t,t,`forward`)}};function D(e){t(`click`,e),u=void 0}function O(n){if(t(`keydown`,n),n.defaultPrevented||n.altKey||le(n))return;let i=r.value,a=i.selectionStart,o=i.selectionEnd;if(n.shiftKey||(u=void 0),n.keyCode===37||n.keyCode===39){n.shiftKey&&u===void 0&&(u=i.selectionDirection===`forward`?a:o);let t=E[(n.keyCode===39?`right`:`left`)+(e.reverseFillMask?`Reverse`:``)];if(n.preventDefault(),t(i,u===a?o:a),n.shiftKey){let e=i.selectionStart;i.setSelectionRange(Math.min(u,e),Math.max(u,e),`forward`)}}else n.keyCode===8&&!e.reverseFillMask&&a===o?(E.left(i,a),i.setSelectionRange(i.selectionStart,o,`backward`)):n.keyCode===46&&e.reverseFillMask&&a===o&&(E.rightReverse(i,o),i.setSelectionRange(a,i.selectionEnd,`forward`))}function k(t,n){if(t==null||t===``)return``;if(e.reverseFillMask)return j(t,n);let r=s,i=0,a=``;for(let e=0;e<r.length;e++){let o=t[i],s=r[e];if(typeof s==`string`)a+=s,n===!0&&o===s&&i++;else if(o!==void 0&&s.test(o))a+=s.transform===void 0?o:s.transform(o),i++;else return a}return a}function j(e,t){let n=s,r=a.indexOf(Y),i=e.length-1,o=``,c=``;for(let a=n.length-1;a>=0&&i!==-1;a--){let s=n[a],l=e[i];if(typeof s==`string`)c=s+c,t===!0&&l===s&&i--;else if(l!==void 0&&s.test(l)){o=c+o,c=``;do o=(s.transform===void 0?l:s.transform(l))+o,i--,l=e[i];while(r===a&&l!==void 0&&s.test(l))}else return o}return o}function M(t,n,r,i){let a=t.length,o=r.length,c=Math.min(a,o),l=0;for(;l<c&&t[l]===r[l];)l++;let u=0;for(;u<c-l&&t[a-1-u]===r[o-1-u];)u++;let d=S(t,n),f=``,p=``;for(let e=0;e<l;e++)d(e)&&(f+=t[e]);for(let e=a-u;e<a;e++)d(e)&&(p+=t[e]);let m=``,h=r.slice(l,o-u);if(h.length!==0){if(e.reverseFillMask)for(let e of h)s.some(t=>typeof t!=`string`&&t.test(e))&&(m+=e);else{let e=s.filter(e=>typeof e!=`string`),t=f.length;for(let n of h)e[t]!==void 0&&e[t].test(n)&&(m+=n,t++)}}else if(!e.reverseFillMask&&l+u<a){let e=!1;for(let t=l;t<a-u;t++)if(d(t)){e=!0;break}e||(i===`deleteContentForward`?p=p.slice(1):f=f.slice(0,-1))}return f+m+p}function ee(e){return typeof e!=`string`||c===void 0?typeof e==`number`?c(String(e)):e:c(e)}function te(t,n){return n>=t.length?t:e.reverseFillMask?t.slice(t.length-n):t.slice(0,n)}function N(t){return o.length-t.length<=0?t:e.reverseFillMask&&t.length!==0?o.slice(0,-t.length)+t:t+o.slice(t.length)}return{innerValue:g,hasMask:h,moveCursorForPaste:T,updateMaskValue:w,onMaskedKeydown:O,onMaskedClick:D}}var Xs=typeof CSS>`u`||CSS.supports(`field-sizing`,`content`)?void 0:Zs;function Zs(e,t,n,r){let i=null;function a(){i!==null&&(cancelAnimationFrame(i),i=null)}function o(){i===null&&(i=requestAnimationFrame(()=>{i=null;let e=n.value;if(e!==null){let t=e.parentNode.style,{scrollTop:n}=e,{overflowY:i,maxHeight:a}=r.platform.is.firefox?{}:window.getComputedStyle(e),o=i!==void 0&&i!==`scroll`;o&&(e.style.overflowY=`hidden`),t.marginBottom=e.scrollHeight-1+`px`,e.style.height=`1px`,e.style.height=e.scrollHeight+`px`,o&&(e.style.overflowY=Number.parseInt(a,10)<e.scrollHeight?`auto`:`hidden`),t.marginBottom=``,e.scrollTop=n}}))}return m(()=>e.autogrow,e=>{if(e)v(o);else if(n.value!==null){a();let{style:e}=n.value;e.overflowY=``,e.height=t.rows>0?`auto`:``}}),m(()=>e.dense,()=>{e.autogrow&&v(o)}),y(()=>{e.autogrow&&o()}),O(a),o}function Qs(e,t){function n(){let t=e.modelValue;try{let e=new DataTransfer;return Object(t)===t&&(`length`in t?[...t]:[t]).forEach(t=>{e.items.add(t)}),{files:e.files}}catch{return{files:void 0}}}return A(t?()=>{if(e.type===`file`)return n()}:n)}var $s=/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFF9F\u4E00-\u9FAF\u3400-\u4DBF]/,ec=/[\u4E00-\u9FFF\u3400-\u4DBF\u{20000}-\u{2A6DF}\u{2A700}-\u{2B73F}\u{2B740}-\u{2B81F}\u{2B820}-\u{2CEAF}\uF900-\uFAFF\u3300-\u33FF\uFE30-\uFE4F\uF900-\uFAFF\u{2F800}-\u{2FA1F}]/u,tc=/[\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]/,nc=/[a-z0-9_ -]$/i;function rc(e){return function(t){if(t.type===`compositionend`||t.type===`change`){if(!t.target.qComposing)return;t.target.qComposing=!1,e(t)}else t.type===`compositionupdate`&&!t.target.qComposing&&typeof t.data==`string`&&(pe.is.firefox?!nc.test(t.data):$s.test(t.data)||ec.test(t.data)||tc.test(t.data))&&(t.target.qComposing=!0)}}var ic=Me({name:`QInput`,inheritAttrs:!1,props:{...ws,...Js,...rt,modelValue:[String,Number,FileList],modelModifiers:Object,shadowText:String,type:{type:String,default:`text`},debounce:[String,Number],autogrow:Boolean,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},emits:[...Ts,`paste`,`change`,`keydown`,`click`,`animationend`],setup(e,{emit:n,attrs:r}){let{proxy:i}=T(),a=Le(),o={},s=NaN,c=!1,l=!1,u=null,d,p=t(null),h=at(e),{innerValue:g,hasMask:_,moveCursorForPaste:y,updateMaskValue:b,onMaskedKeydown:x,onMaskedClick:S}=Ys(e,n,F,p,()=>{le(),delete o.value}),C=Qs(e,!0),w=A(()=>Cs(g.value)),E=rc(se);function D(e){if(_.value&&e.type===`compositionstart`){e.target.qComposing=!0;return}E(e)}let k=Es({changeEvent:!0}),j=A(()=>e.type===`textarea`||e.autogrow),M=Xs?.(e,r,p,a),ee=A(()=>j.value||[`text`,`search`,`url`,`tel`,`password`].includes(e.type)),te=A(()=>{let t={...k.splitAttrs.listeners.value,onInput:se,onPaste:oe,onChange:de,onBlur:I,onFocus:ne};return t.onCompositionstart=t.onCompositionupdate=t.onCompositionend=D,_.value&&(t.onKeydown=x,t.onClick=S),M&&e.autogrow&&(t.onAnimationend=ce),t}),N=A(()=>{let t={tabindex:0,"data-autofocus":e.autofocus||void 0,rows:e.type===`textarea`?6:void 0,"aria-label":e.label,name:h(),...k.splitAttrs.attributes.value,id:k.targetUid.value,maxlength:e.maxlength,disabled:e.disable,readonly:e.readonly};return j.value||(t.type=e.type),e.autogrow&&(t.rows=1),t});m(()=>e.type,()=>{p.value&&(p.value.value=e.modelValue)}),m(()=>e.modelValue,t=>{if(d!==void 0&&(le(),c=!1,l=!1,delete o.value),_.value){if(l&&(l=!1,String(t)===s))return;b(t)}else g.value!==t&&(g.value=t,e.type===`number`&&Object.hasOwn(o,`value`)&&(c?c=!1:delete o.value),e.modelModifiers?.trim===!0&&Object.hasOwn(o,`value`)&&(typeof o.value!=`string`||o.value.trim()!==t)&&delete o.value);M&&e.autogrow&&v(M)});function re(){let e=document.activeElement;p.value!==null&&p.value!==e&&(e===null||e.id!==k.targetUid.value)&&p.value.focus({preventScroll:!0})}function ie(){$e(re)}function P(){qe(re);let e=document.activeElement;e!==null&&k.rootRef.value.contains(e)&&e.blur()}function ae(){p.value?.select()}function oe(t){if(_.value&&e.reverseFillMask!==!0){let e=t.target;y(e,e.selectionStart,e.selectionEnd)}n(`paste`,t)}function se(t){if(!t||!t.target)return;if(e.type===`file`){n(`update:modelValue`,t.target.files);return}let r=t.target.value;if(t.target.qComposing){o.value=r;return}if(_.value)b(r,!1,t.inputType);else if(e.modelModifiers?.trim===!0&&(o.value=r),F(r),ee.value&&t.target===document.activeElement){let{selectionStart:e,selectionEnd:n}=t.target;e!==void 0&&n!==void 0&&v(()=>{t.target===document.activeElement&&r.indexOf(t.target.value)===0&&t.target.setSelectionRange(e,n)})}M&&e.autogrow&&M()}function ce(e){n(`animationend`,e),M()}function F(t,r){d=()=>{u=null,e.type!==`number`&&(e.modelModifiers?.trim!==!0||_.value)&&Object.hasOwn(o,`value`)&&delete o.value,e.modelValue!==t&&s!==t&&(s=t,r===!0&&(l=!0),n(`update:modelValue`,t),v(()=>{s===t&&(s=NaN)})),d=void 0},e.type===`number`&&(c=!0,o.value=t);let i=()=>{_.value?delete o.value:o.value=t};e.modelModifiers?.lazy===!0?i():e.debounce===void 0?d():(u!==null&&clearTimeout(u),i(),u=setTimeout(d,e.debounce))}function le(){u!==null&&(clearTimeout(u),u=null),d=void 0}function ue(){le(),c=!1,l=!1,delete o.value}function de(e){D(e),u!==null&&(clearTimeout(u),u=null),d?.(),n(`change`,e.target.value)}function I(t){t!==void 0&&ne(t),u!==null&&(clearTimeout(u),u=null),d?.(),c=!1,l=!1,delete o.value,e.type!==`file`&&setTimeout(()=>{p.value!==null&&(p.value.value=g.value===void 0?``:g.value)},0)}function fe(){return Object.hasOwn(o,`value`)?o.value:g.value===void 0?``:g.value}O(()=>{I()}),Object.assign(k,{innerValue:g,fieldClass:A(()=>`q-${j.value?`textarea`:`input`}`+(e.autogrow?` q-textarea--autogrow`:``)),hasShadow:A(()=>e.type!==`file`&&typeof e.shadowText==`string`&&e.shadowText.length!==0),inputRef:p,emitValue:F,onClear:ue,hasValue:w,floatingLabel:A(()=>w.value&&(e.type!==`number`||Number.isFinite(Number(g.value)))||Cs(e.displayValue)),getControl:()=>{let t=N.value;return f(j.value?`textarea`:`input`,{ref:p,class:[`q-field__native q-placeholder`,e.inputClass],style:e.inputStyle,...t,...k.getErrorAriaAttrs(t),...te.value,...e.type===`file`?C.value:{value:fe()}})},getShadowControl:()=>f(`div`,{class:`q-field__native q-field__shadow absolute-bottom no-pointer-events`+(j.value?``:` text-no-wrap`)},[f(`span`,{class:`invisible`},fe()),f(`span`,e.shadowText)])});let pe=Rs(k);return Object.assign(i,{focus:ie,blur:P,select:ae,getNativeElement:()=>p.value}),Ae(i,`nativeEl`,()=>p.value),pe}}),ac=Me({name:`QCardActions`,props:{...ke,vertical:Boolean},setup(e,{slots:t}){let n=Te(e),r=A(()=>`q-card__actions ${n()} q-card__actions--${e.vertical?`vert column`:`horiz row`}`);return()=>f(`div`,{class:r.value},F(t.default))}}),oc=`kobo:network-token`;function sc(){try{return localStorage.getItem(oc)}catch{return null}}function cc(e){try{localStorage.setItem(oc,e),window.dispatchEvent(new Event(`kobo:auth-token-changed`))}catch{}}function lc(e){try{let t=new URL(e,window.location.origin);return t.origin===window.location.origin&&t.pathname.startsWith(`/api/`)}catch{return typeof e==`string`&&e.startsWith(`/api/`)}}function uc(e,t){return t?`${e}${e.includes(`?`)?`&`:`?`}token=${encodeURIComponent(t)}`:e}var dc=d(!1);function fc(){dc.value=!0}function pc(){dc.value=!1}var mc={class:`text-h6`},hc={class:`text-caption text-kobo-3 q-mt-sm`},gc=N({__name:`NetworkLoginDialog`,setup(e){let{t}=Bo(),n=A({get:()=>dc.value,set:e=>{e||pc()}}),r=d(``),i=d(!1),a=d(!1),s=d(``);async function c(){let e=r.value.trim();if(e){i.value=!0,a.value=!1;try{let n=await fetch(`/api/settings/network/ping`,{headers:{"X-Kobo-Token":e}});if(n.ok){cc(e),pc(),window.location.reload();return}s.value=n.status===401?t(`network.login.invalid`):t(`network.login.serverError`),a.value=!0}catch{s.value=t(`network.login.unreachable`),a.value=!0}finally{i.value=!1}}}return(e,l)=>(h(),E(zn,{modelValue:n.value,"onUpdate:modelValue":l[1]||=e=>n.value=e,persistent:``},{default:C(()=>[w(Qt,{style:{"min-width":`320px`,"max-width":`90vw`}},{default:C(()=>[w(Jt,null,{default:C(()=>[te(`div`,mc,u(o(t)(`network.login.title`)),1),te(`div`,hc,u(o(t)(`network.login.description`)),1)]),_:1}),w(Jt,null,{default:C(()=>[w(ic,{modelValue:r.value,"onUpdate:modelValue":l[0]||=e=>r.value=e,label:o(t)(`network.login.tokenLabel`),placeholder:o(t)(`network.login.tokenPlaceholder`),error:a.value,"error-message":s.value,autofocus:``,dense:``,outlined:``,onKeyup:ye(c,[`enter`])},null,8,[`modelValue`,`label`,`placeholder`,`error`,`error-message`])]),_:1}),w(ac,{align:`right`},{default:C(()=>[w(je,{label:o(t)(`network.login.connect`),color:`primary`,loading:i.value,unelevated:``,onClick:c},null,8,[`label`,`loading`])]),_:1})]),_:1})]),_:1},8,[`modelValue`]))}}),_c=new WeakMap;function vc(e){return _c.get(e)}function yc(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{...t}]))}function bc(e){let t=new Set,n=m(()=>e.queuedMessages,()=>{for(let n of t)n(yc(e.queuedMessages))},{deep:!0,flush:`sync`});return{queue:(...t)=>e.queueMessage(...t),cancel:(...t)=>e.cancelQueuedMessage(...t),flush:(...t)=>e.flushQueuedMessage(...t),subscribe(n){return t.add(n),n(yc(e.queuedMessages)),()=>{t.delete(n)}},dispose(){n(),t.clear()}}}function xc(e,t){_c.set(e,t);let n=t.subscribe(t=>{e.queuedMessages=t});return()=>{n(),_c.delete(e)}}var Sc=Be(`templates`,{state:()=>({templates:[],defaultSlugs:[],loading:!1,loaded:!1}),getters:{isDefault:e=>t=>e.defaultSlugs.includes(t)},actions:{async fetchTemplates(){if(!this.loading){this.loading=!0;try{let e=await fetch(`/api/templates`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();this.templates=t.templates,this.defaultSlugs=t.defaultSlugs??[],this.loaded=!0}catch(e){console.error(`[templates store] fetchTemplates failed:`,e)}finally{this.loading=!1}}},async createTemplate(e){let t=await fetch(`/api/templates`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}let n=await t.json();return this.templates.push(n),n},async updateTemplate(e,t){let n=await fetch(`/api/templates/${encodeURIComponent(e)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json(),i=this.templates.findIndex(t=>t.slug===e);return i>=0&&(this.templates[i]=r),r},async reloadDefaults(){let e=await fetch(`/api/templates/reload-defaults`,{method:`POST`});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??`HTTP ${e.status}`)}let t=await e.json();return t.added.length>0&&await this.fetchTemplates(),t},async deleteTemplate(e){let t=await fetch(`/api/templates/${encodeURIComponent(e)}`,{method:`DELETE`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}this.templates=this.templates.filter(t=>t.slug!==e)},async resetToDefault(e){let t=await fetch(`/api/templates/${encodeURIComponent(e)}/reset-default`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({error:`Reset failed`}));throw Error(e.error??`Reset failed`)}let{template:n}=await t.json(),r=this.templates.findIndex(t=>t.slug===e);return r>=0?this.templates[r]=n:this.templates.push(n),n}}}),Cc=Me({name:`QAvatar`,props:{...re,fontSize:String,color:String,textColor:String,icon:String,square:Boolean,rounded:Boolean},setup(e,{slots:t}){let n=A(()=>`q-avatar`+(e.color?` bg-${e.color}`:``)+(e.textColor?` text-${e.textColor} q-chip--colored`:``)+(e.square?` q-avatar--square`:e.rounded?` rounded-borders`:``)),r=A(()=>e.fontSize?{fontSize:e.fontSize}:null);return()=>{let i=e.icon===void 0?void 0:[f(Ce,{name:e.icon})],a={class:n.value};return e.size!==void 0&&(a.style=Se(e.size)),f(`div`,a,[f(`div`,{class:`q-avatar__content row flex-center overflow-hidden`,style:r.value},Ie(t.default,i))])}}}),wc=0,Tc={},Ec={},Dc={},Oc={},kc=/^\s*$/,Ac=[],jc=[void 0,null,!0,!1,``],Mc=[`top-left`,`top-right`,`bottom-left`,`bottom-right`,`top`,`bottom`,`left`,`right`,`center`],Nc=[`top-left`,`top-right`,`bottom-left`,`bottom-right`],Pc={positive:{icon:e=>e.iconSet.type.positive,color:`positive`},negative:{icon:e=>e.iconSet.type.negative,color:`negative`},warning:{icon:e=>e.iconSet.type.warning,color:`warning`,textColor:`dark`},info:{icon:e=>e.iconSet.type.info,color:`info`},ongoing:{group:!1,timeout:0,spinner:!0,color:`grey-8`}};function Fc(e,t,n){if(!e)return Rc(`parameter required`);let r,a={textColor:`white`};if(e.ignoreDefaults||Object.assign(a,Tc),Rt(e)||(a.type&&Object.assign(a,Pc[a.type]),e={message:e}),Object.assign(a,Pc[e.type||a.type],e),typeof a.icon==`function`&&(a.icon=a.icon(t)),a.spinner=a.spinner?a.spinner===!0?Fe:i(a.spinner):!1,a.meta={hasMedia:!!(a.spinner||a.icon||a.avatar),hasText:Lc(a.message)||Lc(a.caption)},a.position){if(!Mc.includes(a.position))return Rc(`wrong position`,e)}else a.position=`bottom`;if(jc.includes(a.timeout))a.timeout=5e3;else{let t=Number.parseFloat(a.timeout);if(!Number.isFinite(t)||t<0)return Rc(`wrong timeout`,e);a.timeout=t}a.timeout===0?a.progress=!1:a.progress&&(a.meta.progressClass=`q-notification__progress`+(a.progressClass?` ${a.progressClass}`:``),a.meta.progressStyle={animationDuration:`${a.timeout+1e3}ms`});let o=[...Array.isArray(e.actions)?e.actions:[],...!e.ignoreDefaults&&Array.isArray(Tc.actions)?Tc.actions:[],...Array.isArray(Pc[e.type]?.actions)?Pc[e.type].actions:[]],{closeBtn:s}=a;if(s&&o.push({label:typeof s==`string`?s:t.lang.label.close}),a.actions=o.map(({handler:e,noDismiss:t,...n})=>({flat:!0,...n,onClick:typeof e==`function`?()=>{e(),t||c()}:()=>{c()}})),a.multiLine===void 0&&(a.multiLine=a.actions.length>1),Object.assign(a.meta,{class:`q-notification row items-stretch q-notification--${a.multiLine?`multi-line`:`standard`}`+(a.color===void 0?``:` bg-${a.color}`)+(a.textColor===void 0?``:` text-${a.textColor}`)+(a.classes===void 0?``:` ${a.classes}`),wrapperClass:`q-notification__wrapper col relative-position border-radius-inherit `+(a.multiLine?`column no-wrap justify-center`:`row items-center`),contentClass:`q-notification__content row items-center`+(a.multiLine?``:` col`),leftClass:a.meta.hasText?`additional`:`single`,attrs:{role:`alert`,...a.attrs}}),a.group===!1?(a.group=void 0,a.meta.group=void 0):((a.group===void 0||a.group===!0)&&(a.group=[a.message,a.caption,a.multiLine,...a.actions.map(e=>`${e.label}*${e.icon}`)].join(`|`)),a.meta.group=a.group+`|`+a.position),a.actions.length===0?a.actions=void 0:a.meta.actionsClass=`q-notification__actions row items-center `+(a.multiLine?`justify-end`:`col-auto`)+(a.meta.hasMedia?` q-notification__actions--with-media`:``),n!==void 0){n.notif.meta.timer&&(clearTimeout(n.notif.meta.timer),n.notif.meta.timer=void 0),a.meta.uid=n.notif.meta.uid;let e=Dc[a.position].value.indexOf(n.notif);Dc[a.position].value[e]=a}else{let t=Ec[a.meta.group];if(t===void 0){if(a.meta.uid=wc++,a.meta.badge=1,[`left`,`right`,`center`].includes(a.position))Dc[a.position].value.splice(Math.floor(Dc[a.position].value.length/2),0,a);else{let e=a.position.includes(`top`)?`unshift`:`push`;Dc[a.position].value[e](a)}a.group!==void 0&&(Ec[a.meta.group]=a)}else{if(t.meta.timer&&(clearTimeout(t.meta.timer),t.meta.timer=void 0),a.badgePosition!==void 0){if(!Nc.includes(a.badgePosition))return Rc(`wrong badgePosition`,e)}else a.badgePosition=`top-${a.position.includes(`left`)?`right`:`left`}`;a.meta.uid=t.meta.uid,a.meta.badge=t.meta.badge+1,a.meta.badgeClass=`q-notification__badge q-notification__badge--${a.badgePosition}`+(a.badgeColor===void 0?``:` bg-${a.badgeColor}`)+(a.badgeTextColor===void 0?``:` text-${a.badgeTextColor}`)+(a.badgeClass?` ${a.badgeClass}`:``);let n=Dc[a.position].value.indexOf(t);Dc[a.position].value[n]=Ec[a.meta.group]=a}}let c=()=>{Ic(a),r=void 0};if(a.timeout>0&&(a.meta.timer=setTimeout(()=>{a.meta.timer=void 0,c()},a.timeout+1e3)),a.group!==void 0)return t=>{t===void 0?c():Rc(`trying to update a grouped one which is forbidden`,e)};if(r={dismiss:c,config:e,notif:a},n!==void 0){Object.assign(n,r);return}return e=>{r!==void 0&&(e===void 0?r.dismiss():Fc({...r.config,...e,group:!1,position:a.position},t,r))}}function Ic(e){e.meta.timer&&(clearTimeout(e.meta.timer),e.meta.timer=void 0);let t=Dc[e.position].value.indexOf(e);if(t!==-1){e.group!==void 0&&delete Ec[e.meta.group];let n=Ac[String(e.meta.uid)];if(n){let{width:e,height:t}=getComputedStyle(n);n.style.left=`${n.offsetLeft}px`,n.style.width=e,n.style.height=t}Dc[e.position].value.splice(t,1),typeof e.onDismiss==`function`&&e.onDismiss()}}function Lc(e){return e!=null&&!kc.test(e)}function Rc(e,t){return console.error(`Notify: ${e}`,t),!1}function zc(){return Me({name:`QNotifications`,devtools:{hide:!0},setup(){return()=>f(`div`,{class:`q-notifications`},Mc.map(e=>f(we,{key:e,class:Oc[e],tag:`div`,name:`q-notification--${e}`},()=>Dc[e].value.map(e=>{let t=e.meta,n=[];if(t.hasMedia&&(e.spinner?n.push(f(e.spinner,{class:`q-notification__spinner q-notification__spinner--`+t.leftClass,color:e.spinnerColor,size:e.spinnerSize})):e.icon?n.push(f(Ce,{class:`q-notification__icon q-notification__icon--`+t.leftClass,name:e.icon,color:e.iconColor,size:e.iconSize,role:`img`})):e.avatar&&n.push(f(Cc,{class:`q-notification__avatar q-notification__avatar--`+t.leftClass},()=>f(`img`,{src:e.avatar,"aria-hidden":`true`})))),t.hasText){let t,r={class:`q-notification__message col`};if(e.html)r.innerHTML=e.caption?`<div>${e.message}</div><div class="q-notification__caption">${e.caption}</div>`:e.message;else{let n=[e.message];t=e.caption?[f(`div`,n),f(`div`,{class:`q-notification__caption`},[e.caption])]:n}n.push(f(`div`,r,t))}let r=[f(`div`,{class:t.contentClass},n)];return e.progress&&r.push(f(`div`,{key:`${t.uid}|p|${t.badge}`,class:t.progressClass,style:t.progressStyle})),e.actions&&r.push(f(`div`,{class:t.actionsClass},e.actions.map(e=>f(je,e)))),t.badge>1&&r.push(f(`div`,{key:`${t.uid}|${t.badge}`,class:e.meta.badgeClass,style:e.badgeStyle},[t.badge])),f(`div`,{ref:e=>{Ac[String(t.uid)]=e},key:t.uid,class:t.class,...t.attrs},[f(`div`,{class:t.wrapperClass},r)])}))))}})}var Bc={setDefaults(e){Rt(e)&&Object.assign(Tc,e)},registerType(e,t){Rt(t)&&(Pc[e]=t)},install({$q:e,parentApp:t}){if(e.notify=this.create=t=>Fc(t,e),e.notify.setDefaults=this.setDefaults,e.notify.registerType=this.registerType,e.config.notify!==void 0&&this.setDefaults(e.config.notify),!this.__installed){Mc.forEach(e=>{Dc[e]=d([]);let t=e===`left`||e===`center`||e===`right`?`center`:e.includes(`top`)?`top`:`bottom`,n=e.includes(`left`)?`start`:e.includes(`right`)?`end`:`center`;Oc[e]=`q-notifications__list q-notifications__list--${t} fixed column no-wrap ${e===`left`||e===`right`?`items-${e===`left`?`start`:`end`} justify-center`:e===`center`?`flex-center`:`items-${n}`}`});let e=De(`q-notify`);Wt(zc(),t).mount(e)}}},Vc={"tours.settings.skills.title":`Choose a skill suite`,"tours.settings.skills.description":`Start with Standard: no extension is required. Superpowers, gstack, ECC and their combinations target skills already installed and available to your chosen engine. Selecting a suite changes agent instructions; it does not install skills or grant permissions. Custom lets you edit those instructions. Save your choice to apply it.`,"tours.settings.git.description":`Choose when agents may commit, push or publish. Set Git conventions and branch prefixes.`,"tours.settings.git.title":`Git workflow`,"settings.reviewPromptHint":`Instructions sent to the agent when starting a code review.`,"settings.help.git":`Commit, push and publication preferences, Git conventions and branch prefixes.`,"settings.nav.promptTemplates":`Prompt templates`,"settings.nav.git":`Git`,"integration.direct":`Direct connection`,"integration.directHint":`Optional: configure a trusted MCP command on this server without Claude configuration. Put credentials in environment variables. Saving replaces the entire connection; enable the integration separately.`,"integration.agentScope":`Enabled connections are supplied to Claude Code and Codex on the next agent launch or resume. Stop a running agent to apply changes. Personal MCP configurations remain independent.`,"integration.directOverrides":`The saved direct connection takes priority. Delete it to use a Claude MCP entry.`,"integration.stored":`A private connection is saved. Its values are never returned to the browser.`,"integration.example":`Example: {example}`,"integration.tokenExample":`YOUR_NOTION_TOKEN`,"integration.packageExample":`your-mcp-package`,"integration.variableExample":`YOUR_VARIABLE`,"integration.valueExample":`your-value`,"integration.command":`Executable`,"integration.args":`Arguments (JSON array)`,"integration.environment":`Environment and credentials (JSON object)`,"integration.failed":`Could not load or save the connection. Check the JSON fields and local storage.`,"integration.saved":`Connection saved. Enable the integration and use Test connection when ready.`,"integration.save":`Replace connection`,"integration.clear":`Remove direct connection`,"settings.notificationSoundReady":`Ready tone`,"settings.customSounds":`Imported sounds`,"settings.customSoundsHint":`Import your own notification sounds ({count} max, {size} MB each, .wav .mp3 .ogg .webm). They are stored in the Kōbō data directory and appear in every sound selector below.`,"settings.customSoundsImport":`Import a sound`,"settings.customSoundsFull":`Limit reached ({count} sounds). Delete one before importing another.`,"settings.customSoundsError.type":`Unsupported format. Use a .wav, .mp3, .ogg or .webm file.`,"settings.customSoundsError.size":`File too large. The limit is {size} MB.`,"settings.customSoundsError.count":`Limit reached ({count} sounds). Delete one before importing another.`,"settings.customSoundsError.failed":`Could not complete this action. Check the connection and try again.`,"setup.check.worktrees":`Worktree directory`,"setup.fix.worktrees":`Check the worktree destination in Settings and its write permissions.`,"setup.title":`First mission setup`,"setup.intro":`Choose an engine and a local Git project. No skills or integrations are required.`,"setup.project":`Local project directory`,"setup.credentials":`Authenticate on this server with claude /login or codex login, or configure your provider API key. These checks do not send a paid prompt.`,"setup.permissions":`Start with a plan. Choose execution permissions explicitly in the creation form; a worktree does not isolate your machine.`,"setup.check":`Check environment`,"setup.failed":`Could not complete this action. Check the connection and try again.`,"setup.start":`Describe my first mission`,"setup.settings":`Open settings`,"setup.skip":`Skip for now`,"setup.status.ok":`Available`,"setup.status.missing":`Missing`,"setup.status.error":`Needs attention`,"setup.status.unknown":`Not verified`,"setup.check.node":`Node.js`,"setup.check.platform":`Platform`,"setup.check.git":`Git`,"setup.check.shell":`Bash`,"setup.check.storage":`Data directory`,"setup.check.runtime":`Engine package`,"setup.check.authentication":`Authentication`,"setup.check.model":`Model access`,"setup.check.repository":`Git repository`,"setup.check.firstCommit":`First commit`,"setup.check.projectWritable":`Project write access`,"setup.fix.node":`Install Node.js 24.15 or newer.`,"setup.fix.platform":`Use Linux, macOS or WSL2; native Windows is unsupported.`,"setup.fix.git":`Install Git on this server.`,"setup.fix.shell":`Install Bash on this server.`,"setup.fix.storage":`Check KOBO_HOME and its directory permissions.`,"setup.fix.runtime":`Reinstall Kōbō with its optional runtime dependencies.`,"setup.fix.authentication":`Log in to the selected provider. The first mission verifies access.`,"setup.fix.model":`Choose Auto or a model available to your account.`,"setup.fix.repository":`Choose an existing Git working directory.`,"setup.fix.firstCommit":`Create the first commit in this project before creating a worktree.`,"setup.fix.projectWritable":`Choose a writable project directory.`,"handoff.freshTitle":`Continue in a fresh session`,"handoff.switchTitle":`Change LLM`,"handoff.warning":`The current work stops immediately. A fresh session continues automatically in the same workspace, keeping tasks and history.`,"handoff.generate":`Generate a handoff with the current agent`,"handoff.generateHint":`Turn off if its quota is exhausted. Kōbō will pass the objective, tasks, Git state and history without calling the current LLM.`,"handoff.start":`Start fresh session`,"handoff.stopping":`Stopping the current agent`,"handoff.generating":`Preparing the handoff`,"handoff.starting":`Starting the fresh session`,"handoff.completed":`Fresh session started`,"handoff.failed":`Handoff failed`,"handoff.interrupted":`Handoff interrupted`,"handoff.cancelled":`Handoff cancelled`,"handoff.skip":`Continue without LLM summary`,"handoff.cancel":`Cancel handoff`,"handoff.report":`Read handoff`,"handoff.source":`Previous session`,"handoff.progress":`Session handoff in progress`,"handoff.blocked":`Resolve or cancel the handoff to continue.`,"handoff.error":`Could not prepare the session handoff.`,"handoff.loadFailed":`Could not load the handoff status.`,"handoff.status":`Session handoff`,"chat.externalLlm":`External LLM · {name}`,"search.indexing":`Indexing history: {processed}/{total}. Results are partial.`,"search.indexUnavailable":`Search index unavailable. Try again later.`,"blockers.setupConfiguration":`No setup script is configured. Add one in the Scripts section of settings.`,"blockers.noWorkspace":`Select a workspace to use this action.`,"blockers.purged":`Restore the worktree from the workspace banner before this action.`,"blockers.archived":`Unarchive the workspace from its menu to use this action.`,"blockers.operation":`Wait for the current operation to finish.`,"blockers.agentBusy":`Wait for the turn to finish or stop the agent from the conversation.`,"blockers.configuration":`Configure this feature in the project settings.`,"blockers.settings":`Open settings`,"workspaceSort.label":`Sort workspaces`,"workspaceSort.activity":`Last activity`,"workspaceSort.created":`Creation date`,"workspaceSort.name":`Name`,"workspaceSort.attention":`Attention priority`,"workspaceSort.asc":`Ascending`,"workspaceSort.desc":`Descending`,"workspaceSort.hint":`Sort within each group, including archives. Viewing a workspace does not change its last activity.`,"model.tooltip":`Model used by the agent for this workspace`,"reasoning.tooltip":`Reasoning level used by the agent for this workspace`,"thinking.label":`Thinking`,"thinking.noDetails":`The agent is thinking…`,"common.save":`Save`,"common.duplicate":`Duplicate`,"common.confirm":`Confirm`,"common.cancel":`Cancel`,"common.open":`Open`,"common.retry":`Retry`,"common.delete":`Delete`,"common.close":`Close`,"workspace.deleteTitle":`Delete workspace`,"workspace.deleteTypeBranch":`Retype the branch name to confirm`,"workspace.deleteConsequences":`This removes the worktree and the whole conversation.`,"workspace.deleteFailed":`Could not delete the workspace.`,"workspace.archiveFailed":`Could not archive the workspace.`,"tasks.updateFailed":`Could not update the task.`,"dashboard.tooltip":`Dashboard`,"dashboard.title":`Dashboard`,"dashboard.count":`{n} workspace | {n} workspaces`,"dashboard.empty":`No active workspace.`,"dashboard.workspace":`Workspace`,"dashboard.status":`Status`,"dashboard.attention":`Attention`,"dashboard.pr":`PR`,"dashboard.diff":`Diff`,"dashboard.activity":`Activity`,"dashboard.prOpen":`open`,"reliability.title":`Model reliability`,"reliability.subtitle":`How each engine and model actually ended on this machine.`,"reliability.empty":`No session has ended yet.`,"reliability.loadFailed":`Could not load the reliability figures.`,"reliability.engine":`Engine`,"reliability.model":`Model`,"reliability.sessions":`Sessions`,"reliability.completed":`Completed`,"reliability.watchdog":`Watchdog`,"reliability.killed":`Stopped`,"reliability.errors":`Errors`,"reliability.unknown":`Unknown`,"reliability.median":`Median`,"reliability.durationSeconds":`{s}s`,"reliability.durationMinutes":`{m}m {s}s`,"reliability.durationHours":`{h}h {m}m`,"update.available":`A newer Kōbō is available: {version}`,"update.how":`How to update`,"common.dismiss":`Dismiss`,"common.details":`Details`,"common.ok":`OK`,"whatsNew.title":`What's new`,"common.loading":`Loading...`,"common.search":`Search...`,"common.refresh":`Refresh`,"common.copy":`Copy`,"common.copied":`Copied to clipboard`,"common.copyFailed":`Copy failed`,"common.add":`Add`,"folderPicker.title":`Choose a folder`,"folderPicker.parent":`Parent folder`,"folderPicker.empty":`No subfolders`,"folderPicker.select":`Select this folder`,"common.start":`Start`,"common.stop":`Stop`,"common.archive":`Archive`,"common.unarchive":`Unarchive`,"common.selectWorkspace":`Select a workspace`,"common.noResults":`No results for "{query}"`,"common.send":`send`,"common.newLine":`new line`,"common.history":`history`,"common.justNow":`just now`,"common.minutesAgo":`{count}m ago`,"common.hoursAgo":`{count}h ago`,"common.daysAgo":`{count}d ago`,"model.auto":`Auto`,"model.fable51":`Fable 5.1`,"model.mythos5":`Mythos 5 (Glasswing)`,"model.fable51Description":`Most capable model - replaces Fable 5, 1M context, adaptive thinking`,"model.mythos5Description":`Fable 5.1 without safety classifiers — limited access (Project Glasswing)`,"model.opus":`Opus 4.6`,"model.sonnet":`Sonnet 4.6`,"model.opus5":`Opus 5`,"model.opus48":`Opus 4.8`,"model.opus47Classic":`Opus 4.7 (Classic)`,"model.opus471m":`Opus 4.7 (1M)`,"model.opusClassic":`Opus 4.6 (Classic)`,"model.opus1m":`Opus 4.6 (1M)`,"model.sonnet5":`Sonnet 5`,"model.sonnetClassic":`Sonnet 4.6 (Classic)`,"model.sonnet1m":`Sonnet 4.6 (1M)`,"model.haiku":`Haiku 4.5`,"model.autoDescription":`Claude picks the optimal model`,"model.opus5Description":`For complex agentic coding and enterprise work, 1M context`,"model.opus48Description":`Most capable Opus — long-horizon agentic coding, 1M context by default, high effort default`,"model.opus47ClassicDescription":`Latest Opus, most capable`,"model.opus471mDescription":`Latest Opus, 1M context`,"model.opusClassicDescription":`Most powerful`,"model.opus1mDescription":`Most powerful, 1M context`,"model.sonnet5Description":`Best mix of speed and intelligence, 1M context`,"model.sonnetClassicDescription":`Balanced`,"model.sonnet1mDescription":`Balanced, 1M context`,"model.haikuDescription":`Fastest`,"model.gpt6astra":`GPT-6 Astra`,"model.gpt6astraDescription":`Most capable frontier model, 1M context (requires ChatGPT auth)`,"model.gpt56sol":`GPT-5.6 Sol`,"model.gpt56solDescription":`Latest frontier agentic coding model (requires ChatGPT auth)`,"model.gpt56terra":`GPT-5.6 Terra`,"model.gpt56terraDescription":`Balanced agentic coding model for everyday work (requires ChatGPT auth)`,"model.gpt56luna":`GPT-5.6 Luna`,"model.gpt56lunaDescription":`Fast and affordable agentic coding model (requires ChatGPT auth)`,"model.gpt55":`GPT-5.5`,"model.gpt55Description":`Recommended for complex coding (requires ChatGPT auth)`,"model.gpt54":`GPT-5.4`,"model.gpt54Description":`Default fallback — strong reasoning, works with API key auth`,"model.gpt54mini":`GPT-5.4 mini`,"model.gpt54miniDescription":`Fast and efficient — best for responsive tasks and subagents`,"model.gpt52":`GPT-5.2`,"model.gpt52Description":`Optimized for professional work and long-running agents`,"model.gpt53codex":`GPT-5.3 Codex`,"model.gpt53codexDescription":`Coding-specialized model for complex software engineering`,"reasoning.auto":`auto`,"reasoning.minimal":`minimal`,"reasoning.none":`none`,"reasoning.low":`low`,"reasoning.medium":`medium`,"reasoning.high":`high`,"reasoning.xhigh":`xhigh`,"reasoning.max":`max`,"reasoning.autoDescription":`Let the engine pick the default`,"reasoning.minimalDescription":`Fastest, shallowest reasoning`,"reasoning.noneDescription":`No additional reasoning`,"reasoning.lowDescription":`Faster, less depth`,"reasoning.mediumDescription":`Balanced`,"reasoning.highDescription":`More depth`,"reasoning.xhighDescription":`Extended depth, long-horizon tasks`,"reasoning.maxDescription":`Maximum depth`,"agentPermissionMode.label":`Permission mode`,"agentPermissionMode.plan":`Plan`,"agentPermissionMode.bypass":`Bypass`,"agentPermissionMode.strict":`Accept edits`,"agentPermissionMode.interactive":`Interactive`,"agentPermissionMode.tooltip":`How the agent handles tool permissions. Plan: read-only, no writes. Bypass: skip every prompt. Strict: auto-accept file edits, respect allow/deny lists for the rest. Interactive: ask the user before each tool via the permission panel.`,"agentPermissionMode.autoLoopOverride":`Auto-loop forces a non-plan mode — Plan blocks the MCP tools and edits the loop relies on. Pick Bypass, Strict, or Interactive instead.`,"agentPermissionMode.autoLoopLocked":`Locked to Bypass while auto-loop is on — any other mode would stall the loop on permission prompts. AskUserQuestion still works.`,"workspaceList.title":`Workspaces`,"workspaceList.a11y.groupToggle":`{group} group, {count} workspaces`,"workspaceList.a11y.list":`Workspaces`,"workspaceList.a11y.card":`{name}, {status}`,"workspaceList.needsAttention":`Needs Attention`,"workspaceList.running":`Running`,"workspaceList.idle":`Idle`,"workspaceList.archived":`Archived`,"workspaceList.archivedToast":`“{name}” archived`,"workspaceList.archivedUndo":`Undo`,"workspaceList.unarchiveFailed":`Could not unarchive this workspace`,"workspaceList.noWorkspaces":`No workspaces yet`,"workspaceList.loadFailed":`Could not load your workspaces`,"workspaceList.loadFailedHint":`This is a connection failure, not an empty account.`,"workspaceList.footer":`{count} workspace | {count} workspaces`,"workspaceList.footerRunning":`{count} running`,"workspaceList.deleteDialog.title":`Delete workspace?`,"workspaceList.deleteDialog.deleteLocal":`Delete local branch`,"workspaceList.deleteDialog.deleteRemote":`Delete remote branch`,"workspaceList.deleteDialog.warning":`Warning: this action is irreversible on the remote.`,"workspaceList.deleteArchivedDialog.tooltip":`Delete all archived workspaces`,"workspaceList.deleteArchivedDialog.title":`Delete all archived workspaces?`,"workspaceList.deleteArchivedDialog.message":`This will permanently delete the {count} archived workspaces. This action cannot be undone.`,"workspaceList.deleteArchivedDialog.typeCount":`Type {count} to confirm`,"workspacePage.configure":`Configure`,"workspacePage.permissions":`Permissions`,"workspacePage.selectWorkspace":`Select a workspace to begin`,"workspacePage.commandPalettePlaceholder":`Search commands…`,"workspacePage.commandPaletteEmpty":`No matching command`,"workspacePage.commandFocusChat":`Focus chat input`,"workspacePage.commandSearchHistory":`Search workspace history`,"workspacePage.commandTogglePanel":`Show or hide side panel`,"workspacePage.commandStartAgent":`Start agent`,"workspacePage.commandStopAgent":`Stop agent`,"workspacePage.commandOpenSettings":`Open settings`,"workspacePage.commandOpenCreate":`Create a workspace`,"workspacePage.commandOpenSearch":`Global search`,"workspacePage.commandOpenHealth":`Health page`,"workspacePage.commandOpenChangelog":`Changelog`,"workspacePage.commandGroupWorkspaces":`Switch to a workspace`,"workspacePage.commandPaletteHint":`Command palette`,"workspacePage.session":`Session #{n}`,"workspacePage.newSession":`+ New session`,"workspacePage.renameSession":`Rename`,"workspacePage.renameSessionTitle":`Rename session`,"workspacePage.sessionNameLabel":`Session name`,"workspacePage.sessionEndedNotice":`This session has ended. Create a new session to continue.`,"workspacePage.renameFailed":`Rename failed`,"workspacePage.copySessionId":`Copy session ID`,"workspacePage.deleteSession":`Delete session`,"workspacePage.deleteSessionTitle":`Delete session?`,"workspacePage.deleteSessionConfirm":`This permanently deletes this session and its conversation history.`,"workspacePage.deleteSessionFailed":`Failed to delete session`,"workspacePage.noEngineSessionId":`No engine session ID yet — the agent hasn't started this session`,"workspacePage.createSessionFailed":`Failed to create session`,"workspacePage.startFailed":`Start failed`,"workspacePage.stopFailed":`Stop failed`,"workspacePage.interrupt":`Interrupt`,"workspacePage.interrupted":`Agent interrupted — waiting for your next message`,"workspacePage.lastAgentEvent":`Last event {when}`,"workspacePage.agentStopping":`Stopping…`,"workspacePage.agentNotRunning":`No agent process — status is stale`,"contextMenu.restoreWorktree":`Restore worktree`,"workspacePage.restoringWorktree":`Restoring…`,"workspacePage.worktreeRestoreSuccess":`Worktree restored`,"workspacePage.worktreeRestoreLimitations":`Recreates committed Git files. Dependencies and previously discarded local files are not restored.`,"workspacePage.restoreError.not-found":`This workspace no longer exists. Refresh the workspace list.`,"workspacePage.restoreError.not-purged":`This workspace is not marked as purged. Refresh it and check its working directory.`,"workspacePage.restoreError.workspace-busy":`Another operation is running on this workspace. Wait for it to finish, then retry.`,"workspacePage.restoreError.worktree-not-owned":`This worktree is not managed by Kōbō. Restore it manually in its original project.`,"workspacePage.restoreError.project-unavailable":`The original project is unavailable. Reconnect its disk or restore the project at its original path, then retry.`,"workspacePage.restoreError.path-conflict":`The worktree path is occupied by another folder or checkout. Move the conflicting folder or follow the manual recovery instructions in Details.`,"workspacePage.restoreError.branch-in-use":`The working branch is already checked out elsewhere. Use that checkout or release the branch from it before retrying.`,"workspacePage.restoreError.recovery-source-unavailable":`The working branch and saved commit could not be found. Check remote access or follow the manual recovery instructions in Details.`,"workspacePage.restoreError.git-failed":`Restoration failed. Check Git access and disk permissions, then retry. Details opens the manual recovery guide.`,"workspacePage.archivedBanner":`Archived workspace — read-only`,"workspacePage.worktreePurgedBanner":`Worktree deleted — history kept`,"workspacePage.worktreePurgedTooltip":`Restore worktree recreates the working directory and unarchives this workspace. Chat history, tasks and sessions are preserved. No agent or dev server is started.`,"workspacePage.pendingInitialPromptBanner":`An initial prompt is pending — the agent never received it (setup script crashed or the workspace was never started). Click Start to send it now.`,"workspacePage.unarchived":`Workspace unarchived`,"workspacePage.unarchiveFailed":`Unarchive failed`,"workspacePage.interruptFailed":`Interrupt failed`,"workspacePage.interruptHint":`Interrupt the current turn without ending the session.`,"workspacePage.interruptTooltip":`Soft interrupt (like Escape) — stops the current tool but keeps the session alive`,"workspacePage.pendingNextRun":`Applied on next start`,"workspacePage.activeSessionModel":`Active: {model}`,"workspacePage.activeSessionModelTooltip":`Model currently used by the selected session`,"workspacePage.switchEngine":`Switch engine`,"workspacePage.switchEngineHint":`Continue this workspace with another agent engine`,"workspacePage.moreActions":`More actions`,"workspacePage.switchEngineTitle":`Switch agent engine`,"workspacePage.switchEngineWarning":`The current agent will be stopped and a fresh session will start in the same worktree.`,"workspacePage.engineLabel":`Engine`,"workspacePage.engineClaude":`Claude Code`,"workspacePage.engineCodex":`Codex`,"workspacePage.engineHandoff":`Handoff for the new engine`,"workspacePage.engineHandoffHint":`Review or edit the context that will be sent to the new agent.`,"workspacePage.confirmSwitchEngine":`Switch engine`,"workspacePage.switchEngineFailed":`Failed to switch engine`,"whip.dispatchFailed":`Unable to send the whip message`,"whip.phrase1":`Continue, please.`,"whip.phrase2":`Keep working through the task list.`,"whip.phrase3":`Please proceed with the next step.`,"whip.phrase4":`Check progress and continue.`,"whip.phrase5":`Continue within the agreed scope.`,"search.title":`Search`,"search.tooltip":`Search across agent history`,"search.placeholder":`Search across all agent messages…`,"search.includeArchived":`Include archived workspaces`,"search.loading":`Searching…`,"search.noResults":`No matches`,"search.error":`Search failed: {message}`,"search.resultCount":`{n} result(s)`,"search.eventType.userMessage":`You`,"search.eventType.agentOutput":`Agent`,"activityFeed.empty":`No activity yet`,"activityFeed.emptyHint":`Start a workspace to see agent output here`,"activityFeed.initialPrompt":`Initial Prompt`,"activityFeed.you":`You`,"activityFeed.agent":`Agent`,"activityFeed.question":`Question`,"activityFeed.goToPrevious":`Go to previous message`,"activityFeed.scrollToBottom":`Scroll to bottom`,"activityFeed.sendAnswers":`Send answers`,"agentBusy.banner":`Agent is busy`,"agentBusy.subagentsRunning":`1 sub-agent running | {n} sub-agents running`,"agentBusy.viewSubagents":`View sub-agents`,"agentBusy.pendingMessage":`Waiting — agent is busy`,"terminal.title":`Terminal`,"terminal.open":`Open terminal`,"terminal.close":`Close terminal`,"terminal.noWorkspace":`Select a workspace`,"terminal.noWorktree":`Worktree not created yet`,"terminal.error":`Terminal error`,"terminal.exited":`Terminal exited`,"terminal.disconnected":`Connection lost`,"terminal.reconnecting":`Reconnecting… (attempt {attempt} of {max})`,"terminal.reconnect":`Reconnect`,"chatInput.placeholder":`Message... (/ for skills)`,"chatInput.fileSearchHint":`search a file`,"chatInput.skills":`Skills`,"chatInput.attachImage":`Attach image`,"chatInput.queueBanner":`Message queued — will be sent when the agent finishes`,"chatInput.forceQueue":`Force send`,"chatInput.searchHistory":`search`,"chatInput.commandPalette":`commands`,"chatInput.shortcuts":`Keyboard shortcuts`,"chatInput.cancelQueue":`Cancel Queue`,"chatInput.autoLoopBanner":`Auto-loop is running — stop it to send a message`,"chatInput.awaitingUserBanner":`The agent is waiting for your answer above — reply via the question panel`,"chatInput.autoLoopStop":`Stop`,"koboCommand.checkProgressDesc":`Verify progress on tasks and acceptance criteria`,"chatInput.uploading":`Uploading...`,"voice.title":`Voice transcription`,"voice.enabled":`Enable local voice transcription`,"voice.pttKey":`Push-to-talk key`,"voice.pttAlt":`Alt`,"voice.pttCtrlSpace":`Ctrl+Space`,"voice.language":`Language (auto or code)`,"voice.model":`Active model`,"voice.commandPath":`Whisper binary path (optional)`,"voice.ffmpegPath":`ffmpeg binary path (optional)`,"voice.temperature":`Temperature`,"voice.temperatureHint":`Lower is more deterministic; higher can be more flexible but less stable.`,"voice.initialPrompt":`Initial prompt (optional)`,"voice.initialPromptHint":`Optional context to help Whisper with names, jargon, or domain vocabulary.`,"voice.translateToEnglish":`Translate to English`,"voice.translateToEnglishHint":`When enabled, non-English speech is translated to English instead of transcribed as-is.`,"voice.suppressNst":`Suppress non-speech tokens`,"voice.suppressNstHint":`Attempts to reduce non-speech artifacts in the transcript.`,"voice.installLink":`Install whisper.cpp`,"voice.installGuideTitle":`Installation guide`,"voice.installGuideIntro":`Install whisper.cpp and ffmpeg, then set the binary paths below if needed.`,"voice.installGuideUbuntuTitle":`Ubuntu / Debian`,"voice.installGuideWindowsTitle":`Windows`,"voice.installGuideBinaryPathHint":`After CMake build, the Whisper binary is usually at: whisper.cpp/build/bin/whisper-cli`,"voice.installGuideSettingsHint":`Then set "Whisper binary path" and "ffmpeg binary path" in this section (or leave empty if they are in PATH).`,"voice.noneModel":`No active model`,"voice.notInstalled":`not installed`,"voice.download":`Download`,"voice.delete":`Delete`,"voice.holdToTalk":`Hold to talk`,"voice.recording":`Recording...`,"voice.transcribing":`Transcribing...`,"voice.notSupported":`Voice recording is not supported in this browser`,"voice.errorMicPermission":`Microphone permission denied`,"voice.errorTranscription":`Voice transcription failed`,"voice.downloadFailed":`Model download failed`,"voice.deleteFailed":`Model deletion failed`,"voice.errorDisabled":`Voice transcription is disabled in settings`,"voice.errorModelMissing":`No active voice model is configured`,"voice.errorModelNotInstalled":`The active voice model is not installed`,"voice.errorAudioInvalid":`Audio capture is invalid or empty`,"voice.errorLanguageInvalid":`Voice language configuration is invalid`,"voice.errorRuntimeMissing":`Whisper runtime is not installed or not in PATH`,"voice.maxDurationReached":`Maximum recording duration reached`,"voice.runtimeReady":`Runtime ready: {command}`,"voice.runtimeMissing":`Runtime missing: {command}`,"voice.ffmpegReady":`ffmpeg ready`,"voice.ffmpegMissing":`ffmpeg missing`,"voice.sectionRuntime":`Runtime status`,"voice.sectionActivation":`Activation`,"voice.sectionModels":`Whisper models`,"voice.sectionAdvanced":`Advanced options`,"voice.sectionBehavior":`Transcription behavior`,"voice.sectionBinaries":`Binary paths`,"voice.downloadModels":`Download a model`,"voice.cancelFailed":`Failed to cancel the download`,"attachments.error.upload":`Upload failed. Remove the attachment and try again.`,"attachments.add":`Attach files`,"attachments.remove":`Remove attachment`,"attachments.hint":`Paste or drop files here · {count} maximum · {size} MB each · {total} MB total`,"attachments.error.type":`Use PNG, JPEG, GIF or WebP images, PDF, Markdown or text documents (TXT, CSV, JSON, YAML, XML, LOG, RST, TOML).`,"attachments.error.size":`Each file must be non-empty and no larger than 50 MB.`,"attachments.error.count":`You can attach up to 10 files.`,"attachments.error.total":`Attachments must total no more than 50 MB.`,"attachments.descriptionRequired":`Enter a description or attach a file.`,"createPage.title":`Create a workspace`,"createPage.fromTemplate":`From a template`,"createPage.fromTemplateNone":`None`,"createPage.saveAsTemplate":`Save as template`,"createPage.saveTemplateTitle":`Save this form as a template`,"createPage.saveTemplateName":`Template name`,"createPage.saveTemplateOverwrite":`A template named “{name}” exists. Overwrite it?`,"createPage.templateSaved":`Template “{name}” saved`,"createPage.templateApplied":`Template “{name}” applied`,"createPage.duplicatedFrom":`Duplicated from “{name}”`,"createPage.duplicateLoadFailed":`Could not load the workspace to duplicate.`,"createPage.templateSaveFailed":`Could not save the template.`,"createPage.presetProjectUnknown":`This template targets a project that is no longer configured; the current project was kept.`,"createPage.copySuffix":`(copy)`,"createPage.subtitle":`Describe the mission, choose a project, then configure the agent.`,"createPage.sectionMission":`Mission`,"createPage.sectionMissionHint":`Give the agent a clear objective and the context needed to complete it.`,"createPage.workspaceNameLabel":`Workspace name`,"createPage.descriptionLabel":`Mission description`,"createPage.sources":`Optional sources`,"createPage.sectionGit":`Git project`,"createPage.sectionGitHint":`Choose the repository, source branch and worktree mode.`,"createPage.worktreeMode":`Worktree mode`,"createPage.worktreeNew":`New isolated worktree`,"createPage.worktreeExisting":`Reuse an existing worktree`,"createPage.projectLabel":`Project`,"createPage.sourceBranch":`Source branch`,"createPage.workingBranchPreview":`Working branch preview`,"createPage.branchNamePending":`workspace-name`,"createPage.sectionAgent":`Agent`,"createPage.sectionAgentHint":`Review the execution defaults or enable automation.`,"createPage.configureAgent":`Configure the agent`,"createPage.advancedOptions":`Advanced options`,"createPage.keyboardHint":`Press Ctrl/Cmd + Enter to create the workspace.`,"createPage.createWorkspace":`Create workspace`,"createPage.compareEngines":`Compare two engines`,"createPage.engineA":`Engine A`,"createPage.engineB":`Engine B`,"createPage.compareBrainstormLocked":`Comparison mode: each engine brainstorms on the model and effort set in its own block above.`,"createPage.compareEnginesHint":`Creates two workspaces from this task, one per engine, in sibling worktrees. Their diffs can then be compared side by side.`,"createPage.compareNeedsNewWorktree":`Comparing two engines needs two new worktrees. Turn off “use an existing worktree” first.`,"createPage.compareNeedsSecondEngine":`Pick a second engine, different from the first, to compare against.`,"comparison.title":`Engine comparison`,"comparison.hint":`The same task, run by each engine in its own worktree.`,"comparison.engine":`Engine`,"comparison.status":`Status`,"comparison.tasks":`Tasks`,"comparison.commits":`Commits`,"comparison.files":`Files`,"comparison.diff":`Diff`,"comparison.messages":`Messages`,"comparison.messagesTitle":`Agent messages / your messages`,"comparison.questions":`Questions`,"comparison.tools":`Tools`,"comparison.errors":`Errors`,"comparison.tokens":`Tokens`,"comparison.tokensTitle":`Input / output tokens`,"comparison.sessions":`Sessions`,"comparison.duration":`Time`,"comparison.exportCsv":`Export as CSV`,"comparison.open":`Open`,"comparison.current":`This one`,"comparison.archived":`archived`,"comparison.incomplete":`Only one workspace of this comparison exists. The other was never created, or has been deleted.`,"createPage.comparisonPartial":`Only {count} of {total} workspaces were created. The one that exists is usable on its own; delete it if you would rather start over.`,"createPage.notionEnabled":`Notion enabled`,"createPage.importNotion":`Import from Notion`,"createPage.notionPlaceholder":`https://www.notion.so/workspace/Page-title-abc123...`,"createPage.notionValidation":`URL must start with https://www.notion.so/ or https://app.notion.com/`,"createPage.notionAutoExtract":`Subtasks and acceptance criteria will be extracted automatically.`,"createPage.notionPanelChoiceLabel":`This URL points to a sub-page (?p=). Which one do you want to work on?`,"createPage.notionPanelOption":`Sub-page (panel)`,"createPage.notionPanelOptionDesc":`The page you were viewing — recommended`,"createPage.notionParentOption":`Parent page`,"createPage.notionParentOptionDesc":`The epic / database it belongs to`,"createPage.importSentry":`Import Sentry`,"createPage.sentryEnabled":`Sentry enabled`,"createPage.sentryPlaceholder":`https://your-org.sentry.io/issues/123456`,"createPage.sentryValidation":`URL must point to a Sentry issue (/issues/<id>)`,"createPage.sentryAutoExtract":`Sentry issue will be imported automatically`,"createPage.sentryExtractHint":`Kobo will extract the issue and write it to .ai/thoughts/`,"createPage.importPr":`Import from a PR`,"createPage.importPrRequiresProject":`Choose a project first`,"createPage.importPrNotSupported":`This project's forge does not support listing pull requests`,"createPage.lockedToPr":`Locked to PR #{number}`,"createPage.prReadyToCreate":`PR #{number} imported — ready to create the workspace.`,"createPage.prResumeIntro":`Resuming work on the existing pull request #{number} "{title}" ({url}).`,"createPage.unlockPrCheckout":`Unlock`,"createPage.workspaceName":`Workspace name (defaults to Notion page title)`,"createPage.workspaceNamePlaceholder":`Workspace name...`,"createPage.instructions":`Additional instructions (optional)...`,"createPage.instructionsPlaceholder":`Describe the task...`,"createPage.tasks":`Tasks ({count})`,"createPage.addTask":`Add a task...`,"createPage.acceptanceCriteria":`Acceptance Criteria ({count})`,"createPage.addCriterion":`Add a criterion...`,"createPage.projectPath":`Enter the project path`,"createPage.branchType":`Branch type`,"createPage.branch":`Branch`,"createPage.noBranches":`No branches found`,"createPage.enterPath":`Enter a project path`,"createPage.skipSetupScript":`Skip setup script`,"createPage.worktreePickerLabel":`Existing worktree`,"createPage.noOrphanWorktrees":`No orphan worktrees in this project`,"createPage.pickWorktreeRequired":`Please pick a worktree to attach`,"createPage.notionExtractHint":`Subtasks and acceptance criteria will be extracted from the Notion page.`,"createPage.errorCreating":`Error creating workspace.`,"createPage.branchAdjusted":"Branch already existed — created `{branch}` instead. The matching worktree folder uses the same suffix.","createPage.localSourceFallback":`Workspace created from the local branch (origin unreachable) — the base may be stale.`,"createPage.validationNotionUrl":`Please paste a valid Notion URL (https://www.notion.so/... or https://app.notion.com/...).`,"createPage.validationDescription":`Please describe the task.`,"createPage.validationName":`Please provide a workspace name.`,"createPage.validationPath":`Please enter the project path.`,"createPage.validationBranch":`Please select a branch.`,"createPage.validationFocusHint":`The field to fix is highlighted below.`,"createPage.progress.validate":`Validating the request…`,"createPage.progress.fetch-source-branch":`Fetching the source branch from origin…`,"createPage.progress.inspect-worktree":`Inspecting the existing worktree…`,"createPage.progress.extract-notion":`Extracting the Notion page…`,"createPage.progress.extract-sentry":`Extracting the Sentry issue…`,"createPage.progress.create-record":`Creating the workspace…`,"createPage.progress.create-tasks":`Creating tasks and acceptance criteria…`,"createPage.progress.create-worktree":`Creating the git worktree…`,"createPage.progress.write-conventions":`Writing git conventions…`,"createPage.progress.write-context-files":`Writing context files…`,"createPage.progress.build-prompt":`Building the initial prompt…`,"createPage.progress.setup-script":`Running your setup script…`,"createPage.progress.start-agent":`Starting the agent…`,"createPage.progress.rollback":`Undoing the failed creation…`,"createPage.progress.done":`Done`,"createPage.progress.step":`Step {index} of {total}`,"createPage.errorAtStep":`Creation failed at step "{step}": {message}`,"createPage.override.title":`Two of your choices were overridden`,"createPage.override.setup-script-forced":`Setup script skipped: re-running it on a worktree you already prepared could destroy its contents.`,"createPage.override.permission-mode-downgraded":`Permission mode moved from Plan to Bypass: an auto-loop cannot run in Plan, which blocks tools and edits.`,"settings.title":`Settings`,"settings.language":`Language`,"settings.projectColor":`Color`,"settings.projectColorClear":`Clear`,"settings.projectColorDefault":`Default (grey)`,"settings.workspaceListSection":`Workspace list`,"settings.flattenWorkspaceList":`Flatten workspace list`,"settings.flattenWorkspaceListHint":`Show all workspaces in a single flat list with a project badge, instead of grouping by project.`,"workflow.title":`Git workflow`,"workflow.hint":`These preferences guide agents; they do not replace sandbox permissions. More restrictive user instructions take priority. Publication never authorizes merging. New workspaces keep a snapshot of these choices.`,"workflow.commit":`Commit`,"workflow.push":`Push`,"workflow.publish":`Publish PR/MR or comments`,"workflow.manual":`Manual — explicit request`,"workflow.automatic":`Automatic — when needed`,"workflow.inherit":`Inherit`,"workflow.locked":`Stop the agent to change these preferences. A running session already received them.`,"workflow.updateFailed":`Could not save the workflow preference. Check the connection and try again.`,"workflow.save":`Save workflow preferences`,"workflow.saved":`Workflow preferences saved.`,"workflow.planExecution":`Plan can prepare the mission. Execution requires choosing a supported execution permission mode explicitly, then resuming the loop.`,"settings.skillSuite.standard":`Standard (no extensions)`,"settings.skillSuite.standardHint":`Built-in workflow with no external skill suite required.`,"settings.skillSuite.section":`Skill suite`,"settings.skillSuite.superpowers":`Superpowers`,"settings.skillSuite.gstack":`gstack`,"settings.skillSuite.custom":`Custom`,"settings.skillSuite.superpowersHint":`Opinionated TDD / brainstorm / plan workflow (github.com/obra/superpowers).`,"settings.skillSuite.gstackHint":`Garry Tan's stack — /review, /ship, /qa, /office-hours, etc. (github.com/garrytan/gstack).`,"settings.skillSuite.superpowersGstack":`Superpowers + gstack`,"settings.skillSuite.superpowersGstackHint":`Both suites stack — superpowers for process discipline (brainstorm / TDD / plans / principles-level review), gstack for concrete workflows (/review, /qa, /browse, /design-review, /investigate).`,"settings.skillSuite.ecc":`ECC`,"settings.skillSuite.eccHint":`affaan-m's agent-harness framework — agents, skills, rules and hooks for planning, testing, implementing, reviewing and memorizing (github.com/affaan-m/ECC).`,"settings.skillSuite.allThree":`Superpowers + gstack + ECC`,"settings.skillSuite.allThreeHint":`All three stack — superpowers for process discipline, gstack for concrete workflows, ECC for structured multi-agent review/implementation passes.`,"settings.skillSuite.customHint":`Compose the five prompts below from any templates you choose, then edit them freely.`,"settings.skillSuite.reloadDefaults":`Reload defaults`,"settings.skillSuite.reloadDefaultsConfirm":`Replace the five custom prompts with the agnostic defaults?`,"settings.skillSuite.customPrompts":`Custom prompts`,"settings.skillSuite.agnostic":`Agnostic baseline`,"settings.skillSuite.importPrompt":`Import a template`,"settings.skillSuite.imported":`Template imported. You can now edit it.`,"settings.skillSuite.importFailed":`Unable to import the template`,"settings.skillSuite.reviewTemplate":`Review template`,"settings.skillSuite.autoLoopReviewGate":`Auto-loop review gate`,"settings.skillSuite.autoLoopGroomingIntro":`Auto-loop grooming intro`,"settings.skillSuite.qaTemplate":`QA template`,"settings.skillSuite.brainstormingInstruction":`Brainstorming-phase instruction`,"settings.global":`Global`,"settings.projects":`Projects`,"settings.globalSettings":`Global Settings`,"settings.defaultModel":`Default model`,"settings.defaultModelClaude":`Default model (Claude Code)`,"settings.defaultModelCodex":`Default model (OpenAI Codex)`,"settings.agentPermissions":`Agent permissions`,"settings.skipPermissions":`Skip permission prompts (--dangerously-skip-permissions)`,"settings.skipPermissionsWarning":`Warning: disabling this will cause all tool permissions (Write, Edit, Bash...) to be auto-denied in headless mode. The agent will only be able to read.`,"settings.notifications":`Notifications`,"settings.browserNotifications":`Browser notifications when agent finishes`,"settings.audioNotifications":`Sound notification when agent finishes`,"settings.enableBrowserNotifications":`Enable browser notifications`,"settings.testBrowserNotification":`Test notification`,"settings.browserNotificationGranted":`Browser notifications allowed`,"settings.browserNotificationDenied":`Browser notifications blocked`,"settings.browserNotificationAsk":`Browser permission required`,"settings.browserNotificationUnsupported":`Browser notifications unavailable`,"settings.browserNotificationPermissionNeeded":`Allow browser notifications to send a test.`,"settings.browserNotificationTestTitle":`Kōbō notification test`,"settings.browserNotificationTestBody":`Browser notifications are working.`,"settings.enableAudio":`Enable audio`,"settings.notificationSound":`Notification sound`,"settings.notificationSoundHint":`Played when the agent finishes or requests permission.`,"settings.questionSound":`Question sound`,"settings.questionSoundHint":`Played only when the agent asks you a question.`,"settings.workspaceCreatedSound":`Workspace creation sound`,"settings.workspaceCreatedSoundHint":`Played after a workspace is created.`,"settings.notificationSoundPreview":`Preview`,"settings.notificationVolume":`Volume`,"settings.notificationSoundHey":`Hey`,"settings.agentErrorSound":`Agent errors`,"settings.agentErrorSoundHint":`Played for quota, rate-limit, and agent errors.`,"settings.notificationSoundBasic":`Basic notification`,"settings.notificationSoundWorkspaceCreated":`Warcraft III — Work`,"settings.notificationSoundTravailTermine":`Work done`,"settings.notificationSoundFaaah":`Faaah`,"settings.notificationSoundCaVaPeter":`It's gonna blow`,"settings.notificationSoundDryFart":`Dry fart`,"settings.notificationSoundForShure":`For shure`,"settings.prSoundSection":`PR / MR and CI`,"settings.soundGeneral":`General sound`,"settings.soundNone":`No sound`,"settings.prCiFailedSound":`CI failed`,"settings.prCiRecoveredSound":`CI recovered`,"settings.prChangesRequestedSound":`Changes requested`,"settings.prApprovedSound":`PR approved`,"settings.prMergeConflictSound":`Merge conflict`,"settings.prReadyToMergeSound":`Ready to merge`,"settings.prMergedSound":`PR merged`,"settings.prCiFailedSoundHint":`Played when CI changes to a failed state.`,"settings.prCiRecoveredSoundHint":`Played when CI recovers from a failure.`,"settings.prChangesRequestedSoundHint":`Played when a review requests changes.`,"settings.prApprovedSoundHint":`Played when the pull request is approved.`,"settings.prMergeConflictSoundHint":`Played when a merge conflict is detected.`,"settings.prReadyToMergeSoundHint":`Played when the pull request becomes ready to merge.`,"settings.prMergedSoundHint":`Played when the pull request is merged.`,"settings.notificationSoundSeptiemeCompagnie03":`7ème compagnie 03`,"settings.notificationSoundAllerFtg":`Aller FTG`,"settings.notificationSoundArreteDeMentir":`Arrête de mentir`,"settings.notificationSoundArretezLesMessages":`Arrêtez d'envoyer les messages`,"settings.notificationSoundBahAlorsOnEstNul":`Bah alors, on est nul`,"settings.notificationSoundGtaVDeath":`GTA V — Death`,"settings.notificationSoundNanTuDegages":`Nan, tu dégages`,"settings.notificationSoundNanWallahPardon":`Nan, wallah, pardon`,"settings.notificationSoundOuaisCestGreg":`Ouais, c'est Greg`,"settings.notificationSoundPasCaZinedine":`Pas ça, Zinedine`,"settings.notificationSoundTaGueule":`Ta gueule`,"settings.notificationSoundTuVasLaFermer":`Tu vas la fermer`,"settings.notificationSoundYaaa":`Yaaa`,"settings.notificationSoundMaisLaisseMoiDormirZebi":`Mais laisse-moi dormir zebi`,"settings.defaultPermissionMode":`Default permission mode`,"settings.defaultPermissionModeClaude":`Default permission mode (Claude Code)`,"settings.defaultPermissionModeCodex":`Default permission mode (OpenAI Codex)`,"settings.defaultPermissionModeHint":`Mode applied when creating a new workspace. Plan = read-only first, Bypass = skip prompts, Strict = auto-accept edits with allow-list, Interactive = ask before each tool.`,"settings.activityFeed":`Activity feed`,"settings.verboseMessages":`Show verbose system messages (task_progress, task_started)`,"settings.showThinkingBlocks":`Show agent thinking blocks`,"settings.whipSettings":`Whip`,"settings.whipSettingsHint":`Configure the optional whip shortcut and volume.`,"settings.whipEnabled":`Enable whip`,"settings.whipEnabledHint":`Shows the interactive whip control in eligible running workspaces.`,"settings.whipVolume":`Whip volume`,"settings.whipVolumeMasterAudioDisabled":`Master audio is off. Enable audio notifications to adjust the whip volume; your saved value is preserved.`,"whip.overlayLabel":`Interactive whip`,"whip.overlayInstructions":`Move the pointer to control the whip. Press Enter or Space to crack it. Press Escape to close.`,"settings.whipShortcut":`Whip shortcut`,"settings.whipShortcutHint":`Click, then press the shortcut to use.`,"settings.whipShortcutRecording":`Press a shortcut…`,"settings.whipShortcutButtonLabel":`Whip shortcut: {shortcut}`,"settings.whipShortcutRecordingLabel":`Recording whip shortcut. Press a shortcut…`,"settings.whipShortcutReset":`Reset shortcut`,"settings.whipShortcutReserved":`This shortcut is reserved by the browser.`,"settings.testIntegration":`Test connection`,"pwa.offline":`You are offline. Chat and agents require the Kōbō server.`,"pwa.reconnecting":`Reconnecting to the Kōbō server…`,"pwa.installReady":`Install Kōbō as an app.`,"pwa.install":`Install`,"pwa.ignore":`Ignore`,"pwa.updateReady":`A Kōbō update is available.`,"pwa.reload":`Reload`,"chat.searchWorkspaceHistory":`Search workspace history`,"chat.historySearch.user":`You`,"chat.historySearch.agent":`Agent`,"chat.openInGitDiff":`Open in Git diff`,"timeline.title":`Session timeline`,"timeline.export":`Export diagnostic`,"timeline.unnamed":`Agent session`,"timeline.tools":`{count} tools`,"timeline.errors":`{count} errors`,"settings.availableVariables":`Available template variables`,"settings.prPromptTemplate":`PR prompt template`,"settings.prPromptPlaceholder":`Instructions for the agent when creating GitHub PRs...`,"settings.prPromptHint":`Use the template variables listed above (double curly brace syntax).`,"settings.reviewPromptTemplate":`Review prompt template`,"settings.reviewPromptPlaceholder":`Instructions for the agent when reviewing branch changes...`,"settings.ciFixPromptTemplate":`CI fix prompt template`,"settings.ciFixPromptHint":`Sent to the agent when a workspace has failing CI. Variables (double-brace syntax): pr_url, pr_number, pr_title, branch_name, source_branch, workspace_name, workspace_id, project_name, failed_jobs, ci_run_url.`,"settings.ciFixPromptPlaceholder":`Ask the agent to diagnose and fix the failing CI jobs...`,"settings.finalizationPromptTemplate":`Auto-loop finalization prompt`,"settings.finalizationPromptHint":`Default prompt for the final auto-loop iteration (last quality checks). Used when a project leaves its own finalization prompt empty.`,"settings.finalizationPromptPlaceholder":`Run final quality checks before closing the workspace...`,"settings.notionInitialPrompt":`Notion initial prompt`,"settings.notionInitialPrompt.help":`Appended to the workspace creation prompt when the workspace has a Notion ticket. Variables: {variables}.`,"settings.notionInitialPrompt.project":`Notion initial prompt (override)`,"settings.sentryInitialPrompt":`Sentry initial prompt`,"settings.sentryInitialPrompt.help":`Appended to the workspace creation prompt when the workspace has a Sentry issue. Variables: {variables}.`,"settings.sentryInitialPrompt.project":`Sentry initial prompt (override)`,"settings.initialPrompt.inheritHint":`Leave blank to inherit. Type any whitespace character to disable injection at this level.`,"settings.resetToDefault":`Reset to default`,"settings.resetFailed":`Failed to load default value`,"settings.sentryIntegration":`Sentry integration`,"settings.var.prNumber":`PR number (e.g., 42)`,"settings.var.prUrl":`Full URL of the created PR`,"settings.var.branchName":`Working branch name`,"settings.var.sourceBranch":`Source branch the PR targets`,"settings.var.workspaceName":`Workspace name`,"settings.var.projectName":`Last segment of the project path`,"settings.var.notionUrl":`Notion URL if set, empty otherwise`,"settings.var.commits":`Bulleted commit list between source and head`,"settings.var.diffStats":`Git shortstat summary (files, insertions, deletions)`,"settings.var.tasks":`Regular tasks as a checkbox list`,"settings.var.acceptanceCriteria":`Acceptance criteria as a checkbox list`,"settings.gitConventions":`Git conventions (global)`,"settings.gitConventionsPlaceholder":`# Git conventions...`,"settings.gitConventionsHint":`These conventions are written to .ai/.git-conventions.md in each new workspace and must be followed by the agent before any git operation. Overridden by per-project conventions if defined.`,"settings.setupScript":`Setup script`,"settings.cleanupScript":`Cleanup script`,"settings.archiveScript":`Archive script`,"settings.archiveScriptHint":`Shell script run server-side in the worktree when a workspace is archived. Leave empty to disable.`,"settings.archiveScriptPlaceholder":`e.g. clean up containers, free disk space…`,"settings.hook.sessionEndedTitle":`Hook: session ended`,"settings.hook.sessionEndedHint":`Runs when an agent session ends, whatever the reason. Reads KOBO_SESSION_END_REASON (completed / error / killed / watchdog), KOBO_SESSION_STOP_CAUSE, KOBO_AUTOLOOP_ACTIVE, KOBO_SESSION_ID and KOBO_SESSION_EXIT_CODE. Empty = disabled.`,"settings.hook.sessionEndedPlaceholder":`e.g. npm test, or notify a chat channel…`,"settings.hook.prMergedTitle":`Hook: PR merged`,"settings.hook.prMergedHint":`Runs when a PR is detected as merged, before the workspace is archived or purged — the worktree is still on disk. Reads KOBO_PR_NUMBER and KOBO_PR_URL. Empty = disabled.`,"settings.hook.prMergedPlaceholder":`e.g. trigger a deployment, tag a release…`,"settings.hook.autoLoopDisabledTitle":`Hook: auto-loop stopped`,"settings.hook.autoLoopDisabledHint":`Runs whenever auto-loop is disabled, by Kōbō or by you. Reads KOBO_AUTOLOOP_REASON (completed / stall / error / user-action / awaiting-clarification) and KOBO_TASKS_PENDING. Empty = disabled.`,"settings.hook.autoLoopDisabledPlaceholder":`e.g. send a notification when the loop stalls…`,"settings.changeSourceBranchScript":`Change-source-branch script`,"settings.changeSourceBranchScript.help":`Replaces the built-in cherry-pick when non-empty. The script owns git, PR base, force-push and conflicts; Kōbō still refuses while the agent is running and updates the source-branch metadata on exit 0.`,"settings.changeSourceBranchScript.envHelp":`KOBO_NEW_BASE — new source branch chosen in the dialog
4
+ `:t.breakLineCode,a=t.needIndent?t.needIndent:n!==`arrow`,o=e.helpers||[],s=ti(e,{filename:r,breakLineCode:i,needIndent:a});s.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),s.indent(a),o.length>0&&(s.push(`const { ${sr(o.map(e=>`${e}: _${e}`),`, `)} } = ctx`),s.newline()),s.push(`return `),oi(s,e),s.deindent(a),s.push(`}`),delete e.helpers;let{code:c,map:l}=s.context();return{ast:e,code:c,map:l?l.toJSON():void 0}};function ci(e,t={}){let n=z({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null||n.optimize,o=Kr(n).parse(e);return r?(a&&Qr(o),i&&ei(o),{ast:o,code:``}):(Zr(o,n),si(o,n))}function li(){typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(er().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ui(e){return G(e)&&bi(e)===0&&(nr(e,`b`)||nr(e,`body`))}var di=[`b`,`body`];function fi(e){return Di(e,di)}var pi=[`c`,`cases`];function mi(e){return Di(e,pi,[])}var hi=[`s`,`static`];function gi(e){return Di(e,hi)}var _i=[`i`,`items`];function vi(e){return Di(e,_i,[])}var yi=[`t`,`type`];function bi(e){return Di(e,yi)}var xi=[`v`,`value`];function Si(e,t){let n=Di(e,xi);if(n!=null)return n;throw ki(t)}var Ci=[`m`,`modifier`];function wi(e){return Di(e,Ci)}var Ti=[`k`,`key`];function Ei(e){let t=Di(e,Ti);if(t)return t;throw ki(6)}function Di(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(nr(e,r)&&e[r]!=null)return e[r]}return n}var Oi=[...di,...pi,...hi,..._i,...Ti,...Ci,...xi,...yi];function ki(e){return Error(`unhandled node type: ${e}`)}function Ai(e){return t=>ji(t,e)}function ji(e,t){let n=fi(t);if(n==null)throw ki(0);if(bi(n)===1){let t=mi(n);return e.plural(t.reduce((t,n)=>[...t,Mi(e,n)],[]))}return Mi(e,n)}function Mi(e,t){let n=gi(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=vi(t).reduce((t,n)=>[...t,Ni(e,n)],[]);return e.normalize(n)}}function Ni(e,t){let n=bi(t);switch(n){case 3:return Si(t,n);case 9:return Si(t,n);case 4:{let r=t;if(nr(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(nr(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw ki(n)}case 5:{let r=t;if(nr(r,`i`)&&R(r.i))return e.interpolate(e.list(r.i));if(nr(r,`index`)&&R(r.index))return e.interpolate(e.list(r.index));throw ki(n)}case 6:{let n=t,r=wi(n),i=Ei(n);return e.linked(Ni(e,i),r?Ni(e,r):void 0,e.type)}case 7:return Si(t,n);case 8:return Si(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var Pi=e=>e,Fi=B();function Ii(e,t={}){let n=!1,r=t.onError||Ar;return t.onError=e=>{n=!0,r(e)},{...ci(e,t),detectError:n}}function Li(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&U(e)){W(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||Pi)(e),r=Fi[n];if(r)return r;let{ast:i,detectError:a}=Ii(e,{...t,location:!1,jit:!0}),o=Ai(i);return a?o:Fi[n]=o}{let t=e.cacheKey;return t?Fi[t]||(Fi[t]=Ai(e)):Ai(e)}}var Ri={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function zi(e){return kr(e,null,void 0)}Ri.INVALID_ARGUMENT,Ri.INVALID_DATE_ARGUMENT,Ri.INVALID_ISO_DATE_ARGUMENT,Ri.NOT_SUPPORT_NON_STRING_MESSAGE,Ri.NOT_SUPPORT_LOCALE_PROMISE_VALUE,Ri.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,Ri.NOT_SUPPORT_LOCALE_TYPE;function Bi(e,t){return t.locale==null?Hi(e.locale):Hi(t.locale)}var Vi;function Hi(e){if(U(e))return e;if(H(e)){if(e.resolvedOnce&&Vi!=null)return Vi;if(e.constructor.name===`Function`){let t=e();if(rr(t))throw zi(Ri.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Vi=t}throw zi(Ri.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw zi(Ri.NOT_SUPPORT_LOCALE_TYPE)}function Ui(e,t,n){return[...new Set([n,...V(t)?t:G(t)?Object.keys(t).filter(e=>e!=="default"):U(t)?[t]:[n]])]}function Wi(e,t,n){let r=U(n)?n:oa,i=e,a;G(t)?(i.__localeChainObjectCache||=new WeakMap,a=i.__localeChainObjectCache.get(t),a||(a=new Map,i.__localeChainObjectCache.set(t,a))):(i.__localeChainCache||=new Map,a=i.__localeChainCache.get(t),a||(a=new Map,i.__localeChainCache.set(t,a)));let o=a.get(r);if(o)return o;let s=[],c=[n];for(;V(c);)c=Gi(s,c,t);let l=V(t)||!K(t)?t:t.default?t.default:null;return c=U(l)?[l]:l,V(c)&&Gi(s,c,!1),a.set(r,s),s}function Gi(e,t,n){let r=!0;for(let i=0;i<t.length&&W(r);i++){let a=t[i];U(a)&&(r=Ki(e,t[i],n))}return r}function Ki(e,t,n){let r,i=t.split(`-`);do r=qi(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function qi(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(V(n)||K(n))&&n[i]&&(r=n[i])}return r}var Ji=[];Ji[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ji[1]={w:[1],".":[2],"[":[4],o:[7]},Ji[2]={w:[2],i:[3,0],0:[3,0]},Ji[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ji[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ji[5]={"'":[4,0],o:8,l:[5,0]},Ji[6]={'"':[4,0],o:8,l:[6,0]};var Yi=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Xi(e){return Yi.test(e)}function Zi(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function Qi(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function $i(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:Xi(t)?Zi(t):`*`+t}function ea(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=$i(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=Qi(a),d=Ji[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var ta=new Map;function na(e,t){return G(e)?e[t]:null}function ra(e,t){if(!G(e))return null;let n=ta.get(t);if(n||(n=ea(t),n&&ta.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(Oi.includes(e)&&ui(i)||!G(i)||!nr(i,e))return null;let t=i[e];if(t===void 0||H(i))return null;i=t,a++}return i}var ia={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,INVALID_NUMBER_ARGUMENT:8,INVALID_DATE_ARGUMENT:9};ia.NOT_FOUND_KEY,ia.FALLBACK_TO_TRANSLATE,ia.CANNOT_FORMAT_NUMBER,ia.FALLBACK_TO_NUMBER_FORMAT,ia.CANNOT_FORMAT_DATE,ia.FALLBACK_TO_DATE_FORMAT,ia.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER,ia.INVALID_NUMBER_ARGUMENT,ia.INVALID_DATE_ARGUMENT;var aa=`11.4.12`,oa=`en-US`,sa=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function ca(){return{upper:(e,t)=>t===`text`&&U(e)?e.toUpperCase():t===`vnode`&&G(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&U(e)?e.toLowerCase():t===`vnode`&&G(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&U(e)?sa(e):t===`vnode`&&G(e)&&`__v_isVNode`in e?sa(e.children):e}}var la;function ua(e){la=e}var da;function fa(e){da=e}var pa;function ma(e){pa=e}var ha=null,ga=e=>{ha=e},_a=()=>ha,va=0;function ya(e={}){let t=H(e.onWarn)?e.onWarn:cr,n=U(e.version)?e.version:aa,r=U(e.locale)||H(e.locale)?e.locale:oa,i=H(r)?oa:r,a=V(e.fallbackLocale)||K(e.fallbackLocale)||U(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=K(e.messages)?e.messages:ba(i),s=K(e.datetimeFormats)?e.datetimeFormats:ba(i),c=K(e.numberFormats)?e.numberFormats:ba(i),l=z(B(),e.modifiers,ca()),u=e.pluralRules||B(),d=H(e.missing)?e.missing:null,f=W(e.missingWarn)||Xn(e.missingWarn)?e.missingWarn:!0,p=W(e.fallbackWarn)||Xn(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=H(e.postTranslation)?e.postTranslation:null,_=K(e.processor)?e.processor:null,v=!W(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,b=H(e.messageCompiler)?e.messageCompiler:la,x=H(e.messageResolver)?e.messageResolver:da||na,S=H(e.localeFallbacker)?e.localeFallbacker:pa||Ui,C=G(e.fallbackContext)?e.fallbackContext:void 0,w=e,T=G(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,E=G(w.__numberFormatters)?w.__numberFormatters:new Map,D=G(w.__meta)?w.__meta:{};va++;let O={version:n,cid:va,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:C,onWarn:t,__meta:D};return O.datetimeFormats=s,O.numberFormats=c,O.__datetimeFormatters=T,O.__numberFormatters=E,O}var ba=e=>({[e]:B()});function xa(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return U(r)?r:t}return t}function Sa(e,t){let n=e;G(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function Ca(e,t,n){Sa(e,n),e.fallbackContext&&Sa(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function wa(e,t){return e!==t&&e.split(`-`)[0]===t.split(`-`)[0]}function Ta(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(wa(e,t[r]))return!0;return!1}function Ea(e,t,n,r,i,a,o){let{fallbackLocale:s,localeFallbacker:c,onWarn:l}=e,u=c(e,s,n);for(let n=0;n<u.length;n++){let a=u[n],s=(r[a]||{})[t];if(K(s)&&U(a))return a;xa(e,t,a,i,o)}return null}function Da(e,t,n){let r=`${e}__${t}`;return K(n)&&!Zn(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function Oa(e,t,n){for(let r in n){let n=`${t}__${r}`;for(let t of e.keys())(t===n||t.startsWith(`${n}__`))&&e.delete(t)}}function ka(e,t,n,r){let[,i,a,o]=e,s=n;return U(i)?t.key=i:K(i)&&Object.keys(i).forEach(e=>{r.includes(e)?s[e]=i[e]:t[e]=i[e]}),U(a)?t.locale=a:K(a)&&(s=a),K(o)&&(s=o),s}var Aa=typeof Intl<`u`;Aa&&Intl.DateTimeFormat,Aa&&Intl.NumberFormat;function ja(e,...t){let{datetimeFormats:n,unresolving:r,onWarn:i}=e,{__datetimeFormatters:a}=e;if(!U(t[0])&&!Yn(t[0])&&!R(t[0]))return``;let[o,s,c,l]=Na(...t),u=W(c.missingWarn)?c.missingWarn:e.missingWarn,d=W(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=Bi(e,c);if(!U(o)||o===``){let e=new Intl.DateTimeFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Ea(e,o,p,n,u,d,`datetime format`);if(!U(m))return r?-1:o;let h=n[m][o],g=Da(m,o,l),_=a.get(g);return _||(_=new Intl.DateTimeFormat(m,z({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var Ma=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function Na(...e){let[t]=e,n=B(),r=B(),i;if(U(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw zi(Ri.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();i=new Date(n);try{i.toISOString()}catch{throw zi(Ri.INVALID_ISO_DATE_ARGUMENT)}}else if(Yn(t)){if(isNaN(t.getTime()))throw zi(Ri.INVALID_DATE_ARGUMENT);i=t}else if(R(t))i=t;else throw zi(Ri.INVALID_ARGUMENT);let a=ka(e,n,r,Ma);return[n.key||``,i,n,a]}function Pa(e,t,n){Oa(e.__datetimeFormatters,t,n)}function Fa(e,...t){let{numberFormats:n,unresolving:r,onWarn:i}=e,{__numberFormatters:a}=e;if(!R(t[0]))return``;let[o,s,c,l]=La(...t),u=W(c.missingWarn)?c.missingWarn:e.missingWarn,d=W(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=Bi(e,c);if(!U(o)||o===``){let e=new Intl.NumberFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Ea(e,o,p,n,u,d,`number format`);if(!U(m))return r?-1:o;let h=n[m][o],g=Da(m,o,l),_=a.get(g);return _||(_=new Intl.NumberFormat(m,z({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var Ia=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function La(...e){let[t]=e,n=B(),r=B();if(!R(t))throw zi(Ri.INVALID_ARGUMENT);let i=t,a=ka(e,n,r,Ia);return[n.key||``,i,n,a]}function Ra(e,t,n){Oa(e.__numberFormatters,t,n)}var za=e=>e,Ba=e=>``,Va=`text`,Ha=e=>e.length===0?``:sr(e),Ua=or;function Wa(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function Ga(e){let t=R(e.pluralIndex)?e.pluralIndex:-1;return R(e.named?.count)?e.named.count:R(e.named?.n)?e.named.n:t}function Ka(e={}){let t=e.locale,n=Ga(e),r=U(t)&&H(e.pluralRules?.[t])?e.pluralRules[t]:Wa,i=r===Wa?void 0:Wa,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||B();R(e.pluralIndex)&&(c.count||=e.pluralIndex,c.n||=e.pluralIndex);let l=e=>c[e];function u(t,n){return(H(e.messages)?e.messages(t,!!n):G(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):Ba)}let d=t=>e.modifiers?e.modifiers[t]:za,f=H(e.processor?.normalize)?e.processor.normalize:Ha,p=H(e.processor?.interpolate)?e.processor.interpolate:Ua,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?G(n)?(a=n.modifier||a,i=n.type||i):U(n)&&(a=n||a):t.length===2&&(U(n)&&(a=n||a),U(r)&&(i=r||i));let o=u(e,!0)(m),s=o===``||o===void 0?e:o,c=i===`vnode`&&V(s)&&a?s[0]:s;return a?d(a)(c,i):c},message:u,type:U(e.processor?.type)?e.processor.type:Va,interpolate:p,normalize:f,values:z(B(),o,c)};return m}var qa=()=>``,Ja=e=>H(e);function Ya(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=eo(...t),u=W(l.missingWarn)?l.missingWarn:e.missingWarn,d=W(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=W(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=U(l.default)||W(l.default)?W(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(U(m)||H(m)),g=Bi(e,l);f&&Xa(l);let[_,v,y]=p?[c,g,s[g]||B()]:Za(e,c,g,o,d,u),b=_,x=c;if(!p&&!(U(b)||ui(b)||Ja(b))&&h&&(b=m,x=b),!p&&(!(U(b)||ui(b)||Ja(b))||!U(v)))return i?-1:c;let S=!1,C=Ja(b)?b:Qa(e,c,v,b,x,()=>{S=!0});if(S)return b;let w=$a(e,C,Ka(no(e,v,y,l))),T=r?r(w,c):w;return f&&U(T)&&(T=wr(T)),T}function Xa(e){V(e.list)?e.list=e.list.map(e=>U(e)?lr(e):e):G(e.named)&&Object.keys(e.named).forEach(t=>{U(e.named[t])&&(e.named[t]=lr(e.named[t]))})}function Za(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=B(),f,p=null;for(let n=0;n<u.length&&(f=u[n],d=o[f]||B(),(p=c(d,t))===null&&(p=d[t]),!(U(p)||ui(p)||Ja(p)));n++)if(!Ta(f,u)){let n=xa(e,t,f,a,`translate`);n!==t&&(p=n)}return[p,f,d]}function Qa(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(Ja(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=o(r,to(e,n,i,r,s,a));return c.locale=n,c.key=t,c.source=r,c}function $a(e,t,n){return t(n)}function eo(...e){let[t,n,r]=e,i=B();if(!U(t)&&!R(t)&&!Ja(t)&&!ui(t))throw zi(Ri.INVALID_ARGUMENT);let a=R(t)?String(t):(Ja(t),t);return R(n)?i.plural=n:U(n)?i.default=n:K(n)&&!Zn(n)?i.named=n:V(n)&&(i.list=n),R(r)?i.plural=r:U(r)?i.default=r:K(r)&&z(i,r),[a,i]}function to(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>qn(t,n,e)}}function no(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[n,,i]=Za(u||e,r,t,s,c,l);a=n??o(i,r)}if(U(a)||ui(a)){let n=!1,i=Qa(e,r,t,a,r,()=>{n=!0});return n?qa:i}return Ja(a)?a:qa}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),R(r.plural)&&(d.pluralIndex=r.plural),d}li();var ro=`11.4.12`;function io(){typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(er().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}var J={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function ao(e,...t){return kr(e,null,void 0)}J.UNEXPECTED_RETURN_TYPE,J.INVALID_ARGUMENT,J.MUST_BE_CALL_SETUP_TOP,J.NOT_INSTALLED,J.UNEXPECTED_ERROR,J.REQUIRED_VALUE,J.INVALID_VALUE,J.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN,J.NOT_INSTALLED_WITH_PROVIDE,J.NOT_COMPATIBLE_LEGACY_VUE_I18N,J.NOT_AVAILABLE_COMPOSITION_IN_LEGACY;var oo=Kn(`__translateVNode`),so=Kn(`__datetimeParts`),co=Kn(`__numberParts`),lo=Kn(`__setPluralRules`);Kn(`__intlifyMeta`);var uo=Kn(`__injectWithOption`),fo=Kn(`__dispose`),po={FALLBACK_TO_ROOT:10,NOT_FOUND_PARENT_SCOPE:11,IGNORE_OBJ_FLATTEN:12,DEPRECATE_LEGACY_MODE:13,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:14,DUPLICATE_USE_I18N_CALLING:15};po.FALLBACK_TO_ROOT,po.NOT_FOUND_PARENT_SCOPE,po.IGNORE_OBJ_FLATTEN,po.DEPRECATE_LEGACY_MODE,po.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE,po.DUPLICATE_USE_I18N_CALLING;var mo=null;{let e=er().__VUE_INSTANCE_SETTERS__;V(e)&&e.push(e=>{mo=e})}function ho(e){if(!G(e)||ui(e))return e;for(let t in e)if(nr(e,t)){if(!t.includes(`.`))G(e[t])&&ho(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=B()),!G(i[n[e]])){a=!0;break}i=i[n[e]]}if(a||(ui(i)?Oi.includes(n[r])||delete e[t]:(i[n[r]]=e[t],delete e[t])),!ui(i)){let e=i[n[r]];G(e)&&ho(e)}}}return e}function go(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=K(n)?n:V(r)?B():{[e]:B()};if(V(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||B(),Er(n,o[t])):Er(n,o)}else U(e)&&Er(JSON.parse(e),o)}),i==null&&a)for(let e in o)nr(o,e)&&ho(o[e]);return o}function _o(e){return e.type}function vo(e,t,n){let r=G(t.messages)?t.messages:B();`__i18nGlobal`in n&&(r=go(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),G(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(G(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function yo(e){return w(ee,null,e,0)}function bo(){return mo??T()}var xo=()=>[],So=()=>!1,Co=0;function wo(e){return((t,n,r,i)=>e(n,r,bo()||void 0,i))}function To(e={}){let{__root:n,__injectWithOption:r}=e,i=n===void 0,a=e.flatJson,o=Gn?d:t,s=!W(e.inheritLocale)||e.inheritLocale,c=o(n&&s?n.locale.value:U(e.locale)?e.locale:oa),l=o(n&&s?n.fallbackLocale.value:U(e.fallbackLocale)||V(e.fallbackLocale)||K(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:c.value),u=o(go(c.value,e)),f=o(K(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),p=o(K(e.numberFormats)?e.numberFormats:{[c.value]:{}}),h=n?n.missingWarn:W(e.missingWarn)||Xn(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:W(e.fallbackWarn)||Xn(e.fallbackWarn)?e.fallbackWarn:!0,_=n?n.fallbackRoot:!W(e.fallbackRoot)||e.fallbackRoot,v=!!e.fallbackFormat,y=H(e.missing)?e.missing:null,b=H(e.missing)?wo(e.missing):null,x=H(e.postTranslation)?e.postTranslation:null,S=n?n.warnHtmlMessage:!W(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter,w=n?n.modifiers:K(e.modifiers)?e.modifiers:{},T=e.pluralRules||n&&n.pluralRules,E;E=(()=>{i&&ga(null);let t={version:ro,locale:c.value,fallbackLocale:l.value,messages:u.value,modifiers:w,pluralRules:T,missing:b===null?void 0:b,missingWarn:h,fallbackWarn:g,fallbackFormat:v,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:S,escapeParameter:C,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=f.value,t.numberFormats=p.value,t.__datetimeFormatters=K(E)?E.__datetimeFormatters:void 0,t.__numberFormatters=K(E)?E.__numberFormatters:void 0;let n=ya(t);return i&&ga(n),n})(),Ca(E,c.value,l.value);function D(){return[c.value,l.value,u.value,f.value,p.value]}let O=A({get:()=>c.value,set:e=>{E.locale=e,c.value=e}});function k(e){i||(E.fallbackContext=n?_a():void 0);try{Ca(E,c.value,e)}finally{i||(E.fallbackContext=void 0)}}let j=A({get:()=>l.value,set:e=>{l.value=e,E.fallbackLocale=l.value,k(l.value)}}),M=A(()=>u.value),ee=A(()=>f.value),te=A(()=>p.value);function N(){return H(x)?x:null}function ne(e){x=e,E.postTranslation=e}function re(){return y}function ie(e){e!==null&&(b=wo(e)),y=e,E.missing=b}let P=(e,t,r,a,o,s)=>{D();let c;try{i||(E.fallbackContext=n?_a():void 0),c=e(E)}finally{i||(E.fallbackContext=void 0)}if(r!==`translate exists`&&R(c)&&c===-1||r===`translate exists`&&!c){let[e,r]=t();return n&&_?a(n):o(e)}if(s(c))return c;throw ao(J.UNEXPECTED_RETURN_TYPE)};function ae(...e){return P(t=>Reflect.apply(Ya,null,[t,...e]),()=>eo(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>U(e))}function oe(...e){let[t,n,r]=e;if(r&&!G(r))throw ao(J.INVALID_ARGUMENT);return ae(t,n,z({resolvedMessage:!0},r||{}))}function se(...e){return P(t=>Reflect.apply(ja,null,[t,...e]),()=>Na(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>U(e)||V(e))}function ce(...e){return P(t=>Reflect.apply(Fa,null,[t,...e]),()=>La(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>U(e)||V(e))}function F(e){return e.map(e=>U(e)||R(e)||W(e)?yo(String(e)):e)}let le={normalize:F,interpolate:e=>e,type:`vnode`};function ue(...e){return P(t=>{let n,r=t;try{r.processor=le,n=Reflect.apply(Ya,null,[r,...e])}finally{r.processor=null}return n},()=>eo(...e),`translate`,t=>t[oo](...e),e=>[yo(e)],e=>V(e))}function de(...e){return P(t=>Reflect.apply(Fa,null,[t,...e]),()=>La(...e),`number format`,t=>t[co](...e),xo,e=>U(e)||V(e))}function I(...e){return P(t=>Reflect.apply(ja,null,[t,...e]),()=>Na(...e),`datetime format`,t=>t[so](...e),xo,e=>U(e)||V(e))}function fe(e){T=e,E.pluralRules=T}function pe(e,t){return P(()=>{if(!e)return!1;let n=U(t)?t:c.value,r=U(t)?[n]:Wi(E,l.value,n);for(let t=0;t<r.length;t++){let n=ge(r[t]),i=E.messageResolver(n,e);if(i===null&&(i=n[e]),ui(i)||Ja(i)||U(i))return!0}return!1},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),So,e=>W(e))}function me(e){let t=null,n=Wi(E,l.value,c.value);for(let r=0;r<n.length;r++){let i=u.value[n[r]]||{},a=E.messageResolver(i,e);if(a!=null){t=a;break}}return t}function he(e){return me(e)??(n&&n.tm(e)||{})}function ge(e){return u.value[e]||{}}function _e(e,t){if(a){let n={[e]:t};for(let e in n)nr(n,e)&&ho(n[e]);t=n[e]}u.value[e]=t,E.messages=u.value}function ve(e,t){u.value[e]=u.value[e]||{};let n={[e]:t};if(a)for(let e in n)nr(n,e)&&ho(n[e]);t=n[e],Er(t,u.value[e]),E.messages=u.value}function ye(e){return f.value[e]||{}}function be(e,t){f.value[e]=t,E.datetimeFormats=f.value,Pa(E,e,t)}function xe(e,t){f.value[e]=z(f.value[e]||{},t),E.datetimeFormats=f.value,Pa(E,e,t)}function Se(e){return p.value[e]||{}}function Ce(e,t){p.value[e]=t,E.numberFormats=p.value,Ra(E,e,t)}function we(e,t){p.value[e]=z(p.value[e]||{},t),E.numberFormats=p.value,Ra(E,e,t)}Co++,m(l,()=>k(l.value),{deep:!0,flush:`sync`}),n&&Gn&&(m(n.locale,e=>{s&&(c.value=e,E.locale=e,Ca(E,c.value,l.value))}),m(n.fallbackLocale,e=>{s&&(l.value=e,E.fallbackLocale=l.value,Ca(E,c.value,l.value))}));let L={id:Co,locale:O,fallbackLocale:j,get inheritLocale(){return s},set inheritLocale(e){s=e,e&&n&&(O.value=n.locale.value,j.value=n.fallbackLocale.value)},get availableLocales(){return Object.keys(u.value).sort()},messages:M,get modifiers(){return w},get pluralRules(){return T||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(e){h=e,E.missingWarn=h},get fallbackWarn(){return g},set fallbackWarn(e){g=e,E.fallbackWarn=g},get fallbackRoot(){return _},set fallbackRoot(e){_=e},get fallbackFormat(){return v},set fallbackFormat(e){v=e,E.fallbackFormat=v},get warnHtmlMessage(){return S},set warnHtmlMessage(e){S=e,E.warnHtmlMessage=e},get escapeParameter(){return C},set escapeParameter(e){C=e,E.escapeParameter=e},t:ae,getLocaleMessage:ge,setLocaleMessage:_e,mergeLocaleMessage:ve,getPostTranslationHandler:N,setPostTranslationHandler:ne,getMissingHandler:re,setMissingHandler:ie,[lo]:fe};return L.datetimeFormats=ee,L.numberFormats=te,L.rt=oe,L.te=pe,L.tm=he,L.d=se,L.n=ce,L.getDateTimeFormat=ye,L.setDateTimeFormat=be,L.mergeDateTimeFormat=xe,L.getNumberFormat=Se,L.setNumberFormat=Ce,L.mergeNumberFormat=we,L[uo]=r,L[oo]=ue,L[so]=I,L[co]=de,L}var Eo={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function Do({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===M?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},B())}function Oo(){return M}var ko=N({name:`i18n-t`,props:z({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>R(e)||!isNaN(e)}},Eo),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||Bo({useScope:e.scope,__useComponent:!0});return()=>{let a=()=>{let r=Object.keys(n).filter(e=>e[0]!==`_`),a=B();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=U(e.plural)?+e.plural:e.plural);let o=Do(t,r);return i[oo](e.keypath,o,a)},o=z(B(),r),s=U(e.tag)||G(e.tag)?e.tag:Oo();return G(s)?f(s,o,{default:a}):f(s,o,a())}}});function Ao(e){return V(e)&&!U(e[0])}function jo(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t=()=>{let t={part:!0},a=B();e.locale&&(t.locale=e.locale),U(e.format)?t.key=e.format:G(e.format)&&(U(e.format.key)&&(t.key=e.format.key),a=Object.keys(e.format).reduce((t,r)=>n.includes(r)?z(B(),t,{[r]:e.format[r]}):t,B()));let o=r(e.value,t,a),s=[t.key];return V(o)?s=o.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:o}):[e.value];return Ao(r)&&(r[0].key=`${e.type}-${t}`),r}):U(o)&&(s=[o]),s},o=z(B(),a),s=U(e.tag)||G(e.tag)?e.tag:Oo();return G(s)?f(s,o,{default:t}):f(s,o,t())}}var Mo=N({name:`i18n-n`,props:z({value:{type:Number,required:!0},format:{type:[String,Object]}},Eo),setup(e,t){let n=e.i18n||Bo({useScope:e.scope,__useComponent:!0});return jo(e,t,Ia,(...e)=>n[co](...e))}});function No(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function Po(e){let t=t=>{let{instance:n,value:r}=t;if(!n||!n.$)throw ao(J.UNEXPECTED_ERROR);let i=No(e,n.$),a=Fo(r);return[Reflect.apply(i.t,i,[...Io(a)]),i]};return{created:(e,n)=>{let[r,i]=t(n);Gn&&(e.__i18nWatcher=m(i.locale,()=>{n.instance&&n.instance.$forceUpdate()})),e.__composer=i,e.textContent=r},unmounted:e=>{Gn&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=Fo(t);e.textContent=Reflect.apply(n.t,n,[...Io(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function Fo(e){if(U(e))return{path:e};if(K(e)){if(!(`path`in e))throw ao(J.REQUIRED_VALUE,`path`);return e}throw ao(J.INVALID_VALUE)}function Io(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return U(n)&&(o.locale=n),R(i)&&(o.plural=i),R(a)&&(o.plural=a),[t,s,o]}function Lo(e,t,...n){let r=K(n[0])?n[0]:{};(!W(r.globalInstall)||r.globalInstall)&&([ko.name,`I18nT`].forEach(t=>e.component(t,ko)),[Mo.name,`I18nN`].forEach(t=>e.component(t,Mo)),[Zo.name,`I18nD`].forEach(t=>e.component(t,Zo))),e.directive(`t`,Po(t))}var Ro=Kn(`global-vue-i18n`);function zo(e={}){let t=!W(e.globalInjection)||e.globalInjection,n=new Map,[r,i]=Vo(e,!1),a=Kn(``);function o(e){return n.get(e)||null}function s(e,t){n.set(e,t)}function c(e){n.delete(e)}let l={get mode(){return`composition`},async install(e,...n){if(e.__VUE_I18N_SYMBOL__=a,e.provide(e.__VUE_I18N_SYMBOL__,l),K(n[0])){let e=n[0];l.__composerExtend=e.__composerExtend,l.__vueI18nExtend=e.__vueI18nExtend}let r=null;t&&(r=Xo(e,l.global)),Lo(e,l,...n);let i=e.unmount;e.unmount=()=>{r&&r(),l.dispose(),i()}},get global(){return i},dispose(){r.stop()},__instances:n,__getInstance:o,__setInstance:s,__deleteInstance:c};return l}function Bo(e={}){let t=bo();if(t==null)throw ao(J.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ao(J.NOT_INSTALLED);let n=Ho(t),r=Wo(n),i=_o(t),a=Uo(e,i);if(a===`global`)return vo(r,e,i),r;if(a===`parent`){let i=Go(n,t,e.__useComponent);return i??=r,i}if(a===`isolated`){if(n.mode!==`composition`)throw ao(J.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);let i=n,a=z({},e);a.__root=Go(n,t)||r;let o=To(a);return i.__composerExtend&&(o[fo]=i.__composerExtend(o)),s()&&c(()=>{let e=o[fo];e&&(e(),delete o[fo])}),o}let o=n,l=o.__getInstance(t);if(l==null){let n=z({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),l=To(n),o.__composerExtend&&(l[fo]=o.__composerExtend(l)),qo(o,t,l),o.__setInstance(t,l)}return l}function Vo(e,t){let r=n(),i=r.run(()=>To(e));if(i==null)throw ao(J.UNEXPECTED_ERROR);return[r,i]}function Ho(e){let t=x(e.isCE?Ro:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ao(e.isCE?J.NOT_INSTALLED_WITH_PROVIDE:J.UNEXPECTED_ERROR);return t}function Uo(e,t){return Zn(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function Wo(e){return e.mode===`composition`?e.global:e.global.__composer}function Go(e,t,n=!1){let r=null,i=t.root,a=Ko(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`&&(r=t.__getInstance(a)),r!=null||i===a)break;a=a.parent}return r}function Ko(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function qo(e,t,n){y(()=>{},t),p(()=>{let r=n;e.__deleteInstance(t);let i=r[fo];i&&(i(),delete r[fo])},t)}var Jo=[`locale`,`fallbackLocale`,`availableLocales`],Yo=[`t`,`rt`,`d`,`n`,`tm`,`te`];function Xo(e,t){let n=Object.create(null);return Jo.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw ao(J.UNEXPECTED_ERROR);let i=l(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,Yo.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw ao(J.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,Yo.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}var Zo=N({name:`i18n-d`,props:z({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Eo),setup(e,t){let n=e.i18n||Bo({useScope:e.scope,__useComponent:!0});return jo(e,t,Ma,(...e)=>n[so](...e))}});io(),ua(Li),fa(ra),ma(Wi);var Qo={class:`text-h6`},$o={class:`text-h6`},es={class:`text-h6 text-negative`},ts={class:`q-mt-sm`},ns={key:0,class:`q-mt-md text-caption`},rs={class:`q-mt-md text-caption`},is=N({__name:`MigrationOverlay`,setup(e){let{t}=Bo(),n=Wn(),r=A(()=>[`backing-up`,`running`,`error`].includes(n.status.state));return y(()=>{n.fetchInitial()}),(e,i)=>(h(),E(zn,{modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,persistent:``,"no-backdrop-dismiss":``},{default:C(()=>[w(Qt,{style:{"min-width":`400px`}},{default:C(()=>[o(n).status.state===`backing-up`?(h(),E(Jt,{key:0},{default:C(()=>[te(`div`,Qo,u(o(t)(`migration.backing_up`)),1),w(Fe,{class:`q-mt-md`})]),_:1})):o(n).status.state===`running`?(h(),E(Jt,{key:1},{default:C(()=>[te(`div`,$o,u(o(t)(`migration.running`,{processed:o(n).status.processed,total:o(n).status.total})),1),w(Zt,{value:o(n).status.total>0?o(n).status.processed/o(n).status.total:0,class:`q-mt-md`},null,8,[`value`])]),_:1})):o(n).status.state===`error`?(h(),E(Jt,{key:2},{default:C(()=>[te(`div`,es,u(o(t)(`migration.error`)),1),te(`div`,ts,u(o(n).status.errorMessage),1),o(n).status.backupPath?(h(),j(`div`,ns,u(o(t)(`migration.backup_location`,{path:o(n).status.backupPath})),1)):D(``,!0),te(`div`,rs,u(o(t)(`migration.retry`)),1)]),_:1})):D(``,!0)]),_:1})]),_:1},8,[`modelValue`]))}});function as(e){if(e.codePointAt(0)!==111||e.codePointAt(1)!==110)return!1;let t=e.codePointAt(2);return t>=65&&t<=90}function os(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let r of n)if(e[r]!==t[r]||!(r in t))return!0;return!1}function ss(){let e=T(),{attrs:t}=e,n={listeners:d({}),attributes:d({})};function r(){let r={},i={};for(let e in t)e!==`class`&&e!==`style`&&!as(e)&&(r[e]=t[e]);for(let t in e.vnode.props)as(t)&&(i[t]=e.vnode.props[t]);os(r,n.attributes.value)&&(n.attributes.value=r),os(i,n.listeners.value)&&(n.listeners.value=i)}return g(r),r(),n}function cs({validate:e,resetValidation:t,requiresQForm:n}){let r=x(ie,!1);if(r!==!1){let{props:n,proxy:i}=T();Object.assign(i,{validate:e,resetValidation:t}),m(()=>n.disable,e=>{e?(typeof t==`function`&&t(),r.unbindComponent(i)):r.bindComponent(i)}),y(()=>{n.disable||r.bindComponent(i)}),O(()=>{n.disable||r.unbindComponent(i)})}else n&&console.error(`Parent QForm not found on useFormChild()!`)}var ls=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,us=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,ds=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,fs=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,ps=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0(\.[\d]+)?|1(\.0+)?)\)$/,ms=/^-?[\d]+\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])$/,hs=/^([0-1]?\d|2[0-3]):[0-5]\d$/,gs=/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/,_s=/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/,vs=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ys={date:e=>ms.test(e),time:e=>hs.test(e),fulltime:e=>gs.test(e),timeOrFulltime:e=>_s.test(e),email:e=>vs.test(e),hexColor:e=>ls.test(e),hexaColor:e=>us.test(e),hexOrHexaColor:e=>ds.test(e),rgbColor:e=>fs.test(e),rgbaColor:e=>ps.test(e),rgbOrRgbaColor:e=>fs.test(e)||ps.test(e),hexOrRgbColor:e=>ls.test(e)||fs.test(e),hexaOrRgbaColor:e=>us.test(e)||ps.test(e),anyColor:e=>ds.test(e)||fs.test(e)||ps.test(e)},bs=[!0,!1,`ondemand`],xs={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>bs.includes(e)}};function Ss(e,t){let{props:n,proxy:r}=T(),i=d(!1),a=d(null),o=d(!1);cs({validate:y,resetValidation:v});let s=0,c,l=!1,u=!1,f=A(()=>n.rules!==void 0&&n.rules!==null&&n.rules.length!==0),p=A(()=>!n.disable&&f.value&&!t.value),h=A(()=>n.error===!0||i.value),g=A(()=>typeof n.errorMessage==`string`&&n.errorMessage.length!==0?n.errorMessage:a.value);m(()=>n.modelValue,()=>{o.value=!0,p.value&&(n.lazyRules===!1||n.lazyRules===!0&&i.value)&&b()});function _(){n.lazyRules!==`ondemand`&&p.value&&o.value&&b()}m(()=>n.reactiveRules,e=>{e?c===void 0&&(c=m(()=>n.rules,_,{immediate:!0,deep:!0})):c!==void 0&&(c(),c=void 0)},{immediate:!0}),m(()=>n.lazyRules,_),m(e,e=>{e?o.value=!0:n.lazyRules!==`ondemand`&&(p.value?b():!n.disable&&f.value&&t.value&&(u=!0))});function v(){s++,t.value=!1,o.value=!1,i.value=!1,a.value=null,u=!1,b.cancel()}function y(e=n.modelValue){if(n.disable||!f.value)return!0;let r=++s,c=n.modelValue;u=!1;let d=()=>{let e=u;u=!1,!l&&n.modelValue!==c&&p.value&&n.lazyRules!==`ondemand`&&(n.lazyRules===!1||i.value||e)&&b()},m=t.value?()=>{}:()=>{o.value=!0},h=(e,n)=>{e&&m(),i.value=e,a.value=n||null,t.value=!1},g=[];for(let t=0;t<n.rules.length;t++){let r=n.rules[t],i;if(typeof r==`function`?i=r(e,ys):typeof r==`string`&&(ys[r]===void 0?(console.error(`Unknown validation pattern rule: "${r}"`),i=!1):i=ys[r](e)),i===!1||typeof i==`string`)return h(!0,i),!1;i!==!0&&i!==void 0&&g.push(i)}return g.length===0?(h(!1),!0):(t.value=!0,Promise.all(g).then(e=>{if(e===void 0||!Array.isArray(e)||e.length===0)return r===s&&(h(!1),d()),!0;let t=e.find(e=>e===!1||typeof e==`string`);return r===s&&(h(t!==void 0,t),d()),t===void 0},e=>(r===s&&(console.error(e),h(!0),d()),!1)))}let b=de(y,0);return O(()=>{l=!0,c?.(),b.cancel()}),Object.assign(r,{resetValidation:v,validate:y}),Ae(r,`hasError`,()=>h.value),{isDirtyModel:o,hasRules:f,hasError:h,errorMessage:g,validate:y,resetValidation:v}}function Cs(e){return e!=null&&String(e).length!==0}var ws={...Re,...xs,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String,maxlength:[Number,String]},Ts=[`update:modelValue`,`clear`,`focus`,`blur`];function Es({requiredForAttr:e=!0,tagProp:n,changeEvent:r=!1}={}){let{props:i}=T(),a=ze(i,Le()),o=Qe({required:e,getValue:()=>i.for});return{requiredForAttr:e,changeEvent:r,tag:n?{get value(){return i.tag}}:{value:`label`},isDark:a,editable:A(()=>!i.disable&&!i.readonly),innerLoading:d(!1),focused:d(!1),hasPopupOpen:!1,splitAttrs:ss(),targetUid:o,rootRef:t(null),targetRef:t(null),controlRef:t(null)}}var Ds={class:`q-field__prepend q-field__marginal row no-wrap items-center`,key:`prepend`,onClick:fe},Os={class:`q-field__append q-field__marginal row no-wrap items-center`,key:`append`,onClick:fe},ks=`input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), a[href], [tabindex]:not([disabled]), [contenteditable]:not([contenteditable="false"])`,As={class:`q-field__control-container col relative-position row no-wrap q-anchor--skip`},js={class:`q-field__prefix no-pointer-events row items-center`},Ms={class:`q-field__suffix no-pointer-events row items-center`},Ns={class:`q-field__inner relative-position col self-stretch`},Ps={class:`q-field__before q-field__marginal row no-wrap items-center`,onClick:fe},Fs={class:`q-field__after q-field__marginal row no-wrap items-center`,onClick:fe},Is={};function Ls(e,t){return t===null?null:f(`div`,{key:e,class:`q-field__append q-field__marginal row no-wrap items-center q-anchor--skip`},t)}function Rs(e){let{props:t,emit:n,slots:r,attrs:i,proxy:a}=T(),o=Le(),s=null;e.hasValue===void 0&&(e.hasValue=A(()=>Cs(t.modelValue))),e.emitValue===void 0&&(e.emitValue=e=>{n(`update:modelValue`,e)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:N,onFocusout:ne,onPopupShow:re,onPopupHide:ie}),Object.assign(e,{clearValue:P,onControlFocusin:N,onControlFocusout:ne,focus:M}),e.computedCounter===void 0&&(e.computedCounter=A(()=>{if(t.counter){let e=typeof t.modelValue==`string`||typeof t.modelValue==`number`?String(t.modelValue).length:Array.isArray(t.modelValue)?t.modelValue.length:0,n=t.maxlength===void 0?t.maxValues:t.maxlength;return e+(n===void 0?``:` / `+n)}}));let{isDirtyModel:c,hasRules:l,hasError:u,errorMessage:d,resetValidation:p}=Ss(e.focused,e.innerLoading),m=A(()=>u.value&&e.targetUid.value?`${e.targetUid.value}_error`:void 0);function h(e){if(u.value!==!0)return Is;let n={"aria-invalid":`true`};return m.value!==void 0&&(!t.hideBottomSpace||t.counter||r.counter!==void 0||d.value!==null||r.error!==void 0)&&(n[`aria-errormessage`]=e?.[`aria-errormessage`]===void 0?m.value:e[`aria-errormessage`],n[`aria-describedby`]=e?.[`aria-describedby`]===void 0?m.value:`${e[`aria-describedby`]} ${m.value}`),n}Object.assign(e,{hasError:u,errorMessage:d,errorMessageId:m,getErrorAriaAttrs:h});let g=e.floatingLabel===void 0?A(()=>t.stackLabel||e.focused.value||e.hasValue.value):A(()=>t.stackLabel||e.focused.value||e.floatingLabel.value),b=A(()=>t.bottomSlots||t.hint!==void 0||l.value||t.counter||t.error!==null),x=A(()=>`q-field row no-wrap items-start q-field--`+(t.filled?`filled`:t.outlined?`outlined`:t.borderless?`borderless`:t.standout?`standout`:`standard`)+(e.fieldClass===void 0?``:` ${e.fieldClass.value}`)+(t.rounded?` q-field--rounded`:``)+(t.square?` q-field--square`:``)+(g.value?` q-field--float`:``)+(C.value?` q-field--labeled`:``)+(t.dense?` q-field--dense`:``)+(t.itemAligned?` q-field--item-aligned q-item-type`:``)+(e.isDark()?` q-field--dark`:``)+(e.getControl===void 0?` q-field--auto-height`:``)+(e.focused.value?` q-field--focused`:``)+(u.value?` q-field--error`:``)+(u.value||e.focused.value?` q-field--highlighted`:``)+(!t.hideBottomSpace&&b.value?` q-field--with-bottom`:``)+(t.disable?` q-field--disabled`:t.readonly?` q-field--readonly`:``)),S=A(()=>`q-field__control relative-position row no-wrap`+(t.bgColor===void 0?``:` bg-${t.bgColor}`)+(u.value?` text-negative`:typeof t.standout==`string`&&t.standout.length!==0&&e.focused.value?` ${t.standout}`:t.color===void 0?``:` text-${t.color}`)),C=A(()=>t.labelSlot||t.label!==void 0),w=A(()=>`q-field__label no-pointer-events absolute ellipsis`+(t.labelColor!==void 0&&!u.value?` text-${t.labelColor}`:``)),E=A(()=>Ae({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:g.value,modelValue:t.modelValue,emitValue:e.emitValue,ariaInvalid:u.value===!0?`true`:void 0,ariaDescribedby:m.value,ariaErrormessage:m.value},`field`,()=>e.rootRef.value)),D=A(()=>{let n={};return e.targetUid.value&&(n.for=e.targetUid.value),t.disable&&(n[`aria-disabled`]=`true`),n});function j(){let t=document.activeElement,n=e.targetRef?.value;n&&(t===null||t.id!==e.targetUid.value)&&(n.hasAttribute(`tabindex`)||(n=n.querySelector(`[tabindex]`)),n!==t&&n?.focus({preventScroll:!0}))}function M(){$e(j)}function ee(t){let n=t.target,r=e.targetUid.value===null?null:document.getElementById(e.targetUid.value);if(!(r!==null&&n.contains(r)&&(r.focus({preventScroll:!0}),document.activeElement===r))){for(let e of n.querySelectorAll(ks))if(e.focus({preventScroll:!0}),document.activeElement===e)return}}function te(){qe(j);let t=document.activeElement;t!==null&&e.rootRef.value.contains(t)&&t.blur()}function N(r){s!==null&&(clearTimeout(s),s=null),!t.disable&&!e.focused.value&&(e.focused.value=!0,n(`focus`,r))}function ne(t,r){s!==null&&clearTimeout(s),s=setTimeout(()=>{s=null,!(document.hasFocus()&&(e.hasPopupOpen||e.controlRef===void 0||e.controlRef.value===null||e.controlRef.value.contains(document.activeElement)))&&(e.focused.value&&(e.focused.value=!1,n(`blur`,t)),r?.())},0)}function re(t){e.hasPopupOpen=!0,N(t)}function ie(t){e.hasPopupOpen=!1,ne(t)}function P(r){_e(r),o.platform.is.mobile?e.rootRef.value.contains(document.activeElement)&&document.activeElement.blur():(e.targetRef?.value||e.rootRef.value).focus(),t.type===`file`&&(e.inputRef.value.value=null),e.onClear?.(),n(`update:modelValue`,null),e.changeEvent&&n(`change`,null),n(`clear`,t.modelValue),v(()=>{let e=c.value;p(),c.value=e})}function ae(e){[13,32].includes(e.keyCode)&&P(e)}function oe(){let n=[];r.prepend!==void 0&&n.push(f(`div`,Ds,r.prepend())),n.push(f(`div`,As,se())),u.value&&!t.noErrorIcon&&n.push(Ls(`error`,[f(Ce,{name:o.iconSet.field.error,color:`negative`})]));let i=t.loading||e.innerLoading.value?r.loading===void 0?e.shouldHideLoadingIndicator?.()?null:[f(Fe,{color:t.color})]:r.loading():null;return i===null?t.clearable&&e.hasValue.value&&e.editable.value&&n.push(Ls(`inner-clearable-append`,[f(Ce,{class:`q-field__focusable-action`,name:t.clearIcon||o.iconSet.field.clear,tabindex:0,role:`button`,"aria-hidden":`false`,"aria-label":o.lang.label.clear,onKeyup:ae,onClick:P})])):n.push(Ls(`inner-loading-append`,i)),r.append!==void 0&&n.push(f(`div`,Os,r.append())),e.getInnerAppend!==void 0&&n.push(Ls(`inner-append`,e.getInnerAppend())),e.getControlChild!==void 0&&n.push(e.getControlChild()),n}function se(){let n=[];return t.prefix!==void 0&&t.prefix!==null&&n.push(f(`div`,js,t.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value&&n.push(e.getShadowControl()),C.value&&n.push(f(`div`,{class:w.value},F(r.label,t.label))),e.getControl===void 0?r.rawControl===void 0?r.control!==void 0&&n.push(f(`div`,{ref:e.targetRef,class:`q-field__native row`,tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus||void 0,onFocus:ee},r.control(E.value))):n.push(r.rawControl()):n.push(e.getControl()),t.suffix!==void 0&&t.suffix!==null&&n.push(f(`div`,Ms,t.suffix)),n.concat(F(r.default))}let ce=null,le=!1;function ue(){let n,i;u.value?d.value===null?(n=F(r.error),i=`q--slot-error`):(n=[f(`div`,{role:`alert`},d.value)],i=`q--slot-error-${d.value}`):(!t.hideHint||e.focused.value)&&(t.hint===void 0?(n=F(r.hint),i=`q--slot-hint`):(n=[f(`div`,t.hint)],i=`q--slot-hint-${t.hint}`));let a=t.counter||r.counter!==void 0;if(!t.hideBottomSpace||a||n!==void 0)return i!==ce&&(le=ce!==null,ce=i),f(`div`,{class:`q-field__bottom row items-start q-field__bottom--`+(t.hideBottomSpace?`stale`:`animated`),onClick:fe},[f(`div`,{key:i,id:u.value===!0?m.value:void 0,class:`q-field__messages col`+(le&&!t.hideBottomSpace?` q-field__messages--animated`:``)},n),a?f(`div`,{class:`q-field__counter`},r.counter===void 0?e.computedCounter.value:r.counter()):null])}let de=!1;return _(()=>{de=!0}),k(()=>{de&&t.autofocus&&a.focus()}),t.autofocus&&y(()=>{a.focus()}),O(()=>{s!==null&&clearTimeout(s)}),Object.assign(a,{focus:M,blur:te}),function(){let n=e.getControl===void 0&&r.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus||void 0,...D.value}:D.value;return f(e.tag.value,{ref:e.rootRef,class:[x.value,i.class],style:i.style,...n},[r.before===void 0?null:f(`div`,Ps,r.before()),f(`div`,Ns,[f(`div`,{ref:e.controlRef,class:S.value,tabindex:-1,...e.controlEvents},oe()),b.value?ue():null]),r.after===void 0?null:f(`div`,Fs,r.after())])}}var zs={date:`####/##/##`,datetime:`####/##/## ##:##`,time:`##:##`,fulltime:`##:##:##`,phone:`(###) ### - ####`,card:`#### #### #### ####`},Bs={"[\\d]":e=>{let t=e.codePointAt(0);return t>47&&t<58},"[a-zA-Z]":e=>{let t=e.codePointAt(0);return t>64&&t<91||t>96&&t<123},"[0-9a-zA-Z]":e=>{let t=e.codePointAt(0);return t>47&&t<58||t>64&&t<91||t>96&&t<123}},{tokenMap:Vs,tokenKeys:Hs}=Us({"#":{pattern:`[\\d]`,negate:`[^\\d]`},S:{pattern:`[a-zA-Z]`,negate:`[^a-zA-Z]`},N:{pattern:`[0-9a-zA-Z]`,negate:`[^0-9a-zA-Z]`},A:{pattern:`[a-zA-Z]`,negate:`[^a-zA-Z]`,transform:e=>e.toLocaleUpperCase()},a:{pattern:`[a-zA-Z]`,negate:`[^a-zA-Z]`,transform:e=>e.toLocaleLowerCase()},X:{pattern:`[0-9a-zA-Z]`,negate:`[^0-9a-zA-Z]`,transform:e=>e.toLocaleUpperCase()},x:{pattern:`[0-9a-zA-Z]`,negate:`[^0-9a-zA-Z]`,transform:e=>e.toLocaleLowerCase()}});function Us(e){let t=Object.keys(e),n={};return t.forEach(t=>{let r=e[t],i;if(Object.hasOwn(Bs,r.pattern))i=Bs[r.pattern];else{let e=new RegExp(r.pattern);i=t=>e.test(t)}n[t]={...r,test:i}}),{tokenMap:n,tokenKeys:t}}function Ws(e){return RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|(["+e.join(``)+`])|(.)`,`g`)}var Gs=[`insertText`,`deleteContentBackward`,`deleteContentForward`,`deleteWordBackward`,`deleteWordForward`,`deleteByCut`],Ks=/[.*+?^${}()|[\]\\]/g,qs=Ws(Hs),Y=String.fromCodePoint(1),Js={mask:String,reverseFillMask:Boolean,fillMask:[Boolean,String],unmaskedValue:Boolean,maskTokens:Object};function Ys(e,t,n,r,i){let a,o,s,c,l,u,f,p=A(()=>{if(e.maskTokens===void 0||e.maskTokens===null)return{tokenMap:Vs,tokenRegexMask:qs};let{tokenMap:t}=Us(e.maskTokens),n={...Vs,...t};return{tokenMap:n,tokenRegexMask:Ws(Object.keys(n))}}),h=d(null),g=d(y());function _(){return e.autogrow||[`textarea`,`text`,`search`,`url`,`tel`,`password`].includes(e.type)}m(()=>e.type+e.autogrow,x),m(()=>e.mask,n=>{if(n!==void 0)w(g.value,!0);else{let n=ee(h.value?te(g.value,f):g.value);x(),e.modelValue!==n&&t(`update:modelValue`,n)}}),m(()=>e.fillMask+e.reverseFillMask,()=>{h.value&&w(g.value,!0)}),m(()=>e.unmaskedValue,()=>{h.value&&w(g.value)}),m(()=>e.maskTokens,()=>{h.value&&w(g.value,!0)},{deep:!0});function y(){if(x(),h.value){let t=k(ee(e.modelValue));return f=t.length,e.fillMask===!1?t:N(t)}return f=0,e.modelValue}function b(e){if(e<a.length)return a.slice(-e);let t=``,n=a,r=n.indexOf(Y);if(r!==-1){for(let r=e-n.length;r>0;r--)t+=Y;n=n.slice(0,r)+t+n.slice(r)}return n}function x(){if(h.value=e.mask!==void 0&&e.mask.length!==0&&_(),!h.value){c=void 0,a=``,o=``;return}let t=zs[e.mask]===void 0?e.mask:zs[e.mask],n=typeof e.fillMask==`string`&&e.fillMask.length!==0?e.fillMask.slice(0,1):`_`,r=n.replace(Ks,String.raw`\$&`),i=[],l=[],u=[],d=e.reverseFillMask,f=``,m=``;t.replace(p.value.tokenRegexMask,(e,t,n,r,a)=>{if(r!==void 0){let e=p.value.tokenMap[r];u.push(e),m=e.negate,d&&=(l.push({c:e,overflow:!0}),!1),l.push({c:e});return}if(n!==void 0)f=`\\`+(n===`\\`?``:n),u.push(n);else{let e=t===void 0?a:t;f=e===`\\`?String.raw`\\\\`:e.replace(Ks,String.raw`\\$&`),u.push(e)}i.push(`([^`+f+`]+)?`+f+`?`)});let g=[...new Set(u.filter(e=>typeof e!=`string`).map(({pattern:e})=>e))],v=RegExp(`^`+i.join(``)+`(`+(f===``?`.`:`[^`+f+`]`)+`+)?`+(f===``?``:`[`+f+`]*`)+`$`),y=l.length-1,b=g.length===1?m:`(?:`+g.map(e=>`(?!`+e+`)`).join(``)+String.raw`[\s\S])`,x=({c:e,overflow:t})=>t===!0?`(?:`+b+`+)?(`+e.pattern+`+)?(?:`+b+`+)?(`+e.pattern+`+)?`:`(?:`+b+`+)?(`+e.pattern+`)?`,S=l.map((t,n)=>{let i=x(t);return n===0&&e.reverseFillMask?RegExp(`^`+r+`*`+i):RegExp(n===y?`^`+i+`(`+(m===``?`.`:m)+`+)?`+(e.reverseFillMask?`$`:r+`*`):`^`+i)});s=u,c=t=>{let n=v.exec(e.reverseFillMask?t:t.slice(0,u.length+1));n!==null&&(t=n.slice(1).join(``));let r=[],i=S.length;for(let e=0,n=t;e<i;e++){let t=S[e].exec(n);if(t===null)break;n=n.slice(t.shift().length),r.push(...t)}return r.length===0?t:r.join(``)},a=u.map(e=>typeof e==`string`?e:Y).join(``),o=a.split(Y).join(n)}function S(t,n){let r=t.length,i=e.reverseFillMask?b(r):a,o=e.reverseFillMask?s.length-r:0,c=e.reverseFillMask?0:Math.min(n,r),l=e.reverseFillMask?r-n:r;return e=>{if(i[e]!==Y||e>=c&&e<l)return!1;let n=s[o+e];return n===void 0||typeof n==`string`||n.test(t[e])}}function C(e,t,n){let r=S(e,n),i=0;for(let e=0;e<t;e++)r(e)&&i++;return i}function w(t,s,c){let u=r.value,d=u?.selectionEnd??0,p=u===null?0:u.value.length-d,m=s!==!0&&typeof g.value==`string`&&Gs.includes(c)?M(g.value,f,t,c):ee(t),h;s===!0&&u!==null&&a.length!==0&&(h=C(u.value,d,f)),s===!0&&x();let _=k(m,s),y=e.fillMask===!1?_:N(_),b=_.length,S=g.value!==y,w=S||b!==f;f=b;let T=e.fillMask!==!1&&b===0;u!==null&&u.value!==y&&(u.value=y),S&&(g.value=y),u!==null&&document.activeElement===u&&v(()=>{if(T){let t=e.reverseFillMask?o.length:0;u.setSelectionRange(t,t,`forward`);return}if(h!==void 0){let e=0,t=0;for(;e<y.length&&t<h;)t=C(y,e+1,b),e++;u.setSelectionRange(e,e,`forward`);return}if(c===`insertFromPaste`&&!e.reverseFillMask){let e=u.selectionEnd,t=d-1;for(let n=l;n<=t&&n<e;n++)a[n]!==Y&&t++;E.right(u,t);return}if([`deleteContentBackward`,`deleteContentForward`].includes(c)){let t=e.reverseFillMask?d===0?+(y.length>_.length):Math.max(0,y.length-(T?0:Math.min(_.length,p)+1))+1:d;u.setSelectionRange(t,t,`forward`);return}if(e.reverseFillMask){if(w){let e=Math.max(0,y.length-(T?0:Math.min(_.length,p+1)));e===1&&d===1?u.setSelectionRange(e,e,`forward`):E.rightReverse(u,e)}else{let e=y.length-p;u.setSelectionRange(e,e,`backward`)}}else if(w){let e=Math.max(0,a.indexOf(Y),Math.min(_.length,d)-1);E.right(u,e)}else{let e=d-1;E.right(u,e)}});let D=e.unmaskedValue?ee(_):y;String(e.modelValue)!==D&&(e.modelValue!==null||D!==``)?n(D,!0):i!==void 0&&i()}function T(e,t,n){let r=k(ee(e.value));t=Math.max(0,a.indexOf(Y),Math.min(r.length,t)),l=t,e.setSelectionRange(t,n,`forward`)}let E={left(e,t){let n=!a.slice(t-1).includes(Y),r=Math.max(0,t-1);for(;r>=0;r--)if(a[r]===Y){t=r,n&&t++;break}if(r<0&&a[t]!==void 0&&a[t]!==Y)return E.right(e,0);t>=0&&e.setSelectionRange(t,t,`backward`)},right(e,t){let n=e.value.length,r=Math.min(n,t+1);for(;r<=n;r++)if(a[r]===Y){t=r;break}else a[r-1]===Y&&(t=r);if(r>n&&a[t-1]!==void 0&&a[t-1]!==Y)return E.left(e,n);e.setSelectionRange(t,t,`forward`)},leftReverse(e,t){let n=b(e.value.length),r=Math.max(0,t-1);for(;r>=0;r--)if(n[r-1]===Y){t=r;break}else if(n[r]===Y&&(t=r,r===0))break;if(r<0&&n[t]!==void 0&&n[t]!==Y)return E.rightReverse(e,0);t>=0&&e.setSelectionRange(t,t,`backward`)},rightReverse(e,t){let n=e.value.length,r=b(n),i=!r.slice(0,t+1).includes(Y),a=Math.min(n,t+1);for(;a<=n;a++)if(r[a-1]===Y){t=a,t>0&&i&&t--;break}if(a>n&&r[t-1]!==void 0&&r[t-1]!==Y)return E.leftReverse(e,n);e.setSelectionRange(t,t,`forward`)}};function D(e){t(`click`,e),u=void 0}function O(n){if(t(`keydown`,n),n.defaultPrevented||n.altKey||le(n))return;let i=r.value,a=i.selectionStart,o=i.selectionEnd;if(n.shiftKey||(u=void 0),n.keyCode===37||n.keyCode===39){n.shiftKey&&u===void 0&&(u=i.selectionDirection===`forward`?a:o);let t=E[(n.keyCode===39?`right`:`left`)+(e.reverseFillMask?`Reverse`:``)];if(n.preventDefault(),t(i,u===a?o:a),n.shiftKey){let e=i.selectionStart;i.setSelectionRange(Math.min(u,e),Math.max(u,e),`forward`)}}else n.keyCode===8&&!e.reverseFillMask&&a===o?(E.left(i,a),i.setSelectionRange(i.selectionStart,o,`backward`)):n.keyCode===46&&e.reverseFillMask&&a===o&&(E.rightReverse(i,o),i.setSelectionRange(a,i.selectionEnd,`forward`))}function k(t,n){if(t==null||t===``)return``;if(e.reverseFillMask)return j(t,n);let r=s,i=0,a=``;for(let e=0;e<r.length;e++){let o=t[i],s=r[e];if(typeof s==`string`)a+=s,n===!0&&o===s&&i++;else if(o!==void 0&&s.test(o))a+=s.transform===void 0?o:s.transform(o),i++;else return a}return a}function j(e,t){let n=s,r=a.indexOf(Y),i=e.length-1,o=``,c=``;for(let a=n.length-1;a>=0&&i!==-1;a--){let s=n[a],l=e[i];if(typeof s==`string`)c=s+c,t===!0&&l===s&&i--;else if(l!==void 0&&s.test(l)){o=c+o,c=``;do o=(s.transform===void 0?l:s.transform(l))+o,i--,l=e[i];while(r===a&&l!==void 0&&s.test(l))}else return o}return o}function M(t,n,r,i){let a=t.length,o=r.length,c=Math.min(a,o),l=0;for(;l<c&&t[l]===r[l];)l++;let u=0;for(;u<c-l&&t[a-1-u]===r[o-1-u];)u++;let d=S(t,n),f=``,p=``;for(let e=0;e<l;e++)d(e)&&(f+=t[e]);for(let e=a-u;e<a;e++)d(e)&&(p+=t[e]);let m=``,h=r.slice(l,o-u);if(h.length!==0){if(e.reverseFillMask)for(let e of h)s.some(t=>typeof t!=`string`&&t.test(e))&&(m+=e);else{let e=s.filter(e=>typeof e!=`string`),t=f.length;for(let n of h)e[t]!==void 0&&e[t].test(n)&&(m+=n,t++)}}else if(!e.reverseFillMask&&l+u<a){let e=!1;for(let t=l;t<a-u;t++)if(d(t)){e=!0;break}e||(i===`deleteContentForward`?p=p.slice(1):f=f.slice(0,-1))}return f+m+p}function ee(e){return typeof e!=`string`||c===void 0?typeof e==`number`?c(String(e)):e:c(e)}function te(t,n){return n>=t.length?t:e.reverseFillMask?t.slice(t.length-n):t.slice(0,n)}function N(t){return o.length-t.length<=0?t:e.reverseFillMask&&t.length!==0?o.slice(0,-t.length)+t:t+o.slice(t.length)}return{innerValue:g,hasMask:h,moveCursorForPaste:T,updateMaskValue:w,onMaskedKeydown:O,onMaskedClick:D}}var Xs=typeof CSS>`u`||CSS.supports(`field-sizing`,`content`)?void 0:Zs;function Zs(e,t,n,r){let i=null;function a(){i!==null&&(cancelAnimationFrame(i),i=null)}function o(){i===null&&(i=requestAnimationFrame(()=>{i=null;let e=n.value;if(e!==null){let t=e.parentNode.style,{scrollTop:n}=e,{overflowY:i,maxHeight:a}=r.platform.is.firefox?{}:window.getComputedStyle(e),o=i!==void 0&&i!==`scroll`;o&&(e.style.overflowY=`hidden`),t.marginBottom=e.scrollHeight-1+`px`,e.style.height=`1px`,e.style.height=e.scrollHeight+`px`,o&&(e.style.overflowY=Number.parseInt(a,10)<e.scrollHeight?`auto`:`hidden`),t.marginBottom=``,e.scrollTop=n}}))}return m(()=>e.autogrow,e=>{if(e)v(o);else if(n.value!==null){a();let{style:e}=n.value;e.overflowY=``,e.height=t.rows>0?`auto`:``}}),m(()=>e.dense,()=>{e.autogrow&&v(o)}),y(()=>{e.autogrow&&o()}),O(a),o}function Qs(e,t){function n(){let t=e.modelValue;try{let e=new DataTransfer;return Object(t)===t&&(`length`in t?[...t]:[t]).forEach(t=>{e.items.add(t)}),{files:e.files}}catch{return{files:void 0}}}return A(t?()=>{if(e.type===`file`)return n()}:n)}var $s=/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFF9F\u4E00-\u9FAF\u3400-\u4DBF]/,ec=/[\u4E00-\u9FFF\u3400-\u4DBF\u{20000}-\u{2A6DF}\u{2A700}-\u{2B73F}\u{2B740}-\u{2B81F}\u{2B820}-\u{2CEAF}\uF900-\uFAFF\u3300-\u33FF\uFE30-\uFE4F\uF900-\uFAFF\u{2F800}-\u{2FA1F}]/u,tc=/[\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]/,nc=/[a-z0-9_ -]$/i;function rc(e){return function(t){if(t.type===`compositionend`||t.type===`change`){if(!t.target.qComposing)return;t.target.qComposing=!1,e(t)}else t.type===`compositionupdate`&&!t.target.qComposing&&typeof t.data==`string`&&(pe.is.firefox?!nc.test(t.data):$s.test(t.data)||ec.test(t.data)||tc.test(t.data))&&(t.target.qComposing=!0)}}var ic=Me({name:`QInput`,inheritAttrs:!1,props:{...ws,...Js,...rt,modelValue:[String,Number,FileList],modelModifiers:Object,shadowText:String,type:{type:String,default:`text`},debounce:[String,Number],autogrow:Boolean,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},emits:[...Ts,`paste`,`change`,`keydown`,`click`,`animationend`],setup(e,{emit:n,attrs:r}){let{proxy:i}=T(),a=Le(),o={},s=NaN,c=!1,l=!1,u=null,d,p=t(null),h=at(e),{innerValue:g,hasMask:_,moveCursorForPaste:y,updateMaskValue:b,onMaskedKeydown:x,onMaskedClick:S}=Ys(e,n,F,p,()=>{le(),delete o.value}),C=Qs(e,!0),w=A(()=>Cs(g.value)),E=rc(se);function D(e){if(_.value&&e.type===`compositionstart`){e.target.qComposing=!0;return}E(e)}let k=Es({changeEvent:!0}),j=A(()=>e.type===`textarea`||e.autogrow),M=Xs?.(e,r,p,a),ee=A(()=>j.value||[`text`,`search`,`url`,`tel`,`password`].includes(e.type)),te=A(()=>{let t={...k.splitAttrs.listeners.value,onInput:se,onPaste:oe,onChange:de,onBlur:I,onFocus:ne};return t.onCompositionstart=t.onCompositionupdate=t.onCompositionend=D,_.value&&(t.onKeydown=x,t.onClick=S),M&&e.autogrow&&(t.onAnimationend=ce),t}),N=A(()=>{let t={tabindex:0,"data-autofocus":e.autofocus||void 0,rows:e.type===`textarea`?6:void 0,"aria-label":e.label,name:h(),...k.splitAttrs.attributes.value,id:k.targetUid.value,maxlength:e.maxlength,disabled:e.disable,readonly:e.readonly};return j.value||(t.type=e.type),e.autogrow&&(t.rows=1),t});m(()=>e.type,()=>{p.value&&(p.value.value=e.modelValue)}),m(()=>e.modelValue,t=>{if(d!==void 0&&(le(),c=!1,l=!1,delete o.value),_.value){if(l&&(l=!1,String(t)===s))return;b(t)}else g.value!==t&&(g.value=t,e.type===`number`&&Object.hasOwn(o,`value`)&&(c?c=!1:delete o.value),e.modelModifiers?.trim===!0&&Object.hasOwn(o,`value`)&&(typeof o.value!=`string`||o.value.trim()!==t)&&delete o.value);M&&e.autogrow&&v(M)});function re(){let e=document.activeElement;p.value!==null&&p.value!==e&&(e===null||e.id!==k.targetUid.value)&&p.value.focus({preventScroll:!0})}function ie(){$e(re)}function P(){qe(re);let e=document.activeElement;e!==null&&k.rootRef.value.contains(e)&&e.blur()}function ae(){p.value?.select()}function oe(t){if(_.value&&e.reverseFillMask!==!0){let e=t.target;y(e,e.selectionStart,e.selectionEnd)}n(`paste`,t)}function se(t){if(!t||!t.target)return;if(e.type===`file`){n(`update:modelValue`,t.target.files);return}let r=t.target.value;if(t.target.qComposing){o.value=r;return}if(_.value)b(r,!1,t.inputType);else if(e.modelModifiers?.trim===!0&&(o.value=r),F(r),ee.value&&t.target===document.activeElement){let{selectionStart:e,selectionEnd:n}=t.target;e!==void 0&&n!==void 0&&v(()=>{t.target===document.activeElement&&r.indexOf(t.target.value)===0&&t.target.setSelectionRange(e,n)})}M&&e.autogrow&&M()}function ce(e){n(`animationend`,e),M()}function F(t,r){d=()=>{u=null,e.type!==`number`&&(e.modelModifiers?.trim!==!0||_.value)&&Object.hasOwn(o,`value`)&&delete o.value,e.modelValue!==t&&s!==t&&(s=t,r===!0&&(l=!0),n(`update:modelValue`,t),v(()=>{s===t&&(s=NaN)})),d=void 0},e.type===`number`&&(c=!0,o.value=t);let i=()=>{_.value?delete o.value:o.value=t};e.modelModifiers?.lazy===!0?i():e.debounce===void 0?d():(u!==null&&clearTimeout(u),i(),u=setTimeout(d,e.debounce))}function le(){u!==null&&(clearTimeout(u),u=null),d=void 0}function ue(){le(),c=!1,l=!1,delete o.value}function de(e){D(e),u!==null&&(clearTimeout(u),u=null),d?.(),n(`change`,e.target.value)}function I(t){t!==void 0&&ne(t),u!==null&&(clearTimeout(u),u=null),d?.(),c=!1,l=!1,delete o.value,e.type!==`file`&&setTimeout(()=>{p.value!==null&&(p.value.value=g.value===void 0?``:g.value)},0)}function fe(){return Object.hasOwn(o,`value`)?o.value:g.value===void 0?``:g.value}O(()=>{I()}),Object.assign(k,{innerValue:g,fieldClass:A(()=>`q-${j.value?`textarea`:`input`}`+(e.autogrow?` q-textarea--autogrow`:``)),hasShadow:A(()=>e.type!==`file`&&typeof e.shadowText==`string`&&e.shadowText.length!==0),inputRef:p,emitValue:F,onClear:ue,hasValue:w,floatingLabel:A(()=>w.value&&(e.type!==`number`||Number.isFinite(Number(g.value)))||Cs(e.displayValue)),getControl:()=>{let t=N.value;return f(j.value?`textarea`:`input`,{ref:p,class:[`q-field__native q-placeholder`,e.inputClass],style:e.inputStyle,...t,...k.getErrorAriaAttrs(t),...te.value,...e.type===`file`?C.value:{value:fe()}})},getShadowControl:()=>f(`div`,{class:`q-field__native q-field__shadow absolute-bottom no-pointer-events`+(j.value?``:` text-no-wrap`)},[f(`span`,{class:`invisible`},fe()),f(`span`,e.shadowText)])});let pe=Rs(k);return Object.assign(i,{focus:ie,blur:P,select:ae,getNativeElement:()=>p.value}),Ae(i,`nativeEl`,()=>p.value),pe}}),ac=Me({name:`QCardActions`,props:{...ke,vertical:Boolean},setup(e,{slots:t}){let n=Te(e),r=A(()=>`q-card__actions ${n()} q-card__actions--${e.vertical?`vert column`:`horiz row`}`);return()=>f(`div`,{class:r.value},F(t.default))}}),oc=`kobo:network-token`;function sc(){try{return localStorage.getItem(oc)}catch{return null}}function cc(e){try{localStorage.setItem(oc,e),window.dispatchEvent(new Event(`kobo:auth-token-changed`))}catch{}}function lc(e){try{let t=new URL(e,window.location.origin);return t.origin===window.location.origin&&t.pathname.startsWith(`/api/`)}catch{return typeof e==`string`&&e.startsWith(`/api/`)}}function uc(e,t){return t?`${e}${e.includes(`?`)?`&`:`?`}token=${encodeURIComponent(t)}`:e}var dc=d(!1);function fc(){dc.value=!0}function pc(){dc.value=!1}var mc={class:`text-h6`},hc={class:`text-caption text-kobo-3 q-mt-sm`},gc=N({__name:`NetworkLoginDialog`,setup(e){let{t}=Bo(),n=A({get:()=>dc.value,set:e=>{e||pc()}}),r=d(``),i=d(!1),a=d(!1),s=d(``);async function c(){let e=r.value.trim();if(e){i.value=!0,a.value=!1;try{let n=await fetch(`/api/settings/network/ping`,{headers:{"X-Kobo-Token":e}});if(n.ok){cc(e),pc(),window.location.reload();return}s.value=n.status===401?t(`network.login.invalid`):t(`network.login.serverError`),a.value=!0}catch{s.value=t(`network.login.unreachable`),a.value=!0}finally{i.value=!1}}}return(e,l)=>(h(),E(zn,{modelValue:n.value,"onUpdate:modelValue":l[1]||=e=>n.value=e,persistent:``},{default:C(()=>[w(Qt,{style:{"min-width":`320px`,"max-width":`90vw`}},{default:C(()=>[w(Jt,null,{default:C(()=>[te(`div`,mc,u(o(t)(`network.login.title`)),1),te(`div`,hc,u(o(t)(`network.login.description`)),1)]),_:1}),w(Jt,null,{default:C(()=>[w(ic,{modelValue:r.value,"onUpdate:modelValue":l[0]||=e=>r.value=e,label:o(t)(`network.login.tokenLabel`),placeholder:o(t)(`network.login.tokenPlaceholder`),error:a.value,"error-message":s.value,autofocus:``,dense:``,outlined:``,onKeyup:ye(c,[`enter`])},null,8,[`modelValue`,`label`,`placeholder`,`error`,`error-message`])]),_:1}),w(ac,{align:`right`},{default:C(()=>[w(je,{label:o(t)(`network.login.connect`),color:`primary`,loading:i.value,unelevated:``,onClick:c},null,8,[`label`,`loading`])]),_:1})]),_:1})]),_:1},8,[`modelValue`]))}}),_c=new WeakMap;function vc(e){return _c.get(e)}function yc(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{...t}]))}function bc(e){let t=new Set,n=m(()=>e.queuedMessages,()=>{for(let n of t)n(yc(e.queuedMessages))},{deep:!0,flush:`sync`});return{queue:(...t)=>e.queueMessage(...t),cancel:(...t)=>e.cancelQueuedMessage(...t),flush:(...t)=>e.flushQueuedMessage(...t),subscribe(n){return t.add(n),n(yc(e.queuedMessages)),()=>{t.delete(n)}},dispose(){n(),t.clear()}}}function xc(e,t){_c.set(e,t);let n=t.subscribe(t=>{e.queuedMessages=t});return()=>{n(),_c.delete(e)}}var Sc=Be(`templates`,{state:()=>({templates:[],defaultSlugs:[],loading:!1,loaded:!1}),getters:{isDefault:e=>t=>e.defaultSlugs.includes(t)},actions:{async fetchTemplates(){if(!this.loading){this.loading=!0;try{let e=await fetch(`/api/templates`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();this.templates=t.templates,this.defaultSlugs=t.defaultSlugs??[],this.loaded=!0}catch(e){console.error(`[templates store] fetchTemplates failed:`,e)}finally{this.loading=!1}}},async createTemplate(e){let t=await fetch(`/api/templates`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}let n=await t.json();return this.templates.push(n),n},async updateTemplate(e,t){let n=await fetch(`/api/templates/${encodeURIComponent(e)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json(),i=this.templates.findIndex(t=>t.slug===e);return i>=0&&(this.templates[i]=r),r},async reloadDefaults(){let e=await fetch(`/api/templates/reload-defaults`,{method:`POST`});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??`HTTP ${e.status}`)}let t=await e.json();return t.added.length>0&&await this.fetchTemplates(),t},async deleteTemplate(e){let t=await fetch(`/api/templates/${encodeURIComponent(e)}`,{method:`DELETE`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}this.templates=this.templates.filter(t=>t.slug!==e)},async resetToDefault(e){let t=await fetch(`/api/templates/${encodeURIComponent(e)}/reset-default`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({error:`Reset failed`}));throw Error(e.error??`Reset failed`)}let{template:n}=await t.json(),r=this.templates.findIndex(t=>t.slug===e);return r>=0?this.templates[r]=n:this.templates.push(n),n}}}),Cc=Me({name:`QAvatar`,props:{...re,fontSize:String,color:String,textColor:String,icon:String,square:Boolean,rounded:Boolean},setup(e,{slots:t}){let n=A(()=>`q-avatar`+(e.color?` bg-${e.color}`:``)+(e.textColor?` text-${e.textColor} q-chip--colored`:``)+(e.square?` q-avatar--square`:e.rounded?` rounded-borders`:``)),r=A(()=>e.fontSize?{fontSize:e.fontSize}:null);return()=>{let i=e.icon===void 0?void 0:[f(Ce,{name:e.icon})],a={class:n.value};return e.size!==void 0&&(a.style=Se(e.size)),f(`div`,a,[f(`div`,{class:`q-avatar__content row flex-center overflow-hidden`,style:r.value},Ie(t.default,i))])}}}),wc=0,Tc={},Ec={},Dc={},Oc={},kc=/^\s*$/,Ac=[],jc=[void 0,null,!0,!1,``],Mc=[`top-left`,`top-right`,`bottom-left`,`bottom-right`,`top`,`bottom`,`left`,`right`,`center`],Nc=[`top-left`,`top-right`,`bottom-left`,`bottom-right`],Pc={positive:{icon:e=>e.iconSet.type.positive,color:`positive`},negative:{icon:e=>e.iconSet.type.negative,color:`negative`},warning:{icon:e=>e.iconSet.type.warning,color:`warning`,textColor:`dark`},info:{icon:e=>e.iconSet.type.info,color:`info`},ongoing:{group:!1,timeout:0,spinner:!0,color:`grey-8`}};function Fc(e,t,n){if(!e)return Rc(`parameter required`);let r,a={textColor:`white`};if(e.ignoreDefaults||Object.assign(a,Tc),Rt(e)||(a.type&&Object.assign(a,Pc[a.type]),e={message:e}),Object.assign(a,Pc[e.type||a.type],e),typeof a.icon==`function`&&(a.icon=a.icon(t)),a.spinner=a.spinner?a.spinner===!0?Fe:i(a.spinner):!1,a.meta={hasMedia:!!(a.spinner||a.icon||a.avatar),hasText:Lc(a.message)||Lc(a.caption)},a.position){if(!Mc.includes(a.position))return Rc(`wrong position`,e)}else a.position=`bottom`;if(jc.includes(a.timeout))a.timeout=5e3;else{let t=Number.parseFloat(a.timeout);if(!Number.isFinite(t)||t<0)return Rc(`wrong timeout`,e);a.timeout=t}a.timeout===0?a.progress=!1:a.progress&&(a.meta.progressClass=`q-notification__progress`+(a.progressClass?` ${a.progressClass}`:``),a.meta.progressStyle={animationDuration:`${a.timeout+1e3}ms`});let o=[...Array.isArray(e.actions)?e.actions:[],...!e.ignoreDefaults&&Array.isArray(Tc.actions)?Tc.actions:[],...Array.isArray(Pc[e.type]?.actions)?Pc[e.type].actions:[]],{closeBtn:s}=a;if(s&&o.push({label:typeof s==`string`?s:t.lang.label.close}),a.actions=o.map(({handler:e,noDismiss:t,...n})=>({flat:!0,...n,onClick:typeof e==`function`?()=>{e(),t||c()}:()=>{c()}})),a.multiLine===void 0&&(a.multiLine=a.actions.length>1),Object.assign(a.meta,{class:`q-notification row items-stretch q-notification--${a.multiLine?`multi-line`:`standard`}`+(a.color===void 0?``:` bg-${a.color}`)+(a.textColor===void 0?``:` text-${a.textColor}`)+(a.classes===void 0?``:` ${a.classes}`),wrapperClass:`q-notification__wrapper col relative-position border-radius-inherit `+(a.multiLine?`column no-wrap justify-center`:`row items-center`),contentClass:`q-notification__content row items-center`+(a.multiLine?``:` col`),leftClass:a.meta.hasText?`additional`:`single`,attrs:{role:`alert`,...a.attrs}}),a.group===!1?(a.group=void 0,a.meta.group=void 0):((a.group===void 0||a.group===!0)&&(a.group=[a.message,a.caption,a.multiLine,...a.actions.map(e=>`${e.label}*${e.icon}`)].join(`|`)),a.meta.group=a.group+`|`+a.position),a.actions.length===0?a.actions=void 0:a.meta.actionsClass=`q-notification__actions row items-center `+(a.multiLine?`justify-end`:`col-auto`)+(a.meta.hasMedia?` q-notification__actions--with-media`:``),n!==void 0){n.notif.meta.timer&&(clearTimeout(n.notif.meta.timer),n.notif.meta.timer=void 0),a.meta.uid=n.notif.meta.uid;let e=Dc[a.position].value.indexOf(n.notif);Dc[a.position].value[e]=a}else{let t=Ec[a.meta.group];if(t===void 0){if(a.meta.uid=wc++,a.meta.badge=1,[`left`,`right`,`center`].includes(a.position))Dc[a.position].value.splice(Math.floor(Dc[a.position].value.length/2),0,a);else{let e=a.position.includes(`top`)?`unshift`:`push`;Dc[a.position].value[e](a)}a.group!==void 0&&(Ec[a.meta.group]=a)}else{if(t.meta.timer&&(clearTimeout(t.meta.timer),t.meta.timer=void 0),a.badgePosition!==void 0){if(!Nc.includes(a.badgePosition))return Rc(`wrong badgePosition`,e)}else a.badgePosition=`top-${a.position.includes(`left`)?`right`:`left`}`;a.meta.uid=t.meta.uid,a.meta.badge=t.meta.badge+1,a.meta.badgeClass=`q-notification__badge q-notification__badge--${a.badgePosition}`+(a.badgeColor===void 0?``:` bg-${a.badgeColor}`)+(a.badgeTextColor===void 0?``:` text-${a.badgeTextColor}`)+(a.badgeClass?` ${a.badgeClass}`:``);let n=Dc[a.position].value.indexOf(t);Dc[a.position].value[n]=Ec[a.meta.group]=a}}let c=()=>{Ic(a),r=void 0};if(a.timeout>0&&(a.meta.timer=setTimeout(()=>{a.meta.timer=void 0,c()},a.timeout+1e3)),a.group!==void 0)return t=>{t===void 0?c():Rc(`trying to update a grouped one which is forbidden`,e)};if(r={dismiss:c,config:e,notif:a},n!==void 0){Object.assign(n,r);return}return e=>{r!==void 0&&(e===void 0?r.dismiss():Fc({...r.config,...e,group:!1,position:a.position},t,r))}}function Ic(e){e.meta.timer&&(clearTimeout(e.meta.timer),e.meta.timer=void 0);let t=Dc[e.position].value.indexOf(e);if(t!==-1){e.group!==void 0&&delete Ec[e.meta.group];let n=Ac[String(e.meta.uid)];if(n){let{width:e,height:t}=getComputedStyle(n);n.style.left=`${n.offsetLeft}px`,n.style.width=e,n.style.height=t}Dc[e.position].value.splice(t,1),typeof e.onDismiss==`function`&&e.onDismiss()}}function Lc(e){return e!=null&&!kc.test(e)}function Rc(e,t){return console.error(`Notify: ${e}`,t),!1}function zc(){return Me({name:`QNotifications`,devtools:{hide:!0},setup(){return()=>f(`div`,{class:`q-notifications`},Mc.map(e=>f(we,{key:e,class:Oc[e],tag:`div`,name:`q-notification--${e}`},()=>Dc[e].value.map(e=>{let t=e.meta,n=[];if(t.hasMedia&&(e.spinner?n.push(f(e.spinner,{class:`q-notification__spinner q-notification__spinner--`+t.leftClass,color:e.spinnerColor,size:e.spinnerSize})):e.icon?n.push(f(Ce,{class:`q-notification__icon q-notification__icon--`+t.leftClass,name:e.icon,color:e.iconColor,size:e.iconSize,role:`img`})):e.avatar&&n.push(f(Cc,{class:`q-notification__avatar q-notification__avatar--`+t.leftClass},()=>f(`img`,{src:e.avatar,"aria-hidden":`true`})))),t.hasText){let t,r={class:`q-notification__message col`};if(e.html)r.innerHTML=e.caption?`<div>${e.message}</div><div class="q-notification__caption">${e.caption}</div>`:e.message;else{let n=[e.message];t=e.caption?[f(`div`,n),f(`div`,{class:`q-notification__caption`},[e.caption])]:n}n.push(f(`div`,r,t))}let r=[f(`div`,{class:t.contentClass},n)];return e.progress&&r.push(f(`div`,{key:`${t.uid}|p|${t.badge}`,class:t.progressClass,style:t.progressStyle})),e.actions&&r.push(f(`div`,{class:t.actionsClass},e.actions.map(e=>f(je,e)))),t.badge>1&&r.push(f(`div`,{key:`${t.uid}|${t.badge}`,class:e.meta.badgeClass,style:e.badgeStyle},[t.badge])),f(`div`,{ref:e=>{Ac[String(t.uid)]=e},key:t.uid,class:t.class,...t.attrs},[f(`div`,{class:t.wrapperClass},r)])}))))}})}var Bc={setDefaults(e){Rt(e)&&Object.assign(Tc,e)},registerType(e,t){Rt(t)&&(Pc[e]=t)},install({$q:e,parentApp:t}){if(e.notify=this.create=t=>Fc(t,e),e.notify.setDefaults=this.setDefaults,e.notify.registerType=this.registerType,e.config.notify!==void 0&&this.setDefaults(e.config.notify),!this.__installed){Mc.forEach(e=>{Dc[e]=d([]);let t=e===`left`||e===`center`||e===`right`?`center`:e.includes(`top`)?`top`:`bottom`,n=e.includes(`left`)?`start`:e.includes(`right`)?`end`:`center`;Oc[e]=`q-notifications__list q-notifications__list--${t} fixed column no-wrap ${e===`left`||e===`right`?`items-${e===`left`?`start`:`end`} justify-center`:e===`center`?`flex-center`:`items-${n}`}`});let e=De(`q-notify`);Wt(zc(),t).mount(e)}}},Vc={"tours.settings.skills.title":`Choose a skill suite`,"tours.settings.skills.description":`Start with Standard: no extension is required. Superpowers, gstack, ECC and their combinations target skills already installed and available to your chosen engine. Selecting a suite changes agent instructions; it does not install skills or grant permissions. Custom lets you edit those instructions. Save your choice to apply it.`,"tours.settings.git.description":`Choose when agents may commit, push or publish. Set Git conventions and branch prefixes.`,"tours.settings.git.title":`Git workflow`,"settings.reviewPromptHint":`Instructions sent to the agent when starting a code review.`,"settings.help.git":`Commit, push and publication preferences, Git conventions and branch prefixes.`,"settings.nav.promptTemplates":`Prompt templates`,"settings.nav.git":`Git`,"integration.direct":`Direct connection`,"integration.directHint":`Optional: configure a trusted MCP command on this server without Claude configuration. Put credentials in environment variables. Saving replaces the entire connection; enable the integration separately.`,"integration.agentScope":`Enabled connections are supplied to Claude Code and Codex on the next agent launch or resume. Stop a running agent to apply changes. Personal MCP configurations remain independent.`,"integration.directOverrides":`The saved direct connection takes priority. Delete it to use a Claude MCP entry.`,"integration.stored":`A private connection is saved. Its values are never returned to the browser.`,"integration.example":`Example: {example}`,"integration.tokenExample":`YOUR_NOTION_TOKEN`,"integration.packageExample":`your-mcp-package`,"integration.variableExample":`YOUR_VARIABLE`,"integration.valueExample":`your-value`,"integration.command":`Executable`,"integration.args":`Arguments (JSON array)`,"integration.environment":`Environment and credentials (JSON object)`,"integration.failed":`Could not load or save the connection. Check the JSON fields and local storage.`,"integration.saved":`Connection saved. Enable the integration and use Test connection when ready.`,"integration.save":`Replace connection`,"integration.clear":`Remove direct connection`,"settings.notificationSoundReady":`Ready tone`,"settings.customSounds":`Imported sounds`,"settings.customSoundsHint":`Import your own notification sounds ({count} max, {size} MB each, .wav .mp3 .ogg .webm). They are stored in the Kōbō data directory and appear in every sound selector below.`,"settings.customSoundsImport":`Import a sound`,"settings.customSoundsFull":`Limit reached ({count} sounds). Delete one before importing another.`,"settings.customSoundsError.type":`Unsupported format. Use a .wav, .mp3, .ogg or .webm file.`,"settings.customSoundsError.size":`File too large. The limit is {size} MB.`,"settings.customSoundsError.count":`Limit reached ({count} sounds). Delete one before importing another.`,"settings.customSoundsError.failed":`Could not complete this action. Check the connection and try again.`,"setup.check.worktrees":`Worktree directory`,"setup.fix.worktrees":`Check the worktree destination in Settings and its write permissions.`,"setup.title":`First mission setup`,"setup.intro":`Choose an engine and a local Git project. No skills or integrations are required.`,"setup.project":`Local project directory`,"setup.credentials":`Authenticate on this server with claude /login or codex login, or configure your provider API key. These checks do not send a paid prompt.`,"setup.permissions":`Start with a plan. Choose execution permissions explicitly in the creation form; a worktree does not isolate your machine.`,"setup.check":`Check environment`,"setup.failed":`Could not complete this action. Check the connection and try again.`,"setup.start":`Describe my first mission`,"setup.settings":`Open settings`,"setup.skip":`Skip for now`,"setup.status.ok":`Available`,"setup.status.missing":`Missing`,"setup.status.error":`Needs attention`,"setup.status.unknown":`Not verified`,"setup.check.node":`Node.js`,"setup.check.platform":`Platform`,"setup.check.git":`Git`,"setup.check.shell":`Bash`,"setup.check.storage":`Data directory`,"setup.check.runtime":`Engine package`,"setup.check.authentication":`Authentication`,"setup.check.model":`Model access`,"setup.check.repository":`Git repository`,"setup.check.firstCommit":`First commit`,"setup.check.projectWritable":`Project write access`,"setup.fix.node":`Install Node.js 24.15 or newer.`,"setup.fix.platform":`Use Linux, macOS or WSL2; native Windows is unsupported.`,"setup.fix.git":`Install Git on this server.`,"setup.fix.shell":`Install Bash on this server.`,"setup.fix.storage":`Check KOBO_HOME and its directory permissions.`,"setup.fix.runtime":`Reinstall Kōbō with its optional runtime dependencies.`,"setup.fix.authentication":`Log in to the selected provider. The first mission verifies access.`,"setup.fix.model":`Choose Auto or a model available to your account.`,"setup.fix.repository":`Choose an existing Git working directory.`,"setup.fix.firstCommit":`Create the first commit in this project before creating a worktree.`,"setup.fix.projectWritable":`Choose a writable project directory.`,"handoff.freshTitle":`Continue in a fresh session`,"handoff.switchTitle":`Change LLM`,"handoff.warning":`The current work stops immediately. A fresh session continues automatically in the same workspace, keeping tasks and history.`,"handoff.generate":`Generate a handoff with the current agent`,"handoff.generateHint":`Turn off if its quota is exhausted. Kōbō will pass the objective, tasks, Git state and history without calling the current LLM.`,"handoff.start":`Start fresh session`,"handoff.stopping":`Stopping the current agent`,"handoff.generating":`Preparing the handoff`,"handoff.starting":`Starting the fresh session`,"handoff.completed":`Fresh session started`,"handoff.failed":`Handoff failed`,"handoff.interrupted":`Handoff interrupted`,"handoff.cancelled":`Handoff cancelled`,"handoff.skip":`Continue without LLM summary`,"handoff.cancel":`Cancel handoff`,"handoff.report":`Read handoff`,"handoff.source":`Previous session`,"handoff.progress":`Session handoff in progress`,"handoff.blocked":`Resolve or cancel the handoff to continue.`,"handoff.error":`Could not prepare the session handoff.`,"handoff.loadFailed":`Could not load the handoff status.`,"handoff.status":`Session handoff`,"chat.externalLlm":`External LLM · {name}`,"search.indexing":`Indexing history: {processed}/{total}. Results are partial.`,"search.indexUnavailable":`Search index unavailable. Try again later.`,"blockers.setupConfiguration":`No setup script is configured. Add one in the Scripts section of settings.`,"blockers.noWorkspace":`Select a workspace to use this action.`,"blockers.purged":`Restore the worktree from the workspace banner before this action.`,"blockers.archived":`Unarchive the workspace from its menu to use this action.`,"blockers.operation":`Wait for the current operation to finish.`,"blockers.agentBusy":`Wait for the turn to finish or stop the agent from the conversation.`,"blockers.configuration":`Configure this feature in the project settings.`,"blockers.settings":`Open settings`,"workspaceSort.label":`Sort workspaces`,"workspaceSort.activity":`Last activity`,"workspaceSort.created":`Creation date`,"workspaceSort.name":`Name`,"workspaceSort.attention":`Attention priority`,"workspaceSort.asc":`Ascending`,"workspaceSort.desc":`Descending`,"workspaceSort.hint":`Sort within each group, including archives. Viewing a workspace does not change its last activity.`,"model.tooltip":`Model used by the agent for this workspace`,"reasoning.tooltip":`Reasoning level used by the agent for this workspace`,"thinking.label":`Thinking`,"thinking.noDetails":`The agent is thinking…`,"common.save":`Save`,"common.duplicate":`Duplicate`,"common.confirm":`Confirm`,"common.cancel":`Cancel`,"common.open":`Open`,"common.retry":`Retry`,"common.delete":`Delete`,"common.close":`Close`,"workspace.deleteTitle":`Delete workspace`,"workspace.deleteTypeBranch":`Retype the branch name to confirm`,"workspace.deleteConsequences":`This removes the worktree and the whole conversation.`,"workspace.deleteFailed":`Could not delete the workspace.`,"workspace.archiveFailed":`Could not archive the workspace.`,"tasks.updateFailed":`Could not update the task.`,"dashboard.tooltip":`Dashboard`,"dashboard.title":`Dashboard`,"dashboard.count":`{n} workspace | {n} workspaces`,"dashboard.empty":`No active workspace.`,"dashboard.workspace":`Workspace`,"dashboard.status":`Status`,"dashboard.attention":`Attention`,"dashboard.pr":`PR`,"dashboard.diff":`Diff`,"dashboard.activity":`Activity`,"dashboard.prOpen":`open`,"reliability.title":`Model reliability`,"reliability.subtitle":`How each engine and model actually ended on this machine.`,"reliability.empty":`No session has ended yet.`,"reliability.loadFailed":`Could not load the reliability figures.`,"reliability.engine":`Engine`,"reliability.model":`Model`,"reliability.sessions":`Sessions`,"reliability.completed":`Completed`,"reliability.watchdog":`Watchdog`,"reliability.killed":`Stopped`,"reliability.errors":`Errors`,"reliability.unknown":`Unknown`,"reliability.median":`Median`,"reliability.durationSeconds":`{s}s`,"reliability.durationMinutes":`{m}m {s}s`,"reliability.durationHours":`{h}h {m}m`,"reliability.reset":`Reset: count only sessions ended from now on`,"reliability.since":`Since {date}`,"reliability.showAll":`Show all`,"update.available":`A newer Kōbō is available: {version}`,"update.how":`How to update`,"common.dismiss":`Dismiss`,"common.details":`Details`,"common.ok":`OK`,"whatsNew.title":`What's new`,"common.loading":`Loading...`,"common.search":`Search...`,"common.refresh":`Refresh`,"common.copy":`Copy`,"common.copied":`Copied to clipboard`,"common.copyFailed":`Copy failed`,"common.add":`Add`,"folderPicker.title":`Choose a folder`,"folderPicker.parent":`Parent folder`,"folderPicker.empty":`No subfolders`,"folderPicker.select":`Select this folder`,"common.start":`Start`,"common.stop":`Stop`,"common.archive":`Archive`,"common.unarchive":`Unarchive`,"common.selectWorkspace":`Select a workspace`,"common.noResults":`No results for "{query}"`,"common.send":`send`,"common.newLine":`new line`,"common.history":`history`,"common.justNow":`just now`,"common.minutesAgo":`{count}m ago`,"common.hoursAgo":`{count}h ago`,"common.daysAgo":`{count}d ago`,"model.auto":`Auto`,"model.fable51":`Fable 5.1`,"model.mythos5":`Mythos 5 (Glasswing)`,"model.fable51Description":`Most capable model - replaces Fable 5, 1M context, adaptive thinking`,"model.mythos5Description":`Fable 5.1 without safety classifiers — limited access (Project Glasswing)`,"model.opus":`Opus 4.6`,"model.sonnet":`Sonnet 4.6`,"model.opus5":`Opus 5`,"model.opus48":`Opus 4.8`,"model.opus47Classic":`Opus 4.7 (Classic)`,"model.opus471m":`Opus 4.7 (1M)`,"model.opusClassic":`Opus 4.6 (Classic)`,"model.opus1m":`Opus 4.6 (1M)`,"model.sonnet5":`Sonnet 5`,"model.sonnetClassic":`Sonnet 4.6 (Classic)`,"model.sonnet1m":`Sonnet 4.6 (1M)`,"model.haiku":`Haiku 4.5`,"model.autoDescription":`Claude picks the optimal model`,"model.opus5Description":`For complex agentic coding and enterprise work, 1M context`,"model.opus48Description":`Most capable Opus — long-horizon agentic coding, 1M context by default, high effort default`,"model.opus47ClassicDescription":`Latest Opus, most capable`,"model.opus471mDescription":`Latest Opus, 1M context`,"model.opusClassicDescription":`Most powerful`,"model.opus1mDescription":`Most powerful, 1M context`,"model.sonnet5Description":`Best mix of speed and intelligence, 1M context`,"model.sonnetClassicDescription":`Balanced`,"model.sonnet1mDescription":`Balanced, 1M context`,"model.haikuDescription":`Fastest`,"model.gpt6astra":`GPT-6 Astra`,"model.gpt6astraDescription":`Most capable frontier model, 1M context (requires ChatGPT auth)`,"model.gpt56sol":`GPT-5.6 Sol`,"model.gpt56solDescription":`Latest frontier agentic coding model (requires ChatGPT auth)`,"model.gpt56terra":`GPT-5.6 Terra`,"model.gpt56terraDescription":`Balanced agentic coding model for everyday work (requires ChatGPT auth)`,"model.gpt56luna":`GPT-5.6 Luna`,"model.gpt56lunaDescription":`Fast and affordable agentic coding model (requires ChatGPT auth)`,"model.gpt55":`GPT-5.5`,"model.gpt55Description":`Recommended for complex coding (requires ChatGPT auth)`,"model.gpt54":`GPT-5.4`,"model.gpt54Description":`Default fallback — strong reasoning, works with API key auth`,"model.gpt54mini":`GPT-5.4 mini`,"model.gpt54miniDescription":`Fast and efficient — best for responsive tasks and subagents`,"model.gpt52":`GPT-5.2`,"model.gpt52Description":`Optimized for professional work and long-running agents`,"model.gpt53codex":`GPT-5.3 Codex`,"model.gpt53codexDescription":`Coding-specialized model for complex software engineering`,"reasoning.auto":`auto`,"reasoning.minimal":`minimal`,"reasoning.none":`none`,"reasoning.low":`low`,"reasoning.medium":`medium`,"reasoning.high":`high`,"reasoning.xhigh":`xhigh`,"reasoning.max":`max`,"reasoning.autoDescription":`Let the engine pick the default`,"reasoning.minimalDescription":`Fastest, shallowest reasoning`,"reasoning.noneDescription":`No additional reasoning`,"reasoning.lowDescription":`Faster, less depth`,"reasoning.mediumDescription":`Balanced`,"reasoning.highDescription":`More depth`,"reasoning.xhighDescription":`Extended depth, long-horizon tasks`,"reasoning.maxDescription":`Maximum depth`,"agentPermissionMode.label":`Permission mode`,"agentPermissionMode.plan":`Plan`,"agentPermissionMode.bypass":`Bypass`,"agentPermissionMode.strict":`Accept edits`,"agentPermissionMode.interactive":`Interactive`,"agentPermissionMode.tooltip":`How the agent handles tool permissions. Plan: read-only, no writes. Bypass: skip every prompt. Strict: auto-accept file edits, respect allow/deny lists for the rest. Interactive: ask the user before each tool via the permission panel.`,"agentPermissionMode.autoLoopOverride":`Auto-loop forces a non-plan mode — Plan blocks the MCP tools and edits the loop relies on. Pick Bypass, Strict, or Interactive instead.`,"agentPermissionMode.autoLoopLocked":`Locked to Bypass while auto-loop is on — any other mode would stall the loop on permission prompts. AskUserQuestion still works.`,"workspaceList.title":`Workspaces`,"workspaceList.a11y.groupToggle":`{group} group, {count} workspaces`,"workspaceList.a11y.list":`Workspaces`,"workspaceList.a11y.card":`{name}, {status}`,"workspaceList.needsAttention":`Needs Attention`,"workspaceList.running":`Running`,"workspaceList.idle":`Idle`,"workspaceList.archived":`Archived`,"workspaceList.archivedToast":`“{name}” archived`,"workspaceList.archivedUndo":`Undo`,"workspaceList.unarchiveFailed":`Could not unarchive this workspace`,"workspaceList.noWorkspaces":`No workspaces yet`,"workspaceList.loadFailed":`Could not load your workspaces`,"workspaceList.loadFailedHint":`This is a connection failure, not an empty account.`,"workspaceList.footer":`{count} workspace | {count} workspaces`,"workspaceList.footerRunning":`{count} running`,"workspaceList.deleteDialog.title":`Delete workspace?`,"workspaceList.deleteDialog.deleteLocal":`Delete local branch`,"workspaceList.deleteDialog.deleteRemote":`Delete remote branch`,"workspaceList.deleteDialog.warning":`Warning: this action is irreversible on the remote.`,"workspaceList.deleteArchivedDialog.tooltip":`Delete all archived workspaces`,"workspaceList.deleteArchivedDialog.title":`Delete all archived workspaces?`,"workspaceList.deleteArchivedDialog.message":`This will permanently delete the {count} archived workspaces. This action cannot be undone.`,"workspaceList.deleteArchivedDialog.typeCount":`Type {count} to confirm`,"workspacePage.configure":`Configure`,"workspacePage.permissions":`Permissions`,"workspacePage.selectWorkspace":`Select a workspace to begin`,"workspacePage.commandPalettePlaceholder":`Search commands…`,"workspacePage.commandPaletteEmpty":`No matching command`,"workspacePage.commandFocusChat":`Focus chat input`,"workspacePage.commandSearchHistory":`Search workspace history`,"workspacePage.commandTogglePanel":`Show or hide side panel`,"workspacePage.commandStartAgent":`Start agent`,"workspacePage.commandStopAgent":`Stop agent`,"workspacePage.commandOpenSettings":`Open settings`,"workspacePage.commandOpenCreate":`Create a workspace`,"workspacePage.commandOpenSearch":`Global search`,"workspacePage.commandOpenHealth":`Health page`,"workspacePage.commandOpenChangelog":`Changelog`,"workspacePage.commandGroupWorkspaces":`Switch to a workspace`,"workspacePage.commandPaletteHint":`Command palette`,"workspacePage.session":`Session #{n}`,"workspacePage.newSession":`+ New session`,"workspacePage.renameSession":`Rename`,"workspacePage.renameSessionTitle":`Rename session`,"workspacePage.sessionNameLabel":`Session name`,"workspacePage.sessionEndedNotice":`This session has ended. Create a new session to continue.`,"workspacePage.renameFailed":`Rename failed`,"workspacePage.copySessionId":`Copy session ID`,"workspacePage.deleteSession":`Delete session`,"workspacePage.deleteSessionTitle":`Delete session?`,"workspacePage.deleteSessionConfirm":`This permanently deletes this session and its conversation history.`,"workspacePage.deleteSessionFailed":`Failed to delete session`,"workspacePage.noEngineSessionId":`No engine session ID yet — the agent hasn't started this session`,"workspacePage.createSessionFailed":`Failed to create session`,"workspacePage.startFailed":`Start failed`,"workspacePage.stopFailed":`Stop failed`,"workspacePage.interrupt":`Interrupt`,"workspacePage.interrupted":`Agent interrupted — waiting for your next message`,"workspacePage.lastAgentEvent":`Last event {when}`,"workspacePage.agentStopping":`Stopping…`,"workspacePage.agentNotRunning":`No agent process — status is stale`,"contextMenu.restoreWorktree":`Restore worktree`,"workspacePage.restoringWorktree":`Restoring…`,"workspacePage.worktreeRestoreSuccess":`Worktree restored`,"workspacePage.worktreeRestoreLimitations":`Recreates committed Git files. Dependencies and previously discarded local files are not restored.`,"workspacePage.restoreError.not-found":`This workspace no longer exists. Refresh the workspace list.`,"workspacePage.restoreError.not-purged":`This workspace is not marked as purged. Refresh it and check its working directory.`,"workspacePage.restoreError.workspace-busy":`Another operation is running on this workspace. Wait for it to finish, then retry.`,"workspacePage.restoreError.worktree-not-owned":`This worktree is not managed by Kōbō. Restore it manually in its original project.`,"workspacePage.restoreError.project-unavailable":`The original project is unavailable. Reconnect its disk or restore the project at its original path, then retry.`,"workspacePage.restoreError.path-conflict":`The worktree path is occupied by another folder or checkout. Move the conflicting folder or follow the manual recovery instructions in Details.`,"workspacePage.restoreError.branch-in-use":`The working branch is already checked out elsewhere. Use that checkout or release the branch from it before retrying.`,"workspacePage.restoreError.recovery-source-unavailable":`The working branch and saved commit could not be found. Check remote access or follow the manual recovery instructions in Details.`,"workspacePage.restoreError.git-failed":`Restoration failed. Check Git access and disk permissions, then retry. Details opens the manual recovery guide.`,"workspacePage.archivedBanner":`Archived workspace — read-only`,"workspacePage.worktreePurgedBanner":`Worktree deleted — history kept`,"workspacePage.worktreePurgedTooltip":`Restore worktree recreates the working directory and unarchives this workspace. Chat history, tasks and sessions are preserved. No agent or dev server is started.`,"workspacePage.pendingInitialPromptBanner":`An initial prompt is pending — the agent never received it (setup script crashed or the workspace was never started). Click Start to send it now.`,"workspacePage.unarchived":`Workspace unarchived`,"workspacePage.unarchiveFailed":`Unarchive failed`,"workspacePage.interruptFailed":`Interrupt failed`,"workspacePage.interruptHint":`Interrupt the current turn without ending the session.`,"workspacePage.interruptTooltip":`Soft interrupt (like Escape) — stops the current tool but keeps the session alive`,"workspacePage.pendingNextRun":`Applied on next start`,"workspacePage.activeSessionModel":`Active: {model}`,"workspacePage.activeSessionModelTooltip":`Model currently used by the selected session`,"workspacePage.switchEngine":`Switch engine`,"workspacePage.switchEngineHint":`Continue this workspace with another agent engine`,"workspacePage.moreActions":`More actions`,"workspacePage.switchEngineTitle":`Switch agent engine`,"workspacePage.switchEngineWarning":`The current agent will be stopped and a fresh session will start in the same worktree.`,"workspacePage.engineLabel":`Engine`,"workspacePage.engineClaude":`Claude Code`,"workspacePage.engineCodex":`Codex`,"workspacePage.engineHandoff":`Handoff for the new engine`,"workspacePage.engineHandoffHint":`Review or edit the context that will be sent to the new agent.`,"workspacePage.confirmSwitchEngine":`Switch engine`,"workspacePage.switchEngineFailed":`Failed to switch engine`,"whip.dispatchFailed":`Unable to send the whip message`,"whip.phrase1":`Continue, please.`,"whip.phrase2":`Keep working through the task list.`,"whip.phrase3":`Please proceed with the next step.`,"whip.phrase4":`Check progress and continue.`,"whip.phrase5":`Continue within the agreed scope.`,"search.title":`Search`,"search.tooltip":`Search across agent history`,"search.placeholder":`Search across all agent messages…`,"search.includeArchived":`Include archived workspaces`,"search.loading":`Searching…`,"search.noResults":`No matches`,"search.error":`Search failed: {message}`,"search.resultCount":`{n} result(s)`,"search.eventType.userMessage":`You`,"search.eventType.agentOutput":`Agent`,"activityFeed.empty":`No activity yet`,"activityFeed.emptyHint":`Start a workspace to see agent output here`,"activityFeed.initialPrompt":`Initial Prompt`,"activityFeed.you":`You`,"activityFeed.agent":`Agent`,"activityFeed.question":`Question`,"activityFeed.goToPrevious":`Go to previous message`,"activityFeed.scrollToBottom":`Scroll to bottom`,"activityFeed.sendAnswers":`Send answers`,"agentBusy.banner":`Agent is busy`,"agentBusy.subagentsRunning":`1 sub-agent running | {n} sub-agents running`,"agentBusy.viewSubagents":`View sub-agents`,"agentBusy.pendingMessage":`Waiting — agent is busy`,"terminal.title":`Terminal`,"terminal.open":`Open terminal`,"terminal.close":`Close terminal`,"terminal.noWorkspace":`Select a workspace`,"terminal.noWorktree":`Worktree not created yet`,"terminal.error":`Terminal error`,"terminal.exited":`Terminal exited`,"terminal.disconnected":`Connection lost`,"terminal.reconnecting":`Reconnecting… (attempt {attempt} of {max})`,"terminal.reconnect":`Reconnect`,"chatInput.placeholder":`Message... (/ for skills)`,"chatInput.fileSearchHint":`search a file`,"chatInput.skills":`Skills`,"chatInput.attachImage":`Attach image`,"chatInput.queueBanner":`Message queued — will be sent when the agent finishes`,"chatInput.forceQueue":`Force send`,"chatInput.searchHistory":`search`,"chatInput.commandPalette":`commands`,"chatInput.shortcuts":`Keyboard shortcuts`,"chatInput.cancelQueue":`Cancel Queue`,"chatInput.autoLoopBanner":`Auto-loop is running — stop it to send a message`,"chatInput.awaitingUserBanner":`The agent is waiting for your answer above — reply via the question panel`,"chatInput.autoLoopStop":`Stop`,"koboCommand.checkProgressDesc":`Verify progress on tasks and acceptance criteria`,"chatInput.uploading":`Uploading...`,"voice.title":`Voice transcription`,"voice.enabled":`Enable local voice transcription`,"voice.pttKey":`Push-to-talk key`,"voice.pttAlt":`Alt`,"voice.pttCtrlSpace":`Ctrl+Space`,"voice.language":`Language (auto or code)`,"voice.model":`Active model`,"voice.commandPath":`Whisper binary path (optional)`,"voice.ffmpegPath":`ffmpeg binary path (optional)`,"voice.temperature":`Temperature`,"voice.temperatureHint":`Lower is more deterministic; higher can be more flexible but less stable.`,"voice.initialPrompt":`Initial prompt (optional)`,"voice.initialPromptHint":`Optional context to help Whisper with names, jargon, or domain vocabulary.`,"voice.translateToEnglish":`Translate to English`,"voice.translateToEnglishHint":`When enabled, non-English speech is translated to English instead of transcribed as-is.`,"voice.suppressNst":`Suppress non-speech tokens`,"voice.suppressNstHint":`Attempts to reduce non-speech artifacts in the transcript.`,"voice.installLink":`Install whisper.cpp`,"voice.installGuideTitle":`Installation guide`,"voice.installGuideIntro":`Install whisper.cpp and ffmpeg, then set the binary paths below if needed.`,"voice.installGuideUbuntuTitle":`Ubuntu / Debian`,"voice.installGuideWindowsTitle":`Windows`,"voice.installGuideBinaryPathHint":`After CMake build, the Whisper binary is usually at: whisper.cpp/build/bin/whisper-cli`,"voice.installGuideSettingsHint":`Then set "Whisper binary path" and "ffmpeg binary path" in this section (or leave empty if they are in PATH).`,"voice.noneModel":`No active model`,"voice.notInstalled":`not installed`,"voice.download":`Download`,"voice.delete":`Delete`,"voice.holdToTalk":`Hold to talk`,"voice.recording":`Recording...`,"voice.transcribing":`Transcribing...`,"voice.notSupported":`Voice recording is not supported in this browser`,"voice.errorMicPermission":`Microphone permission denied`,"voice.errorTranscription":`Voice transcription failed`,"voice.downloadFailed":`Model download failed`,"voice.deleteFailed":`Model deletion failed`,"voice.errorDisabled":`Voice transcription is disabled in settings`,"voice.errorModelMissing":`No active voice model is configured`,"voice.errorModelNotInstalled":`The active voice model is not installed`,"voice.errorAudioInvalid":`Audio capture is invalid or empty`,"voice.errorLanguageInvalid":`Voice language configuration is invalid`,"voice.errorRuntimeMissing":`Whisper runtime is not installed or not in PATH`,"voice.maxDurationReached":`Maximum recording duration reached`,"voice.runtimeReady":`Runtime ready: {command}`,"voice.runtimeMissing":`Runtime missing: {command}`,"voice.ffmpegReady":`ffmpeg ready`,"voice.ffmpegMissing":`ffmpeg missing`,"voice.sectionRuntime":`Runtime status`,"voice.sectionActivation":`Activation`,"voice.sectionModels":`Whisper models`,"voice.sectionAdvanced":`Advanced options`,"voice.sectionBehavior":`Transcription behavior`,"voice.sectionBinaries":`Binary paths`,"voice.downloadModels":`Download a model`,"voice.cancelFailed":`Failed to cancel the download`,"attachments.error.upload":`Upload failed. Remove the attachment and try again.`,"attachments.add":`Attach files`,"attachments.remove":`Remove attachment`,"attachments.hint":`Paste or drop files here · {count} maximum · {size} MB each · {total} MB total`,"attachments.error.type":`Use PNG, JPEG, GIF or WebP images, PDF, Markdown or text documents (TXT, CSV, JSON, YAML, XML, LOG, RST, TOML).`,"attachments.error.size":`Each file must be non-empty and no larger than 50 MB.`,"attachments.error.count":`You can attach up to 10 files.`,"attachments.error.total":`Attachments must total no more than 50 MB.`,"attachments.descriptionRequired":`Enter a description or attach a file.`,"createPage.title":`Create a workspace`,"createPage.fromTemplate":`From a template`,"createPage.fromTemplateNone":`None`,"createPage.saveAsTemplate":`Save as template`,"createPage.saveTemplateTitle":`Save this form as a template`,"createPage.saveTemplateName":`Template name`,"createPage.saveTemplateOverwrite":`A template named “{name}” exists. Overwrite it?`,"createPage.templateSaved":`Template “{name}” saved`,"createPage.templateApplied":`Template “{name}” applied`,"createPage.duplicatedFrom":`Duplicated from “{name}”`,"createPage.duplicateLoadFailed":`Could not load the workspace to duplicate.`,"createPage.templateSaveFailed":`Could not save the template.`,"createPage.presetProjectUnknown":`This template targets a project that is no longer configured; the current project was kept.`,"createPage.copySuffix":`(copy)`,"createPage.subtitle":`Describe the mission, choose a project, then configure the agent.`,"createPage.sectionMission":`Mission`,"createPage.sectionMissionHint":`Give the agent a clear objective and the context needed to complete it.`,"createPage.workspaceNameLabel":`Workspace name`,"createPage.descriptionLabel":`Mission description`,"createPage.sources":`Optional sources`,"createPage.sectionGit":`Git project`,"createPage.sectionGitHint":`Choose the repository, source branch and worktree mode.`,"createPage.worktreeMode":`Worktree mode`,"createPage.worktreeNew":`New isolated worktree`,"createPage.worktreeExisting":`Reuse an existing worktree`,"createPage.projectLabel":`Project`,"createPage.sourceBranch":`Source branch`,"createPage.workingBranchPreview":`Working branch preview`,"createPage.branchNamePending":`workspace-name`,"createPage.sectionAgent":`Agent`,"createPage.sectionAgentHint":`Review the execution defaults or enable automation.`,"createPage.configureAgent":`Configure the agent`,"createPage.advancedOptions":`Advanced options`,"createPage.keyboardHint":`Press Ctrl/Cmd + Enter to create the workspace.`,"createPage.createWorkspace":`Create workspace`,"createPage.compareEngines":`Compare two engines`,"createPage.engineA":`Engine A`,"createPage.engineB":`Engine B`,"createPage.compareBrainstormLocked":`Comparison mode: each engine brainstorms on the model and effort set in its own block above.`,"createPage.compareEnginesHint":`Creates two workspaces from this task, one per engine, in sibling worktrees. Their diffs can then be compared side by side.`,"createPage.compareNeedsNewWorktree":`Comparing two engines needs two new worktrees. Turn off “use an existing worktree” first.`,"createPage.compareNeedsSecondEngine":`Pick a second engine, different from the first, to compare against.`,"comparison.title":`Engine comparison`,"comparison.hint":`The same task, run by each engine in its own worktree.`,"comparison.engine":`Engine`,"comparison.status":`Status`,"comparison.tasks":`Tasks`,"comparison.commits":`Commits`,"comparison.files":`Files`,"comparison.diff":`Diff`,"comparison.messages":`Messages`,"comparison.messagesTitle":`Agent messages / your messages`,"comparison.questions":`Questions`,"comparison.tools":`Tools`,"comparison.errors":`Errors`,"comparison.tokens":`Tokens`,"comparison.tokensTitle":`Input / output tokens`,"comparison.sessions":`Sessions`,"comparison.duration":`Time`,"comparison.exportCsv":`Export as CSV`,"comparison.open":`Open`,"comparison.current":`This one`,"comparison.archived":`archived`,"comparison.incomplete":`Only one workspace of this comparison exists. The other was never created, or has been deleted.`,"createPage.comparisonPartial":`Only {count} of {total} workspaces were created. The one that exists is usable on its own; delete it if you would rather start over.`,"createPage.notionEnabled":`Notion enabled`,"createPage.importNotion":`Import from Notion`,"createPage.notionPlaceholder":`https://www.notion.so/workspace/Page-title-abc123...`,"createPage.notionValidation":`URL must start with https://www.notion.so/ or https://app.notion.com/`,"createPage.notionAutoExtract":`Subtasks and acceptance criteria will be extracted automatically.`,"createPage.notionPanelChoiceLabel":`This URL points to a sub-page (?p=). Which one do you want to work on?`,"createPage.notionPanelOption":`Sub-page (panel)`,"createPage.notionPanelOptionDesc":`The page you were viewing — recommended`,"createPage.notionParentOption":`Parent page`,"createPage.notionParentOptionDesc":`The epic / database it belongs to`,"createPage.importSentry":`Import Sentry`,"createPage.sentryEnabled":`Sentry enabled`,"createPage.sentryPlaceholder":`https://your-org.sentry.io/issues/123456`,"createPage.sentryValidation":`URL must point to a Sentry issue (/issues/<id>)`,"createPage.sentryAutoExtract":`Sentry issue will be imported automatically`,"createPage.sentryExtractHint":`Kobo will extract the issue and write it to .ai/thoughts/`,"createPage.importPr":`Import from a PR`,"createPage.importPrRequiresProject":`Choose a project first`,"createPage.importPrNotSupported":`This project's forge does not support listing pull requests`,"createPage.lockedToPr":`Locked to PR #{number}`,"createPage.prReadyToCreate":`PR #{number} imported — ready to create the workspace.`,"createPage.prResumeIntro":`Resuming work on the existing pull request #{number} "{title}" ({url}).`,"createPage.unlockPrCheckout":`Unlock`,"createPage.workspaceName":`Workspace name (defaults to Notion page title)`,"createPage.workspaceNamePlaceholder":`Workspace name...`,"createPage.instructions":`Additional instructions (optional)...`,"createPage.instructionsPlaceholder":`Describe the task...`,"createPage.tasks":`Tasks ({count})`,"createPage.addTask":`Add a task...`,"createPage.acceptanceCriteria":`Acceptance Criteria ({count})`,"createPage.addCriterion":`Add a criterion...`,"createPage.projectPath":`Enter the project path`,"createPage.branchType":`Branch type`,"createPage.branch":`Branch`,"createPage.noBranches":`No branches found`,"createPage.enterPath":`Enter a project path`,"createPage.skipSetupScript":`Skip setup script`,"createPage.worktreePickerLabel":`Existing worktree`,"createPage.noOrphanWorktrees":`No orphan worktrees in this project`,"createPage.pickWorktreeRequired":`Please pick a worktree to attach`,"createPage.notionExtractHint":`Subtasks and acceptance criteria will be extracted from the Notion page.`,"createPage.errorCreating":`Error creating workspace.`,"createPage.branchAdjusted":"Branch already existed — created `{branch}` instead. The matching worktree folder uses the same suffix.","createPage.localSourceFallback":`Workspace created from the local branch (origin unreachable) — the base may be stale.`,"createPage.validationNotionUrl":`Please paste a valid Notion URL (https://www.notion.so/... or https://app.notion.com/...).`,"createPage.validationDescription":`Please describe the task.`,"createPage.validationName":`Please provide a workspace name.`,"createPage.validationPath":`Please enter the project path.`,"createPage.validationBranch":`Please select a branch.`,"createPage.validationFocusHint":`The field to fix is highlighted below.`,"createPage.progress.validate":`Validating the request…`,"createPage.progress.fetch-source-branch":`Fetching the source branch from origin…`,"createPage.progress.inspect-worktree":`Inspecting the existing worktree…`,"createPage.progress.extract-notion":`Extracting the Notion page…`,"createPage.progress.extract-sentry":`Extracting the Sentry issue…`,"createPage.progress.create-record":`Creating the workspace…`,"createPage.progress.create-tasks":`Creating tasks and acceptance criteria…`,"createPage.progress.create-worktree":`Creating the git worktree…`,"createPage.progress.write-conventions":`Writing git conventions…`,"createPage.progress.write-context-files":`Writing context files…`,"createPage.progress.build-prompt":`Building the initial prompt…`,"createPage.progress.setup-script":`Running your setup script…`,"createPage.progress.start-agent":`Starting the agent…`,"createPage.progress.rollback":`Undoing the failed creation…`,"createPage.progress.done":`Done`,"createPage.progress.step":`Step {index} of {total}`,"createPage.errorAtStep":`Creation failed at step "{step}": {message}`,"createPage.override.title":`Two of your choices were overridden`,"createPage.override.setup-script-forced":`Setup script skipped: re-running it on a worktree you already prepared could destroy its contents.`,"createPage.override.permission-mode-downgraded":`Permission mode moved from Plan to Bypass: an auto-loop cannot run in Plan, which blocks tools and edits.`,"settings.title":`Settings`,"settings.language":`Language`,"settings.projectColor":`Color`,"settings.projectColorClear":`Clear`,"settings.projectColorDefault":`Default (grey)`,"settings.workspaceListSection":`Workspace list`,"settings.flattenWorkspaceList":`Flatten workspace list`,"settings.flattenWorkspaceListHint":`Show all workspaces in a single flat list with a project badge, instead of grouping by project.`,"workflow.title":`Git workflow`,"workflow.hint":`These preferences guide agents; they do not replace sandbox permissions. More restrictive user instructions take priority. Publication never authorizes merging. New workspaces keep a snapshot of these choices.`,"workflow.commit":`Commit`,"workflow.push":`Push`,"workflow.publish":`Publish PR/MR or comments`,"workflow.manual":`Manual — explicit request`,"workflow.automatic":`Automatic — when needed`,"workflow.inherit":`Inherit`,"workflow.locked":`Stop the agent to change these preferences. A running session already received them.`,"workflow.updateFailed":`Could not save the workflow preference. Check the connection and try again.`,"workflow.save":`Save workflow preferences`,"workflow.saved":`Workflow preferences saved.`,"workflow.planExecution":`Plan can prepare the mission. Execution requires choosing a supported execution permission mode explicitly, then resuming the loop.`,"settings.skillSuite.standard":`Standard (no extensions)`,"settings.skillSuite.standardHint":`Built-in workflow with no external skill suite required.`,"settings.skillSuite.section":`Skill suite`,"settings.skillSuite.superpowers":`Superpowers`,"settings.skillSuite.gstack":`gstack`,"settings.skillSuite.custom":`Custom`,"settings.skillSuite.superpowersHint":`Opinionated TDD / brainstorm / plan workflow (github.com/obra/superpowers).`,"settings.skillSuite.gstackHint":`Garry Tan's stack — /review, /ship, /qa, /office-hours, etc. (github.com/garrytan/gstack).`,"settings.skillSuite.superpowersGstack":`Superpowers + gstack`,"settings.skillSuite.superpowersGstackHint":`Both suites stack — superpowers for process discipline (brainstorm / TDD / plans / principles-level review), gstack for concrete workflows (/review, /qa, /browse, /design-review, /investigate).`,"settings.skillSuite.ecc":`ECC`,"settings.skillSuite.eccHint":`affaan-m's agent-harness framework — agents, skills, rules and hooks for planning, testing, implementing, reviewing and memorizing (github.com/affaan-m/ECC).`,"settings.skillSuite.allThree":`Superpowers + gstack + ECC`,"settings.skillSuite.allThreeHint":`All three stack — superpowers for process discipline, gstack for concrete workflows, ECC for structured multi-agent review/implementation passes.`,"settings.skillSuite.customHint":`Compose the five prompts below from any templates you choose, then edit them freely.`,"settings.skillSuite.reloadDefaults":`Reload defaults`,"settings.skillSuite.reloadDefaultsConfirm":`Replace the five custom prompts with the agnostic defaults?`,"settings.skillSuite.customPrompts":`Custom prompts`,"settings.skillSuite.agnostic":`Agnostic baseline`,"settings.skillSuite.importPrompt":`Import a template`,"settings.skillSuite.imported":`Template imported. You can now edit it.`,"settings.skillSuite.importFailed":`Unable to import the template`,"settings.skillSuite.reviewTemplate":`Review template`,"settings.skillSuite.autoLoopReviewGate":`Auto-loop review gate`,"settings.skillSuite.autoLoopGroomingIntro":`Auto-loop grooming intro`,"settings.skillSuite.qaTemplate":`QA template`,"settings.skillSuite.brainstormingInstruction":`Brainstorming-phase instruction`,"settings.global":`Global`,"settings.projects":`Projects`,"settings.globalSettings":`Global Settings`,"settings.defaultModel":`Default model`,"settings.defaultModelClaude":`Default model (Claude Code)`,"settings.defaultModelCodex":`Default model (OpenAI Codex)`,"settings.agentPermissions":`Agent permissions`,"settings.skipPermissions":`Skip permission prompts (--dangerously-skip-permissions)`,"settings.skipPermissionsWarning":`Warning: disabling this will cause all tool permissions (Write, Edit, Bash...) to be auto-denied in headless mode. The agent will only be able to read.`,"settings.notifications":`Notifications`,"settings.browserNotifications":`Browser notifications when agent finishes`,"settings.audioNotifications":`Sound notification when agent finishes`,"settings.enableBrowserNotifications":`Enable browser notifications`,"settings.testBrowserNotification":`Test notification`,"settings.browserNotificationGranted":`Browser notifications allowed`,"settings.browserNotificationDenied":`Browser notifications blocked`,"settings.browserNotificationAsk":`Browser permission required`,"settings.browserNotificationUnsupported":`Browser notifications unavailable`,"settings.browserNotificationPermissionNeeded":`Allow browser notifications to send a test.`,"settings.browserNotificationTestTitle":`Kōbō notification test`,"settings.browserNotificationTestBody":`Browser notifications are working.`,"settings.enableAudio":`Enable audio`,"settings.notificationSound":`Notification sound`,"settings.notificationSoundHint":`Played when the agent finishes or requests permission.`,"settings.questionSound":`Question sound`,"settings.questionSoundHint":`Played only when the agent asks you a question.`,"settings.workspaceCreatedSound":`Workspace creation sound`,"settings.workspaceCreatedSoundHint":`Played after a workspace is created.`,"settings.notificationSoundPreview":`Preview`,"settings.notificationVolume":`Volume`,"settings.notificationSoundHey":`Hey`,"settings.agentErrorSound":`Agent errors`,"settings.agentErrorSoundHint":`Played for quota, rate-limit, and agent errors.`,"settings.notificationSoundBasic":`Basic notification`,"settings.notificationSoundWorkspaceCreated":`Warcraft III — Work`,"settings.notificationSoundTravailTermine":`Work done`,"settings.notificationSoundFaaah":`Faaah`,"settings.notificationSoundCaVaPeter":`It's gonna blow`,"settings.notificationSoundDryFart":`Dry fart`,"settings.notificationSoundForShure":`For shure`,"settings.prSoundSection":`PR / MR and CI`,"settings.soundGeneral":`General sound`,"settings.soundNone":`No sound`,"settings.prCiFailedSound":`CI failed`,"settings.prCiRecoveredSound":`CI recovered`,"settings.prChangesRequestedSound":`Changes requested`,"settings.prApprovedSound":`PR approved`,"settings.prMergeConflictSound":`Merge conflict`,"settings.prReadyToMergeSound":`Ready to merge`,"settings.prMergedSound":`PR merged`,"settings.prCiFailedSoundHint":`Played when CI changes to a failed state.`,"settings.prCiRecoveredSoundHint":`Played when CI recovers from a failure.`,"settings.prChangesRequestedSoundHint":`Played when a review requests changes.`,"settings.prApprovedSoundHint":`Played when the pull request is approved.`,"settings.prMergeConflictSoundHint":`Played when a merge conflict is detected.`,"settings.prReadyToMergeSoundHint":`Played when the pull request becomes ready to merge.`,"settings.prMergedSoundHint":`Played when the pull request is merged.`,"settings.notificationSoundSeptiemeCompagnie03":`7ème compagnie 03`,"settings.notificationSoundAllerFtg":`Aller FTG`,"settings.notificationSoundArreteDeMentir":`Arrête de mentir`,"settings.notificationSoundArretezLesMessages":`Arrêtez d'envoyer les messages`,"settings.notificationSoundBahAlorsOnEstNul":`Bah alors, on est nul`,"settings.notificationSoundGtaVDeath":`GTA V — Death`,"settings.notificationSoundNanTuDegages":`Nan, tu dégages`,"settings.notificationSoundNanWallahPardon":`Nan, wallah, pardon`,"settings.notificationSoundOuaisCestGreg":`Ouais, c'est Greg`,"settings.notificationSoundPasCaZinedine":`Pas ça, Zinedine`,"settings.notificationSoundTaGueule":`Ta gueule`,"settings.notificationSoundTuVasLaFermer":`Tu vas la fermer`,"settings.notificationSoundYaaa":`Yaaa`,"settings.notificationSoundMaisLaisseMoiDormirZebi":`Mais laisse-moi dormir zebi`,"settings.defaultPermissionMode":`Default permission mode`,"settings.defaultPermissionModeClaude":`Default permission mode (Claude Code)`,"settings.defaultPermissionModeCodex":`Default permission mode (OpenAI Codex)`,"settings.defaultPermissionModeHint":`Mode applied when creating a new workspace. Plan = read-only first, Bypass = skip prompts, Strict = auto-accept edits with allow-list, Interactive = ask before each tool.`,"settings.activityFeed":`Activity feed`,"settings.verboseMessages":`Show verbose system messages (task_progress, task_started)`,"settings.showThinkingBlocks":`Show agent thinking blocks`,"settings.whipSettings":`Whip`,"settings.whipSettingsHint":`Configure the optional whip shortcut and volume.`,"settings.whipEnabled":`Enable whip`,"settings.whipEnabledHint":`Shows the interactive whip control in eligible running workspaces.`,"settings.whipVolume":`Whip volume`,"settings.whipVolumeMasterAudioDisabled":`Master audio is off. Enable audio notifications to adjust the whip volume; your saved value is preserved.`,"whip.overlayLabel":`Interactive whip`,"whip.overlayInstructions":`Move the pointer to control the whip. Press Enter or Space to crack it. Press Escape to close.`,"settings.whipShortcut":`Whip shortcut`,"settings.whipShortcutHint":`Click, then press the shortcut to use.`,"settings.whipShortcutRecording":`Press a shortcut…`,"settings.whipShortcutButtonLabel":`Whip shortcut: {shortcut}`,"settings.whipShortcutRecordingLabel":`Recording whip shortcut. Press a shortcut…`,"settings.whipShortcutReset":`Reset shortcut`,"settings.whipShortcutReserved":`This shortcut is reserved by the browser.`,"settings.testIntegration":`Test connection`,"pwa.offline":`You are offline. Chat and agents require the Kōbō server.`,"pwa.reconnecting":`Reconnecting to the Kōbō server…`,"pwa.installReady":`Install Kōbō as an app.`,"pwa.install":`Install`,"pwa.ignore":`Ignore`,"pwa.updateReady":`A Kōbō update is available.`,"pwa.reload":`Reload`,"chat.searchWorkspaceHistory":`Search workspace history`,"chat.historySearch.user":`You`,"chat.historySearch.agent":`Agent`,"chat.openInGitDiff":`Open in Git diff`,"timeline.title":`Session timeline`,"timeline.export":`Export diagnostic`,"timeline.unnamed":`Agent session`,"timeline.tools":`{count} tools`,"timeline.errors":`{count} errors`,"settings.availableVariables":`Available template variables`,"settings.prPromptTemplate":`PR prompt template`,"settings.prPromptPlaceholder":`Instructions for the agent when creating GitHub PRs...`,"settings.prPromptHint":`Use the template variables listed above (double curly brace syntax).`,"settings.reviewPromptTemplate":`Review prompt template`,"settings.reviewPromptPlaceholder":`Instructions for the agent when reviewing branch changes...`,"settings.ciFixPromptTemplate":`CI fix prompt template`,"settings.ciFixPromptHint":`Sent to the agent when a workspace has failing CI. Variables (double-brace syntax): pr_url, pr_number, pr_title, branch_name, source_branch, workspace_name, workspace_id, project_name, failed_jobs, ci_run_url.`,"settings.ciFixPromptPlaceholder":`Ask the agent to diagnose and fix the failing CI jobs...`,"settings.finalizationPromptTemplate":`Auto-loop finalization prompt`,"settings.finalizationPromptHint":`Default prompt for the final auto-loop iteration (last quality checks). Used when a project leaves its own finalization prompt empty.`,"settings.finalizationPromptPlaceholder":`Run final quality checks before closing the workspace...`,"settings.notionInitialPrompt":`Notion initial prompt`,"settings.notionInitialPrompt.help":`Appended to the workspace creation prompt when the workspace has a Notion ticket. Variables: {variables}.`,"settings.notionInitialPrompt.project":`Notion initial prompt (override)`,"settings.sentryInitialPrompt":`Sentry initial prompt`,"settings.sentryInitialPrompt.help":`Appended to the workspace creation prompt when the workspace has a Sentry issue. Variables: {variables}.`,"settings.sentryInitialPrompt.project":`Sentry initial prompt (override)`,"settings.initialPrompt.inheritHint":`Leave blank to inherit. Type any whitespace character to disable injection at this level.`,"settings.resetToDefault":`Reset to default`,"settings.resetFailed":`Failed to load default value`,"settings.sentryIntegration":`Sentry integration`,"settings.var.prNumber":`PR number (e.g., 42)`,"settings.var.prUrl":`Full URL of the created PR`,"settings.var.branchName":`Working branch name`,"settings.var.sourceBranch":`Source branch the PR targets`,"settings.var.workspaceName":`Workspace name`,"settings.var.projectName":`Last segment of the project path`,"settings.var.notionUrl":`Notion URL if set, empty otherwise`,"settings.var.commits":`Bulleted commit list between source and head`,"settings.var.diffStats":`Git shortstat summary (files, insertions, deletions)`,"settings.var.tasks":`Regular tasks as a checkbox list`,"settings.var.acceptanceCriteria":`Acceptance criteria as a checkbox list`,"settings.gitConventions":`Git conventions (global)`,"settings.gitConventionsPlaceholder":`# Git conventions...`,"settings.gitConventionsHint":`These conventions are written to .ai/.git-conventions.md in each new workspace and must be followed by the agent before any git operation. Overridden by per-project conventions if defined.`,"settings.setupScript":`Setup script`,"settings.cleanupScript":`Cleanup script`,"settings.archiveScript":`Archive script`,"settings.archiveScriptHint":`Shell script run server-side in the worktree when a workspace is archived. Leave empty to disable.`,"settings.archiveScriptPlaceholder":`e.g. clean up containers, free disk space…`,"settings.hook.sessionEndedTitle":`Hook: session ended`,"settings.hook.sessionEndedHint":`Runs when an agent session ends, whatever the reason. Reads KOBO_SESSION_END_REASON (completed / error / killed / watchdog), KOBO_SESSION_STOP_CAUSE, KOBO_AUTOLOOP_ACTIVE, KOBO_SESSION_ID and KOBO_SESSION_EXIT_CODE. Empty = disabled.`,"settings.hook.sessionEndedPlaceholder":`e.g. npm test, or notify a chat channel…`,"settings.hook.prMergedTitle":`Hook: PR merged`,"settings.hook.prMergedHint":`Runs when a PR is detected as merged, before the workspace is archived or purged — the worktree is still on disk. Reads KOBO_PR_NUMBER and KOBO_PR_URL. Empty = disabled.`,"settings.hook.prMergedPlaceholder":`e.g. trigger a deployment, tag a release…`,"settings.hook.autoLoopDisabledTitle":`Hook: auto-loop stopped`,"settings.hook.autoLoopDisabledHint":`Runs whenever auto-loop is disabled, by Kōbō or by you. Reads KOBO_AUTOLOOP_REASON (completed / stall / error / user-action / awaiting-clarification) and KOBO_TASKS_PENDING. Empty = disabled.`,"settings.hook.autoLoopDisabledPlaceholder":`e.g. send a notification when the loop stalls…`,"settings.changeSourceBranchScript":`Change-source-branch script`,"settings.changeSourceBranchScript.help":`Replaces the built-in cherry-pick when non-empty. The script owns git, PR base, force-push and conflicts; Kōbō still refuses while the agent is running and updates the source-branch metadata on exit 0.`,"settings.changeSourceBranchScript.envHelp":`KOBO_NEW_BASE — new source branch chosen in the dialog
5
5
  KOBO_OLD_BASE — workspace’s previous source branch
6
6
  KOBO_WORKING_BRANCH — workspace’s working branch
7
7
  KOBO_WORKTREE_PATH — absolute path of the worktree (also cwd)
@@ -17,4 +17,4 @@ KOBO_PR_NUMBER — PR/MR number on the resolved forge (empty if none open)`
17
17
  # Or directly via git (works on GitHub even after branch deletion):
18
18
  git fetch origin pull/[pr-number]/head:[branch-name]
19
19
  git worktree add [path] [branch-name]`,"settings.purgeDocsRestoreFootnote":`GitHub keeps the PR head ref accessible long after the source branch is deleted (months / years). Auto-detection runs in the 30s watcher — no UI action needed once the folder is back.`,"settings.purgeDocsPermissionsTitle":`Avoiding permission errors during purge`,"settings.purgeDocsPermissionsIntro":`Docker often leaves root-owned files in node_modules / vendor inside the worktree. When Kōbō tries to remove them, you hit EACCES / EPERM and the purge fails. Two ways to prevent it:`,"settings.purgeDocsPermissionsDocker":'Configure your container to run as your host user — USER directive in the Dockerfile, or `user: "${UID}:${GID}"` in docker-compose (with UID/GID exported in your shell).',"settings.purgeDocsPermissionsAcl":`Pre-seed the worktrees root with a default ACL — safety net that works in MOST cases (ext4/btrfs/xfs + standard Docker bind mount). Each new file then inherits an access entry for your user, on top of the nominal owner:`,"settings.purgeDocsPermissionsAclCommand":` setfacl -d -m u:$(whoami):rwX [worktrees-root]`,"settings.purgeDocsPermissionsFootnote":"ACL limitations: do NOT work on named Docker volumes (use a bind mount), filesystems without ACL support (NTFS, exFAT, tmpfs), strict SELinux with `:Z`, or when Docker `userns-remap` is enabled. The most reliable solution remains configuring the user inside the container (option 1). Tip: `rwX` (capital X) only adds the executable bit on directories and already-executable files — cleaner than `rwx` which would make every text file executable.","settings.purgeDocsPermissionsRecoverTitle":`Unblock an already-broken worktree (existing root-owned files)`,"settings.purgeDocsPermissionsRecoverIntro":`If you end up with a worktree already full of root-owned files (Docker has run, vendor / node_modules are stuck), the preventive ACL above is not enough — you need to fix EXISTING files. Two approaches, both run from inside the worktree folder:`,"settings.purgeDocsPermissionsRecoverAclIntro":`Option A — Recursive ACL (preserves root ownership for audit, just adds access for your user alongside):`,"settings.purgeDocsPermissionsRecoverAclCommand":`# set default ACL for future files AND grant access to everything existing
20
- sudo setfacl -Rd -m u:$(whoami):rwX . && sudo setfacl -R -m u:$(whoami):rwX .`,"settings.purgeDocsPermissionsRecoverChownIntro":`Option B — Take ownership (simpler, loses the "created by root in container" trace but rarely matters):`,"settings.purgeDocsPermissionsRecoverChownCommand":` sudo chown -R $(whoami):$(whoami) .`,"settings.purgeDocsPermissionsRecoverFootnote":"Tip: you can run these commands directly on the worktrees root (e.g. `~/.worktrees/`) to cover all existing AND future workspaces at once. Once done, Kōbō purge will work without permission errors.","contextMenu.runSetup":`Run setup script`,"contextMenu.exportEvents":`Export events (CSV)`,"contextMenu.dismissChangesRequested":`Mark 'Changes requested' as seen`,"contextMenu.dismissCiFailure":`Mark 'CI failure' as seen`,"contextMenu.restoreChangesRequested":`Mark 'Changes requested' as unseen`,"contextMenu.restoreCiFailure":`Mark 'CI failure' as unseen`,"contextMenu.exportingEvents":`Preparing export…`,"contextMenu.exportEventsError":`Event export failed`,"contextMenu.openNotion":`Open in Notion`,"contextMenu.openSentry":`Open in Sentry`,"contextMenu.openPr":`Open PR`,"contextMenu.ignorePrWatch":`Ignore PR checks`,"contextMenu.resumePrWatch":`Resume PR checks`,"contextMenu.prWatchToggleFailed":`Failed to update PR checks setting`,"workspace.favorite":`Mark as favorite`,"workspace.unfavorite":`Remove from favorites`,"workspace.showFavoritesOnly":`Show favorites only`,"workspace.searchArchivedToggle":`Also search archived workspaces`,"workspace.descriptionPlaceholder":`Add a short description`,"workspace.descriptionDialogHint":`Plain text, 200 characters max. Leave empty to clear.`,"workspace.descriptionTooLong":`Description must be 200 characters or fewer.`,"workspace.descriptionSaveFailed":`Failed to save description.`,"workspace.agentDescriptionTooltip":`Live status maintained by the agent`,"mcp.tool.setWorkspaceDescription":`Set the workspace short description (≤ 200 chars).`,"tags.manage":`Manage tags`,"tags.manageTitle":`Manage workspace tags`,"tags.noTagsDefined":`No tags defined. Add some in Settings > Global > Tags.`,"tags.orphanedHint":`{count} tag(s) are no longer in the global catalog. Uncheck to remove them.`,"settings.tagsTitle":`Workspace tags`,"settings.tagsHint":`Define the tags you can assign to workspaces. Type to add, click the cross to remove.`,"settings.tagsLabel":`Available tags`,"settings.branchPrefixesTitle":`Branch prefixes`,"settings.branchPrefixesHint":`Manage the git branch prefixes available on the workspace creation page. The first one is pre-selected by default.`,"settings.branchPrefixesEmpty":`No branch prefix defined. Add at least one below.`,"settings.branchPrefixesAddLabel":`New prefix`,"settings.branchPrefixesEditHint":`Click to rename`,"settings.branchPrefixesMoveUp":`Move up`,"settings.branchPrefixesMoveDown":`Move down`,"settings.worktreesTitle":`Git worktrees`,"settings.worktreesHint":`Choose where new workspace worktrees are created. Relative paths are project-relative; Linux/macOS and Windows absolute paths, $HOME, ~, and %USERPROFILE% are supported.`,"settings.worktreesPathLabel":`Worktrees path`,"settings.worktreesPathRequired":`Worktrees path is required.`,"settings.worktreesPrefixByProject":`Prefix worktrees by project name`,"settings.worktreesPrefixByProjectHint":`Place each worktree under a sub-directory named after the project, to avoid collisions when multiple projects share the same worktrees root.`,"settings.shareTitle":`Share configuration`,"settings.shareHint":`Export your settings, templates and tags as a JSON bundle. MCP API keys are stripped from exports for security.`,"settings.exportConfig":`Export`,"settings.importConfig":`Import`,"settings.exportSuccess":`Configuration exported`,"settings.importSuccess":`Configuration imported`,"settings.importConfirmTitle":`Import configuration`,"settings.importConfirmMessage":`This will replace your current settings, templates and tags. Your MCP keys are preserved. Continue?`,"settings.mcp.title":`External LLM connections (MCP)`,"settings.mcp.hint":`Connect an MCP client to read workspace conversations, send messages and answer questions.`,"settings.mcp.remoteDisabled":`Remote connections require network access and a server restart after enabling it.`,"settings.mcp.clientName":`Client name (optional)`,"settings.mcp.connection":`Connection`,"settings.mcp.local":`Local HTTP`,"settings.mcp.remote":`Remote HTTP`,"settings.mcp.proxy":`Reverse proxy`,"settings.mcp.stdio":`Local stdio`,"settings.mcp.copyUrl":`Copy URL`,"settings.mcp.copyConfig":`Copy configuration`,"settings.mcp.copyWithToken":`Copy with token`,"settings.mcp.genericFormat":`These examples use a generic mcpServers format. Adapt the container format to your MCP client. Token placeholders are kept in previews.`,"settings.mcp.tokenUnavailable":`No token is available. Enable network access before copying authenticated configuration.`,"settings.mcp.stdioUnavailable":`The stdio entrypoint is unavailable in this installation. Use HTTP or build Kōbō first.`,"settings.mcp.copyFailed":`Could not copy to the clipboard.`,"tours.settings.mcp.title":`Connect an external LLM`,"tours.settings.mcp.description":`Copy an HTTP or stdio configuration to let an external assistant communicate with your workspaces.`,"settings.network.title":`Network access`,"settings.network.hint":`Control Kōbō from another device on your trusted LAN. Off = localhost only. On = reachable on your network, protected by a token. Restart Kōbō after toggling.`,"settings.network.enable":`Enable network access`,"settings.network.behindProxy":`Behind a reverse proxy`,"settings.network.behindProxyHint":`Kōbō can no longer tell your own machine apart from a proxied request — even localhost will need the token from now on. Enable this only if a reverse proxy (Traefik, nginx, Caddy…) sits in front of Kōbō.`,"settings.network.restartRequired":`Restart Kōbō to apply the new bind address.`,"settings.network.token":`Access token`,"settings.network.copy":`Copy`,"settings.network.copied":`Copied`,"settings.network.regenerate":`Regenerate`,"settings.network.regenerateConfirm":`Regenerate the token? Connected devices will need the new token.`,"settings.network.urls":`LAN URLs`,"settings.network.scan":`Scan to connect`,"settings.network.noUrls":`No LAN address detected.`,"settings.network.loadFailed":`Failed to load network access settings.`,"settings.network.updateFailed":`Failed to update network access settings.`,"settings.unsavedChanges.title":`Unsaved changes`,"settings.unsavedChanges.message":`This project has unsaved changes. Switching projects will discard them.`,"settings.unsavedChanges.discard":`Discard and switch`,"settings.unsavedChanges.cancel":`Cancel`,"settings.loadFailed":`Settings could not be loaded`,"settings.loadFailedHint":`Saving is disabled: the form is showing default values, and writing them would overwrite your real configuration.`,"health.title":`Health`,"health.tooltip":`System health`,"changelog.title":`Changelog`,"changelog.tooltip":`What's new in Kōbō`,"changelog.empty":`No changelog available.`,"changelog.current":`current`,"changelog.currentVersion":`Current version: v{version}`,"health.envTitle":`Environment`,"health.version":`Version`,"health.koboHome":`Kōbō home`,"health.dbTitle":`Database`,"health.dbPath":`Path`,"health.dbSize":`Size`,"health.schemaVersion":`Schema version`,"health.settingsSchemaVersion":`Settings schema`,"health.runtimesTitle":`Agent runtimes`,"health.claudeCliTitle":`Claude Code`,"health.claudeCliMissing":`claude not on PATH`,"health.codexCliTitle":`OpenAI Codex`,"health.codexCliMissing":`codex binary not resolvable`,"health.forgeCliTitle":`Forge CLI (gh / glab)`,"health.forgeCliMissing":`Neither gh nor glab found — pull requests and CI watching are unavailable`,"health.workspacesTitle":`Workspaces`,"health.workspacesCount":`{total} total, {archived} archived`,"health.worktreesMissing":`{count} worktree(s) missing on disk`,"health.sessionsTitle":`Agent sessions`,"health.sessionsOrphaned":`{n} orphaned running session(s)`,"health.integrationsTitle":`Integrations`,"health.integrationConfigured":`configured`,"health.integrationMissing":`not configured`,"health.integrationDisabled":`disabled`,"settings.integrationEnabled":`Enable integration`,"health.activeTitle":`Active state`,"health.activeQuotaBackoffs":`Pending quota backoffs`,"health.activeWakeups":`Scheduled wakeups`,"health.activeAutoLoop":`Auto-loop running`,"health.activeAgentSessions":`Live agent sessions`,"health.activeDevServers":`Running dev servers`,"health.noneActive":`None.`,"health.quotaResumeAt":`resumes at {time}`,"health.wakeupAt":`wakes at {time}`,"health.startedAgo":`started {time} ago`,"health.autoLoopReady":`ready, iterating`,"health.autoLoopGrooming":`grooming in progress`,"session.started":`Session started`,"session.ended":`Session ended`,"session.compacted":`Context compacted`,"session.endedCompleted":`Turn finished — send a message to continue`,"session.endedKilled":`Session stopped`,"session.endedError":`Session ended on an error`,"session.endedWatchdog":`Session force-closed after a period of inactivity`,"tool.running":`Running...`,"activity.raw_lines":`Raw output lines ({n})`,"activity.loading_older":`Loading older messages…`,"activity.compacting":`Compacting context…`,"activity.prev_user_message":`Previous user message`,"activity.scroll_to_bottom":`Scroll to bottom`,"activity.empty":`Nothing yet`,"activity.emptyHint":`The agent output will show up here as soon as a session starts.`,"activity.a11y.region":`Agent activity announcements`,"activity.a11y.agentSaid":`Agent: {text}`,"activity.a11y.toolStarted":`Tool {name} started`,"activity.a11y.toolFinished":`Tool {name} finished`,"activity.a11y.toolFailed":`Tool {name} failed`,"chat.systemPrompt":`System prompt`,"chat.agent":`Agent`,"chat.cleanupScript":`Cleanup script`,"chat.archiveScript":`Archive script`,"chat.setupScript":`Setup script`,"chat.hookScript":`Hook {event}`,"chat.scriptDone":`Done`,"chat.scriptComplete":`[{phase}] Complete`,"chat.scriptError":`[{phase}] Error: {message}`,"chat.unknownError":`unknown`,"chat.you":`You`,"chat.session":`Session`,"chat.nActions":`{n} action | {n} actions`,"chat.lastUpdatedAt":`Last updated at {time}`,"chat.scrollToTurnTop":`Scroll to top of this message`,"migration.backing_up":`Backing up the database…`,"migration.running":`Migrating agent data — {processed}/{total}`,"migration.error":`Migration failed`,"migration.backup_location":`A backup was saved at {path}. Restart Kōbō to retry.`,"migration.retry":`Restart Kōbō to retry.`,"engine.select":`Engine`,"engine.model":`Model`,"engine.effort":`Reasoning effort`,"wakeup.scheduledIn":`Next wakeup in {n}s`,"wakeup.scheduledAt":`Next wakeup at {time}`,"wakeup.firing":`Waking up...`,"wakeup.reason":`Reason: {reason}`,"wakeup.cancel":`Cancel this wakeup`,"wakeup.pendingIndicator":`Wakeup scheduled`,"cron.pendingIndicator":`{n} cron(s) scheduled`,"schedule.tabLabel":`Schedule`,"schedule.admissionTitle":`New automatic session currently unavailable.`,"schedule.admissionHint":`Deadlines are unchanged. Delivery into an existing conversation follows its own rules.`,"schedule.admission.not-found":`Workspace not found.`,"schedule.admission.archived":`Workspace archived.`,"schedule.admission.purged":`Restore the worktree first.`,"schedule.admission.shutdown":`Server is shutting down.`,"schedule.admission.lifecycle":`A workspace operation is in progress.`,"schedule.admission.active-session":`The current session has not closed yet.`,"schedule.admission.awaiting-user":`A user answer is required.`,"schedule.admission.compacting":`Context compaction is in progress.`,"schedule.admission.quota":`Waiting for quota recovery.`,"schedule.admission.blocked":`Auto-loop is blocked; resolve its reported cause.`,"schedule.admission.capacity":`Concurrency limit reached: {running}/{limit} sessions.`,"schedule.panelTitle":`Automation`,"schedule.panelDescription":`Wake this workspace later or run instructions on a schedule.`,"schedule.activeTitle":`Active schedules`,"schedule.emptyTitle":`Nothing scheduled`,"schedule.emptyDescription":`Create a wakeup or recurring task below.`,"schedule.cancelWakeup":`Cancel this wakeup`,"schedule.cancelCron":`Delete this recurring task`,"schedule.createTitle":`Create a schedule`,"schedule.createDescription":`Choose when and how the agent should run.`,"schedule.typeWakeup":`One-time wakeup`,"schedule.typeRecurring":`Recurring task`,"schedule.wakeupDescription":`Run the prompt once after a delay.`,"schedule.cronDescription":`Run the prompt repeatedly on a fixed schedule.`,"schedule.promptHint":`Instructions that will be sent to the agent`,"schedule.frequencyTitle":`Frequency`,"schedule.advancedDescription":`Use a raw cron expression`,"schedule.cronExpressionLabel":`Cron expression`,"schedule.sessionModeTitle":`Execution session`,"schedule.modeResume":`Resume session`,"schedule.oneShotHint":`Remove this schedule after its first run.`,"schedule.wakeupTitle":`Wakeup pending`,"schedule.cronsTitle":`Recurring schedules`,"schedule.noWakeup":`No wakeup scheduled`,"schedule.noCrons":`No cron scheduled`,"schedule.invalidCron":`Inactive: invalid expression. Remove and recreate this schedule.`,"schedule.nextFireAt":`next at {time}`,"schedule.lastFiredAt":`last fired {time} ago`,"schedule.addCronTitle":`Add a recurring task`,"schedule.addWakeupTitle":`Schedule a wakeup`,"schedule.every":`Every`,"schedule.unitMinutes":`minutes`,"schedule.unitHours":`hours`,"schedule.unitDays":`days`,"schedule.daysDriftWarning":`The interval may shrink to 1 day at the end of the month (cron limitation).`,"schedule.advancedExpression":`Advanced expression (optional)`,"schedule.advancedHint":`Raw cron (e.g. */15 * * * *) or {'@'}hourly/{'@'}daily — overrides the picker when set.`,"schedule.promptLabel":`Prompt`,"schedule.labelOptional":`Label (optional)`,"schedule.delayMinutes":`Delay (minutes)`,"schedule.modeFresh":`New session`,"schedule.oneShot":`Run only once`,"schedule.addCronBtn":`Add cron`,"schedule.addWakeupBtn":`Schedule wakeup`,"schedule.cronCreated":`Recurring task added`,"schedule.wakeupCreated":`Wakeup scheduled`,"askUserQuestion.title":`The agent is asking a question`,"askUserQuestion.submit":`Submit answer`,"askUserQuestion.multiSelectHint":`Select one or more options`,"askUserQuestion.otherOption":`Other`,"askUserQuestion.otherOptionHint":`specify in your next chat message`,"askUserQuestion.freeFormLabel":`Specify your answer`,"askUserQuestion.freeFormHint":`This answer will be sent directly to the agent.`,"askUserQuestion.noPending":`No pending question`,"askUserQuestion.next":`Next`,"askUserQuestion.previous":`Previous`,"askUserQuestion.cancel":`Cancel`,"askUserQuestion.cancelTooltip":`Skip this question — the agent will proceed without an answer`,"askUserQuestion.collapse":`Collapse the question panel`,"askUserQuestion.expand":`Expand the question panel`,"permissionRequest.title":`The agent wants to use a tool`,"permissionRequest.allow":`Allow`,"permissionRequest.allowOnce":`Allow once`,"permissionRequest.allowTurn":`Allow this turn`,"permissionRequest.operationUnavailable":`Operation details unavailable; approve once or the entire tool.`,"permissionRequest.allowOperation":`Always this operation`,"permissionRequest.allowTool":`Always this tool`,"permissionRequest.deny":`Deny`,"permissionRequest.tool":`Tool`,"permissionRequest.input":`Input`,"permissionRequest.rawInput":`Technical details`,"permissionRequest.collapse":`Collapse the permission panel`,"permissionRequest.expand":`Expand the permission panel`,"permissionRequest.denied":`denied by user`,"workspaceStatus.created":`created`,"workspaceStatus.extracting":`extracting`,"workspaceStatus.brainstorming":`brainstorming`,"workspaceStatus.compacting":`compacting`,"chatInput.compactingBanner":`Context compaction in progress. Sending will be available when it finishes.`,"workspaceStatus.executing":`running`,"workspaceStatus.awaitingUser":`awaiting your answer`,"workspaceStatus.completed":`completed`,"workspaceStatus.idle":`idle`,"workspaceStatus.error":`error`,"workspaceStatus.quota":`quota reached`,"workspaceStatus.retrying":`auto-resuming`,"workspaceList.prOpen":`#{n} — Pull request open`,"workspaceList.prWatchDisabledIndicator":`PR checks ignored for this workspace`,"workspaceList.prChangesRequested":`#{n} — Changes requested`,"workspaceList.attentionCiFailed":`CI failed`,"workspaceList.attentionChangesRequested":`Changes requested`,"workspaceList.attentionReadyToMerge":`Ready to merge`,"autoLoop.status.active":`Active`,"autoLoop.status.waiting":`Waiting`,"autoLoop.status.blocked":`Blocked`,"autoLoop.status.completed":`Completed`,"autoLoop.status.stopped":`Stopped`,"autoLoop.phase.grooming":`Preparation`,"autoLoop.phase.execution":`Execution`,"autoLoop.phase.finalization":`Finalization`,"autoLoop.iteration":`Iteration {count}`,"autoLoop.resume":`Resume auto-loop`,"autoLoop.retryAt":`Retry scheduled for`,"autoLoop.actionFailed":`The action could not be completed.`,"autoLoop.messages.count":`{count} queued instruction(s)`,"autoLoop.messages.pending":`Queued`,"autoLoop.messages.dispatching":`Sending`,"autoLoop.messages.unknown":`Delivery unknown`,"autoLoop.messages.delivered":`Delivered`,"autoLoop.messages.cancel":`Cancel instruction`,"autoLoop.messages.acknowledge":`Mark as received`,"autoLoop.messages.retry":`Send again`,"autoLoop.messages.unknownHelp":`Delivery could not be confirmed. Check the conversation before deciding. Sending again may duplicate an instruction already received.`,"autoLoop.reason.quota":`Waiting for provider quota.`,"autoLoop.reason.transient":`Recovering after a temporary interruption.`,"autoLoop.reason.awaiting-user":`Waiting for your answer.`,"autoLoop.reason.capacity-or-lifecycle":`Waiting for an available agent slot.`,"autoLoop.reason.message-delivery-unknown":`Resolve the instruction with unknown delivery before resuming.`,"autoLoop.reason.error":`The loop needs attention before it can continue.`,"autoLoop.reason.stall":`No progress detected. Review the last session before resuming.`,"autoLoop.reason.awaiting-clarification":`A clarification is needed before continuing.`,"autoLoop.toggle":`Auto-loop`,"autoLoop.start":`Start auto-loop`,"autoLoop.prepare":`Prepare for auto-loop`,"autoLoop.reprepare":`Re-prepare for auto-loop`,"autoLoop.reprepareTooltip":`Re-run the grooming pass to add or refresh tasks before resuming the loop`,"autoLoop.prepareBusy":`Wait for the agent to finish before preparing`,"autoLoop.forceReady":`I know what I'm doing — skip grooming`,"autoLoop.forceReadyConfirm":`Skip grooming and mark auto-loop ready? This may cause the loop to stall if tasks aren't atomic.`,"autoLoop.stop":`Stop auto-loop`,"autoLoop.notReady":`Run 'Prepare for auto-loop' first`,"autoLoop.noTasks":`Add tasks first`,"autoLoop.progress":`Auto-loop · {done}/{total} tasks`,"autoLoop.preparing":`Auto-loop · preparing`,"autoLoop.preparingTooltip":`Grooming in progress — the agent is creating / reviewing tasks. The loop will start running once it calls mark_auto_loop_ready.`,"autoLoop.running":`Auto-loop running`,"autoLoop.startInMode":`Start in auto-loop mode`,"autoLoop.brainstormModelPrefix":`Brainstorm:`,"autoLoop.brainstormModelTooltip":`Model used only for the initial brainstorming session — every task after that uses the model picked above`,"autoLoop.brainstormReasoningPrefix":`Brainstorm:`,"autoLoop.brainstormReasoningTooltip":`Reasoning level used only for the initial brainstorming session`,"autoLoop.executionModelPrefix":`Loop:`,"autoLoop.executionModelTooltip":`Model used for every auto-loop task after the initial brainstorming session`,"autoLoop.sessionMode.perTask":`New session per task`,"autoLoop.sessionMode.label":`Session:`,"autoLoop.sessionMode.perTaskTooltip":`Each task starts a fresh Claude Code session with no memory of prior tasks`,"autoLoop.sessionMode.continuous":`Continuous session`,"autoLoop.sessionMode.continuousTooltip":`All tasks run in the same session — the agent keeps full context, but the session grows longer over time`,"koboCommand.prepAutoloopDesc":`Prepare tasks for auto-loop mode (groom for atomicity)`,"staleSessionBanner.title":`Auto-loop running`,"staleSessionBanner.message":`You're viewing an older session — the agent is currently working in the latest one.`,"staleSessionBanner.staleTitle":`Older session`,"staleSessionBanner.staleMessage":`You're viewing an older session — messages you send go to this session, not the latest one.`,"staleSessionBanner.switchToCurrent":`Switch to current`,"network.login.title":`Network access`,"network.login.description":`This Kōbō requires a token to be controlled from the network. Paste the token shown in Settings on the host machine.`,"network.login.tokenLabel":`Token`,"network.login.tokenPlaceholder":`Paste your token`,"network.login.connect":`Connect`,"network.login.invalid":`Invalid token`,"network.login.serverError":`Server error — try again.`,"network.login.unreachable":`Kōbō is unreachable — check your connection.`,"layout.toggleWorkspaces":`Toggle workspaces panel`,"layout.togglePanel":`Toggle side panel`,"unsaved.title":`Leave without saving?`,"unsaved.message":`You have unsaved changes. Leaving this page discards them.`,"unsaved.leave":`Leave`,"unsaved.stay":`Stay`,"prCheckout.staleRetriesExhausted":`The repository state kept changing while we tried to apply your choices. Close this dialog and try again from the pull request picker.`,"prPicker.title":`Import from a pull request`,"prPicker.filterAll":`All`,"prPicker.filterMine":`Mine`,"prPicker.filterReviewRequested":`Review requested`,"prPicker.searchPlaceholder":`Search pull requests…`,"prPicker.loadMore":`Load more`,"prPicker.empty":`No open pull request matches.`,"prPicker.forkNotSupported":`This PR comes from a fork; Kōbō cannot check it out.`,"prPicker.loadFailed":`Failed to load pull requests.`,"prPicker.badge.workspaceExists":`Already open in Kōbō`,"prPicker.badge.worktreePresent":`Worktree present`,"prPicker.badge.localBranch":`Local branch`,"prPicker.badge.new":`New`,"prPicker.badge.draft":`Draft`,"prCheckout.title":`Prepare the worktree`,"prCheckout.apply":`Apply`,"prCheckout.cancel":`Cancel`,"prCheckout.retry":`Retry`,"prCheckout.diagnoseFailed":`Failed to diagnose the pull request.`,"prCheckout.resolveFailed":`Failed to resolve the pull request checkout.`,"prCheckout.path.required":`Enter a worktree path that does not already exist.`,"prCheckout.workspace.restoreNotAvailable":"Restoring a purged workspace isn't available yet from here. Recreate its worktree folder on disk (e.g. `git worktree add`) and Kōbō will reattach it automatically within about 30 seconds.","prCheckout.staleReloaded":`The repository changed; the diagnosis has been refreshed.`,"prCheckout.step.blocked":`Cannot continue`,"prCheckout.step.path":`Worktree location`,"prCheckout.step.workspace":`Existing workspace`,"prCheckout.step.worktree":`Existing worktree`,"prCheckout.step.operation":`Git operation in progress`,"prCheckout.step.changes":`Uncommitted changes`,"prCheckout.step.divergence":`Local branch vs origin`,"prCheckout.workspace.activeHint":`A workspace named "{name}" already tracks this branch.`,"prCheckout.workspace.open":`Open that workspace`,"prCheckout.workspace.continue":`Continue on another path`,"prCheckout.workspace.unarchive":`Unarchive and open it`,"prCheckout.workspace.restore":`Recreate its worktree`,"prCheckout.worktree.orphanHint":`A worktree already sits on this branch at {path}.`,"prCheckout.worktree.attach":`Attach it`,"prCheckout.worktree.branchInUse":`This branch is already checked out. Attach its existing worktree.`,"prCheckout.worktree.createElsewhere":`Create another one elsewhere`,"prCheckout.operation.hint":`A {operation} is in progress in that worktree.`,"prCheckout.operation.abort":`Abort it`,"prCheckout.operation.cancel":`Leave it alone and stop here`,"prCheckout.changes.hint":`{modified} modified, {staged} staged, {untracked} untracked.`,"prCheckout.changes.stash":`Stash them`,"prCheckout.changes.commit":`Commit them`,"prCheckout.changes.discard":`Discard them (kept as a labelled stash)`,"prCheckout.changes.keepResetConflict":`Keeping local changes is incompatible with a hard reset. Stash or commit them first, or keep the branch.`,"prCheckout.changes.keep":`Keep them as they are`,"prCheckout.divergence.behindHint":`Your branch is {behind} commit(s) behind origin.`,"prCheckout.divergence.aheadHint":`Your branch has {ahead} unpushed commit(s).`,"prCheckout.divergence.divergedHint":`{ahead} ahead, {behind} behind origin.`,"prCheckout.divergence.fastForward":`Fast-forward to origin`,"prCheckout.divergence.rebase":`Rebase onto origin`,"prCheckout.divergence.resetHard":`Reset to origin (a backup branch is created first)`,"prCheckout.divergence.keep":`Keep the local state`,"prCheckout.blocked.forgeUnavailable":`The forge CLI is missing or not authenticated.`,"prCheckout.blocked.forkPr":`This PR comes from a fork; Kōbō cannot check it out.`,"prCheckout.blocked.headBranchDeleted":`The branch no longer exists on the remote.`,"prCheckout.blocked.indexLock":`Another git process is running (index.lock is present).`,"prCheckout.blocked.pathOccupied":`{path} already exists and is not a worktree.`,"prCheckout.blocked.worktreeOtherBranch":`{path} is a worktree on another branch ({branch}).`,"prCheckout.blocked.noCommonAncestor":`A local branch named {branch} exists with unrelated history.`,"split.title":`Double workspace`,"split.open":`Open side by side`,"split.openBeside":`Open beside`,"split.close":`Close split view`,"split.left":`Left workspace`,"split.right":`Right workspace`,"split.choose":`Choose a workspace`,"split.recipient":`Send to: {name}`,"absence.title":`Since your last visit`,"settings.activityDigestHint":`Show a summary of events that occurred while you were away. Turning this off hides the entry and stops collecting new events without deleting existing history.`,"absence.pending":`Changes to review`,"absence.retention":`Significant activity from the last 30 days, recorded since this feature was installed. Visit tracking is local to this browser.`,"absence.since":`Since {date}`,"absence.error":`Unable to load activity.`,"absence.retry":`Retry`,"absence.empty":`No new activity.`,"absence.more":`Load more`,"absence.markRead":`Mark displayed events as read`,"absence.kind.question":`Question asked`,"absence.kind.permission":`Approval requested`,"absence.kind.completed":`Session completed`,"absence.kind.error":`Agent error`,"absence.kind.pr-merged":`PR merged`,"absence.kind.pr-approved":`PR approved`,"absence.kind.pr-changes-requested":`Changes requested`,"absence.kind.pr-ci-failed":`CI failed`,"absence.kind.pr-ci-recovered":`CI recovered`,"absence.kind.pr-merge-conflict":`Merge conflict`,"absence.kind.pr-ready-to-merge":`PR ready to merge`,"absence.kind.archived":`Workspace archived`,"absence.kind.purged":`Worktree purged`,"absence.kind.restored":`Worktree restored`,"tours.split.controls.title":`Two independent workspaces`,"tours.split.controls.description":`Choose one workspace per pane. Resize the divider; each conversation keeps its own recipient and panels.`,"tours.home.sort.title":`Sort workspaces`,"tours.home.sort.description":`Choose the order and direction within each group. Your choice is remembered.`,"tours.home.activity.title":`Review activity after an absence`,"tours.home.activity.description":`At the bottom of the left drawer, find questions, session endings, errors and PR changes since your last visit.`},Hc=`modulepreload`,Uc=function(e){return`/`+e},Wc={},Gc=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Uc(t,n),t=s(t),t in Wc)return;Wc[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Hc,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Kc=`kobo:locale`,qc=[`en`,`fr`,`de`,`es`,`it`];function Jc(e){return qc.includes(e)}function Yc(){let e=localStorage.getItem(Kc);if(e&&Jc(e))return e;let t=navigator.language.split(`-`)[0];return t&&Jc(t)?(localStorage.setItem(Kc,t),t):(localStorage.setItem(Kc,`en`),`en`)}var Xc=Yc(),Zc=zo({legacy:!1,locale:Xc,fallbackLocale:`en`,messages:{en:Vc}}),Qc=new Set([`en`]),$c={fr:()=>Gc(()=>import(`./fr-ByYPK5vr.js`),[]),de:()=>Gc(()=>import(`./de-v6i2HlE2.js`),[]),es:()=>Gc(()=>import(`./es-Bc1KgkAT.js`),[]),it:()=>Gc(()=>import(`./it-BYF_88z6.js`),[])},el=0;async function tl(e){let t=++el;if(!Qc.has(e)&&e!==`en`){let t=await $c[e]();Zc.global.setLocaleMessage(e,t.default),Qc.add(e)}t===el&&(Zc.global.locale.value=e,nl(e))}function nl(e){typeof document<`u`&&(document.documentElement.lang=e)}nl(Xc);var rl=class{constructor(){Un(this,`pending`,new Map)}wait(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>o(Error(n)),3e4),o=e=>{clearTimeout(a),this.pending.delete(t),e?i(e):r()};this.pending.set(t,{workspaceId:e,finish:o})})}settle(e,t,n){let r=this.pending.get(t);r?.workspaceId===e&&r.finish(n)}disconnect(e){for(let t of this.pending.values())t.finish(Error(e))}},il=new Map,al=d(0);function ol(){al.value++}function sl(e){e.reconnectTimer&&=(clearTimeout(e.reconnectTimer),void 0)}function cl(e){let t=il.get(e);t&&(sl(t),t.ws&&(t.ws.onclose=null,t.ws.readyState===WebSocket.OPEN&&t.ws.close()),t.onDataDisposable?.dispose(),t.terminal.dispose(),il.delete(e),ol())}var ll=5e3,ul=Be(`agent-stream`,()=>{let e=t(new Map),n=t(new Map),r=t(new Map),i=t(new Map),a=t(new Map),o=t(new Map),s=t(new Map),c=t(new Map),l=d(new Map),u=t(new Map);function f(e,t){p(e);let n=0;for(let[r,i]of u.value.get(e)??[])t(r)&&(n+=i);return n}function p(e){l.value.get(e)}function m(e){l.value.set(e,(l.value.get(e)??0)+1)}function h(e){return l.value.get(e)??0}function g(e){let t=c.value.get(e);return t||(t=new Set,c.value.set(e,t)),t}function _(e){return p(e),s.value.get(e)??!1}function v(e,t){(s.value.get(e)??!1)!==t&&(s.value.set(e,t),m(e))}function y(t){return p(t),e.value.get(t)??[]}function b(e){return p(e),n.value.get(e)??[]}function x(e){return p(e),r.value.get(e)??[]}function S(e){return p(e),i.value.get(e)??[]}function C(e){return p(e),a.value.get(e)}function w(e){return p(e),o.value.get(e)??!0}function T(t,o,s,c,l,d=!0){let f=e.value.get(t)??[],p=n.value.get(t)??[],h=r.value.get(t)??[],_=i.value.get(t)??[],v=g(t);if(c&&v.has(c))return;if(d){let e=u.value.get(t)??new Map;e.set(l??null,(e.get(l??null)??0)+1),u.value.set(t,e)}let y=f.length===0;f.push(o),p.push(s??new Date().toISOString()),h.push(l??null),_.push(c??null),c&&v.add(c),e.value.set(t,f),n.value.set(t,p),r.value.set(t,h),i.value.set(t,_),y&&c&&a.value.set(t,c),E(t,f,p,h,_),m(t)}function E(e,t,n,r,i){let s=t.length-ll;if(s<=0)return;let c=s+500-1,l=i.slice(0,c),u=g(e);for(let e of l)e&&u.delete(e);t.splice(0,c),n.splice(0,c),r.splice(0,c),i.splice(0,c);let d=i.find(e=>typeof e==`string`);d?a.value.set(e,d):a.value.delete(e),o.value.set(e,!0)}function D(t,o,s,c){let l=e.value.get(t)??[],u=n.value.get(t)??[],d=r.value.get(t)??[],f=i.value.get(t)??[],p=g(t),h=[];for(let e=0;e<o.length;e++){let t=o[e];if(!t)continue;let n=c.eventIds[e]??null;n&&p.has(n)||(l.push(t),u.push(s[e]??new Date().toISOString()),d.push(c.sessionIds[e]??null),f.push(n),n&&p.add(n),h.push(e))}if(h.length===0)return h;if(e.value.set(t,l),n.value.set(t,u),r.value.set(t,d),i.value.set(t,f),!a.value.has(t)){let e=f.find(e=>typeof e==`string`);e&&a.value.set(t,e)}return E(t,l,u,d,f),m(t),h}function O(t,s,c,l){let u=[...s],d=c?[...c]:s.map(()=>new Date().toISOString()),f=l?.sessionIds?[...l.sessionIds]:s.map(()=>null),p=l?.eventIds?[...l.eventIds]:s.map(()=>null);e.value.set(t,u),n.value.set(t,d),r.value.set(t,f),i.value.set(t,p);let h=g(t);h.clear();for(let e of p)e&&h.add(e);l?.oldestId?a.value.set(t,l.oldestId):a.value.delete(t),l&&typeof l.hasMoreOlder==`boolean`?o.value.set(t,l.hasMoreOlder):o.value.delete(t),E(t,u,d,f,p),m(t)}function k(t,s,c,l){if(s.length===0){o.value.set(t,l.hasMoreOlder),m(t);return}let u=e.value.get(t)??[],d=n.value.get(t)??[],f=r.value.get(t)??[],p=i.value.get(t)??[],h=l.sessionIds??s.map(()=>null),_=l.eventIds??s.map(()=>null);e.value.set(t,[...s,...u]),n.value.set(t,[...c,...d]),r.value.set(t,[...h,...f]),i.value.set(t,[..._,...p]);let v=g(t);for(let e of _)e&&v.add(e);l.oldestId&&a.value.set(t,l.oldestId),o.value.set(t,l.hasMoreOlder),m(t)}function A(t,a){let o=e.value.get(t),s=i.value.get(t);if(!o||!s)return;let c=s.indexOf(a);if(c===-1)return;let l=n.value.get(t),u=r.value.get(t);o.splice(c,1),s.splice(c,1),l&&l.splice(c,1),u&&u.splice(c,1),g(t).delete(a),m(t)}function j(t){e.value.delete(t),n.value.delete(t),r.value.delete(t),i.value.delete(t),a.value.delete(t),o.value.delete(t),s.value.delete(t),c.value.delete(t),u.value.delete(t),m(t)}return{events:e,timestamps:n,sessionIds:r,eventIds:i,versions:l,versionFor:h,liveAppendCountFor:f,eventsFor:y,timestampsFor:b,sessionIdsFor:x,eventIdsFor:S,oldestIdFor:C,hasMoreOlderFor:w,isCompacting:_,setCompacting:v,append:T,merge:D,reset:O,prepend:k,removeByEventId:A,clear:j}}),dl=class extends Error{constructor(e,t,n,r){super(e),Un(this,`status`,void 0),Un(this,`code`,void 0),Un(this,`body`,void 0),this.name=`ApiError`,this.status=t,this.code=n,this.body=r}},fl=class extends Error{constructor(e){super(`Request timed out after ${e} ms`),Un(this,`timeoutMs`,void 0),this.name=`ApiTimeoutError`,this.timeoutMs=e}},pl=3e4;function ml(e,t){let n=e.trim();if(n.length===0)return{message:`HTTP ${t}`,code:void 0};try{let e=JSON.parse(n),r=typeof e.code==`string`?e.code:void 0;return typeof e.error==`string`&&e.error.length>0?{message:e.error,code:r}:typeof e.message==`string`&&e.message.length>0?{message:e.message,code:r}:{message:`HTTP ${t}`,code:r}}catch{return{message:n.slice(0,500),code:void 0}}}async function X(e,t={}){let{body:n,timeoutMs:r=pl,signal:i,headers:a,...o}=t;if(i?.aborted)throw i.reason??new DOMException(`Aborted`,`AbortError`);let s=new AbortController,c=!1,l=r>0?setTimeout(()=>{c=!0,s.abort()},r):null,u=()=>s.abort();i?.addEventListener(`abort`,u);try{let t={...o,signal:s.signal};n===void 0?a&&(t.headers=a):typeof n==`string`||n instanceof FormData||n instanceof Blob?(t.body=n,a&&(t.headers=a)):(t.body=JSON.stringify(n),t.headers={"Content-Type":`application/json`,...a??{}});let r=await fetch(e,t);if(!r.ok){let e=await r.text(),{message:t,code:n}=ml(e,r.status);throw new dl(t,r.status,n,e)}if(r.status===204)return;let i=await r.text();if(i.length===0)return;try{return JSON.parse(i)}catch(e){throw new dl(`Server returned a non-JSON body for a successful response: ${e instanceof Error?e.message:String(e)}`,r.status,void 0,i)}}catch(e){throw c?new fl(r):e}finally{l!==null&&clearTimeout(l),i?.removeEventListener(`abort`,u)}}function hl(e){return!!e&&e.state!==`completed`&&e.state!==`cancelled`}function gl(e){return e.state===`OPEN`&&e.reviewDecision===`CHANGES_REQUESTED`&&e.reviewers.some(e=>e.state===`CHANGES_REQUESTED`)}function _l(e){return e.state===`OPEN`&&e.ci.rollup===`FAILURE`}function vl(e){return e?_l(e)||gl(e):!1}var yl=[`executing`,`extracting`,`brainstorming`,`compacting`];function bl(e){return!!e&&yl.includes(e)}function xl(e,t){return bl(e)&&!t}function Sl(e,t,n){return xl(e,!t||n)}var Cl={created:`workspaceStatus.created`,extracting:`workspaceStatus.extracting`,brainstorming:`workspaceStatus.brainstorming`,executing:`workspaceStatus.executing`,compacting:`workspaceStatus.compacting`,"awaiting-user":`workspaceStatus.awaitingUser`,completed:`workspaceStatus.completed`,idle:`workspaceStatus.idle`,error:`workspaceStatus.error`,quota:`workspaceStatus.quota`};function wl(e){return e?Cl[e]??null:null}async function Tl(e){let t=await e.json().catch(()=>({}));return{ok:!0,branch:t.branch??``,upToDate:t.upToDate===!0}}var El=class extends Error{constructor(e,t,n){super(e),Un(this,`code`,void 0),Un(this,`operation`,void 0),this.name=`WorkspaceActionError`,this.code=t,this.operation=n}};function Dl(e){return e===`running`?`in_progress`:e}var Ol=5e3,kl=500,Al=null,jl=0,Ml=0,Nl=new Map,Pl=new Map,Fl=new Map,Il=new Map,Ll=new Map,Rl=new WeakMap;function zl(e){Pl.set(e,(Pl.get(e)??0)+1)}function Bl(e,t,n){let r={...e},i=new Set([...Object.keys(e),...Object.keys(t)]);for(let a of i){let i=t[a],o=e[a],s=(Pl.get(a)??0)!==(n.get(a)??0),c=i?Date.parse(i.updatedAt):NaN,l=o?Date.parse(o.updatedAt):NaN;(s||Number.isFinite(c)&&c>l)&&(i?r[a]=i:delete r[a])}return r}function Vl(e){return e===`claude-code`?`claude-code`:null}var Z=Be(`workspace`,{state:()=>({workspaces:[],selectedWorkspaceId:null,tasks:[],activityFeeds:{},activityFeedIds:{},activityCounts:{},subagents:{},agentTodos:{},sessions:[],loadingSessions:{},selectedSessionId:null,archivedWorkspaces:[],archivedLoaded:!1,restoringWorktreeIds:[],workspaceLifecycleVersion:0,workspaceLifecycleVersions:{},listRequestVersion:0,archivedListRequestVersion:0,loading:!1,listLoadError:null,listPollFailureStreak:0,activeListLoadFailed:!1,loadingOlderEvents:!1,hasMoreEvents:{},providerUsage:{},chatDraft:``,queuedMessages:{},activeAgentSessionIds:{},settledAgentSessionIds:{},gitRefreshTrigger:0,gitStatsCache:{},pendingWakeups:{},pendingQuotaBackoffs:{},pendingDeferred:{},pendingQueue:{},prSnapshots:{},autoLoopStates:{},autoLoopMessages:{},autoLoopMessageVersions:{},autoLoopSnapshotVersion:0,autoLoopMessageKeys:{},autoLoopQueueTransfers:{},crons:{},creationProgress:null,agentLiveness:{},agentLivenessLoaded:{}}),getters:{selectedWorkspace:e=>e.workspaces.find(t=>t.id===e.selectedWorkspaceId)??e.archivedWorkspaces.find(t=>t.id===e.selectedWorkspaceId)??null,needsAttention(e){return e.workspaces.filter(t=>[`error`,`quota`,`awaiting-user`].includes(t.status)||vl(e.prSnapshots[t.id])||!bl(t.status)&&!!e.prSnapshots[t.id]?.readyToMerge)},running(e){return e.workspaces.filter(t=>bl(t.status)&&!vl(e.prSnapshots[t.id]))},idle(e){return e.workspaces.filter(t=>[`completed`,`idle`,`created`].includes(t.status)&&!vl(e.prSnapshots[t.id])&&!e.prSnapshots[t.id]?.readyToMerge)},favorites(e){return e.workspaces.filter(e=>e.favoritedAt!==null)},currentAgentTodos:e=>e.selectedWorkspaceId?e.agentTodos[e.selectedWorkspaceId]??[]:[],currentSubagents:e=>{if(!e.selectedWorkspaceId)return[];let t=e.subagents[e.selectedWorkspaceId]??{};return Object.values(t).sort((e,t)=>e.startedAt.localeCompare(t.startedAt))},activityFeed:e=>{if(!e.selectedWorkspaceId)return[];let t=e.activityFeeds[e.selectedWorkspaceId]??[];if(!e.selectedSessionId)return e.sessions.length===0?t:[];let n=e.sessions.find(t=>t.id===e.selectedSessionId)?.engineSessionId??null,r=e.sessions.length>0?e.sessions[e.sessions.length-1].id:null,i=e.selectedSessionId===r;return t.filter(t=>t.sessionId?t.sessionId===e.selectedSessionId||n!==null&&t.sessionId===n:i)},acceptanceCriteria:e=>e.tasks.filter(e=>e.isAcceptanceCriterion),archived:e=>e.archivedWorkspaces,currentProviderUsage(e){let t=e.workspaces.find(t=>t.id===e.selectedWorkspaceId);if(!t)return null;let n=Vl(t.engine);return n?e.providerUsage[n]??null:null}},actions:{clearWorkspaceLocalState(e){delete this.activityFeeds[e],delete this.activityFeedIds[e],delete this.activityCounts[e],delete this.subagents[e],delete this.agentTodos[e],delete this.hasMoreEvents[e],delete this.gitStatsCache[e],delete this.pendingWakeups[e],delete this.pendingQuotaBackoffs[e],delete this.pendingDeferred[e],delete this.pendingQueue[e],delete this.prSnapshots[e],delete this.autoLoopStates[e],delete this.autoLoopMessages[e],delete this.autoLoopMessageKeys[e],delete this.crons[e],delete this.activeAgentSessionIds[e];for(let t of Object.keys(this.queuedMessages))t.startsWith(`${e}:`)&&delete this.queuedMessages[t];Nl.delete(e),Pl.delete(e),Fl.delete(e),Il.delete(e),ul().clear(e),localStorage.removeItem(`kobo:session:${e}`)},setCreationProgress(e){this.creationProgress=e},clearCreationProgress(){this.creationProgress=null},async toggleFavorite(e){let t=this.workspaces.find(t=>t.id===e);if(!t)return;let n=t.favoritedAt,r=n===null,i=r?new Date().toISOString():null;this.workspaces=this.workspaces.map(t=>t.id===e?{...t,favoritedAt:i}:t);try{let t=await fetch(`/api/workspaces/${e}/favorite`,{method:r?`POST`:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.workspaces=this.workspaces.map(t=>t.id===e?n:t)}catch(t){throw this.workspaces=this.workspaces.map(t=>t.id===e?{...t,favoritedAt:n}:t),t}},async togglePrWatch(e){let t=this.workspaces.find(t=>t.id===e);if(!t)return;let n=t.prWatchDisabledAt===null,r=n?new Date().toISOString():null;this.workspaces=this.workspaces.map(t=>t.id===e?{...t,prWatchDisabledAt:r}:t);try{let t=await fetch(`/api/workspaces/${e}/pr-watch-disabled`,{method:n?`POST`:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`);if(n){let n=await t.json();this.workspaces=this.workspaces.map(t=>t.id===e?n:t),delete this.prSnapshots[e],zl(e)}else{let{workspace:n,prSnapshot:r}=await t.json();this.workspaces=this.workspaces.map(t=>t.id===e?n:t),r?this.prSnapshots[e]=r:delete this.prSnapshots[e],zl(e)}}catch(n){throw this.workspaces=this.workspaces.map(n=>n.id===e?{...n,prWatchDisabledAt:t.prWatchDisabledAt}:n),n}},async setWorkspaceTags(e,t){let n=this.workspaces.find(t=>t.id===e);if(!n)return;let r=n.tags,i=[...t];this.workspaces=this.workspaces.map(t=>t.id===e?{...t,tags:i}:t);try{let n=await fetch(`/api/workspaces/${e}/tags`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({tags:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();this.workspaces=this.workspaces.map(t=>t.id===e?r:t)}catch(t){throw this.workspaces=this.workspaces.map(t=>t.id===e?{...t,tags:r}:t),t}},async fetchOrphanWorktrees(e){return X(`/api/git/orphan-worktrees?projectPath=${encodeURIComponent(e)}`,{cache:`no-store`})},async fetchWorkspaces(){let e=++this.listRequestVersion,t=new Map(Nl),n=this.workspaceLifecycleVersion;this.loading=!0;try{let r=await X(`/api/workspaces`);if(e!==this.listRequestVersion||n!==this.workspaceLifecycleVersion)return;let i=new Map(this.workspaces.map(e=>[e.id,e]));this.workspaces=(Array.isArray(r)?r:r.workspaces??[]).map(e=>(Nl.get(e.id)??0)===(t.get(e.id)??0)?e:i.get(e.id)??e),this.listLoadError=null,this.activeListLoadFailed=!1,this.listPollFailureStreak=0;for(let e of this.workspaces)ul().setCompacting(e.id,e.status===`compacting`),[`completed`,`idle`,`error`,`quota`].includes(e.status)&&this.finalizeRunningSubagents(e.id)}catch(t){if(e!==this.listRequestVersion||n!==this.workspaceLifecycleVersion)return;this.listLoadError=t instanceof Error?t.message:String(t),this.activeListLoadFailed=!0,console.error(`[workspace store] fetchWorkspaces failed:`,t)}finally{e===this.listRequestVersion&&(this.loading=!1)}},async retryLoadWorkspaces(){await this.fetchWorkspaces(),this.archivedLoaded&&await this.fetchArchivedWorkspaces()},async fetchArchivedWorkspaces(){let e=++this.archivedListRequestVersion,t=new Map(Nl),n=this.workspaceLifecycleVersion;try{let r=await X(`/api/workspaces/archived`);if(e!==this.archivedListRequestVersion||n!==this.workspaceLifecycleVersion)return;let i=new Map(this.archivedWorkspaces.map(e=>[e.id,e]));this.archivedWorkspaces=r.map(e=>(Nl.get(e.id)??0)===(t.get(e.id)??0)?e:i.get(e.id)??e),this.archivedLoaded=!0,this.activeListLoadFailed||(this.listLoadError=null)}catch(t){if(e!==this.archivedListRequestVersion||n!==this.workspaceLifecycleVersion)return;this.listLoadError=t instanceof Error?t.message:String(t),console.error(`[workspace store] fetchArchivedWorkspaces failed:`,t)}},async fetchWorkspaceDetails(e){let t=this.workspaceLifecycleVersions[e]??0,n=(Il.get(e)??0)+1;Il.set(e,n);let r=Nl.get(e)??0;try{let i=await X(`/api/workspaces/${e}`);if(this.selectedWorkspaceId!==e||Il.get(e)!==n)return;if(t===(this.workspaceLifecycleVersions[e]??0)){let t=(Nl.get(e)??0)!==r,n=i.workspace??i,a=t?{}:n;typeof a.status==`string`&&ul().setCompacting(e,a.status===`compacting`);let o=this.workspaces.findIndex(t=>t.id===e);if(o>=0)this.workspaces[o]={...this.workspaces[o],...a};else{let t=this.archivedWorkspaces.findIndex(t=>t.id===e);t>=0?this.archivedWorkspaces[t]={...this.archivedWorkspaces[t],...a}:a?.archivedAt&&this.archivedWorkspaces.unshift(a)}}i.tasks&&(this.tasks=i.tasks),`agentLiveness`in i&&(Nl.get(e)??0)===r&&this.applyAgentLiveness(e,i.agentLiveness)}catch(e){console.error(`[workspace store] fetchWorkspaceDetails failed:`,e)}},applyAgentLiveness(e,t){if(this.agentLivenessLoaded={...this.agentLivenessLoaded,[e]:!0},t){this.agentLiveness={...this.agentLiveness,[e]:t};return}if(e in this.agentLiveness){let t={...this.agentLiveness};delete t[e],this.agentLiveness=t}},async createWorkspace(e,t=[]){try{let n=JSON.stringify(e);if(t.length>0){n=new FormData,n.append(`workspace`,JSON.stringify(e));for(let e of t)n.append(`attachments`,e)}let r=await fetch(`/api/workspaces`,{method:`POST`,...typeof n==`string`?{headers:{"Content-Type":`application/json`}}:{},body:n});if(!r.ok){let e=await r.json().catch(()=>({}));throw new El(typeof e.error==`string`?e.error:`HTTP ${r.status}`,typeof e.step==`string`?e.step:void 0)}let i=r.headers.get(`X-Kobo-Branch-Adjusted`)===`1`,a=r.headers.get(`X-Kobo-Source-Fallback`)===`local`,o=await r.json(),s=o.workspace??o;this.invalidateWorkspaceLifecycleReads(s.id);let c=this.workspaces.findIndex(e=>e.id===s.id);return c>=0?this.workspaces[c]=s:this.workspaces.push(s),e.autoLoop&&this.fetchAutoLoopStates(),s._branchAdjusted=i,s._sourceFallback=a,s}catch(e){throw console.error(`[workspace store] createWorkspace failed:`,e),e}},async startWorkspace(e,t,n,r){try{await X(`/api/workspaces/${e}/start`,{method:`POST`,body:{prompt:t,agentSessionId:n,resume:r}}),await this.fetchWorkspaces()}catch(e){throw console.error(`[workspace store] startWorkspace failed:`,e),e}},async previewEngineHandoff(e,t){let n=await fetch(`/api/workspaces/${e}/engine-handoff-preview`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({engine:t})}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`HTTP ${n.status}`);return r.handoff},async switchEngine(e,t){let n=await fetch(`/api/workspaces/${e}/switch-engine`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`HTTP ${n.status}`);let i=r.workspace,a=this.workspaces.findIndex(t=>t.id===e);return a>=0&&(this.workspaces[a]=i),await this.fetchSessions(e,r.sessionId),{sessionId:r.sessionId}},async stopWorkspace(e){try{let t=await fetch(`/api/workspaces/${e}/stop`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await this.fetchWorkspaces()}catch(e){throw console.error(`[workspace store] stopWorkspace failed:`,e),e}},async interruptAgent(e,t={}){try{let n=await fetch(`/api/workspaces/${e}/interrupt`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>void 0),t=typeof e==`object`&&e&&!Array.isArray(e)?e:void 0,r=typeof t?.error==`string`?t.error:`HTTP ${n.status}`,i=t?.code;throw new El(r,n.status===409&&(i===`no_agent_running`||i===`session_not_active`)||n.status===500&&i===`interrupt_failed`?i:void 0)}}catch(e){throw console.error(`[workspace store] interruptAgent failed:`,e),e}},async deleteWorkspace(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=[];if(n.status===200){let e=await n.json().catch(()=>({}));r=Array.isArray(e.warnings)?e.warnings:[]}return this.workspaces=this.workspaces.filter(t=>t.id!==e),this.archivedWorkspaces=this.archivedWorkspaces.filter(t=>t.id!==e),this.clearWorkspaceLocalState(e),cl(e),this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[]),{warnings:r}}catch(e){throw console.error(`[workspace store] deleteWorkspace failed:`,e),e}},async deleteAllArchived(e){try{let t=this.archivedWorkspaces.map(e=>e.id),n=await fetch(`/api/workspaces/archived`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e??{})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json().catch(()=>({})),i=typeof r.deleted==`number`?r.deleted:0,a=Array.isArray(r.warnings)?r.warnings:[];this.archivedWorkspaces=[];for(let e of t)this.clearWorkspaceLocalState(e),cl(e),this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[]);return{deleted:i,warnings:a,ids:t}}catch(e){throw console.error(`[workspace store] deleteAllArchived failed:`,e),e}},async updateModel(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)}catch(e){throw console.error(`[workspace store] updateModel failed:`,e),e}},async updateWorkspaceDescription(e,t){let n=this.workspaces.findIndex(t=>t.id===e);if(n<0)throw Error(`Workspace '${e}' not found in store`);let r=this.workspaces[n].description;this.workspaces[n]={...this.workspaces[n],description:t};try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({description:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json();this.workspaces=this.workspaces.map(t=>t.id===e?{...t,...r}:t)}catch(n){let i=this.workspaces.findIndex(t=>t.id===e);throw i>=0&&this.workspaces[i].description===t&&(this.workspaces[i]={...this.workspaces[i],description:r}),n}},async updateReasoningEffort(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({reasoningEffort:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)}catch(e){throw console.error(`[workspace store] updateReasoningEffort failed:`,e),e}},async renameWorkspaceBranch(e,t){let n=await fetch(`/api/workspaces/${e}/rename-branch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({newName:t})}),r=await n.json().catch(()=>null);if(!n.ok)throw new El(r?.error??`Rename failed`,r?.code);let i=r,a=this.workspaces.findIndex(t=>t.id===e);return a>=0&&(this.workspaces[a]=i),i},async resyncWorkspaceBranch(e){let t=await fetch(`/api/workspaces/${e}/resync-branch`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();if(n.changed){let t=this.workspaces.findIndex(t=>t.id===e);t>=0&&(this.workspaces[t]={...this.workspaces[t],workingBranch:n.workingBranch})}return n},async updateAgentPermissionMode(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({agentPermissionMode:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)}catch(e){throw console.error(`[workspace store] updateAgentPermissionMode failed:`,e),e}},async updateWorkflowPolicy(e,t){let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({workflowPolicy:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw new El(e.error??`HTTP ${n.status}`,e.code)}let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)},async pushBranch(e,t={}){let n=await fetch(`/api/workspaces/${e}/push`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({force:t.force===!0})});if(!n.ok){let e=await n.json().catch(()=>({error:`Push failed`}));throw new El(e.error??`Push failed`,e.code,e.operation)}return Tl(n)},async forcePushBranch(e){let t=await fetch(`/api/workspaces/${e}/force-push`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({error:`Push failed`}));throw new El(e.error??`Push failed`,e.code,e.operation)}return Tl(t)},async fetchGitStats(e,t={}){let n=await X(`/api/workspaces/${e}/git-stats${t.freshFetch?`?freshFetch=1`:``}`,{signal:t.signal,timeoutMs:6e4});return this.gitStatsCache[e]=n,n},async fetchBranchDivergence(e,t={}){let n=`/api/workspaces/${e}/branch-divergence?limit=${t.limit??50}`,r=await fetch(n,{signal:t.signal});if(!r.ok)throw Error(`HTTP ${r.status}`);return await r.json()},async openPullRequest(e){let t=await fetch(`/api/workspaces/${e}/open-pr`,{method:`POST`}),n=await t.json().catch(()=>null);if(!t.ok)throw new El(n?.error??`Open PR failed`,n?.code);return n},async archiveWorkspace(e){try{let t=await fetch(`/api/workspaces/${e}/archive`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();return this.workspaces=this.workspaces.filter(t=>t.id!==e),this.archivedLoaded&&this.archivedWorkspaces.unshift(n),this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[]),n}catch(e){throw console.error(`[workspace store] archiveWorkspace failed:`,e),e}},invalidateWorkspaceLifecycleReads(e){this.workspaceLifecycleVersion+=1,e&&(this.workspaceLifecycleVersions[e]=(this.workspaceLifecycleVersions[e]??0)+1)},applyRestoredWorkspace(e){this.invalidateWorkspaceLifecycleReads(e.id);let t=this.workspaces.findIndex(t=>t.id===e.id);t===-1?this.workspaces.unshift(e):this.workspaces[t]=e,this.archivedWorkspaces=this.archivedWorkspaces.filter(t=>t.id!==e.id)},restoreWorktree(e){let t=Rl.get(this);t||(t=new Map,Rl.set(this,t));let n=t.get(e);if(n)return n;let r=this.workspaceLifecycleVersions[e]??0;this.restoringWorktreeIds.push(e);let i=(async()=>{try{let t=await fetch(`/api/workspaces/${e}/restore-worktree`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({}));throw new El(e.error??`HTTP ${t.status}`,e.code)}let{workspace:n}=await t.json();return r===(this.workspaceLifecycleVersions[e]??0)&&this.applyRestoredWorkspace(n),n}finally{this.restoringWorktreeIds=this.restoringWorktreeIds.filter(t=>t!==e),t.delete(e)}})();return t.set(e,i),i},async unarchiveWorkspace(e){try{let t=await fetch(`/api/workspaces/${e}/unarchive`,{method:`POST`});if(!t.ok){if(t.status===409){let e=await t.json().catch(()=>({})),n=Error(e.error??`worktree-purged`);throw n.code=`worktree-purged`,n}throw Error(`HTTP ${t.status}`)}let n=await t.json();return this.archivedWorkspaces=this.archivedWorkspaces.filter(t=>t.id!==e),this.workspaces.unshift(n),n}catch(e){throw console.error(`[workspace store] unarchiveWorkspace failed:`,e),e}},async createTask(e,t,n){try{let r=await fetch(`/api/workspaces/${e}/tasks`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:t,isAcceptanceCriterion:n})});if(!r.ok)throw Error(`HTTP ${r.status}`);await this.fetchWorkspaceDetails(e)}catch(e){throw console.error(`[workspace store] createTask failed:`,e),e}},async updateTaskTitle(e,t,n){try{let r=await fetch(`/api/workspaces/${e}/tasks/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:n})});if(!r.ok)throw Error(`HTTP ${r.status}`);await this.fetchWorkspaceDetails(e)}catch(e){throw console.error(`[workspace store] updateTaskTitle failed:`,e),e}},async deleteTask(e,t){try{let n=await fetch(`/api/workspaces/${e}/tasks/${t}`,{method:`DELETE`});if(!n.ok)throw Error(`HTTP ${n.status}`);await this.fetchWorkspaceDetails(e)}catch(e){throw console.error(`[workspace store] deleteTask failed:`,e),e}},selectWorkspace(e){this.selectedWorkspaceId=e,this.selectedSessionId=null,this.sessions=[],this.tasks=[],this.markRead(e),this.fetchWorkspaceDetails(e),this.fetchSessions(e),this.fetchPendingQuotaBackoff(e),this.fetchGitStats(e).catch(()=>{}),this.activityFeeds[e]?.length||Md().subscribe(e)},async fetchSessions(e,t){let n=(Fl.get(e)??0)+1;Fl.set(e,n),this.loadingSessions[e]=!0;try{let r=await fetch(`/api/workspaces/${e}/sessions`);if(!r.ok)throw Error(`HTTP ${r.status}`);let i=await r.json();if(this.selectedWorkspaceId!==e||Fl.get(e)!==n)return;if(this.sessions=i,t===null){this.selectSession(null);return}if(t&&this.sessions.some(e=>e.id===t)){this.selectSession(t);return}let a=this.selectedSessionId&&this.sessions.some(e=>e.id===this.selectedSessionId);if(this.sessions.length>0&&!a){let t=localStorage.getItem(`kobo:session:${e}`),n=this.sessions.filter(e=>(e.activationOrder??0)>=0),r=t?n.find(e=>e.id===t):null;this.selectSession(r?.id??n[0]?.id??null)}}catch(e){console.error(`[workspace store] fetchSessions failed:`,e)}finally{Fl.get(e)===n&&delete this.loadingSessions[e]}},async fetchOlderEvents(e){if(this.loadingOlderEvents||this.hasMoreEvents[e]===!1)return!1;let t=this.activityFeeds[e];if(!t?.length)return!1;let n=t[0].id;this.loadingOlderEvents=!0;try{let t=await fetch(`/api/workspaces/${e}/events?before=${encodeURIComponent(n)}&limit=100`);if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(this.hasMoreEvents[e]=r.hasMore,r.events.length>0){let e=Md();for(let t of r.events)e._routeMessage(t)}return r.events.length>0}catch(e){return console.error(`[workspace store] fetchOlderEvents failed:`,e),!1}finally{this.loadingOlderEvents=!1}},selectSession(e){if(this.selectedSessionId=e,this.selectedWorkspaceId){let t=`kobo:session:${this.selectedWorkspaceId}`;e===null?localStorage.removeItem(t):localStorage.setItem(t,e)}},async createSession(e){try{let t=await fetch(`/api/workspaces/${e}/sessions`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}let n=await t.json();return this.selectedWorkspaceId===e&&(this.sessions.unshift(n),this.selectSession(n.id)),n}catch(e){throw console.error(`[workspace store] createSession failed:`,e),e}},async renameWorkspace(e,t){let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]={...this.workspaces[i],...r});let a=this.archivedWorkspaces.findIndex(t=>t.id===e);a>=0&&(this.archivedWorkspaces[a]={...this.archivedWorkspaces[a],...r})},async renameSession(e,t,n){let r=await fetch(`/api/workspaces/${e}/sessions/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:n})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error??`HTTP ${r.status}`)}let i=await r.json().catch(()=>null),a=this.sessions.find(e=>e.id===t);a&&(a.name=i?.name??n)},async deleteSession(e,t){let n=await fetch(`/api/workspaces/${e}/sessions/${t}`,{method:`DELETE`}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`HTTP ${n.status}`);let i=this.selectedSessionId===t,a=r.workspace;if(a){let t=this.workspaces.findIndex(t=>t.id===e);t>=0&&(this.workspaces[t]=a)}await this.fetchSessions(e),i&&this.selectedWorkspaceId===e&&this.selectSession(this.sessions[0]?.id??null)},addActivityItem(e,t){if(this.activityFeeds[e]||(this.activityFeeds[e]=[]),this.activityFeedIds[e]||(this.activityFeedIds[e]=new Set),this.activityCounts[e]||(this.activityCounts[e]={toolUses:0,agentMessages:0,userMessages:0,errors:0}),t.meta?.sender!==`user`&&t.meta?.sender!==`system-prompt`)for(let t of this.activityFeeds[e])t.meta?.pending&&(t.meta.pending=!1);if(!this.activityFeedIds[e].has(t.id)){this.activityFeedIds[e].add(t.id),this.activityFeeds[e].push(t);let n=this.activityCounts[e];t.type===`tool_use`?n.toolUses++:t.type===`error`&&n.errors++,t.meta?.sender===`user`?n.userMessages++:t.type===`text`&&t.meta?.sender!==`system-prompt`&&n.agentMessages++}let n=this.activityFeeds[e];if(n.length>Ol){let t=n.splice(0,n.length-Ol),r=this.activityFeedIds[e];for(let e of t)r.delete(e.id)}},removeActivityItem(e,t){let n=this.activityFeeds[e],r=this.activityFeedIds[e];if(!n||!r)return;let i=n.findIndex(e=>e.id===t);if(i<0)return;let[a]=n.splice(i,1);r.delete(t);let o=this.activityCounts[e];o&&a&&(a.type===`tool_use`?o.toolUses=Math.max(0,o.toolUses-1):a.type===`error`&&(o.errors=Math.max(0,o.errors-1)),a.meta?.sender===`user`?o.userMessages=Math.max(0,o.userMessages-1):a.type===`text`&&a.meta?.sender!==`system-prompt`&&(o.agentMessages=Math.max(0,o.agentMessages-1)))},clearActivityFeed(e){e?(delete this.activityFeeds[e],delete this.activityFeedIds[e],delete this.activityCounts[e]):(this.activityFeeds={},this.activityFeedIds={},this.activityCounts={})},applyUsageSnapshot(e){this.providerUsage[e.providerId]=e.snapshot},async requestUsageRefresh(e){try{await fetch(`/api/usage/${e}/refresh`,{method:`POST`})}catch(e){console.error(`[workspace store] requestUsageRefresh failed:`,e)}},triggerGitRefresh(){this.gitRefreshTrigger++,this.schedulePrSnapshotsRefresh()},schedulePrSnapshotsRefresh(){Al!==null&&clearTimeout(Al),Al=setTimeout(()=>{Al=null,this.fetchPrSnapshots()},kl)},async fetchPrSnapshots(){let e=++Ml,t=new Map(Pl);try{let n=await fetch(`/api/workspaces/pr-states`,{cache:`no-store`});if(!n.ok)return;let r=await n.json();if(e!==Ml)return;this.prSnapshots=Bl(r,this.prSnapshots,t)}catch(e){console.error(`[workspace-store] fetchPrSnapshots failed:`,e)}},async fetchWorkspacesInfo(){let e=this.workspaceLifecycleVersion,t=++jl,n=new Map(Nl),r=new Map(Pl),i=new Map(Ll);try{let a=await X(`/api/workspaces/info`,{cache:`no-store`});if(this.listPollFailureStreak=0,this.activeListLoadFailed=!1,this.listLoadError=null,t!==jl||e!==this.workspaceLifecycleVersion)return;if(this.agentLiveness=a.agentLiveness??{},a.pendingInputs)for(let e of a.workspaces){if((Ll.get(e.id)??0)!==(i.get(e.id)??0))continue;let t=this.pendingQueue[e.id]??[],n=new Map(t.map(e=>[e.toolCallId,e])),r=(a.pendingInputs[e.id]??[]).map(e=>{let t=n.get(e.toolCallId);return t&&Ht.deepEqual(t,e)?t:e});if(!(r.length===t.length&&r.every((e,n)=>e===t[n]))){this.clearAllPending(e.id);for(let t of r)this.enqueuePending(e.id,t)}}let o={...this.agentLivenessLoaded};for(let e of a.workspaces)o[e.id]=!0;this.agentLivenessLoaded=o;let s=new Map(this.workspaces.map(e=>[e.id,e]));this.workspaces=a.workspaces.map(e=>{let t=s.get(e.id),r=(Nl.get(e.id)??0)!==(n.get(e.id)??0);return t&&r?{...e,...t}:e});for(let e of this.workspaces)ul().setCompacting(e.id,e.status===`compacting`),[`completed`,`idle`,`error`,`quota`].includes(e.status)&&this.finalizeRunningSubagents(e.id);this.prSnapshots=Bl(a.prSnapshots,this.prSnapshots,r);let c={...this.gitStatsCache};for(let[e,t]of Object.entries(a.gitStats)){let n=c[e];(!n||(t.computedAt??0)>=(n.computedAt??0))&&(c[e]=t)}this.gitStatsCache=c}catch(e){console.error(`[workspace-store] fetchWorkspacesInfo failed:`,e),this.listPollFailureStreak+=1,this.listPollFailureStreak>=2&&(this.activeListLoadFailed=!0,this.listLoadError=e instanceof Error?e.message:String(e))}},async refreshPrSnapshot(e){try{let t=await fetch(`/api/workspaces/pr-snapshot/refresh/${e}`,{method:`POST`});if(t.status===404){let t={...this.prSnapshots};return delete t[e],this.prSnapshots=t,zl(e),null}if(!t.ok)return console.error(`[workspace-store] refreshPrSnapshot non-OK:`,t.status),null;let n=await t.json();return this.prSnapshots={...this.prSnapshots,[e]:n.snapshot},zl(e),n.snapshot}catch(e){return console.error(`[workspace-store] refreshPrSnapshot failed:`,e),null}},async fetchAutoLoopStates(){let e=++this.autoLoopSnapshotVersion;try{let t=await fetch(`/api/workspaces/auto-loop-states`,{cache:`no-store`});if(!t.ok)return;let n=await t.json();e===this.autoLoopSnapshotVersion&&(this.autoLoopStates=n)}catch(e){console.error(`[workspace-store] fetchAutoLoopStates failed:`,e)}},async fetchAutoLoopMessages(e){let t=(this.autoLoopMessageVersions[e]??0)+1;this.autoLoopMessageVersions[e]=t;let n=await fetch(`/api/workspaces/${e}/auto-loop/messages`,{cache:`no-store`});if(n.ok){let r=await n.json();this.autoLoopMessageVersions[e]===t&&(this.autoLoopMessages[e]=r)}},async queueAutoLoopMessage(e,t){let n=this.autoLoopMessageKeys[e];(!n||n.content!==t)&&(n={content:t,id:Array.from(crypto.getRandomValues(new Uint32Array(4)),e=>e.toString(16)).join(`-`)},this.autoLoopMessageKeys[e]=n);let r=await fetch(`/api/workspaces/${e}/auto-loop/messages`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:t,clientMessageId:n.id})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error??`HTTP ${r.status}`)}delete this.autoLoopMessageKeys[e],await this.fetchAutoLoopMessages(e).catch(()=>{})},async resolveAutoLoopMessage(e,t,n){let r=await fetch(`/api/workspaces/${e}/auto-loop/messages/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:n})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error??`HTTP ${r.status}`)}await this.fetchAutoLoopMessages(e)},async enableAutoLoop(e){let t=await fetch(`/api/workspaces/${e}/auto-loop`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}await this.fetchAutoLoopStates()},async disableAutoLoop(e){let t=await fetch(`/api/workspaces/${e}/auto-loop`,{method:`DELETE`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}await this.fetchAutoLoopStates()},async forceAutoLoopReady(e){let t=await fetch(`/api/workspaces/${e}/auto-loop-ready`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await this.fetchAutoLoopStates()},setAutoLoopState(e,t){this.autoLoopStates[e]=t},clearAutoLoopState(e){delete this.autoLoopStates[e],delete this.autoLoopMessages[e],delete this.autoLoopMessageKeys[e]},async fetchCrons(e){try{let t=await fetch(`/api/workspaces/${e}/crons`);if(!t.ok)return;let n=await t.json();this.crons[e]=n.crons}catch(e){console.error(`[workspace-store] fetchCrons failed:`,e)}},async cancelCron(e,t){let n=this.crons[e]??[];this.crons[e]=n.filter(e=>e.id!==t);try{let n=await fetch(`/api/workspaces/${e}/crons/${t}`,{method:`DELETE`});if(!n.ok)throw Error(`HTTP ${n.status}`)}catch(t){throw this.crons[e]=n,t}},async createCron(e,t){let n=await fetch(`/api/workspaces/${e}/crons`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}await this.fetchCrons(e)},async scheduleManualWakeup(e,t){let n=await fetch(`/api/workspaces/${e}/pending-wakeup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json();r.pending&&(this.pendingWakeups[e]=r.pending)},async fetchPendingWakeup(e){try{let t=await fetch(`/api/workspaces/${e}/pending-wakeup`,{cache:`no-store`});if(!t.ok)return;let n=await t.json();n?this.pendingWakeups[e]=n:delete this.pendingWakeups[e]}catch(e){console.error(`[workspace-store] fetchPendingWakeup failed:`,e)}},setPendingWakeup(e,t){this.pendingWakeups[e]=t},clearPendingWakeup(e){delete this.pendingWakeups[e]},async cancelPendingWakeup(e){let t=this.pendingWakeups[e]!==void 0;delete this.pendingWakeups[e];try{let t=await fetch(`/api/workspaces/${e}/pending-wakeup`,{method:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`)}catch(n){console.error(`[workspace-store] cancelPendingWakeup failed:`,n),t&&await this.fetchPendingWakeup(e)}},async fetchPendingQuotaBackoff(e){try{let t=await fetch(`/api/workspaces/${e}/quota-backoff`,{cache:`no-store`});if(!t.ok)return;let n=await t.json();n?this.pendingQuotaBackoffs[e]={...n,reason:n.reason===`transient`?`transient`:`quota`}:delete this.pendingQuotaBackoffs[e]}catch(e){console.error(`[workspace-store] fetchPendingQuotaBackoff failed:`,e)}},setPendingQuotaBackoff(e,t){this.pendingQuotaBackoffs[e]=t},clearPendingQuotaBackoff(e){delete this.pendingQuotaBackoffs[e]},async cancelQuotaBackoff(e){let t=this.pendingQuotaBackoffs[e]!==void 0;delete this.pendingQuotaBackoffs[e];try{let t=await fetch(`/api/workspaces/${e}/quota-backoff`,{method:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`)}catch(n){console.error(`[workspace-store] cancelQuotaBackoff failed:`,n),t&&await this.fetchPendingQuotaBackoff(e)}},async resumeQuotaBackoffNow(e){await this.fetchSessions(e);let t=this.sessions[0];t&&(t.status===`completed`||t.status===`error`)?await this.startWorkspace(e,void 0,t.id,!0):await this.startWorkspace(e)},enqueuePending(e,t){Ll.set(e,(Ll.get(e)??0)+1);let n=this.pendingQueue[e]??[];n.some(e=>e.toolCallId===t.toolCallId)||(n.push(t),this.pendingQueue[e]=n,t.kind===`question`&&(this.pendingDeferred[e]={toolCallId:t.toolCallId,toolName:t.toolName,input:t.input,agentSessionId:t.agentSessionId}))},peekPending(e){return this.pendingQueue[e]?.[0]},dequeuePending(e){Ll.set(e,(Ll.get(e)??0)+1);let t=this.pendingQueue[e];if(!t||t.length===0)return;let n=t.shift();t.length===0&&delete this.pendingQueue[e];let r=this.pendingQueue[e]?.[0];return r&&r.kind===`question`?this.pendingDeferred[e]={toolCallId:r.toolCallId,toolName:r.toolName,input:r.input,agentSessionId:r.agentSessionId}:delete this.pendingDeferred[e],n},clearPendingForSession(e,t){if(Ll.set(e,(Ll.get(e)??0)+1),t===null)return;let n=this.pendingQueue[e];if(!n)return;let r=n.filter(e=>e.agentSessionId!==t);r.length===0?delete this.pendingQueue[e]:this.pendingQueue[e]=r;let i=this.pendingDeferred[e];i&&i.agentSessionId===t&&delete this.pendingDeferred[e]},clearAllPending(e){Ll.set(e,(Ll.get(e)??0)+1),delete this.pendingQueue[e],delete this.pendingDeferred[e]},setPendingDeferred(e,t){this.enqueuePending(e,{kind:`question`,agentSessionId:t.agentSessionId,toolCallId:t.toolCallId,toolName:t.toolName,input:t.input})},clearPendingDeferred(e,t=null){if(t===null){this.clearAllPending(e);return}this.clearPendingForSession(e,t)},getPendingDeferred(e){let t=this.peekPending(e);if(t?.kind===`question`)return{toolCallId:t.toolCallId,toolName:t.toolName,input:t.input,agentSessionId:t.agentSessionId}},async submitDeferredAnswer(e,t,n,r,i){let a=await fetch(`/api/workspaces/${e}/deferred-tool-use/answer`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({answers:t,toolCallId:n,awaitingFreeForm:r,response:i})});if(!a.ok){let t=(await a.json().catch(()=>({}))).error??`HTTP ${a.status}`;if(/no deferred tool use pending|no agent running|no active engine process|no pending callback/i.test(t)){console.warn(`[workspace] submitDeferredAnswer: deferred callback expired — clearing zombie panel locally`),this.dequeuePending(e),this.fetchWorkspaces();return}throw Error(t)}this.dequeuePending(e),this.fetchWorkspaces()},async cancelDeferredAnswer(e,t,n){let r=await fetch(`/api/workspaces/${e}/deferred-tool-use/cancel`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({reason:t,toolCallId:n})});if(!r.ok){let t=(await r.json().catch(()=>({}))).error??`HTTP ${r.status}`;if(/no deferred tool use pending/i.test(t)){console.warn(`[workspace] cancelDeferredAnswer: backend has no pending — clearing zombie panel locally`),this.dequeuePending(e),this.fetchWorkspaces();return}throw Error(t)}this.dequeuePending(e),this.fetchWorkspaces()},async submitDeferredPermission(e,t,n,r,i=`once`){let a=await fetch(`/api/workspaces/${e}/deferred-permission/decision`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({toolCallId:t,decision:n,reason:r,scope:i})});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.error??`HTTP ${a.status}`)}this.dequeuePending(e),this.fetchWorkspaces()},updateAgentTodos(e,t){this.agentTodos[e]=t},agentTaskCreate(e,t,n){let r=this.agentTodos[e]?[...this.agentTodos[e]]:[];r.some(e=>e.id===t)||(r.push({id:t,content:n.subject||n.description||``,status:`pending`,activeForm:n.activeForm}),this.agentTodos[e]=r)},agentTaskSetNumber(e,t,n){let r=this.agentTodos[e];r&&(this.agentTodos[e]=r.map(e=>e.id===t?{...e,taskNumber:n}:e))},agentTaskUpdate(e,t,n){let r=this.agentTodos[e];if(r){if(n.status===`deleted`){this.agentTodos[e]=r.filter(e=>e.taskNumber!==t);return}this.agentTodos[e]=r.map(e=>e.taskNumber===t?{...e,status:n.status?Dl(n.status):e.status,content:n.content??e.content,activeForm:n.activeForm??e.activeForm}:e)}},finalizeRunningSubagents(e){let t=this.subagents[e];if(!t)return;let n=new Date().toISOString();for(let e of Object.keys(t)){let r=t[e];r.status===`running`&&(t[e]={...r,status:`done`,updatedAt:n})}},upsertSubagent(e,t){this.subagents[e]||(this.subagents[e]={});let n=this.subagents[e][t.toolUseId],r=new Date().toISOString(),i=n?.status===`done`?`done`:t.status??n?.status??`running`;this.subagents[e][t.toolUseId]={toolUseId:t.toolUseId,description:t.description??n?.description??``,taskType:t.taskType??n?.taskType,status:i,lastToolName:t.lastToolName??n?.lastToolName,lastDescription:t.lastDescription??n?.lastDescription,totalTokens:t.totalTokens??n?.totalTokens,toolUses:t.toolUses??n?.toolUses,durationMs:t.durationMs??n?.durationMs,startedAt:n?.startedAt??r,updatedAt:r}},async markRead(e){try{let t=await fetch(`/api/workspaces/${e}/mark-read`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=this.workspaces.findIndex(t=>t.id===e);n>=0&&(this.workspaces[n]={...this.workspaces[n],hasUnread:!1})}catch(e){console.error(`[workspace store] markRead failed:`,e)}},async purgeWorktree(e){try{let t=await fetch(`/api/workspaces/${e}/purge-worktree`,{method:`POST`}),n=await t.json();if(!t.ok)return{ok:!1,error:n.error??`HTTP ${t.status}`};let r=n.workspace;return r&&(this.updateWorkspaceFromEvent(e,{archivedAt:r.archivedAt,worktreePurgedAt:r.worktreePurgedAt,worktreePurgeRestoreData:r.worktreePurgeRestoreData}),r.archivedAt&&this.archivedLoaded&&(this.archivedWorkspaces.some(t=>t.id===e)||this.archivedWorkspaces.unshift(r),this.workspaces=this.workspaces.filter(t=>t.id!==e),this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[]))),{ok:!0,warnings:n.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}},async dismissPrAttention(e,t){let n=this.prSnapshots[e];if(n)try{let r=await fetch(`/api/workspaces/${e}/dismiss-pr-attention`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:t,prUpdatedAt:n.updatedAt})});if(!r.ok)throw Error(`HTTP ${r.status}`);let i=t===`changes-requested`?{prChangesDismissedAt:n.updatedAt}:{prCiFailureDismissedAt:n.updatedAt};this.updateWorkspaceFromEvent(e,i)}catch(e){console.error(`[workspace store] dismissPrAttention failed:`,e)}},async restorePrAttention(e,t){try{let n=await fetch(`/api/workspaces/${e}/restore-pr-attention`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=t===`changes-requested`?{prChangesDismissedAt:null}:{prCiFailureDismissedAt:null};this.updateWorkspaceFromEvent(e,r)}catch(e){console.error(`[workspace store] restorePrAttention failed:`,e)}},queuedMessageKey(e,t){return`${e}:${t}`},getQueuedMessage(e,t){return t?this.queuedMessages[this.queuedMessageKey(e,t)]:void 0},queueMessage(e,t,n){let r=vc(this);if(r)return r.queue(e,t,n);this.queuedMessages[this.queuedMessageKey(e,n)]={content:t,sessionId:n}},cancelQueuedMessage(e,t){let n=vc(this);if(n)return n.cancel(e,t);t&&delete this.queuedMessages[this.queuedMessageKey(e,t)]},async flushQueuedMessage(e,t){let n=vc(this);if(n)return n.flush(e,t);let r=this.getQueuedMessage(e,t);if(!r)return;if(this.autoLoopStates[e]?.auto_loop??this.workspaces.find(t=>t.id===e)?.autoLoop){let n=this.queuedMessageKey(e,t);if(this.autoLoopQueueTransfers[n])return;this.autoLoopQueueTransfers[n]=!0;try{await this.queueAutoLoopMessage(e,r.content),this.getQueuedMessage(e,t)?.content===r.content&&this.cancelQueuedMessage(e,t)}catch{}finally{delete this.autoLoopQueueTransfers[n]}return}let i=Md();i.isCompacting(e)||(this.cancelQueuedMessage(e,t),i.sendChatMessage(e,r.content,t))},setActiveAgentSession(e,t){this.activeAgentSessionIds[e]=t,delete this.settledAgentSessionIds[e]},markAgentTurnSettled(e,t){this.activeAgentSessionIds[e]===t&&(this.settledAgentSessionIds[e]=t)},isAgentTurnSettled(e){let t=this.activeAgentSessionIds[e];return t!==void 0&&this.settledAgentSessionIds[e]===t},clearActiveAgentSession(e,t){this.activeAgentSessionIds[e]===t&&(delete this.activeAgentSessionIds[e],delete this.settledAgentSessionIds[e])},clearActiveAgentSessionOwner(e){delete this.activeAgentSessionIds[e],delete this.settledAgentSessionIds[e]},updateWorkspaceFromEvent(e,t){Nl.set(e,(Nl.get(e)??0)+1);let n=this.workspaces.findIndex(t=>t.id===e);if(n>=0&&(this.workspaces[n]={...this.workspaces[n],...t}),t.status!==void 0){if(ul().setCompacting(e,t.status===`compacting`),e in this.agentLivenessLoaded){let t={...this.agentLivenessLoaded};delete t[e],this.agentLivenessLoaded=t}e===this.selectedWorkspaceId&&this.fetchWorkspaceDetails(e)}if(t.status&&[`completed`,`idle`,`error`,`quota`].includes(t.status)){let t=this.activityFeeds[e];if(t)for(let e of t)e.meta?.pending&&(e.meta.pending=!1);let n=this.subagents[e];if(n)for(let[e,t]of Object.entries(n))t.status===`running`&&(n[e]={...t,status:`done`})}}}}),Hl=Be(`session-handoff`,{state:()=>({current:{},versions:{},selectedTargets:{},selectedSources:{},followedHandoffs:{},loadErrors:{}}),getters:{isActive:e=>t=>[`stopping`,`generating`,`starting`].includes(e.current[t]?.state??``),isBlocking:e=>t=>hl(e.current[t])},actions:{apply(e,t=!1){let n=this.current[e.workspaceId];if(n&&Date.parse(n.updatedAt)>Date.parse(e.updatedAt))return;this.versions[e.workspaceId]=(this.versions[e.workspaceId]??0)+1,this.current[e.workspaceId]=e,this.loadErrors[e.workspaceId]=null,(t||this.isActive(e.workspaceId))&&(this.followedHandoffs[e.workspaceId]=e.id);let r=this.followedHandoffs[e.workspaceId]===e.id;hl(e)||delete this.followedHandoffs[e.workspaceId];let i=Z(),a=`${e.id}:${e.targetSessionId}:${e.state===`cancelled`?`cancelled`:`restored`}`;r&&[`failed`,`interrupted`,`cancelled`].includes(e.state)&&i.selectedWorkspaceId===e.workspaceId&&this.selectedSources[e.workspaceId]!==a&&(this.selectedSources[e.workspaceId]=a,i.fetchSessions(e.workspaceId,e.sourceSessionId)),r&&e.state===`completed`&&e.targetSessionId&&i.selectedWorkspaceId===e.workspaceId&&this.selectedTargets[e.workspaceId]!==e.id&&(this.selectedTargets[e.workspaceId]=e.id,i.fetchSessions(e.workspaceId,e.targetSessionId))},async refresh(e){let t=this.versions[e]??0;try{let{handoff:n}=await X(`/api/workspaces/${e}/session-handoffs/current`);if((this.versions[e]??0)!==t)return;this.loadErrors[e]=null,n?this.apply(n):this.current[e]=null}catch(t){throw this.loadErrors[e]=t instanceof Error?t.message:String(t),t}},async start(e,t){let n=this.versions[e]??0,{handoff:r}=await X(`/api/workspaces/${e}/session-handoffs`,{method:`POST`,body:t}),i=this.current[e];return this.apply((this.versions[e]??0)!==n&&i?.id===r.id?i:r,!0),r},async decide(e,t,n){let r=this.versions[e]??0,{handoff:i}=await X(`/api/workspaces/${e}/session-handoffs/${t}/decision`,{method:`POST`,body:{action:n}}),a=this.current[e];return this.apply((this.versions[e]??0)!==r&&a?.id===i.id?a:i,!0),i}}}),Ul=`custom:`,Wl=RegExp(`^[A-Za-z0-9_-]{12}$`),Gl=[`.wav`,`.mp3`,`.ogg`,`.webm`],Kl=[...Object.values({".wav":`audio/wav`,".mp3":`audio/mpeg`,".ogg":`audio/ogg`,".webm":`audio/webm`}),...Gl].join(`,`),ql=2097152;function Jl(e){return`${Ul}${e}`}function Yl(e){return typeof e==`string`&&e.startsWith(`custom:`)&&Wl.test(e.slice(7))}function Xl(e){return Yl(e)?e.slice(7):``}function Zl(e){let t=/\.[^.\\/]+$/.exec(e)?.[0]?.toLowerCase()??``;return Gl.includes(t)?t:null}var Ql=`/sounds`,$l=[{id:`neutral.wav`,labelKey:`settings.notificationSoundBasic`},{id:`ready.wav`,labelKey:`settings.notificationSoundReady`}],eu=`neutral.wav`,tu=`inherit`,nu=[`audioPrCiFailedSound`,`audioPrCiRecoveredSound`,`audioPrChangesRequestedSound`,`audioPrApprovedSound`,`audioPrMergeConflictSound`,`audioPrReadyToMergeSound`,`audioPrMergedSound`],ru=[`audioPrCiFailedEnabled`,`audioPrCiFailedVolume`,`audioPrCiRecoveredEnabled`,`audioPrCiRecoveredVolume`,`audioPrChangesRequestedEnabled`,`audioPrChangesRequestedVolume`,`audioPrApprovedEnabled`,`audioPrApprovedVolume`,`audioPrMergeConflictEnabled`,`audioPrMergeConflictVolume`,`audioPrReadyToMergeEnabled`,`audioPrReadyToMergeVolume`,`audioPrMergedEnabled`,`audioPrMergedVolume`],iu={audioPrCiFailedSound:tu,audioPrCiRecoveredSound:tu,audioPrChangesRequestedSound:tu,audioPrApprovedSound:tu,audioPrMergeConflictSound:tu,audioPrReadyToMergeSound:tu,audioPrMergedSound:tu,audioPrCiFailedEnabled:!1,audioPrCiFailedVolume:1,audioPrCiRecoveredEnabled:!1,audioPrCiRecoveredVolume:1,audioPrChangesRequestedEnabled:!1,audioPrChangesRequestedVolume:1,audioPrApprovedEnabled:!1,audioPrApprovedVolume:1,audioPrMergeConflictEnabled:!1,audioPrMergeConflictVolume:1,audioPrReadyToMergeEnabled:!1,audioPrReadyToMergeVolume:1,audioPrMergedEnabled:!1,audioPrMergedVolume:1},au=new Map;function ou(e){let t=new Map;for(let n of e){let e=Yl(n)?n:Jl(n);Yl(e)&&t.set(e,au.get(e)??cu(e))}au.clear();for(let[e,n]of t)au.set(e,n)}function su(e,t){au.has(e)&&au.set(e,t)}function cu(e){return`/api/sounds/${Xl(e)}/file`}function lu(e){return Yl(e)?au.has(e):$l.some(t=>t.id===e)}function uu(e){return typeof e==`string`&&(Yl(e)||$l.some(t=>t.id===e))}function du(e){return uu(e)?e:eu}function fu(e){return e===`none`||e===`inherit`||uu(e)?e:tu}function pu(e){return e&&lu(e)?e:eu}function mu(e){if(e===`none`)return null;if(e!==`inherit`)return typeof e==`string`&&lu(e)?e:void 0}function hu(e){let t=pu(e);return Yl(t)?au.get(t)??cu(t):`${Ql}/${t}`}var gu=`mod+shift+x`,_u=[`mod`,`ctrl`,`meta`,`alt`,`shift`],vu=new Set([`mod+w`,`mod+shift+w`,`ctrl+w`,`ctrl+shift+w`,`meta+w`,`meta+shift+w`]),yu=new Set([`control`,..._u]);function bu(e){return vu.has(e)}function xu(e){if(typeof e!=`string`||e.length===0||e!==e.toLowerCase()||bu(e))return null;let t=e.split(`+`);if(t.some(e=>e.length===0))return null;let n=t.at(-1);if(!n||!/^[a-z0-9][a-z0-9_-]*$/.test(n)||yu.has(n))return null;let r=t.slice(0,-1),i=new Set,a=-1;for(let e of r){let t=_u.indexOf(e);if(t<=a)return null;a=t,i.add(e)}return{modifiers:i,key:n}}var Su=new Set([`control`,`meta`,`alt`,`shift`]),Cu={" ":`space`,"+":`plus`,"-":`minus`,"=":`equal`,",":`comma`,".":`period`,"/":`slash`,"\\":`backslash`,";":`semicolon`,"'":`quote`,"[":`bracketleft`,"]":`bracketright`,"`":`backquote`};function wu(e){let t=Cu[e]??e.toLowerCase();return/^[a-z0-9][a-z0-9_-]*$/.test(t)?t:null}function Tu(e=globalThis.navigator?.platform??``){return/mac|iphone|ipad|ipod/i.test(e)?`mac`:`other`}function Eu(e,t){if(e.key===`Escape`)return{status:`cancelled`};if(Su.has(e.key.toLowerCase()))return{status:`pending`};let n=wu(e.key);if(!n)return{status:`pending`};let r=new Set;(t===`mac`?e.metaKey:e.ctrlKey)&&r.add(`mod`),t===`mac`&&e.ctrlKey&&r.add(`ctrl`),t===`other`&&e.metaKey&&r.add(`meta`),e.altKey&&r.add(`alt`),e.shiftKey&&r.add(`shift`);let i=[..._u.filter(e=>r.has(e)),n].join(`+`);return bu(i)?{status:`reserved`}:{status:`accepted`,shortcut:i}}function Du(e,t,n){let r=xu(t),i=wu(e.key);if(!r||!i||i!==r.key)return!1;let a=r.modifiers.has(`ctrl`)||n===`other`&&r.modifiers.has(`mod`),o=r.modifiers.has(`meta`)||n===`mac`&&r.modifiers.has(`mod`);return e.ctrlKey===a&&e.metaKey===o&&e.altKey===r.modifiers.has(`alt`)&&e.shiftKey===r.modifiers.has(`shift`)}function Ou(e){return{space:`Space`,arrowup:`↑`,arrowdown:`↓`,arrowleft:`←`,arrowright:`→`}[e]??e.toUpperCase()}function ku(e,t){let n=xu(e);return n?t===`mac`?`${[n.modifiers.has(`mod`)||n.modifiers.has(`meta`)?`⌘`:``,n.modifiers.has(`ctrl`)?`⌃`:``,n.modifiers.has(`alt`)?`⌥`:``,n.modifiers.has(`shift`)?`⇧`:``].join(``)}${Ou(n.key)}`:[n.modifiers.has(`mod`)||n.modifiers.has(`ctrl`)?`Ctrl`:``,n.modifiers.has(`meta`)?`Meta`:``,n.modifiers.has(`alt`)?`Alt`:``,n.modifiers.has(`shift`)?`Shift`:``,Ou(n.key)].filter(Boolean).join(`+`):e}var Au=`.worktrees`,ju=[`commit`,`push`,`publish`],Mu={commit:`manual`,push:`manual`,publish:`manual`};function Nu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.entries(e).every(([e,t])=>ju.includes(e)&&(t===`manual`||t===`automatic`))}function Pu(...e){let t={...Mu};for(let n of e)Nu(n)&&Object.assign(t,n);return t}function Fu(e){return btoa(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var Iu=Be(`settings`,{state:()=>({global:{workflowPolicy:{...Mu},onboardingComplete:!1,defaultModelByEngine:{"claude-code":`auto`,codex:`auto`},dangerouslySkipPermissions:!0,prPromptTemplate:``,reviewPromptTemplate:``,ciFixPromptTemplate:``,finalizationPrompt:``,notionInitialPromptTemplate:``,sentryInitialPromptTemplate:``,gitConventions:``,editorCommand:``,fileManagerCommand:``,terminalCommand:``,autoPurgeOnPrMerged:!1,autoLoopMaxRetries:5,awaitingUserReminderMinutes:0,activityDigestEnabled:!0,wsEventsRetentionDays:0,wsEventsKeepPerWorkspace:0,browserNotifications:!0,audioNotifications:!1,audioQuestionNotifications:!1,audioWorkspaceCreatedNotifications:!1,audioAgentErrorNotifications:!1,audioNotificationSound:`neutral.wav`,audioQuestionSound:`inherit`,audioWorkspaceCreatedSound:`inherit`,audioAgentErrorSound:`inherit`,...iu,audioNotificationVolume:1,audioQuestionVolume:1,audioWorkspaceCreatedVolume:1,audioAgentErrorVolume:1,notionStatusProperty:``,notionInProgressStatus:``,notionAssigneeProperty:``,notionUserId:``,defaultPermissionModeByEngine:{"claude-code":`plan`,codex:`plan`},notionMcpKey:``,sentryMcpKey:``,bitbucketToken:``,bitbucketUsername:``,notionEnabled:!1,sentryEnabled:!1,showThinkingBlocks:!0,whipEnabled:!1,whipShortcut:gu,whipVolume:1,tags:[],branchPrefixes:[],setupScript:``,cleanupScript:``,cleanupScriptMode:`no-tasks`,cleanupScriptOnlyOnChanges:!1,archiveScript:``,changeSourceBranchScript:``,sessionEndedScript:``,prMergedScript:``,autoLoopDisabledScript:``,worktreesPath:Au,worktreesPrefixByProject:!1,voiceEnabled:!1,voicePttKey:`alt`,voiceLanguage:`auto`,voiceModel:null,voiceCommandPath:``,voiceFfmpegPath:``,voiceTemperature:0,voicePrompt:``,voiceTranslateToEnglish:!1,voiceSuppressNonSpeechTokens:!0,flattenWorkspaceList:!1,skillSuite:`standard`,customReviewTemplate:``,customAutoLoopReviewGate:``,customAutoLoopGroomingIntro:``,customQaPromptTemplate:``,customBrainstormingInstruction:``},voiceModels:[],voiceModelsLoading:!1,voiceModelsDir:``,voiceRuntime:null,activeMcpServers:[],projects:[],loading:!1,loaded:!1,loadError:null,showVerboseSystemMessages:localStorage.getItem(`kobo:showVerboseSystemMessages`)===`true`}),getters:{getProjectByPath:e=>t=>e.projects.find(e=>e.path===t)??null,projectPaths:e=>e.projects.map(e=>e.path)},actions:{_assertLoaded(){if(!this.loaded)throw Error(`Settings were never loaded successfully — refusing to overwrite the stored configuration`)},async fetchSettings(){this.loading=!0;try{let e=await X(`/api/settings`);this.global=e.global,this.projects=e.projects,this.loadError=null,this.loaded=!0}catch(e){this.loadError=e instanceof Error?e.message:String(e),this.loaded=!1,console.error(`[settings store] fetchSettings failed:`,e)}finally{this.loading=!1}},async fetchActiveMcpServers(){try{this.activeMcpServers=await X(`/api/settings/mcp-servers`)}catch(e){console.error(`[settings store] fetchActiveMcpServers failed:`,e),this.activeMcpServers=[]}},async fetchGlobalDefaults(){return X(`/api/settings/defaults`)},async previewRetention(e,t){return X(`/api/settings/ws-events-retention-preview?days=${e}&keep=${t}`)},async updateGlobal(e){this._assertLoaded(),this.global=await X(`/api/settings/global`,{method:`PUT`,body:e})},async upsertProject(e,t){this._assertLoaded();let n=await X(`/api/settings/projects/${Fu(e)}`,{method:`PUT`,body:t}),r=this.projects.findIndex(t=>t.path===e);r>=0?this.projects[r]=n:this.projects.push(n)},toggleVerboseSystemMessages(){this.setVerboseSystemMessages(!this.showVerboseSystemMessages)},setVerboseSystemMessages(e){this.showVerboseSystemMessages=e,localStorage.setItem(`kobo:showVerboseSystemMessages`,String(e))},async deleteProject(e){this._assertLoaded(),await X(`/api/settings/projects/${Fu(e)}`,{method:`DELETE`}),this.projects=this.projects.filter(t=>t.path!==e)},async fetchVoiceModels(){this.voiceModelsLoading=!0;try{let e=await X(`/api/voice/models`);this.voiceModels=e.available,this.voiceModelsDir=e.modelsDir,this.global.voiceModel=e.activeModel}catch(e){console.error(`[settings store] fetchVoiceModels failed:`,e)}finally{this.voiceModelsLoading=!1}},async cancelVoiceModelDownload(e){try{await X(`/api/voice/models/${encodeURIComponent(e)}/download`,{method:`DELETE`})}catch(e){if(!(e instanceof dl)||e.status!==404)throw e}await this.fetchVoiceModels()},async fetchVoiceRuntime(){try{this.voiceRuntime=await X(`/api/voice/runtime`)}catch(e){console.error(`[settings store] fetchVoiceRuntime failed:`,e)}},async downloadVoiceModel(e){await X(`/api/voice/models/${encodeURIComponent(e)}/download`,{method:`POST`}),await this.fetchVoiceModels()},async deleteVoiceModel(e){await X(`/api/voice/models/${encodeURIComponent(e)}`,{method:`DELETE`}),await this.fetchVoiceModels()}}});function Lu(e,t){let n=e=>e.split(`.`).map(e=>Number.parseInt(e,10)||0),r=n(e),i=n(t),a=Math.max(r.length,i.length);for(let e=0;e<a;e++){let t=(r[e]??0)-(i[e]??0);if(t!==0)return t}return 0}var Ru=`kobo:dismissed-update-version`,zu=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/,Bu=e=>typeof e==`string`&&zu.test(e),Vu=Be(`update`,()=>{let e=d(null),t=d(null),n=d(localStorage.getItem(Ru)),r=d(null),i=d(null),a=d(`unknown`),o=null,s=A(()=>t.value&&e.value&&Lu(t.value,e.value)>0&&t.value!==n.value?t.value:null);function c(n){if(!Bu(n.currentVersion))return;let o=typeof n.lastAttemptAt==`string`&&Number.isFinite(Date.parse(n.lastAttemptAt))?n.lastAttemptAt:null;r.value&&(!o||Date.parse(o)<Date.parse(r.value))||(e.value=n.currentVersion,Bu(n.latestVersion)&&(t.value=n.latestVersion),o&&(r.value=o),typeof n.lastSuccessAt==`string`&&(i.value=n.lastSuccessAt),(n.checkStatus===`success`||n.checkStatus===`failed`||n.checkStatus===`unknown`)&&(a.value=n.checkStatus))}function l(){return o||(o=(async()=>{try{let e=await fetch(`/api/changelog`);e.ok&&c(await e.json())}catch{}finally{o=null}})(),o)}function u(){let e=s.value;e&&(n.value=e,localStorage.setItem(Ru,e))}return{currentVersion:e,latestVersion:t,availableVersion:s,lastAttemptAt:r,lastSuccessAt:i,checkStatus:a,applySnapshot:c,refreshSnapshot:l,dismissUpdate:u}}),Hu=new Set([`output`,`complete`,`error`]);function Uu(e){if(!e.startsWith(`hook:`))return null;let t=e.slice(5),n=t.lastIndexOf(`:`);if(n<=0)return null;let r=t.slice(0,n),i=t.slice(n+1);return Hu.has(i)?{event:r,kind:i}:null}function Wu(e){return`hook:${e}`}function Gu(e){return e.startsWith(`hook:`)}var Ku=6e3,qu=typeof window<`u`&&window.parent!==window&&new URLSearchParams(window.location.search).get(`pane`)===`1`;function Ju(e,t=window.location.pathname){return`${t}?pane=1#/workspace/${encodeURIComponent(e)}`}function Yu(e){let t=Number(e??50);return Number.isFinite(t)?Math.max(25,Math.min(75,t)):50}function Xu(e,t){return e&&e!==t?{left:e,right:t}:{left:t}}var Zu=null;function Qu(e,t){return t.name===`split`&&e.name===`split`&&e.fullPath===Zu}async function $u(e,t){let n={name:`split`,query:t},r=e.resolve(n).fullPath;if(!(e.currentRoute.value.fullPath===r||Zu)){Zu=r;try{await e.replace(n)}finally{Zu=null}}}function ed(e,t){return e||Object.keys(t).length>0}var td=new Map,nd=[],rd=!1;function id(e){let t=hu(e),n=td.get(t);return n||(n=new Audio(t),td.set(t,n)),n}function ad(e,t){let n=new Audio(hu(pu(e)));n.preload=`auto`,n.volume=t,n.play().catch(()=>{})}function od(){qu||`Notification`in window&&Notification.permission==="default"&&Notification.requestPermission()}function sd(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.max(0,Math.min(1,e))}function cd(){let e=nd.shift();if(!e){rd=!1;return}rd=!0;let t=id(pu(e.soundId));t.volume=e.volume,t.currentTime=0;let n=!1,r=()=>{n||(n=!0,t.removeEventListener(`ended`,r),t.removeEventListener(`error`,r),cd())};t.addEventListener(`ended`,r,{once:!0}),t.addEventListener(`error`,r,{once:!0}),t.play().catch(r)}function ld(e,t){let n={soundId:pu(e),volume:sd(t)};if(document.visibilityState===`hidden`){ad(n.soundId,n.volume);return}nd.push(n),rd||cd()}function ud(e,t){let n=id(pu(e));n.volume=sd(t),n.currentTime=0,n.play().catch(()=>{})}function dd(e,t,n,r,i,a){if(qu)return;let o=Iu();if(!document.hasFocus()&&o.global.browserNotifications&&`Notification`in window&&Notification.permission===`granted`){let r=new Notification(e,{body:t,icon:`/favicon.ico`});n&&(r.onclick=()=>{window.focus(),window.location.hash=`#/workspace/${n}`,r.close()})}(a??o.global.audioNotifications)&&r!==null&&ld(r&&r.length>0?r:o.global.audioNotificationSound??`neutral.wav`,i??o.global.audioNotificationVolume)}function fd(e,t){let n=[{label:t.retryLabel,color:`white`,handler:t.onRetry}];t.detailsLabel&&t.onDetails&&n.push({label:t.detailsLabel,color:`white`,handler:t.onDetails}),n.push({label:t.dismissLabel,color:`grey-5`}),Bc.create({type:`negative`,position:`top`,multiLine:!0,message:e,timeout:t.timeout??0,actions:n})}function pd(e){return(typeof e==`string`?Array.from(e.replace(/[\p{Cc}\s]+/gu,` `).replace(/\p{Cs}/gu,`�`).trim()).slice(0,100).join(``):``)||`External MCP client`}function md(e){if(!e||typeof e!=`object`)return;let t=e;if(!(t.kind!==`mcp`||t.transport!==`http`&&t.transport!==`stdio`))return{kind:`mcp`,clientName:pd(t.clientName),transport:t.transport}}var hd=new Map,gd=Be(`devServer`,{state:()=>({statuses:{},logs:{}}),getters:{getStatus:e=>t=>e.statuses[t]??null},actions:{async fetchStatus(e){let t=(hd.get(e)??0)+1;hd.set(e,t);let n=this.statuses[e];try{let r=await X(`/api/dev-server/${e}/status`);hd.get(e)===t&&this.statuses[e]===n&&(this.statuses[e]=r)}catch(e){console.error(`[dev-server store] fetchStatus failed:`,e)}},async startDevServer(e){try{let t=await fetch(`/api/dev-server/${e}/start`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.statuses[e]=n}catch(e){throw console.error(`[dev-server store] startDevServer failed:`,e),e}},async stopDevServer(e){try{let t=await fetch(`/api/dev-server/${e}/stop`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.statuses[e]=n}catch(e){throw console.error(`[dev-server store] stopDevServer failed:`,e),e}},async fetchLogs(e,t=200){try{let n=await fetch(`/api/dev-server/${e}/logs?tail=${t}`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();return this.logs[e]=r.logs,r.logs}catch(e){return console.error(`[dev-server store] fetchLogs failed:`,e),``}},updateFromWsEvent(e,t){this.statuses[e]=t}}}),Q=Zc.global.t,_d=new rl,vd=0,yd={"pr:ci-failed":{soundKey:`audioPrCiFailedSound`,enabledKey:`audioPrCiFailedEnabled`,volumeKey:`audioPrCiFailedVolume`},"pr:ci-recovered":{soundKey:`audioPrCiRecoveredSound`,enabledKey:`audioPrCiRecoveredEnabled`,volumeKey:`audioPrCiRecoveredVolume`},"pr:changes-requested":{soundKey:`audioPrChangesRequestedSound`,enabledKey:`audioPrChangesRequestedEnabled`,volumeKey:`audioPrChangesRequestedVolume`},"pr:approved":{soundKey:`audioPrApprovedSound`,enabledKey:`audioPrApprovedEnabled`,volumeKey:`audioPrApprovedVolume`},"pr:merge-conflict":{soundKey:`audioPrMergeConflictSound`,enabledKey:`audioPrMergeConflictEnabled`,volumeKey:`audioPrMergeConflictVolume`},"pr:ready-to-merge":{soundKey:`audioPrReadyToMergeSound`,enabledKey:`audioPrReadyToMergeEnabled`,volumeKey:`audioPrReadyToMergeVolume`},"pr:merged":{soundKey:`audioPrMergedSound`,enabledKey:`audioPrMergedEnabled`,volumeKey:`audioPrMergedVolume`}};function bd(e,t,n){let r=Iu().global,i=yd[n];dd(e,void 0,t,mu(r[i.soundKey]),Number(r[i.volumeKey]),!!r[i.enabledKey])}function xd(e,t){let n=[];return t&&n.push({label:Q(`pr.openPr`),color:`white`,noDismiss:!0,handler:()=>window.open(t,`_blank`)}),n.push({label:Q(`pr.openWorkspace`),color:`white`,noDismiss:!0,handler:()=>{window.location.hash=`#/workspace/${e}`}}),n.push({label:Q(`pr.dismiss`),color:`white`}),n}var Sd=null,Cd=null,wd=0,Td=!1,Ed=!1,Dd=!1;function Od(e){Dd=e}function kd(e,t,n){if(t.kind!==`session:started`)return;let r=Z();if(n){r.setActiveAgentSession(e,n);let t=r.peekPending(e);t&&t.agentSessionId===n&&r.dequeuePending(e)}let i=r.workspaces.find(t=>t.id===e);i&&(i.status===`completed`||i.status===`idle`||i.status===`error`||i.status===`quota`)&&r.updateWorkspaceFromEvent(e,{status:`executing`}),!Dd&&n&&r.selectedWorkspaceId===e&&r.selectedSessionId!==n&&r.fetchSessions(e,n).catch(e=>{console.error(`[websocket] fetchSessions on session:started failed:`,e)})}function Ad(e,t){let n=Z();if(t.kind===`tool:call`&&t.name===`TodoWrite`){let r=t.input?.todos;return Array.isArray(r)&&n.updateAgentTodos(e,r.map(e=>({content:typeof e.content==`string`?e.content:``,status:typeof e.status==`string`?e.status:`pending`,activeForm:typeof e.activeForm==`string`?e.activeForm:void 0}))),!0}if(t.kind===`tool:call`&&t.name===`TaskCreate`){let r=t.input??{};return n.agentTaskCreate(e,t.toolCallId,{subject:typeof r.subject==`string`?r.subject:void 0,description:typeof r.description==`string`?r.description:void 0,activeForm:typeof r.activeForm==`string`?r.activeForm:void 0}),!0}if(t.kind===`tool:result`&&typeof t.output==`string`){let r=t.output.match(/^Task #(\d+) created successfully/);if(r)return n.agentTaskSetNumber(e,t.toolCallId,Number(r[1])),!0}if(t.kind===`tool:call`&&t.name===`TaskUpdate`){let r=t.input??{},i=r.task_id??r.taskId??r.id,a=typeof i==`number`?i:typeof i==`string`?Number(i):NaN;return Number.isFinite(a)&&n.agentTaskUpdate(e,a,{status:typeof r.status==`string`?r.status:void 0,content:typeof r.subject==`string`?r.subject:void 0,activeForm:typeof r.activeForm==`string`?r.activeForm:void 0}),!0}return!1}function jd(e,t,n,r,i){let a=ul(),o=Z().activeAgentSessionIds[e],s=!i||!o||i===o;if(t.kind===`session:compacting`){!Dd&&s&&a.setCompacting(e,t.active);return}a.append(e,t,n,r,i,!Dd),!Dd&&s&&(t.kind===`session:compacted`||t.kind===`message:text`||t.kind===`tool:call`)&&a.setCompacting(e,!1),kd(e,t,i??void 0);let c=Z();if(t.kind===`session:user-input-requested`){if(t.requestKind===`question`?c.enqueuePending(e,{kind:`question`,agentSessionId:i??null,toolCallId:t.toolCallId,toolName:t.toolName,input:t.payload}):c.enqueuePending(e,{kind:`permission`,agentSessionId:i??null,toolCallId:t.toolCallId,toolName:t.toolName,toolInput:t.payload}),Md().isCompacting(e)||c.updateWorkspaceFromEvent(e,{status:`awaiting-user`}),!Dd){let n=c.workspaces.find(t=>t.id===e)?.name??``,r=t.requestKind===`question`?Q(`notification.agentQuestion`,{name:n}):Q(`notification.agentPermissionRequest`,{name:n}),i=Iu().global;dd(r,void 0,e,t.requestKind===`question`?i.audioQuestionSound:void 0,t.requestKind===`question`?i.audioQuestionVolume:void 0,i.audioQuestionNotifications)}return}if(t.kind===`subagent:progress`){c.upsertSubagent(e,{toolUseId:t.toolCallId,status:t.status,description:t.description,taskType:t.taskType,lastToolName:t.lastToolName,totalTokens:t.totalTokens,toolUses:t.toolUses,durationMs:t.durationMs});return}if(!Ad(e,t)){if(t.kind===`tool:call`&&t.name===`Bash`){let n=t.input,r=`${n?.command??``} ${n?.description??``}`;/\bgit\b|commit|push|pull|merge|rebase|checkout|branch/i.test(r)&&c.triggerGitRefresh(),/\bgit\s+branch\s+-m\b/i.test(r)&&setTimeout(()=>{c.resyncWorkspaceBranch(e).catch(e=>{console.error(`[websocket] Branch resync failed:`,e)})},2500),/\bgh\s+pr\s+create\b/i.test(r)&&setTimeout(()=>c.triggerGitRefresh(),3e3)}if(t.kind!==`session:started`){if(t.kind===`turn:completed`){i&&c.markAgentTurnSettled(e,i);return}if(t.kind===`session:ended`){i&&c.clearPendingForSession(e,i);let n=c.activeAgentSessionIds[e];if(t.superseded===!0||typeof i==`string`&&i.length>0&&n!==void 0&&i!==n){vc(c)||c.cancelQueuedMessage(e,i),i&&c.clearActiveAgentSession(e,i);return}Dd||a.setCompacting(e,!1),i?c.clearActiveAgentSession(e,i):c.clearActiveAgentSessionOwner(e);let r=c.workspaces.find(t=>t.id===e)?.status===`quota`?`quota`:t.reason===`completed`?`completed`:t.reason===`error`?`error`:`idle`;c.updateWorkspaceFromEvent(e,{status:r}),i&&t.reason===`completed`&&!vc(c)&&c.flushQueuedMessage(e,i),c.finalizeRunningSubagents(e),c.fetchWorkspaces(),!Dd&&t.reason!==`killed`&&t.reason!==`error`&&c.autoLoopStates[e]?.auto_loop!==!0&&dd(Q(`notification.agentFinished`,{name:c.workspaces.find(t=>t.id===e)?.name??``}),void 0,e);return}if(t.kind===`error`&&(t.category===`quota`&&(c.updateWorkspaceFromEvent(e,{status:`quota`}),c.fetchWorkspaces()),!Dd)){let t=Iu().global;dd(Q(`notification.agentError`,{name:c.workspaces.find(t=>t.id===e)?.name??``}),void 0,e,t.audioAgentErrorSound,t.audioAgentErrorVolume,t.audioAgentErrorNotifications)}}}}var Md=Be(`websocket`,{state:()=>({connected:!1,reconnecting:!1,reconnectAttempt:0,lastEventId:null,pendingSyncRequests:[],_replaying:!1,_drainInProgress:!1,_refreshAfterSync:!1,_workspacesToRefreshAfterDrain:new Set}),actions:{connect(){if(Sd)return;if(Td=!0,Ed||(Ed=!0,window.addEventListener(`online`,()=>{Td&&this.connect()}),window.addEventListener(`offline`,()=>{this.connected=!1,this.reconnecting=Td,this.pendingSyncRequests=[],_d.disconnect(Q(`network.login.unreachable`));let e=Sd;Sd=null,e?.close(),Cd&&=(clearTimeout(Cd),null)})),!navigator.onLine){this.connected=!1,this.reconnecting=!0,this.pendingSyncRequests=[];return}let e=uc(`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/ws`,sc()),t=new WebSocket(e);Sd=t,t.addEventListener(`open`,()=>{if(Sd!==t)return;this.connected=!0,Vu().refreshSnapshot(),this.reconnecting=!1,wd=0,this.reconnectAttempt=0;let e=Z().workspaces.map(e=>e.id);for(let t of e)this._send({type:`subscribe`,payload:{workspaceId:t}});this._refreshAfterSync=!0,this.lastEventId?this._send({type:`sync:request`,payload:{lastEventId:this.lastEventId,workspaceIds:e}}):(this._refreshAfterSync=!1,this.refreshLiveState())}),t.addEventListener(`message`,e=>{if(Sd===t)try{let t=JSON.parse(e.data);this._routeMessage(t)}catch{}}),t.addEventListener(`close`,()=>{Sd===t&&(_d.disconnect(Q(`network.login.unreachable`)),this.connected=!1,this.pendingSyncRequests=[],Sd=null,Td&&this._scheduleReconnect())}),t.addEventListener(`error`,()=>{})},async refreshLiveState(){let e=Z(),t=new Set(e.workspaces.map(e=>e.id));if(await e.fetchWorkspacesInfo(),!this.connected)return;for(let n of e.workspaces)t.has(n.id)||(this._refreshAfterSync=!0,this.subscribe(n.id));let n=gd(),r=new Set(Object.keys(n.statuses));e.selectedWorkspaceId&&r.add(e.selectedWorkspaceId);let i=new Set(Object.keys(e.autoLoopMessages));e.selectedWorkspaceId&&i.add(e.selectedWorkspaceId);let a=Hl(),o=new Set(Object.keys(a.current));e.selectedWorkspaceId&&o.add(e.selectedWorkspaceId),await Promise.allSettled([e.fetchAutoLoopStates(),...[...o].map(e=>a.refresh(e)),...[...i].map(t=>e.fetchAutoLoopMessages(t)),...[...r].map(e=>n.fetchStatus(e))])},disconnect(){_d.disconnect(Q(`network.login.unreachable`)),Td=!1,this.pendingSyncRequests=[],Cd&&=(clearTimeout(Cd),null),Sd&&=(Sd.close(),null),this.connected=!1,this.reconnecting=!1,this.reconnectAttempt=0},subscribe(e){this._drainInProgress&&this._workspacesToRefreshAfterDrain.add(e),this._send({type:`subscribe`,payload:{workspaceId:e}}),this._send({type:`sync:request`,payload:{workspaceIds:[e]}})},unsubscribe(e){this._send({type:`unsubscribe`,payload:{workspaceId:e}})},subscribeChannel(e){this._send({type:`subscribe`,payload:{workspaceId:e}})},isCompacting(e){let t=Z();return(t.workspaces.find(t=>t.id===e)??t.archivedWorkspaces.find(t=>t.id===e))?.status===`compacting`||ul().isCompacting(e)},sendChatMessage(e,t,n,r,i=!1,a){if(this.isCompacting(e)||!this._send({type:`chat:message`,payload:{workspaceId:e,content:t,sessionId:n,agentPermissionModeOverride:r,force:i,clientMessageId:a}}))return!1;let o=Z(),s=o.workspaces.find(t=>t.id===e);return s&&(s.status===`completed`||s.status===`idle`||s.status===`error`||s.status===`quota`)&&o.updateWorkspaceFromEvent(e,{status:`executing`}),!0},sendChatMessageConfirmed(e,t,n){let r=`${Array.from(crypto.getRandomValues(new Uint32Array(4)),e=>e.toString(16)).join(`-`)}-${++vd}`,i=_d.wait(e,r,Q(`network.login.unreachable`));return this.sendChatMessage(e,t,n,void 0,!1,r)||_d.settle(e,r,Error(Q(`network.login.unreachable`))),i},_send(e){if(Sd&&Sd.readyState===WebSocket.OPEN&&navigator.onLine){try{Sd.send(JSON.stringify(e))}catch{return!1}if(e.type===`sync:request`){let t=e.payload;this.pendingSyncRequests.push([...t?.workspaceIds??Z().workspaces.map(e=>e.id)])}return!0}return!1},isSyncPending(e){return this.pendingSyncRequests.some(t=>t.includes(e))},isConnected(){return Sd!==null&&Sd.readyState===WebSocket.OPEN},_scheduleReconnect(){if(Cd)return;if(!Td||!navigator.onLine){this.reconnecting=Td;return}let e=Math.min(1e3*2**wd,3e4),t=Math.round(e*(.8+Math.random()*.4));wd++,this.reconnecting=!0,this.reconnectAttempt=wd,wd===4&&sc()&&fc(),Cd=setTimeout(()=>{Cd=null,this.connect()},t)},_routeMessage(e){let t=Z();e.replayable!==!1&&e.id?this.lastEventId=e.id:e.replayable!==!1&&e.eventId&&(this.lastEventId=e.eventId);let n=e.payload??{},r=e.workspaceId??n.workspaceId??``,i=Uu(e.type);if(i){let n=Wu(i.event),a=e.createdAt??new Date().toISOString(),o=Q(`chat.hookScript`,{event:i.event}),s=i.kind===`output`?e.payload?.text??``:i.kind===`complete`?e.payload?.hadOutput===!1?Q(`chat.scriptDone`):Q(`chat.scriptComplete`,{phase:o}):Q(`chat.scriptError`,{phase:o,message:e.payload?.message??Q(`chat.unknownError`)});t.addActivityItem(r,{id:e.id??`${n}-${i.kind}-${Date.now()}`,type:`text`,content:s,timestamp:a,meta:{sender:n}});return}switch(e.type){case`workspace:handoff`:{if(!r||this._replaying)break;let e=n.handoff;e?.workspaceId===r&&typeof e.id==`string`&&typeof e.state==`string`&&Hl().apply(e);break}case`kobo:update-checked`:Vu().applySnapshot(n);break;case`workspace:configuration`:if(!r||this._replaying||typeof n.engine!=`string`||typeof n.model!=`string`||typeof n.reasoningEffort!=`string`||![`plan`,`bypass`,`strict`,`interactive`].includes(n.agentPermissionMode))break;t.updateWorkspaceFromEvent(r,{engine:n.engine,model:n.model,reasoningEffort:n.reasoningEffort,agentPermissionMode:n.agentPermissionMode});break;case`workspace:status`:{if(!r||this._replaying||typeof n.status!=`string`)break;let e=t.activeAgentSessionIds[r];if(e&&typeof n.sessionId==`string`&&e!==n.sessionId)break;t.updateWorkspaceFromEvent(r,{status:n.status});break}case`chat:accepted`:{if(typeof n.clientMessageId==`string`){r&&_d.settle(r,n.clientMessageId);break}let e=typeof n.sessionId==`string`?n.sessionId:void 0;r&&e&&t.cancelQueuedMessage(r,e);break}case`chat:rejected`:{if(typeof n.clientMessageId==`string`){r&&_d.settle(r,n.clientMessageId,Error(typeof n.message==`string`?n.message:Q(`network.login.unreachable`)));break}let e=typeof n.sessionId==`string`?n.sessionId:void 0,i=typeof n.content==`string`?n.content:void 0,a=typeof n.message==`string`?n.message:Q(`network.login.unreachable`);if(r&&i){let n=(t.activityFeeds[r]??[]).find(e=>e.meta?.sender===`user`&&e.meta?.pending&&e.content===i);n&&t.removeActivityItem(r,n.id),e&&t.queueMessage(r,i,e)}Bc.create({type:`negative`,message:a,position:`top`,timeout:6e3});break}case`agent:event`:{if(!r)break;let t=e.createdAt;jd(r,n,t,e.id??e.eventId,e.sessionId??null);break}case`agent:progress`:n.tasks&&Array.isArray(n.tasks)&&(t.tasks=n.tasks);break;case`user:message`:if(r&&typeof n.clientMessageId==`string`&&_d.settle(r,n.clientMessageId),r&&n.content){let i=n.content,a=n.sender??`user`,o=md(n.source),s=e.sessionId,c=e.id??e.eventId??`user-${Date.now()}`,l=typeof e.createdAt==`string`?e.createdAt:void 0,u=l??new Date().toISOString(),d=t.activityFeeds[r]??[];if(!o&&a===`user`&&d.some(e=>e.meta?.sender===`user`&&e.content===i&&e.meta?.pending)){let e=d.findIndex(e=>e.meta?.sender===`user`&&e.content===i&&e.meta?.pending);e>=0&&(d[e]={...d[e],id:c,sessionId:s,...l?{timestamp:l}:{}})}else t.addActivityItem(r,{id:c,type:`text`,content:i,timestamp:u,sessionId:s,meta:{sender:a,...o?{source:o}:{}}})}break;case`sync:empty`:case`sync:error`:this.pendingSyncRequests.shift();break;case`sync:response`:{let e=this.pendingSyncRequests[0];this._replaying=!0,Od(!0);try{let e=n.events??[],r=n.mode===`delta`?`delta`:`snapshot`,i=new Map;for(let t of e)if(t.type!==`sync:response`){if(t.type===`agent:event`&&t.workspaceId){let e=i.get(t.workspaceId)??{events:[],timestamps:[],sessionIds:[],eventIds:[],oldestId:void 0};e.events.push(t.payload),e.timestamps.push(t.createdAt),e.sessionIds.push(t.sessionId??null),e.eventIds.push(t.id??null),e.oldestId||=t.id,i.set(t.workspaceId,e);continue}this._routeMessage(t)}if(i.size>0){let e=ul();for(let[t,{events:n,timestamps:a,sessionIds:o,eventIds:s,oldestId:c}]of i){let i=r===`delta`?e.merge(t,n,a,{sessionIds:o,eventIds:s}):n.map((e,t)=>t);r===`snapshot`&&e.reset(t,n,a,{oldestId:c,hasMoreOlder:!0,sessionIds:o,eventIds:s}),r===`snapshot`&&Z().updateAgentTodos(t,[]);for(let e of i){let r=n[e];if(!r)continue;let i=o[e]??null;if(r.kind===`session:user-input-requested`){r.requestKind===`question`?Z().enqueuePending(t,{kind:`question`,agentSessionId:i,toolCallId:r.toolCallId,toolName:r.toolName,input:r.payload}):Z().enqueuePending(t,{kind:`permission`,agentSessionId:i,toolCallId:r.toolCallId,toolName:r.toolName,toolInput:r.payload});continue}if(r.kind===`session:started`){if(i){let e=Z();e.setActiveAgentSession(t,i);let n=e.peekPending(t);n&&n.agentSessionId===i&&e.dequeuePending(t)}continue}if(r.kind===`session:ended`){let e=Z();i?(e.clearPendingForSession(t,i),vc(e)||e.cancelQueuedMessage(t,i),e.clearActiveAgentSession(t,i)):r.superseded!==!0&&e.clearActiveAgentSessionOwner(t);continue}if(r.kind===`subagent:progress`){Z().upsertSubagent(t,{toolUseId:r.toolCallId,status:r.status,description:r.description,taskType:r.taskType,lastToolName:r.lastToolName,totalTokens:r.totalTokens,toolUses:r.toolUses,durationMs:r.durationMs});continue}Ad(t,r)}}}let a=this.lastEventId,o=e.findLast(e=>e.replayable!==!1&&typeof e.id==`string`);if(o&&(this.lastEventId=o.id),n.truncated===!0&&o&&this.lastEventId!==a)this._drainInProgress=!0,this._send({type:`sync:request`,payload:{lastEventId:this.lastEventId,workspaceIds:t.workspaces.map(e=>e.id)}});else if(this._drainInProgress&&(this._drainInProgress=!1,this._workspacesToRefreshAfterDrain.size>0)){let e=[...this._workspacesToRefreshAfterDrain];this._workspacesToRefreshAfterDrain.clear(),this._send({type:`sync:request`,payload:{lastEventId:this.lastEventId,workspaceIds:e}})}}finally{if(this._replaying=!1,Od(!1),e){let t=this.pendingSyncRequests.indexOf(e);t!==-1&&this.pendingSyncRequests.splice(t,1)}this._refreshAfterSync&&this.pendingSyncRequests.length===0&&(this._refreshAfterSync=!1,this.refreshLiveState())}break}case`usage:snapshot`:{let e=n;e.providerId&&e.snapshot&&t.applyUsageSnapshot({providerId:e.providerId,snapshot:e.snapshot});break}case`devserver:status`:{let e=gd();r&&e.updateFromWsEvent(r,n);break}case`task:updated`:r&&t.fetchWorkspaceDetails(r);break;case`setup:output`:t.addActivityItem(r,{id:e.id??`setup-${Date.now()}`,type:`text`,content:e.payload?.text??``,timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`setup`}});break;case`setup:complete`:t.addActivityItem(r,{id:e.id??`setup-complete-${Date.now()}`,type:`text`,content:e.payload?.hadOutput===!1?Q(`chat.scriptDone`):Q(`chat.scriptComplete`,{phase:`setup`}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`setup`}});break;case`setup:error`:t.addActivityItem(r,{id:e.id??`setup-error-${Date.now()}`,type:`text`,content:Q(`chat.scriptError`,{phase:`setup`,message:e.payload?.message??Q(`chat.unknownError`)}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`setup`}});break;case`cleanup:output`:t.addActivityItem(r,{id:e.id??`cleanup-${Date.now()}`,type:`text`,content:e.payload?.text??``,timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`cleanup`}});break;case`cleanup:complete`:t.addActivityItem(r,{id:e.id??`cleanup-complete-${Date.now()}`,type:`text`,content:e.payload?.hadOutput===!1?Q(`chat.scriptDone`):Q(`chat.scriptComplete`,{phase:`cleanup`}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`cleanup`}});break;case`cleanup:error`:t.addActivityItem(r,{id:e.id??`cleanup-error-${Date.now()}`,type:`text`,content:Q(`chat.scriptError`,{phase:`cleanup`,message:e.payload?.message??Q(`chat.unknownError`)}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`cleanup`}});break;case`archive:output`:t.addActivityItem(r,{id:e.id??`archive-${Date.now()}`,type:`text`,content:e.payload?.text??``,timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`archive`}});break;case`archive:complete`:t.addActivityItem(r,{id:e.id??`archive-complete-${Date.now()}`,type:`text`,content:e.payload?.hadOutput===!1?Q(`chat.scriptDone`):Q(`chat.scriptComplete`,{phase:`archive`}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`archive`}});break;case`archive:error`:t.addActivityItem(r,{id:e.id??`archive-error-${Date.now()}`,type:`text`,content:Q(`chat.scriptError`,{phase:`archive`,message:e.payload?.message??Q(`chat.unknownError`)}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`archive`}});break;case`workspace:unread`:if(r){let e=n.hasUnread??!1;t.updateWorkspaceFromEvent(r,{hasUnread:e})}break;case`workspace:awaiting-reminder`:{let e=n;if(!e.workspaceId)break;let t=Iu().global,r=Q(`notification.awaitingReminder`,{name:e.workspaceName??``,minutes:e.waitingMinutes??0});if(dd(r,void 0,e.workspaceId,t.audioQuestionSound,t.audioQuestionVolume,t.audioQuestionNotifications),document.hasFocus()){let t=e.workspaceId;Bc.create({type:`info`,position:`top`,timeout:1e4,message:r,actions:[{label:Q(`common.open`),color:`white`,handler:()=>{window.location.hash=`#/workspace/${t}`}}]})}break}case`workspace:pr-attention-dismissed`:if(r){let e=n.kind,i=n.prUpdatedAt;e&&i&&t.updateWorkspaceFromEvent(r,e===`changes-requested`?{prChangesDismissedAt:i}:{prCiFailureDismissedAt:i})}break;case`workspace:description-updated`:{if(!r)break;let e=n.description??null;t.updateWorkspaceFromEvent(r,{description:e});break}case`workspace:agent-description-updated`:{if(!r)break;let e=n.agentDescription??null;t.updateWorkspaceFromEvent(r,{agentDescription:e});break}case`cron:created`:{if(!r)break;let e=n.cron;if(!e)break;let i=t.crons[r]??[];i.some(t=>t.id===e.id)||(t.crons[r]=[...i,e]);let a=t.autoLoopStates[r];a&&(a.crons_count=t.crons[r].length);break}case`cron:fired`:{if(!r)break;let e=n,i=t.crons[r]??[];t.crons[r]=i.map(t=>t.id===e.id?{...t,nextFireAt:e.nextFireAt??t.nextFireAt,lastFiredAt:e.lastFiredAt??new Date().toISOString()}:t);break}case`cron:cancelled`:{if(!r)break;let e=n.id;if(!e)break;t.crons[r]=(t.crons[r]??[]).filter(t=>t.id!==e);let i=t.autoLoopStates[r];i&&(i.crons_count=t.crons[r].length);break}case`cron:updated`:{if(!r)break;let e=n.crons;if(Array.isArray(e)){t.crons[r]=e;let n=t.autoLoopStates[r];n&&(n.crons_count=e.length)}break}case`workspace:archived`:case`workspace:unarchived`:case`workspace:worktree-restored`:case`workspace:worktree-purged`:{let i=n.workspace;e.type===`workspace:worktree-restored`&&i&&i.id===r?t.applyRestoredWorkspace(i):t.invalidateWorkspaceLifecycleReads(r),(e.type===`workspace:archived`||e.type===`workspace:worktree-purged`)&&r&&cl(r),e.type===`workspace:archived`&&r&&t.selectedWorkspaceId===r&&(t.selectedWorkspaceId=null),t.fetchWorkspaces(),t.archivedLoaded&&t.fetchArchivedWorkspaces();break}case`workspace:deleted`:t.invalidateWorkspaceLifecycleReads(r),r&&cl(r),r&&t.selectedWorkspaceId===r&&(t.selectedWorkspaceId=null),t.fetchWorkspaces(),t.archivedLoaded&&t.fetchArchivedWorkspaces();break;case`pr:base-changed`:{if(!r)break;let e=n,i=e.oldBase??``,a=e.newBase??``;t.updateWorkspaceFromEvent(r,{sourceBranch:a}),Bc.create({type:`info`,position:`top`,timeout:Ku,message:Q(`pr.baseChanged`,{oldBase:i,newBase:a}),actions:xd(r,e.prUrl)}),dd(Q(`pr.baseChanged`,{oldBase:i,newBase:a}),void 0,r);break}case`pr:ci-failed`:case`pr:ci-recovered`:case`pr:merge-conflict`:case`pr:merged`:{if(!r)break;let i=e.type,a=n,o=a.prNumber??0,s={"pr:ci-failed":{key:`toast.prCiFailed`,type:`negative`,timeout:4e3},"pr:ci-recovered":{key:`toast.prCiRecovered`,type:`positive`,timeout:5e3},"pr:merge-conflict":{key:`toast.prMergeConflict`,type:`warning`,timeout:Ku},"pr:merged":{key:`toast.prMerged`,type:`positive`,timeout:5e3}}[i],c=Q(s.key,{n:o});Bc.create({type:s.type,position:`top`,timeout:s.timeout,message:c,actions:xd(r,a.prUrl)}),bd(c,r,i),i!==`pr:merged`&&t.refreshPrSnapshot(r);break}case`pr:changes-requested`:{if(!r)break;let e=n,i=Q(`toast.prChangesRequested`,{n:e.prNumber??0});Bc.create({type:`warning`,position:`top`,timeout:Ku,message:i,actions:xd(r,e.prUrl)}),bd(i,r,`pr:changes-requested`),t.refreshPrSnapshot(r);break}case`pr:approved`:{if(!r)break;let e=n,i=Q(`toast.prApproved`,{n:e.prNumber??0});Bc.create({type:`positive`,position:`top`,timeout:5e3,message:i,actions:xd(r,e.prUrl)}),bd(i,r,`pr:approved`),t.refreshPrSnapshot(r);break}case`pr:ready-to-merge`:{if(!r)break;let e=n,i=Q(`toast.prReadyToMerge`,{n:e.prNumber??0});Bc.create({type:`positive`,position:`top`,timeout:5e3,message:i,actions:xd(r,e.prUrl)}),bd(i,r,`pr:ready-to-merge`),t.refreshPrSnapshot(r);break}case`wakeup:scheduled`:if(r){let e=n;typeof e.targetAt==`string`&&t.setPendingWakeup(r,{targetAt:e.targetAt,reason:e.reason})}break;case`wakeup:cancelled`:case`wakeup:fired`:case`wakeup:skipped`:r&&t.clearPendingWakeup(r);break;case`agent:quota-recovered`:r&&(t.clearPendingQuotaBackoff(r),t.updateWorkspaceFromEvent(r,{status:`executing`}));break;case`agent:quota-backoff`:{if(!r)break;let e=n;typeof e.targetAt==`string`&&typeof e.source==`string`&&t.setPendingQuotaBackoff(r,{targetAt:e.targetAt,resetsAt:e.resetsAt??null,source:e.source,reason:e.reason===`transient`?`transient`:`quota`});break}case`agent:quota-backoff-cancelled`:r&&(t.clearPendingQuotaBackoff(r),n.reason===`completed`&&t.fetchWorkspaces());break;case`autoloop:messages`:r&&t.fetchAutoLoopMessages(r).catch(()=>{});break;case`autoloop:state`:case`autoloop:enabled`:case`autoloop:iteration-started`:case`autoloop:ready-flipped`:t.fetchAutoLoopStates();break;case`autoloop:permission-overridden`:r&&dd(Q(`notification.autoLoopPermissionOverridden`,{name:t.workspaces.find(e=>e.id===r)?.name??``}),void 0,r);break;case`autoloop:waiting-for-slot`:{if(!r)break;let e=n,i=t.workspaces.find(e=>e.id===r)?.name??``;Bc.create({type:`info`,position:`top`,timeout:6e3,message:Q(`notification.autoLoopWaitingForSlot`,{name:i,running:e.running??0,limit:e.limit??0})});break}case`autoloop:disabled`:if(t.fetchAutoLoopStates(),r){let e=n?.reason,i=t.workspaces.find(e=>e.id===r)?.name??``,a=e===`error`?`notification.autoLoopError`:e===`stall`?`notification.autoLoopStalled`:e===`completed`?`notification.autoLoopCompleted`:e===`awaiting-clarification`?`notification.autoLoopAwaitingClarification`:null;a&&dd(Q(a,{name:i}),void 0,r)}break;case`workspace:create-progress`:{let e=typeof n.step==`string`?n.step:``,r=typeof n.creationId==`string`?n.creationId:``;r&&e&&t.setCreationProgress({creationId:r,step:e,index:typeof n.index==`number`?n.index:0,total:typeof n.total==`number`?n.total:0});break}case`workspace:create-failed`:{let e=typeof n.creationId==`string`?n.creationId:``,r=typeof n.step==`string`?n.step:``;e&&r&&t.setCreationProgress({creationId:e,step:r,index:-1,total:0});break}case`migration:progress`:case`migration:error`:Wn().update(n)}}}}),Nd=N({__name:`App`,setup(e){let t=Md(),n=Sc(),r=Z(),i=qu?window.parent.koboWorkspaceQueues:void 0,a;if(i)a=xc(r,i);else{let e=bc(r);window.koboWorkspaceQueues=e,a=()=>{e.dispose(),delete window.koboWorkspaceQueues}}return y(()=>{t.connect(),n.fetchTemplates(),od()}),p(()=>{a?.(),t.disconnect()}),(e,t)=>{let n=S(`router-view`);return h(),j(M,null,[w(n),w(is),w(gc)],64)}}}),Pd=e=>e,Fd=Pd,Id=Pd,Ld=Pd(()=>Ve()),Rd={true:`inset`,item:`item-inset`,"item-thumbnail":`item-thumbnail-inset`},zd={xs:2,sm:4,md:8,lg:16,xl:24},Bd=Me({name:`QSeparator`,props:{...Re,spaced:[Boolean,String],inset:[Boolean,String],vertical:Boolean,color:String,size:String},setup(e){let t=Le(),n=ze(e,t),r=A(()=>e.vertical?`vertical`:`horizontal`),i=A(()=>` q-separator--${r.value}`),a=A(()=>e.inset?`${i.value}-${Rd[e.inset]}`:``),o=A(()=>`q-separator${i.value}${a.value}`+(e.color===void 0?``:` bg-${e.color}`)+(n()?` q-separator--dark`:``)),s=A(()=>{let t={};if(e.size!==void 0&&(t[e.vertical?`width`:`height`]=e.size),e.spaced){let n=e.spaced===!0?`${zd.md}px`:e.spaced in zd?`${zd[e.spaced]}px`:e.spaced,r=e.vertical?[`Left`,`Right`]:[`Top`,`Bottom`];t[`margin${r[0]}`]=t[`margin${r[1]}`]=n}return t});return()=>f(`hr`,{class:o.value,style:s.value,"aria-orientation":r.value})}}),Vd=()=>f(`svg`,{key:`svg`,class:`q-radio__bg absolute non-selectable`,viewBox:`0 0 24 24`},[f(`path`,{d:`M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12`}),f(`path`,{class:`q-radio__check`,d:`M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6`})]);function Hd(e){(e.keyCode===13||e.keyCode===32)&&_e(e)}var Ud=Me({name:`QRadio`,props:{...Re,...re,...rt,modelValue:{required:!0},val:{required:!0},label:String,leftLabel:Boolean,checkedIcon:String,uncheckedIcon:String,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},emits:[`update:modelValue`],setup(n,{slots:r,emit:i}){let{proxy:a}=T(),o=Le(),s=ze(n,o),c=t(null),{refocusTargetEl:l,refocusTarget:u}=ot(n,c),d=A(()=>e(n.modelValue)===e(n.val)),p=A(()=>`q-radio cursor-pointer no-outline row inline no-wrap items-center`+(n.disable?` disabled`:``)+(s()?` q-radio--dark`:``)+(n.dense?` q-radio--dense`:``)+(n.leftLabel?` reverse`:``)),m=A(()=>{let e=n.color!==void 0&&(n.keepColor||d.value)?` text-${n.color}`:``;return`q-radio__inner relative-position q-radio__inner--${d.value?`truthy`:`falsy`}${e}`}),h=A(()=>(d.value?n.checkedIcon:n.uncheckedIcon)||null),g=A(()=>n.disable?-1:n.tabindex||0),_=it(()=>{let e={type:`radio`};return n.name!==void 0&&Object.assign(e,{".checked":d.value,"^checked":d.value?`checked`:void 0,name:n.name,value:n.val}),e});function v(e){e!==void 0&&(_e(e),u(e)),!n.disable&&!d.value&&i(`update:modelValue`,n.val,e)}function y(e){(e.keyCode===13||e.keyCode===32)&&v(e)}Object.assign(a,{set:v});let b=Vd();return()=>{let e=h.value===null?[b]:[f(`div`,{key:`icon`,class:`q-radio__icon-container absolute-full flex flex-center no-wrap`},[f(Ce,{class:`q-radio__icon`,name:h.value})])];n.disable||_(e,`unshift`,` q-radio__native q-ma-none q-pa-none`);let t=[f(`div`,{class:m.value,style:st(n.size),"aria-hidden":`true`},e)];l.value!==null&&t.push(l.value);let i=n.label===void 0?F(r.default):me(r.default,[n.label]);return i!==void 0&&t.push(f(`div`,{class:`q-radio__label q-anchor--skip`},i)),f(`div`,{ref:c,class:p.value,tabindex:g.value,role:`radio`,"aria-label":n.label,"aria-checked":d.value?`true`:`false`,"aria-disabled":n.disable?`true`:void 0,onClick:v,onKeydown:Hd,onKeyup:y},t)}}}),Wd=()=>f(`div`,{key:`svg`,class:`q-checkbox__bg absolute`},[f(`svg`,{class:`q-checkbox__svg fit absolute-full`,viewBox:`0 0 24 24`},[f(`path`,{class:`q-checkbox__truthy`,fill:`none`,d:`M1.73,12.91 8.1,19.28 22.79,4.59`}),f(`path`,{class:`q-checkbox__indet`,d:`M4,14H20V10H4`})])]),Gd=Me({name:`QCheckbox`,props:lt,emits:ct,setup(e){let t=Wd();function n(n,r){let i=A(()=>(n.value?e.checkedIcon:r.value?e.indeterminateIcon:e.uncheckedIcon)||null);return()=>i.value===null?[t]:[f(`div`,{key:`icon`,class:`q-checkbox__icon-container absolute-full flex flex-center no-wrap`},[f(Ce,{class:`q-checkbox__icon`,name:i.value})])]}return ut(`checkbox`,n)}}),Kd=Me({name:`QToggle`,props:{...lt,icon:String,iconColor:String},emits:ct,setup(e){function t(t,n){let r=A(()=>(t.value?e.checkedIcon:n.value?e.indeterminateIcon:e.uncheckedIcon)||e.icon),i=A(()=>t.value?e.iconColor:null);return()=>[f(`div`,{class:`q-toggle__track`}),f(`div`,{class:`q-toggle__thumb absolute flex flex-center no-wrap`},r.value===void 0?void 0:[f(Ce,{name:r.value,color:i.value})])]}return ut(`toggle`,t)}}),qd={radio:Ud,checkbox:Gd,toggle:Kd},Jd=Object.keys(qd);function Yd(e,t){if(typeof e==`function`)return e;let n=e===void 0?t:e;return e=>e[n]}var Xd=Me({name:`QOptionGroup`,props:{...Re,modelValue:{required:!0},options:{type:Array,validator:e=>e.every(Rt),default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],name:String,type:{type:String,default:`radio`,validator:e=>Jd.includes(e)},color:String,keepColor:Boolean,dense:Boolean,size:String,leftLabel:Boolean,inline:Boolean,disable:Boolean},emits:[`update:modelValue`],setup(n,{emit:r,slots:i}){let a=Le(),o=Array.isArray(n.modelValue);n.type===`radio`?o&&console.error(`q-option-group: model should not be array`):o||console.error(`q-option-group: model should be array in your case`);let s=ze(n,a),c=A(()=>qd[n.type]),l=t(null),u=A(()=>Yd(n.optionValue,`value`)),d=A(()=>Yd(n.optionLabel,`label`)),p=A(()=>Yd(n.optionDisable,`disable`)),m=A(()=>n.options.map(e=>({val:u.value(e),name:e.name===void 0?n.name:e.name,disable:n.disable||p.value(e),leftLabel:e.leftLabel===void 0?n.leftLabel:e.leftLabel,color:e.color===void 0?n.color:e.color,checkedIcon:e.checkedIcon,uncheckedIcon:e.uncheckedIcon,dark:e.dark===void 0?s():e.dark,size:e.size===void 0?n.size:e.size,dense:n.dense,keepColor:e.keepColor===void 0?n.keepColor:e.keepColor}))),h=A(()=>{let t=e(n.modelValue),r=m.value,i=r.findIndex(n=>!n.disable&&e(n.val)===t);return i===-1?r.findIndex(e=>!e.disable):i}),g=A(()=>`q-option-group q-gutter-x-sm`+(n.inline?` q-option-group--inline`:``)),_=A(()=>{let e={role:n.type===`radio`?`radiogroup`:`group`};return n.disable&&(e[`aria-disabled`]=`true`),e});function v(e){r(`update:modelValue`,e)}function y(t){let i=t.keyCode===37||t.keyCode===38?-1:+(t.keyCode===39||t.keyCode===40);if(i===0)return;let o=l.value.getElementsByClassName(`q-radio`),s=Array.prototype.indexOf.call(o,t.target);if(s===-1)return;_e(t);let c=(t.keyCode===37||t.keyCode===39)&&a.lang.rtl===!0?-i:i,u=m.value,d=u.length,f=s;do f=(f+c+d)%d;while(f!==s&&u[f].disable);f!==s&&(o[f].focus(),e(u[f].val)!==e(n.modelValue)&&r(`update:modelValue`,u[f].val))}return()=>f(`div`,{ref:l,class:g.value,..._.value,onKeydown:n.type===`radio`?y:void 0},n.options.map((e,t)=>{let r=i[`label-`+t]===void 0?i.label===void 0?void 0:()=>i.label(e):()=>i[`label-`+t](e);return f(`div`,[f(c.value,{label:r===void 0?d.value(e):null,modelValue:n.modelValue,"onUpdate:modelValue":v,...m.value[t],tabindex:n.type===`radio`?t===h.value?0:-1:void 0},r)])}))}}),Zd=()=>!0;function Qd(e){let t={};return e.forEach(e=>{t[e]=Zd}),t}function $d(e){return e===void 0?`programmatic`:e.type.indexOf(`key`)===0?`escape`:`backdrop`}function ef(){let{emit:e,proxy:n}=T(),r=t(null),i=null;function a(){i=null,r.value.show()}function o(){r.value.hide()}function s(t){e(`ok`,t),o()}function c(){i=`cancel`,o()}function l(t){e(`hide`,i===null?$d(t):i)}return Object.assign(n,{show:a,hide:o}),{dialogRef:r,onDialogHide:l,onDialogOK:s,onDialogCancel:c}}var tf=[`ok`,`hide`];ef.emits=tf,ef.emitsObject=Qd(tf);var nf=Me({name:`DialogPluginComponent`,props:{...Re,title:String,message:String,prompt:Object,options:Object,progress:[Boolean,Object],html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:`ok`,validator:e=>[`ok`,`cancel`,`none`].includes(e)},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]},emits:[`ok`,`hide`],setup(t){let n=Le(),r=ze(t,n),{dialogRef:i,onDialogHide:a,onDialogOK:o,onDialogCancel:s}=ef(),c=d(t.prompt===void 0?t.options===void 0?void 0:t.options.model:t.prompt.model),l=A(()=>`q-dialog-plugin`+(r()?` q-dialog-plugin--dark q-dark`:``)+(t.progress===!1?``:` q-dialog-plugin--progress`)),u=A(()=>t.color||(r()?`amber`:`primary`)),p=A(()=>t.progress===!1?null:Rt(t.progress)?{component:t.progress.spinner||Fe,props:{color:t.progress.color||u.value}}:{component:Fe,props:{color:u.value}}),h=A(()=>t.prompt!==void 0||t.options!==void 0),g=A(()=>{if(!h.value)return{};let{model:e,isValid:n,items:r,...i}=t.prompt===void 0?t.options:t.prompt;return i}),_=A(()=>Rt(t.ok)||t.ok===!0?n.lang.label.ok:t.ok),v=A(()=>Rt(t.cancel)||t.cancel===!0?n.lang.label.cancel:t.cancel),y=A(()=>t.prompt===void 0?t.options!==void 0&&t.options.isValid!==void 0&&!t.options.isValid(c.value):t.prompt.isValid!==void 0&&!t.prompt.isValid(c.value)),b=A(()=>({color:u.value,label:_.value,ripple:!1,disable:y.value,...Rt(t.ok)?t.ok:{flat:!0},"data-autofocus":t.focus===`ok`&&!h.value||void 0,onClick:S})),x=A(()=>({color:u.value,label:v.value,ripple:!1,...Rt(t.cancel)?t.cancel:{flat:!0},"data-autofocus":t.focus===`cancel`&&!h.value||void 0,onClick:s}));m(()=>t.prompt&&t.prompt.model,C),m(()=>t.options&&t.options.model,C);function S(){o(e(c.value))}function C(e){c.value=e}function w(e){!y.value&&t.prompt.type!==`textarea`&&ue(e,13)&&S()}function T(e,n){return t.html?f(Jt,{class:e,innerHTML:n}):f(Jt,{class:e},()=>n)}function E(){return[f(ic,{color:u.value,dense:!0,autofocus:!0,dark:r(),...g.value,modelValue:c.value,"onUpdate:modelValue":C,onKeyup:w})]}function D(){return[f(Xd,{color:u.value,options:t.options.items,dark:r(),...g.value,modelValue:c.value,"onUpdate:modelValue":C})]}function O(){let e=[];return t.cancel&&e.push(f(je,x.value)),t.ok&&e.push(f(je,b.value)),f(ac,{class:t.stackButtons?`items-end`:``,vertical:t.stackButtons,align:`right`},()=>e)}function k(){let e=[];return t.title&&e.push(T(`q-dialog__title`,t.title)),t.progress!==!1&&e.push(f(Jt,{class:`q-dialog__progress`},()=>f(p.value.component,p.value.props))),t.message&&e.push(T(`q-dialog__message`,t.message)),t.prompt===void 0?t.options!==void 0&&e.push(f(Bd,{dark:r()}),f(Jt,{class:`scroll q-dialog-plugin__form`},D),f(Bd,{dark:r()})):e.push(f(Jt,{class:`scroll q-dialog-plugin__form`},E)),(t.ok||t.cancel)&&e.push(O()),e}function j(){return[f(Qt,{class:[l.value,t.cardClass],style:t.cardStyle,dark:r()},k)]}return()=>f(zn,{ref:i,onHide:a},j)}});function rf(e,t){for(let n in t)n!==`spinner`&&Object(t[n])===t[n]&&!Array.isArray(t[n])?(e[n]=Object(e[n])===e[n]?{...e[n]}:{},rf(e[n],t[n])):e[n]=t[n]}function af(e,n,r){return i=>{let a,o,s=n&&i.component!==void 0;if(s){let{component:e,componentProps:t}=i;a=typeof e==`string`?r.component(e):e,o=t||{}}else{let{class:t,style:n,...r}=i;a=e,o=r,t!==void 0&&(r.cardClass=t),n!==void 0&&(r.cardStyle=n)}let c,l=!1,u=t(null),d=De(!1,`dialog`),p=e=>{if(u.value?.[e]!==void 0){u.value[e]();return}let t=c.$.subTree?.component;for(;t;){if(typeof t.proxy?.[e]==`function`){t.proxy[e]();return}t=t.subTree?.component}console.error(`[Quasar] Incorrectly defined Dialog component`)},m=[],h=[],g={onOk(e){return m.push(e),g},onCancel(e){return h.push(e),g},onDismiss(e){return m.push(e),h.push(e),g},hide(){return p(`hide`),g},update(e){if(c!==null){if(s)Object.assign(o,e);else{let{class:t,style:n,...r}=e;t!==void 0&&(r.cardClass=t),n!==void 0&&(r.cardStyle=n),rf(o,r)}c.$forceUpdate()}return g}},_=e=>{l=!0,m.forEach(t=>{t(e)})},y=e=>{b.unmount(d),L(d),b=null,c=null,l||h.forEach(t=>{t(e)})},b=Wt({name:`QGlobalDialog`,setup:()=>()=>f(a,{...o,ref:u,onOk:_,onHide:y,onVnodeMounted(...e){typeof o.onVnodeMounted==`function`&&o.onVnodeMounted(...e),v(()=>p(`show`))}})},r);return c=b.mount(d),g}}var of={install({$q:e,parentApp:t}){e.dialog=this.create=af(nf,!0,t)}},sf=new Map;function cf(e,t){sf.set(e,t)}function lf(e){sf.delete(e)}function uf(){let e=[];for(let[t,n]of sf)try{n()&&e.push(t)}catch{}return e}function df(){return uf().length>0}var ff=e=>e.startsWith(`/`);function pf(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function mf(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&pf(e.default)}var $=Object.assign;function hf(e,t){let n={};for(let r in t){let i=t[r];n[r]=_f(i)?i.map(e):e(i)}return n}var gf=()=>{},_f=Array.isArray;function vf(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var yf=Symbol(``),bf=function(e){return e[e.aborted=4]=`aborted`,e[e.cancelled=8]=`cancelled`,e[e.duplicated=16]=`duplicated`,e}({});function xf(e,t){return $(Error(),{type:e,[yf]:!0},t)}function Sf(e,t){return e instanceof Error&&yf in e&&(t==null||!!(e.type&t))}var Cf=Symbol(``),wf=Symbol(``),Tf=Symbol(``),Ef=Symbol(``),Df=Symbol(``);function Of(){return x(Tf)}function kf(e){return x(Ef)}var Af=typeof document<`u`,jf=/#/g,Mf=/&/g,Nf=/\//g,Pf=/=/g,Ff=/\?/g,If=/\+/g,Lf=/%5B/g,Rf=/%5D/g,zf=/%5E/g,Bf=/%60/g,Vf=/%7B/g,Hf=/%7C/g,Uf=/%7D/g,Wf=/%20/g;function Gf(e){return e==null?``:encodeURI(``+e).replace(Hf,`|`).replace(Lf,`[`).replace(Rf,`]`)}function Kf(e){return Gf(e).replace(Vf,`{`).replace(Uf,`}`).replace(zf,`^`)}function qf(e){return Gf(e).replace(If,`%2B`).replace(Wf,`+`).replace(jf,`%23`).replace(Mf,`%26`).replace(Bf,"`").replace(Vf,`{`).replace(Uf,`}`).replace(zf,`^`)}function Jf(e){return qf(e).replace(Pf,`%3D`)}function Yf(e){return Gf(e).replace(jf,`%23`).replace(Ff,`%3F`)}function Xf(e){return Yf(e).replace(Nf,`%2F`)}function Zf(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Qf=/\/$/,$f=e=>e.replace(Qf,``);function ep(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=cp(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Zf(o)}}function tp(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function np(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function rp(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&ip(t.matched[r],n.matched[i])&&ap(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ip(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ap(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!op(e[n],t[n]))return!1;return!0}function op(e,t){return _f(e)?sp(e,t):_f(t)?sp(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function sp(e,t){return _f(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function cp(e,t){if(ff(e))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`){if(s===`..`)a>1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var lp={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function up(e){if(!e){if(Af){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),$f(e)}var dp=/^[^#]+#/;function fp(e,t){return e.replace(dp,`#`)+t}function pp(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var mp=()=>history.scrollRestoration===`manual`?{left:window.scrollX,top:window.scrollY}:null;function hp(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=pp(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function gp(e,t){return(history.state?history.state.position-t:-1)+e}var _p=new Map;function vp(e){_p.set(e,mp())}function yp(e){let t=_p.get(e);return _p.delete(e),t}function bp(e){return typeof e==`string`||e&&typeof e==`object`}function xp(e){return typeof e==`string`||typeof e==`symbol`}function Sp(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(If,` `),i=r.indexOf(`=`),a=Zf(i<0?r:r.slice(0,i)),o=i<0?null:Zf(r.slice(i+1));if(a in t){let e=t[a];_f(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function Cp(e){let t=``;for(let n in e){let r=e[n];if(n=Jf(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(_f(r)?r.map(e=>e&&qf(e)):[r&&qf(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function wp(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=_f(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Tp(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ep(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(xf(4,{from:n,to:t})):e instanceof Error?c(e):bp(e)?c(xf(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Dp(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(t===`beforeRouteEnter`||o.instances[e]){if(pf(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Ep(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=mf(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Ep(c,n,r,o,e,i)()}))}}}return a}function Op(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>ip(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>ip(e,s))||i.push(s))}return[n,r,i]}var kp=()=>location.protocol+`//`+location.host;function Ap(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),np(n,``)}return np(n,e)+r+i}function jp(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Ap(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState($({},e.state,{scroll:mp()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),{pauseListeners:c,listen:l,destroy:d}}function Mp(e,t,n,r=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:null}}function Np(e){let{history:t,location:n}=window,r={value:Ap(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:kp()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,$({},t.state,Mp(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=$({},i.value,t.state,{forward:e,scroll:mp()});a(o.current,o,!0),a(e,$({},Mp(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Pp(e){e=up(e);let t=Np(e),n=jp(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=$({location:``,base:e,go:r,createHref:fp.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function Fp(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),Pp(e)}var Ip={type:0,value:``},Lp=/[a-zA-Z0-9_]/;function Rp(e){if(!e)return[[]];if(e===`/`)return[[Ip]];if(!ff(e))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:Lp.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`)}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var zp=`[^/]+?`,Bp={sensitive:!1,strict:!1,start:!0,end:!0},Vp=/[.+*?^${}()[\]/\\]/g;function Hp(e,t){let n=$({},Bp,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(Vp,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||zp;if(u!==zp){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(_f(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=_f(c)?c.join(`/`):c;if(!l){if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`)}n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Up(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Wp(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Up(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Gp(r))return 1;if(Gp(i))return-1}return i.length-r.length}function Gp(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var Kp={strict:!1,end:!0,sensitive:!1};function qp(e,t,n){let r=$(Hp(Rp(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Jp(e,t){let n=[],r=new Map;t=vf(Kp,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Xp(e);s.aliasOf=r&&r.record;let l=vf(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Xp($({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&!ff(u)){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=qp(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Qp(d)&&o(e.name)),nm(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:gf}function o(e){if(xp(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=em(e,n);n.splice(t,0,e),e.record.name&&!Qp(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw xf(1,{location:e});s=i.record.name,a=$(Yp(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Yp(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw xf(1,{location:e,currentLocation:t});s=i.record.name,a=$({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:$p(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Yp(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Xp(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Zp(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Zp(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Qp(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function $p(e){return e.reduce((e,t)=>$(e,t.meta),{})}function em(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;Wp(e,t[i])<0?r=i:n=i+1}let i=tm(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function tm(e){let t=e;for(;t=t.parent;)if(nm(t)&&Wp(e,t)===0)return t}function nm({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function rm(e){let t=x(Tf),n=x(Ef),r=A(()=>{let n=o(e.to);return t.resolve(n)}),i=A(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(ip.bind(null,i));if(o>-1)return o;let s=cm(e[t-2]);return t>1&&cm(i)===s&&a[a.length-1].path!==s?a.findIndex(ip.bind(null,e[t-2])):o}),a=A(()=>i.value>-1&&sm(n.params,r.value.params)),s=A(()=>i.value>-1&&i.value===n.matched.length-1&&ap(n.params,r.value.params));function c(n={}){if(om(n)){let n=t[o(e.replace)?`replace`:`push`](o(e.to)).catch(gf);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:A(()=>r.value.href),isActive:a,isExactActive:s,navigate:c}}function im(e){return e.length===1?e[0]:e}var am=N({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:rm,setup(e,{slots:t}){let n=a(rm(e)),{options:r}=x(Tf),i=A(()=>({[lm(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[lm(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&im(t.default(n));return e.custom?r:f(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function om(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function sm(e,t){for(let n in t){let r=t[n],i=e[n];if(_f(r)){if(!_f(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}else if(r!==i)return!1}return!0}function cm(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var lm=(e,t,n)=>e??t??n,um=N({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=x(Df),i=A(()=>e.route||r.value),a=x(wf,0),s=A(()=>{let e=o(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),c=A(()=>i.value.matched[s.value]);b(wf,A(()=>s.value+1)),b(Cf,c),b(Df,i);let l=d();return m(()=>[l.value,c.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!ip(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=c.value,s=o&&o.components[a];if(!s)return dm(n.default,{Component:s,route:r});let u=o.props[a],d=u?u===!0?r.params:typeof u==`function`?u(r):u:null,p=f(s,$({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:l}));return dm(n.default,{Component:p,route:r})||p}}});function dm(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var fm=um;function pm(e){let n=Jp(e.routes,e),i=e.parseQuery||Sp,a=e.stringifyQuery||Cp,s=e.history,c=Tp(),l=Tp(),u=Tp(),d=t(lp),f=t(0),p=lp;Af&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let m=hf.bind(null,e=>``+e),h=hf.bind(null,Xf),g=hf.bind(null,Zf);function _(e,t){let r,i;xp(e)?(r=n.getRecordMatcher(e),i=t):i=e;let a=n.addRoute(i,r);return f.value++,()=>{a(),f.value++}}function y(e){let t=n.getRecordMatcher(e);t&&(n.removeRoute(t),f.value++)}function b(){n.clearRoutes(),f.value++}function x(){return n.getRoutes().map(e=>e.record)}function S(e){return!!n.getRecordMatcher(e)}function C(e,t){if(f.value,typeof e==`string`){t||=e.startsWith(`/`)?lp:d.value;let r=ep(i,e,t.path),a=n.resolve({path:r.path},t),o=s.createHref(r.fullPath);return $(r,a,{params:g(a.params),redirectedFrom:void 0,href:o})}t=$({},t||(e.path!=null&&e.path.startsWith(`/`)&&!(`name`in e&&e.name)?lp:d.value));let r;if(e.path!=null)r=$({},e,{path:ep(i,e.path,t.path).path});else{let n=$({},e.params);for(let e in n)n[e]??delete n[e];r=$({},e,{params:h(n)}),t.params=h(t.params)}let o=n.resolve(r,t),c=e.hash||``;o.params=m(g(o.params));let l=tp(a,$({},e,{hash:Kf(c),path:o.path})),u=s.createHref(l);return $({fullPath:l,hash:c,query:a===Cp?wp(e.query):e.query||{}},o,{redirectedFrom:void 0,href:u})}function w(e){return typeof e==`string`?ep(i,e,d.value.path):$({},e)}function T(e,t){if(p!==e)return xf(8,{from:t,to:e})}function E(e){return k(e)}function D(e){return E($(w(e),{replace:!0}))}function O(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=w(i):{path:i},i.params={}),$({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function k(e,t){let n=p=C(e),r=d.value,i=e.state,o=e.force,s=e.replace===!0,c=O(n,r);if(c)return k($(w(c),{state:typeof c==`object`?$({},i,c.state):i,force:o,replace:s}),t||n);let l=n;l.redirectedFrom=t;let u;return!o&&rp(a,r,n)&&(u=xf(16,{to:l,from:r}),ce(r,r,!0,!1)),(u?Promise.resolve(u):M(l,r)).catch(e=>Sf(e)?Sf(e,2)?e:se(e):ae(e,l,r)).then(e=>{if(e){if(Sf(e,2))return k($({replace:s},w(e.to),{state:typeof e.to==`object`?$({},i,e.to.state):i,force:o}),t||l)}else e=te(l,r,!0,s,i);return ee(l,r,e),e})}function A(e,t){let n=T(e,t);return n?Promise.reject(n):Promise.resolve()}function j(e){let t=ue.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function M(e,t){let n,[r,i,a]=Op(e,t);n=Dp(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Ep(r,e,t))});let o=A.bind(null,e,t);return n.push(o),I(n).then(()=>{n=[];for(let r of c.list())n.push(Ep(r,e,t));return n.push(o),I(n)}).then(()=>{n=Dp(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Ep(r,e,t))});return n.push(o),I(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter){if(_f(r.beforeEnter))for(let i of r.beforeEnter)n.push(Ep(i,e,t));else n.push(Ep(r.beforeEnter,e,t))}return n.push(o),I(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Dp(a,`beforeRouteEnter`,e,t,j),n.push(o),I(n))).then(()=>{n=[];for(let r of l.list())n.push(Ep(r,e,t));return n.push(o),I(n)}).catch(e=>Sf(e,8)?e:Promise.reject(e))}function ee(e,t,n){u.list().forEach(r=>j(()=>r(e,t,n)))}function te(e,t,n,r,i){let a=T(e,t);if(a)return a;let o=t===lp,c=Af?history.state:{};n&&(r||o?s.replace(e.fullPath,$({scroll:o&&c&&c.scroll},i)):s.push(e.fullPath,i)),d.value=e,ce(e,t,n,o),se()}let N;function ne(){N||=s.listen((e,t,n)=>{if(!de.listening)return;let r=C(e),i=O(r,de.currentRoute.value);if(i){k($(i,{replace:!0,force:!0}),r).catch(gf);return}p=r;let a=d.value;Af&&n.delta&&vp(gp(a.fullPath,n.delta)),M(r,a).catch(e=>Sf(e,12)?e:Sf(e,2)?(k($(w(e.to),{force:!0}),r).then(e=>{Sf(e,20)&&!n.delta&&n.type===`pop`&&s.go(-1,!1)}).catch(gf),Promise.reject()):(n.delta&&s.go(-n.delta,!1),ae(e,r,a))).then(e=>{e||=te(r,a,!1),e&&(n.delta&&!Sf(e,8)?s.go(-n.delta,!1):n.type===`pop`&&Sf(e,20)&&s.go(-1,!1)),ee(r,a,e)}).catch(gf)})}let re=Tp(),ie=Tp(),P;function ae(e,t,n){se(e);let r=ie.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function oe(){return P&&d.value!==lp?Promise.resolve():new Promise((e,t)=>{re.add([e,t])})}function se(e){return P||(P=!e,ne(),re.list().forEach(([t,n])=>e?n(e):t()),re.reset()),e}function ce(t,n,r,i){let{scrollBehavior:a}=e;if(!Af||!a)return Promise.resolve();let o=!r&&yp(gp(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return v().then(()=>a(t,n,o)).then(e=>t===d.value&&e&&hp(e)).catch(e=>t===d.value&&ae(e,t,n))}let F=e=>s.go(e),le,ue=new Set,de={currentRoute:d,listening:!0,addRoute:_,removeRoute:y,clearRoutes:b,hasRoute:S,getRoutes:x,resolve:C,options:e,push:E,replace:D,go:F,back:()=>F(-1),forward:()=>F(1),beforeEach:c.add,beforeResolve:l.add,afterEach:u.add,onError:ie.add,isReady:oe,install(e){e.component(`RouterLink`,am),e.component(`RouterView`,fm),e.config.globalProperties.$router=de,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>o(d)}),Af&&!le&&d.value===lp&&(le=!0,E(s.location).catch(e=>{}));let t={};for(let e in lp)Object.defineProperty(t,e,{get:()=>d.value[e],enumerable:!0});e.provide(Tf,de),e.provide(Ef,r(t)),e.provide(Df,d);let n=e.unmount;ue.add(e),e.unmount=function(){ue.delete(e),ue.size<1&&(p=lp,N&&N(),N=null,d.value=lp,le=!1,P=!1),n()}}};function I(e){return e.reduce((e,t)=>e.then(()=>j(t)),Promise.resolve())}return de}var mm=[{path:`/`,component:()=>Gc(()=>import(`./MainLayout-DqBbE8o4.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41])),children:[{path:``,redirect:{name:`workspace`}},{path:`dashboard`,name:`dashboard`,component:()=>Gc(()=>import(`./DashboardPage-CzVOvjSP.js`),__vite__mapDeps([42,1,2,3,4,43,10,5,11,21,14,22,23,26,35,37,44]))},{path:`workspace/:id?`,name:`workspace`,component:()=>Gc(()=>import(`./WorkspacePage-D_V9gNON.js`).then(e=>e.t),__vite__mapDeps([45,1,2,3,46,6,4,7,5,8,9,10,11,12,31,32,14,15,16,17,18,19,20,47,26,27,28,22,35,48,49,50,39,30,25,33,34,24,29,36,37,38,40,51]))},{path:`split`,name:`split`,component:()=>Gc(()=>import(`./SplitWorkspacePage-4wFh65Lh.js`),__vite__mapDeps([52,1,2,3,4,5,7,8,9,10,11,12,25,35,39,53]))},{path:`create`,name:`create`,component:()=>Gc(()=>import(`./CreatePage-B9AdNJZj.js`),__vite__mapDeps([54,1,2,3,46,6,4,7,5,8,9,10,11,12,31,32,14,16,55,34,19,20,26,29,35,36,18,37,48,49,38,56]))},{path:`settings`,name:`settings`,component:()=>Gc(()=>import(`./SettingsPage-0GtDcXRC.js`),__vite__mapDeps([30,1,2,3,4,8,6,7,5,9,10,11,12,31,32,25,14,17,18,19,33,34,24,26,29,35,36,37,38,39,40]))},{path:`search`,name:`search`,component:()=>Gc(()=>import(`./SearchPage-BoBjmItc.js`),__vite__mapDeps([57,1,2,3,10,4,5,11,16,22,35,36,14,18,37,50,58]))},{path:`health`,name:`health`,component:()=>Gc(()=>import(`./HealthPage-aieNQly-.js`),__vite__mapDeps([59,1,2,3,6,4,9,10,5,11,16,35,36,14,18,37,60]))},{path:`changelog`,name:`changelog`,component:()=>Gc(()=>import(`./ChangelogPage-BJdICFvz.js`),__vite__mapDeps([61,1,2,3,10,4,5,11,15,12,35,36,14,18,37,62]))}]},{path:`/:catchAll(.*)*`,redirect:`/`}],hm=Id(()=>{let e=pm({scrollBehavior:()=>({left:0,top:0}),routes:mm,history:Fp()});e.beforeEach((e,t)=>{if(Qu(e,t)||e.fullPath===t.fullPath||!df())return!0;let n=Zc.global.t;return new Promise(e=>{of.create({title:n(`unsaved.title`),message:n(`unsaved.message`),dark:!0,cancel:{flat:!0,label:n(`unsaved.stay`),color:`grey-5`},ok:{flat:!0,label:n(`unsaved.leave`),color:`negative`}}).onOk(()=>e(!0)).onCancel(()=>e(!1))})});let t=()=>{let e=Z();return ed(df(),vc(e)?{}:e.queuedMessages)};return window.addEventListener(`beforeunload`,e=>{t()&&(e.preventDefault(),e.returnValue=``)}),qu&&(window.koboPane={hasUnsavedWork:t,ready:()=>e.currentRoute.value.name!=null,navigate:t=>e.push({name:`workspace`,params:{id:t}}),workspaceId:()=>typeof e.currentRoute.value.params.id==`string`?e.currentRoute.value.params.id:void 0}),e});async function gm(e,t){let n=e(Nd);n.use(qt,t);let r=typeof Ld==`function`?await Ld({}):Ld;n.use(r);let a=i(typeof hm==`function`?await hm({store:r}):hm);return r.use(({store:e})=>{e.router=a}),{app:n,store:r,router:a}}var _m={config:{dark:!0,brand:{primary:`#6c63ff`,secondary:`#26a69a`,accent:`#9c27b0`,dark:`#1a1a2e`,"dark-page":`#1a1a2e`,positive:`#21ba45`,negative:`#c10015`,info:`#31ccec`,warning:`#f2c037`}},plugins:{Notify:Bc,Dialog:of}},vm=function(){return!!(window.location.hostname===`localhost`||window.location.hostname===`[::1]`||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},ym;typeof window<`u`&&(ym=typeof Promise<`u`?new Promise(function(e){return window.addEventListener(`load`,e)}):{then:function(e){return window.addEventListener(`load`,e)}});function bm(e,t){t===void 0&&(t={});var n=t.registrationOptions;n===void 0&&(n={}),delete t.registrationOptions;var r=function(e){for(var n=[],r=arguments.length-1;r-->0;)n[r]=arguments[r+1];t&&t[e]&&t[e].apply(t,n)};`serviceWorker`in navigator&&ym.then(function(){vm()?(Cm(e,r,n),navigator.serviceWorker.ready.then(function(e){r(`ready`,e)}).catch(function(e){return xm(r,e)})):(Sm(e,r,n),navigator.serviceWorker.ready.then(function(e){r(`ready`,e)}).catch(function(e){return xm(r,e)}))})}function xm(e,t){navigator.onLine||e(`offline`),e(`error`,t)}function Sm(e,t,n){navigator.serviceWorker.register(e,n).then(function(e){if(t(`registered`,e),e.waiting){t(`updated`,e);return}e.onupdatefound=function(){t(`updatefound`,e);var n=e.installing;n.onstatechange=function(){n.state===`installed`&&(navigator.serviceWorker.controller?t(`updated`,e):t(`cached`,e))}}}).catch(function(e){return xm(t,e)})}function Cm(e,t,n){fetch(e).then(function(r){r.status===404?(t(`error`,Error(`Service worker not found at `+e)),wm()):r.headers.get(`content-type`).indexOf(`javascript`)===-1?(t(`error`,Error(`Expected `+e+` to have javascript content-type, but received `+r.headers.get(`content-type`))),wm()):Sm(e,t,n)}).catch(function(e){return xm(t,e)})}function wm(){`serviceWorker`in navigator&&navigator.serviceWorker.ready.then(function(e){e.unregister()}).catch(function(e){return xm(emit,e)})}bm(`/sw.js`);var Tm=`/`;async function Em({app:e,router:t,store:n},r){let i=!1,a=e=>{try{return t.resolve(e).href}catch{}return Object(e)===e?null:e},o=e=>{if(i=!0,typeof e==`string`&&/^https?:\/\//.test(e)){window.location.href=e;return}let t=a(e);t!==null&&(window.location.href=t,window.location.reload())},s=window.location.hash.slice(1)||`/`;for(let a=0;i===!1&&a<r.length;a++)try{await r[a]({app:e,router:t,store:n,ssrContext:null,redirect:o,urlPath:s,publicPath:Tm})}catch(e){i||console.error(`[Quasar] boot error:`,e);return}i||(e.use(t),e.mount(`#q-app`))}gm(Pe,_m).then(e=>{let[t,n]=Promise.allSettled===void 0?[`all`,e=>e.map(e=>e.default)]:[`allSettled`,e=>e.map(e=>{if(e.status===`rejected`){console.error(`[Quasar] boot error:`,e.reason);return}return e.value.default})];return Promise[t]([Gc(()=>import(`./i18n-Sy42tm-V.js`),[]),Gc(()=>import(`./network-auth-CXQn2wO7.js`),[]),Gc(()=>import(`./notify-theme-BrueBr2j.js`),[])]).then(t=>{Em(e,n(t).filter(e=>typeof e==`function`))})});export{Zl as $,en as $t,Pu as A,ic as At,$l as B,zn as Bt,$u as C,Sc as Ct,Lu as D,cc as Dt,Vu as E,sc as Et,Du as F,ws as Ft,fu as G,Dn as Gt,nu as H,Fn as Ht,gu as I,Es as It,su as J,mn as Jt,mu as K,on as Kt,eu as L,ss as Lt,Eu as M,Cs as Mt,Tu as N,Rs as Nt,Iu as O,lc as Ot,ku as P,Ts as Pt,ql as Q,dn as Qt,iu as R,Bo as Rt,Xu as S,Cc as St,Gu as T,uc as Tt,cu as U,jn as Ut,ru as V,Pn as Vt,lu as W,En as Wt,hu as X,tn as Xt,ou as Y,an as Yt,Kl as Z,fn as Zt,fd as _,Zc as _t,cf as a,Vt as an,wl as at,qu as b,Gc as bt,Kd as c,dl as ct,Bd as d,ol as dt,$t as en,Hl as et,Fd as f,sl as ft,md as g,nl as gt,pd as h,al as ht,Of as i,Lt as in,Sl as it,Au as j,rc as jt,ju as k,ac as kt,Gd as l,X as lt,gd as m,il as mt,Sf as n,Zt as nn,Z as nt,lf as o,Rt as on,gl as ot,Md as p,cl as pt,du as q,rn as qt,kf as r,Jt as rn,bl as rt,Xd as s,_l as st,bf as t,Qt as tn,El as tt,Ud as u,ul as ut,ud as v,Xc as vt,Ku as w,fc as wt,Yu as x,Bc as xt,Ju as y,tl as yt,tu as z,Un as zt};
20
+ sudo setfacl -Rd -m u:$(whoami):rwX . && sudo setfacl -R -m u:$(whoami):rwX .`,"settings.purgeDocsPermissionsRecoverChownIntro":`Option B — Take ownership (simpler, loses the "created by root in container" trace but rarely matters):`,"settings.purgeDocsPermissionsRecoverChownCommand":` sudo chown -R $(whoami):$(whoami) .`,"settings.purgeDocsPermissionsRecoverFootnote":"Tip: you can run these commands directly on the worktrees root (e.g. `~/.worktrees/`) to cover all existing AND future workspaces at once. Once done, Kōbō purge will work without permission errors.","contextMenu.runSetup":`Run setup script`,"contextMenu.exportEvents":`Export events (CSV)`,"contextMenu.dismissChangesRequested":`Mark 'Changes requested' as seen`,"contextMenu.dismissCiFailure":`Mark 'CI failure' as seen`,"contextMenu.restoreChangesRequested":`Mark 'Changes requested' as unseen`,"contextMenu.restoreCiFailure":`Mark 'CI failure' as unseen`,"contextMenu.exportingEvents":`Preparing export…`,"contextMenu.exportEventsError":`Event export failed`,"contextMenu.openNotion":`Open in Notion`,"contextMenu.openSentry":`Open in Sentry`,"contextMenu.openPr":`Open PR`,"contextMenu.ignorePrWatch":`Ignore PR checks`,"contextMenu.resumePrWatch":`Resume PR checks`,"contextMenu.prWatchToggleFailed":`Failed to update PR checks setting`,"workspace.favorite":`Mark as favorite`,"workspace.unfavorite":`Remove from favorites`,"workspace.showFavoritesOnly":`Show favorites only`,"workspace.searchArchivedToggle":`Also search archived workspaces`,"workspace.descriptionPlaceholder":`Add a short description`,"workspace.descriptionDialogHint":`Plain text, 200 characters max. Leave empty to clear.`,"workspace.descriptionTooLong":`Description must be 200 characters or fewer.`,"workspace.descriptionSaveFailed":`Failed to save description.`,"workspace.agentDescriptionTooltip":`Live status maintained by the agent`,"mcp.tool.setWorkspaceDescription":`Set the workspace short description (≤ 200 chars).`,"tags.manage":`Manage tags`,"tags.manageTitle":`Manage workspace tags`,"tags.noTagsDefined":`No tags defined. Add some in Settings > Global > Tags.`,"tags.orphanedHint":`{count} tag(s) are no longer in the global catalog. Uncheck to remove them.`,"settings.tagsTitle":`Workspace tags`,"settings.tagsHint":`Define the tags you can assign to workspaces. Type to add, click the cross to remove.`,"settings.tagsLabel":`Available tags`,"settings.branchPrefixesTitle":`Branch prefixes`,"settings.branchPrefixesHint":`Manage the git branch prefixes available on the workspace creation page. The first one is pre-selected by default.`,"settings.branchPrefixesEmpty":`No branch prefix defined. Add at least one below.`,"settings.branchPrefixesAddLabel":`New prefix`,"settings.branchPrefixesEditHint":`Click to rename`,"settings.branchPrefixesMoveUp":`Move up`,"settings.branchPrefixesMoveDown":`Move down`,"settings.worktreesTitle":`Git worktrees`,"settings.worktreesHint":`Choose where new workspace worktrees are created. Relative paths are project-relative; Linux/macOS and Windows absolute paths, $HOME, ~, and %USERPROFILE% are supported.`,"settings.worktreesPathLabel":`Worktrees path`,"settings.worktreesPathRequired":`Worktrees path is required.`,"settings.worktreesPrefixByProject":`Prefix worktrees by project name`,"settings.worktreesPrefixByProjectHint":`Place each worktree under a sub-directory named after the project, to avoid collisions when multiple projects share the same worktrees root.`,"settings.shareTitle":`Share configuration`,"settings.shareHint":`Export your settings, templates and tags as a JSON bundle. MCP API keys are stripped from exports for security.`,"settings.exportConfig":`Export`,"settings.importConfig":`Import`,"settings.exportSuccess":`Configuration exported`,"settings.importSuccess":`Configuration imported`,"settings.importConfirmTitle":`Import configuration`,"settings.importConfirmMessage":`This will replace your current settings, templates and tags. Your MCP keys are preserved. Continue?`,"settings.mcp.title":`External LLM connections (MCP)`,"settings.mcp.hint":`Connect an MCP client to read workspace conversations, send messages and answer questions.`,"settings.mcp.remoteDisabled":`Remote connections require network access and a server restart after enabling it.`,"settings.mcp.clientName":`Client name (optional)`,"settings.mcp.connection":`Connection`,"settings.mcp.local":`Local HTTP`,"settings.mcp.remote":`Remote HTTP`,"settings.mcp.proxy":`Reverse proxy`,"settings.mcp.stdio":`Local stdio`,"settings.mcp.copyUrl":`Copy URL`,"settings.mcp.copyConfig":`Copy configuration`,"settings.mcp.copyWithToken":`Copy with token`,"settings.mcp.genericFormat":`These examples use a generic mcpServers format. Adapt the container format to your MCP client. Token placeholders are kept in previews.`,"settings.mcp.tokenUnavailable":`No token is available. Enable network access before copying authenticated configuration.`,"settings.mcp.stdioUnavailable":`The stdio entrypoint is unavailable in this installation. Use HTTP or build Kōbō first.`,"settings.mcp.copyFailed":`Could not copy to the clipboard.`,"tours.settings.mcp.title":`Connect an external LLM`,"tours.settings.mcp.description":`Copy an HTTP or stdio configuration to let an external assistant communicate with your workspaces.`,"settings.network.title":`Network access`,"settings.network.hint":`Control Kōbō from another device on your trusted LAN. Off = localhost only. On = reachable on your network, protected by a token. Restart Kōbō after toggling.`,"settings.network.enable":`Enable network access`,"settings.network.behindProxy":`Behind a reverse proxy`,"settings.network.behindProxyHint":`Kōbō can no longer tell your own machine apart from a proxied request — even localhost will need the token from now on. Enable this only if a reverse proxy (Traefik, nginx, Caddy…) sits in front of Kōbō.`,"settings.network.restartRequired":`Restart Kōbō to apply the new bind address.`,"settings.network.token":`Access token`,"settings.network.copy":`Copy`,"settings.network.copied":`Copied`,"settings.network.regenerate":`Regenerate`,"settings.network.regenerateConfirm":`Regenerate the token? Connected devices will need the new token.`,"settings.network.urls":`LAN URLs`,"settings.network.scan":`Scan to connect`,"settings.network.noUrls":`No LAN address detected.`,"settings.network.loadFailed":`Failed to load network access settings.`,"settings.network.updateFailed":`Failed to update network access settings.`,"settings.unsavedChanges.title":`Unsaved changes`,"settings.unsavedChanges.message":`This project has unsaved changes. Switching projects will discard them.`,"settings.unsavedChanges.discard":`Discard and switch`,"settings.unsavedChanges.cancel":`Cancel`,"settings.loadFailed":`Settings could not be loaded`,"settings.loadFailedHint":`Saving is disabled: the form is showing default values, and writing them would overwrite your real configuration.`,"health.title":`Health`,"health.tooltip":`System health`,"changelog.title":`Changelog`,"changelog.tooltip":`What's new in Kōbō`,"changelog.empty":`No changelog available.`,"changelog.current":`current`,"changelog.currentVersion":`Current version: v{version}`,"health.envTitle":`Environment`,"health.version":`Version`,"health.koboHome":`Kōbō home`,"health.dbTitle":`Database`,"health.dbPath":`Path`,"health.dbSize":`Size`,"health.schemaVersion":`Schema version`,"health.settingsSchemaVersion":`Settings schema`,"health.runtimesTitle":`Agent runtimes`,"health.claudeCliTitle":`Claude Code`,"health.claudeCliMissing":`claude not on PATH`,"health.codexCliTitle":`OpenAI Codex`,"health.codexCliMissing":`codex binary not resolvable`,"health.forgeCliTitle":`Forge CLI (gh / glab)`,"health.forgeCliMissing":`Neither gh nor glab found — pull requests and CI watching are unavailable`,"health.workspacesTitle":`Workspaces`,"health.workspacesCount":`{total} total, {archived} archived`,"health.worktreesMissing":`{count} worktree(s) missing on disk`,"health.sessionsTitle":`Agent sessions`,"health.sessionsOrphaned":`{n} orphaned running session(s)`,"health.integrationsTitle":`Integrations`,"health.integrationConfigured":`configured`,"health.integrationMissing":`not configured`,"health.integrationDisabled":`disabled`,"settings.integrationEnabled":`Enable integration`,"health.activeTitle":`Active state`,"health.activeQuotaBackoffs":`Pending quota backoffs`,"health.activeWakeups":`Scheduled wakeups`,"health.activeAutoLoop":`Auto-loop running`,"health.activeAgentSessions":`Live agent sessions`,"health.activeDevServers":`Running dev servers`,"health.noneActive":`None.`,"health.quotaResumeAt":`resumes at {time}`,"health.wakeupAt":`wakes at {time}`,"health.startedAgo":`started {time} ago`,"health.autoLoopReady":`ready, iterating`,"health.autoLoopGrooming":`grooming in progress`,"session.started":`Session started`,"session.ended":`Session ended`,"session.compacted":`Context compacted`,"session.endedCompleted":`Turn finished — send a message to continue`,"session.endedKilled":`Session stopped`,"session.endedError":`Session ended on an error`,"session.endedWatchdog":`Session force-closed after a period of inactivity`,"tool.running":`Running...`,"activity.raw_lines":`Raw output lines ({n})`,"activity.loading_older":`Loading older messages…`,"activity.compacting":`Compacting context…`,"activity.prev_user_message":`Previous user message`,"activity.scroll_to_bottom":`Scroll to bottom`,"activity.empty":`Nothing yet`,"activity.emptyHint":`The agent output will show up here as soon as a session starts.`,"activity.a11y.region":`Agent activity announcements`,"activity.a11y.agentSaid":`Agent: {text}`,"activity.a11y.toolStarted":`Tool {name} started`,"activity.a11y.toolFinished":`Tool {name} finished`,"activity.a11y.toolFailed":`Tool {name} failed`,"chat.systemPrompt":`System prompt`,"chat.agent":`Agent`,"chat.cleanupScript":`Cleanup script`,"chat.archiveScript":`Archive script`,"chat.setupScript":`Setup script`,"chat.hookScript":`Hook {event}`,"chat.scriptDone":`Done`,"chat.scriptComplete":`[{phase}] Complete`,"chat.scriptError":`[{phase}] Error: {message}`,"chat.unknownError":`unknown`,"chat.you":`You`,"chat.session":`Session`,"chat.nActions":`{n} action | {n} actions`,"chat.lastUpdatedAt":`Last updated at {time}`,"chat.scrollToTurnTop":`Scroll to top of this message`,"migration.backing_up":`Backing up the database…`,"migration.running":`Migrating agent data — {processed}/{total}`,"migration.error":`Migration failed`,"migration.backup_location":`A backup was saved at {path}. Restart Kōbō to retry.`,"migration.retry":`Restart Kōbō to retry.`,"engine.select":`Engine`,"engine.model":`Model`,"engine.effort":`Reasoning effort`,"wakeup.scheduledIn":`Next wakeup in {n}s`,"wakeup.scheduledAt":`Next wakeup at {time}`,"wakeup.firing":`Waking up...`,"wakeup.reason":`Reason: {reason}`,"wakeup.cancel":`Cancel this wakeup`,"wakeup.pendingIndicator":`Wakeup scheduled`,"cron.pendingIndicator":`{n} cron(s) scheduled`,"schedule.tabLabel":`Schedule`,"schedule.admissionTitle":`New automatic session currently unavailable.`,"schedule.admissionHint":`Deadlines are unchanged. Delivery into an existing conversation follows its own rules.`,"schedule.admission.not-found":`Workspace not found.`,"schedule.admission.archived":`Workspace archived.`,"schedule.admission.purged":`Restore the worktree first.`,"schedule.admission.shutdown":`Server is shutting down.`,"schedule.admission.lifecycle":`A workspace operation is in progress.`,"schedule.admission.active-session":`The current session has not closed yet.`,"schedule.admission.awaiting-user":`A user answer is required.`,"schedule.admission.compacting":`Context compaction is in progress.`,"schedule.admission.quota":`Waiting for quota recovery.`,"schedule.admission.blocked":`Auto-loop is blocked; resolve its reported cause.`,"schedule.admission.capacity":`Concurrency limit reached: {running}/{limit} sessions.`,"schedule.panelTitle":`Automation`,"schedule.panelDescription":`Wake this workspace later or run instructions on a schedule.`,"schedule.activeTitle":`Active schedules`,"schedule.emptyTitle":`Nothing scheduled`,"schedule.emptyDescription":`Create a wakeup or recurring task below.`,"schedule.cancelWakeup":`Cancel this wakeup`,"schedule.cancelCron":`Delete this recurring task`,"schedule.createTitle":`Create a schedule`,"schedule.createDescription":`Choose when and how the agent should run.`,"schedule.typeWakeup":`One-time wakeup`,"schedule.typeRecurring":`Recurring task`,"schedule.wakeupDescription":`Run the prompt once after a delay.`,"schedule.cronDescription":`Run the prompt repeatedly on a fixed schedule.`,"schedule.promptHint":`Instructions that will be sent to the agent`,"schedule.frequencyTitle":`Frequency`,"schedule.advancedDescription":`Use a raw cron expression`,"schedule.cronExpressionLabel":`Cron expression`,"schedule.sessionModeTitle":`Execution session`,"schedule.modeResume":`Resume session`,"schedule.oneShotHint":`Remove this schedule after its first run.`,"schedule.wakeupTitle":`Wakeup pending`,"schedule.cronsTitle":`Recurring schedules`,"schedule.noWakeup":`No wakeup scheduled`,"schedule.noCrons":`No cron scheduled`,"schedule.invalidCron":`Inactive: invalid expression. Remove and recreate this schedule.`,"schedule.nextFireAt":`next at {time}`,"schedule.lastFiredAt":`last fired {time} ago`,"schedule.addCronTitle":`Add a recurring task`,"schedule.addWakeupTitle":`Schedule a wakeup`,"schedule.every":`Every`,"schedule.unitMinutes":`minutes`,"schedule.unitHours":`hours`,"schedule.unitDays":`days`,"schedule.daysDriftWarning":`The interval may shrink to 1 day at the end of the month (cron limitation).`,"schedule.advancedExpression":`Advanced expression (optional)`,"schedule.advancedHint":`Raw cron (e.g. */15 * * * *) or {'@'}hourly/{'@'}daily — overrides the picker when set.`,"schedule.promptLabel":`Prompt`,"schedule.labelOptional":`Label (optional)`,"schedule.delayMinutes":`Delay (minutes)`,"schedule.modeFresh":`New session`,"schedule.oneShot":`Run only once`,"schedule.addCronBtn":`Add cron`,"schedule.addWakeupBtn":`Schedule wakeup`,"schedule.cronCreated":`Recurring task added`,"schedule.wakeupCreated":`Wakeup scheduled`,"askUserQuestion.title":`The agent is asking a question`,"askUserQuestion.submit":`Submit answer`,"askUserQuestion.multiSelectHint":`Select one or more options`,"askUserQuestion.otherOption":`Other`,"askUserQuestion.otherOptionHint":`specify in your next chat message`,"askUserQuestion.freeFormLabel":`Specify your answer`,"askUserQuestion.freeFormHint":`This answer will be sent directly to the agent.`,"askUserQuestion.noPending":`No pending question`,"askUserQuestion.next":`Next`,"askUserQuestion.previous":`Previous`,"askUserQuestion.cancel":`Cancel`,"askUserQuestion.cancelTooltip":`Skip this question — the agent will proceed without an answer`,"askUserQuestion.collapse":`Collapse the question panel`,"askUserQuestion.expand":`Expand the question panel`,"permissionRequest.title":`The agent wants to use a tool`,"permissionRequest.allow":`Allow`,"permissionRequest.allowOnce":`Allow once`,"permissionRequest.allowTurn":`Allow this turn`,"permissionRequest.operationUnavailable":`Operation details unavailable; approve once or the entire tool.`,"permissionRequest.allowOperation":`Always this operation`,"permissionRequest.allowTool":`Always this tool`,"permissionRequest.deny":`Deny`,"permissionRequest.tool":`Tool`,"permissionRequest.input":`Input`,"permissionRequest.rawInput":`Technical details`,"permissionRequest.collapse":`Collapse the permission panel`,"permissionRequest.expand":`Expand the permission panel`,"permissionRequest.denied":`denied by user`,"workspaceStatus.created":`created`,"workspaceStatus.extracting":`extracting`,"workspaceStatus.brainstorming":`brainstorming`,"workspaceStatus.compacting":`compacting`,"chatInput.compactingBanner":`Context compaction in progress. Sending will be available when it finishes.`,"workspaceStatus.executing":`running`,"workspaceStatus.awaitingUser":`awaiting your answer`,"workspaceStatus.completed":`completed`,"workspaceStatus.idle":`idle`,"workspaceStatus.error":`error`,"workspaceStatus.quota":`quota reached`,"workspaceStatus.retrying":`auto-resuming`,"workspaceList.prOpen":`#{n} — Pull request open`,"workspaceList.prWatchDisabledIndicator":`PR checks ignored for this workspace`,"workspaceList.prChangesRequested":`#{n} — Changes requested`,"workspaceList.attentionCiFailed":`CI failed`,"workspaceList.attentionChangesRequested":`Changes requested`,"workspaceList.attentionReadyToMerge":`Ready to merge`,"autoLoop.status.active":`Active`,"autoLoop.status.waiting":`Waiting`,"autoLoop.status.blocked":`Blocked`,"autoLoop.status.completed":`Completed`,"autoLoop.status.stopped":`Stopped`,"autoLoop.phase.grooming":`Preparation`,"autoLoop.phase.execution":`Execution`,"autoLoop.phase.finalization":`Finalization`,"autoLoop.iteration":`Iteration {count}`,"autoLoop.resume":`Resume auto-loop`,"autoLoop.retryAt":`Retry scheduled for`,"autoLoop.actionFailed":`The action could not be completed.`,"autoLoop.messages.count":`{count} queued instruction(s)`,"autoLoop.messages.pending":`Queued`,"autoLoop.messages.dispatching":`Sending`,"autoLoop.messages.unknown":`Delivery unknown`,"autoLoop.messages.delivered":`Delivered`,"autoLoop.messages.cancel":`Cancel instruction`,"autoLoop.messages.acknowledge":`Mark as received`,"autoLoop.messages.retry":`Send again`,"autoLoop.messages.unknownHelp":`Delivery could not be confirmed. Check the conversation before deciding. Sending again may duplicate an instruction already received.`,"autoLoop.reason.quota":`Waiting for provider quota.`,"autoLoop.reason.transient":`Recovering after a temporary interruption.`,"autoLoop.reason.awaiting-user":`Waiting for your answer.`,"autoLoop.reason.capacity-or-lifecycle":`Waiting for an available agent slot.`,"autoLoop.reason.message-delivery-unknown":`Resolve the instruction with unknown delivery before resuming.`,"autoLoop.reason.error":`The loop needs attention before it can continue.`,"autoLoop.reason.stall":`No progress detected. Review the last session before resuming.`,"autoLoop.reason.awaiting-clarification":`A clarification is needed before continuing.`,"autoLoop.toggle":`Auto-loop`,"autoLoop.start":`Start auto-loop`,"autoLoop.prepare":`Prepare for auto-loop`,"autoLoop.reprepare":`Re-prepare for auto-loop`,"autoLoop.reprepareTooltip":`Re-run the grooming pass to add or refresh tasks before resuming the loop`,"autoLoop.prepareBusy":`Wait for the agent to finish before preparing`,"autoLoop.forceReady":`I know what I'm doing — skip grooming`,"autoLoop.forceReadyConfirm":`Skip grooming and mark auto-loop ready? This may cause the loop to stall if tasks aren't atomic.`,"autoLoop.stop":`Stop auto-loop`,"autoLoop.notReady":`Run 'Prepare for auto-loop' first`,"autoLoop.noTasks":`Add tasks first`,"autoLoop.progress":`Auto-loop · {done}/{total} tasks`,"autoLoop.preparing":`Auto-loop · preparing`,"autoLoop.preparingTooltip":`Grooming in progress — the agent is creating / reviewing tasks. The loop will start running once it calls mark_auto_loop_ready.`,"autoLoop.running":`Auto-loop running`,"autoLoop.startInMode":`Start in auto-loop mode`,"autoLoop.brainstormModelPrefix":`Brainstorm:`,"autoLoop.brainstormModelTooltip":`Model used only for the initial brainstorming session — every task after that uses the model picked above`,"autoLoop.brainstormReasoningPrefix":`Brainstorm:`,"autoLoop.brainstormReasoningTooltip":`Reasoning level used only for the initial brainstorming session`,"autoLoop.executionModelPrefix":`Loop:`,"autoLoop.executionModelTooltip":`Model used for every auto-loop task after the initial brainstorming session`,"autoLoop.sessionMode.perTask":`New session per task`,"autoLoop.sessionMode.label":`Session:`,"autoLoop.sessionMode.perTaskTooltip":`Each task starts a fresh Claude Code session with no memory of prior tasks`,"autoLoop.sessionMode.continuous":`Continuous session`,"autoLoop.sessionMode.continuousTooltip":`All tasks run in the same session — the agent keeps full context, but the session grows longer over time`,"koboCommand.prepAutoloopDesc":`Prepare tasks for auto-loop mode (groom for atomicity)`,"staleSessionBanner.title":`Auto-loop running`,"staleSessionBanner.message":`You're viewing an older session — the agent is currently working in the latest one.`,"staleSessionBanner.staleTitle":`Older session`,"staleSessionBanner.staleMessage":`You're viewing an older session — messages you send go to this session, not the latest one.`,"staleSessionBanner.switchToCurrent":`Switch to current`,"network.login.title":`Network access`,"network.login.description":`This Kōbō requires a token to be controlled from the network. Paste the token shown in Settings on the host machine.`,"network.login.tokenLabel":`Token`,"network.login.tokenPlaceholder":`Paste your token`,"network.login.connect":`Connect`,"network.login.invalid":`Invalid token`,"network.login.serverError":`Server error — try again.`,"network.login.unreachable":`Kōbō is unreachable — check your connection.`,"layout.toggleWorkspaces":`Toggle workspaces panel`,"layout.togglePanel":`Toggle side panel`,"unsaved.title":`Leave without saving?`,"unsaved.message":`You have unsaved changes. Leaving this page discards them.`,"unsaved.leave":`Leave`,"unsaved.stay":`Stay`,"prCheckout.staleRetriesExhausted":`The repository state kept changing while we tried to apply your choices. Close this dialog and try again from the pull request picker.`,"prPicker.title":`Import from a pull request`,"prPicker.filterAll":`All`,"prPicker.filterMine":`Mine`,"prPicker.filterReviewRequested":`Review requested`,"prPicker.searchPlaceholder":`Search pull requests…`,"prPicker.loadMore":`Load more`,"prPicker.empty":`No open pull request matches.`,"prPicker.forkNotSupported":`This PR comes from a fork; Kōbō cannot check it out.`,"prPicker.loadFailed":`Failed to load pull requests.`,"prPicker.badge.workspaceExists":`Already open in Kōbō`,"prPicker.badge.worktreePresent":`Worktree present`,"prPicker.badge.localBranch":`Local branch`,"prPicker.badge.new":`New`,"prPicker.badge.draft":`Draft`,"prCheckout.title":`Prepare the worktree`,"prCheckout.apply":`Apply`,"prCheckout.cancel":`Cancel`,"prCheckout.retry":`Retry`,"prCheckout.diagnoseFailed":`Failed to diagnose the pull request.`,"prCheckout.resolveFailed":`Failed to resolve the pull request checkout.`,"prCheckout.path.required":`Enter a worktree path that does not already exist.`,"prCheckout.workspace.restoreNotAvailable":"Restoring a purged workspace isn't available yet from here. Recreate its worktree folder on disk (e.g. `git worktree add`) and Kōbō will reattach it automatically within about 30 seconds.","prCheckout.staleReloaded":`The repository changed; the diagnosis has been refreshed.`,"prCheckout.step.blocked":`Cannot continue`,"prCheckout.step.path":`Worktree location`,"prCheckout.step.workspace":`Existing workspace`,"prCheckout.step.worktree":`Existing worktree`,"prCheckout.step.operation":`Git operation in progress`,"prCheckout.step.changes":`Uncommitted changes`,"prCheckout.step.divergence":`Local branch vs origin`,"prCheckout.workspace.activeHint":`A workspace named "{name}" already tracks this branch.`,"prCheckout.workspace.open":`Open that workspace`,"prCheckout.workspace.continue":`Continue on another path`,"prCheckout.workspace.unarchive":`Unarchive and open it`,"prCheckout.workspace.restore":`Recreate its worktree`,"prCheckout.worktree.orphanHint":`A worktree already sits on this branch at {path}.`,"prCheckout.worktree.attach":`Attach it`,"prCheckout.worktree.branchInUse":`This branch is already checked out. Attach its existing worktree.`,"prCheckout.worktree.createElsewhere":`Create another one elsewhere`,"prCheckout.operation.hint":`A {operation} is in progress in that worktree.`,"prCheckout.operation.abort":`Abort it`,"prCheckout.operation.cancel":`Leave it alone and stop here`,"prCheckout.changes.hint":`{modified} modified, {staged} staged, {untracked} untracked.`,"prCheckout.changes.stash":`Stash them`,"prCheckout.changes.commit":`Commit them`,"prCheckout.changes.discard":`Discard them (kept as a labelled stash)`,"prCheckout.changes.keepResetConflict":`Keeping local changes is incompatible with a hard reset. Stash or commit them first, or keep the branch.`,"prCheckout.changes.keep":`Keep them as they are`,"prCheckout.divergence.behindHint":`Your branch is {behind} commit(s) behind origin.`,"prCheckout.divergence.aheadHint":`Your branch has {ahead} unpushed commit(s).`,"prCheckout.divergence.divergedHint":`{ahead} ahead, {behind} behind origin.`,"prCheckout.divergence.fastForward":`Fast-forward to origin`,"prCheckout.divergence.rebase":`Rebase onto origin`,"prCheckout.divergence.resetHard":`Reset to origin (a backup branch is created first)`,"prCheckout.divergence.keep":`Keep the local state`,"prCheckout.blocked.forgeUnavailable":`The forge CLI is missing or not authenticated.`,"prCheckout.blocked.forkPr":`This PR comes from a fork; Kōbō cannot check it out.`,"prCheckout.blocked.headBranchDeleted":`The branch no longer exists on the remote.`,"prCheckout.blocked.indexLock":`Another git process is running (index.lock is present).`,"prCheckout.blocked.pathOccupied":`{path} already exists and is not a worktree.`,"prCheckout.blocked.worktreeOtherBranch":`{path} is a worktree on another branch ({branch}).`,"prCheckout.blocked.noCommonAncestor":`A local branch named {branch} exists with unrelated history.`,"split.title":`Double workspace`,"split.open":`Open side by side`,"split.openBeside":`Open beside`,"split.close":`Close split view`,"split.left":`Left workspace`,"split.right":`Right workspace`,"split.choose":`Choose a workspace`,"split.recipient":`Send to: {name}`,"absence.title":`Since your last visit`,"settings.activityDigestHint":`Show a summary of events that occurred while you were away. Turning this off hides the entry and stops collecting new events without deleting existing history.`,"absence.pending":`Changes to review`,"absence.retention":`Significant activity from the last 30 days, recorded since this feature was installed. Visit tracking is local to this browser.`,"absence.since":`Since {date}`,"absence.error":`Unable to load activity.`,"absence.retry":`Retry`,"absence.empty":`No new activity.`,"absence.more":`Load more`,"absence.markRead":`Mark displayed events as read`,"absence.kind.question":`Question asked`,"absence.kind.permission":`Approval requested`,"absence.kind.completed":`Session completed`,"absence.kind.error":`Agent error`,"absence.kind.pr-merged":`PR merged`,"absence.kind.pr-approved":`PR approved`,"absence.kind.pr-changes-requested":`Changes requested`,"absence.kind.pr-ci-failed":`CI failed`,"absence.kind.pr-ci-recovered":`CI recovered`,"absence.kind.pr-merge-conflict":`Merge conflict`,"absence.kind.pr-ready-to-merge":`PR ready to merge`,"absence.kind.archived":`Workspace archived`,"absence.kind.purged":`Worktree purged`,"absence.kind.restored":`Worktree restored`,"tours.split.controls.title":`Two independent workspaces`,"tours.split.controls.description":`Choose one workspace per pane. Resize the divider; each conversation keeps its own recipient and panels.`,"tours.home.sort.title":`Sort workspaces`,"tours.home.sort.description":`Choose the order and direction within each group. Your choice is remembered.`,"tours.home.activity.title":`Review activity after an absence`,"tours.home.activity.description":`At the bottom of the left drawer, find questions, session endings, errors and PR changes since your last visit.`},Hc=`modulepreload`,Uc=function(e){return`/`+e},Wc={},Gc=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Uc(t,n),t=s(t),t in Wc)return;Wc[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Hc,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Kc=`kobo:locale`,qc=[`en`,`fr`,`de`,`es`,`it`];function Jc(e){return qc.includes(e)}function Yc(){let e=localStorage.getItem(Kc);if(e&&Jc(e))return e;let t=navigator.language.split(`-`)[0];return t&&Jc(t)?(localStorage.setItem(Kc,t),t):(localStorage.setItem(Kc,`en`),`en`)}var Xc=Yc(),Zc=zo({legacy:!1,locale:Xc,fallbackLocale:`en`,messages:{en:Vc}}),Qc=new Set([`en`]),$c={fr:()=>Gc(()=>import(`./fr-C7HCclxj.js`),[]),de:()=>Gc(()=>import(`./de-CTE3Xb7Z.js`),[]),es:()=>Gc(()=>import(`./es-CZxg1xjh.js`),[]),it:()=>Gc(()=>import(`./it-DoOWwqZz.js`),[])},el=0;async function tl(e){let t=++el;if(!Qc.has(e)&&e!==`en`){let t=await $c[e]();Zc.global.setLocaleMessage(e,t.default),Qc.add(e)}t===el&&(Zc.global.locale.value=e,nl(e))}function nl(e){typeof document<`u`&&(document.documentElement.lang=e)}nl(Xc);var rl=class{constructor(){Un(this,`pending`,new Map)}wait(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>o(Error(n)),3e4),o=e=>{clearTimeout(a),this.pending.delete(t),e?i(e):r()};this.pending.set(t,{workspaceId:e,finish:o})})}settle(e,t,n){let r=this.pending.get(t);r?.workspaceId===e&&r.finish(n)}disconnect(e){for(let t of this.pending.values())t.finish(Error(e))}},il=new Map,al=d(0);function ol(){al.value++}function sl(e){e.reconnectTimer&&=(clearTimeout(e.reconnectTimer),void 0)}function cl(e){let t=il.get(e);t&&(sl(t),t.ws&&(t.ws.onclose=null,t.ws.readyState===WebSocket.OPEN&&t.ws.close()),t.onDataDisposable?.dispose(),t.terminal.dispose(),il.delete(e),ol())}var ll=5e3,ul=Be(`agent-stream`,()=>{let e=t(new Map),n=t(new Map),r=t(new Map),i=t(new Map),a=t(new Map),o=t(new Map),s=t(new Map),c=t(new Map),l=d(new Map),u=t(new Map);function f(e,t){p(e);let n=0;for(let[r,i]of u.value.get(e)??[])t(r)&&(n+=i);return n}function p(e){l.value.get(e)}function m(e){l.value.set(e,(l.value.get(e)??0)+1)}function h(e){return l.value.get(e)??0}function g(e){let t=c.value.get(e);return t||(t=new Set,c.value.set(e,t)),t}function _(e){return p(e),s.value.get(e)??!1}function v(e,t){(s.value.get(e)??!1)!==t&&(s.value.set(e,t),m(e))}function y(t){return p(t),e.value.get(t)??[]}function b(e){return p(e),n.value.get(e)??[]}function x(e){return p(e),r.value.get(e)??[]}function S(e){return p(e),i.value.get(e)??[]}function C(e){return p(e),a.value.get(e)}function w(e){return p(e),o.value.get(e)??!0}function T(t,o,s,c,l,d=!0){let f=e.value.get(t)??[],p=n.value.get(t)??[],h=r.value.get(t)??[],_=i.value.get(t)??[],v=g(t);if(c&&v.has(c))return;if(d){let e=u.value.get(t)??new Map;e.set(l??null,(e.get(l??null)??0)+1),u.value.set(t,e)}let y=f.length===0;f.push(o),p.push(s??new Date().toISOString()),h.push(l??null),_.push(c??null),c&&v.add(c),e.value.set(t,f),n.value.set(t,p),r.value.set(t,h),i.value.set(t,_),y&&c&&a.value.set(t,c),E(t,f,p,h,_),m(t)}function E(e,t,n,r,i){let s=t.length-ll;if(s<=0)return;let c=s+500-1,l=i.slice(0,c),u=g(e);for(let e of l)e&&u.delete(e);t.splice(0,c),n.splice(0,c),r.splice(0,c),i.splice(0,c);let d=i.find(e=>typeof e==`string`);d?a.value.set(e,d):a.value.delete(e),o.value.set(e,!0)}function D(t,o,s,c){let l=e.value.get(t)??[],u=n.value.get(t)??[],d=r.value.get(t)??[],f=i.value.get(t)??[],p=g(t),h=[];for(let e=0;e<o.length;e++){let t=o[e];if(!t)continue;let n=c.eventIds[e]??null;n&&p.has(n)||(l.push(t),u.push(s[e]??new Date().toISOString()),d.push(c.sessionIds[e]??null),f.push(n),n&&p.add(n),h.push(e))}if(h.length===0)return h;if(e.value.set(t,l),n.value.set(t,u),r.value.set(t,d),i.value.set(t,f),!a.value.has(t)){let e=f.find(e=>typeof e==`string`);e&&a.value.set(t,e)}return E(t,l,u,d,f),m(t),h}function O(t,s,c,l){let u=[...s],d=c?[...c]:s.map(()=>new Date().toISOString()),f=l?.sessionIds?[...l.sessionIds]:s.map(()=>null),p=l?.eventIds?[...l.eventIds]:s.map(()=>null);e.value.set(t,u),n.value.set(t,d),r.value.set(t,f),i.value.set(t,p);let h=g(t);h.clear();for(let e of p)e&&h.add(e);l?.oldestId?a.value.set(t,l.oldestId):a.value.delete(t),l&&typeof l.hasMoreOlder==`boolean`?o.value.set(t,l.hasMoreOlder):o.value.delete(t),E(t,u,d,f,p),m(t)}function k(t,s,c,l){if(s.length===0){o.value.set(t,l.hasMoreOlder),m(t);return}let u=e.value.get(t)??[],d=n.value.get(t)??[],f=r.value.get(t)??[],p=i.value.get(t)??[],h=l.sessionIds??s.map(()=>null),_=l.eventIds??s.map(()=>null);e.value.set(t,[...s,...u]),n.value.set(t,[...c,...d]),r.value.set(t,[...h,...f]),i.value.set(t,[..._,...p]);let v=g(t);for(let e of _)e&&v.add(e);l.oldestId&&a.value.set(t,l.oldestId),o.value.set(t,l.hasMoreOlder),m(t)}function A(t,a){let o=e.value.get(t),s=i.value.get(t);if(!o||!s)return;let c=s.indexOf(a);if(c===-1)return;let l=n.value.get(t),u=r.value.get(t);o.splice(c,1),s.splice(c,1),l&&l.splice(c,1),u&&u.splice(c,1),g(t).delete(a),m(t)}function j(t){e.value.delete(t),n.value.delete(t),r.value.delete(t),i.value.delete(t),a.value.delete(t),o.value.delete(t),s.value.delete(t),c.value.delete(t),u.value.delete(t),m(t)}return{events:e,timestamps:n,sessionIds:r,eventIds:i,versions:l,versionFor:h,liveAppendCountFor:f,eventsFor:y,timestampsFor:b,sessionIdsFor:x,eventIdsFor:S,oldestIdFor:C,hasMoreOlderFor:w,isCompacting:_,setCompacting:v,append:T,merge:D,reset:O,prepend:k,removeByEventId:A,clear:j}}),dl=class extends Error{constructor(e,t,n,r){super(e),Un(this,`status`,void 0),Un(this,`code`,void 0),Un(this,`body`,void 0),this.name=`ApiError`,this.status=t,this.code=n,this.body=r}},fl=class extends Error{constructor(e){super(`Request timed out after ${e} ms`),Un(this,`timeoutMs`,void 0),this.name=`ApiTimeoutError`,this.timeoutMs=e}},pl=3e4;function ml(e,t){let n=e.trim();if(n.length===0)return{message:`HTTP ${t}`,code:void 0};try{let e=JSON.parse(n),r=typeof e.code==`string`?e.code:void 0;return typeof e.error==`string`&&e.error.length>0?{message:e.error,code:r}:typeof e.message==`string`&&e.message.length>0?{message:e.message,code:r}:{message:`HTTP ${t}`,code:r}}catch{return{message:n.slice(0,500),code:void 0}}}async function X(e,t={}){let{body:n,timeoutMs:r=pl,signal:i,headers:a,...o}=t;if(i?.aborted)throw i.reason??new DOMException(`Aborted`,`AbortError`);let s=new AbortController,c=!1,l=r>0?setTimeout(()=>{c=!0,s.abort()},r):null,u=()=>s.abort();i?.addEventListener(`abort`,u);try{let t={...o,signal:s.signal};n===void 0?a&&(t.headers=a):typeof n==`string`||n instanceof FormData||n instanceof Blob?(t.body=n,a&&(t.headers=a)):(t.body=JSON.stringify(n),t.headers={"Content-Type":`application/json`,...a??{}});let r=await fetch(e,t);if(!r.ok){let e=await r.text(),{message:t,code:n}=ml(e,r.status);throw new dl(t,r.status,n,e)}if(r.status===204)return;let i=await r.text();if(i.length===0)return;try{return JSON.parse(i)}catch(e){throw new dl(`Server returned a non-JSON body for a successful response: ${e instanceof Error?e.message:String(e)}`,r.status,void 0,i)}}catch(e){throw c?new fl(r):e}finally{l!==null&&clearTimeout(l),i?.removeEventListener(`abort`,u)}}function hl(e){return!!e&&e.state!==`completed`&&e.state!==`cancelled`}function gl(e){return e.state===`OPEN`&&e.reviewDecision===`CHANGES_REQUESTED`&&e.reviewers.some(e=>e.state===`CHANGES_REQUESTED`)}function _l(e){return e.state===`OPEN`&&e.ci.rollup===`FAILURE`}function vl(e){return e?_l(e)||gl(e):!1}var yl=[`executing`,`extracting`,`brainstorming`,`compacting`];function bl(e){return!!e&&yl.includes(e)}function xl(e,t){return bl(e)&&!t}function Sl(e,t,n){return xl(e,!t||n)}var Cl={created:`workspaceStatus.created`,extracting:`workspaceStatus.extracting`,brainstorming:`workspaceStatus.brainstorming`,executing:`workspaceStatus.executing`,compacting:`workspaceStatus.compacting`,"awaiting-user":`workspaceStatus.awaitingUser`,completed:`workspaceStatus.completed`,idle:`workspaceStatus.idle`,error:`workspaceStatus.error`,quota:`workspaceStatus.quota`};function wl(e){return e?Cl[e]??null:null}async function Tl(e){let t=await e.json().catch(()=>({}));return{ok:!0,branch:t.branch??``,upToDate:t.upToDate===!0}}var El=class extends Error{constructor(e,t,n){super(e),Un(this,`code`,void 0),Un(this,`operation`,void 0),this.name=`WorkspaceActionError`,this.code=t,this.operation=n}};function Dl(e){return e===`running`?`in_progress`:e}var Ol=5e3,kl=500,Al=null,jl=0,Ml=0,Nl=new Map,Pl=new Map,Fl=new Map,Il=new Map,Ll=new Map,Rl=new WeakMap;function zl(e){Pl.set(e,(Pl.get(e)??0)+1)}function Bl(e,t,n){let r={...e},i=new Set([...Object.keys(e),...Object.keys(t)]);for(let a of i){let i=t[a],o=e[a],s=(Pl.get(a)??0)!==(n.get(a)??0),c=i?Date.parse(i.updatedAt):NaN,l=o?Date.parse(o.updatedAt):NaN;(s||Number.isFinite(c)&&c>l)&&(i?r[a]=i:delete r[a])}return r}function Vl(e){return e===`claude-code`?`claude-code`:null}var Z=Be(`workspace`,{state:()=>({workspaces:[],selectedWorkspaceId:null,tasks:[],activityFeeds:{},activityFeedIds:{},activityCounts:{},subagents:{},agentTodos:{},sessions:[],loadingSessions:{},selectedSessionId:null,archivedWorkspaces:[],archivedLoaded:!1,restoringWorktreeIds:[],workspaceLifecycleVersion:0,workspaceLifecycleVersions:{},listRequestVersion:0,archivedListRequestVersion:0,loading:!1,listLoadError:null,listPollFailureStreak:0,activeListLoadFailed:!1,loadingOlderEvents:!1,hasMoreEvents:{},providerUsage:{},chatDraft:``,queuedMessages:{},activeAgentSessionIds:{},settledAgentSessionIds:{},gitRefreshTrigger:0,gitStatsCache:{},pendingWakeups:{},pendingQuotaBackoffs:{},pendingDeferred:{},pendingQueue:{},prSnapshots:{},autoLoopStates:{},autoLoopMessages:{},autoLoopMessageVersions:{},autoLoopSnapshotVersion:0,autoLoopMessageKeys:{},autoLoopQueueTransfers:{},crons:{},creationProgress:null,agentLiveness:{},agentLivenessLoaded:{}}),getters:{selectedWorkspace:e=>e.workspaces.find(t=>t.id===e.selectedWorkspaceId)??e.archivedWorkspaces.find(t=>t.id===e.selectedWorkspaceId)??null,needsAttention(e){return e.workspaces.filter(t=>[`error`,`quota`,`awaiting-user`].includes(t.status)||vl(e.prSnapshots[t.id])||!bl(t.status)&&!!e.prSnapshots[t.id]?.readyToMerge)},running(e){return e.workspaces.filter(t=>bl(t.status)&&!vl(e.prSnapshots[t.id]))},idle(e){return e.workspaces.filter(t=>[`completed`,`idle`,`created`].includes(t.status)&&!vl(e.prSnapshots[t.id])&&!e.prSnapshots[t.id]?.readyToMerge)},favorites(e){return e.workspaces.filter(e=>e.favoritedAt!==null)},currentAgentTodos:e=>e.selectedWorkspaceId?e.agentTodos[e.selectedWorkspaceId]??[]:[],currentSubagents:e=>{if(!e.selectedWorkspaceId)return[];let t=e.subagents[e.selectedWorkspaceId]??{};return Object.values(t).sort((e,t)=>e.startedAt.localeCompare(t.startedAt))},activityFeed:e=>{if(!e.selectedWorkspaceId)return[];let t=e.activityFeeds[e.selectedWorkspaceId]??[];if(!e.selectedSessionId)return e.sessions.length===0?t:[];let n=e.sessions.find(t=>t.id===e.selectedSessionId)?.engineSessionId??null,r=e.sessions.length>0?e.sessions[e.sessions.length-1].id:null,i=e.selectedSessionId===r;return t.filter(t=>t.sessionId?t.sessionId===e.selectedSessionId||n!==null&&t.sessionId===n:i)},acceptanceCriteria:e=>e.tasks.filter(e=>e.isAcceptanceCriterion),archived:e=>e.archivedWorkspaces,currentProviderUsage(e){let t=e.workspaces.find(t=>t.id===e.selectedWorkspaceId);if(!t)return null;let n=Vl(t.engine);return n?e.providerUsage[n]??null:null}},actions:{clearWorkspaceLocalState(e){delete this.activityFeeds[e],delete this.activityFeedIds[e],delete this.activityCounts[e],delete this.subagents[e],delete this.agentTodos[e],delete this.hasMoreEvents[e],delete this.gitStatsCache[e],delete this.pendingWakeups[e],delete this.pendingQuotaBackoffs[e],delete this.pendingDeferred[e],delete this.pendingQueue[e],delete this.prSnapshots[e],delete this.autoLoopStates[e],delete this.autoLoopMessages[e],delete this.autoLoopMessageKeys[e],delete this.crons[e],delete this.activeAgentSessionIds[e];for(let t of Object.keys(this.queuedMessages))t.startsWith(`${e}:`)&&delete this.queuedMessages[t];Nl.delete(e),Pl.delete(e),Fl.delete(e),Il.delete(e),ul().clear(e),localStorage.removeItem(`kobo:session:${e}`)},setCreationProgress(e){this.creationProgress=e},clearCreationProgress(){this.creationProgress=null},async toggleFavorite(e){let t=this.workspaces.find(t=>t.id===e);if(!t)return;let n=t.favoritedAt,r=n===null,i=r?new Date().toISOString():null;this.workspaces=this.workspaces.map(t=>t.id===e?{...t,favoritedAt:i}:t);try{let t=await fetch(`/api/workspaces/${e}/favorite`,{method:r?`POST`:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.workspaces=this.workspaces.map(t=>t.id===e?n:t)}catch(t){throw this.workspaces=this.workspaces.map(t=>t.id===e?{...t,favoritedAt:n}:t),t}},async togglePrWatch(e){let t=this.workspaces.find(t=>t.id===e);if(!t)return;let n=t.prWatchDisabledAt===null,r=n?new Date().toISOString():null;this.workspaces=this.workspaces.map(t=>t.id===e?{...t,prWatchDisabledAt:r}:t);try{let t=await fetch(`/api/workspaces/${e}/pr-watch-disabled`,{method:n?`POST`:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`);if(n){let n=await t.json();this.workspaces=this.workspaces.map(t=>t.id===e?n:t),delete this.prSnapshots[e],zl(e)}else{let{workspace:n,prSnapshot:r}=await t.json();this.workspaces=this.workspaces.map(t=>t.id===e?n:t),r?this.prSnapshots[e]=r:delete this.prSnapshots[e],zl(e)}}catch(n){throw this.workspaces=this.workspaces.map(n=>n.id===e?{...n,prWatchDisabledAt:t.prWatchDisabledAt}:n),n}},async setWorkspaceTags(e,t){let n=this.workspaces.find(t=>t.id===e);if(!n)return;let r=n.tags,i=[...t];this.workspaces=this.workspaces.map(t=>t.id===e?{...t,tags:i}:t);try{let n=await fetch(`/api/workspaces/${e}/tags`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({tags:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();this.workspaces=this.workspaces.map(t=>t.id===e?r:t)}catch(t){throw this.workspaces=this.workspaces.map(t=>t.id===e?{...t,tags:r}:t),t}},async fetchOrphanWorktrees(e){return X(`/api/git/orphan-worktrees?projectPath=${encodeURIComponent(e)}`,{cache:`no-store`})},async fetchWorkspaces(){let e=++this.listRequestVersion,t=new Map(Nl),n=this.workspaceLifecycleVersion;this.loading=!0;try{let r=await X(`/api/workspaces`);if(e!==this.listRequestVersion||n!==this.workspaceLifecycleVersion)return;let i=new Map(this.workspaces.map(e=>[e.id,e]));this.workspaces=(Array.isArray(r)?r:r.workspaces??[]).map(e=>(Nl.get(e.id)??0)===(t.get(e.id)??0)?e:i.get(e.id)??e),this.listLoadError=null,this.activeListLoadFailed=!1,this.listPollFailureStreak=0;for(let e of this.workspaces)ul().setCompacting(e.id,e.status===`compacting`),[`completed`,`idle`,`error`,`quota`].includes(e.status)&&this.finalizeRunningSubagents(e.id)}catch(t){if(e!==this.listRequestVersion||n!==this.workspaceLifecycleVersion)return;this.listLoadError=t instanceof Error?t.message:String(t),this.activeListLoadFailed=!0,console.error(`[workspace store] fetchWorkspaces failed:`,t)}finally{e===this.listRequestVersion&&(this.loading=!1)}},async retryLoadWorkspaces(){await this.fetchWorkspaces(),this.archivedLoaded&&await this.fetchArchivedWorkspaces()},async fetchArchivedWorkspaces(){let e=++this.archivedListRequestVersion,t=new Map(Nl),n=this.workspaceLifecycleVersion;try{let r=await X(`/api/workspaces/archived`);if(e!==this.archivedListRequestVersion||n!==this.workspaceLifecycleVersion)return;let i=new Map(this.archivedWorkspaces.map(e=>[e.id,e]));this.archivedWorkspaces=r.map(e=>(Nl.get(e.id)??0)===(t.get(e.id)??0)?e:i.get(e.id)??e),this.archivedLoaded=!0,this.activeListLoadFailed||(this.listLoadError=null)}catch(t){if(e!==this.archivedListRequestVersion||n!==this.workspaceLifecycleVersion)return;this.listLoadError=t instanceof Error?t.message:String(t),console.error(`[workspace store] fetchArchivedWorkspaces failed:`,t)}},async fetchWorkspaceDetails(e){let t=this.workspaceLifecycleVersions[e]??0,n=(Il.get(e)??0)+1;Il.set(e,n);let r=Nl.get(e)??0;try{let i=await X(`/api/workspaces/${e}`);if(this.selectedWorkspaceId!==e||Il.get(e)!==n)return;if(t===(this.workspaceLifecycleVersions[e]??0)){let t=(Nl.get(e)??0)!==r,n=i.workspace??i,a=t?{}:n;typeof a.status==`string`&&ul().setCompacting(e,a.status===`compacting`);let o=this.workspaces.findIndex(t=>t.id===e);if(o>=0)this.workspaces[o]={...this.workspaces[o],...a};else{let t=this.archivedWorkspaces.findIndex(t=>t.id===e);t>=0?this.archivedWorkspaces[t]={...this.archivedWorkspaces[t],...a}:a?.archivedAt&&this.archivedWorkspaces.unshift(a)}}i.tasks&&(this.tasks=i.tasks),`agentLiveness`in i&&(Nl.get(e)??0)===r&&this.applyAgentLiveness(e,i.agentLiveness)}catch(e){console.error(`[workspace store] fetchWorkspaceDetails failed:`,e)}},applyAgentLiveness(e,t){if(this.agentLivenessLoaded={...this.agentLivenessLoaded,[e]:!0},t){this.agentLiveness={...this.agentLiveness,[e]:t};return}if(e in this.agentLiveness){let t={...this.agentLiveness};delete t[e],this.agentLiveness=t}},async createWorkspace(e,t=[]){try{let n=JSON.stringify(e);if(t.length>0){n=new FormData,n.append(`workspace`,JSON.stringify(e));for(let e of t)n.append(`attachments`,e)}let r=await fetch(`/api/workspaces`,{method:`POST`,...typeof n==`string`?{headers:{"Content-Type":`application/json`}}:{},body:n});if(!r.ok){let e=await r.json().catch(()=>({}));throw new El(typeof e.error==`string`?e.error:`HTTP ${r.status}`,typeof e.step==`string`?e.step:void 0)}let i=r.headers.get(`X-Kobo-Branch-Adjusted`)===`1`,a=r.headers.get(`X-Kobo-Source-Fallback`)===`local`,o=await r.json(),s=o.workspace??o;this.invalidateWorkspaceLifecycleReads(s.id);let c=this.workspaces.findIndex(e=>e.id===s.id);return c>=0?this.workspaces[c]=s:this.workspaces.push(s),e.autoLoop&&this.fetchAutoLoopStates(),s._branchAdjusted=i,s._sourceFallback=a,s}catch(e){throw console.error(`[workspace store] createWorkspace failed:`,e),e}},async startWorkspace(e,t,n,r){try{await X(`/api/workspaces/${e}/start`,{method:`POST`,body:{prompt:t,agentSessionId:n,resume:r}}),await this.fetchWorkspaces()}catch(e){throw console.error(`[workspace store] startWorkspace failed:`,e),e}},async previewEngineHandoff(e,t){let n=await fetch(`/api/workspaces/${e}/engine-handoff-preview`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({engine:t})}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`HTTP ${n.status}`);return r.handoff},async switchEngine(e,t){let n=await fetch(`/api/workspaces/${e}/switch-engine`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`HTTP ${n.status}`);let i=r.workspace,a=this.workspaces.findIndex(t=>t.id===e);return a>=0&&(this.workspaces[a]=i),await this.fetchSessions(e,r.sessionId),{sessionId:r.sessionId}},async stopWorkspace(e){try{let t=await fetch(`/api/workspaces/${e}/stop`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await this.fetchWorkspaces()}catch(e){throw console.error(`[workspace store] stopWorkspace failed:`,e),e}},async interruptAgent(e,t={}){try{let n=await fetch(`/api/workspaces/${e}/interrupt`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>void 0),t=typeof e==`object`&&e&&!Array.isArray(e)?e:void 0,r=typeof t?.error==`string`?t.error:`HTTP ${n.status}`,i=t?.code;throw new El(r,n.status===409&&(i===`no_agent_running`||i===`session_not_active`)||n.status===500&&i===`interrupt_failed`?i:void 0)}}catch(e){throw console.error(`[workspace store] interruptAgent failed:`,e),e}},async deleteWorkspace(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=[];if(n.status===200){let e=await n.json().catch(()=>({}));r=Array.isArray(e.warnings)?e.warnings:[]}return this.workspaces=this.workspaces.filter(t=>t.id!==e),this.archivedWorkspaces=this.archivedWorkspaces.filter(t=>t.id!==e),this.clearWorkspaceLocalState(e),cl(e),this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[]),{warnings:r}}catch(e){throw console.error(`[workspace store] deleteWorkspace failed:`,e),e}},async deleteAllArchived(e){try{let t=this.archivedWorkspaces.map(e=>e.id),n=await fetch(`/api/workspaces/archived`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e??{})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json().catch(()=>({})),i=typeof r.deleted==`number`?r.deleted:0,a=Array.isArray(r.warnings)?r.warnings:[];this.archivedWorkspaces=[];for(let e of t)this.clearWorkspaceLocalState(e),cl(e),this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[]);return{deleted:i,warnings:a,ids:t}}catch(e){throw console.error(`[workspace store] deleteAllArchived failed:`,e),e}},async updateModel(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)}catch(e){throw console.error(`[workspace store] updateModel failed:`,e),e}},async updateWorkspaceDescription(e,t){let n=this.workspaces.findIndex(t=>t.id===e);if(n<0)throw Error(`Workspace '${e}' not found in store`);let r=this.workspaces[n].description;this.workspaces[n]={...this.workspaces[n],description:t};try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({description:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json();this.workspaces=this.workspaces.map(t=>t.id===e?{...t,...r}:t)}catch(n){let i=this.workspaces.findIndex(t=>t.id===e);throw i>=0&&this.workspaces[i].description===t&&(this.workspaces[i]={...this.workspaces[i],description:r}),n}},async updateReasoningEffort(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({reasoningEffort:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)}catch(e){throw console.error(`[workspace store] updateReasoningEffort failed:`,e),e}},async renameWorkspaceBranch(e,t){let n=await fetch(`/api/workspaces/${e}/rename-branch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({newName:t})}),r=await n.json().catch(()=>null);if(!n.ok)throw new El(r?.error??`Rename failed`,r?.code);let i=r,a=this.workspaces.findIndex(t=>t.id===e);return a>=0&&(this.workspaces[a]=i),i},async resyncWorkspaceBranch(e){let t=await fetch(`/api/workspaces/${e}/resync-branch`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();if(n.changed){let t=this.workspaces.findIndex(t=>t.id===e);t>=0&&(this.workspaces[t]={...this.workspaces[t],workingBranch:n.workingBranch})}return n},async updateAgentPermissionMode(e,t){try{let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({agentPermissionMode:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)}catch(e){throw console.error(`[workspace store] updateAgentPermissionMode failed:`,e),e}},async updateWorkflowPolicy(e,t){let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({workflowPolicy:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw new El(e.error??`HTTP ${n.status}`,e.code)}let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]=r)},async pushBranch(e,t={}){let n=await fetch(`/api/workspaces/${e}/push`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({force:t.force===!0})});if(!n.ok){let e=await n.json().catch(()=>({error:`Push failed`}));throw new El(e.error??`Push failed`,e.code,e.operation)}return Tl(n)},async forcePushBranch(e){let t=await fetch(`/api/workspaces/${e}/force-push`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({error:`Push failed`}));throw new El(e.error??`Push failed`,e.code,e.operation)}return Tl(t)},async fetchGitStats(e,t={}){let n=await X(`/api/workspaces/${e}/git-stats${t.freshFetch?`?freshFetch=1`:``}`,{signal:t.signal,timeoutMs:6e4});return this.gitStatsCache[e]=n,n},async fetchBranchDivergence(e,t={}){let n=`/api/workspaces/${e}/branch-divergence?limit=${t.limit??50}`,r=await fetch(n,{signal:t.signal});if(!r.ok)throw Error(`HTTP ${r.status}`);return await r.json()},async openPullRequest(e){let t=await fetch(`/api/workspaces/${e}/open-pr`,{method:`POST`}),n=await t.json().catch(()=>null);if(!t.ok)throw new El(n?.error??`Open PR failed`,n?.code);return n},async archiveWorkspace(e){try{let t=await fetch(`/api/workspaces/${e}/archive`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();return this.workspaces=this.workspaces.filter(t=>t.id!==e),this.archivedLoaded&&this.archivedWorkspaces.unshift(n),this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[]),n}catch(e){throw console.error(`[workspace store] archiveWorkspace failed:`,e),e}},invalidateWorkspaceLifecycleReads(e){this.workspaceLifecycleVersion+=1,e&&(this.workspaceLifecycleVersions[e]=(this.workspaceLifecycleVersions[e]??0)+1)},applyRestoredWorkspace(e){this.invalidateWorkspaceLifecycleReads(e.id);let t=this.workspaces.findIndex(t=>t.id===e.id);t===-1?this.workspaces.unshift(e):this.workspaces[t]=e,this.archivedWorkspaces=this.archivedWorkspaces.filter(t=>t.id!==e.id)},restoreWorktree(e){let t=Rl.get(this);t||(t=new Map,Rl.set(this,t));let n=t.get(e);if(n)return n;let r=this.workspaceLifecycleVersions[e]??0;this.restoringWorktreeIds.push(e);let i=(async()=>{try{let t=await fetch(`/api/workspaces/${e}/restore-worktree`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({}));throw new El(e.error??`HTTP ${t.status}`,e.code)}let{workspace:n}=await t.json();return r===(this.workspaceLifecycleVersions[e]??0)&&this.applyRestoredWorkspace(n),n}finally{this.restoringWorktreeIds=this.restoringWorktreeIds.filter(t=>t!==e),t.delete(e)}})();return t.set(e,i),i},async unarchiveWorkspace(e){try{let t=await fetch(`/api/workspaces/${e}/unarchive`,{method:`POST`});if(!t.ok){if(t.status===409){let e=await t.json().catch(()=>({})),n=Error(e.error??`worktree-purged`);throw n.code=`worktree-purged`,n}throw Error(`HTTP ${t.status}`)}let n=await t.json();return this.archivedWorkspaces=this.archivedWorkspaces.filter(t=>t.id!==e),this.workspaces.unshift(n),n}catch(e){throw console.error(`[workspace store] unarchiveWorkspace failed:`,e),e}},async createTask(e,t,n){try{let r=await fetch(`/api/workspaces/${e}/tasks`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:t,isAcceptanceCriterion:n})});if(!r.ok)throw Error(`HTTP ${r.status}`);await this.fetchWorkspaceDetails(e)}catch(e){throw console.error(`[workspace store] createTask failed:`,e),e}},async updateTaskTitle(e,t,n){try{let r=await fetch(`/api/workspaces/${e}/tasks/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:n})});if(!r.ok)throw Error(`HTTP ${r.status}`);await this.fetchWorkspaceDetails(e)}catch(e){throw console.error(`[workspace store] updateTaskTitle failed:`,e),e}},async deleteTask(e,t){try{let n=await fetch(`/api/workspaces/${e}/tasks/${t}`,{method:`DELETE`});if(!n.ok)throw Error(`HTTP ${n.status}`);await this.fetchWorkspaceDetails(e)}catch(e){throw console.error(`[workspace store] deleteTask failed:`,e),e}},selectWorkspace(e){this.selectedWorkspaceId=e,this.selectedSessionId=null,this.sessions=[],this.tasks=[],this.markRead(e),this.fetchWorkspaceDetails(e),this.fetchSessions(e),this.fetchPendingQuotaBackoff(e),this.fetchGitStats(e).catch(()=>{}),this.activityFeeds[e]?.length||Md().subscribe(e)},async fetchSessions(e,t){let n=(Fl.get(e)??0)+1;Fl.set(e,n),this.loadingSessions[e]=!0;try{let r=await fetch(`/api/workspaces/${e}/sessions`);if(!r.ok)throw Error(`HTTP ${r.status}`);let i=await r.json();if(this.selectedWorkspaceId!==e||Fl.get(e)!==n)return;if(this.sessions=i,t===null){this.selectSession(null);return}if(t&&this.sessions.some(e=>e.id===t)){this.selectSession(t);return}let a=this.selectedSessionId&&this.sessions.some(e=>e.id===this.selectedSessionId);if(this.sessions.length>0&&!a){let t=localStorage.getItem(`kobo:session:${e}`),n=this.sessions.filter(e=>(e.activationOrder??0)>=0),r=t?n.find(e=>e.id===t):null;this.selectSession(r?.id??n[0]?.id??null)}}catch(e){console.error(`[workspace store] fetchSessions failed:`,e)}finally{Fl.get(e)===n&&delete this.loadingSessions[e]}},async fetchOlderEvents(e){if(this.loadingOlderEvents||this.hasMoreEvents[e]===!1)return!1;let t=this.activityFeeds[e];if(!t?.length)return!1;let n=t[0].id;this.loadingOlderEvents=!0;try{let t=await fetch(`/api/workspaces/${e}/events?before=${encodeURIComponent(n)}&limit=100`);if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(this.hasMoreEvents[e]=r.hasMore,r.events.length>0){let e=Md();for(let t of r.events)e._routeMessage(t)}return r.events.length>0}catch(e){return console.error(`[workspace store] fetchOlderEvents failed:`,e),!1}finally{this.loadingOlderEvents=!1}},selectSession(e){if(this.selectedSessionId=e,this.selectedWorkspaceId){let t=`kobo:session:${this.selectedWorkspaceId}`;e===null?localStorage.removeItem(t):localStorage.setItem(t,e)}},async createSession(e){try{let t=await fetch(`/api/workspaces/${e}/sessions`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}let n=await t.json();return this.selectedWorkspaceId===e&&(this.sessions.unshift(n),this.selectSession(n.id)),n}catch(e){throw console.error(`[workspace store] createSession failed:`,e),e}},async renameWorkspace(e,t){let n=await fetch(`/api/workspaces/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:t})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json(),i=this.workspaces.findIndex(t=>t.id===e);i>=0&&(this.workspaces[i]={...this.workspaces[i],...r});let a=this.archivedWorkspaces.findIndex(t=>t.id===e);a>=0&&(this.archivedWorkspaces[a]={...this.archivedWorkspaces[a],...r})},async renameSession(e,t,n){let r=await fetch(`/api/workspaces/${e}/sessions/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:n})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error??`HTTP ${r.status}`)}let i=await r.json().catch(()=>null),a=this.sessions.find(e=>e.id===t);a&&(a.name=i?.name??n)},async deleteSession(e,t){let n=await fetch(`/api/workspaces/${e}/sessions/${t}`,{method:`DELETE`}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`HTTP ${n.status}`);let i=this.selectedSessionId===t,a=r.workspace;if(a){let t=this.workspaces.findIndex(t=>t.id===e);t>=0&&(this.workspaces[t]=a)}await this.fetchSessions(e),i&&this.selectedWorkspaceId===e&&this.selectSession(this.sessions[0]?.id??null)},addActivityItem(e,t){if(this.activityFeeds[e]||(this.activityFeeds[e]=[]),this.activityFeedIds[e]||(this.activityFeedIds[e]=new Set),this.activityCounts[e]||(this.activityCounts[e]={toolUses:0,agentMessages:0,userMessages:0,errors:0}),t.meta?.sender!==`user`&&t.meta?.sender!==`system-prompt`)for(let t of this.activityFeeds[e])t.meta?.pending&&(t.meta.pending=!1);if(!this.activityFeedIds[e].has(t.id)){this.activityFeedIds[e].add(t.id),this.activityFeeds[e].push(t);let n=this.activityCounts[e];t.type===`tool_use`?n.toolUses++:t.type===`error`&&n.errors++,t.meta?.sender===`user`?n.userMessages++:t.type===`text`&&t.meta?.sender!==`system-prompt`&&n.agentMessages++}let n=this.activityFeeds[e];if(n.length>Ol){let t=n.splice(0,n.length-Ol),r=this.activityFeedIds[e];for(let e of t)r.delete(e.id)}},removeActivityItem(e,t){let n=this.activityFeeds[e],r=this.activityFeedIds[e];if(!n||!r)return;let i=n.findIndex(e=>e.id===t);if(i<0)return;let[a]=n.splice(i,1);r.delete(t);let o=this.activityCounts[e];o&&a&&(a.type===`tool_use`?o.toolUses=Math.max(0,o.toolUses-1):a.type===`error`&&(o.errors=Math.max(0,o.errors-1)),a.meta?.sender===`user`?o.userMessages=Math.max(0,o.userMessages-1):a.type===`text`&&a.meta?.sender!==`system-prompt`&&(o.agentMessages=Math.max(0,o.agentMessages-1)))},clearActivityFeed(e){e?(delete this.activityFeeds[e],delete this.activityFeedIds[e],delete this.activityCounts[e]):(this.activityFeeds={},this.activityFeedIds={},this.activityCounts={})},applyUsageSnapshot(e){this.providerUsage[e.providerId]=e.snapshot},async requestUsageRefresh(e){try{await fetch(`/api/usage/${e}/refresh`,{method:`POST`})}catch(e){console.error(`[workspace store] requestUsageRefresh failed:`,e)}},triggerGitRefresh(){this.gitRefreshTrigger++,this.schedulePrSnapshotsRefresh()},schedulePrSnapshotsRefresh(){Al!==null&&clearTimeout(Al),Al=setTimeout(()=>{Al=null,this.fetchPrSnapshots()},kl)},async fetchPrSnapshots(){let e=++Ml,t=new Map(Pl);try{let n=await fetch(`/api/workspaces/pr-states`,{cache:`no-store`});if(!n.ok)return;let r=await n.json();if(e!==Ml)return;this.prSnapshots=Bl(r,this.prSnapshots,t)}catch(e){console.error(`[workspace-store] fetchPrSnapshots failed:`,e)}},async fetchWorkspacesInfo(){let e=this.workspaceLifecycleVersion,t=++jl,n=new Map(Nl),r=new Map(Pl),i=new Map(Ll);try{let a=await X(`/api/workspaces/info`,{cache:`no-store`});if(this.listPollFailureStreak=0,this.activeListLoadFailed=!1,this.listLoadError=null,t!==jl||e!==this.workspaceLifecycleVersion)return;if(this.agentLiveness=a.agentLiveness??{},a.pendingInputs)for(let e of a.workspaces){if((Ll.get(e.id)??0)!==(i.get(e.id)??0))continue;let t=this.pendingQueue[e.id]??[],n=new Map(t.map(e=>[e.toolCallId,e])),r=(a.pendingInputs[e.id]??[]).map(e=>{let t=n.get(e.toolCallId);return t&&Ht.deepEqual(t,e)?t:e});if(!(r.length===t.length&&r.every((e,n)=>e===t[n]))){this.clearAllPending(e.id);for(let t of r)this.enqueuePending(e.id,t)}}let o={...this.agentLivenessLoaded};for(let e of a.workspaces)o[e.id]=!0;this.agentLivenessLoaded=o;let s=new Map(this.workspaces.map(e=>[e.id,e]));this.workspaces=a.workspaces.map(e=>{let t=s.get(e.id),r=(Nl.get(e.id)??0)!==(n.get(e.id)??0);return t&&r?{...e,...t}:e});for(let e of this.workspaces)ul().setCompacting(e.id,e.status===`compacting`),[`completed`,`idle`,`error`,`quota`].includes(e.status)&&this.finalizeRunningSubagents(e.id);this.prSnapshots=Bl(a.prSnapshots,this.prSnapshots,r);let c={...this.gitStatsCache};for(let[e,t]of Object.entries(a.gitStats)){let n=c[e];(!n||(t.computedAt??0)>=(n.computedAt??0))&&(c[e]=t)}this.gitStatsCache=c}catch(e){console.error(`[workspace-store] fetchWorkspacesInfo failed:`,e),this.listPollFailureStreak+=1,this.listPollFailureStreak>=2&&(this.activeListLoadFailed=!0,this.listLoadError=e instanceof Error?e.message:String(e))}},async refreshPrSnapshot(e){try{let t=await fetch(`/api/workspaces/pr-snapshot/refresh/${e}`,{method:`POST`});if(t.status===404){let t={...this.prSnapshots};return delete t[e],this.prSnapshots=t,zl(e),null}if(!t.ok)return console.error(`[workspace-store] refreshPrSnapshot non-OK:`,t.status),null;let n=await t.json();return this.prSnapshots={...this.prSnapshots,[e]:n.snapshot},zl(e),n.snapshot}catch(e){return console.error(`[workspace-store] refreshPrSnapshot failed:`,e),null}},async fetchAutoLoopStates(){let e=++this.autoLoopSnapshotVersion;try{let t=await fetch(`/api/workspaces/auto-loop-states`,{cache:`no-store`});if(!t.ok)return;let n=await t.json();e===this.autoLoopSnapshotVersion&&(this.autoLoopStates=n)}catch(e){console.error(`[workspace-store] fetchAutoLoopStates failed:`,e)}},async fetchAutoLoopMessages(e){let t=(this.autoLoopMessageVersions[e]??0)+1;this.autoLoopMessageVersions[e]=t;let n=await fetch(`/api/workspaces/${e}/auto-loop/messages`,{cache:`no-store`});if(n.ok){let r=await n.json();this.autoLoopMessageVersions[e]===t&&(this.autoLoopMessages[e]=r)}},async queueAutoLoopMessage(e,t){let n=this.autoLoopMessageKeys[e];(!n||n.content!==t)&&(n={content:t,id:Array.from(crypto.getRandomValues(new Uint32Array(4)),e=>e.toString(16)).join(`-`)},this.autoLoopMessageKeys[e]=n);let r=await fetch(`/api/workspaces/${e}/auto-loop/messages`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:t,clientMessageId:n.id})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error??`HTTP ${r.status}`)}delete this.autoLoopMessageKeys[e],await this.fetchAutoLoopMessages(e).catch(()=>{})},async resolveAutoLoopMessage(e,t,n){let r=await fetch(`/api/workspaces/${e}/auto-loop/messages/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:n})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error??`HTTP ${r.status}`)}await this.fetchAutoLoopMessages(e)},async enableAutoLoop(e){let t=await fetch(`/api/workspaces/${e}/auto-loop`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}await this.fetchAutoLoopStates()},async disableAutoLoop(e){let t=await fetch(`/api/workspaces/${e}/auto-loop`,{method:`DELETE`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}await this.fetchAutoLoopStates()},async forceAutoLoopReady(e){let t=await fetch(`/api/workspaces/${e}/auto-loop-ready`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await this.fetchAutoLoopStates()},setAutoLoopState(e,t){this.autoLoopStates[e]=t},clearAutoLoopState(e){delete this.autoLoopStates[e],delete this.autoLoopMessages[e],delete this.autoLoopMessageKeys[e]},async fetchCrons(e){try{let t=await fetch(`/api/workspaces/${e}/crons`);if(!t.ok)return;let n=await t.json();this.crons[e]=n.crons}catch(e){console.error(`[workspace-store] fetchCrons failed:`,e)}},async cancelCron(e,t){let n=this.crons[e]??[];this.crons[e]=n.filter(e=>e.id!==t);try{let n=await fetch(`/api/workspaces/${e}/crons/${t}`,{method:`DELETE`});if(!n.ok)throw Error(`HTTP ${n.status}`)}catch(t){throw this.crons[e]=n,t}},async createCron(e,t){let n=await fetch(`/api/workspaces/${e}/crons`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}await this.fetchCrons(e)},async scheduleManualWakeup(e,t){let n=await fetch(`/api/workspaces/${e}/pending-wakeup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}let r=await n.json();r.pending&&(this.pendingWakeups[e]=r.pending)},async fetchPendingWakeup(e){try{let t=await fetch(`/api/workspaces/${e}/pending-wakeup`,{cache:`no-store`});if(!t.ok)return;let n=await t.json();n?this.pendingWakeups[e]=n:delete this.pendingWakeups[e]}catch(e){console.error(`[workspace-store] fetchPendingWakeup failed:`,e)}},setPendingWakeup(e,t){this.pendingWakeups[e]=t},clearPendingWakeup(e){delete this.pendingWakeups[e]},async cancelPendingWakeup(e){let t=this.pendingWakeups[e]!==void 0;delete this.pendingWakeups[e];try{let t=await fetch(`/api/workspaces/${e}/pending-wakeup`,{method:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`)}catch(n){console.error(`[workspace-store] cancelPendingWakeup failed:`,n),t&&await this.fetchPendingWakeup(e)}},async fetchPendingQuotaBackoff(e){try{let t=await fetch(`/api/workspaces/${e}/quota-backoff`,{cache:`no-store`});if(!t.ok)return;let n=await t.json();n?this.pendingQuotaBackoffs[e]={...n,reason:n.reason===`transient`?`transient`:`quota`}:delete this.pendingQuotaBackoffs[e]}catch(e){console.error(`[workspace-store] fetchPendingQuotaBackoff failed:`,e)}},setPendingQuotaBackoff(e,t){this.pendingQuotaBackoffs[e]=t},clearPendingQuotaBackoff(e){delete this.pendingQuotaBackoffs[e]},async cancelQuotaBackoff(e){let t=this.pendingQuotaBackoffs[e]!==void 0;delete this.pendingQuotaBackoffs[e];try{let t=await fetch(`/api/workspaces/${e}/quota-backoff`,{method:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`)}catch(n){console.error(`[workspace-store] cancelQuotaBackoff failed:`,n),t&&await this.fetchPendingQuotaBackoff(e)}},async resumeQuotaBackoffNow(e){await this.fetchSessions(e);let t=this.sessions[0];t&&(t.status===`completed`||t.status===`error`)?await this.startWorkspace(e,void 0,t.id,!0):await this.startWorkspace(e)},enqueuePending(e,t){Ll.set(e,(Ll.get(e)??0)+1);let n=this.pendingQueue[e]??[];n.some(e=>e.toolCallId===t.toolCallId)||(n.push(t),this.pendingQueue[e]=n,t.kind===`question`&&(this.pendingDeferred[e]={toolCallId:t.toolCallId,toolName:t.toolName,input:t.input,agentSessionId:t.agentSessionId}))},peekPending(e){return this.pendingQueue[e]?.[0]},dequeuePending(e){Ll.set(e,(Ll.get(e)??0)+1);let t=this.pendingQueue[e];if(!t||t.length===0)return;let n=t.shift();t.length===0&&delete this.pendingQueue[e];let r=this.pendingQueue[e]?.[0];return r&&r.kind===`question`?this.pendingDeferred[e]={toolCallId:r.toolCallId,toolName:r.toolName,input:r.input,agentSessionId:r.agentSessionId}:delete this.pendingDeferred[e],n},clearPendingForSession(e,t){if(Ll.set(e,(Ll.get(e)??0)+1),t===null)return;let n=this.pendingQueue[e];if(!n)return;let r=n.filter(e=>e.agentSessionId!==t);r.length===0?delete this.pendingQueue[e]:this.pendingQueue[e]=r;let i=this.pendingDeferred[e];i&&i.agentSessionId===t&&delete this.pendingDeferred[e]},clearAllPending(e){Ll.set(e,(Ll.get(e)??0)+1),delete this.pendingQueue[e],delete this.pendingDeferred[e]},setPendingDeferred(e,t){this.enqueuePending(e,{kind:`question`,agentSessionId:t.agentSessionId,toolCallId:t.toolCallId,toolName:t.toolName,input:t.input})},clearPendingDeferred(e,t=null){if(t===null){this.clearAllPending(e);return}this.clearPendingForSession(e,t)},getPendingDeferred(e){let t=this.peekPending(e);if(t?.kind===`question`)return{toolCallId:t.toolCallId,toolName:t.toolName,input:t.input,agentSessionId:t.agentSessionId}},async submitDeferredAnswer(e,t,n,r,i){let a=await fetch(`/api/workspaces/${e}/deferred-tool-use/answer`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({answers:t,toolCallId:n,awaitingFreeForm:r,response:i})});if(!a.ok){let t=(await a.json().catch(()=>({}))).error??`HTTP ${a.status}`;if(/no deferred tool use pending|no agent running|no active engine process|no pending callback/i.test(t)){console.warn(`[workspace] submitDeferredAnswer: deferred callback expired — clearing zombie panel locally`),this.dequeuePending(e),this.fetchWorkspaces();return}throw Error(t)}this.dequeuePending(e),this.fetchWorkspaces()},async cancelDeferredAnswer(e,t,n){let r=await fetch(`/api/workspaces/${e}/deferred-tool-use/cancel`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({reason:t,toolCallId:n})});if(!r.ok){let t=(await r.json().catch(()=>({}))).error??`HTTP ${r.status}`;if(/no deferred tool use pending/i.test(t)){console.warn(`[workspace] cancelDeferredAnswer: backend has no pending — clearing zombie panel locally`),this.dequeuePending(e),this.fetchWorkspaces();return}throw Error(t)}this.dequeuePending(e),this.fetchWorkspaces()},async submitDeferredPermission(e,t,n,r,i=`once`){let a=await fetch(`/api/workspaces/${e}/deferred-permission/decision`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({toolCallId:t,decision:n,reason:r,scope:i})});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.error??`HTTP ${a.status}`)}this.dequeuePending(e),this.fetchWorkspaces()},updateAgentTodos(e,t){this.agentTodos[e]=t},agentTaskCreate(e,t,n){let r=this.agentTodos[e]?[...this.agentTodos[e]]:[];r.some(e=>e.id===t)||(r.push({id:t,content:n.subject||n.description||``,status:`pending`,activeForm:n.activeForm}),this.agentTodos[e]=r)},agentTaskSetNumber(e,t,n){let r=this.agentTodos[e];r&&(this.agentTodos[e]=r.map(e=>e.id===t?{...e,taskNumber:n}:e))},agentTaskUpdate(e,t,n){let r=this.agentTodos[e];if(r){if(n.status===`deleted`){this.agentTodos[e]=r.filter(e=>e.taskNumber!==t);return}this.agentTodos[e]=r.map(e=>e.taskNumber===t?{...e,status:n.status?Dl(n.status):e.status,content:n.content??e.content,activeForm:n.activeForm??e.activeForm}:e)}},finalizeRunningSubagents(e){let t=this.subagents[e];if(!t)return;let n=new Date().toISOString();for(let e of Object.keys(t)){let r=t[e];r.status===`running`&&(t[e]={...r,status:`done`,updatedAt:n})}},upsertSubagent(e,t){this.subagents[e]||(this.subagents[e]={});let n=this.subagents[e][t.toolUseId],r=new Date().toISOString(),i=n?.status===`done`?`done`:t.status??n?.status??`running`;this.subagents[e][t.toolUseId]={toolUseId:t.toolUseId,description:t.description??n?.description??``,taskType:t.taskType??n?.taskType,status:i,lastToolName:t.lastToolName??n?.lastToolName,lastDescription:t.lastDescription??n?.lastDescription,totalTokens:t.totalTokens??n?.totalTokens,toolUses:t.toolUses??n?.toolUses,durationMs:t.durationMs??n?.durationMs,startedAt:n?.startedAt??r,updatedAt:r}},async markRead(e){try{let t=await fetch(`/api/workspaces/${e}/mark-read`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=this.workspaces.findIndex(t=>t.id===e);n>=0&&(this.workspaces[n]={...this.workspaces[n],hasUnread:!1})}catch(e){console.error(`[workspace store] markRead failed:`,e)}},async purgeWorktree(e){try{let t=await fetch(`/api/workspaces/${e}/purge-worktree`,{method:`POST`}),n=await t.json();if(!t.ok)return{ok:!1,error:n.error??`HTTP ${t.status}`};let r=n.workspace;return r&&(this.updateWorkspaceFromEvent(e,{archivedAt:r.archivedAt,worktreePurgedAt:r.worktreePurgedAt,worktreePurgeRestoreData:r.worktreePurgeRestoreData}),r.archivedAt&&this.archivedLoaded&&(this.archivedWorkspaces.some(t=>t.id===e)||this.archivedWorkspaces.unshift(r),this.workspaces=this.workspaces.filter(t=>t.id!==e),this.selectedWorkspaceId===e&&(this.selectedWorkspaceId=null,this.tasks=[]))),{ok:!0,warnings:n.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}},async dismissPrAttention(e,t){let n=this.prSnapshots[e];if(n)try{let r=await fetch(`/api/workspaces/${e}/dismiss-pr-attention`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:t,prUpdatedAt:n.updatedAt})});if(!r.ok)throw Error(`HTTP ${r.status}`);let i=t===`changes-requested`?{prChangesDismissedAt:n.updatedAt}:{prCiFailureDismissedAt:n.updatedAt};this.updateWorkspaceFromEvent(e,i)}catch(e){console.error(`[workspace store] dismissPrAttention failed:`,e)}},async restorePrAttention(e,t){try{let n=await fetch(`/api/workspaces/${e}/restore-pr-attention`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:t})});if(!n.ok)throw Error(`HTTP ${n.status}`);let r=t===`changes-requested`?{prChangesDismissedAt:null}:{prCiFailureDismissedAt:null};this.updateWorkspaceFromEvent(e,r)}catch(e){console.error(`[workspace store] restorePrAttention failed:`,e)}},queuedMessageKey(e,t){return`${e}:${t}`},getQueuedMessage(e,t){return t?this.queuedMessages[this.queuedMessageKey(e,t)]:void 0},queueMessage(e,t,n){let r=vc(this);if(r)return r.queue(e,t,n);this.queuedMessages[this.queuedMessageKey(e,n)]={content:t,sessionId:n}},cancelQueuedMessage(e,t){let n=vc(this);if(n)return n.cancel(e,t);t&&delete this.queuedMessages[this.queuedMessageKey(e,t)]},async flushQueuedMessage(e,t){let n=vc(this);if(n)return n.flush(e,t);let r=this.getQueuedMessage(e,t);if(!r)return;if(this.autoLoopStates[e]?.auto_loop??this.workspaces.find(t=>t.id===e)?.autoLoop){let n=this.queuedMessageKey(e,t);if(this.autoLoopQueueTransfers[n])return;this.autoLoopQueueTransfers[n]=!0;try{await this.queueAutoLoopMessage(e,r.content),this.getQueuedMessage(e,t)?.content===r.content&&this.cancelQueuedMessage(e,t)}catch{}finally{delete this.autoLoopQueueTransfers[n]}return}let i=Md();i.isCompacting(e)||(this.cancelQueuedMessage(e,t),i.sendChatMessage(e,r.content,t))},setActiveAgentSession(e,t){this.activeAgentSessionIds[e]=t,delete this.settledAgentSessionIds[e]},markAgentTurnSettled(e,t){this.activeAgentSessionIds[e]===t&&(this.settledAgentSessionIds[e]=t)},isAgentTurnSettled(e){let t=this.activeAgentSessionIds[e];return t!==void 0&&this.settledAgentSessionIds[e]===t},clearActiveAgentSession(e,t){this.activeAgentSessionIds[e]===t&&(delete this.activeAgentSessionIds[e],delete this.settledAgentSessionIds[e])},clearActiveAgentSessionOwner(e){delete this.activeAgentSessionIds[e],delete this.settledAgentSessionIds[e]},updateWorkspaceFromEvent(e,t){Nl.set(e,(Nl.get(e)??0)+1);let n=this.workspaces.findIndex(t=>t.id===e);if(n>=0&&(this.workspaces[n]={...this.workspaces[n],...t}),t.status!==void 0){if(ul().setCompacting(e,t.status===`compacting`),e in this.agentLivenessLoaded){let t={...this.agentLivenessLoaded};delete t[e],this.agentLivenessLoaded=t}e===this.selectedWorkspaceId&&this.fetchWorkspaceDetails(e)}if(t.status&&[`completed`,`idle`,`error`,`quota`].includes(t.status)){let t=this.activityFeeds[e];if(t)for(let e of t)e.meta?.pending&&(e.meta.pending=!1);let n=this.subagents[e];if(n)for(let[e,t]of Object.entries(n))t.status===`running`&&(n[e]={...t,status:`done`})}}}}),Hl=Be(`session-handoff`,{state:()=>({current:{},versions:{},selectedTargets:{},selectedSources:{},followedHandoffs:{},loadErrors:{}}),getters:{isActive:e=>t=>[`stopping`,`generating`,`starting`].includes(e.current[t]?.state??``),isBlocking:e=>t=>hl(e.current[t])},actions:{apply(e,t=!1){let n=this.current[e.workspaceId];if(n&&Date.parse(n.updatedAt)>Date.parse(e.updatedAt))return;this.versions[e.workspaceId]=(this.versions[e.workspaceId]??0)+1,this.current[e.workspaceId]=e,this.loadErrors[e.workspaceId]=null,(t||this.isActive(e.workspaceId))&&(this.followedHandoffs[e.workspaceId]=e.id);let r=this.followedHandoffs[e.workspaceId]===e.id;hl(e)||delete this.followedHandoffs[e.workspaceId];let i=Z(),a=`${e.id}:${e.targetSessionId}:${e.state===`cancelled`?`cancelled`:`restored`}`;r&&[`failed`,`interrupted`,`cancelled`].includes(e.state)&&i.selectedWorkspaceId===e.workspaceId&&this.selectedSources[e.workspaceId]!==a&&(this.selectedSources[e.workspaceId]=a,i.fetchSessions(e.workspaceId,e.sourceSessionId)),r&&e.state===`completed`&&e.targetSessionId&&i.selectedWorkspaceId===e.workspaceId&&this.selectedTargets[e.workspaceId]!==e.id&&(this.selectedTargets[e.workspaceId]=e.id,i.fetchSessions(e.workspaceId,e.targetSessionId))},async refresh(e){let t=this.versions[e]??0;try{let{handoff:n}=await X(`/api/workspaces/${e}/session-handoffs/current`);if((this.versions[e]??0)!==t)return;this.loadErrors[e]=null,n?this.apply(n):this.current[e]=null}catch(t){throw this.loadErrors[e]=t instanceof Error?t.message:String(t),t}},async start(e,t){let n=this.versions[e]??0,{handoff:r}=await X(`/api/workspaces/${e}/session-handoffs`,{method:`POST`,body:t}),i=this.current[e];return this.apply((this.versions[e]??0)!==n&&i?.id===r.id?i:r,!0),r},async decide(e,t,n){let r=this.versions[e]??0,{handoff:i}=await X(`/api/workspaces/${e}/session-handoffs/${t}/decision`,{method:`POST`,body:{action:n}}),a=this.current[e];return this.apply((this.versions[e]??0)!==r&&a?.id===i.id?a:i,!0),i}}}),Ul=`custom:`,Wl=RegExp(`^[A-Za-z0-9_-]{12}$`),Gl=[`.wav`,`.mp3`,`.ogg`,`.webm`],Kl=[...Object.values({".wav":`audio/wav`,".mp3":`audio/mpeg`,".ogg":`audio/ogg`,".webm":`audio/webm`}),...Gl].join(`,`),ql=2097152;function Jl(e){return`${Ul}${e}`}function Yl(e){return typeof e==`string`&&e.startsWith(`custom:`)&&Wl.test(e.slice(7))}function Xl(e){return Yl(e)?e.slice(7):``}function Zl(e){let t=/\.[^.\\/]+$/.exec(e)?.[0]?.toLowerCase()??``;return Gl.includes(t)?t:null}var Ql=`/sounds`,$l=[{id:`neutral.wav`,labelKey:`settings.notificationSoundBasic`},{id:`ready.wav`,labelKey:`settings.notificationSoundReady`}],eu=`neutral.wav`,tu=`inherit`,nu=[`audioPrCiFailedSound`,`audioPrCiRecoveredSound`,`audioPrChangesRequestedSound`,`audioPrApprovedSound`,`audioPrMergeConflictSound`,`audioPrReadyToMergeSound`,`audioPrMergedSound`],ru=[`audioPrCiFailedEnabled`,`audioPrCiFailedVolume`,`audioPrCiRecoveredEnabled`,`audioPrCiRecoveredVolume`,`audioPrChangesRequestedEnabled`,`audioPrChangesRequestedVolume`,`audioPrApprovedEnabled`,`audioPrApprovedVolume`,`audioPrMergeConflictEnabled`,`audioPrMergeConflictVolume`,`audioPrReadyToMergeEnabled`,`audioPrReadyToMergeVolume`,`audioPrMergedEnabled`,`audioPrMergedVolume`],iu={audioPrCiFailedSound:tu,audioPrCiRecoveredSound:tu,audioPrChangesRequestedSound:tu,audioPrApprovedSound:tu,audioPrMergeConflictSound:tu,audioPrReadyToMergeSound:tu,audioPrMergedSound:tu,audioPrCiFailedEnabled:!1,audioPrCiFailedVolume:1,audioPrCiRecoveredEnabled:!1,audioPrCiRecoveredVolume:1,audioPrChangesRequestedEnabled:!1,audioPrChangesRequestedVolume:1,audioPrApprovedEnabled:!1,audioPrApprovedVolume:1,audioPrMergeConflictEnabled:!1,audioPrMergeConflictVolume:1,audioPrReadyToMergeEnabled:!1,audioPrReadyToMergeVolume:1,audioPrMergedEnabled:!1,audioPrMergedVolume:1},au=new Map;function ou(e){let t=new Map;for(let n of e){let e=Yl(n)?n:Jl(n);Yl(e)&&t.set(e,au.get(e)??cu(e))}au.clear();for(let[e,n]of t)au.set(e,n)}function su(e,t){au.has(e)&&au.set(e,t)}function cu(e){return`/api/sounds/${Xl(e)}/file`}function lu(e){return Yl(e)?au.has(e):$l.some(t=>t.id===e)}function uu(e){return typeof e==`string`&&(Yl(e)||$l.some(t=>t.id===e))}function du(e){return uu(e)?e:eu}function fu(e){return e===`none`||e===`inherit`||uu(e)?e:tu}function pu(e){return e&&lu(e)?e:eu}function mu(e){if(e===`none`)return null;if(e!==`inherit`)return typeof e==`string`&&lu(e)?e:void 0}function hu(e){let t=pu(e);return Yl(t)?au.get(t)??cu(t):`${Ql}/${t}`}var gu=`mod+shift+x`,_u=[`mod`,`ctrl`,`meta`,`alt`,`shift`],vu=new Set([`mod+w`,`mod+shift+w`,`ctrl+w`,`ctrl+shift+w`,`meta+w`,`meta+shift+w`]),yu=new Set([`control`,..._u]);function bu(e){return vu.has(e)}function xu(e){if(typeof e!=`string`||e.length===0||e!==e.toLowerCase()||bu(e))return null;let t=e.split(`+`);if(t.some(e=>e.length===0))return null;let n=t.at(-1);if(!n||!/^[a-z0-9][a-z0-9_-]*$/.test(n)||yu.has(n))return null;let r=t.slice(0,-1),i=new Set,a=-1;for(let e of r){let t=_u.indexOf(e);if(t<=a)return null;a=t,i.add(e)}return{modifiers:i,key:n}}var Su=new Set([`control`,`meta`,`alt`,`shift`]),Cu={" ":`space`,"+":`plus`,"-":`minus`,"=":`equal`,",":`comma`,".":`period`,"/":`slash`,"\\":`backslash`,";":`semicolon`,"'":`quote`,"[":`bracketleft`,"]":`bracketright`,"`":`backquote`};function wu(e){let t=Cu[e]??e.toLowerCase();return/^[a-z0-9][a-z0-9_-]*$/.test(t)?t:null}function Tu(e=globalThis.navigator?.platform??``){return/mac|iphone|ipad|ipod/i.test(e)?`mac`:`other`}function Eu(e,t){if(e.key===`Escape`)return{status:`cancelled`};if(Su.has(e.key.toLowerCase()))return{status:`pending`};let n=wu(e.key);if(!n)return{status:`pending`};let r=new Set;(t===`mac`?e.metaKey:e.ctrlKey)&&r.add(`mod`),t===`mac`&&e.ctrlKey&&r.add(`ctrl`),t===`other`&&e.metaKey&&r.add(`meta`),e.altKey&&r.add(`alt`),e.shiftKey&&r.add(`shift`);let i=[..._u.filter(e=>r.has(e)),n].join(`+`);return bu(i)?{status:`reserved`}:{status:`accepted`,shortcut:i}}function Du(e,t,n){let r=xu(t),i=wu(e.key);if(!r||!i||i!==r.key)return!1;let a=r.modifiers.has(`ctrl`)||n===`other`&&r.modifiers.has(`mod`),o=r.modifiers.has(`meta`)||n===`mac`&&r.modifiers.has(`mod`);return e.ctrlKey===a&&e.metaKey===o&&e.altKey===r.modifiers.has(`alt`)&&e.shiftKey===r.modifiers.has(`shift`)}function Ou(e){return{space:`Space`,arrowup:`↑`,arrowdown:`↓`,arrowleft:`←`,arrowright:`→`}[e]??e.toUpperCase()}function ku(e,t){let n=xu(e);return n?t===`mac`?`${[n.modifiers.has(`mod`)||n.modifiers.has(`meta`)?`⌘`:``,n.modifiers.has(`ctrl`)?`⌃`:``,n.modifiers.has(`alt`)?`⌥`:``,n.modifiers.has(`shift`)?`⇧`:``].join(``)}${Ou(n.key)}`:[n.modifiers.has(`mod`)||n.modifiers.has(`ctrl`)?`Ctrl`:``,n.modifiers.has(`meta`)?`Meta`:``,n.modifiers.has(`alt`)?`Alt`:``,n.modifiers.has(`shift`)?`Shift`:``,Ou(n.key)].filter(Boolean).join(`+`):e}var Au=`.worktrees`,ju=[`commit`,`push`,`publish`],Mu={commit:`manual`,push:`manual`,publish:`manual`};function Nu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.entries(e).every(([e,t])=>ju.includes(e)&&(t===`manual`||t===`automatic`))}function Pu(...e){let t={...Mu};for(let n of e)Nu(n)&&Object.assign(t,n);return t}function Fu(e){return btoa(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var Iu=Be(`settings`,{state:()=>({global:{workflowPolicy:{...Mu},onboardingComplete:!1,defaultModelByEngine:{"claude-code":`auto`,codex:`auto`},dangerouslySkipPermissions:!0,prPromptTemplate:``,reviewPromptTemplate:``,ciFixPromptTemplate:``,finalizationPrompt:``,notionInitialPromptTemplate:``,sentryInitialPromptTemplate:``,gitConventions:``,editorCommand:``,fileManagerCommand:``,terminalCommand:``,autoPurgeOnPrMerged:!1,autoLoopMaxRetries:5,awaitingUserReminderMinutes:0,activityDigestEnabled:!0,wsEventsRetentionDays:0,wsEventsKeepPerWorkspace:0,browserNotifications:!0,audioNotifications:!1,audioQuestionNotifications:!1,audioWorkspaceCreatedNotifications:!1,audioAgentErrorNotifications:!1,audioNotificationSound:`neutral.wav`,audioQuestionSound:`inherit`,audioWorkspaceCreatedSound:`inherit`,audioAgentErrorSound:`inherit`,...iu,audioNotificationVolume:1,audioQuestionVolume:1,audioWorkspaceCreatedVolume:1,audioAgentErrorVolume:1,notionStatusProperty:``,notionInProgressStatus:``,notionAssigneeProperty:``,notionUserId:``,defaultPermissionModeByEngine:{"claude-code":`plan`,codex:`plan`},notionMcpKey:``,sentryMcpKey:``,bitbucketToken:``,bitbucketUsername:``,notionEnabled:!1,sentryEnabled:!1,showThinkingBlocks:!0,whipEnabled:!1,whipShortcut:gu,whipVolume:1,tags:[],branchPrefixes:[],setupScript:``,cleanupScript:``,cleanupScriptMode:`no-tasks`,cleanupScriptOnlyOnChanges:!1,archiveScript:``,changeSourceBranchScript:``,sessionEndedScript:``,prMergedScript:``,autoLoopDisabledScript:``,worktreesPath:Au,worktreesPrefixByProject:!1,voiceEnabled:!1,voicePttKey:`alt`,voiceLanguage:`auto`,voiceModel:null,voiceCommandPath:``,voiceFfmpegPath:``,voiceTemperature:0,voicePrompt:``,voiceTranslateToEnglish:!1,voiceSuppressNonSpeechTokens:!0,flattenWorkspaceList:!1,skillSuite:`standard`,customReviewTemplate:``,customAutoLoopReviewGate:``,customAutoLoopGroomingIntro:``,customQaPromptTemplate:``,customBrainstormingInstruction:``},voiceModels:[],voiceModelsLoading:!1,voiceModelsDir:``,voiceRuntime:null,activeMcpServers:[],projects:[],loading:!1,loaded:!1,loadError:null,showVerboseSystemMessages:localStorage.getItem(`kobo:showVerboseSystemMessages`)===`true`}),getters:{getProjectByPath:e=>t=>e.projects.find(e=>e.path===t)??null,projectPaths:e=>e.projects.map(e=>e.path)},actions:{_assertLoaded(){if(!this.loaded)throw Error(`Settings were never loaded successfully — refusing to overwrite the stored configuration`)},async fetchSettings(){this.loading=!0;try{let e=await X(`/api/settings`);this.global=e.global,this.projects=e.projects,this.loadError=null,this.loaded=!0}catch(e){this.loadError=e instanceof Error?e.message:String(e),this.loaded=!1,console.error(`[settings store] fetchSettings failed:`,e)}finally{this.loading=!1}},async fetchActiveMcpServers(){try{this.activeMcpServers=await X(`/api/settings/mcp-servers`)}catch(e){console.error(`[settings store] fetchActiveMcpServers failed:`,e),this.activeMcpServers=[]}},async fetchGlobalDefaults(){return X(`/api/settings/defaults`)},async previewRetention(e,t){return X(`/api/settings/ws-events-retention-preview?days=${e}&keep=${t}`)},async updateGlobal(e){this._assertLoaded(),this.global=await X(`/api/settings/global`,{method:`PUT`,body:e})},async upsertProject(e,t){this._assertLoaded();let n=await X(`/api/settings/projects/${Fu(e)}`,{method:`PUT`,body:t}),r=this.projects.findIndex(t=>t.path===e);r>=0?this.projects[r]=n:this.projects.push(n)},toggleVerboseSystemMessages(){this.setVerboseSystemMessages(!this.showVerboseSystemMessages)},setVerboseSystemMessages(e){this.showVerboseSystemMessages=e,localStorage.setItem(`kobo:showVerboseSystemMessages`,String(e))},async deleteProject(e){this._assertLoaded(),await X(`/api/settings/projects/${Fu(e)}`,{method:`DELETE`}),this.projects=this.projects.filter(t=>t.path!==e)},async fetchVoiceModels(){this.voiceModelsLoading=!0;try{let e=await X(`/api/voice/models`);this.voiceModels=e.available,this.voiceModelsDir=e.modelsDir,this.global.voiceModel=e.activeModel}catch(e){console.error(`[settings store] fetchVoiceModels failed:`,e)}finally{this.voiceModelsLoading=!1}},async cancelVoiceModelDownload(e){try{await X(`/api/voice/models/${encodeURIComponent(e)}/download`,{method:`DELETE`})}catch(e){if(!(e instanceof dl)||e.status!==404)throw e}await this.fetchVoiceModels()},async fetchVoiceRuntime(){try{this.voiceRuntime=await X(`/api/voice/runtime`)}catch(e){console.error(`[settings store] fetchVoiceRuntime failed:`,e)}},async downloadVoiceModel(e){await X(`/api/voice/models/${encodeURIComponent(e)}/download`,{method:`POST`}),await this.fetchVoiceModels()},async deleteVoiceModel(e){await X(`/api/voice/models/${encodeURIComponent(e)}`,{method:`DELETE`}),await this.fetchVoiceModels()}}});function Lu(e,t){let n=e=>e.split(`.`).map(e=>Number.parseInt(e,10)||0),r=n(e),i=n(t),a=Math.max(r.length,i.length);for(let e=0;e<a;e++){let t=(r[e]??0)-(i[e]??0);if(t!==0)return t}return 0}var Ru=`kobo:dismissed-update-version`,zu=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/,Bu=e=>typeof e==`string`&&zu.test(e),Vu=Be(`update`,()=>{let e=d(null),t=d(null),n=d(localStorage.getItem(Ru)),r=d(null),i=d(null),a=d(`unknown`),o=null,s=A(()=>t.value&&e.value&&Lu(t.value,e.value)>0&&t.value!==n.value?t.value:null);function c(n){if(!Bu(n.currentVersion))return;let o=typeof n.lastAttemptAt==`string`&&Number.isFinite(Date.parse(n.lastAttemptAt))?n.lastAttemptAt:null;r.value&&(!o||Date.parse(o)<Date.parse(r.value))||(e.value=n.currentVersion,Bu(n.latestVersion)&&(t.value=n.latestVersion),o&&(r.value=o),typeof n.lastSuccessAt==`string`&&(i.value=n.lastSuccessAt),(n.checkStatus===`success`||n.checkStatus===`failed`||n.checkStatus===`unknown`)&&(a.value=n.checkStatus))}function l(){return o||(o=(async()=>{try{let e=await fetch(`/api/changelog`);e.ok&&c(await e.json())}catch{}finally{o=null}})(),o)}function u(){let e=s.value;e&&(n.value=e,localStorage.setItem(Ru,e))}return{currentVersion:e,latestVersion:t,availableVersion:s,lastAttemptAt:r,lastSuccessAt:i,checkStatus:a,applySnapshot:c,refreshSnapshot:l,dismissUpdate:u}}),Hu=new Set([`output`,`complete`,`error`]);function Uu(e){if(!e.startsWith(`hook:`))return null;let t=e.slice(5),n=t.lastIndexOf(`:`);if(n<=0)return null;let r=t.slice(0,n),i=t.slice(n+1);return Hu.has(i)?{event:r,kind:i}:null}function Wu(e){return`hook:${e}`}function Gu(e){return e.startsWith(`hook:`)}var Ku=6e3,qu=typeof window<`u`&&window.parent!==window&&new URLSearchParams(window.location.search).get(`pane`)===`1`;function Ju(e,t=window.location.pathname){return`${t}?pane=1#/workspace/${encodeURIComponent(e)}`}function Yu(e){let t=Number(e??50);return Number.isFinite(t)?Math.max(25,Math.min(75,t)):50}function Xu(e,t){return e&&e!==t?{left:e,right:t}:{left:t}}var Zu=null;function Qu(e,t){return t.name===`split`&&e.name===`split`&&e.fullPath===Zu}async function $u(e,t){let n={name:`split`,query:t},r=e.resolve(n).fullPath;if(!(e.currentRoute.value.fullPath===r||Zu)){Zu=r;try{await e.replace(n)}finally{Zu=null}}}function ed(e,t){return e||Object.keys(t).length>0}var td=new Map,nd=[],rd=!1;function id(e){let t=hu(e),n=td.get(t);return n||(n=new Audio(t),td.set(t,n)),n}function ad(e,t){let n=new Audio(hu(pu(e)));n.preload=`auto`,n.volume=t,n.play().catch(()=>{})}function od(){qu||`Notification`in window&&Notification.permission==="default"&&Notification.requestPermission()}function sd(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.max(0,Math.min(1,e))}function cd(){let e=nd.shift();if(!e){rd=!1;return}rd=!0;let t=id(pu(e.soundId));t.volume=e.volume,t.currentTime=0;let n=!1,r=()=>{n||(n=!0,t.removeEventListener(`ended`,r),t.removeEventListener(`error`,r),cd())};t.addEventListener(`ended`,r,{once:!0}),t.addEventListener(`error`,r,{once:!0}),t.play().catch(r)}function ld(e,t){let n={soundId:pu(e),volume:sd(t)};if(document.visibilityState===`hidden`){ad(n.soundId,n.volume);return}nd.push(n),rd||cd()}function ud(e,t){let n=id(pu(e));n.volume=sd(t),n.currentTime=0,n.play().catch(()=>{})}function dd(e,t,n,r,i,a){if(qu)return;let o=Iu();if(!document.hasFocus()&&o.global.browserNotifications&&`Notification`in window&&Notification.permission===`granted`){let r=new Notification(e,{body:t,icon:`/favicon.ico`});n&&(r.onclick=()=>{window.focus(),window.location.hash=`#/workspace/${n}`,r.close()})}(a??o.global.audioNotifications)&&r!==null&&ld(r&&r.length>0?r:o.global.audioNotificationSound??`neutral.wav`,i??o.global.audioNotificationVolume)}function fd(e,t){let n=[{label:t.retryLabel,color:`white`,handler:t.onRetry}];t.detailsLabel&&t.onDetails&&n.push({label:t.detailsLabel,color:`white`,handler:t.onDetails}),n.push({label:t.dismissLabel,color:`grey-5`}),Bc.create({type:`negative`,position:`top`,multiLine:!0,message:e,timeout:t.timeout??0,actions:n})}function pd(e){return(typeof e==`string`?Array.from(e.replace(/[\p{Cc}\s]+/gu,` `).replace(/\p{Cs}/gu,`�`).trim()).slice(0,100).join(``):``)||`External MCP client`}function md(e){if(!e||typeof e!=`object`)return;let t=e;if(!(t.kind!==`mcp`||t.transport!==`http`&&t.transport!==`stdio`))return{kind:`mcp`,clientName:pd(t.clientName),transport:t.transport}}var hd=new Map,gd=Be(`devServer`,{state:()=>({statuses:{},logs:{}}),getters:{getStatus:e=>t=>e.statuses[t]??null},actions:{async fetchStatus(e){let t=(hd.get(e)??0)+1;hd.set(e,t);let n=this.statuses[e];try{let r=await X(`/api/dev-server/${e}/status`);hd.get(e)===t&&this.statuses[e]===n&&(this.statuses[e]=r)}catch(e){console.error(`[dev-server store] fetchStatus failed:`,e)}},async startDevServer(e){try{let t=await fetch(`/api/dev-server/${e}/start`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.statuses[e]=n}catch(e){throw console.error(`[dev-server store] startDevServer failed:`,e),e}},async stopDevServer(e){try{let t=await fetch(`/api/dev-server/${e}/stop`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();this.statuses[e]=n}catch(e){throw console.error(`[dev-server store] stopDevServer failed:`,e),e}},async fetchLogs(e,t=200){try{let n=await fetch(`/api/dev-server/${e}/logs?tail=${t}`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();return this.logs[e]=r.logs,r.logs}catch(e){return console.error(`[dev-server store] fetchLogs failed:`,e),``}},updateFromWsEvent(e,t){this.statuses[e]=t}}}),Q=Zc.global.t,_d=new rl,vd=0,yd={"pr:ci-failed":{soundKey:`audioPrCiFailedSound`,enabledKey:`audioPrCiFailedEnabled`,volumeKey:`audioPrCiFailedVolume`},"pr:ci-recovered":{soundKey:`audioPrCiRecoveredSound`,enabledKey:`audioPrCiRecoveredEnabled`,volumeKey:`audioPrCiRecoveredVolume`},"pr:changes-requested":{soundKey:`audioPrChangesRequestedSound`,enabledKey:`audioPrChangesRequestedEnabled`,volumeKey:`audioPrChangesRequestedVolume`},"pr:approved":{soundKey:`audioPrApprovedSound`,enabledKey:`audioPrApprovedEnabled`,volumeKey:`audioPrApprovedVolume`},"pr:merge-conflict":{soundKey:`audioPrMergeConflictSound`,enabledKey:`audioPrMergeConflictEnabled`,volumeKey:`audioPrMergeConflictVolume`},"pr:ready-to-merge":{soundKey:`audioPrReadyToMergeSound`,enabledKey:`audioPrReadyToMergeEnabled`,volumeKey:`audioPrReadyToMergeVolume`},"pr:merged":{soundKey:`audioPrMergedSound`,enabledKey:`audioPrMergedEnabled`,volumeKey:`audioPrMergedVolume`}};function bd(e,t,n){let r=Iu().global,i=yd[n];dd(e,void 0,t,mu(r[i.soundKey]),Number(r[i.volumeKey]),!!r[i.enabledKey])}function xd(e,t){let n=[];return t&&n.push({label:Q(`pr.openPr`),color:`white`,noDismiss:!0,handler:()=>window.open(t,`_blank`)}),n.push({label:Q(`pr.openWorkspace`),color:`white`,noDismiss:!0,handler:()=>{window.location.hash=`#/workspace/${e}`}}),n.push({label:Q(`pr.dismiss`),color:`white`}),n}var Sd=null,Cd=null,wd=0,Td=!1,Ed=!1,Dd=!1;function Od(e){Dd=e}function kd(e,t,n){if(t.kind!==`session:started`)return;let r=Z();if(n){r.setActiveAgentSession(e,n);let t=r.peekPending(e);t&&t.agentSessionId===n&&r.dequeuePending(e)}let i=r.workspaces.find(t=>t.id===e);i&&(i.status===`completed`||i.status===`idle`||i.status===`error`||i.status===`quota`)&&r.updateWorkspaceFromEvent(e,{status:`executing`}),!Dd&&n&&r.selectedWorkspaceId===e&&r.selectedSessionId!==n&&r.fetchSessions(e,n).catch(e=>{console.error(`[websocket] fetchSessions on session:started failed:`,e)})}function Ad(e,t){let n=Z();if(t.kind===`tool:call`&&t.name===`TodoWrite`){let r=t.input?.todos;return Array.isArray(r)&&n.updateAgentTodos(e,r.map(e=>({content:typeof e.content==`string`?e.content:``,status:typeof e.status==`string`?e.status:`pending`,activeForm:typeof e.activeForm==`string`?e.activeForm:void 0}))),!0}if(t.kind===`tool:call`&&t.name===`TaskCreate`){let r=t.input??{};return n.agentTaskCreate(e,t.toolCallId,{subject:typeof r.subject==`string`?r.subject:void 0,description:typeof r.description==`string`?r.description:void 0,activeForm:typeof r.activeForm==`string`?r.activeForm:void 0}),!0}if(t.kind===`tool:result`&&typeof t.output==`string`){let r=t.output.match(/^Task #(\d+) created successfully/);if(r)return n.agentTaskSetNumber(e,t.toolCallId,Number(r[1])),!0}if(t.kind===`tool:call`&&t.name===`TaskUpdate`){let r=t.input??{},i=r.task_id??r.taskId??r.id,a=typeof i==`number`?i:typeof i==`string`?Number(i):NaN;return Number.isFinite(a)&&n.agentTaskUpdate(e,a,{status:typeof r.status==`string`?r.status:void 0,content:typeof r.subject==`string`?r.subject:void 0,activeForm:typeof r.activeForm==`string`?r.activeForm:void 0}),!0}return!1}function jd(e,t,n,r,i){let a=ul(),o=Z().activeAgentSessionIds[e],s=!i||!o||i===o;if(t.kind===`session:compacting`){!Dd&&s&&a.setCompacting(e,t.active);return}a.append(e,t,n,r,i,!Dd),!Dd&&s&&(t.kind===`session:compacted`||t.kind===`message:text`||t.kind===`tool:call`)&&a.setCompacting(e,!1),kd(e,t,i??void 0);let c=Z();if(t.kind===`session:user-input-requested`){if(t.requestKind===`question`?c.enqueuePending(e,{kind:`question`,agentSessionId:i??null,toolCallId:t.toolCallId,toolName:t.toolName,input:t.payload}):c.enqueuePending(e,{kind:`permission`,agentSessionId:i??null,toolCallId:t.toolCallId,toolName:t.toolName,toolInput:t.payload}),Md().isCompacting(e)||c.updateWorkspaceFromEvent(e,{status:`awaiting-user`}),!Dd){let n=c.workspaces.find(t=>t.id===e)?.name??``,r=t.requestKind===`question`?Q(`notification.agentQuestion`,{name:n}):Q(`notification.agentPermissionRequest`,{name:n}),i=Iu().global;dd(r,void 0,e,t.requestKind===`question`?i.audioQuestionSound:void 0,t.requestKind===`question`?i.audioQuestionVolume:void 0,i.audioQuestionNotifications)}return}if(t.kind===`subagent:progress`){c.upsertSubagent(e,{toolUseId:t.toolCallId,status:t.status,description:t.description,taskType:t.taskType,lastToolName:t.lastToolName,totalTokens:t.totalTokens,toolUses:t.toolUses,durationMs:t.durationMs});return}if(!Ad(e,t)){if(t.kind===`tool:call`&&t.name===`Bash`){let n=t.input,r=`${n?.command??``} ${n?.description??``}`;/\bgit\b|commit|push|pull|merge|rebase|checkout|branch/i.test(r)&&c.triggerGitRefresh(),/\bgit\s+branch\s+-m\b/i.test(r)&&setTimeout(()=>{c.resyncWorkspaceBranch(e).catch(e=>{console.error(`[websocket] Branch resync failed:`,e)})},2500),/\bgh\s+pr\s+create\b/i.test(r)&&setTimeout(()=>c.triggerGitRefresh(),3e3)}if(t.kind!==`session:started`){if(t.kind===`turn:completed`){i&&c.markAgentTurnSettled(e,i);return}if(t.kind===`session:ended`){i&&c.clearPendingForSession(e,i);let n=c.activeAgentSessionIds[e];if(t.superseded===!0||typeof i==`string`&&i.length>0&&n!==void 0&&i!==n){vc(c)||c.cancelQueuedMessage(e,i),i&&c.clearActiveAgentSession(e,i);return}Dd||a.setCompacting(e,!1),i?c.clearActiveAgentSession(e,i):c.clearActiveAgentSessionOwner(e);let r=c.workspaces.find(t=>t.id===e)?.status===`quota`?`quota`:t.reason===`completed`?`completed`:t.reason===`error`?`error`:`idle`;c.updateWorkspaceFromEvent(e,{status:r}),i&&t.reason===`completed`&&!vc(c)&&c.flushQueuedMessage(e,i),c.finalizeRunningSubagents(e),c.fetchWorkspaces(),!Dd&&t.reason!==`killed`&&t.reason!==`error`&&c.autoLoopStates[e]?.auto_loop!==!0&&dd(Q(`notification.agentFinished`,{name:c.workspaces.find(t=>t.id===e)?.name??``}),void 0,e);return}if(t.kind===`error`&&(t.category===`quota`&&(c.updateWorkspaceFromEvent(e,{status:`quota`}),c.fetchWorkspaces()),!Dd)){let t=Iu().global;dd(Q(`notification.agentError`,{name:c.workspaces.find(t=>t.id===e)?.name??``}),void 0,e,t.audioAgentErrorSound,t.audioAgentErrorVolume,t.audioAgentErrorNotifications)}}}}var Md=Be(`websocket`,{state:()=>({connected:!1,reconnecting:!1,reconnectAttempt:0,lastEventId:null,pendingSyncRequests:[],_replaying:!1,_drainInProgress:!1,_refreshAfterSync:!1,_workspacesToRefreshAfterDrain:new Set}),actions:{connect(){if(Sd)return;if(Td=!0,Ed||(Ed=!0,window.addEventListener(`online`,()=>{Td&&this.connect()}),window.addEventListener(`offline`,()=>{this.connected=!1,this.reconnecting=Td,this.pendingSyncRequests=[],_d.disconnect(Q(`network.login.unreachable`));let e=Sd;Sd=null,e?.close(),Cd&&=(clearTimeout(Cd),null)})),!navigator.onLine){this.connected=!1,this.reconnecting=!0,this.pendingSyncRequests=[];return}let e=uc(`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/ws`,sc()),t=new WebSocket(e);Sd=t,t.addEventListener(`open`,()=>{if(Sd!==t)return;this.connected=!0,Vu().refreshSnapshot(),this.reconnecting=!1,wd=0,this.reconnectAttempt=0;let e=Z().workspaces.map(e=>e.id);for(let t of e)this._send({type:`subscribe`,payload:{workspaceId:t}});this._refreshAfterSync=!0,this.lastEventId?this._send({type:`sync:request`,payload:{lastEventId:this.lastEventId,workspaceIds:e}}):(this._refreshAfterSync=!1,this.refreshLiveState())}),t.addEventListener(`message`,e=>{if(Sd===t)try{let t=JSON.parse(e.data);this._routeMessage(t)}catch{}}),t.addEventListener(`close`,()=>{Sd===t&&(_d.disconnect(Q(`network.login.unreachable`)),this.connected=!1,this.pendingSyncRequests=[],Sd=null,Td&&this._scheduleReconnect())}),t.addEventListener(`error`,()=>{})},async refreshLiveState(){let e=Z(),t=new Set(e.workspaces.map(e=>e.id));if(await e.fetchWorkspacesInfo(),!this.connected)return;for(let n of e.workspaces)t.has(n.id)||(this._refreshAfterSync=!0,this.subscribe(n.id));let n=gd(),r=new Set(Object.keys(n.statuses));e.selectedWorkspaceId&&r.add(e.selectedWorkspaceId);let i=new Set(Object.keys(e.autoLoopMessages));e.selectedWorkspaceId&&i.add(e.selectedWorkspaceId);let a=Hl(),o=new Set(Object.keys(a.current));e.selectedWorkspaceId&&o.add(e.selectedWorkspaceId),await Promise.allSettled([e.fetchAutoLoopStates(),...[...o].map(e=>a.refresh(e)),...[...i].map(t=>e.fetchAutoLoopMessages(t)),...[...r].map(e=>n.fetchStatus(e))])},disconnect(){_d.disconnect(Q(`network.login.unreachable`)),Td=!1,this.pendingSyncRequests=[],Cd&&=(clearTimeout(Cd),null),Sd&&=(Sd.close(),null),this.connected=!1,this.reconnecting=!1,this.reconnectAttempt=0},subscribe(e){this._drainInProgress&&this._workspacesToRefreshAfterDrain.add(e),this._send({type:`subscribe`,payload:{workspaceId:e}}),this._send({type:`sync:request`,payload:{workspaceIds:[e]}})},unsubscribe(e){this._send({type:`unsubscribe`,payload:{workspaceId:e}})},subscribeChannel(e){this._send({type:`subscribe`,payload:{workspaceId:e}})},isCompacting(e){let t=Z();return(t.workspaces.find(t=>t.id===e)??t.archivedWorkspaces.find(t=>t.id===e))?.status===`compacting`||ul().isCompacting(e)},sendChatMessage(e,t,n,r,i=!1,a){if(this.isCompacting(e)||!this._send({type:`chat:message`,payload:{workspaceId:e,content:t,sessionId:n,agentPermissionModeOverride:r,force:i,clientMessageId:a}}))return!1;let o=Z(),s=o.workspaces.find(t=>t.id===e);return s&&(s.status===`completed`||s.status===`idle`||s.status===`error`||s.status===`quota`)&&o.updateWorkspaceFromEvent(e,{status:`executing`}),!0},sendChatMessageConfirmed(e,t,n){let r=`${Array.from(crypto.getRandomValues(new Uint32Array(4)),e=>e.toString(16)).join(`-`)}-${++vd}`,i=_d.wait(e,r,Q(`network.login.unreachable`));return this.sendChatMessage(e,t,n,void 0,!1,r)||_d.settle(e,r,Error(Q(`network.login.unreachable`))),i},_send(e){if(Sd&&Sd.readyState===WebSocket.OPEN&&navigator.onLine){try{Sd.send(JSON.stringify(e))}catch{return!1}if(e.type===`sync:request`){let t=e.payload;this.pendingSyncRequests.push([...t?.workspaceIds??Z().workspaces.map(e=>e.id)])}return!0}return!1},isSyncPending(e){return this.pendingSyncRequests.some(t=>t.includes(e))},isConnected(){return Sd!==null&&Sd.readyState===WebSocket.OPEN},_scheduleReconnect(){if(Cd)return;if(!Td||!navigator.onLine){this.reconnecting=Td;return}let e=Math.min(1e3*2**wd,3e4),t=Math.round(e*(.8+Math.random()*.4));wd++,this.reconnecting=!0,this.reconnectAttempt=wd,wd===4&&sc()&&fc(),Cd=setTimeout(()=>{Cd=null,this.connect()},t)},_routeMessage(e){let t=Z();e.replayable!==!1&&e.id?this.lastEventId=e.id:e.replayable!==!1&&e.eventId&&(this.lastEventId=e.eventId);let n=e.payload??{},r=e.workspaceId??n.workspaceId??``,i=Uu(e.type);if(i){let n=Wu(i.event),a=e.createdAt??new Date().toISOString(),o=Q(`chat.hookScript`,{event:i.event}),s=i.kind===`output`?e.payload?.text??``:i.kind===`complete`?e.payload?.hadOutput===!1?Q(`chat.scriptDone`):Q(`chat.scriptComplete`,{phase:o}):Q(`chat.scriptError`,{phase:o,message:e.payload?.message??Q(`chat.unknownError`)});t.addActivityItem(r,{id:e.id??`${n}-${i.kind}-${Date.now()}`,type:`text`,content:s,timestamp:a,meta:{sender:n}});return}switch(e.type){case`workspace:handoff`:{if(!r||this._replaying)break;let e=n.handoff;e?.workspaceId===r&&typeof e.id==`string`&&typeof e.state==`string`&&Hl().apply(e);break}case`kobo:update-checked`:Vu().applySnapshot(n);break;case`workspace:configuration`:if(!r||this._replaying||typeof n.engine!=`string`||typeof n.model!=`string`||typeof n.reasoningEffort!=`string`||![`plan`,`bypass`,`strict`,`interactive`].includes(n.agentPermissionMode))break;t.updateWorkspaceFromEvent(r,{engine:n.engine,model:n.model,reasoningEffort:n.reasoningEffort,agentPermissionMode:n.agentPermissionMode});break;case`workspace:status`:{if(!r||this._replaying||typeof n.status!=`string`)break;let e=t.activeAgentSessionIds[r];if(e&&typeof n.sessionId==`string`&&e!==n.sessionId)break;t.updateWorkspaceFromEvent(r,{status:n.status});break}case`chat:accepted`:{if(typeof n.clientMessageId==`string`){r&&_d.settle(r,n.clientMessageId);break}let e=typeof n.sessionId==`string`?n.sessionId:void 0;r&&e&&t.cancelQueuedMessage(r,e);break}case`chat:rejected`:{if(typeof n.clientMessageId==`string`){r&&_d.settle(r,n.clientMessageId,Error(typeof n.message==`string`?n.message:Q(`network.login.unreachable`)));break}let e=typeof n.sessionId==`string`?n.sessionId:void 0,i=typeof n.content==`string`?n.content:void 0,a=typeof n.message==`string`?n.message:Q(`network.login.unreachable`);if(r&&i){let n=(t.activityFeeds[r]??[]).find(e=>e.meta?.sender===`user`&&e.meta?.pending&&e.content===i);n&&t.removeActivityItem(r,n.id),e&&t.queueMessage(r,i,e)}Bc.create({type:`negative`,message:a,position:`top`,timeout:6e3});break}case`agent:event`:{if(!r)break;let t=e.createdAt;jd(r,n,t,e.id??e.eventId,e.sessionId??null);break}case`agent:progress`:n.tasks&&Array.isArray(n.tasks)&&(t.tasks=n.tasks);break;case`user:message`:if(r&&typeof n.clientMessageId==`string`&&_d.settle(r,n.clientMessageId),r&&n.content){let i=n.content,a=n.sender??`user`,o=md(n.source),s=e.sessionId,c=e.id??e.eventId??`user-${Date.now()}`,l=typeof e.createdAt==`string`?e.createdAt:void 0,u=l??new Date().toISOString(),d=t.activityFeeds[r]??[];if(!o&&a===`user`&&d.some(e=>e.meta?.sender===`user`&&e.content===i&&e.meta?.pending)){let e=d.findIndex(e=>e.meta?.sender===`user`&&e.content===i&&e.meta?.pending);e>=0&&(d[e]={...d[e],id:c,sessionId:s,...l?{timestamp:l}:{}})}else t.addActivityItem(r,{id:c,type:`text`,content:i,timestamp:u,sessionId:s,meta:{sender:a,...o?{source:o}:{}}})}break;case`sync:empty`:case`sync:error`:this.pendingSyncRequests.shift();break;case`sync:response`:{let e=this.pendingSyncRequests[0];this._replaying=!0,Od(!0);try{let e=n.events??[],r=n.mode===`delta`?`delta`:`snapshot`,i=new Map;for(let t of e)if(t.type!==`sync:response`){if(t.type===`agent:event`&&t.workspaceId){let e=i.get(t.workspaceId)??{events:[],timestamps:[],sessionIds:[],eventIds:[],oldestId:void 0};e.events.push(t.payload),e.timestamps.push(t.createdAt),e.sessionIds.push(t.sessionId??null),e.eventIds.push(t.id??null),e.oldestId||=t.id,i.set(t.workspaceId,e);continue}this._routeMessage(t)}if(i.size>0){let e=ul();for(let[t,{events:n,timestamps:a,sessionIds:o,eventIds:s,oldestId:c}]of i){let i=r===`delta`?e.merge(t,n,a,{sessionIds:o,eventIds:s}):n.map((e,t)=>t);r===`snapshot`&&e.reset(t,n,a,{oldestId:c,hasMoreOlder:!0,sessionIds:o,eventIds:s}),r===`snapshot`&&Z().updateAgentTodos(t,[]);for(let e of i){let r=n[e];if(!r)continue;let i=o[e]??null;if(r.kind===`session:user-input-requested`){r.requestKind===`question`?Z().enqueuePending(t,{kind:`question`,agentSessionId:i,toolCallId:r.toolCallId,toolName:r.toolName,input:r.payload}):Z().enqueuePending(t,{kind:`permission`,agentSessionId:i,toolCallId:r.toolCallId,toolName:r.toolName,toolInput:r.payload});continue}if(r.kind===`session:started`){if(i){let e=Z();e.setActiveAgentSession(t,i);let n=e.peekPending(t);n&&n.agentSessionId===i&&e.dequeuePending(t)}continue}if(r.kind===`session:ended`){let e=Z();i?(e.clearPendingForSession(t,i),vc(e)||e.cancelQueuedMessage(t,i),e.clearActiveAgentSession(t,i)):r.superseded!==!0&&e.clearActiveAgentSessionOwner(t);continue}if(r.kind===`subagent:progress`){Z().upsertSubagent(t,{toolUseId:r.toolCallId,status:r.status,description:r.description,taskType:r.taskType,lastToolName:r.lastToolName,totalTokens:r.totalTokens,toolUses:r.toolUses,durationMs:r.durationMs});continue}Ad(t,r)}}}let a=this.lastEventId,o=e.findLast(e=>e.replayable!==!1&&typeof e.id==`string`);if(o&&(this.lastEventId=o.id),n.truncated===!0&&o&&this.lastEventId!==a)this._drainInProgress=!0,this._send({type:`sync:request`,payload:{lastEventId:this.lastEventId,workspaceIds:t.workspaces.map(e=>e.id)}});else if(this._drainInProgress&&(this._drainInProgress=!1,this._workspacesToRefreshAfterDrain.size>0)){let e=[...this._workspacesToRefreshAfterDrain];this._workspacesToRefreshAfterDrain.clear(),this._send({type:`sync:request`,payload:{lastEventId:this.lastEventId,workspaceIds:e}})}}finally{if(this._replaying=!1,Od(!1),e){let t=this.pendingSyncRequests.indexOf(e);t!==-1&&this.pendingSyncRequests.splice(t,1)}this._refreshAfterSync&&this.pendingSyncRequests.length===0&&(this._refreshAfterSync=!1,this.refreshLiveState())}break}case`usage:snapshot`:{let e=n;e.providerId&&e.snapshot&&t.applyUsageSnapshot({providerId:e.providerId,snapshot:e.snapshot});break}case`devserver:status`:{let e=gd();r&&e.updateFromWsEvent(r,n);break}case`task:updated`:r&&t.fetchWorkspaceDetails(r);break;case`setup:output`:t.addActivityItem(r,{id:e.id??`setup-${Date.now()}`,type:`text`,content:e.payload?.text??``,timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`setup`}});break;case`setup:complete`:t.addActivityItem(r,{id:e.id??`setup-complete-${Date.now()}`,type:`text`,content:e.payload?.hadOutput===!1?Q(`chat.scriptDone`):Q(`chat.scriptComplete`,{phase:`setup`}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`setup`}});break;case`setup:error`:t.addActivityItem(r,{id:e.id??`setup-error-${Date.now()}`,type:`text`,content:Q(`chat.scriptError`,{phase:`setup`,message:e.payload?.message??Q(`chat.unknownError`)}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`setup`}});break;case`cleanup:output`:t.addActivityItem(r,{id:e.id??`cleanup-${Date.now()}`,type:`text`,content:e.payload?.text??``,timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`cleanup`}});break;case`cleanup:complete`:t.addActivityItem(r,{id:e.id??`cleanup-complete-${Date.now()}`,type:`text`,content:e.payload?.hadOutput===!1?Q(`chat.scriptDone`):Q(`chat.scriptComplete`,{phase:`cleanup`}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`cleanup`}});break;case`cleanup:error`:t.addActivityItem(r,{id:e.id??`cleanup-error-${Date.now()}`,type:`text`,content:Q(`chat.scriptError`,{phase:`cleanup`,message:e.payload?.message??Q(`chat.unknownError`)}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`cleanup`}});break;case`archive:output`:t.addActivityItem(r,{id:e.id??`archive-${Date.now()}`,type:`text`,content:e.payload?.text??``,timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`archive`}});break;case`archive:complete`:t.addActivityItem(r,{id:e.id??`archive-complete-${Date.now()}`,type:`text`,content:e.payload?.hadOutput===!1?Q(`chat.scriptDone`):Q(`chat.scriptComplete`,{phase:`archive`}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`archive`}});break;case`archive:error`:t.addActivityItem(r,{id:e.id??`archive-error-${Date.now()}`,type:`text`,content:Q(`chat.scriptError`,{phase:`archive`,message:e.payload?.message??Q(`chat.unknownError`)}),timestamp:e.createdAt??new Date().toISOString(),meta:{sender:`archive`}});break;case`workspace:unread`:if(r){let e=n.hasUnread??!1;t.updateWorkspaceFromEvent(r,{hasUnread:e})}break;case`workspace:awaiting-reminder`:{let e=n;if(!e.workspaceId)break;let t=Iu().global,r=Q(`notification.awaitingReminder`,{name:e.workspaceName??``,minutes:e.waitingMinutes??0});if(dd(r,void 0,e.workspaceId,t.audioQuestionSound,t.audioQuestionVolume,t.audioQuestionNotifications),document.hasFocus()){let t=e.workspaceId;Bc.create({type:`info`,position:`top`,timeout:1e4,message:r,actions:[{label:Q(`common.open`),color:`white`,handler:()=>{window.location.hash=`#/workspace/${t}`}}]})}break}case`workspace:pr-attention-dismissed`:if(r){let e=n.kind,i=n.prUpdatedAt;e&&i&&t.updateWorkspaceFromEvent(r,e===`changes-requested`?{prChangesDismissedAt:i}:{prCiFailureDismissedAt:i})}break;case`workspace:description-updated`:{if(!r)break;let e=n.description??null;t.updateWorkspaceFromEvent(r,{description:e});break}case`workspace:agent-description-updated`:{if(!r)break;let e=n.agentDescription??null;t.updateWorkspaceFromEvent(r,{agentDescription:e});break}case`cron:created`:{if(!r)break;let e=n.cron;if(!e)break;let i=t.crons[r]??[];i.some(t=>t.id===e.id)||(t.crons[r]=[...i,e]);let a=t.autoLoopStates[r];a&&(a.crons_count=t.crons[r].length);break}case`cron:fired`:{if(!r)break;let e=n,i=t.crons[r]??[];t.crons[r]=i.map(t=>t.id===e.id?{...t,nextFireAt:e.nextFireAt??t.nextFireAt,lastFiredAt:e.lastFiredAt??new Date().toISOString()}:t);break}case`cron:cancelled`:{if(!r)break;let e=n.id;if(!e)break;t.crons[r]=(t.crons[r]??[]).filter(t=>t.id!==e);let i=t.autoLoopStates[r];i&&(i.crons_count=t.crons[r].length);break}case`cron:updated`:{if(!r)break;let e=n.crons;if(Array.isArray(e)){t.crons[r]=e;let n=t.autoLoopStates[r];n&&(n.crons_count=e.length)}break}case`workspace:archived`:case`workspace:unarchived`:case`workspace:worktree-restored`:case`workspace:worktree-purged`:{let i=n.workspace;e.type===`workspace:worktree-restored`&&i&&i.id===r?t.applyRestoredWorkspace(i):t.invalidateWorkspaceLifecycleReads(r),(e.type===`workspace:archived`||e.type===`workspace:worktree-purged`)&&r&&cl(r),e.type===`workspace:archived`&&r&&t.selectedWorkspaceId===r&&(t.selectedWorkspaceId=null),t.fetchWorkspaces(),t.archivedLoaded&&t.fetchArchivedWorkspaces();break}case`workspace:deleted`:t.invalidateWorkspaceLifecycleReads(r),r&&cl(r),r&&t.selectedWorkspaceId===r&&(t.selectedWorkspaceId=null),t.fetchWorkspaces(),t.archivedLoaded&&t.fetchArchivedWorkspaces();break;case`pr:base-changed`:{if(!r)break;let e=n,i=e.oldBase??``,a=e.newBase??``;t.updateWorkspaceFromEvent(r,{sourceBranch:a}),Bc.create({type:`info`,position:`top`,timeout:Ku,message:Q(`pr.baseChanged`,{oldBase:i,newBase:a}),actions:xd(r,e.prUrl)}),dd(Q(`pr.baseChanged`,{oldBase:i,newBase:a}),void 0,r);break}case`pr:ci-failed`:case`pr:ci-recovered`:case`pr:merge-conflict`:case`pr:merged`:{if(!r)break;let i=e.type,a=n,o=a.prNumber??0,s={"pr:ci-failed":{key:`toast.prCiFailed`,type:`negative`,timeout:4e3},"pr:ci-recovered":{key:`toast.prCiRecovered`,type:`positive`,timeout:5e3},"pr:merge-conflict":{key:`toast.prMergeConflict`,type:`warning`,timeout:Ku},"pr:merged":{key:`toast.prMerged`,type:`positive`,timeout:5e3}}[i],c=Q(s.key,{n:o});Bc.create({type:s.type,position:`top`,timeout:s.timeout,message:c,actions:xd(r,a.prUrl)}),bd(c,r,i),i!==`pr:merged`&&t.refreshPrSnapshot(r);break}case`pr:changes-requested`:{if(!r)break;let e=n,i=Q(`toast.prChangesRequested`,{n:e.prNumber??0});Bc.create({type:`warning`,position:`top`,timeout:Ku,message:i,actions:xd(r,e.prUrl)}),bd(i,r,`pr:changes-requested`),t.refreshPrSnapshot(r);break}case`pr:approved`:{if(!r)break;let e=n,i=Q(`toast.prApproved`,{n:e.prNumber??0});Bc.create({type:`positive`,position:`top`,timeout:5e3,message:i,actions:xd(r,e.prUrl)}),bd(i,r,`pr:approved`),t.refreshPrSnapshot(r);break}case`pr:ready-to-merge`:{if(!r)break;let e=n,i=Q(`toast.prReadyToMerge`,{n:e.prNumber??0});Bc.create({type:`positive`,position:`top`,timeout:5e3,message:i,actions:xd(r,e.prUrl)}),bd(i,r,`pr:ready-to-merge`),t.refreshPrSnapshot(r);break}case`wakeup:scheduled`:if(r){let e=n;typeof e.targetAt==`string`&&t.setPendingWakeup(r,{targetAt:e.targetAt,reason:e.reason})}break;case`wakeup:cancelled`:case`wakeup:fired`:case`wakeup:skipped`:r&&t.clearPendingWakeup(r);break;case`agent:quota-recovered`:r&&(t.clearPendingQuotaBackoff(r),t.updateWorkspaceFromEvent(r,{status:`executing`}));break;case`agent:quota-backoff`:{if(!r)break;let e=n;typeof e.targetAt==`string`&&typeof e.source==`string`&&t.setPendingQuotaBackoff(r,{targetAt:e.targetAt,resetsAt:e.resetsAt??null,source:e.source,reason:e.reason===`transient`?`transient`:`quota`});break}case`agent:quota-backoff-cancelled`:r&&(t.clearPendingQuotaBackoff(r),n.reason===`completed`&&t.fetchWorkspaces());break;case`autoloop:messages`:r&&t.fetchAutoLoopMessages(r).catch(()=>{});break;case`autoloop:state`:case`autoloop:enabled`:case`autoloop:iteration-started`:case`autoloop:ready-flipped`:t.fetchAutoLoopStates();break;case`autoloop:permission-overridden`:r&&dd(Q(`notification.autoLoopPermissionOverridden`,{name:t.workspaces.find(e=>e.id===r)?.name??``}),void 0,r);break;case`autoloop:waiting-for-slot`:{if(!r)break;let e=n,i=t.workspaces.find(e=>e.id===r)?.name??``;Bc.create({type:`info`,position:`top`,timeout:6e3,message:Q(`notification.autoLoopWaitingForSlot`,{name:i,running:e.running??0,limit:e.limit??0})});break}case`autoloop:disabled`:if(t.fetchAutoLoopStates(),r){let e=n?.reason,i=t.workspaces.find(e=>e.id===r)?.name??``,a=e===`error`?`notification.autoLoopError`:e===`stall`?`notification.autoLoopStalled`:e===`completed`?`notification.autoLoopCompleted`:e===`awaiting-clarification`?`notification.autoLoopAwaitingClarification`:null;a&&dd(Q(a,{name:i}),void 0,r)}break;case`workspace:create-progress`:{let e=typeof n.step==`string`?n.step:``,r=typeof n.creationId==`string`?n.creationId:``;r&&e&&t.setCreationProgress({creationId:r,step:e,index:typeof n.index==`number`?n.index:0,total:typeof n.total==`number`?n.total:0});break}case`workspace:create-failed`:{let e=typeof n.creationId==`string`?n.creationId:``,r=typeof n.step==`string`?n.step:``;e&&r&&t.setCreationProgress({creationId:e,step:r,index:-1,total:0});break}case`migration:progress`:case`migration:error`:Wn().update(n)}}}}),Nd=N({__name:`App`,setup(e){let t=Md(),n=Sc(),r=Z(),i=qu?window.parent.koboWorkspaceQueues:void 0,a;if(i)a=xc(r,i);else{let e=bc(r);window.koboWorkspaceQueues=e,a=()=>{e.dispose(),delete window.koboWorkspaceQueues}}return y(()=>{t.connect(),n.fetchTemplates(),od()}),p(()=>{a?.(),t.disconnect()}),(e,t)=>{let n=S(`router-view`);return h(),j(M,null,[w(n),w(is),w(gc)],64)}}}),Pd=e=>e,Fd=Pd,Id=Pd,Ld=Pd(()=>Ve()),Rd={true:`inset`,item:`item-inset`,"item-thumbnail":`item-thumbnail-inset`},zd={xs:2,sm:4,md:8,lg:16,xl:24},Bd=Me({name:`QSeparator`,props:{...Re,spaced:[Boolean,String],inset:[Boolean,String],vertical:Boolean,color:String,size:String},setup(e){let t=Le(),n=ze(e,t),r=A(()=>e.vertical?`vertical`:`horizontal`),i=A(()=>` q-separator--${r.value}`),a=A(()=>e.inset?`${i.value}-${Rd[e.inset]}`:``),o=A(()=>`q-separator${i.value}${a.value}`+(e.color===void 0?``:` bg-${e.color}`)+(n()?` q-separator--dark`:``)),s=A(()=>{let t={};if(e.size!==void 0&&(t[e.vertical?`width`:`height`]=e.size),e.spaced){let n=e.spaced===!0?`${zd.md}px`:e.spaced in zd?`${zd[e.spaced]}px`:e.spaced,r=e.vertical?[`Left`,`Right`]:[`Top`,`Bottom`];t[`margin${r[0]}`]=t[`margin${r[1]}`]=n}return t});return()=>f(`hr`,{class:o.value,style:s.value,"aria-orientation":r.value})}}),Vd=()=>f(`svg`,{key:`svg`,class:`q-radio__bg absolute non-selectable`,viewBox:`0 0 24 24`},[f(`path`,{d:`M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12`}),f(`path`,{class:`q-radio__check`,d:`M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6`})]);function Hd(e){(e.keyCode===13||e.keyCode===32)&&_e(e)}var Ud=Me({name:`QRadio`,props:{...Re,...re,...rt,modelValue:{required:!0},val:{required:!0},label:String,leftLabel:Boolean,checkedIcon:String,uncheckedIcon:String,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},emits:[`update:modelValue`],setup(n,{slots:r,emit:i}){let{proxy:a}=T(),o=Le(),s=ze(n,o),c=t(null),{refocusTargetEl:l,refocusTarget:u}=ot(n,c),d=A(()=>e(n.modelValue)===e(n.val)),p=A(()=>`q-radio cursor-pointer no-outline row inline no-wrap items-center`+(n.disable?` disabled`:``)+(s()?` q-radio--dark`:``)+(n.dense?` q-radio--dense`:``)+(n.leftLabel?` reverse`:``)),m=A(()=>{let e=n.color!==void 0&&(n.keepColor||d.value)?` text-${n.color}`:``;return`q-radio__inner relative-position q-radio__inner--${d.value?`truthy`:`falsy`}${e}`}),h=A(()=>(d.value?n.checkedIcon:n.uncheckedIcon)||null),g=A(()=>n.disable?-1:n.tabindex||0),_=it(()=>{let e={type:`radio`};return n.name!==void 0&&Object.assign(e,{".checked":d.value,"^checked":d.value?`checked`:void 0,name:n.name,value:n.val}),e});function v(e){e!==void 0&&(_e(e),u(e)),!n.disable&&!d.value&&i(`update:modelValue`,n.val,e)}function y(e){(e.keyCode===13||e.keyCode===32)&&v(e)}Object.assign(a,{set:v});let b=Vd();return()=>{let e=h.value===null?[b]:[f(`div`,{key:`icon`,class:`q-radio__icon-container absolute-full flex flex-center no-wrap`},[f(Ce,{class:`q-radio__icon`,name:h.value})])];n.disable||_(e,`unshift`,` q-radio__native q-ma-none q-pa-none`);let t=[f(`div`,{class:m.value,style:st(n.size),"aria-hidden":`true`},e)];l.value!==null&&t.push(l.value);let i=n.label===void 0?F(r.default):me(r.default,[n.label]);return i!==void 0&&t.push(f(`div`,{class:`q-radio__label q-anchor--skip`},i)),f(`div`,{ref:c,class:p.value,tabindex:g.value,role:`radio`,"aria-label":n.label,"aria-checked":d.value?`true`:`false`,"aria-disabled":n.disable?`true`:void 0,onClick:v,onKeydown:Hd,onKeyup:y},t)}}}),Wd=()=>f(`div`,{key:`svg`,class:`q-checkbox__bg absolute`},[f(`svg`,{class:`q-checkbox__svg fit absolute-full`,viewBox:`0 0 24 24`},[f(`path`,{class:`q-checkbox__truthy`,fill:`none`,d:`M1.73,12.91 8.1,19.28 22.79,4.59`}),f(`path`,{class:`q-checkbox__indet`,d:`M4,14H20V10H4`})])]),Gd=Me({name:`QCheckbox`,props:lt,emits:ct,setup(e){let t=Wd();function n(n,r){let i=A(()=>(n.value?e.checkedIcon:r.value?e.indeterminateIcon:e.uncheckedIcon)||null);return()=>i.value===null?[t]:[f(`div`,{key:`icon`,class:`q-checkbox__icon-container absolute-full flex flex-center no-wrap`},[f(Ce,{class:`q-checkbox__icon`,name:i.value})])]}return ut(`checkbox`,n)}}),Kd=Me({name:`QToggle`,props:{...lt,icon:String,iconColor:String},emits:ct,setup(e){function t(t,n){let r=A(()=>(t.value?e.checkedIcon:n.value?e.indeterminateIcon:e.uncheckedIcon)||e.icon),i=A(()=>t.value?e.iconColor:null);return()=>[f(`div`,{class:`q-toggle__track`}),f(`div`,{class:`q-toggle__thumb absolute flex flex-center no-wrap`},r.value===void 0?void 0:[f(Ce,{name:r.value,color:i.value})])]}return ut(`toggle`,t)}}),qd={radio:Ud,checkbox:Gd,toggle:Kd},Jd=Object.keys(qd);function Yd(e,t){if(typeof e==`function`)return e;let n=e===void 0?t:e;return e=>e[n]}var Xd=Me({name:`QOptionGroup`,props:{...Re,modelValue:{required:!0},options:{type:Array,validator:e=>e.every(Rt),default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],name:String,type:{type:String,default:`radio`,validator:e=>Jd.includes(e)},color:String,keepColor:Boolean,dense:Boolean,size:String,leftLabel:Boolean,inline:Boolean,disable:Boolean},emits:[`update:modelValue`],setup(n,{emit:r,slots:i}){let a=Le(),o=Array.isArray(n.modelValue);n.type===`radio`?o&&console.error(`q-option-group: model should not be array`):o||console.error(`q-option-group: model should be array in your case`);let s=ze(n,a),c=A(()=>qd[n.type]),l=t(null),u=A(()=>Yd(n.optionValue,`value`)),d=A(()=>Yd(n.optionLabel,`label`)),p=A(()=>Yd(n.optionDisable,`disable`)),m=A(()=>n.options.map(e=>({val:u.value(e),name:e.name===void 0?n.name:e.name,disable:n.disable||p.value(e),leftLabel:e.leftLabel===void 0?n.leftLabel:e.leftLabel,color:e.color===void 0?n.color:e.color,checkedIcon:e.checkedIcon,uncheckedIcon:e.uncheckedIcon,dark:e.dark===void 0?s():e.dark,size:e.size===void 0?n.size:e.size,dense:n.dense,keepColor:e.keepColor===void 0?n.keepColor:e.keepColor}))),h=A(()=>{let t=e(n.modelValue),r=m.value,i=r.findIndex(n=>!n.disable&&e(n.val)===t);return i===-1?r.findIndex(e=>!e.disable):i}),g=A(()=>`q-option-group q-gutter-x-sm`+(n.inline?` q-option-group--inline`:``)),_=A(()=>{let e={role:n.type===`radio`?`radiogroup`:`group`};return n.disable&&(e[`aria-disabled`]=`true`),e});function v(e){r(`update:modelValue`,e)}function y(t){let i=t.keyCode===37||t.keyCode===38?-1:+(t.keyCode===39||t.keyCode===40);if(i===0)return;let o=l.value.getElementsByClassName(`q-radio`),s=Array.prototype.indexOf.call(o,t.target);if(s===-1)return;_e(t);let c=(t.keyCode===37||t.keyCode===39)&&a.lang.rtl===!0?-i:i,u=m.value,d=u.length,f=s;do f=(f+c+d)%d;while(f!==s&&u[f].disable);f!==s&&(o[f].focus(),e(u[f].val)!==e(n.modelValue)&&r(`update:modelValue`,u[f].val))}return()=>f(`div`,{ref:l,class:g.value,..._.value,onKeydown:n.type===`radio`?y:void 0},n.options.map((e,t)=>{let r=i[`label-`+t]===void 0?i.label===void 0?void 0:()=>i.label(e):()=>i[`label-`+t](e);return f(`div`,[f(c.value,{label:r===void 0?d.value(e):null,modelValue:n.modelValue,"onUpdate:modelValue":v,...m.value[t],tabindex:n.type===`radio`?t===h.value?0:-1:void 0},r)])}))}}),Zd=()=>!0;function Qd(e){let t={};return e.forEach(e=>{t[e]=Zd}),t}function $d(e){return e===void 0?`programmatic`:e.type.indexOf(`key`)===0?`escape`:`backdrop`}function ef(){let{emit:e,proxy:n}=T(),r=t(null),i=null;function a(){i=null,r.value.show()}function o(){r.value.hide()}function s(t){e(`ok`,t),o()}function c(){i=`cancel`,o()}function l(t){e(`hide`,i===null?$d(t):i)}return Object.assign(n,{show:a,hide:o}),{dialogRef:r,onDialogHide:l,onDialogOK:s,onDialogCancel:c}}var tf=[`ok`,`hide`];ef.emits=tf,ef.emitsObject=Qd(tf);var nf=Me({name:`DialogPluginComponent`,props:{...Re,title:String,message:String,prompt:Object,options:Object,progress:[Boolean,Object],html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:`ok`,validator:e=>[`ok`,`cancel`,`none`].includes(e)},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]},emits:[`ok`,`hide`],setup(t){let n=Le(),r=ze(t,n),{dialogRef:i,onDialogHide:a,onDialogOK:o,onDialogCancel:s}=ef(),c=d(t.prompt===void 0?t.options===void 0?void 0:t.options.model:t.prompt.model),l=A(()=>`q-dialog-plugin`+(r()?` q-dialog-plugin--dark q-dark`:``)+(t.progress===!1?``:` q-dialog-plugin--progress`)),u=A(()=>t.color||(r()?`amber`:`primary`)),p=A(()=>t.progress===!1?null:Rt(t.progress)?{component:t.progress.spinner||Fe,props:{color:t.progress.color||u.value}}:{component:Fe,props:{color:u.value}}),h=A(()=>t.prompt!==void 0||t.options!==void 0),g=A(()=>{if(!h.value)return{};let{model:e,isValid:n,items:r,...i}=t.prompt===void 0?t.options:t.prompt;return i}),_=A(()=>Rt(t.ok)||t.ok===!0?n.lang.label.ok:t.ok),v=A(()=>Rt(t.cancel)||t.cancel===!0?n.lang.label.cancel:t.cancel),y=A(()=>t.prompt===void 0?t.options!==void 0&&t.options.isValid!==void 0&&!t.options.isValid(c.value):t.prompt.isValid!==void 0&&!t.prompt.isValid(c.value)),b=A(()=>({color:u.value,label:_.value,ripple:!1,disable:y.value,...Rt(t.ok)?t.ok:{flat:!0},"data-autofocus":t.focus===`ok`&&!h.value||void 0,onClick:S})),x=A(()=>({color:u.value,label:v.value,ripple:!1,...Rt(t.cancel)?t.cancel:{flat:!0},"data-autofocus":t.focus===`cancel`&&!h.value||void 0,onClick:s}));m(()=>t.prompt&&t.prompt.model,C),m(()=>t.options&&t.options.model,C);function S(){o(e(c.value))}function C(e){c.value=e}function w(e){!y.value&&t.prompt.type!==`textarea`&&ue(e,13)&&S()}function T(e,n){return t.html?f(Jt,{class:e,innerHTML:n}):f(Jt,{class:e},()=>n)}function E(){return[f(ic,{color:u.value,dense:!0,autofocus:!0,dark:r(),...g.value,modelValue:c.value,"onUpdate:modelValue":C,onKeyup:w})]}function D(){return[f(Xd,{color:u.value,options:t.options.items,dark:r(),...g.value,modelValue:c.value,"onUpdate:modelValue":C})]}function O(){let e=[];return t.cancel&&e.push(f(je,x.value)),t.ok&&e.push(f(je,b.value)),f(ac,{class:t.stackButtons?`items-end`:``,vertical:t.stackButtons,align:`right`},()=>e)}function k(){let e=[];return t.title&&e.push(T(`q-dialog__title`,t.title)),t.progress!==!1&&e.push(f(Jt,{class:`q-dialog__progress`},()=>f(p.value.component,p.value.props))),t.message&&e.push(T(`q-dialog__message`,t.message)),t.prompt===void 0?t.options!==void 0&&e.push(f(Bd,{dark:r()}),f(Jt,{class:`scroll q-dialog-plugin__form`},D),f(Bd,{dark:r()})):e.push(f(Jt,{class:`scroll q-dialog-plugin__form`},E)),(t.ok||t.cancel)&&e.push(O()),e}function j(){return[f(Qt,{class:[l.value,t.cardClass],style:t.cardStyle,dark:r()},k)]}return()=>f(zn,{ref:i,onHide:a},j)}});function rf(e,t){for(let n in t)n!==`spinner`&&Object(t[n])===t[n]&&!Array.isArray(t[n])?(e[n]=Object(e[n])===e[n]?{...e[n]}:{},rf(e[n],t[n])):e[n]=t[n]}function af(e,n,r){return i=>{let a,o,s=n&&i.component!==void 0;if(s){let{component:e,componentProps:t}=i;a=typeof e==`string`?r.component(e):e,o=t||{}}else{let{class:t,style:n,...r}=i;a=e,o=r,t!==void 0&&(r.cardClass=t),n!==void 0&&(r.cardStyle=n)}let c,l=!1,u=t(null),d=De(!1,`dialog`),p=e=>{if(u.value?.[e]!==void 0){u.value[e]();return}let t=c.$.subTree?.component;for(;t;){if(typeof t.proxy?.[e]==`function`){t.proxy[e]();return}t=t.subTree?.component}console.error(`[Quasar] Incorrectly defined Dialog component`)},m=[],h=[],g={onOk(e){return m.push(e),g},onCancel(e){return h.push(e),g},onDismiss(e){return m.push(e),h.push(e),g},hide(){return p(`hide`),g},update(e){if(c!==null){if(s)Object.assign(o,e);else{let{class:t,style:n,...r}=e;t!==void 0&&(r.cardClass=t),n!==void 0&&(r.cardStyle=n),rf(o,r)}c.$forceUpdate()}return g}},_=e=>{l=!0,m.forEach(t=>{t(e)})},y=e=>{b.unmount(d),L(d),b=null,c=null,l||h.forEach(t=>{t(e)})},b=Wt({name:`QGlobalDialog`,setup:()=>()=>f(a,{...o,ref:u,onOk:_,onHide:y,onVnodeMounted(...e){typeof o.onVnodeMounted==`function`&&o.onVnodeMounted(...e),v(()=>p(`show`))}})},r);return c=b.mount(d),g}}var of={install({$q:e,parentApp:t}){e.dialog=this.create=af(nf,!0,t)}},sf=new Map;function cf(e,t){sf.set(e,t)}function lf(e){sf.delete(e)}function uf(){let e=[];for(let[t,n]of sf)try{n()&&e.push(t)}catch{}return e}function df(){return uf().length>0}var ff=e=>e.startsWith(`/`);function pf(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function mf(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&pf(e.default)}var $=Object.assign;function hf(e,t){let n={};for(let r in t){let i=t[r];n[r]=_f(i)?i.map(e):e(i)}return n}var gf=()=>{},_f=Array.isArray;function vf(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var yf=Symbol(``),bf=function(e){return e[e.aborted=4]=`aborted`,e[e.cancelled=8]=`cancelled`,e[e.duplicated=16]=`duplicated`,e}({});function xf(e,t){return $(Error(),{type:e,[yf]:!0},t)}function Sf(e,t){return e instanceof Error&&yf in e&&(t==null||!!(e.type&t))}var Cf=Symbol(``),wf=Symbol(``),Tf=Symbol(``),Ef=Symbol(``),Df=Symbol(``);function Of(){return x(Tf)}function kf(e){return x(Ef)}var Af=typeof document<`u`,jf=/#/g,Mf=/&/g,Nf=/\//g,Pf=/=/g,Ff=/\?/g,If=/\+/g,Lf=/%5B/g,Rf=/%5D/g,zf=/%5E/g,Bf=/%60/g,Vf=/%7B/g,Hf=/%7C/g,Uf=/%7D/g,Wf=/%20/g;function Gf(e){return e==null?``:encodeURI(``+e).replace(Hf,`|`).replace(Lf,`[`).replace(Rf,`]`)}function Kf(e){return Gf(e).replace(Vf,`{`).replace(Uf,`}`).replace(zf,`^`)}function qf(e){return Gf(e).replace(If,`%2B`).replace(Wf,`+`).replace(jf,`%23`).replace(Mf,`%26`).replace(Bf,"`").replace(Vf,`{`).replace(Uf,`}`).replace(zf,`^`)}function Jf(e){return qf(e).replace(Pf,`%3D`)}function Yf(e){return Gf(e).replace(jf,`%23`).replace(Ff,`%3F`)}function Xf(e){return Yf(e).replace(Nf,`%2F`)}function Zf(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Qf=/\/$/,$f=e=>e.replace(Qf,``);function ep(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=cp(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Zf(o)}}function tp(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function np(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function rp(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&ip(t.matched[r],n.matched[i])&&ap(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ip(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ap(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!op(e[n],t[n]))return!1;return!0}function op(e,t){return _f(e)?sp(e,t):_f(t)?sp(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function sp(e,t){return _f(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function cp(e,t){if(ff(e))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`){if(s===`..`)a>1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var lp={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function up(e){if(!e){if(Af){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),$f(e)}var dp=/^[^#]+#/;function fp(e,t){return e.replace(dp,`#`)+t}function pp(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var mp=()=>history.scrollRestoration===`manual`?{left:window.scrollX,top:window.scrollY}:null;function hp(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=pp(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function gp(e,t){return(history.state?history.state.position-t:-1)+e}var _p=new Map;function vp(e){_p.set(e,mp())}function yp(e){let t=_p.get(e);return _p.delete(e),t}function bp(e){return typeof e==`string`||e&&typeof e==`object`}function xp(e){return typeof e==`string`||typeof e==`symbol`}function Sp(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(If,` `),i=r.indexOf(`=`),a=Zf(i<0?r:r.slice(0,i)),o=i<0?null:Zf(r.slice(i+1));if(a in t){let e=t[a];_f(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function Cp(e){let t=``;for(let n in e){let r=e[n];if(n=Jf(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(_f(r)?r.map(e=>e&&qf(e)):[r&&qf(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function wp(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=_f(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Tp(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ep(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(xf(4,{from:n,to:t})):e instanceof Error?c(e):bp(e)?c(xf(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Dp(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(t===`beforeRouteEnter`||o.instances[e]){if(pf(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Ep(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=mf(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Ep(c,n,r,o,e,i)()}))}}}return a}function Op(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>ip(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>ip(e,s))||i.push(s))}return[n,r,i]}var kp=()=>location.protocol+`//`+location.host;function Ap(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),np(n,``)}return np(n,e)+r+i}function jp(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Ap(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState($({},e.state,{scroll:mp()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),{pauseListeners:c,listen:l,destroy:d}}function Mp(e,t,n,r=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:null}}function Np(e){let{history:t,location:n}=window,r={value:Ap(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:kp()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,$({},t.state,Mp(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=$({},i.value,t.state,{forward:e,scroll:mp()});a(o.current,o,!0),a(e,$({},Mp(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Pp(e){e=up(e);let t=Np(e),n=jp(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=$({location:``,base:e,go:r,createHref:fp.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function Fp(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),Pp(e)}var Ip={type:0,value:``},Lp=/[a-zA-Z0-9_]/;function Rp(e){if(!e)return[[]];if(e===`/`)return[[Ip]];if(!ff(e))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:Lp.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`)}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var zp=`[^/]+?`,Bp={sensitive:!1,strict:!1,start:!0,end:!0},Vp=/[.+*?^${}()[\]/\\]/g;function Hp(e,t){let n=$({},Bp,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(Vp,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||zp;if(u!==zp){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(_f(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=_f(c)?c.join(`/`):c;if(!l){if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`)}n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Up(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Wp(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Up(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Gp(r))return 1;if(Gp(i))return-1}return i.length-r.length}function Gp(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var Kp={strict:!1,end:!0,sensitive:!1};function qp(e,t,n){let r=$(Hp(Rp(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Jp(e,t){let n=[],r=new Map;t=vf(Kp,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Xp(e);s.aliasOf=r&&r.record;let l=vf(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Xp($({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&!ff(u)){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=qp(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Qp(d)&&o(e.name)),nm(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:gf}function o(e){if(xp(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=em(e,n);n.splice(t,0,e),e.record.name&&!Qp(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw xf(1,{location:e});s=i.record.name,a=$(Yp(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Yp(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw xf(1,{location:e,currentLocation:t});s=i.record.name,a=$({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:$p(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Yp(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Xp(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Zp(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Zp(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Qp(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function $p(e){return e.reduce((e,t)=>$(e,t.meta),{})}function em(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;Wp(e,t[i])<0?r=i:n=i+1}let i=tm(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function tm(e){let t=e;for(;t=t.parent;)if(nm(t)&&Wp(e,t)===0)return t}function nm({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function rm(e){let t=x(Tf),n=x(Ef),r=A(()=>{let n=o(e.to);return t.resolve(n)}),i=A(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(ip.bind(null,i));if(o>-1)return o;let s=cm(e[t-2]);return t>1&&cm(i)===s&&a[a.length-1].path!==s?a.findIndex(ip.bind(null,e[t-2])):o}),a=A(()=>i.value>-1&&sm(n.params,r.value.params)),s=A(()=>i.value>-1&&i.value===n.matched.length-1&&ap(n.params,r.value.params));function c(n={}){if(om(n)){let n=t[o(e.replace)?`replace`:`push`](o(e.to)).catch(gf);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:A(()=>r.value.href),isActive:a,isExactActive:s,navigate:c}}function im(e){return e.length===1?e[0]:e}var am=N({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:rm,setup(e,{slots:t}){let n=a(rm(e)),{options:r}=x(Tf),i=A(()=>({[lm(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[lm(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&im(t.default(n));return e.custom?r:f(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function om(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function sm(e,t){for(let n in t){let r=t[n],i=e[n];if(_f(r)){if(!_f(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}else if(r!==i)return!1}return!0}function cm(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var lm=(e,t,n)=>e??t??n,um=N({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=x(Df),i=A(()=>e.route||r.value),a=x(wf,0),s=A(()=>{let e=o(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),c=A(()=>i.value.matched[s.value]);b(wf,A(()=>s.value+1)),b(Cf,c),b(Df,i);let l=d();return m(()=>[l.value,c.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!ip(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=c.value,s=o&&o.components[a];if(!s)return dm(n.default,{Component:s,route:r});let u=o.props[a],d=u?u===!0?r.params:typeof u==`function`?u(r):u:null,p=f(s,$({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:l}));return dm(n.default,{Component:p,route:r})||p}}});function dm(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var fm=um;function pm(e){let n=Jp(e.routes,e),i=e.parseQuery||Sp,a=e.stringifyQuery||Cp,s=e.history,c=Tp(),l=Tp(),u=Tp(),d=t(lp),f=t(0),p=lp;Af&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let m=hf.bind(null,e=>``+e),h=hf.bind(null,Xf),g=hf.bind(null,Zf);function _(e,t){let r,i;xp(e)?(r=n.getRecordMatcher(e),i=t):i=e;let a=n.addRoute(i,r);return f.value++,()=>{a(),f.value++}}function y(e){let t=n.getRecordMatcher(e);t&&(n.removeRoute(t),f.value++)}function b(){n.clearRoutes(),f.value++}function x(){return n.getRoutes().map(e=>e.record)}function S(e){return!!n.getRecordMatcher(e)}function C(e,t){if(f.value,typeof e==`string`){t||=e.startsWith(`/`)?lp:d.value;let r=ep(i,e,t.path),a=n.resolve({path:r.path},t),o=s.createHref(r.fullPath);return $(r,a,{params:g(a.params),redirectedFrom:void 0,href:o})}t=$({},t||(e.path!=null&&e.path.startsWith(`/`)&&!(`name`in e&&e.name)?lp:d.value));let r;if(e.path!=null)r=$({},e,{path:ep(i,e.path,t.path).path});else{let n=$({},e.params);for(let e in n)n[e]??delete n[e];r=$({},e,{params:h(n)}),t.params=h(t.params)}let o=n.resolve(r,t),c=e.hash||``;o.params=m(g(o.params));let l=tp(a,$({},e,{hash:Kf(c),path:o.path})),u=s.createHref(l);return $({fullPath:l,hash:c,query:a===Cp?wp(e.query):e.query||{}},o,{redirectedFrom:void 0,href:u})}function w(e){return typeof e==`string`?ep(i,e,d.value.path):$({},e)}function T(e,t){if(p!==e)return xf(8,{from:t,to:e})}function E(e){return k(e)}function D(e){return E($(w(e),{replace:!0}))}function O(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=w(i):{path:i},i.params={}),$({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function k(e,t){let n=p=C(e),r=d.value,i=e.state,o=e.force,s=e.replace===!0,c=O(n,r);if(c)return k($(w(c),{state:typeof c==`object`?$({},i,c.state):i,force:o,replace:s}),t||n);let l=n;l.redirectedFrom=t;let u;return!o&&rp(a,r,n)&&(u=xf(16,{to:l,from:r}),ce(r,r,!0,!1)),(u?Promise.resolve(u):M(l,r)).catch(e=>Sf(e)?Sf(e,2)?e:se(e):ae(e,l,r)).then(e=>{if(e){if(Sf(e,2))return k($({replace:s},w(e.to),{state:typeof e.to==`object`?$({},i,e.to.state):i,force:o}),t||l)}else e=te(l,r,!0,s,i);return ee(l,r,e),e})}function A(e,t){let n=T(e,t);return n?Promise.reject(n):Promise.resolve()}function j(e){let t=ue.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function M(e,t){let n,[r,i,a]=Op(e,t);n=Dp(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Ep(r,e,t))});let o=A.bind(null,e,t);return n.push(o),I(n).then(()=>{n=[];for(let r of c.list())n.push(Ep(r,e,t));return n.push(o),I(n)}).then(()=>{n=Dp(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Ep(r,e,t))});return n.push(o),I(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter){if(_f(r.beforeEnter))for(let i of r.beforeEnter)n.push(Ep(i,e,t));else n.push(Ep(r.beforeEnter,e,t))}return n.push(o),I(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Dp(a,`beforeRouteEnter`,e,t,j),n.push(o),I(n))).then(()=>{n=[];for(let r of l.list())n.push(Ep(r,e,t));return n.push(o),I(n)}).catch(e=>Sf(e,8)?e:Promise.reject(e))}function ee(e,t,n){u.list().forEach(r=>j(()=>r(e,t,n)))}function te(e,t,n,r,i){let a=T(e,t);if(a)return a;let o=t===lp,c=Af?history.state:{};n&&(r||o?s.replace(e.fullPath,$({scroll:o&&c&&c.scroll},i)):s.push(e.fullPath,i)),d.value=e,ce(e,t,n,o),se()}let N;function ne(){N||=s.listen((e,t,n)=>{if(!de.listening)return;let r=C(e),i=O(r,de.currentRoute.value);if(i){k($(i,{replace:!0,force:!0}),r).catch(gf);return}p=r;let a=d.value;Af&&n.delta&&vp(gp(a.fullPath,n.delta)),M(r,a).catch(e=>Sf(e,12)?e:Sf(e,2)?(k($(w(e.to),{force:!0}),r).then(e=>{Sf(e,20)&&!n.delta&&n.type===`pop`&&s.go(-1,!1)}).catch(gf),Promise.reject()):(n.delta&&s.go(-n.delta,!1),ae(e,r,a))).then(e=>{e||=te(r,a,!1),e&&(n.delta&&!Sf(e,8)?s.go(-n.delta,!1):n.type===`pop`&&Sf(e,20)&&s.go(-1,!1)),ee(r,a,e)}).catch(gf)})}let re=Tp(),ie=Tp(),P;function ae(e,t,n){se(e);let r=ie.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function oe(){return P&&d.value!==lp?Promise.resolve():new Promise((e,t)=>{re.add([e,t])})}function se(e){return P||(P=!e,ne(),re.list().forEach(([t,n])=>e?n(e):t()),re.reset()),e}function ce(t,n,r,i){let{scrollBehavior:a}=e;if(!Af||!a)return Promise.resolve();let o=!r&&yp(gp(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return v().then(()=>a(t,n,o)).then(e=>t===d.value&&e&&hp(e)).catch(e=>t===d.value&&ae(e,t,n))}let F=e=>s.go(e),le,ue=new Set,de={currentRoute:d,listening:!0,addRoute:_,removeRoute:y,clearRoutes:b,hasRoute:S,getRoutes:x,resolve:C,options:e,push:E,replace:D,go:F,back:()=>F(-1),forward:()=>F(1),beforeEach:c.add,beforeResolve:l.add,afterEach:u.add,onError:ie.add,isReady:oe,install(e){e.component(`RouterLink`,am),e.component(`RouterView`,fm),e.config.globalProperties.$router=de,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>o(d)}),Af&&!le&&d.value===lp&&(le=!0,E(s.location).catch(e=>{}));let t={};for(let e in lp)Object.defineProperty(t,e,{get:()=>d.value[e],enumerable:!0});e.provide(Tf,de),e.provide(Ef,r(t)),e.provide(Df,d);let n=e.unmount;ue.add(e),e.unmount=function(){ue.delete(e),ue.size<1&&(p=lp,N&&N(),N=null,d.value=lp,le=!1,P=!1),n()}}};function I(e){return e.reduce((e,t)=>e.then(()=>j(t)),Promise.resolve())}return de}var mm=[{path:`/`,component:()=>Gc(()=>import(`./MainLayout-D3zfT61Y.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41])),children:[{path:``,redirect:{name:`workspace`}},{path:`dashboard`,name:`dashboard`,component:()=>Gc(()=>import(`./DashboardPage-CZ2036MC.js`),__vite__mapDeps([42,1,2,3,4,43,10,5,11,14,21,22,23,26,35,37,44]))},{path:`workspace/:id?`,name:`workspace`,component:()=>Gc(()=>import(`./WorkspacePage-6lN4iF5W.js`).then(e=>e.t),__vite__mapDeps([45,1,2,3,46,6,4,7,5,8,9,10,11,12,31,32,14,15,16,17,18,19,20,47,26,27,28,22,35,48,49,50,39,30,25,33,34,24,29,36,37,38,40,51]))},{path:`split`,name:`split`,component:()=>Gc(()=>import(`./SplitWorkspacePage-BJKssJyI.js`),__vite__mapDeps([52,1,2,3,4,5,7,8,9,10,11,12,25,35,39,53]))},{path:`create`,name:`create`,component:()=>Gc(()=>import(`./CreatePage-COQwHyqL.js`),__vite__mapDeps([54,1,2,3,46,6,4,7,5,8,9,10,11,12,31,32,14,16,55,34,19,20,26,29,35,36,18,37,48,49,38,56]))},{path:`settings`,name:`settings`,component:()=>Gc(()=>import(`./SettingsPage-B9cLhFnO.js`),__vite__mapDeps([30,1,2,3,4,8,6,7,5,9,10,11,12,31,32,25,14,17,18,19,33,34,24,26,29,35,36,37,38,39,40]))},{path:`search`,name:`search`,component:()=>Gc(()=>import(`./SearchPage-COWnMxRZ.js`),__vite__mapDeps([57,1,2,3,10,4,5,11,16,22,35,36,14,18,37,50,58]))},{path:`health`,name:`health`,component:()=>Gc(()=>import(`./HealthPage-CnJWXfa8.js`),__vite__mapDeps([59,1,2,3,6,4,9,10,5,11,16,35,36,14,18,37,60]))},{path:`changelog`,name:`changelog`,component:()=>Gc(()=>import(`./ChangelogPage-OoOnn4q9.js`),__vite__mapDeps([61,1,2,3,10,4,5,11,15,12,35,36,14,18,37,62]))}]},{path:`/:catchAll(.*)*`,redirect:`/`}],hm=Id(()=>{let e=pm({scrollBehavior:()=>({left:0,top:0}),routes:mm,history:Fp()});e.beforeEach((e,t)=>{if(Qu(e,t)||e.fullPath===t.fullPath||!df())return!0;let n=Zc.global.t;return new Promise(e=>{of.create({title:n(`unsaved.title`),message:n(`unsaved.message`),dark:!0,cancel:{flat:!0,label:n(`unsaved.stay`),color:`grey-5`},ok:{flat:!0,label:n(`unsaved.leave`),color:`negative`}}).onOk(()=>e(!0)).onCancel(()=>e(!1))})});let t=()=>{let e=Z();return ed(df(),vc(e)?{}:e.queuedMessages)};return window.addEventListener(`beforeunload`,e=>{t()&&(e.preventDefault(),e.returnValue=``)}),qu&&(window.koboPane={hasUnsavedWork:t,ready:()=>e.currentRoute.value.name!=null,navigate:t=>e.push({name:`workspace`,params:{id:t}}),workspaceId:()=>typeof e.currentRoute.value.params.id==`string`?e.currentRoute.value.params.id:void 0}),e});async function gm(e,t){let n=e(Nd);n.use(qt,t);let r=typeof Ld==`function`?await Ld({}):Ld;n.use(r);let a=i(typeof hm==`function`?await hm({store:r}):hm);return r.use(({store:e})=>{e.router=a}),{app:n,store:r,router:a}}var _m={config:{dark:!0,brand:{primary:`#6c63ff`,secondary:`#26a69a`,accent:`#9c27b0`,dark:`#1a1a2e`,"dark-page":`#1a1a2e`,positive:`#21ba45`,negative:`#c10015`,info:`#31ccec`,warning:`#f2c037`}},plugins:{Notify:Bc,Dialog:of}},vm=function(){return!!(window.location.hostname===`localhost`||window.location.hostname===`[::1]`||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},ym;typeof window<`u`&&(ym=typeof Promise<`u`?new Promise(function(e){return window.addEventListener(`load`,e)}):{then:function(e){return window.addEventListener(`load`,e)}});function bm(e,t){t===void 0&&(t={});var n=t.registrationOptions;n===void 0&&(n={}),delete t.registrationOptions;var r=function(e){for(var n=[],r=arguments.length-1;r-->0;)n[r]=arguments[r+1];t&&t[e]&&t[e].apply(t,n)};`serviceWorker`in navigator&&ym.then(function(){vm()?(Cm(e,r,n),navigator.serviceWorker.ready.then(function(e){r(`ready`,e)}).catch(function(e){return xm(r,e)})):(Sm(e,r,n),navigator.serviceWorker.ready.then(function(e){r(`ready`,e)}).catch(function(e){return xm(r,e)}))})}function xm(e,t){navigator.onLine||e(`offline`),e(`error`,t)}function Sm(e,t,n){navigator.serviceWorker.register(e,n).then(function(e){if(t(`registered`,e),e.waiting){t(`updated`,e);return}e.onupdatefound=function(){t(`updatefound`,e);var n=e.installing;n.onstatechange=function(){n.state===`installed`&&(navigator.serviceWorker.controller?t(`updated`,e):t(`cached`,e))}}}).catch(function(e){return xm(t,e)})}function Cm(e,t,n){fetch(e).then(function(r){r.status===404?(t(`error`,Error(`Service worker not found at `+e)),wm()):r.headers.get(`content-type`).indexOf(`javascript`)===-1?(t(`error`,Error(`Expected `+e+` to have javascript content-type, but received `+r.headers.get(`content-type`))),wm()):Sm(e,t,n)}).catch(function(e){return xm(t,e)})}function wm(){`serviceWorker`in navigator&&navigator.serviceWorker.ready.then(function(e){e.unregister()}).catch(function(e){return xm(emit,e)})}bm(`/sw.js`);var Tm=`/`;async function Em({app:e,router:t,store:n},r){let i=!1,a=e=>{try{return t.resolve(e).href}catch{}return Object(e)===e?null:e},o=e=>{if(i=!0,typeof e==`string`&&/^https?:\/\//.test(e)){window.location.href=e;return}let t=a(e);t!==null&&(window.location.href=t,window.location.reload())},s=window.location.hash.slice(1)||`/`;for(let a=0;i===!1&&a<r.length;a++)try{await r[a]({app:e,router:t,store:n,ssrContext:null,redirect:o,urlPath:s,publicPath:Tm})}catch(e){i||console.error(`[Quasar] boot error:`,e);return}i||(e.use(t),e.mount(`#q-app`))}gm(Pe,_m).then(e=>{let[t,n]=Promise.allSettled===void 0?[`all`,e=>e.map(e=>e.default)]:[`allSettled`,e=>e.map(e=>{if(e.status===`rejected`){console.error(`[Quasar] boot error:`,e.reason);return}return e.value.default})];return Promise[t]([Gc(()=>import(`./i18n-KVkTJG-4.js`),[]),Gc(()=>import(`./network-auth-Dq0I5kjv.js`),[]),Gc(()=>import(`./notify-theme-vV3Rm4_v.js`),[])]).then(t=>{Em(e,n(t).filter(e=>typeof e==`function`))})});export{Zl as $,en as $t,Pu as A,ic as At,$l as B,zn as Bt,$u as C,Sc as Ct,Lu as D,cc as Dt,Vu as E,sc as Et,Du as F,ws as Ft,fu as G,Dn as Gt,nu as H,Fn as Ht,gu as I,Es as It,su as J,mn as Jt,mu as K,on as Kt,eu as L,ss as Lt,Eu as M,Cs as Mt,Tu as N,Rs as Nt,Iu as O,lc as Ot,ku as P,Ts as Pt,ql as Q,dn as Qt,iu as R,Bo as Rt,Xu as S,Cc as St,Gu as T,uc as Tt,cu as U,jn as Ut,ru as V,Pn as Vt,lu as W,En as Wt,hu as X,tn as Xt,ou as Y,an as Yt,Kl as Z,fn as Zt,fd as _,Zc as _t,cf as a,Vt as an,wl as at,qu as b,Gc as bt,Kd as c,dl as ct,Bd as d,ol as dt,$t as en,Hl as et,Fd as f,sl as ft,md as g,nl as gt,pd as h,al as ht,Of as i,Lt as in,Sl as it,Au as j,rc as jt,ju as k,ac as kt,Gd as l,X as lt,gd as m,il as mt,Sf as n,Zt as nn,Z as nt,lf as o,Rt as on,gl as ot,Md as p,cl as pt,du as q,rn as qt,kf as r,Jt as rn,bl as rt,Xd as s,_l as st,bf as t,Qt as tn,El as tt,Ud as u,ul as ut,ud as v,Xc as vt,Ku as w,fc as wt,Yu as x,Bc as xt,Ju as y,tl as yt,tu as z,Un as zt};