lantern-harness 0.1.3 → 0.1.5

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 (126) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +9 -9
  3. package/builtin/session/lh-nav-groups.mjs +106 -9
  4. package/cli/data-root.mjs +30 -0
  5. package/cli/lantern.mjs +34 -6
  6. package/cli/server.mjs +4 -0
  7. package/config/app.defaults.json +5 -1
  8. package/dist/500.html +18 -4
  9. package/dist/_astro/Base.CVuoZiOB.css +1 -0
  10. package/dist/_astro/{Base.astro_astro_type_script_index_0_lang.Cg_8YLVA.js → Base.astro_astro_type_script_index_0_lang.BY4OccDH.js} +1 -1
  11. package/dist/_astro/CaseExecBoard.GIKQ6ccZ.js +1 -0
  12. package/dist/_astro/CaseGenerateApp.CGAvw04r.js +9 -0
  13. package/dist/_astro/CasesLibrary.Bz6ol7zL.js +1 -0
  14. package/dist/_astro/ChatApp.DZtDZRst.js +273 -0
  15. package/dist/_astro/ConfirmDialog.CBVsDJ8f.js +1 -0
  16. package/dist/_astro/DashboardBoard.CiTrVBqY.js +5 -0
  17. package/dist/_astro/DatePicker.CMfX7F6z.js +1 -0
  18. package/dist/_astro/DocsFileBrowser.CBXAmRPO.js +1 -0
  19. package/dist/_astro/DocsPager.CPwAnvW_.js +1 -0
  20. package/dist/_astro/DrawerField.KANqQwFl.js +1 -0
  21. package/dist/_astro/KnowledgeLibrary._QhB3GHk.js +1 -0
  22. package/dist/_astro/NamePromptDialog.Dl5kSnQI.js +1 -0
  23. package/dist/_astro/NavLibraries.fxwcz0b0.js +1 -0
  24. package/dist/_astro/PluginsPage.BfG3nVYJ.js +1 -0
  25. package/dist/_astro/PluginsPage.n_0T_ww4.js +39 -0
  26. package/dist/_astro/PromptsLibrary.BLPVH34I.js +1 -0
  27. package/dist/_astro/ReportsPage.DMk4sUqZ.js +1 -0
  28. package/dist/_astro/RequirementsLibrary.CyYBiauz.js +1 -0
  29. package/dist/_astro/SearchableSelect.yFomIhKQ.js +1 -0
  30. package/dist/_astro/SelectDropdown.flhHcwyd.js +1 -0
  31. package/dist/_astro/SettingsDialog.DrVaJAbf.js +1 -0
  32. package/dist/_astro/SpaceSwitcher.C84a-OBd.js +7 -0
  33. package/dist/_astro/TagSelect.u8DTop7v.js +1 -0
  34. package/dist/_astro/TasksBoard.Dwva6gEQ.js +1 -0
  35. package/dist/_astro/TemplatesLibrary.DV_MUASP.js +1 -0
  36. package/dist/_astro/TestStatsBoard.Cl6mBowv.js +1 -0
  37. package/dist/_astro/TodosBoard.BTl5qvQt.js +1 -0
  38. package/dist/_astro/active-element-history.CeefGkFQ.js +1 -0
  39. package/dist/_astro/app-config.BAFE-Tim.js +1 -0
  40. package/dist/_astro/case-exec.HjGrOY_O.js +1 -0
  41. package/dist/_astro/dialog.DXHznyjD.js +1 -0
  42. package/dist/_astro/i18n.DFwWWvim.js +7 -0
  43. package/dist/_astro/listbox.Di-t5U37.js +1 -0
  44. package/dist/_astro/menu.Bkluqxic.js +1 -0
  45. package/dist/_astro/{open-docs-in-session.fLwnA5qh.js → open-docs-in-session.D7Hxuu0K.js} +1 -1
  46. package/dist/_astro/plugins.BHRarX88.js +1 -0
  47. package/dist/_astro/portal.Cm9XlIPf.js +5 -0
  48. package/dist/_astro/report-prompt.Cmw4XzfY.js +1 -0
  49. package/dist/_astro/{settings.CkbipdPI.js → settings.1aF-h9sh.js} +2 -2
  50. package/dist/_astro/tasks.hIKi1ek-.js +1 -0
  51. package/dist/_astro/test-stats.BIHEJz5c.js +1 -0
  52. package/dist/_astro/use-text-value.BuY0Cm1z.js +1 -0
  53. package/dist/_astro/use-tree-walker.CfTHFX43.js +1 -0
  54. package/dist/_astro/useListAnim.CpGB1cft.js +1 -0
  55. package/dist/_astro/view-prefs.DHPN5Yq6.js +1 -0
  56. package/dist/case-exec/index.html +267 -0
  57. package/dist/cases/generate/index.html +19 -5
  58. package/dist/cases/library/index.html +19 -5
  59. package/dist/cn-holidays.json +42 -0
  60. package/dist/dashboard/index.html +268 -0
  61. package/dist/docs/changelog/index.html +81 -5
  62. package/dist/docs/install/index.html +21 -7
  63. package/dist/docs/manual/index.html +124 -19
  64. package/dist/index.html +19 -5
  65. package/dist/knowledge/index.html +19 -5
  66. package/dist/knowledge//345/212/237/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/347/274/226/345/206/231/350/247/204/350/214/203/index.html +18 -4
  67. package/dist/plugins/index.html +19 -5
  68. package/dist/prompts/index.html +19 -5
  69. package/dist/reports/index.html +267 -0
  70. package/dist/requirements/index.html +19 -5
  71. package/dist/tasks/index.html +19 -5
  72. package/dist/templates/index.html +19 -5
  73. package/dist/templates//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +18 -4
  74. package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +18 -4
  75. package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +18 -4
  76. package/dist/templates//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +18 -4
  77. package/dist/templates//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +18 -4
  78. package/dist/test-stats/index.html +267 -0
  79. package/dist/todos/index.html +19 -5
  80. package/docs//345/205/250/345/261/200/346/217/222/344/273/266.md +1 -1
  81. package/docs//345/256/211/350/243/205/346/211/213/345/206/214.md +3 -3
  82. package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +106 -34
  83. package/lh-plugins/lh-project-docs.mjs +1 -1
  84. package/lh-plugins/lh-reports.mjs +413 -0
  85. package/lh-plugins/lh-stats.mjs +409 -0
  86. package/lh-plugins/lh-tasks.mjs +7 -6
  87. package/lh-plugins/lh-todos.mjs +7 -9
  88. package/lh-plugins/lh-work-store.mjs +81 -0
  89. package/lh-plugins/storage-domain.mjs +54 -4
  90. package/package.json +3 -1
  91. package/config/seeds//346/217/220/347/244/272/350/257/215/347/256/241/347/220/206//345/212/237/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/346/217/220/347/244/272/350/257/215v1.0.md +0 -155
  92. package/dist/_astro/Base.ByB0D4ZA.css +0 -1
  93. package/dist/_astro/CaseGenerateApp.BlZyjWEr.js +0 -9
  94. package/dist/_astro/CasesLibrary.C76La3Xj.js +0 -1
  95. package/dist/_astro/ChatApp.gfsPLvan.js +0 -269
  96. package/dist/_astro/ConfirmDialog.BYz4HREM.js +0 -1
  97. package/dist/_astro/DatePicker.BdwFRioL.js +0 -1
  98. package/dist/_astro/DocsFileBrowser.BxAyrkkw.js +0 -1
  99. package/dist/_astro/KnowledgeLibrary.Cv488Hot.js +0 -1
  100. package/dist/_astro/NamePromptDialog.DGBlDH_k.js +0 -1
  101. package/dist/_astro/NavLibraries.ALZ9e12z.js +0 -1
  102. package/dist/_astro/PluginsPage.B2uxCiHL.js +0 -1
  103. package/dist/_astro/PluginsPage.DEkyOfQE.js +0 -39
  104. package/dist/_astro/PromptsLibrary.BUC1OiCH.js +0 -1
  105. package/dist/_astro/RequirementsLibrary.D3olQI63.js +0 -1
  106. package/dist/_astro/SearchableSelect.DP74JRWW.js +0 -1
  107. package/dist/_astro/SelectDropdown.D2i7-lQC.js +0 -1
  108. package/dist/_astro/SettingsDialog.CrMDjSLJ.js +0 -1
  109. package/dist/_astro/SlideOverDrawer.C7UVeCX1.js +0 -1
  110. package/dist/_astro/SpaceSwitcher.Wf8EPYUx.js +0 -7
  111. package/dist/_astro/TasksBoard.2j7rGT9O.js +0 -1
  112. package/dist/_astro/TemplatesLibrary.J0x7yIcY.js +0 -1
  113. package/dist/_astro/TodosBoard.BugeB7_7.js +0 -1
  114. package/dist/_astro/app-config.vqDkEMS3.js +0 -1
  115. package/dist/_astro/i18n.9qZsrs3u.js +0 -7
  116. package/dist/_astro/listbox.DdDDDJ5Z.js +0 -1
  117. package/dist/_astro/menu.CqkL87bV.js +0 -1
  118. package/dist/_astro/plugins.DSUPSizB.js +0 -1
  119. package/dist/_astro/portal.C3KrUREL.js +0 -5
  120. package/dist/_astro/use-text-value.C0IDspmh.js +0 -1
  121. package/dist/_astro/use-tree-walker.oRTnhHS-.js +0 -1
  122. package/dist/_astro/useListAnim.Y3N2budK.js +0 -1
  123. /package/dist/{apple-touch-icon.png → brand/apple-touch-icon.png} +0 -0
  124. /package/dist/{brand-mark.png → brand/brand-mark.png} +0 -0
  125. /package/dist/{favicon.png → brand/favicon.png} +0 -0
  126. /package/dist/{icon-192.png → brand/icon-192.png} +0 -0
