lantern-harness 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/builtin/session/lh-nav-groups.mjs +3 -0
- package/config/app.defaults.json +1 -0
- package/dist/500.html +52 -4
- package/dist/_astro/Base.UUIdmKid.css +1 -0
- package/dist/_astro/{Base.astro_astro_type_script_index_0_lang.C30xtpc6.js → Base.astro_astro_type_script_index_0_lang.kD0Cbs0F.js} +1 -1
- package/dist/_astro/{CaseExecBoard.Dttqp0wg.js → CaseExecBoard.D8K4NzrB.js} +1 -1
- package/dist/_astro/CaseGenerateApp.bZ_K72NQ.js +9 -0
- package/dist/_astro/{CasesLibrary.8aMUUGp_.js → CasesLibrary.Dhg2pdwU.js} +1 -1
- package/dist/_astro/ChatApp.B6I3gGKI.js +221 -0
- package/dist/_astro/{ConfirmDialog.BZzZWDci.js → ConfirmDialog.CsMwWevK.js} +1 -1
- package/dist/_astro/{DashboardBoard.CkSbhEDI.js → DashboardBoard.uPjTYpJZ.js} +1 -1
- package/dist/_astro/{DocsFileBrowser.MKVCfZrE.js → DocsFileBrowser.DvBPLCEp.js} +1 -1
- package/dist/_astro/{DocsPager.DJY4foYL.js → DocsPager.EPT5-oEx.js} +1 -1
- package/dist/_astro/{DrawerField.CHRg77LG.js → DrawerField.DqvXFCFh.js} +1 -1
- package/dist/_astro/{ExcelFieldTags.DXMeaDa5.js → ExcelFieldTags.De-C3dqn.js} +1 -1
- package/dist/_astro/{KnowledgeLibrary.B-p1aoQN.js → KnowledgeLibrary.BzFTmNwA.js} +1 -1
- package/dist/_astro/{NamePromptDialog.Wa9O530a.js → NamePromptDialog.CS1pTTVl.js} +1 -1
- package/dist/_astro/{NavLibraries.C6LImMO_.js → NavLibraries.CVdolwYy.js} +1 -1
- package/dist/_astro/PluginsPage.B8U4uvD2.js +39 -0
- package/dist/_astro/{PluginsPage.DkmRPfbU.js → PluginsPage.v6afs984.js} +1 -1
- package/dist/_astro/{PmBugsBoard.CMT4-eoB.js → PmBugsBoard.CSIGq0wz.js} +1 -1
- package/dist/_astro/{PmIterationsBoard.BQM_dzdZ.js → PmIterationsBoard.BmBc90as.js} +1 -1
- package/dist/_astro/{PmProjectDetail.CzU80pat.js → PmProjectDetail.BDKXOQJD.js} +1 -1
- package/dist/_astro/{PmProjectsBoard.Cxsa7SYQ.js → PmProjectsBoard.DIVs_xJu.js} +1 -1
- package/dist/_astro/{PmRequirementsBoard.4_JMDDN0.js → PmRequirementsBoard.DcLiUhBe.js} +1 -1
- package/dist/_astro/PmRequirementsBoard.N0LM5jHo.js +1 -0
- package/dist/_astro/PmShared.D69sPvec.js +1 -0
- package/dist/_astro/PromptsLibrary.B1RVZqj8.js +1 -0
- package/dist/_astro/{ReportsPage.Fh5DRKLT.js → ReportsPage.N1EaH8E-.js} +1 -1
- package/dist/_astro/ReqAnalysisBoard.Bd69wB2p.js +25 -0
- package/dist/_astro/{RequirementsLibrary.CBkuWE8X.js → RequirementsLibrary.BZhxG9VU.js} +1 -1
- package/dist/_astro/SearchableSelect.BIjXzTPD.js +1 -0
- package/dist/_astro/SelectDropdown.B3-XpBpn.js +1 -0
- package/dist/_astro/{SettingsDialog.CJvBRcs9.js → SettingsDialog.DbjLDMDJ.js} +1 -1
- package/dist/_astro/SlideOverDrawer.HqVYaIjP.js +1 -0
- package/dist/_astro/{SpaceSwitcher.BVQLt_tL.js → SpaceSwitcher.BeCumAuj.js} +1 -1
- package/dist/_astro/{TasksBoard.Bu-fpIZ7.js → TasksBoard.B3SzQ5bR.js} +1 -1
- package/dist/_astro/{TemplatesLibrary.DSylQGlN.js → TemplatesLibrary.Ci3yHQTr.js} +1 -1
- package/dist/_astro/{TestStatsBoard.CPyKW4wc.js → TestStatsBoard.CgVvwMzN.js} +1 -1
- package/dist/_astro/{TodosBoard.8kvRTEW-.js → TodosBoard.BNDF1iVZ.js} +1 -1
- package/dist/_astro/UiAutoBoard.Bo0dpRuf.js +9 -0
- package/dist/_astro/app-config.Cq_F8I0l.js +1 -0
- package/dist/_astro/dialog.DZHZCe_T.js +1 -0
- package/dist/_astro/{hydrate-cache.BXX604Bw.js → hydrate-cache.zljz1n5X.js} +1 -1
- package/dist/_astro/i18n.DPw-aTIZ.js +7 -0
- package/dist/_astro/index.astro_astro_type_script_index_0_lang.B9YrqBHf.js +1 -0
- package/dist/_astro/{lib.CgXLzMMd.js → lib.BQbwbnfE.js} +1 -1
- package/dist/_astro/listbox.DNxAJmEo.js +1 -0
- package/dist/_astro/menu.Dnrpz489.js +1 -0
- package/dist/_astro/{open-docs-in-session.CyFNgh1I.js → open-docs-in-session.LWVC43xp.js} +1 -1
- package/dist/_astro/{plugins.C2BMfzv1.js → plugins.CKkgnq4r.js} +1 -1
- package/dist/_astro/{portal.C0hAhXDF.js → portal.Chh6O5xk.js} +2 -2
- package/dist/_astro/prompts-meta.D_2wiFiH.js +2 -0
- package/dist/_astro/req-analysis.C1uUndMm.js +6 -0
- package/dist/_astro/{settings.Ceefeil5.js → settings.HM3DiNh0.js} +2 -2
- package/dist/_astro/{spaces-client.BocUabwy.js → spaces-client.CWqBZccW.js} +1 -1
- package/dist/_astro/ui-auto-prompt.B09MVaTI.js +4 -0
- package/dist/_astro/{update.CvfIVwnq.js → update.BkHtINbZ.js} +1 -1
- package/dist/_astro/{use-text-value.DBQvHeNl.js → use-text-value.B3mOiuGb.js} +1 -1
- package/dist/_astro/{view-prefs.BEAZRcxF.js → view-prefs.7wGuDpzi.js} +1 -1
- package/dist/case-exec/index.html +83 -5
- package/dist/cases/generate/index.html +53 -5
- package/dist/cases/library/index.html +83 -5
- package/dist/dashboard/index.html +83 -5
- package/dist/docs/changelog/index.html +84 -5
- package/dist/docs/install/index.html +52 -4
- package/dist/docs/manual/index.html +80 -4
- package/dist/index.html +1 -1
- package/dist/knowledge/index.html +83 -5
- 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 +52 -4
- package/dist/plugins/index.html +53 -5
- package/dist/pm/bugs/index.html +83 -5
- package/dist/pm/iterations/index.html +83 -5
- package/dist/pm/projects/detail/index.html +83 -5
- package/dist/pm/projects/index.html +83 -5
- package/dist/pm/requirements/index.html +83 -5
- package/dist/prompts/index.html +83 -5
- package/dist/reports/index.html +83 -5
- package/dist/requirement-analysis/index.html +795 -0
- package/dist/requirements/index.html +83 -5
- package/dist/tasks/index.html +83 -5
- package/dist/templates/index.html +83 -5
- 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 +52 -4
- 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 +52 -4
- 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 +52 -4
- 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 +52 -4
- 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 +52 -4
- package/dist/test-automation/index.html +83 -5
- package/dist/test-stats/index.html +83 -5
- package/dist/todos/index.html +83 -5
- package/dist/workbench/index.html +53 -5
- package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +22 -0
- package/lh-plugins/lh-req-analysis.mjs +672 -0
- package/lh-plugins/plugin-prompts.mjs +2 -0
- package/lh-plugins/req-analysis-prompt.mjs +118 -0
- package/package.json +1 -1
- package/dist/_astro/Base.BOY6F0mi.css +0 -1
- package/dist/_astro/CaseGenerateApp.DqW_nWMc.js +0 -9
- package/dist/_astro/ChatApp.BLxf0h1d.js +0 -219
- package/dist/_astro/PluginsPage.-97n3x2U.js +0 -39
- package/dist/_astro/PmRequirementsBoard.B8HL07cw.js +0 -1
- package/dist/_astro/PmShared.Ca2Ao7v_.js +0 -1
- package/dist/_astro/PromptsLibrary.C9BcIxKK.js +0 -1
- package/dist/_astro/SearchableSelect.DnjoSslK.js +0 -1
- package/dist/_astro/SelectDropdown.CuuDHa8s.js +0 -1
- package/dist/_astro/SlideOverDrawer.B7B5Wu8I.js +0 -1
- package/dist/_astro/UiAutoBoard.DFTiDqCp.js +0 -9
- package/dist/_astro/active-element-history.CED-m1Zp.js +0 -1
- package/dist/_astro/app-config.BUPzGl9f.js +0 -1
- package/dist/_astro/dialog.BAPTk9a_.js +0 -1
- package/dist/_astro/i18n.BGPnP1Bg.js +0 -7
- package/dist/_astro/index.astro_astro_type_script_index_0_lang.LPL9mPQY.js +0 -1
- package/dist/_astro/listbox.C96OCanh.js +0 -1
- package/dist/_astro/menu.IPWdRoNM.js +0 -1
- package/dist/_astro/prompts-meta.Bua-j14I.js +0 -2
- package/dist/_astro/ui-auto-prompt.CX8fju7r.js +0 -3
- package/dist/_astro/use-tree-walker.DFU2AaAP.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e}from"./app-config.
|
|
1
|
+
import{f as e}from"./app-config.Cq_F8I0l.js";import{n as t}from"./i18n.DPw-aTIZ.js";var n=`/__tb_spaces`;async function r(e,t){try{let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})}),r=await n.json();return n.ok?r:{ok:!1,error:r?.error||`请求失败(HTTP ${n.status})`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function i(e){try{return(await fetch(n,{signal:e??AbortSignal.timeout(2e3)})).ok}catch{return!1}}async function a(t){try{let r=t?.stats?`${n}?stats=1`:n,i=await fetch(r);if(!i.ok)return null;let a=await i.json();return a?.activeId&&e(a.activeId),a}catch{return null}}async function o(t){let i=await r(`${n}/switch`,{id:t});return i.ok&&e(t),i}function s(e,t){return r(`${n}/create`,{name:e,managedParent:t?.managedParent,switch:t?.switch===!0,systemPrompt:t?.systemPrompt,promptBrief:t?.promptBrief})}function c(e){let t=e instanceof Error?e.message:String(e??``);return!t.trim()||/^not found$/i.test(t.trim())?`本地服务版本较旧,还没有空间编辑接口;请重启本地服务后再试`:t}async function l(e){try{let t=await fetch(`${n}/detail?id=${encodeURIComponent(e)}`),r=await t.json();return t.ok?r:{ok:!1,error:c(r?.error??`HTTP ${t.status}`)}}catch(e){return{ok:!1,error:c(e)}}}async function u(e,t){let i=await r(`${n}/update`,{id:e,...t});return i.ok?i:{...i,error:c(i.error)}}function d(e,t){return r(`${n}/copy`,{id:e,name:t})}function f(e,t){return r(`${n}/delete`,{id:e,purge:t,confirm:t===!0})}function p(e,t=`full`){return`${n}/export?id=${encodeURIComponent(e)}${t===`content`?`&scope=content`:``}`}function m(e){return r(`${n}/discover`,Array.isArray(e)&&e.length?{adopt:e}:{})}async function h(e,t){let i=await e.arrayBuffer(),a=new Uint8Array(i),o=``,s=32768;for(let e=0;e<a.length;e+=s)o+=String.fromCharCode(...a.subarray(e,e+s));let c=btoa(o);return r(`${n}/import`,{zipBase64:c,name:t})}function g(e){return e.isPublic?t(`space.publicName`):e.name}function _(e,t){let n=e.includes(`\\`)?`\\`:`/`,r=t.replace(/[/\\]+$/,``),i=`${r}${n}空间池`;if(e===i)return r;let a=`${i}${n}`;return e.startsWith(a)?`${r}${n}${e.slice(a.length)}`:e}function v(e){if(!e||e<=0)return`—`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=0,r=e;for(;r>=1024&&n<t.length-1;)r/=1024,n+=1;return`${r<10&&n>0?r.toFixed(1):Math.round(r)} ${t[n]}`}export{g as a,l as c,a as d,i as f,m as i,v as l,u as m,s as n,_ as o,o as p,f as r,p as s,d as t,h as u};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{_ as e,f as t}from"./project-docs.Cd2gKPKh.js";var n=`/__tb_uiauto`,r=`Playwright提示词.md`;function i(e){let t=String(e??``),n={plan:``,agent:``,code:``};if(!t.trim())return n;let r=``,i=[],a=()=>{let e=i.join(`
|
|
2
|
+
`).trim();r&&(n[r]=e),i=[]};for(let e of t.split(`
|
|
3
|
+
`)){let t=/^##\s+(.+?)\s*$/.exec(e);if(t){a();let e=t[1];r=/规划/.test(e)?`plan`:/探索/.test(e)?`agent`:/代码|出码/.test(e)?`code`:``}else(r||!/^#\s/.test(e)&&!/^>\s?/.test(e))&&r&&i.push(e)}return a(),n}function a(e){return[`# ${e.replace(/\.md$/i,``).trim()||`Playwright提示词.md`.replace(/\.md$/i,``)}`,``,`> 自动化测试提示词:生成时按下面三段分别作为「规划 / 探索 / 出码」的系统提示词。`,``,`## 规划阶段`,``,`- 一行一步,只写「动作 + 目标」;`,`- 覆盖:打开页面、关键前置(登录 / 导航)、核心操作、至少一条结果断言。`,``,`## 探索阶段`,``,`- 每一步先用可读描述定位目标,再回填真实定位器;`,`- 关键节点截一张图,方便人确认;`,"- 账号 / 密码等占位数据写成 `${ENV_NAME}`,不要写死。",``,`## 生成代码`,``,`- 复用项目已有的 page object / fixture / 登录态,不要另起一套;`,`- 选择器用探索阶段确认过的定位器,不加与断言无关的 sleep。`,``].join(`
|
|
4
|
+
`)}function o(e){let t=Array.from(String(e??``)).map(e=>e.charCodeAt(0)<32||`\\/:*?"<>|`.includes(e)?` `:e).join(``).replace(/\s+/g,` `).trim();if(!t)return``;let n=/\.md$/i.test(t)?t:`${t}.md`;return n.length>120?``:n}async function s(n,r){let i=o(n);if(!i)throw Error(`文件名不合法:不能包含 / \\ : * ? " < > |`);let s=``;if(r)try{s=(await t(`prompts`,r)).content}catch{s=``}return await e(`prompts`,i,s.trim()?s:a(i)),i}async function c(e){let t=await fetch(`${n}/prompt/sync`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e})});if(!t.ok)throw Error(`同步 UI 自动化测试提示词失败(${t.status})`);return await t.json()}async function l(e){let n=String(e??``).trim()||`Playwright提示词.md`,r={ok:!1,file:n,exists:!1,plan:``,agent:``,code:``};try{let{content:e}=await t(`prompts`,n);return{ok:!0,file:n,exists:!!e.trim(),...i(e)}}catch(e){return{...r,error:e instanceof Error?e.message:String(e)}}}export{c as i,s as n,l as r,r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`0.1.
|
|
1
|
+
var e=`0.1.12`,t=`/__tb_update`;async function n(e=!1){try{let n=await fetch(e?`${t}?refresh=1`:t,{signal:AbortSignal.timeout(6e3),headers:{accept:`application/json`},cache:`no-store`});if(!n.ok)return null;let r=await n.json();return!r||typeof r.current!=`string`?null:r}catch{return null}}async function r(e){try{let n=await fetch(t,{method:`POST`,signal:AbortSignal.timeout(1e4),headers:{"content-type":`application/json`},body:JSON.stringify(e?{version:e}:{})});return n.status===202?{ok:!0}:{ok:!1,error:(await n.json().catch(()=>null))?.error||`HTTP ${n.status}`}}catch(e){return{ok:!0,error:e instanceof Error?e.message:String(e)}}}export{r as n,e as r,n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e,t}from"./react.Blvh0GOs.js";import{t as n}from"./react-dom.DLW9pGCF.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.C0hAhXDF.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};
|
|
1
|
+
import{s as e,t}from"./react.Blvh0GOs.js";import{t as n}from"./react-dom.DLW9pGCF.js";import{B as r,G as i,H as a,J as o,K as s,Q as c,U as l,V as u,W as d,_ as f,_t as p,ct as m,ft as h,lt as g,mt as _,pt as v,q as y,rt as b,tt as x,ut as S}from"./portal.Chh6O5xk.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=v(),a=S(()=>{t.current=null,r(!1),i.dispose()}),o=S(e=>{if(i.dispose(),t.current===null){t.current=e.currentTarget,r(!0);{let n=p(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&&!l(t);)u(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(u(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=S(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,c.useId)(),o=tt(),l=Ze(),u=m(),{id:d=`headlessui-label-${n}`,htmlFor:f=l??o.props?.htmlFor,passive:p=!1,..._}=e,v=r(t);h(()=>o.register(d),[d,o.register]);let y=S(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&a(e.target))&&(s(t)&&e.preventDefault(),o.props&&`onClick`in o.props&&typeof o.props.onClick==`function`&&o.props.onClick(e),s(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;(i(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})}}}),b=g({...o.slot,disabled:u||!1}),C={ref:v,...o.props,id:d,htmlFor:f,onClick:y};return p&&(`onClick`in C&&(delete C.htmlFor,delete C.onClick),`onClick`in _&&delete _.onClick),x()({ourProps:C,theirProps:_,slot:b,defaultTag:f?it:`div`,name:o.name||`Label`})}var ot=b(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 h(()=>{if(!t||!e)return;let n=_();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:S(n=>{t.current=n.pointerType,!Qe(n.currentTarget)&&n.pointerType===`mouse`&&n.button===ut.Left&&(n.preventDefault(),e(n))}),onClick:S(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:i}){let a=(0,j.useRef)(null),s=(0,j.useRef)(null),c=(0,j.useRef)(null);f(e&&t!==null,`pointerdown`,e=>{o(e?.target)&&t!=null&&t.contains(e.target)&&(s.current=e.x,c.current=e.y,a.current=e.timeStamp)}),f(e&&t!==null,`pointerup`,e=>{let t=a.current;if(t===null||(a.current=null,!d(e.target))||Math.abs(e.x-(s.current??e.x))<ht&&Math.abs(e.y-(c.current??e.y))<ht)return;let o=n(e);switch(o.kind){case 0:return;case 1:e.timeStamp-t>mt&&(i(o.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)]);h(()=>{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),o=(0,j.useRef)(null),[s,c]=(0,j.useState)(null);Wr(s);let l=t&&n!==null&&s!==null,{to:u=`bottom`,gap:d=0,offset:f=0,padding:p=0,inner:m}=Gr(n,s),[g,_=`center`]=u.split(` `);h(()=>{l&&a(0)},[l]);let{refs:v,floatingStyles:b,context:x}=Or({open:l,placement:g===`selection`?_===`center`?`bottom`:`bottom-${_}`:_===`center`?`${g}`:`${g}-${_}`,strategy:`absolute`,transform:!1,middleware:[nr({mainAxis:g===`selection`?0:d,crossAxis:f}),rr({padding:p}),g!==`selection`&&ir({padding:p}),g===`selection`&&m?Pr({...m,padding:p,overflowRef:o,offset:i,minItemsVisible:Hr,referenceOverflowThreshold:p,onFallbackChange(e){if(!e)return;let t=x.elements.floating;if(!t)return;let n=parseFloat(getComputedStyle(t).scrollPaddingBottom)||0,r=Math.min(Hr,t.childElementCount),i=0,o=0;for(let e of x.elements.floating?.childNodes??[])if(y(e)){let a=e.offsetTop,s=a+e.clientHeight+n,c=t.scrollTop,l=c+t.clientHeight;if(a>=c&&s<=l)r--;else{o=Math.max(0,Math.min(s,l)-Math.max(a,c)),i=e.clientHeight;break}}r>=1&&a(e=>{let t=i*r-o+n;return e>=t?e:t})}}):null,ar({padding:p,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=g,w=_]=x.placement.split(`-`);g===`selection`&&(C=`selection`);let T=(0,j.useMemo)(()=>({anchor:[C,w].filter(Boolean).join(` `)}),[C,w]),{getReferenceProps:ee,getFloatingProps:te}=Mr([Fr(x,{overflowRef:o,onChange:a})]),ne=S(e=>{c(e),v.setFloating(e)});return j.createElement(Ir.Provider,{value:r},j.createElement($.Provider,{value:{setFloating:ne,setReference:v.setReference,styles:b,getReferenceProps:ee,getFloatingProps:te,slot:T}},e))}function Wr(e){h(()=>{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=v(),i=S((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 h(()=>{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=_();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(!y(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 S(()=>{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{Ze as C,Be as E,st as S,Ke as T,dt as _,Xr as a,nt 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,lt as v,Ye as w,rt as x,tt as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e}from"./app-config.
|
|
1
|
+
import{p as e}from"./app-config.Cq_F8I0l.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};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if ('scrollRestoration' in history) history.scrollRestoration = 'manual';
|
|
5
5
|
} catch (e) {}
|
|
6
|
-
</script><script type="module" src="/_astro/Base.astro_astro_type_script_index_0_lang.
|
|
6
|
+
</script><script type="module" src="/_astro/Base.astro_astro_type_script_index_0_lang.kD0Cbs0F.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
7
|
(function () {
|
|
8
8
|
try {
|
|
9
9
|
// 配置按空间分键(`tw.app.config.v1::<spaceId>`),主题必须从同一个键读,
|
|
@@ -80,9 +80,25 @@
|
|
|
80
80
|
}, 3000);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
// 有了侧栏刷新缓存(上次真实渲染的 DOM)也不必再摆平铺占位:
|
|
84
|
+
// 否则收起的分组会先以「平铺展开」的样子闪一下再变成分组
|
|
85
|
+
try {
|
|
86
|
+
var navCacheKey = spaceId ? 'tw.hydrate.nav::' + spaceId : 'tw.hydrate.nav';
|
|
87
|
+
if (localStorage.getItem(navCacheKey)) {
|
|
88
|
+
document.documentElement.dataset.navCached = '1';
|
|
89
|
+
window.setTimeout(function () {
|
|
90
|
+
var island = document.querySelector('.tw-nav-libraries astro-island');
|
|
91
|
+
if (!island || !island.querySelector('.tw-nav-item-main')) {
|
|
92
|
+
document.documentElement.removeAttribute('data-nav-cached');
|
|
93
|
+
}
|
|
94
|
+
}, 3000);
|
|
95
|
+
}
|
|
96
|
+
} catch (e) {
|
|
97
|
+
/* ignore */
|
|
98
|
+
}
|
|
83
99
|
} catch (e) {}
|
|
84
100
|
})();
|
|
85
|
-
</script><link rel="stylesheet" href="/_astro/Base.
|
|
101
|
+
</script><link rel="stylesheet" href="/_astro/Base.UUIdmKid.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) {
|
|
86
102
|
animation-duration: 180ms;
|
|
87
103
|
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
88
104
|
animation-fill-mode: both;
|
|
@@ -118,10 +134,11 @@
|
|
|
118
134
|
animation-duration: 180ms;
|
|
119
135
|
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
120
136
|
animation-fill-mode: both;
|
|
121
|
-
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" data-astro-reload><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.10">v0.1.10<span class="tw-nav-brand-dot" id="tw-update-dot" role="button" tabindex="-1" aria-label="有新版本可更新" hidden></span></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.BVQLt_tL.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{"data-astro-transition-persist":[0,"astro-gyrtbwwo-1"]}" ssr client="only" opts="{"name":"SpaceSwitcher","value":"react"}" 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="/workbench/" 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="/pm/projects/" class="tw-nav-item" data-plugin-nav="projects"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z"></path></svg><span class="tw-nav-label" data-i18n="nav.projects">项目列表</span></a><a href="/pm/iterations/" class="tw-nav-item" data-plugin-nav="iterations"><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="5" width="18" height="16" rx="2"></rect><path d="M8 3v4"></path><path d="M16 3v4"></path><path d="M3 10h18"></path></svg><span class="tw-nav-label" data-i18n="nav.iterations">迭代管理</span></a><a href="/pm/requirements/" class="tw-nav-item" data-plugin-nav="pmRequirements"><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.requirementsMgmt">需求管理</span></a><a href="/pm/bugs/" class="tw-nav-item" data-plugin-nav="bugs"><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="14" r="5"></circle><path d="M9 6l2 2"></path><path d="M15 6l-2 2"></path><path d="M7 11H4"></path><path d="M20 11h-3"></path><path d="M7 17H4"></path><path d="M20 17h-3"></path></svg><span class="tw-nav-label" data-i18n="nav.bugs">缺陷管理</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.C6LImMO_.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{"data-astro-transition-persist":[0,"astro-iywf7oe7-2"]}" ssr client="only" opts="{"name":"NavLibraries","value":"react"}" data-astro-transition-persist="astro-iywf7oe7-2"></astro-island><script>(function(){const host = ".tw-nav-libraries";
|
|
137
|
+
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" data-astro-reload><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.12">v0.1.12<span class="tw-nav-brand-dot" id="tw-update-dot" role="button" tabindex="-1" aria-label="有新版本可更新" hidden></span></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.BeCumAuj.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{"data-astro-transition-persist":[0,"astro-gyrtbwwo-1"]}" ssr client="only" opts="{"name":"SpaceSwitcher","value":"react"}" 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="/workbench/" 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="/pm/projects/" class="tw-nav-item" data-plugin-nav="projects"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z"></path></svg><span class="tw-nav-label" data-i18n="nav.projects">项目列表</span></a><a href="/pm/iterations/" class="tw-nav-item" data-plugin-nav="iterations"><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="5" width="18" height="16" rx="2"></rect><path d="M8 3v4"></path><path d="M16 3v4"></path><path d="M3 10h18"></path></svg><span class="tw-nav-label" data-i18n="nav.iterations">迭代管理</span></a><a href="/pm/requirements/" class="tw-nav-item" data-plugin-nav="pmRequirements"><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.requirementsMgmt">需求管理</span></a><a href="/pm/bugs/" class="tw-nav-item" data-plugin-nav="bugs"><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="14" r="5"></circle><path d="M9 6l2 2"></path><path d="M15 6l-2 2"></path><path d="M7 11H4"></path><path d="M20 11h-3"></path><path d="M7 17H4"></path><path d="M20 17h-3"></path></svg><span class="tw-nav-label" data-i18n="nav.bugs">缺陷管理</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.CVdolwYy.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{"data-astro-transition-persist":[0,"astro-iywf7oe7-2"]}" ssr client="only" opts="{"name":"NavLibraries","value":"react"}" data-astro-transition-persist="astro-iywf7oe7-2"></astro-island><script>(function(){const host = ".tw-nav-libraries";
|
|
122
138
|
const cacheKey = "tw.hydrate.nav";
|
|
123
139
|
const fixActive = true;
|
|
124
140
|
const capture = false;
|
|
141
|
+
const syncNavGroups = true;
|
|
125
142
|
|
|
126
143
|
(function () {
|
|
127
144
|
try {
|
|
@@ -155,6 +172,35 @@ const capture = false;
|
|
|
155
172
|
nodes[i].setAttribute('data-hydrate-cache', '');
|
|
156
173
|
nodes[i].setAttribute('aria-hidden', 'true');
|
|
157
174
|
}
|
|
175
|
+
// 侧栏分组:缓存里的展开 / 收起状态可能过期(用户收起后又刷新),
|
|
176
|
+
// 按 localStorage 校正一遍再插入,避免「先展开、再收起」闪一下
|
|
177
|
+
if (syncNavGroups) {
|
|
178
|
+
for (var gi = 0; gi < nodes.length; gi++) {
|
|
179
|
+
// 缓存片段是按岛屿的顶层子节点逐个存的:分组本身就是顶层 <details>,
|
|
180
|
+
// 只查后代会漏掉它,所以自己也要算一个候选
|
|
181
|
+
var candidates = [nodes[gi]];
|
|
182
|
+
var nested = nodes[gi].querySelectorAll
|
|
183
|
+
? nodes[gi].querySelectorAll('[data-nav-group]')
|
|
184
|
+
: [];
|
|
185
|
+
for (var ni = 0; ni < nested.length; ni++) candidates.push(nested[ni]);
|
|
186
|
+
for (var gj = 0; gj < candidates.length; gj++) {
|
|
187
|
+
var groupEl = candidates[gj];
|
|
188
|
+
if (!groupEl.hasAttribute || !groupEl.hasAttribute('data-nav-group')) continue;
|
|
189
|
+
var gid = groupEl.getAttribute('data-nav-group');
|
|
190
|
+
if (!gid) continue;
|
|
191
|
+
var gKey = 'tw.nav.groupOpen.' + gid;
|
|
192
|
+
if (spaceId) gKey += '::' + spaceId;
|
|
193
|
+
var gVal = null;
|
|
194
|
+
try {
|
|
195
|
+
gVal = localStorage.getItem(gKey);
|
|
196
|
+
} catch (e) {
|
|
197
|
+
/* ignore */
|
|
198
|
+
}
|
|
199
|
+
if (gVal === '0') groupEl.removeAttribute('open');
|
|
200
|
+
else if (gVal === '1') groupEl.setAttribute('open', '');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
158
204
|
// 片段并列插入:挂在岛屿前面,挂载后由 CSS 隐藏
|
|
159
205
|
var frag = document.createDocumentFragment();
|
|
160
206
|
for (var j = 0; j < nodes.length; j++) frag.appendChild(nodes[j]);
|
|
@@ -318,7 +364,7 @@ const capture = false;
|
|
|
318
364
|
// 缓存坏了就当没有
|
|
319
365
|
}
|
|
320
366
|
})();
|
|
321
|
-
})();</script></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.
|
|
367
|
+
})();</script></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.DbjLDMDJ.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{}" ssr client="load" opts="{"name":"SettingsDialog","value":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>
|
|
322
368
|
(function () {
|
|
323
369
|
try {
|
|
324
370
|
var raw = localStorage.getItem('tw.app.model.v1');
|
|
@@ -389,6 +435,8 @@ const capture = false;
|
|
|
389
435
|
'nav.reports': 'Work Report',
|
|
390
436
|
'nav.testStats': 'Test Statistics',
|
|
391
437
|
'nav.caseExec': 'Case Execution',
|
|
438
|
+
'nav.uiAuto': 'Automation Testing',
|
|
439
|
+
'nav.reqAnalysis': 'Requirement Analysis',
|
|
392
440
|
'nav.caseManage': 'Test Cases',
|
|
393
441
|
'nav.prompts': 'Prompts',
|
|
394
442
|
'nav.knowledge': 'Knowledge Mgmt',
|
|
@@ -423,10 +471,11 @@ const capture = false;
|
|
|
423
471
|
});
|
|
424
472
|
} catch (e) {}
|
|
425
473
|
})();
|
|
426
|
-
</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><div class="tw-hydrate-host"><astro-island uid="ZSO2RK" component-url="/_astro/CaseExecBoard.
|
|
474
|
+
</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><div class="tw-hydrate-host"><astro-island uid="ZSO2RK" component-url="/_astro/CaseExecBoard.D8K4NzrB.js" component-export="default" renderer-url="/_astro/client.BHNTqLjv.js" props="{}" ssr client="only" opts="{"name":"CaseExecBoard","value":"react"}"></astro-island><script>(function(){const host = ".tw-hydrate-host";
|
|
427
475
|
const cacheKey = "tw.hydrate.case-exec";
|
|
428
476
|
const fixActive = false;
|
|
429
477
|
const capture = true;
|
|
478
|
+
const syncNavGroups = false;
|
|
430
479
|
|
|
431
480
|
(function () {
|
|
432
481
|
try {
|
|
@@ -460,6 +509,35 @@ const capture = true;
|
|
|
460
509
|
nodes[i].setAttribute('data-hydrate-cache', '');
|
|
461
510
|
nodes[i].setAttribute('aria-hidden', 'true');
|
|
462
511
|
}
|
|
512
|
+
// 侧栏分组:缓存里的展开 / 收起状态可能过期(用户收起后又刷新),
|
|
513
|
+
// 按 localStorage 校正一遍再插入,避免「先展开、再收起」闪一下
|
|
514
|
+
if (syncNavGroups) {
|
|
515
|
+
for (var gi = 0; gi < nodes.length; gi++) {
|
|
516
|
+
// 缓存片段是按岛屿的顶层子节点逐个存的:分组本身就是顶层 <details>,
|
|
517
|
+
// 只查后代会漏掉它,所以自己也要算一个候选
|
|
518
|
+
var candidates = [nodes[gi]];
|
|
519
|
+
var nested = nodes[gi].querySelectorAll
|
|
520
|
+
? nodes[gi].querySelectorAll('[data-nav-group]')
|
|
521
|
+
: [];
|
|
522
|
+
for (var ni = 0; ni < nested.length; ni++) candidates.push(nested[ni]);
|
|
523
|
+
for (var gj = 0; gj < candidates.length; gj++) {
|
|
524
|
+
var groupEl = candidates[gj];
|
|
525
|
+
if (!groupEl.hasAttribute || !groupEl.hasAttribute('data-nav-group')) continue;
|
|
526
|
+
var gid = groupEl.getAttribute('data-nav-group');
|
|
527
|
+
if (!gid) continue;
|
|
528
|
+
var gKey = 'tw.nav.groupOpen.' + gid;
|
|
529
|
+
if (spaceId) gKey += '::' + spaceId;
|
|
530
|
+
var gVal = null;
|
|
531
|
+
try {
|
|
532
|
+
gVal = localStorage.getItem(gKey);
|
|
533
|
+
} catch (e) {
|
|
534
|
+
/* ignore */
|
|
535
|
+
}
|
|
536
|
+
if (gVal === '0') groupEl.removeAttribute('open');
|
|
537
|
+
else if (gVal === '1') groupEl.setAttribute('open', '');
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
463
541
|
// 片段并列插入:挂在岛屿前面,挂载后由 CSS 隐藏
|
|
464
542
|
var frag = document.createDocumentFragment();
|
|
465
543
|
for (var j = 0; j < nodes.length; j++) frag.appendChild(nodes[j]);
|