@@ -0,0 +1 @@
1
+ var e=`/__tb_reports`,t={day:`日报`,week:`周报`,month:`月报`};async function n(t){let n=await fetch(`${e}/sync`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:t})});if(!n.ok)throw Error(`同步工作汇报提示词失败(${n.status})`);return await n.json()}async function r(){let t=await fetch(`${e}/prompts`,{signal:AbortSignal.timeout(3e3)});if(!t.ok)throw Error(`读取提示词列表失败(${t.status})`);return await t.json()}async function i(t){let n=await fetch(`${e}/select`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({file:t})});if(!n.ok)throw Error(`切换提示词失败(${n.status})`);let r=await n.json();return typeof r.promptFile==`string`?r.promptFile:t}async function a(){let t=await fetch(`${e}/prompt`,{signal:AbortSignal.timeout(2e3)});if(!t.ok)return``;let n=await t.json();return typeof n.content==`string`?n.content.trim():``}async function o(t){let n=await fetch(`${e}/list?kind=${t}`,{signal:AbortSignal.timeout(4e3)});if(!n.ok)throw Error(`读取汇报列表失败(${n.status})`);return await n.json()}async function s(t,n){let r=await fetch(`${e}/open`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:t,name:n}),signal:AbortSignal.timeout(4e3)});if(r.ok)return;let i=`打开失败(${r.status})`;try{let e=((await r.json()).error??``).trim();e&&/^not found$/i.test(e)?i=`本地服务版本较旧(缺少「打开文件」接口),请重启本地服务后再试`:e&&(i=e)}catch{}throw Error(i)}export{s as a,o as i,a as n,i as o,r,n as s,t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/i18n.9qZsrs3u.js","_astro/react-dom.CqAxpHMt.js"])))=>i.map(i=>d[i]);
2
- import{c as e,l as t,o as n,r,s as i,t as a,u as o}from"./app-config.vqDkEMS3.js";var s=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),c=function(e){return`/`+e},l={},u=function(e){return e.pathname.endsWith(`.css`)},d=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},f=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,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 f(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=c(t,n);let r=f(t),i=u(r);return d(l,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:s,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).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)})},p=[{label:`DeepSeek`,baseURL:`https://api.deepseek.com/v1`,model:``},{label:`通义千问`,baseURL:`https://dashscope.aliyuncs.com/compatible-mode/v1`,model:`qwen-plus`},{label:`OpenAI`,baseURL:`https://api.openai.com/v1`,model:`gpt-4o-mini`},{label:`自定义`,baseURL:``,model:``}],m=`tw-settings-changed`,h=`tw-open-settings`;function g(){return t()}function _(){return n()}function v(){return r().model.activeId}function y(t){let n=r(),s=[...n.model.providers],c=n.model.activeId,l=s.findIndex(e=>e.id===c);if(l<0){let e=i();s.push({id:e,name:`默认`,baseURL:t.baseURL.trim(),apiKey:t.apiKey.trim()||void 0,model:t.model.trim(),availableModels:t.availableModels}),c=e}else s[l]={...s[l],baseURL:t.baseURL.trim(),apiKey:t.apiKey.trim()||void 0,model:t.model.trim(),availableModels:t.availableModels};e(t.apiKey),o({model:{...n.model,activeId:c,reasoningEffort:t.reasoningEffort??n.model.reasoningEffort,providers:s}}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m))}function b(e,t){let n=r(),i=[...n.model.providers],s=i.findIndex(t=>t.id===e.id),c={...e,name:e.name.trim()||`未命名提供商`,baseURL:e.baseURL.trim(),model:e.model.trim(),apiKey:e.apiKey?.trim()||void 0};s>=0?i[s]=c:i.push(c);let l=t?.activate===!1&&n.model.activeId||c.id;return o({model:{...n.model,providers:i,activeId:l}}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m)),i}function x(e){let t=r(),n=t.model.providers.filter(t=>t.id!==e),i=t.model.activeId;return i===e&&(i=n[0]?.id??``),o({model:{...t.model,providers:n,activeId:i}}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m)),n}function S(e){let t=r();t.model.providers.some(t=>t.id===e)&&(o({model:{...t.model,activeId:e}}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m)))}function C(e){let t=g();t&&y({...t,...e})}var w=`tw-access-changed`;function T(){return r().access}function E(e){o({access:e}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(w,{detail:e}))}function D(e){if(typeof window>`u`)return()=>{};let t=t=>{let n=t.detail;e(n??T())};return window.addEventListener(w,t),()=>window.removeEventListener(w,t)}function O(e){return window.addEventListener(m,e),()=>window.removeEventListener(m,e)}function k(e=`general`){window.dispatchEvent(new CustomEvent(h,{detail:{tab:e}}))}var A=`tw-general-prefs-changed`;function j(){return{...r().general}}function M(e){let t={...j(),...e};return t.sessionFontSize<12&&(t.sessionFontSize=12),t.sessionFontSize>22&&(t.sessionFontSize=22),o({general:t}),a(),L(t),typeof window<`u`&&window.dispatchEvent(new CustomEvent(A,{detail:t})),t}function N(e){if(typeof window>`u`)return()=>{};let t=t=>{e(t.detail??j())};return window.addEventListener(A,t),()=>window.removeEventListener(A,t)}var P=null,F=null;function I(e){return e===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e}function L(e=j()){if(typeof document>`u`)return;let t=document.documentElement,n=I(e.appearance);t.dataset.theme=n,t.style.colorScheme=n,t.lang=e.language===`en`?`en`:`zh-CN`;let r=`${e.sessionFontSize}px`;t.style.setProperty(`--tw-ui-font-size`,r),t.style.setProperty(`--tw-session-font-size`,r),t.style.fontSize=``,P&&F&&(P.removeEventListener(`change`,F),P=null,F=null),e.appearance===`system`&&(P=window.matchMedia(`(prefers-color-scheme: dark)`),F=()=>{let e=I(`system`);t.dataset.theme=e,t.style.colorScheme=e},P.addEventListener(`change`,F));try{f(()=>import(`./i18n.9qZsrs3u.js`).then(e=>e.t).then(t=>t.applyDomI18n(e.language)),__vite__mapDeps([0,1]))}catch{}}export{S as _,v as a,_ as c,N as d,O as f,M as g,E as h,x as i,g as l,C as m,p as n,T as o,k as p,L as r,j as s,h as t,D as u,b as v,f as y};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/i18n.DFwWWvim.js","_astro/react-dom.CqAxpHMt.js"])))=>i.map(i=>d[i]);
2
+ import{c as e,l as t,o as n,r,s as i,t as a,u as o}from"./app-config.BAFE-Tim.js";var s=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),c=function(e){return`/`+e},l={},u=function(e){return e.pathname.endsWith(`.css`)},d=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},f=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,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 f(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=c(t,n);let r=f(t),i=u(r);return d(l,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:s,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).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)})},p=[{label:`DeepSeek`,baseURL:`https://api.deepseek.com/v1`,model:``},{label:`通义千问`,baseURL:`https://dashscope.aliyuncs.com/compatible-mode/v1`,model:`qwen-plus`},{label:`OpenAI`,baseURL:`https://api.openai.com/v1`,model:`gpt-4o-mini`},{label:`自定义`,baseURL:``,model:``}],m=`tw-settings-changed`,h=`tw-open-settings`;function g(){return t()}function _(){return n()}function v(){return r().model.activeId}function y(t){let n=r(),s=[...n.model.providers],c=n.model.activeId,l=s.findIndex(e=>e.id===c);if(l<0){let e=i();s.push({id:e,name:`默认`,baseURL:t.baseURL.trim(),apiKey:t.apiKey.trim()||void 0,model:t.model.trim(),availableModels:t.availableModels}),c=e}else s[l]={...s[l],baseURL:t.baseURL.trim(),apiKey:t.apiKey.trim()||void 0,model:t.model.trim(),availableModels:t.availableModels};e(t.apiKey),o({model:{...n.model,activeId:c,reasoningEffort:t.reasoningEffort??n.model.reasoningEffort,providers:s}}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m))}function b(e,t){let n=r(),i=[...n.model.providers],s=i.findIndex(t=>t.id===e.id),c={...e,name:e.name.trim()||`未命名提供商`,baseURL:e.baseURL.trim(),model:e.model.trim(),apiKey:e.apiKey?.trim()||void 0};s>=0?i[s]=c:i.push(c);let l=t?.activate===!1&&n.model.activeId||c.id;return o({model:{...n.model,providers:i,activeId:l}}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m)),i}function x(e){let t=r(),n=t.model.providers.filter(t=>t.id!==e),i=t.model.activeId;return i===e&&(i=n[0]?.id??``),o({model:{...t.model,providers:n,activeId:i}}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m)),n}function S(e){let t=r();t.model.providers.some(t=>t.id===e)&&(o({model:{...t.model,activeId:e}}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m)))}function C(e){let t=g();t&&y({...t,...e})}var w=`tw-access-changed`;function T(){return r().access}function E(e){o({access:e}),a(),typeof window<`u`&&window.dispatchEvent(new CustomEvent(w,{detail:e}))}function D(e){if(typeof window>`u`)return()=>{};let t=t=>{let n=t.detail;e(n??T())};return window.addEventListener(w,t),()=>window.removeEventListener(w,t)}function O(e){return window.addEventListener(m,e),()=>window.removeEventListener(m,e)}function k(e=`general`){window.dispatchEvent(new CustomEvent(h,{detail:{tab:e}}))}var A=`tw-general-prefs-changed`;function j(){return{...r().general}}function M(e){let t={...j(),...e};return t.sessionFontSize<12&&(t.sessionFontSize=12),t.sessionFontSize>22&&(t.sessionFontSize=22),o({general:t}),a(),L(t),typeof window<`u`&&window.dispatchEvent(new CustomEvent(A,{detail:t})),t}function N(e){if(typeof window>`u`)return()=>{};let t=t=>{e(t.detail??j())};return window.addEventListener(A,t),()=>window.removeEventListener(A,t)}var P=null,F=null;function I(e){return e===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e}function L(e=j()){if(typeof document>`u`)return;let t=document.documentElement,n=I(e.appearance);t.dataset.theme=n,t.style.colorScheme=n,t.lang=e.language===`en`?`en`:`zh-CN`;let r=`${e.sessionFontSize}px`;t.style.setProperty(`--tw-ui-font-size`,r),t.style.setProperty(`--tw-session-font-size`,r),t.style.fontSize=``,P&&F&&(P.removeEventListener(`change`,F),P=null,F=null),e.appearance===`system`&&(P=window.matchMedia(`(prefers-color-scheme: dark)`),F=()=>{let e=I(`system`);t.dataset.theme=e,t.style.colorScheme=e},P.addEventListener(`change`,F));try{f(()=>import(`./i18n.DFwWWvim.js`).then(e=>e.t).then(t=>t.applyDomI18n(e.language)),__vite__mapDeps([0,1]))}catch{}}export{S as _,v as a,_ as c,N as d,O as f,M as g,E as h,x as i,g as l,C as m,p as n,T as o,k as p,L as r,j as s,h as t,D as u,b as v,f as y};
@@ -0,0 +1 @@
1
+ var e=`/__tb_todos`,t=[`pending`,`in_progress`,`done`,`cancelled`],n=[`urgent_important`,`important`,`urgent`,`normal`],r={pending:`待开始`,in_progress:`进行中`,done:`已完成`,cancelled:`已取消`,overdue:`已延期`},i={urgent_important:`重要紧急`,important:`重要不紧急`,urgent:`紧急不重要`,normal:`普通`,"":`—`},a=new Set(t),o=new Set(n),s=/^\d{4}-\d{2}-\d{2}$/;function c(e,t=2e3){return typeof e==`string`?e.trim().slice(0,t):``}function l(e){let t=c(e,10);return s.test(t)?t:``}function u(e){return typeof e==`string`&&a.has(e)}function d(e){return typeof e==`string`&&o.has(e)}function f(e){return e===`done`||e===`cancelled`}function p(e){if(!e||typeof e!=`object`)return null;let t=e,n=c(t.title,200);if(!n)return null;let r={title:n};return u(t.status)&&(r.status=t.status),d(t.priority)&&(r.priority=t.priority),`linkedTask`in t&&(r.linkedTask=c(t.linkedTask,200)),`taskId`in t&&(r.taskId=c(t.taskId,64)),`startDate`in t&&(r.startDate=l(t.startDate)),`dueDate`in t&&(r.dueDate=l(t.dueDate)),`note`in t&&(r.note=c(t.note)),r}function m(e){if(!e||typeof e!=`object`)return null;let t=e,n=c(t.title,200);if(!n)return null;let r=new Date().toISOString(),i=u(t.status)?t.status:`pending`;return{id:c(t.id,64)||`td_${Math.random().toString(16).slice(2,10)}`,title:n,status:i,priority:d(t.priority)?t.priority:``,linkedTask:c(t.linkedTask,200),taskId:c(t.taskId,64),startDate:l(t.startDate),dueDate:l(t.dueDate),taskEndDate:f(i)?l(t.taskEndDate):``,note:c(t.note),source:t.source===`ai`?`ai`:`manual`,sessionId:c(t.sessionId,120),createdAt:c(t.createdAt,40)||r,updatedAt:c(t.updatedAt,40)||r,doneAt:c(t.doneAt,40)||null}}async function h(t,n,r=``){let i=await fetch(`${e}${r}`,{method:t,headers:n===void 0?void 0:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n)}),a=await i.json().catch(()=>({}));if(!i.ok)throw Error(a.error||`HTTP ${i.status}`);return a}async function g(){try{return(await fetch(`${e}?health=1`,{signal:AbortSignal.timeout(1500)})).ok}catch{return!1}}async function _(){let e=await h(`GET`);return(Array.isArray(e.items)?e.items:[]).map(m).filter(e=>!!e)}async function v(e,t){let n=await h(`POST`,{items:e,...t});return(Array.isArray(n.items)?n.items:[]).map(m).filter(e=>!!e)}async function y(e,t){let n=m((await h(`PUT`,{id:e,...t})).item);if(!n)throw Error(`更新待办失败`);return n}async function b(e){let t=await h(`DELETE`,{ids:e});return Number(t.removed??0)}function x(e=new Date){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function S(e){let[t,n,r]=e.split(`-`).map(Number);return Date.UTC(t,(n??1)-1,r??1)}function C(e,t){return!s.test(e)||!s.test(t)?null:Math.round((S(t)-S(e))/864e5)}function w(e){let t=C(e.startDate,e.dueDate);return t===null?null:t+1}function T(e,t=x()){return C(t,e.dueDate)}function E(e){return f(e.status)?e.taskEndDate:``}function D(e,t=x()){if(e.status===`done`||e.status===`cancelled`)return e.status;let n=T(e,t);return n!==null&&n<0?`overdue`:e.status}function O(e){let t=e=>e===`in_progress`?0:e===`pending`?1:e===`done`?2:3,n=e=>e===`urgent_important`?0:e===`important`?1:e===`urgent`?2:e===`normal`?3:4;return[...e].sort((e,r)=>{let i=t(e.status)-t(r.status);if(i!==0)return i;let a=e.dueDate||`9999-12-31`,o=r.dueDate||`9999-12-31`;if(a!==o)return a<o?-1:1;let s=n(e.priority)-n(r.priority);return s===0?e.createdAt<r.createdAt?1:-1:s})}function k(e,t={}){let n=t.status??`all`,r=t.priority??`all`,i=(t.keyword??``).trim().toLowerCase(),a=t.today??x();return e.filter(e=>!(n!==`all`&&D(e,a)!==n||r!==`all`&&e.priority!==r||i&&!`${e.title} ${e.linkedTask} ${e.note}`.toLowerCase().includes(i)))}var A=`/__tb_tasks`,j=[`pool`,`in_progress`,`done`,`closed`,`cancelled`],M=[`urgent_important`,`important`,`urgent`,`normal`],N={pool:`任务池`,in_progress:`进行中`,done:`已完成`,closed:`已关闭`,cancelled:`已取消`},P={urgent_important:`重要紧急`,important:`重要不紧急`,urgent:`紧急不重要`,normal:`普通`,"":`—`},F=new Set(j),I=new Set(M),L=/^\d{4}-\d{2}-\d{2}$/;function R(e,t=2e3){return typeof e==`string`?e.trim().slice(0,t):``}function z(e){let t=R(e,10);return L.test(t)?t:``}function B(e){return typeof e==`string`&&F.has(e)}function V(e){return typeof e==`string`&&I.has(e)}function H(e){if(!e||typeof e!=`object`)return null;let t=e,n=R(t.title,200);if(!n)return null;let r={title:n};return B(t.status)&&(r.status=t.status),V(t.priority)&&(r.priority=t.priority),`startDate`in t&&(r.startDate=z(t.startDate)),`dueDate`in t&&(r.dueDate=z(t.dueDate)),`note`in t&&(r.note=R(t.note)),r}function U(e){if(!e||typeof e!=`object`)return null;let t=e,n=R(t.title,200);if(!n)return null;let r=new Date().toISOString();return{id:R(t.id,64)||`tk_${Math.random().toString(16).slice(2,10)}`,title:n,status:B(t.status)?t.status:`pool`,priority:V(t.priority)?t.priority:``,startDate:z(t.startDate),dueDate:z(t.dueDate),note:R(t.note),source:t.source===`ai`?`ai`:`manual`,sessionId:R(t.sessionId,120),createdAt:R(t.createdAt,40)||r,updatedAt:R(t.updatedAt,40)||r,doneAt:R(t.doneAt,40)||null}}async function W(e,t){let n=await fetch(A,{method:e,headers:t===void 0?void 0:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error||`HTTP ${n.status}`);return r}async function G(){try{return(await fetch(`${A}?health=1`,{signal:AbortSignal.timeout(1500)})).ok}catch{return!1}}async function K(){let e=await W(`GET`);return(Array.isArray(e.items)?e.items:[]).map(U).filter(e=>!!e)}async function q(e,t){let n=await W(`POST`,{items:e,...t});return(Array.isArray(n.items)?n.items:[]).map(U).filter(e=>!!e)}async function J(e,t){let n=U((await W(`PUT`,{id:e,...t})).item);if(!n)throw Error(`更新任务失败`);return n}async function Y(e){let t=await W(`DELETE`,{ids:e});return Number(t.removed??0)}function X(e){let[t,n,r]=e.split(`-`).map(Number);return Date.UTC(t,(n??1)-1,r??1)}function Z(e){return!L.test(e.startDate)||!L.test(e.dueDate)?null:Math.round((X(e.dueDate)-X(e.startDate))/864e5)+1}function Q(e){let t={};for(let n of e){let e=n.taskId?.trim();if(!e)continue;let r=t[e]??={total:0,done:0,percent:0};r.total+=1,n.status===`done`&&(r.done+=1)}for(let e of Object.values(t))e.percent=e.total?Math.round(e.done/e.total*100):0;return t}function $(e,t={}){let n=t.status??`all`,r=t.priority??`all`,i=(t.keyword??``).trim().toLowerCase();return e.filter(e=>{if(n===`urgent`){if(e.priority!==`urgent_important`&&e.priority!==`urgent`)return!1}else if(n!==`all`&&e.status!==n)return!1;return!(r!==`all`&&e.priority!==r||i&&!`${e.title} ${e.note}`.toLowerCase().includes(i))})}function ee(e){let t=e=>e===`in_progress`?0:e===`pool`?1:e===`done`?2:3,n=e=>e===`urgent_important`?0:e===`important`?1:e===`urgent`?2:e===`normal`?3:4;return[...e].sort((e,r)=>{let i=t(e.status)-t(r.status);if(i!==0)return i;let a=e.dueDate||`9999-12-31`,o=r.dueDate||`9999-12-31`;if(a!==o)return a<o?-1:1;let s=n(e.priority)-n(r.priority);return s===0?e.createdAt<r.createdAt?1:-1:s})}function te(e){let t={total:e.length,pool:0,in_progress:0,done:0,closed:0,cancelled:0,urgent:0};for(let n of e)t[n.status]+=1,(n.priority===`urgent_important`||n.priority===`urgent`)&&(t.urgent+=1);return t}export{x as A,D as C,_ as D,f as E,E as M,T as N,p as O,y as P,b as S,k as T,n as _,q as a,r as b,$ as c,H as d,ee as f,J as g,Q as h,N as i,w as j,O as k,V as l,Z as m,P as n,Y as o,te as p,j as r,G as s,M as t,K as u,i as v,g as w,v as x,t as y};
@@ -0,0 +1 @@
1
+ var e=`/__tb_test_stats`,t=[`功能测试用例`,`自动化测试用例`,`接口测试用例`,`测试报告`,`缺陷统计`,`自动化缺陷统计`,`测试计划`],n=/^\d{4}-\d{2}-\d{2}$/,r=9999999;function i(e,t=80){return typeof e==`string`?e.trim().slice(0,t):``}function a(e){let t=i(e,10);return n.test(t)?t:``}function o(e){let t=typeof e==`number`?e:Number(String(e??``).trim());return!Number.isFinite(t)||t<=0?0:Math.min(r,Math.round(t))}function s(e,t=20){if(!Array.isArray(e))return[];let n=[];for(let r of e){let e=i(r,40);if(e&&!n.includes(e)&&(n.push(e),n.length>=t))break}return n}function c(e=new Date){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function l(e){if(!e||typeof e!=`object`)return null;let t=e,n=s(t.dimensions).slice(0,1),r=!n.length;if(r&&t.draft!==!0)return null;let l=new Date().toISOString();return{id:i(t.id,64)||`ts_${Math.random().toString(16).slice(2,10)}`,date:a(t.date)||c(),dimensions:n,count:o(t.count),draft:r,source:t.source===`ai`?`ai`:`manual`,sessionId:i(t.sessionId,120),createdAt:i(t.createdAt,40)||l,updatedAt:i(t.updatedAt,40)||l}}async function u(t,n){let r=await fetch(e,{method:t,headers:n===void 0?void 0:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json().catch(()=>({}));if(!r.ok)throw Error(i.error||`HTTP ${r.status}`);return i}async function d(){try{return(await fetch(`${e}?health=1`,{signal:AbortSignal.timeout(1500)})).ok}catch{return!1}}async function f(){try{return(await fetch(`${e}/sync`,{method:`POST`})).ok}catch{return!1}}async function p(){let e=await u(`GET`),n=Array.isArray(e.items)?e.items:[],r=s(e.dimensions);return{items:n.map(l).filter(e=>!!e),dimensions:r.length?r:[...t]}}async function m(e,t){let n=await u(`POST`,{items:e,...t});return{items:(Array.isArray(n.items)?n.items:[]).map(l).filter(e=>!!e),dimensions:s(n.dimensions)}}async function h(e,t){let n=await u(`PUT`,{id:e,...t}),r=l(n.item);if(!r)throw Error(`更新测试统计失败`);return{item:r,dimensions:s(n.dimensions)}}async function g(e){let t=await u(`DELETE`,{ids:e});return Number(t.removed??0)}function _(e){return[...e].sort((e,t)=>e.date===t.date?e.createdAt<t.createdAt?1:-1:e.date<t.date?1:-1)}function v(e,t={}){let n=(t.keyword??``).trim().toLowerCase();return n?e.filter(e=>`${e.date} ${e.dimensions.join(` `)} ${e.count}`.toLowerCase().includes(n)):e}function y(e){let t=new Set,n=0;for(let r of e){n+=r.count;for(let e of r.dimensions)t.add(e)}return{records:e.length,dimensions:t.size,total:n}}export{p as a,y as c,h as d,v as i,o as l,g as n,_ as o,d as r,f as s,m as t,c as u};
@@ -0,0 +1 @@
1
+ import{c as e,n as t,t as n}from"./react-dom.CqAxpHMt.js";import{$ as r,G as i,H as a,J as o,K as s,U as c,V as l,W as u,Y as d,_ as f,dt as p,ht as m,it as h,lt as g,mt as _,nt as v,pt as y,q as b,ut as x,vt as S}from"./portal.Cm9XlIPf.js";var C=e=>ee(e)?e.document:te(e)?e:e?.ownerDocument??(typeof document<`u`?document:void 0),w=e=>C(e)?.defaultView??(typeof window<`u`?window:void 0);function T(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function ee(e){return typeof e==`object`&&!!e&&`window`in e&&e.window===e}function te(e){return T(e)&&e.nodeType===9}function ne(e){return T(e)&&e.nodeType===11&&`host`in e}var E=!1;function D(){return E}function O(e,t){if(!D())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!=null;){if(n===e)return!0;n=typeof n.assignedElements!=`function`&&n.assignedSlot?.parentNode?n.assignedSlot.parentNode:ne(n)?n.host:n.parentNode}return!1}var k=(e=document)=>{if(!D())return e.activeElement;let t=e.activeElement;for(;t&&`shadowRoot`in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function A(e){if(D()&&e.target instanceof Element&&e.target.shadowRoot){if(`composedPath`in e)return e.composedPath()[0]??null;if(`composedPath`in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function re(e){e.focus({preventScroll:!0})}var j=e(t(),1),ie=typeof document<`u`?j.useLayoutEffect:()=>{};function ae(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function oe(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function se(e){let t=(0,j.useRef)({isFocused:!1,observer:null});return ie(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]),(0,j.useCallback)(n=>{let r=A(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r;n.addEventListener(`focusout`,r=>{if(t.current.isFocused=!1,n.disabled){let t=ae(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===k()?null:k();n.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:e})),n.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:[`disabled`]})}},[e])}function ce(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function le(e){return typeof window<`u`&&window.navigator!=null&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function M(e){let t=null;return()=>(t??=e(),t)}var ue=M(function(){return le(/^Mac/i)}),de=M(function(){return le(/^iPhone/i)}),fe=M(function(){return le(/^iPad/i)||ue()&&navigator.maxTouchPoints>1}),pe=M(function(){return de()||fe()}),me=M(function(){return ce(/AppleWebKit/i)&&(pe()||!he())}),he=M(function(){return ce(/Chrome|CriOS|CrMo/i)}),ge=M(function(){return ce(/Android/i)});function _e(e){return e.pointerType===``&&e.isTrusted?!0:ge()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function N(e,t,n=!0){let{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}=t,s=me()&&ue()&&!fe()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}):new MouseEvent(`click`,{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o,detail:1,bubbles:!0,cancelable:!0});N.isOpening=n,re(e),e.dispatchEvent(s),N.isOpening=!1}N.isOpening=!1;var P=null,ve=new Set,ye=new Map,F=!1,be=!1,xe={Tab:!0,Escape:!0};function Se(e,t){for(let n of ve)n(e,t)}function Ce(e){return!(e.metaKey||!ue()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function we(e){F=!0,!N.isOpening&&Ce(e)&&(P=`keyboard`,Se(`keyboard`,e))}function I(e){P=`pointer`,`pointerType`in e&&e.pointerType,(e.type===`mousedown`||e.type===`pointerdown`)&&(F=!0,Se(`pointer`,e))}function Te(e){!N.isOpening&&_e(e)&&(F=!0,P=`virtual`)}function Ee(e){let t=A(e),n=w(t),r=C(t);t===n?be=!0:t!==r&&e.isTrusted&&(!F&&!be&&(P=`virtual`,Se(`virtual`,e)),F=!1,be=!1)}function De(){F=!1,be=!0}function Oe(e){let t=k(C(A(e)));queueMicrotask(()=>{k(C(A(e)))!==t&&Ne(`keyboard`)})}function ke(e){if(typeof window>`u`||typeof document>`u`)return;let t=w(e),n=C(e);if(ye.get(t))return;let r=t.HTMLElement.prototype.focus;Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){F=!0,r.apply(this,arguments)}}),n.addEventListener(`keydown`,we,!0),n.addEventListener(`keyup`,we,!0),n.addEventListener(`click`,Te,!0),n.addEventListener(`invalid`,Oe,!0),t.addEventListener(`focus`,Ee,!0),t.addEventListener(`blur`,De,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,I,!0),n.addEventListener(`pointermove`,I,!0),n.addEventListener(`pointerup`,I,!0)),t.addEventListener(`beforeunload`,()=>{Ae(e)},{once:!0}),ye.set(t,{focus:r})}var Ae=(e,t)=>{let n=w(e),r=C(e);t&&r.removeEventListener(`DOMContentLoaded`,t),ye.has(n)&&(Reflect.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:ye.get(n).focus}),r.removeEventListener(`keydown`,we,!0),r.removeEventListener(`keyup`,we,!0),r.removeEventListener(`click`,Te,!0),r.removeEventListener(`invalid`,Oe,!0),n.removeEventListener(`focus`,Ee,!0),n.removeEventListener(`blur`,De,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,I,!0),r.removeEventListener(`pointermove`,I,!0),r.removeEventListener(`pointerup`,I,!0)),ye.delete(n))};function je(e){let t=C(e),n;return t.readyState===`loading`?(n=()=>{ke(e)},t.addEventListener(`DOMContentLoaded`,n)):ke(e),()=>Ae(e,n)}typeof document<`u`&&je();function Me(){return P!==`pointer`}function Ne(e){P=e,Se(e,null)}var Pe=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Fe(e,t,n){let r=n?A(n):void 0,i=C(r),a=w(r),o=a===void 0?HTMLInputElement:a.HTMLInputElement,s=a===void 0?HTMLTextAreaElement:a.HTMLTextAreaElement,c=a===void 0?HTMLElement:a.HTMLElement,l=a===void 0?KeyboardEvent:a.KeyboardEvent,u=k(i);return e=e||u instanceof o&&!Pe.has(u.type)||u instanceof s||u instanceof c&&u.isContentEditable,!(e&&t===`keyboard`&&n instanceof l&&!xe[n.key])}function Ie(e,t,n){ke(),(0,j.useEffect)(()=>{if(n?.enabled===!1)return;let t=(t,r)=>{Fe(!!n?.isTextInput,t,r)&&e(Me())};return ve.add(t),()=>{ve.delete(t)}},t)}function Le(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,j.useCallback)(e=>{if(A(e)===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=se(a),s=(0,j.useCallback)(e=>{let t=A(e),r=C(t),a=r?k(r):k();t===e.currentTarget&&t===a&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}function Re(){let e=(0,j.useRef)(new Map),t=(0,j.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,j.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,j.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,j.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function ze(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,j.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=Re(),c=(0,j.useCallback)(e=>{O(e.currentTarget,A(e))&&a.current.isFocusWithin&&!O(e.currentTarget,e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=se(c),u=(0,j.useCallback)(e=>{if(!O(e.currentTarget,A(e)))return;let t=A(e),n=C(t),s=k(n);if(!a.current.isFocusWithin&&s===t){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let t=e.currentTarget;o(n,`focus`,e=>{let r=A(e);if(a.current.isFocusWithin&&!O(t,r)){let e=new n.defaultView.FocusEvent(`blur`,{relatedTarget:r});oe(e,t);let i=ae(e);c(i)}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:c}}}function Be(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,j.useRef)({isFocused:!1,isFocusVisible:t||Me()}),[a,o]=(0,j.useState)(!1),[s,c]=(0,j.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,j.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,j.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=Me(),o(e),l()},[l]);Ie(e=>{i.current.isFocusVisible=e,l()},[n,a],{enabled:a,isTextInput:n});let{focusProps:d}=Le({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=ze({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?f:d}}var Ve=!1,He=0;function Ue(){Ve=!0,setTimeout(()=>{Ve=!1},500)}function We(e){e.pointerType===`touch`&&Ue()}function Ge(){let e=C(null);if(e!==void 0)return He===0&&typeof PointerEvent<`u`&&e.addEventListener(`pointerup`,We),He++,()=>{He--,!(He>0)&&typeof PointerEvent<`u`&&e.removeEventListener(`pointerup`,We)}}function Ke(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,j.useState)(!1),s=(0,j.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,j.useEffect)(Ge,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=Re(),{hoverProps:u,triggerHoverEnd:d}=(0,j.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!O(e.currentTarget,A(e)))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(C(A(e)),`pointerover`,e=>{s.isHovered&&s.target&&!O(s.target,A(e))&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,t!==`touch`&&s.isHovered&&i&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},u={};return typeof PointerEvent<`u`&&(u.onPointerEnter=t=>{Ve&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&O(e.currentTarget,A(e))&&a(e,e.pointerType)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,j.useEffect)(()=>{i&&d({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:u,isHovered:a}}function qe(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Je(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Ye({disabled:e=!1}={}){let t=(0,j.useRef)(null),[n,r]=(0,j.useState)(!1),i=_(),a=p(()=>{t.current=null,r(!1),i.dispose()}),o=p(e=>{if(i.dispose(),t.current===null){t.current=e.currentTarget,r(!0);{let n=S(e.currentTarget);i.addEventListener(n,`pointerup`,a,!1),i.addEventListener(n,`pointermove`,e=>{if(t.current){let n=qe(e);r(Je(n,t.current.getBoundingClientRect()))}},!1),i.addEventListener(n,`pointercancel`,a,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:a,onClick:a}}}var Xe=(0,j.createContext)(void 0);function Ze(){return(0,j.useContext)(Xe)}function Qe(e){let t=e.parentElement,n=null;for(;t&&!u(t);)a(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute(`disabled`)===``;return r&&$e(n)?!1:r}function $e(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(a(t))return!1;t=t.previousElementSibling}return!0}var et=(0,j.createContext)(null);et.displayName=`LabelContext`;function tt(){let e=(0,j.useContext)(et);if(e===null){let e=Error(`You used a <Label /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,tt),e}return e}function nt(e){let t=(0,j.useContext)(et)?.value??void 0;return(e?.length??0)>0?[t,...e].filter(Boolean).join(` `):t}function rt({inherit:e=!1}={}){let t=nt(),[n,r]=(0,j.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(` `):void 0,(0,j.useMemo)(()=>function(e){let t=p(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),n=(0,j.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return j.createElement(et.Provider,{value:n},e.children)},[r])]}var it=`label`;function at(e,t){let n=(0,r.useId)(),i=tt(),a=Ze(),o=g(),{id:u=`headlessui-label-${n}`,htmlFor:d=a??i.props?.htmlFor,passive:f=!1,...m}=e,h=l(t);y(()=>i.register(u),[u,i.register]);let _=p(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&c(e.target))&&(b(t)&&e.preventDefault(),i.props&&`onClick`in i.props&&typeof i.props.onClick==`function`&&i.props.onClick(e),b(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute(`disabled`);if(t===`true`||t===``)return;let n=e.getAttribute(`aria-disabled`);if(n===`true`||n===``)return;(s(e)&&(e.type===`file`||e.type===`radio`||e.type===`checkbox`)||e.role===`radio`||e.role===`checkbox`||e.role===`switch`)&&e.click(),e.focus({preventScroll:!0})}}}),S=x({...i.slot,disabled:o||!1}),C={ref:h,...i.props,id:u,htmlFor:d,onClick:_};return f&&(`onClick`in C&&(delete C.htmlFor,delete C.onClick),`onClick`in m&&delete m.onClick),v()({ourProps:C,theirProps:m,slot:S,defaultTag:d?it:`div`,name:i.name||`Label`})}var ot=h(at),st=Object.assign(ot,{});function ct(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function lt(e,t,n=!1){let[r,i]=(0,j.useState)(()=>ct(t));return y(()=>{if(!t||!e)return;let n=m();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),i(e=>{let n=ct(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var ut=(e=>(e[e.Left=0]=`Left`,e[e.Right=2]=`Right`,e))(ut||{});function dt(e){let t=(0,j.useRef)(null);return{onPointerDown:p(n=>{t.current=n.pointerType,!Qe(n.currentTarget)&&n.pointerType===`mouse`&&n.button===ut.Left&&(n.preventDefault(),e(n))}),onClick:p(n=>{t.current!==`mouse`&&(Qe(n.currentTarget)||e(n))})}}var ft=(e=>(e[e.Ignore=0]=`Ignore`,e[e.Select=1]=`Select`,e[e.Close=2]=`Close`,e))(ft||{}),pt={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},mt=200,ht=5;function gt(e,{trigger:t,action:n,close:r,select:a}){let o=(0,j.useRef)(null),s=(0,j.useRef)(null),c=(0,j.useRef)(null);f(e&&t!==null,`pointerdown`,e=>{d(e?.target)&&t!=null&&t.contains(e.target)&&(s.current=e.x,c.current=e.y,o.current=e.timeStamp)}),f(e&&t!==null,`pointerup`,e=>{let t=o.current;if(t===null||(o.current=null,!i(e.target))||Math.abs(e.x-(s.current??e.x))<ht&&Math.abs(e.y-(c.current??e.y))<ht)return;let l=n(e);switch(l.kind){case 0:return;case 1:e.timeStamp-t>mt&&(a(l.target),r());break;case 2:r()}},{capture:!0})}function _t(e,t){return(0,j.useMemo)(()=>{if(e.type)return e.type;let n=e.as??`button`;if(typeof n==`string`&&n.toLowerCase()===`button`||t?.tagName===`BUTTON`&&!t.hasAttribute(`type`))return`button`},[e.type,e.as,t])}function vt(e){return[e.screenX,e.screenY]}function yt(){let e=(0,j.useRef)([-1,-1]);return{wasMoved(t){let n=vt(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=vt(t)}}}function bt(){return typeof window<`u`}function L(e){return xt(e)?(e.nodeName||``).toLowerCase():`#document`}function R(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function z(e){return((xt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function xt(e){return bt()?e instanceof Node||e instanceof R(e).Node:!1}function B(e){return bt()?e instanceof Element||e instanceof R(e).Element:!1}function V(e){return bt()?e instanceof HTMLElement||e instanceof R(e).HTMLElement:!1}function St(e){return!bt()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof R(e).ShadowRoot}function Ct(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function wt(e){return/^(table|td|th)$/.test(L(e))}function Tt(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Et=/transform|translate|scale|rotate|perspective|filter/,Dt=/paint|layout|strict|content/,H=e=>!!e&&e!==`none`,Ot;function kt(e){let t=B(e)?U(e):e;return H(t.transform)||H(t.translate)||H(t.scale)||H(t.rotate)||H(t.perspective)||!jt()&&(H(t.backdropFilter)||H(t.filter))||Et.test(t.willChange||``)||Dt.test(t.contain||``)}function At(e){let t=W(e);for(;V(t)&&!Mt(t);){if(kt(t))return t;if(Tt(t))return null;t=W(t)}return null}function jt(){return Ot??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ot}function Mt(e){return/^(html|body|#document)$/.test(L(e))}function U(e){return R(e).getComputedStyle(e)}function Nt(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function W(e){if(L(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||St(e)&&e.host||z(e);return St(t)?t.host:t}function Pt(e){let t=W(e);return Mt(t)?(e.ownerDocument||e).body:V(t)&&Ct(t)?t:Pt(t)}function Ft(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Pt(e),i=r===e.ownerDocument?.body,a=R(r);if(i){let e=It(a);return t.concat(a,a.visualViewport||[],Ct(r)?r:[],e&&n?Ft(e):[])}return t.concat(r,Ft(r,[],n))}function It(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lt(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}var G=Math.min,K=Math.max,Rt=Math.round,zt=Math.floor,q=e=>({x:e,y:e}),Bt={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Vt(e,t,n){return K(e,G(t,n))}function J(e,t){return typeof e==`function`?e(t):e}function Y(e){return e.split(`-`)[0]}function Ht(e){return e.split(`-`)[1]}function Ut(e){return e===`x`?`y`:`x`}function Wt(e){return e===`y`?`height`:`width`}function X(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Gt(e){return Ut(X(e))}function Kt(e,t,n){n===void 0&&(n=!1);let r=Ht(e),i=Gt(e),a=Wt(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=tn(o)),[o,tn(o)]}function qt(e){let t=tn(e);return[Jt(e),t,Jt(t)]}function Jt(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Yt=[`left`,`right`],Xt=[`right`,`left`],Zt=[`top`,`bottom`],Qt=[`bottom`,`top`];function $t(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Xt:Yt:t?Yt:Xt;case`left`:case`right`:return t?Zt:Qt;default:return[]}}function en(e,t,n,r){let i=Ht(e),a=$t(Y(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Jt)))),a}function tn(e){let t=Y(e);return Bt[t]+e.slice(t.length)}function nn(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function rn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:nn(e)}function an(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var on=e(n(),1);function sn(e,t,n){let{reference:r,floating:i}=e,a=X(t),o=Gt(t),s=Wt(o),c=Y(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ht(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function cn(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=J(t,e),p=rn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=an(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=an(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ln=50,un=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:cn},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=sn(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ln&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=sn(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},dn=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=J(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Y(r),_=X(o),v=Y(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[tn(o)]:qt(o)),x=p!==`none`;!d&&x&&b.push(...en(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Kt(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===X(t)||T.every(e=>X(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=X(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},fn=new Set([`left`,`top`]);async function pn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Y(n),s=Ht(n),c=X(n)===`y`,l=fn.has(o)?-1:1,u=a&&c?-1:1,d=J(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var mn=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await pn(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},hn=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=J(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=X(i),p=Ut(f),m=u[p],h=u[f],g=(e,t)=>Vt(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},gn=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=J(e,t),c=await i.detectOverflow(t,s),l=Y(n),u=Ht(n),d=X(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=G(p-c[m],g),y=G(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*K(c.left,c.right):S=p-2*K(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function _n(e){let t=U(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=V(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Rt(n)!==a||Rt(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vn(e){return B(e)?e:e.contextElement}function Z(e){let t=vn(e);if(!V(t))return q(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_n(t),o=(a?Rt(n.width):n.width)/r,s=(a?Rt(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var yn=q(0);function bn(e){let t=R(e);return!jt()||!t.visualViewport?yn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===R(e)}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vn(e),o=q(1);t&&(r?B(r)&&(o=Z(r)):o=Z(e));let s=xn(a,n,r)?bn(a):q(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=R(a),t=B(r)?R(r):r,n=e,i=It(n);for(;i&&t!==n;){let e=Z(i),t=i.getBoundingClientRect(),r=U(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=R(i),i=It(n)}}return an({width:u,height:d,x:c,y:l})}function Sn(e,t){let n=Nt(e).scrollLeft;return t?t.left+n:Q(z(e)).left+n}function Cn(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Sn(e,n),y:n.top+t.scrollTop}}function wn(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=z(r),s=t?Tt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=q(1),u=q(0),d=V(r);if((d||!a)&&((L(r)!==`body`||Ct(o))&&(c=Nt(r)),d)){let e=Q(r);l=Z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Cn(o,c):q(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Tn(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function En(e){let t=Nt(e),n=e.ownerDocument.body,r=K(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=K(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Sn(e),o=-t.scrollTop;return U(n).direction===`rtl`&&(a+=K(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Dn=25;function On(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=R(e),a=z(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!jt()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Sn(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Dn&&(s-=o)}return{width:s,height:c,x:l,y:u}}function kn(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Z(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function An(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=On(e,n,t);else if(t===`document`)r=En(z(e));else if(B(t))r=kn(t,n);else{let n=bn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return an(r)}function jn(e,t){let n=t.get(e);if(n)return n;let r=Ft(e,[],!1).filter(e=>B(e)&&L(e)!==`body`),i=null,a=U(e).position===`fixed`,o=a?W(e):e;for(;B(o)&&!Mt(o);){let e=U(o),t=kt(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=W(o)}return t.set(e,r),r}function Mn(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Tt(t)?[]:jn(t,this._c):[].concat(n),r],o=An(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=An(t,a[e],i);s=K(n.top,s),c=G(n.right,c),l=G(n.bottom,l),u=K(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Nn(e){let{width:t,height:n}=_n(e);return{width:t,height:n}}function Pn(e,t,n){let r=V(t),i=z(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=q(0);if((r||!a)&&((L(t)!==`body`||Ct(i))&&(s=Nt(t)),r)){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Sn(i));let l=i&&!r&&!a?Cn(i,s):q(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Fn(e){return U(e).position===`static`}function In(e,t){if(!V(e)||U(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return z(e)===n&&(n=n.ownerDocument.body),n}function Ln(e,t){let n=R(e);if(Tt(e))return n;if(!V(e)){let t=W(e);for(;t&&!Mt(t);){if(B(t)&&!Fn(t))return t;t=W(t)}return n}let r=In(e,t);for(;r&&wt(r)&&Fn(r);)r=In(r,t);return r&&Mt(r)&&Fn(r)&&!kt(r)?n:r||At(e)||n}var Rn=async function(e){let t=this.getOffsetParent||Ln,n=this.getDimensions,r=await n(e.floating);return{reference:Pn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zn(e){return U(e).direction===`rtl`}var Bn={convertOffsetParentRelativeRectToViewportRelativeRect:wn,getDocumentElement:z,getClippingRect:Mn,getOffsetParent:Ln,getElementRects:Rn,getClientRects:Tn,getDimensions:Nn,getScale:Z,isElement:B,isRTL:zn};function Vn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hn(e,t,n){let r=null,i,a=z(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=zt(d),h=zt(a.clientWidth-(u+f)),g=zt(a.clientHeight-(d+p)),_=zt(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:K(0,G(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Vn(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=R(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Un(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=vn(e),u=i||a?[...l?Ft(l):[],...t?Ft(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Hn(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!Vn(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Wn=cn,Gn=mn,Kn=hn,qn=dn,Jn=gn,Yn=(e,t,n)=>{let r=new Map,i=n??{},a={...Bn,...i.platform,_c:r};return un(e,t,{...i,platform:a})},Xn=typeof document<`u`?j.useLayoutEffect:function(){};function Zn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Zn(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Zn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Qn(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $n(e,t){let n=Qn(e);return Math.round(t*n)/n}function er(e){let t=j.useRef(e);return Xn(()=>{t.current=e}),t}function tr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=j.useState(r);Zn(f,r)||p(r);let[m,h]=j.useState(null),[g,_]=j.useState(null),v=j.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=j.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=j.useRef(null),C=j.useRef(null),w=j.useRef(u),T=c!=null,ee=er(c),te=er(i),ne=er(l),E=j.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};te.current&&(e.platform=te.current),Yn(S.current,C.current,e).then(e=>{let t={...e,isPositioned:ne.current!==!1};D.current&&!Zn(w.current,t)&&(w.current=t,on.flushSync(()=>{d(t)}))})},[f,t,n,te,ne]);Xn(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let D=j.useRef(!1);Xn(()=>(D.current=!0,()=>{D.current=!1}),[]),Xn(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,E);E()}},[b,x,E,ee,T]);let O=j.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),k=j.useMemo(()=>({reference:b,floating:x}),[b,x]),A=j.useMemo(()=>{let e={position:n,left:0,top:0};if(!k.floating)return e;let t=$n(k.floating,u.x),r=$n(k.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Qn(k.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,k.floating,u.x,u.y]);return j.useMemo(()=>({...u,update:E,refs:O,elements:k,floatingStyles:A}),[u,E,O,k,A])}var nr=(e,t)=>{let n=Gn(e);return{name:n.name,fn:n.fn,options:[e,t]}},rr=(e,t)=>{let n=Kn(e);return{name:n.name,fn:n.fn,options:[e,t]}},ir=(e,t)=>{let n=qn(e);return{name:n.name,fn:n.fn,options:[e,t]}},ar=(e,t)=>{let n=Jn(e);return{name:n.name,fn:n.fn,options:[e,t]}},or={...j},sr=or.useInsertionEffect||(e=>e());function cr(e){let t=j.useRef(()=>{});return sr(()=>{t.current=e}),j.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var lr=`ArrowUp`,ur=`ArrowDown`,dr=`ArrowLeft`,fr=`ArrowRight`,pr=typeof document<`u`?j.useLayoutEffect:j.useEffect,mr=[dr,fr],hr=[lr,ur];[...mr,...hr];var gr=!1,_r=0,vr=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+_r++;function yr(){let[e,t]=j.useState(()=>gr?vr():void 0);return pr(()=>{e??t(vr())},[]),j.useEffect(()=>{gr=!0},[]),e}var br=or.useId||yr;function xr(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,e.get(t)?.filter(e=>e!==n)||[])}}}var Sr=j.createContext(null),Cr=j.createContext(null),wr=()=>j.useContext(Sr)?.id||null,Tr=()=>j.useContext(Cr),Er=`data-floating-ui-focusable`;function Dr(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=br(),a=j.useRef({}),[o]=j.useState(()=>xr()),s=wr()!=null,[c,l]=j.useState(r.reference),u=cr((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=j.useMemo(()=>({setPositionReference:l}),[]),f=j.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return j.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Or(e){e===void 0&&(e={});let{nodeId:t}=e,n=Dr({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=j.useState(null),[s,c]=j.useState(null),l=i?.domReference||a,u=j.useRef(null),d=Tr();pr(()=>{l&&(u.current=l)},[l]);let f=tr({...e,elements:{...i,...s&&{reference:s}}}),p=j.useCallback(e=>{let t=B(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=j.useCallback(e=>{(B(e)||e===null)&&(u.current=e,o(e)),(B(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!B(e))&&f.refs.setReference(e)},[f.refs]),h=j.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=j.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=j.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return pr(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),j.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}var kr=`active`,Ar=`selected`;function jr(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[kr]:t,[Ar]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Er]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[kr,Ar].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Mr(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=j.useCallback(t=>jr(t,e,`reference`),t),a=j.useCallback(t=>jr(t,e,`floating`),n),o=j.useCallback(t=>jr(t,e,`item`),r);return j.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}function Nr(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var Pr=e=>({name:`inner`,options:e,async fn(t){let{listRef:n,overflowRef:r,onFallbackChange:i,offset:a=0,index:o=0,minItemsVisible:s=4,referenceOverflowThreshold:c=0,scrollRef:l,...u}=J(e,t),{rects:d,elements:{floating:f}}=t,p=n.current[o],m=l?.current||f,h=f.clientTop||m.clientTop,g=f.clientTop!==0,_=m.clientTop!==0,v=f===m;if(!p)return{};let y={...t,...await nr(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-a).fn(t)},b=await Wn(Nr(y,m.scrollHeight+h+f.clientTop),u),x=await Wn(y,{...u,elementContext:`reference`}),S=K(0,b.top),C=y.y+S,w=(m.scrollHeight>m.clientHeight?e=>e:Rt)(K(0,m.scrollHeight+(g&&v||_?h*2:0)-S-K(0,b.bottom)));if(m.style.maxHeight=w+`px`,m.scrollTop=S,i){let e=m.offsetHeight<p.offsetHeight*G(s,n.current.length)-1||x.top>=-c||x.bottom>=-c;on.flushSync(()=>i(e))}return r&&(r.current=await Wn(Nr({...y,y:C},m.offsetHeight+h+f.clientTop),u)),{y:C}}});function Fr(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:a,scrollRef:o,onChange:s}=t,c=cr(s),l=j.useRef(!1),u=j.useRef(null),d=j.useRef(null);j.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||a.current==null)return;let n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,l=n<0?`max`:`min`;t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),on.flushSync(()=>{c(e=>e+Math[l](n,o*s))})):/firefox/i.test(Lt())&&(t.scrollTop+=n))}let t=o?.current||r.floating;if(n&&t)return t.addEventListener(`wheel`,e),requestAnimationFrame(()=>{u.current=t.scrollTop,a.current!=null&&(d.current={...a.current})}),()=>{u.current=null,d.current=null,t.removeEventListener(`wheel`,e)}},[i,n,r.floating,a,o,c]);let f=j.useMemo(()=>({onKeyDown(){l.current=!0},onWheel(){l.current=!1},onPointerMove(){l.current=!1},onScroll(){let e=o?.current||r.floating;if(a.current&&e&&l.current){if(u.current!==null){let t=e.scrollTop-u.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&on.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{u.current=e.scrollTop})}}}),[r.floating,c,a,o]);return j.useMemo(()=>i?{floating:f}:{},[i,f])}var $=(0,j.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});$.displayName=`FloatingContext`;var Ir=(0,j.createContext)(null);Ir.displayName=`PlacementContext`;function Lr(e){return(0,j.useMemo)(()=>e?typeof e==`string`?{to:e}:e:null,[e])}function Rr(){return(0,j.useContext)($).setReference}function zr(){return(0,j.useContext)($).getReferenceProps}function Br(){let{getFloatingProps:e,slot:t}=(0,j.useContext)($);return(0,j.useCallback)((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Vr(e=null){e===!1&&(e=null),typeof e==`string`&&(e={to:e});let t=(0,j.useContext)(Ir),n=(0,j.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>t?.outerHTML??t)]);y(()=>{t?.(n??null)},[t,n]);let r=(0,j.useContext)($);return(0,j.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}var Hr=4;function Ur({children:e,enabled:t=!0}){let[n,r]=(0,j.useState)(null),[i,a]=(0,j.useState)(0),s=(0,j.useRef)(null),[c,l]=(0,j.useState)(null);Wr(c);let u=t&&n!==null&&c!==null,{to:d=`bottom`,gap:f=0,offset:m=0,padding:h=0,inner:g}=Gr(n,c),[_,v=`center`]=d.split(` `);y(()=>{u&&a(0)},[u]);let{refs:b,floatingStyles:x,context:S}=Or({open:u,placement:_===`selection`?v===`center`?`bottom`:`bottom-${v}`:v===`center`?`${_}`:`${_}-${v}`,strategy:`absolute`,transform:!1,middleware:[nr({mainAxis:_===`selection`?0:f,crossAxis:m}),rr({padding:h}),_!==`selection`&&ir({padding:h}),_===`selection`&&g?Pr({...g,padding:h,overflowRef:s,offset:i,minItemsVisible:Hr,referenceOverflowThreshold:h,onFallbackChange(e){if(!e)return;let t=S.elements.floating;if(!t)return;let n=parseFloat(getComputedStyle(t).scrollPaddingBottom)||0,r=Math.min(Hr,t.childElementCount),i=0,s=0;for(let e of S.elements.floating?.childNodes??[])if(o(e)){let a=e.offsetTop,o=a+e.clientHeight+n,c=t.scrollTop,l=c+t.clientHeight;if(a>=c&&o<=l)r--;else{s=Math.max(0,Math.min(o,l)-Math.max(a,c)),i=e.clientHeight;break}}r>=1&&a(e=>{let t=i*r-s+n;return e>=t?e:t})}}):null,ar({padding:h,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:`auto`,maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Un}),[C=_,w=v]=S.placement.split(`-`);_===`selection`&&(C=`selection`);let T=(0,j.useMemo)(()=>({anchor:[C,w].filter(Boolean).join(` `)}),[C,w]),{getReferenceProps:ee,getFloatingProps:te}=Mr([Fr(S,{overflowRef:s,onChange:a})]),ne=p(e=>{l(e),b.setFloating(e)});return j.createElement(Ir.Provider,{value:r},j.createElement($.Provider,{value:{setFloating:ne,setReference:b.setReference,styles:x,getReferenceProps:ee,getFloatingProps:te,slot:T}},e))}function Wr(e){y(()=>{if(!e)return;let t=new MutationObserver(()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:[`style`]}),()=>{t.disconnect()}},[e])}function Gr(e,t){let n=Kr(e?.gap??`var(--anchor-gap, 0)`,t),r=Kr(e?.offset??`var(--anchor-offset, 0)`,t),i=Kr(e?.padding??`var(--anchor-padding, 0)`,t);return{...e,gap:n,offset:r,padding:i}}function Kr(e,t,n=void 0){let r=_(),i=p((e,t)=>{if(e==null)return[n,null];if(typeof e==`number`)return[e,null];if(typeof e==`string`){if(!t)return[n,null];let i=Jr(e,t);return[i,n=>{let a=qr(e);{let o=a.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function s(){r.nextFrame(s);let c=!1;for(let[e,n]of a.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(o[e]!==r){o[e]=r,c=!0;break}}if(!c)return;let l=Jr(e,t);i!==l&&(n(l),i=l)})}return r.dispose}]}return[n,null]}),a=(0,j.useMemo)(()=>i(e,t)[0],[e,t]),[o=a,s]=(0,j.useState)();return y(()=>{let[n,r]=i(e,t);if(s(n),r)return r(s)},[e,t]),o}function qr(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(`,`);if(e===-1)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...qr(r)]:[n]}return[]}function Jr(e,t){let n=document.createElement(`div`);t.appendChild(n),n.style.setProperty(`margin-top`,`0px`,`important`),n.style.setProperty(`margin-top`,e,`important`);let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Yr(e){throw Error(`Unexpected object: `+e)}var Xr=(e=>(e[e.First=0]=`First`,e[e.Previous=1]=`Previous`,e[e.Next=2]=`Next`,e[e.Last=3]=`Last`,e[e.Specific=4]=`Specific`,e[e.Nothing=5]=`Nothing`,e))(Xr||{});function Zr(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:i===-1&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:Yr(e)}}var Qr={Idle:{kind:`Idle`},Tracked:e=>({kind:`Tracked`,position:e}),Moved:{kind:`Moved`}};function $r(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function ei(e,t,n){let r=m();if(t.kind===`Tracked`){let i=function(){a!==$r(e)&&(r.dispose(),n())},{position:a}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,`scroll`,i,{passive:!0}),r.addEventListener(window,`resize`,i)}return()=>r.dispose()}var ti=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ni(e){let t=e.innerText??``,n=e.cloneNode(!0);if(!o(n))return t;let r=!1;for(let e of n.querySelectorAll(`[hidden],[aria-hidden],[role="img"]`))e.remove(),r=!0;let i=r?n.innerText??``:t;return ti.test(i)&&(i=i.replace(ti,``)),i}function ri(e){let t=e.getAttribute(`aria-label`);if(typeof t==`string`)return t.trim();let n=e.getAttribute(`aria-labelledby`);if(n){let e=n.split(` `).map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute(`aria-label`);return typeof e==`string`?e.trim():ni(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(`, `)}return ni(e).trim()}function ii(e){let t=(0,j.useRef)(``),n=(0,j.useRef)(``);return p(()=>{let r=e.current;if(!r)return``;let i=r.innerText;if(t.current===i)return n.current;let a=ri(r).trim().toLowerCase();return t.current=i,n.current=a,a})}export{st as C,Be as D,Ke as E,rt as S,Ye as T,dt as _,Xr as a,tt as b,Rr as c,zr as d,Lr as f,pt as g,gt as h,ei as i,Vr as l,_t as m,$r as n,Zr as o,yt as p,Qr as r,Ur as s,ii as t,Br as u,ut as v,Ze as w,nt as x,lt as y};
@@ -0,0 +1 @@
1
+ import{c as e,n as t}from"./react-dom.CqAxpHMt.js";import{pt as n,vt as r}from"./portal.Cm9XlIPf.js";var i=e(t(),1);function a(e,{container:t,accept:a,walk:o}){let s=(0,i.useRef)(a),c=(0,i.useRef)(o);(0,i.useEffect)(()=>{s.current=a,c.current=o},[a,o]),n(()=>{if(!t||!e)return;let n=r(t);if(!n)return;let i=s.current,a=c.current,o=Object.assign(e=>i(e),{acceptNode:i}),l=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,o,!1);for(;l.nextNode();)a(l.currentNode)},[t,e,s,c])}export{a as t};
@@ -0,0 +1 @@
1
+ import{c as e,n as t}from"./react-dom.CqAxpHMt.js";var n=e(t(),1);function r(){let[e,t]=(0,n.useState)(!1),r=(0,n.useCallback)(()=>t(!0),[]);return{cls:e?`tw-anim-list `:``,play:r}}export{r as t};
@@ -0,0 +1 @@
1
+ import{p as e}from"./app-config.BAFE-Tim.js";var t=`tw.view.`;function n(n,r,i){try{let a=localStorage.getItem(e(`${t}${n}.v1`));return a&&r.includes(a)?a:i}catch{return i}}function r(n,r){try{localStorage.setItem(e(`${t}${n}.v1`),r)}catch{}}var i=200;function a(n,r=``){try{return localStorage.getItem(e(`${t}${n}.v1`))??r}catch{return r}}function o(n,r){try{let a=e(`${t}${n}.v1`),o=r.slice(0,i);o?localStorage.setItem(a,o):localStorage.removeItem(a)}catch{}}var s=2e4;function c(n,r){try{let i=localStorage.getItem(e(`${t}${n}.v1`));return!i||i.length>s?r:JSON.parse(i)}catch{return r}}function l(n,r){try{let i=JSON.stringify(r);if(typeof i!=`string`||i.length>s)return;localStorage.setItem(e(`${t}${n}.v1`),i)}catch{}}export{r as a,l as i,n,o,a as r,c as t};
@@ -0,0 +1,267 @@
1
+ <!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" type="image/png" sizes="32x32" href="/brand/favicon.png"><link rel="apple-touch-icon" href="/brand/apple-touch-icon.png"><title>用例执行统计 · Lantern Harness</title><script>
2
+ // 尽早禁用滚动恢复,避免整页跳转/切页时停在旧滚动位置造成文字叠影
3
+ try {
4
+ if ('scrollRestoration' in history) history.scrollRestoration = 'manual';
5
+ } catch (e) {}
6
+ </script><script type="module" src="/_astro/Base.astro_astro_type_script_index_0_lang.BY4OccDH.js"></script><meta name="astro-view-transitions-enabled" content="true"><meta name="astro-view-transitions-fallback" content="animate"><script type="module" src="/_astro/ClientRouter.astro_astro_type_script_index_0_lang.CO1cjG9V.js"></script><script>
7
+ (function () {
8
+ try {
9
+ var raw = localStorage.getItem('tw.app.config.v1');
10
+ if (raw) {
11
+ var cfg = JSON.parse(raw);
12
+ var g = (cfg && cfg.general) || {};
13
+ var root = document.documentElement;
14
+ var size = typeof g.sessionFontSize === 'number' ? Math.round(g.sessionFontSize) : 14;
15
+ if (size < 12) size = 12;
16
+ if (size > 22) size = 22;
17
+ var px = size + 'px';
18
+ root.style.setProperty('--tw-ui-font-size', px);
19
+ root.style.setProperty('--tw-session-font-size', px);
20
+ var appearance = g.appearance;
21
+ var theme =
22
+ appearance === 'dark' || appearance === 'light'
23
+ ? appearance
24
+ : window.matchMedia('(prefers-color-scheme: dark)').matches
25
+ ? 'dark'
26
+ : 'light';
27
+ root.dataset.theme = theme;
28
+ root.style.colorScheme = theme;
29
+ if (g.language === 'en') root.lang = 'en';
30
+ }
31
+ if (localStorage.getItem('tw.nav.collapsed') === '1') {
32
+ document.documentElement.dataset.navCollapsed = '1';
33
+ }
34
+ var spaceId = (
35
+ sessionStorage.getItem('tw.space.active-id') ||
36
+ localStorage.getItem('tw.space.active-id') ||
37
+ ''
38
+ ).trim();
39
+ var cfgKey = spaceId ? 'tw.app.config.v1::' + spaceId : 'tw.app.config.v1';
40
+ var cfgRaw = localStorage.getItem(cfgKey) || localStorage.getItem('tw.app.config.v1');
41
+ if (cfgRaw) {
42
+ var savedCfg = JSON.parse(cfgRaw) || {};
43
+ var plugins = savedCfg.plugins || {};
44
+ if (plugins.cases === false) document.documentElement.dataset.pluginOffCases = '1';
45
+ if (plugins.todos === false) document.documentElement.dataset.pluginOffTodos = '1';
46
+ if (plugins.tasks === false) document.documentElement.dataset.pluginOffTasks = '1';
47
+ if (plugins.reports !== true) document.documentElement.dataset.pluginOffReports = '1';
48
+ if (plugins.testStats !== true)
49
+ document.documentElement.dataset.pluginOffTestStats = '1';
50
+ if (plugins.caseExec !== true) document.documentElement.dataset.pluginOffCaseExec = '1';
51
+ if (plugins.dashboard !== true)
52
+ document.documentElement.dataset.pluginOffDashboard = '1';
53
+ if (plugins.knowledgeLib === false)
54
+ document.documentElement.dataset.pluginOffKnowledgeLib = '1';
55
+ if (plugins.requirements === false)
56
+ document.documentElement.dataset.pluginOffRequirements = '1';
57
+ if (plugins.templates === false)
58
+ document.documentElement.dataset.pluginOffTemplates = '1';
59
+ // 本地已有菜单布局:静态占位(固定顺序平铺)不再亮相,避免闪一下「排序前」
60
+ if (Array.isArray(savedCfg.navGroups) || Array.isArray(savedCfg.navOrder)) {
61
+ document.documentElement.dataset.navCached = '1';
62
+ // 兜底:脚本没跑起来(岛始终为空)时把占位放回来,别让侧栏彻底空着
63
+ window.setTimeout(function () {
64
+ var island = document.querySelector('.tw-nav-libraries astro-island');
65
+ if (!island || !island.querySelector('.tw-nav-item-main')) {
66
+ document.documentElement.removeAttribute('data-nav-cached');
67
+ }
68
+ }, 3000);
69
+ }
70
+ }
71
+ } catch (e) {}
72
+ })();
73
+ </script><link rel="stylesheet" href="/_astro/Base.CVuoZiOB.css"><script type="module" src="/_astro/page.Bx2KSkeL.js"></script><style>[data-astro-transition-scope="astro-bbhp3f5g-3"] { view-transition-name: astro-bbhp3f5g-3; }@layer astro { ::view-transition-old(astro-bbhp3f5g-3) {
74
+ animation-duration: 180ms;
75
+ animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
76
+ animation-fill-mode: both;
77
+ animation-name: astroFadeOut; }::view-transition-new(astro-bbhp3f5g-3) {
78
+ animation-duration: 180ms;
79
+ animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
80
+ animation-fill-mode: both;
81
+ animation-name: astroFadeIn; }[data-astro-transition=back]::view-transition-old(astro-bbhp3f5g-3) {
82
+ animation-duration: 180ms;
83
+ animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
84
+ animation-fill-mode: both;
85
+ animation-name: astroFadeOut; }[data-astro-transition=back]::view-transition-new(astro-bbhp3f5g-3) {
86
+ animation-duration: 180ms;
87
+ animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
88
+ animation-fill-mode: both;
89
+ animation-name: astroFadeIn; } }[data-astro-transition-fallback="old"] [data-astro-transition-scope="astro-bbhp3f5g-3"],
90
+ [data-astro-transition-fallback="old"][data-astro-transition-scope="astro-bbhp3f5g-3"] {
91
+ animation-duration: 180ms;
92
+ animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
93
+ animation-fill-mode: both;
94
+ animation-name: astroFadeOut; }[data-astro-transition-fallback="new"] [data-astro-transition-scope="astro-bbhp3f5g-3"],
95
+ [data-astro-transition-fallback="new"][data-astro-transition-scope="astro-bbhp3f5g-3"] {
96
+ animation-duration: 180ms;
97
+ animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
98
+ animation-fill-mode: both;
99
+ animation-name: astroFadeIn; }[data-astro-transition=back][data-astro-transition-fallback="old"] [data-astro-transition-scope="astro-bbhp3f5g-3"],
100
+ [data-astro-transition=back][data-astro-transition-fallback="old"][data-astro-transition-scope="astro-bbhp3f5g-3"] {
101
+ animation-duration: 180ms;
102
+ animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
103
+ animation-fill-mode: both;
104
+ animation-name: astroFadeOut; }[data-astro-transition=back][data-astro-transition-fallback="new"] [data-astro-transition-scope="astro-bbhp3f5g-3"],
105
+ [data-astro-transition=back][data-astro-transition-fallback="new"][data-astro-transition-scope="astro-bbhp3f5g-3"] {
106
+ animation-duration: 180ms;
107
+ animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
108
+ animation-fill-mode: both;
109
+ animation-name: astroFadeIn; }</style></head><body class="tw-body antialiased"><div class="tw-shell min-h-screen"><aside class="tw-nav-aside fixed inset-y-0 left-0 flex flex-col z-45" id="tw-nav-aside"><div class="tw-nav-brand"><div class="tw-nav-brand-row"><a href="/" class="tw-nav-brand-link min-w-0 flex-1"><span class="tw-nav-brand-mark" aria-hidden="true"><img class="tw-nav-brand-mark-img" src="/brand/brand-mark.png" alt="" width="36" height="36"></span><span class="tw-nav-brand-text"><span class="tw-nav-brand-title-row"><span class="tw-nav-brand-title" data-i18n="nav.brand">Lantern Harness</span><span class="tw-nav-brand-ver" data-hint="平台版本 v0.1.5">v0.1.5</span></span></span></a></div></div><div class="tw-nav-space-slot"><div class="tw-nav-space tw-nav-space-ph" id="tw-nav-space-ph" aria-hidden="true"><div class="tw-nav-space-ph-box"><span class="tw-nav-space-ph-ico"></span><span class="tw-nav-space-ph-lines"><span class="tw-nav-space-ph-bar is-cap"></span><span class="tw-nav-space-ph-bar is-name"></span></span></div></div><style>astro-island,astro-slot,astro-static-slot{display:contents}</style><script>(function(){let e=async e=>{await(await e())()};(self.Astro||(self.Astro={})).only=e,window.dispatchEvent(new Event(`astro:only`))})();</script><script>(function(){function e(t){"@babel/helpers - typeof";return e=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},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i=/* @__PURE__ */ new Set([`__proto__`,`constructor`,`prototype`]);{let e={0:e=>a(e),1:e=>n(e),2:e=>new RegExp(e),3:e=>new Date(e),4:e=>new Map(n(e)),5:e=>new Set(n(e)),6:e=>BigInt(e),7:e=>new URL(e),8:e=>new Uint8Array(e),9:e=>new Uint16Array(e),10:e=>new Uint32Array(e),11:e=>1/0*e},t=t=>{let[n,r]=t;return n in e?e[n](r):void 0},n=e=>e.map(t),a=e=>typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)]));class o extends HTMLElement{constructor(...e){super(...e),r(this,`Component`,void 0),r(this,`hydrator`,void 0),r(this,`hydrate`,async()=>{var e;if(!this.hydrator||!this.isConnected)return;let t=(e=this.parentElement)==null?void 0:e.closest(`astro-island[ssr]`);if(t){t.addEventListener(`astro:hydrate`,this.hydrate,{once:!0});return}let n=this.querySelectorAll(`astro-slot`),r={},i=this.querySelectorAll(`template[data-astro-template]`);for(let e of i){let t=e.closest(this.tagName);t!=null&&t.isSameNode(this)&&(r[e.getAttribute(`data-astro-template`)||`default`]=e.innerHTML,e.remove())}for(let e of n){let t=e.closest(this.tagName);t!=null&&t.isSameNode(this)&&(r[e.getAttribute(`name`)||`default`]=e.innerHTML)}let o;try{o=this.hasAttribute(`props`)?a(JSON.parse(this.getAttribute(`props`))):{}}catch(e){let t=this.getAttribute(`component-url`)||`<unknown>`,n=this.getAttribute(`component-export`);throw n&&(t+=` (export ${n})`),console.error(`[hydrate] Error parsing props for component ${t}`,this.getAttribute(`props`),e),e}await this.hydrator(this)(this.Component,o,r,{client:this.getAttribute(`client`)}),this.removeAttribute(`ssr`),this.dispatchEvent(new CustomEvent(`astro:hydrate`))}),r(this,`unmount`,()=>{this.isConnected||this.dispatchEvent(new CustomEvent(`astro:unmount`))})}disconnectedCallback(){document.removeEventListener(`astro:after-swap`,this.unmount),document.addEventListener(`astro:after-swap`,this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute(`await-children`)||document.readyState===`interactive`||document.readyState===`complete`)this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener(`DOMContentLoaded`,e),t.disconnect(),this.childrenConnectedCallback()},t=new MutationObserver(()=>{var t;((t=this.lastChild)==null?void 0:t.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue===`astro:end`&&(this.lastChild.remove(),e())});t.observe(this,{childList:!0}),document.addEventListener(`DOMContentLoaded`,e)}}async childrenConnectedCallback(){let e=this.getAttribute(`before-hydration-url`);e&&await import(e),this.start()}getRetryImportUrl(e){let t=new URL(e,document.baseURI);return t.searchParams.set(`astro-retry`,Date.now().toString()),t.toString()}async importWithRetry(e){try{return await import(e)}catch(t){return await new Promise(e=>setTimeout(e,1e3)),import(this.getRetryImportUrl(e))}}handleHydrationError(e){let t=this.getAttribute(`component-url`),n=new CustomEvent(`astro:hydration-error`,{cancelable:!0,bubbles:!0,composed:!0,detail:{error:e,componentUrl:t}});this.dispatchEvent(n)&&console.error(`[astro-island] Error hydrating ${t}`,e)}async start(){let e=JSON.parse(this.getAttribute(`opts`)),t=this.getAttribute(`client`);if(Astro[t]===void 0)window.addEventListener(`astro:${t}`,()=>this.start(),{once:!0});else try{await Astro[t](async()=>{let e=this.getAttribute(`renderer-url`);try{let[t,{default:n}]=await Promise.all([this.importWithRetry(this.getAttribute(`component-url`)),e?this.importWithRetry(e):Promise.resolve({default:()=>()=>{}})]),r=this.getAttribute(`component-export`)||`default`;if(r.includes(`.`)){this.Component=t;for(let e of r.split(`.`)){if(i.has(e)||!this.Component||typeof this.Component!=`object`&&typeof this.Component!=`function`||!Object.hasOwn(this.Component,e))throw Error(`Invalid component export path: ${r}`);this.Component=this.Component[e]}}else{if(i.has(r))throw Error(`Invalid component export path: ${r}`);this.Component=t[r]}return this.hydrator=n,this.hydrate}catch(e){return this.handleHydrationError(e),()=>{}}},e,this)}catch(e){this.handleHydrationError(e)}}attributeChangedCallback(){this.hydrate()}}r(o,`observedAttributes`,[`props`]),customElements.get(`astro-island`)||customElements.define(`astro-island`,o)}})();</script><astro-island uid="2wH2Dz" component-url="/_astro/SpaceSwitcher.C84a-OBd.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.js" props="{&quot;data-astro-transition-persist&quot;:[0,&quot;astro-gyrtbwwo-1&quot;]}" ssr client="only" opts="{&quot;name&quot;:&quot;SpaceSwitcher&quot;,&quot;value&quot;:&quot;react&quot;}" data-astro-transition-persist="astro-gyrtbwwo-1"></astro-island></div><button type="button" id="tw-nav-toggle" class="tw-nav-toggle" aria-label="收起或展开左侧导航" aria-expanded="true" aria-controls="tw-nav-aside"><svg class="tw-nav-toggle-icon is-collapse" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 6l-6 6 6 6"></path></svg><svg class="tw-nav-toggle-icon is-expand" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6"></path></svg></button><nav class="tw-nav-list flex-1 overflow-y-auto"><a href="/" class="tw-nav-item" data-i18n-hint="nav.home" data-hint="我的工作台"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M3 10.5 12 3l9 7.5"></path><path d="M5 9.5V20h14V9.5"></path></svg><span class="tw-nav-label" data-i18n="nav.home">我的工作台</span></a><div class="tw-nav-libraries"><div class="tw-nav-libraries-ph"><a href="/dashboard/" class="tw-nav-item" data-plugin-nav="dashboard"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="1.5"></rect><rect x="14" y="3" width="7" height="7" rx="1.5"></rect><rect x="3" y="14" width="7" height="7" rx="1.5"></rect><rect x="14" y="14" width="7" height="7" rx="1.5"></rect></svg><span class="tw-nav-label" data-i18n="nav.dashboard">仪表盘</span></a><a href="/tasks/" class="tw-nav-item" data-plugin-nav="tasks"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M9 5h10"></path><path d="M9 12h10"></path><path d="M9 19h10"></path><path d="M4 5h.01"></path><path d="M4 12h.01"></path><path d="M4 19h.01"></path></svg><span class="tw-nav-label" data-i18n="nav.tasks">任务管理</span></a><a href="/todos/" class="tw-nav-item" data-plugin-nav="todos"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M8 6h13"></path><path d="M8 12h13"></path><path d="M8 18h13"></path><path d="M3 6h.01"></path><path d="M3 12h.01"></path><path d="M3 18h.01"></path></svg><span class="tw-nav-label" data-i18n="nav.todos">待办事项</span></a><a href="/reports/" class="tw-nav-item" data-plugin-nav="reports"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h5"></path></svg><span class="tw-nav-label" data-i18n="nav.reports">工作汇报</span></a><a href="/test-stats/" class="tw-nav-item" data-plugin-nav="testStats"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M4 20V10"></path><path d="M10 20V4"></path><path d="M16 20v-7"></path><path d="M22 20H2"></path></svg><span class="tw-nav-label" data-i18n="nav.testStats">测试统计</span></a><a href="/case-exec/" class="tw-nav-item is-active font-medium" data-plugin-nav="caseExec"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="12" r="9"></circle><circle cx="12" cy="12" r="5"></circle><circle cx="12" cy="12" r="1.4"></circle></svg><span class="tw-nav-label" data-i18n="nav.caseExec">用例执行统计</span></a><a href="/cases/library/" class="tw-nav-item" data-plugin-nav="cases"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M9 11l3 3L22 4"></path><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg><span class="tw-nav-label" data-i18n="nav.caseManage">用例管理</span></a><a href="/knowledge/" class="tw-nav-item" data-plugin-nav="knowledgeLib"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg><span class="tw-nav-label" data-i18n="nav.knowledge">知识库管理</span></a><a href="/requirements/" class="tw-nav-item" data-plugin-nav="requirements" data-i18n-hint="nav.requirements"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h6"></path></svg><span class="tw-nav-label" data-i18n="nav.requirements">需求文档库</span></a><a href="/templates/" class="tw-nav-item" data-plugin-nav="templates" data-i18n-hint="nav.templates"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M12 3 3 8l9 5 9-5-9-5z"></path><path d="m3 13 9 5 9-5"></path></svg><span class="tw-nav-label" data-i18n="nav.templates">测试模板库</span></a></div><astro-island uid="Z1lgSd4" component-url="/_astro/NavLibraries.fxwcz0b0.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.js" props="{&quot;data-astro-transition-persist&quot;:[0,&quot;astro-iywf7oe7-2&quot;]}" ssr client="only" opts="{&quot;name&quot;:&quot;NavLibraries&quot;,&quot;value&quot;:&quot;react&quot;}" data-astro-transition-persist="astro-iywf7oe7-2"></astro-island></div><a href="/prompts/" class="tw-nav-item" data-plugin-nav="prompts" data-pinned-nav="prompts"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M12 20h9"></path><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg><span class="tw-nav-label" data-i18n="nav.prompts">提示词管理</span></a><a href="/docs/manual/" class="tw-nav-item" data-hint="帮助中心" data-i18n-hint="nav.helpCenter"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M5 4.5h9.5L19 9v10.5H5V4.5Z" stroke-linejoin="round"></path><path d="M14.5 4.5V9H19" stroke-linejoin="round"></path><path d="M8 13h8M8 16.5h6" stroke-linecap="round"></path></svg><span class="tw-nav-label" data-i18n="nav.helpCenter">帮助中心</span></a></nav><div class="tw-nav-foot"><script>(function(){let e=async e=>{await(await e())()};(self.Astro||(self.Astro={})).load=e,window.dispatchEvent(new Event(`astro:load`))})();</script><astro-island uid="Z12jkyC" prefix="r1" component-url="/_astro/SettingsDialog.DrVaJAbf.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.js" props="{}" ssr client="load" opts="{&quot;name&quot;:&quot;SettingsDialog&quot;,&quot;value&quot;:true}" await-children><div class="tw-nav-foot-row"><button type="button" class="tw-nav-settings-btn" data-hint="设置"><svg class="tw-nav-ico w-4.5 h-4.5 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9c.2.6.7 1 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"></path></svg><span data-i18n="nav.settings">设置</span></button><button type="button" class="tw-nav-provider-chip is-empty" data-hint="未配置模型"><span class="tw-nav-provider-dot" aria-hidden="true"></span><span class="tw-nav-provider-name">未配置</span></button></div><span hidden="" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none"></span><!--astro:end--></astro-island></div></aside><script data-astro-rerun>
110
+ (function () {
111
+ var root = document.documentElement;
112
+ var btn = document.getElementById('tw-nav-toggle');
113
+ function apply(collapsed) {
114
+ if (collapsed) root.dataset.navCollapsed = '1';
115
+ else delete root.dataset.navCollapsed;
116
+ try {
117
+ localStorage.setItem('tw.nav.collapsed', collapsed ? '1' : '0');
118
+ } catch (e) {}
119
+ if (btn) {
120
+ btn.setAttribute('aria-expanded', collapsed ? 'false' : 'true');
121
+ // 气泡已移除;改为动态更新不可见标签,读屏仍能获知当前动作
122
+ btn.setAttribute('aria-label', collapsed ? '展开导航' : '收起导航');
123
+ }
124
+ }
125
+ apply(root.dataset.navCollapsed === '1');
126
+ if (btn) {
127
+ btn.addEventListener('click', function () {
128
+ apply(root.dataset.navCollapsed !== '1');
129
+ });
130
+ }
131
+
132
+ try {
133
+ var raw = localStorage.getItem('tw.app.config.v1');
134
+ if (!raw) return;
135
+ var g = JSON.parse(raw).general || {};
136
+ if (g.language !== 'en') return;
137
+ var en = {
138
+ 'nav.brand': 'Lantern Harness',
139
+ 'nav.home': 'My Workbench',
140
+ 'nav.dashboard': 'Dashboard',
141
+ 'nav.tasks': 'Tasks',
142
+ 'nav.todos': 'Todos',
143
+ 'nav.reports': 'Work Report',
144
+ 'nav.testStats': 'Test Statistics',
145
+ 'nav.caseExec': 'Case Execution',
146
+ 'nav.caseManage': 'Test Cases',
147
+ 'nav.prompts': 'Prompts',
148
+ 'nav.knowledge': 'Knowledge Mgmt',
149
+ 'nav.plugins': 'My Plugins',
150
+ 'nav.docs': 'Documents',
151
+ 'nav.requirements': 'Requirements',
152
+ 'nav.templates': 'Test Templates',
153
+ 'nav.settings': 'Settings',
154
+ 'nav.changelog': 'Changelog',
155
+ 'nav.changelogShort': 'Changelog',
156
+ 'nav.helpCenter': 'Help Center',
157
+ 'docs.nav.title': 'Docs',
158
+ 'docs.nav.changelog': 'Changelog',
159
+ 'docs.nav.manual': 'User Guide',
160
+ 'docs.nav.install': 'Install Guide',
161
+ 'nav.repo': 'GitHub',
162
+ 'nav.repoShort': 'Repo',
163
+ 'nav.npm': 'npm package',
164
+ 'nav.npmShort': 'npm',
165
+ 'nav.site': 'Yycy Docs',
166
+ 'nav.siteShort': 'Site',
167
+ 'nav.board': 'Questions & suggestions',
168
+ 'nav.boardShort': 'Suggestions',
169
+ };
170
+ document.querySelectorAll('[data-i18n]').forEach(function (el) {
171
+ var key = el.getAttribute('data-i18n');
172
+ if (key && en[key]) el.textContent = en[key];
173
+ });
174
+ document.querySelectorAll('[data-i18n-hint]').forEach(function (el) {
175
+ var key = el.getAttribute('data-i18n-hint');
176
+ if (key && en[key]) el.setAttribute('data-hint', en[key]);
177
+ });
178
+ } catch (e) {}
179
+ })();
180
+ </script><main data-astro-transition-scope="astro-bbhp3f5g-3" class="tw-main min-h-screen"><div id="tw-route-loading" class="tw-route-loading is-hidden" role="status" aria-live="polite" aria-label="页面加载中"><span class="tw-route-loading-spin" aria-hidden="true"></span></div><div class="tw-library-page tw-library-wide px-8 py-8"><header class="mb-6 shrink-0"><h1 class="text-2xl font-bold text-stone-900">用例执行统计</h1><p class="mt-2 text-sm text-stone-500">按项目记录每一轮用例执行情况;当前剩余用例与执行比例由「用例总数 / 已执行用例」自动计算。 列表按日期从新到旧排列(最新的在最上面),点「+ 添加记录」即写入数据文件(刷新不丢),单元格改完自动保存;支持搜索、批量删除与分页。数据保存在当前数据空间的<code class="mx-1 rounded bg-stone-100 px-1 py-0.5 text-[12px] text-stone-600">用例执行统计/用例执行统计.json</code>里。</p></header><astro-island uid="ZSO2RK" component-url="/_astro/CaseExecBoard.GIKQ6ccZ.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.js" props="{}" ssr client="only" opts="{&quot;name&quot;:&quot;CaseExecBoard&quot;,&quot;value&quot;:&quot;react&quot;}"></astro-island></div></main></div><script>
181
+ (function () {
182
+ /**
183
+ * 切页滚回顶部。
184
+ * 只在「换页后」重置:若在 before-preparation(点击瞬间)就重置,
185
+ * 当前页面会先跳回顶部、再等新页到达,用户看到的就是「打开时还在滚动」。
186
+ * 带锚点(#)时交给浏览器定位,不强制回顶。
187
+ */
188
+ try {
189
+ if ('scrollRestoration' in history) history.scrollRestoration = 'manual';
190
+ } catch (e) {}
191
+ function twScrollTop() {
192
+ if (location.hash) return;
193
+ if (window.scrollY === 0 && document.documentElement.scrollTop === 0) return;
194
+ try {
195
+ // instant:不受将来可能加入的 scroll-behavior: smooth 影响
196
+ window.scrollTo({ top: 0, left: 0, behavior: 'instant' });
197
+ } catch (e) {
198
+ // 旧浏览器不认 instant,会抛 TypeError,退回普通写法
199
+ window.scrollTo(0, 0);
200
+ }
201
+ document.documentElement.scrollTop = 0;
202
+ document.body.scrollTop = 0;
203
+ var main = document.querySelector('.tw-main');
204
+ if (main) main.scrollTop = 0;
205
+ }
206
+ document.addEventListener('astro:after-swap', twScrollTop);
207
+ document.addEventListener('astro:page-load', twScrollTop);
208
+
209
+ /**
210
+ * 软导航「闪白」修复。
211
+ * ClientRouter 交换文档时,会用新文档 <html> 的属性整体替换当前 <html>,
212
+ * 于是 data-theme 连同 style 里的 color-scheme 一起被清空;在主题属性
213
+ * 恢复之前,color-scheme 回落到 normal,画布变白 —— 深色主题下就是
214
+ * 切页瞬间的闪白(与具体页面无关,所有路由都受影响)。
215
+ * 在交换前把主题 / 语言写进新文档的 <html>,交换完成时即已带上,不留空档。
216
+ */
217
+ document.addEventListener('astro:before-swap', function (e) {
218
+ var next = e.newDocument;
219
+ if (!next || !next.documentElement) return;
220
+ var cur = document.documentElement;
221
+ var nextRoot = next.documentElement;
222
+ var theme = cur.dataset.theme;
223
+ if (theme) {
224
+ nextRoot.dataset.theme = theme;
225
+ nextRoot.style.colorScheme = theme;
226
+ }
227
+ if (cur.lang) nextRoot.lang = cur.lang;
228
+ // 新文档是「解析」出来的:head 里的内联脚本在解析阶段不会执行,
229
+ // 于是所有运行期写在 <html> 上的状态都不会自带。主题 / 语言之外,
230
+ // 侧栏收起状态与空间服务可用性同样要显式搬过去,否则每次软导航都会丢
231
+ // (表现为侧栏自己弹开、骨架又冒出来)。
232
+ if (cur.dataset.navCollapsed === '1') nextRoot.dataset.navCollapsed = '1';
233
+ if (cur.dataset.spaceService) nextRoot.dataset.spaceService = cur.dataset.spaceService;
234
+ // 插件开关同理:不搬过去会先亮出被隐藏的侧栏入口,等 page-load 再收起
235
+ [
236
+ 'pluginOffTasks',
237
+ 'pluginOffTodos',
238
+ 'pluginOffReports',
239
+ 'pluginOffTestStats',
240
+ 'pluginOffCaseExec',
241
+ 'pluginOffDashboard',
242
+ 'pluginOffCases',
243
+ 'pluginOffKnowledgeLib',
244
+ 'pluginOffRequirements',
245
+ 'pluginOffTemplates',
246
+ ].forEach(function (key) {
247
+ if (cur.dataset[key]) nextRoot.dataset[key] = cur.dataset[key];
248
+ });
249
+ });
250
+
251
+ /** 版本日志「查看更多」:委托绑定,兼容 View Transitions 软导航 */
252
+ document.addEventListener('click', function (e) {
253
+ var t = e.target;
254
+ if (!(t instanceof Element)) return;
255
+ var btn = t.closest('.tw-changelog-toggle');
256
+ if (!(btn instanceof HTMLButtonElement)) return;
257
+ var card = btn.closest('.tw-changelog-card');
258
+ if (!(card instanceof HTMLElement)) return;
259
+ e.preventDefault();
260
+ var next = card.getAttribute('data-open') !== 'true';
261
+ card.setAttribute('data-open', next ? 'true' : 'false');
262
+ btn.setAttribute('aria-expanded', next ? 'true' : 'false');
263
+ var label = btn.querySelector('.tw-changelog-toggle-label');
264
+ if (label) label.textContent = next ? '收起' : '查看更多';
265
+ });
266
+ })();
267
+ </script></body></html>