plum-e2e 2.12.3 → 2.12.7
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/README.md +13 -13
- package/backend/scripts/manage-nodes.mjs +5 -2
- package/bin/plum.js +6 -4
- package/frontend/.svelte-kit/adapter-node/chunks/internal.js +1 -1
- package/frontend/.svelte-kit/adapter-node/manifest-full.js +1 -1
- package/frontend/.svelte-kit/adapter-node/manifest.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/0.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/1.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/10.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/11.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/12.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/2.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/3.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/4.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/5.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/6.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/7.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/8.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/9.js +1 -1
- package/frontend/.svelte-kit/generated/server/internal.js +1 -1
- package/frontend/.svelte-kit/output/client/.vite/manifest.json +66 -60
- package/frontend/.svelte-kit/output/client/_app/immutable/chunks/7z7jeLBz.js +8 -0
- package/frontend/.svelte-kit/output/client/_app/immutable/chunks/{CUWTHbZi.js → ChvVsiZ9.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/chunks/DrfshNlX.js +6 -0
- package/frontend/.svelte-kit/output/client/_app/immutable/chunks/uakY4NHp.js +6 -0
- package/frontend/{build/client/_app/immutable/entry/app.CfdgGRnJ.js → .svelte-kit/output/client/_app/immutable/entry/app.Cd5QqMRU.js} +2 -2
- package/frontend/.svelte-kit/output/client/_app/immutable/entry/{start.CDN4Yr-S.js → start.BWEGCxRW.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{0.Owx2-FyO.js → 0.DU9D7D1n.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{1.ClH1FMY8.js → 1.BrDYA30C.js} +1 -1
- package/frontend/{build/client/_app/immutable/nodes/10.CXqf0Rbs.js → .svelte-kit/output/client/_app/immutable/nodes/10.IuJh-JP1.js} +1 -1
- package/frontend/{build/client/_app/immutable/nodes/11.Dv1VqvOV.js → .svelte-kit/output/client/_app/immutable/nodes/11.0vvZmEx6.js} +1 -1
- package/frontend/{build/client/_app/immutable/nodes/12.BfLHpcG7.js → .svelte-kit/output/client/_app/immutable/nodes/12.DwpQ7XoT.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/2.BqNqlmzM.js +6 -0
- package/frontend/{build/client/_app/immutable/nodes/3.ConeF9qP.js → .svelte-kit/output/client/_app/immutable/nodes/3.D9X7H-y-.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{4.BhAoYx0d.js → 4.D-awDnNj.js} +1 -1
- package/frontend/{build/client/_app/immutable/nodes/5.BXasF8ka.js → .svelte-kit/output/client/_app/immutable/nodes/5.DBcQeD2J.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{6.CDEJGi13.js → 6.CLydZ4sL.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{7.B_XntBZ1.js → 7.Dgb_D3pO.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/8.BpS2myvx.js +9 -0
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{9.Bv15cDh1.js → 9.CsZT3pCm.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/version.json +1 -1
- package/frontend/.svelte-kit/output/server/chunks/internal.js +1 -1
- package/frontend/.svelte-kit/output/server/manifest-full.js +1 -1
- package/frontend/.svelte-kit/output/server/manifest.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/0.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/1.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/10.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/11.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/12.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/2.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/3.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/4.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/5.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/6.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/7.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/8.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/9.js +1 -1
- package/frontend/build/client/_app/immutable/chunks/7z7jeLBz.js +8 -0
- package/frontend/build/client/_app/immutable/chunks/7z7jeLBz.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/7z7jeLBz.js.gz +0 -0
- package/frontend/build/client/_app/immutable/chunks/{CUWTHbZi.js → ChvVsiZ9.js} +1 -1
- package/frontend/build/client/_app/immutable/chunks/ChvVsiZ9.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/ChvVsiZ9.js.gz +0 -0
- package/frontend/build/client/_app/immutable/chunks/DrfshNlX.js +6 -0
- package/frontend/build/client/_app/immutable/chunks/DrfshNlX.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/DrfshNlX.js.gz +0 -0
- package/frontend/build/client/_app/immutable/chunks/uakY4NHp.js +6 -0
- package/frontend/build/client/_app/immutable/chunks/uakY4NHp.js.br +6 -0
- package/frontend/build/client/_app/immutable/chunks/uakY4NHp.js.gz +0 -0
- package/frontend/{.svelte-kit/output/client/_app/immutable/entry/app.CfdgGRnJ.js → build/client/_app/immutable/entry/app.Cd5QqMRU.js} +2 -2
- package/frontend/build/client/_app/immutable/entry/app.Cd5QqMRU.js.br +0 -0
- package/frontend/build/client/_app/immutable/entry/app.Cd5QqMRU.js.gz +0 -0
- package/frontend/build/client/_app/immutable/entry/{start.CDN4Yr-S.js → start.BWEGCxRW.js} +1 -1
- package/frontend/build/client/_app/immutable/entry/start.BWEGCxRW.js.br +0 -0
- package/frontend/build/client/_app/immutable/entry/{start.CDN4Yr-S.js.gz → start.BWEGCxRW.js.gz} +0 -0
- package/frontend/build/client/_app/immutable/nodes/{0.Owx2-FyO.js → 0.DU9D7D1n.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/0.DU9D7D1n.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/0.DU9D7D1n.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{1.ClH1FMY8.js → 1.BrDYA30C.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/1.BrDYA30C.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/1.BrDYA30C.js.gz +0 -0
- package/frontend/{.svelte-kit/output/client/_app/immutable/nodes/10.CXqf0Rbs.js → build/client/_app/immutable/nodes/10.IuJh-JP1.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/10.IuJh-JP1.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/10.IuJh-JP1.js.gz +0 -0
- package/frontend/{.svelte-kit/output/client/_app/immutable/nodes/11.Dv1VqvOV.js → build/client/_app/immutable/nodes/11.0vvZmEx6.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/11.0vvZmEx6.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/11.0vvZmEx6.js.gz +0 -0
- package/frontend/{.svelte-kit/output/client/_app/immutable/nodes/12.BfLHpcG7.js → build/client/_app/immutable/nodes/12.DwpQ7XoT.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/12.DwpQ7XoT.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/12.DwpQ7XoT.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/2.BqNqlmzM.js +6 -0
- package/frontend/build/client/_app/immutable/nodes/2.BqNqlmzM.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/2.BqNqlmzM.js.gz +0 -0
- package/frontend/{.svelte-kit/output/client/_app/immutable/nodes/3.ConeF9qP.js → build/client/_app/immutable/nodes/3.D9X7H-y-.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/3.D9X7H-y-.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/3.D9X7H-y-.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{4.BhAoYx0d.js → 4.D-awDnNj.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/4.D-awDnNj.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/4.D-awDnNj.js.gz +0 -0
- package/frontend/{.svelte-kit/output/client/_app/immutable/nodes/5.BXasF8ka.js → build/client/_app/immutable/nodes/5.DBcQeD2J.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/5.DBcQeD2J.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/5.DBcQeD2J.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{6.CDEJGi13.js → 6.CLydZ4sL.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/6.CLydZ4sL.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/6.CLydZ4sL.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{7.B_XntBZ1.js → 7.Dgb_D3pO.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/7.Dgb_D3pO.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/7.Dgb_D3pO.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/8.BpS2myvx.js +9 -0
- package/frontend/build/client/_app/immutable/nodes/8.BpS2myvx.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/8.BpS2myvx.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{9.Bv15cDh1.js → 9.CsZT3pCm.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/9.CsZT3pCm.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/9.CsZT3pCm.js.gz +0 -0
- package/frontend/build/client/_app/version.json +1 -1
- package/frontend/build/client/_app/version.json.br +0 -0
- package/frontend/build/client/_app/version.json.gz +0 -0
- package/frontend/build/server/chunks/{0-EDIcywdR.js → 0-B0pwHIbc.js} +2 -2
- package/frontend/build/server/chunks/{0-EDIcywdR.js.map → 0-B0pwHIbc.js.map} +1 -1
- package/frontend/build/server/chunks/{1-DUXDWP4s.js → 1-C2ERbGlM.js} +2 -2
- package/frontend/build/server/chunks/{1-DUXDWP4s.js.map → 1-C2ERbGlM.js.map} +1 -1
- package/frontend/build/server/chunks/{10-C2C3V4ib.js → 10-BkU7HIAH.js} +2 -2
- package/frontend/build/server/chunks/{10-C2C3V4ib.js.map → 10-BkU7HIAH.js.map} +1 -1
- package/frontend/build/server/chunks/{11-C9Dv5Ypy.js → 11-BIhs2Z-l.js} +2 -2
- package/frontend/build/server/chunks/{11-C9Dv5Ypy.js.map → 11-BIhs2Z-l.js.map} +1 -1
- package/frontend/build/server/chunks/{12-aJDC1MAo.js → 12-I1hWtCiL.js} +2 -2
- package/frontend/build/server/chunks/{12-aJDC1MAo.js.map → 12-I1hWtCiL.js.map} +1 -1
- package/frontend/build/server/chunks/{2-Dalgd2D4.js → 2-C8lOtJzo.js} +2 -2
- package/frontend/build/server/chunks/2-C8lOtJzo.js.map +5 -0
- package/frontend/build/server/chunks/{3-cuk7ocXX.js → 3-gYSyNvG5.js} +2 -2
- package/frontend/build/server/chunks/{3-cuk7ocXX.js.map → 3-gYSyNvG5.js.map} +1 -1
- package/frontend/build/server/chunks/{4-D6Mu8Mm3.js → 4-CKw2o6VK.js} +2 -2
- package/frontend/build/server/chunks/{4-D6Mu8Mm3.js.map → 4-CKw2o6VK.js.map} +1 -1
- package/frontend/build/server/chunks/{5-ZN8cEN5r.js → 5-M0Ln62oC.js} +2 -2
- package/frontend/build/server/chunks/{5-ZN8cEN5r.js.map → 5-M0Ln62oC.js.map} +1 -1
- package/frontend/build/server/chunks/{6-nLl6wUex.js → 6-DLbq8kke.js} +2 -2
- package/frontend/build/server/chunks/{6-nLl6wUex.js.map → 6-DLbq8kke.js.map} +1 -1
- package/frontend/build/server/chunks/{7-DTNbErSe.js → 7-BQUiJu98.js} +2 -2
- package/frontend/build/server/chunks/{7-DTNbErSe.js.map → 7-BQUiJu98.js.map} +1 -1
- package/frontend/build/server/chunks/{8-BvQ3XjdA.js → 8-BUIZBLdn.js} +2 -2
- package/frontend/build/server/chunks/8-BUIZBLdn.js.map +5 -0
- package/frontend/build/server/chunks/{9-BVKP6RbZ.js → 9-Dti6A_P5.js} +2 -2
- package/frontend/build/server/chunks/{9-BVKP6RbZ.js.map → 9-Dti6A_P5.js.map} +1 -1
- package/frontend/build/server/index.js +1 -1
- package/frontend/build/server/index.js.map +1 -1
- package/frontend/build/server/manifest.js +14 -14
- package/frontend/build/server/manifest.js.map +1 -1
- package/frontend/src/lib/stores/runner.js +12 -1
- package/frontend/src/lib/utils/clipboard.js +27 -0
- package/frontend/src/routes/+page.svelte +2 -1
- package/frontend/src/routes/settings/+page.svelte +4 -3
- package/package.json +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/chunks/BqJQeI8K.js +0 -8
- package/frontend/.svelte-kit/output/client/_app/immutable/chunks/htkwR9b-.js +0 -6
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/2.Bno00fr8.js +0 -6
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/8.DL5gzc5s.js +0 -9
- package/frontend/build/client/_app/immutable/chunks/BqJQeI8K.js +0 -8
- package/frontend/build/client/_app/immutable/chunks/BqJQeI8K.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/BqJQeI8K.js.gz +0 -0
- package/frontend/build/client/_app/immutable/chunks/CUWTHbZi.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/CUWTHbZi.js.gz +0 -0
- package/frontend/build/client/_app/immutable/chunks/htkwR9b-.js +0 -6
- package/frontend/build/client/_app/immutable/chunks/htkwR9b-.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/htkwR9b-.js.gz +0 -0
- package/frontend/build/client/_app/immutable/entry/app.CfdgGRnJ.js.br +0 -0
- package/frontend/build/client/_app/immutable/entry/app.CfdgGRnJ.js.gz +0 -0
- package/frontend/build/client/_app/immutable/entry/start.CDN4Yr-S.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/0.Owx2-FyO.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/0.Owx2-FyO.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/1.ClH1FMY8.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/1.ClH1FMY8.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/10.CXqf0Rbs.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/10.CXqf0Rbs.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/11.Dv1VqvOV.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/11.Dv1VqvOV.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/12.BfLHpcG7.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/12.BfLHpcG7.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/2.Bno00fr8.js +0 -6
- package/frontend/build/client/_app/immutable/nodes/2.Bno00fr8.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/2.Bno00fr8.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/3.ConeF9qP.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/3.ConeF9qP.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/4.BhAoYx0d.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/4.BhAoYx0d.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/5.BXasF8ka.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/5.BXasF8ka.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/6.CDEJGi13.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/6.CDEJGi13.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/7.B_XntBZ1.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/7.B_XntBZ1.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/8.DL5gzc5s.js +0 -9
- package/frontend/build/client/_app/immutable/nodes/8.DL5gzc5s.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/8.DL5gzc5s.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/9.Bv15cDh1.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/9.Bv15cDh1.js.gz +0 -0
- package/frontend/build/server/chunks/2-Dalgd2D4.js.map +0 -5
- package/frontend/build/server/chunks/8-BvQ3XjdA.js.map +0 -5
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Licensed under the MIT License. See LICENSE file in the project root for details.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import{s as K,a as w,e as U,t as R,b as an,c as Ie}from"../chunks/6VDMVB5U.js";import{i as ct}from"../chunks/CtgCYzu5.js";import{e as nt,u as cn,p as lt,o as Yt,s as E,d as v,j as h,f as ee,g as i,k as p,t as M,x as re,c as ht,m as I,ao as ln,l as _e,b as hn,n as He}from"../chunks/BIf7lHIm.js";import{i as P,s as ut,a as ge}from"../chunks/D_thT6pZ.js";import{e as Oe,t as L,i as je,a as Ce,b as Rs,c as Mt,f as Pe,s as un,h as dn}from"../chunks/BTV7EXZb.js";import{g as us}from"../chunks/BqJQeI8K.js";import{p as xs}from"../chunks/CUWTHbZi.js";import{s as J,y as Te,A as pn,G as fn,O as ds,B as Nt,Q as ps,U as fs,r as Ot,N as vn,k as _n,q as vs,I as gn,J as mn,z as yn}from"../chunks/C4Z3p6jE.js";import{a as As}from"../chunks/CXQhSK1T.js";import{b as bn,f as wn,a as kn}from"../chunks/kFFd6Oo5.js";import{b as ke,p as Be,e as Ut,c as Ke,m as _s,s as En,S as Ee,a as gs,g as Rn,h as xn,i as An,R as Sn,j as Tn,k as Bn,l as Cn,n as Ln,t as qt,T as Nn,W as On,B as Un,o as qn,q as $n,N as Pn,u as In,r as Dn,V as Mn,C as Vn,v as Fn,w as Wn,Q as Hn,x as ms,y as Kn,z as zn,M as Yn,d as jn,A as Gn,D as Jn,E as Xn,F as Qn,G as Zn,H as er}from"../chunks/htkwR9b-.js";import{j as tr,am as sr}from"../chunks/Dn1b1Jgc.js";import{a as nr,v as rr}from"../chunks/B74j8LrV.js";import{f as ir}from"../chunks/gCgJ3Cwu.js";import{t as or,a as ar}from"../chunks/B2lVGNml.js";import{C as cr}from"../chunks/BWGoOYU0.js";import{B as lr}from"../chunks/DeiVAbyn.js";import{c as hr}from"../chunks/CUPWZLIN.js";import{d as ur,a as dr}from"../chunks/BDb8hZHu.js";import{c as pr}from"../chunks/DDx3no2z.js";function $t(n,e,t){nt(()=>{var s=cn(()=>e(n,t==null?void 0:t())||{});if(s!=null&&s.destroy)return()=>s.destroy()})}const fr=!1,mo=Object.freeze(Object.defineProperty({__proto__:null,ssr:fr},Symbol.toStringTag,{value:"Module"}));var vr=R('<span class="nav-sep svelte-10t98u4" aria-hidden="true"></span>'),_r=R('<!> <a class="link svelte-10t98u4"> </a>',1),gr=R('<img alt="" class="project-logo svelte-10t98u4">'),mr=R('<div class="project-card svelte-10t98u4"><!> <span class="project-name svelte-10t98u4"> </span></div>'),yr=R('<span class="nav-user svelte-10t98u4"> </span>'),br=R('<hr class="mobile-sep svelte-10t98u4">'),wr=R('<!> <a class="mobile-link svelte-10t98u4"> </a>',1),kr=R('<div class="mobile-menu svelte-10t98u4"><!> <a href="/settings" class="mobile-link svelte-10t98u4">Settings</a></div>'),Er=R('<nav class="nav svelte-10t98u4"><div class="inner svelte-10t98u4"><a href="/" class="brand svelte-10t98u4"><span class="brand-serif svelte-10t98u4">Pl</span><span class="brand-sans svelte-10t98u4">um</span></a> <div class="links svelte-10t98u4"></div> <div class="actions svelte-10t98u4"><!> <!> <a href="/settings" class="settings-btn svelte-10t98u4" aria-label="Settings" title="Settings"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></a> <button class="hamburger svelte-10t98u4"><span class="svelte-10t98u4"></span> <span class="svelte-10t98u4"></span> <span class="svelte-10t98u4"></span></button></div></div> <!></nav>');function Rr(n,e){lt(e,!1);const[t,s]=ut(),r=()=>ge(xs,"$page",t),o=()=>ge(As,"$auth",t);let l=I(!1),_=I({name:"",logoUrl:""});Yt(async()=>{try{E(_,await bn())}catch{}});const m=[{href:"/",label:"Automated Tests"},{href:"/reports",label:"Reports"},{href:"/scheduled-tests",label:"Scheduled"},{href:"/test-repository",label:"Test Repository",sep:!0}];function B(){E(l,!1)}ct();var A=Er(),N=v(A),q=v(N),V=h(q,2);Oe(V,5,()=>m,je,(D,O)=>{var j=_r(),G=ee(j);{var ue=X=>{var ne=vr();w(X,ne)};P(G,X=>{i(O).sep&&X(ue)})}var z=h(G,2),ie=v(z,!0);p(z),M(X=>{J(z,"href",i(O).href),L(z,"repo",i(O).sep),L(z,"active",X),K(ie,i(O).label)},[()=>i(O).href==="/"?r().url.pathname==="/":r().url.pathname.startsWith(i(O).href)],re),w(D,j)}),p(V);var ae=h(V,2),be=v(ae);{var Re=D=>{var O=mr(),j=v(O);{var G=ie=>{var X=gr();M(()=>J(X,"src",i(_).logoUrl)),w(ie,X)};P(j,ie=>{i(_).logoUrl&&ie(G)})}var ue=h(j,2),z=v(ue,!0);p(ue),p(O),M(()=>K(z,i(_).name)),w(D,O)};P(be,D=>{i(_).name&&D(Re)})}var te=h(be,2);{var H=D=>{var O=yr(),j=v(O,!0);p(O),M(()=>K(j,o().user.name)),w(D,O)};P(te,D=>{o().user&&D(H)})}var Q=h(te,2),x=h(Q,2),se=v(x),Y=h(se,2),Z=h(Y,2);p(x),p(ae),p(N);var ce=h(N,2);{var he=D=>{var O=kr(),j=v(O);Oe(j,1,()=>m,je,(ue,z)=>{var ie=wr(),X=ee(ie);{var ne=xe=>{var ft=br();w(xe,ft)};P(X,xe=>{i(z).sep&&xe(ne)})}var Ne=h(X,2),Ge=v(Ne,!0);p(Ne),M(xe=>{J(Ne,"href",i(z).href),L(Ne,"active",xe),K(Ge,i(z).label)},[()=>i(z).href==="/"?r().url.pathname==="/":r().url.pathname.startsWith(i(z).href)],re),U("click",Ne,B),w(ue,ie)});var G=h(j,2);p(O),M(()=>L(G,"active",r().url.pathname==="/settings")),U("click",G,B),Ce(3,O,()=>Rs,()=>({duration:200})),w(D,O)};P(ce,D=>{i(l)&&D(he)})}p(A),M(()=>{L(Q,"active",r().url.pathname==="/settings"),J(x,"aria-label",i(l)?"Close menu":"Open menu"),J(x,"aria-expanded",i(l)),L(se,"rotated",i(l)),L(Y,"hidden",i(l)),L(Z,"rotated-reverse",i(l))}),U("click",q,B),U("click",x,()=>E(l,!i(l))),w(n,A),ht(),s()}var xr=R('<main class="shell svelte-28zx1m"><!></main>');function Ar(n,e){var t=xr(),s=v(t);Mt(s,e,"default",{},null),p(t),w(n,t)}const ye=Object.create(null);ye.open="0";ye.close="1";ye.ping="2";ye.pong="3";ye.message="4";ye.upgrade="5";ye.noop="6";const rt=Object.create(null);Object.keys(ye).forEach(n=>{rt[ye[n]]=n});const Vt={type:"error",data:"parser error"},Ss=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ts=typeof ArrayBuffer=="function",Bs=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,jt=({type:n,data:e},t,s)=>Ss&&e instanceof Blob?t?s(e):ys(e,s):Ts&&(e instanceof ArrayBuffer||Bs(e))?t?s(e):ys(new Blob([e]),s):s(ye[n]+(e||"")),ys=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function bs(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Pt;function Sr(n,e){if(Ss&&n.data instanceof Blob)return n.data.arrayBuffer().then(bs).then(e);if(Ts&&(n.data instanceof ArrayBuffer||Bs(n.data)))return e(bs(n.data));jt(n,!1,t=>{Pt||(Pt=new TextEncoder),e(Pt.encode(t))})}const ws="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ye=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<ws.length;n++)Ye[ws.charCodeAt(n)]=n;const Tr=n=>{let e=n.length*.75,t=n.length,s,r=0,o,l,_,m;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const B=new ArrayBuffer(e),A=new Uint8Array(B);for(s=0;s<t;s+=4)o=Ye[n.charCodeAt(s)],l=Ye[n.charCodeAt(s+1)],_=Ye[n.charCodeAt(s+2)],m=Ye[n.charCodeAt(s+3)],A[r++]=o<<2|l>>4,A[r++]=(l&15)<<4|_>>2,A[r++]=(_&3)<<6|m&63;return B},Br=typeof ArrayBuffer=="function",Gt=(n,e)=>{if(typeof n!="string")return{type:"message",data:Cs(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:Cr(n.substring(1),e)}:rt[t]?n.length>1?{type:rt[t],data:n.substring(1)}:{type:rt[t]}:Vt},Cr=(n,e)=>{if(Br){const t=Tr(n);return Cs(t,e)}else return{base64:!0,data:n}},Cs=(n,e)=>{switch(e){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},Ls="",Lr=(n,e)=>{const t=n.length,s=new Array(t);let r=0;n.forEach((o,l)=>{jt(o,!1,_=>{s[l]=_,++r===t&&e(s.join(Ls))})})},Nr=(n,e)=>{const t=n.split(Ls),s=[];for(let r=0;r<t.length;r++){const o=Gt(t[r],e);if(s.push(o),o.type==="error")break}return s};function Or(){return new TransformStream({transform(n,e){Sr(n,t=>{const s=t.length;let r;if(s<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,s);else if(s<65536){r=new Uint8Array(3);const o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,s)}else{r=new Uint8Array(9);const o=new DataView(r.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(t)})}})}let It;function tt(n){return n.reduce((e,t)=>e+t.length,0)}function st(n,e){if(n[0].length===e)return n.shift();const t=new Uint8Array(e);let s=0;for(let r=0;r<e;r++)t[r]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),t}function Ur(n,e){It||(It=new TextDecoder);const t=[];let s=0,r=-1,o=!1;return new TransformStream({transform(l,_){for(t.push(l);;){if(s===0){if(tt(t)<1)break;const m=st(t,1);o=(m[0]&128)===128,r=m[0]&127,r<126?s=3:r===126?s=1:s=2}else if(s===1){if(tt(t)<2)break;const m=st(t,2);r=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),s=3}else if(s===2){if(tt(t)<8)break;const m=st(t,8),B=new DataView(m.buffer,m.byteOffset,m.length),A=B.getUint32(0);if(A>Math.pow(2,21)-1){_.enqueue(Vt);break}r=A*Math.pow(2,32)+B.getUint32(4),s=3}else{if(tt(t)<r)break;const m=st(t,r);_.enqueue(Gt(o?m:It.decode(m),e)),s=0}if(r===0||r>n){_.enqueue(Vt);break}}}})}const Ns=4;function W(n){if(n)return qr(n)}function qr(n){for(var e in W.prototype)n[e]=W.prototype[e];return n}W.prototype.on=W.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};W.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};W.prototype.off=W.prototype.removeListener=W.prototype.removeAllListeners=W.prototype.removeEventListener=function(n,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+n];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,r=0;r<t.length;r++)if(s=t[r],s===e||s.fn===e){t.splice(r,1);break}return t.length===0&&delete this._callbacks["$"+n],this};W.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+n],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,r=t.length;s<r;++s)t[s].apply(this,e)}return this};W.prototype.emitReserved=W.prototype.emit;W.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};W.prototype.hasListeners=function(n){return!!this.listeners(n).length};const dt=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),le=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),$r="arraybuffer";function Os(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const Pr=le.setTimeout,Ir=le.clearTimeout;function pt(n,e){e.useNativeTimers?(n.setTimeoutFn=Pr.bind(le),n.clearTimeoutFn=Ir.bind(le)):(n.setTimeoutFn=le.setTimeout.bind(le),n.clearTimeoutFn=le.clearTimeout.bind(le))}const Dr=1.33;function Mr(n){return typeof n=="string"?Vr(n):Math.ceil((n.byteLength||n.size)*Dr)}function Vr(n){let e=0,t=0;for(let s=0,r=n.length;s<r;s++)e=n.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function Us(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fr(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function Wr(n){let e={},t=n.split("&");for(let s=0,r=t.length;s<r;s++){let o=t[s].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class Hr extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class Jt extends W{constructor(e){super(),this.writable=!1,pt(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new Hr(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Gt(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Fr(e);return t.length?"?"+t:""}}class Kr extends Jt{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Nr(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Lr(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Us()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let qs=!1;try{qs=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const zr=qs;function Yr(){}class jr extends Kr{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(r,o)=>{this.onError("xhr post error",r,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}}class me extends W{constructor(e,t,s){super(),this.createRequest=e,pt(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const t=Os(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&s.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var r;s.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=me.requestsCount++,me.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Yr,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete me.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}me.requestsCount=0;me.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ks);else if(typeof addEventListener=="function"){const n="onpagehide"in le?"pagehide":"unload";addEventListener(n,ks,!1)}}function ks(){for(let n in me.requests)me.requests.hasOwnProperty(n)&&me.requests[n].abort()}const Gr=function(){const n=$s({xdomain:!1});return n&&n.responseType!==null}();class Jr extends jr{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=Gr&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new me($s,this.uri(),e)}}function $s(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||zr))return new XMLHttpRequest}catch{}if(!e)try{return new le[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ps=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Xr extends Jt{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=Ps?{}:Os(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;jt(s,this.supportsBinary,o=>{try{this.doWrite(s,o)}catch{}r&&dt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Us()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Dt=le.WebSocket||le.MozWebSocket;class Qr extends Xr{createSocket(e,t,s){return Ps?new Dt(e,t,s):t?new Dt(e,t):new Dt(e)}doWrite(e,t){this.ws.send(t)}}class Zr extends Jt{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=Ur(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),r=Or();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const o=()=>{s.read().then(({done:_,value:m})=>{_||(this.onPacket(m),o())}).catch(_=>{})};o();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;this._writer.write(s).then(()=>{r&&dt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const ei={websocket:Qr,webtransport:Zr,polling:Jr},ti=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,si=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ft(n){if(n.length>8e3)throw"URI too long";const e=n,t=n.indexOf("["),s=n.indexOf("]");t!=-1&&s!=-1&&(n=n.substring(0,t)+n.substring(t,s).replace(/:/g,";")+n.substring(s,n.length));let r=ti.exec(n||""),o={},l=14;for(;l--;)o[si[l]]=r[l]||"";return t!=-1&&s!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=ni(o,o.path),o.queryKey=ri(o,o.query),o}function ni(n,e){const t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function ri(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,r,o){r&&(t[r]=o)}),t}const Wt=typeof addEventListener=="function"&&typeof removeEventListener=="function",it=[];Wt&&addEventListener("offline",()=>{it.forEach(n=>n())},!1);class Le extends W{constructor(e,t){if(super(),this.binaryType=$r,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const s=Ft(e);t.hostname=s.host,t.secure=s.protocol==="https"||s.protocol==="wss",t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=Ft(t.host).host);pt(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(s=>{const r=s.prototype.name;this.transports.push(r),this._transportsByName[r]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Wr(this.opts.query)),Wt&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},it.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Ns,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Le.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",Le.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const r=this.writeBuffer[s].data;if(r&&(t+=Mr(r)),s>0&&t>this._maxPayload)return this.writeBuffer.slice(0,s);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,dt(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,r){if(typeof t=="function"&&(r=t,t=void 0),typeof s=="function"&&(r=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const o={type:e,data:t,options:s};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(Le.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Wt&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=it.indexOf(this._offlineEventListener);s!==-1&&it.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}Le.protocol=Ns;class ii extends Le{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;Le.priorWebsocketSuccess=!1;const r=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",N=>{if(!s)if(N.type==="pong"&&N.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Le.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(A(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const q=new Error("probe error");q.transport=t.name,this.emitReserved("upgradeError",q)}}))};function o(){s||(s=!0,A(),t.close(),t=null)}const l=N=>{const q=new Error("probe error: "+N);q.transport=t.name,o(),this.emitReserved("upgradeError",q)};function _(){l("transport closed")}function m(){l("socket closed")}function B(N){t&&N.name!==t.name&&o()}const A=()=>{t.removeListener("open",r),t.removeListener("error",l),t.removeListener("close",_),this.off("close",m),this.off("upgrading",B)};t.once("open",r),t.once("error",l),t.once("close",_),this.once("close",m),this.once("upgrading",B),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let oi=class extends ii{constructor(e,t={}){const s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(r=>ei[r]).filter(r=>!!r)),super(e,s)}};function ai(n,e="",t){let s=n;t=t||typeof location<"u"&&location,n==null&&(n=t.protocol+"//"+t.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=t.protocol+n:n=t.host+n),/^(https?|wss?):\/\//.test(n)||(typeof t<"u"?n=t.protocol+"//"+n:n="https://"+n),s=Ft(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const o=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+o+":"+s.port+e,s.href=s.protocol+"://"+o+(t&&t.port===s.port?"":":"+s.port),s}const ci=typeof ArrayBuffer=="function",li=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Is=Object.prototype.toString,hi=typeof Blob=="function"||typeof Blob<"u"&&Is.call(Blob)==="[object BlobConstructor]",ui=typeof File=="function"||typeof File<"u"&&Is.call(File)==="[object FileConstructor]";function Xt(n){return ci&&(n instanceof ArrayBuffer||li(n))||hi&&n instanceof Blob||ui&&n instanceof File}function ot(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(ot(n[t]))return!0;return!1}if(Xt(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return ot(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&ot(n[t]))return!0;return!1}function di(n){const e=[],t=n.data,s=n;return s.data=Ht(t,e),s.attachments=e.length,{packet:s,buffers:e}}function Ht(n,e){if(!n)return n;if(Xt(n)){const t={_placeholder:!0,num:e.length};return e.push(n),t}else if(Array.isArray(n)){const t=new Array(n.length);for(let s=0;s<n.length;s++)t[s]=Ht(n[s],e);return t}else if(typeof n=="object"&&!(n instanceof Date)){const t={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=Ht(n[s],e));return t}return n}function pi(n,e){return n.data=Kt(n.data,e),delete n.attachments,n}function Kt(n,e){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<e.length)return e[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let t=0;t<n.length;t++)n[t]=Kt(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=Kt(n[t],e));return n}const fi=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var S;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(S||(S={}));class vi{constructor(e){this.replacer=e}encode(e){return(e.type===S.EVENT||e.type===S.ACK)&&ot(e)?this.encodeAsBinary({type:e.type===S.EVENT?S.BINARY_EVENT:S.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===S.BINARY_EVENT||e.type===S.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=di(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}}function Es(n){return Object.prototype.toString.call(n)==="[object Object]"}class Qt extends W{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===S.BINARY_EVENT;s||t.type===S.BINARY_ACK?(t.type=s?S.EVENT:S.ACK,this.reconstructor=new _i(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(Xt(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(S[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===S.BINARY_EVENT||s.type===S.BINARY_ACK){const o=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const l=e.substring(o,t);if(l!=Number(l)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(l)}if(e.charAt(t+1)==="/"){const o=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(o,t)}else s.nsp="/";const r=e.charAt(t+1);if(r!==""&&Number(r)==r){const o=t+1;for(;++t;){const l=e.charAt(t);if(l==null||Number(l)!=l){--t;break}if(t===e.length)break}s.id=Number(e.substring(o,t+1))}if(e.charAt(++t)){const o=this.tryParse(e.substr(t));if(Qt.isPayloadValid(s.type,o))s.data=o;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case S.CONNECT:return Es(t);case S.DISCONNECT:return t===void 0;case S.CONNECT_ERROR:return typeof t=="string"||Es(t);case S.EVENT:case S.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&fi.indexOf(t[0])===-1);case S.ACK:case S.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class _i{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=pi(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const gi=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Qt,Encoder:vi,get PacketType(){return S}},Symbol.toStringTag,{value:"Module"}));function de(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const mi=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ds extends W{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[de(e,"open",this.onopen.bind(this)),de(e,"packet",this.onpacket.bind(this)),de(e,"error",this.onerror.bind(this)),de(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,r,o;if(mi.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const l={type:S.EVENT,data:t};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const A=this.ids++,N=t.pop();this._registerAckCallback(A,N),l.id=A}const _=(r=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||r===void 0?void 0:r.writable,m=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!_||(m?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(e,t){var s;const r=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(r===void 0){this.acks[e]=t;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let _=0;_<this.sendBuffer.length;_++)this.sendBuffer[_].id===e&&this.sendBuffer.splice(_,1);t.call(this,new Error("operation has timed out"))},r),l=(..._)=>{this.io.clearTimeoutFn(o),t.apply(this,_)};l.withError=!0,this.acks[e]=l}emitWithAck(e,...t){return new Promise((s,r)=>{const o=(l,_)=>l?r(l):s(_);o.withError=!0,t.push(o),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...o)=>s!==this._queue[0]?void 0:(r!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(r)):(this._queue.shift(),t&&t(null,...o)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:S.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case S.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case S.EVENT:case S.BINARY_EVENT:this.onevent(e);break;case S.ACK:case S.BINARY_ACK:this.onack(e);break;case S.DISCONNECT:this.ondisconnect();break;case S.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,t.packet({type:S.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:S.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function De(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}De.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*n);n=Math.floor(e*10)&1?n+t:n-t}return Math.min(n,this.max)|0};De.prototype.reset=function(){this.attempts=0};De.prototype.setMin=function(n){this.ms=n};De.prototype.setMax=function(n){this.max=n};De.prototype.setJitter=function(n){this.jitter=n};class zt extends W{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,pt(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new De({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||gi;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new oi(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=de(t,"open",function(){s.onopen(),e&&e()}),o=_=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",_),e?e(_):this.maybeReconnectOnOpen()},l=de(t,"error",o);if(this._timeout!==!1){const _=this._timeout,m=this.setTimeoutFn(()=>{r(),o(new Error("timeout")),t.close()},_);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(r),this.subs.push(l),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(de(e,"ping",this.onping.bind(this)),de(e,"data",this.ondata.bind(this)),de(e,"error",this.onerror.bind(this)),de(e,"close",this.onclose.bind(this)),de(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){dt(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new Ds(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t)if(this.nsps[s].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const ze={};function at(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=ai(n,e.path||"/socket.io"),s=t.source,r=t.id,o=t.path,l=ze[r]&&o in ze[r].nsps,_=e.forceNew||e["force new connection"]||e.multiplex===!1||l;let m;return _?m=new zt(s,e):(ze[r]||(ze[r]=new zt(s,e)),m=ze[r]),t.query&&!e.query&&(e.query=t.queryKey),m.socket(t.path,e)}Object.assign(at,{Manager:zt,Socket:Ds,io:at,connect:at});var yi=R(' <strong class="svelte-1pcdei1"></strong> ',1),bi=R('<a class="view-report-btn svelte-1pcdei1"> <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1pcdei1"><line x1="5" y1="12" x2="19" y2="12" class="svelte-1pcdei1"></line><polyline points="12 5 19 12 12 19" class="svelte-1pcdei1"></polyline></svg></a>'),wi=R('<span class="run-chip-spinner svelte-1pcdei1"></span>'),ki=R('<span class="run-chip-count svelte-1pcdei1"> </span>'),Ei=R('<div class="run-chip svelte-1pcdei1"><svg width="9" height="10" viewBox="0 0 10 12" fill="currentColor" stroke="none" style="opacity:0.6;flex-shrink:0" class="svelte-1pcdei1"><polygon points="0,0 10,6 0,12" class="svelte-1pcdei1"></polygon></svg> <span class="run-chip-title svelte-1pcdei1"> </span> <!> <button class="run-chip-clear svelte-1pcdei1"><svg width="9" height="9" viewBox="0 0 14 14" fill="none" class="svelte-1pcdei1"><path d="M1 1l12 12M13 1L1 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" class="svelte-1pcdei1"></path></svg></button></div>'),Ri=R('<div class="input-wrap svelte-1pcdei1"><svg class="input-icon svelte-1pcdei1" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" class="svelte-1pcdei1"></circle><line x1="21" y1="21" x2="16.65" y2="16.65" class="svelte-1pcdei1"></line></svg> <input type="text" class="tag-input svelte-1pcdei1" placeholder="@tag or leave blank for all tests"></div>'),xi=R('<button class="dropdown-item svelte-1pcdei1"><span style="color:var(--text-muted)" class="svelte-1pcdei1">✕</span> </button> <div class="dropdown-divider svelte-1pcdei1"></div>',1),Ai=R('<div class="dropdown-empty svelte-1pcdei1"></div>'),Si=R('<button class="dropdown-item svelte-1pcdei1"> </button>'),Ti=R('<div class="dropdown-menu run-pick-menu svelte-1pcdei1"><!> <!></div>'),Bi=R('<button class="dropdown-item svelte-1pcdei1"> </button>'),Ci=R('<div class="dropdown-menu svelte-1pcdei1"></div>'),Li=R('<label class="runner-option svelte-1pcdei1"><input type="checkbox" class="svelte-1pcdei1"> <span class="runner-dot built-in svelte-1pcdei1"></span> <span class="svelte-1pcdei1"></span></label>'),Ni=R('<label class="runner-option svelte-1pcdei1"><input type="checkbox" class="svelte-1pcdei1"> <span class="runner-dot remote svelte-1pcdei1"></span> <span class="svelte-1pcdei1"> </span></label>'),Oi=R('<div class="dropdown-menu runners-menu svelte-1pcdei1"><!> <!></div>'),Ui=R('<div class="ctrl-divider svelte-1pcdei1"></div> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="dropdown-wrap svelte-1pcdei1"><button class="dropdown-trigger svelte-1pcdei1"><span class="svelte-1pcdei1"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-1pcdei1"><polyline points="6 9 12 15 18 9" class="svelte-1pcdei1"></polyline></svg></button> <!></div></div>',1),qi=R('<button type="button" class="notify-btn svelte-1pcdei1"></button>'),$i=R('<button type="button" class="notify-btn svelte-1pcdei1"></button>'),Pi=R('<div class="ctrl-divider svelte-1pcdei1"></div> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="notify-toggles svelte-1pcdei1"><!> <!></div></div>',1),Ii=R('<span class="meta-dot svelte-1pcdei1">·</span> ',1),Di=R('<div class="run-card svelte-1pcdei1"><span class="run-card-dot svelte-1pcdei1"></span> <a class="run-card-main svelte-1pcdei1"><div class="run-card-info svelte-1pcdei1"><span class="run-card-label svelte-1pcdei1"> </span> <span class="run-card-meta svelte-1pcdei1"> <!></span></div> <!> <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="run-card-arrow svelte-1pcdei1"><line x1="5" y1="12" x2="19" y2="12" class="svelte-1pcdei1"></line><polyline points="12 5 19 12 12 19" class="svelte-1pcdei1"></polyline></svg></a> <button class="run-card-cancel svelte-1pcdei1"><svg width="12" height="12" viewBox="0 0 14 14" fill="none" class="svelte-1pcdei1"><path d="M1 1l12 12M13 1L1 13" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" class="svelte-1pcdei1"></path></svg></button></div>'),Mi=R('<div class="empty-runs svelte-1pcdei1"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="empty-icon svelte-1pcdei1"><circle cx="12" cy="12" r="10" class="svelte-1pcdei1"></circle><line x1="10" y1="15" x2="10" y2="12" class="svelte-1pcdei1"></line><line x1="10" y1="9" x2="10.01" y2="9" class="svelte-1pcdei1"></line></svg> </div>'),Vi=R('<div class="body svelte-1pcdei1"><!> <!></div>'),Fi=R('<!> <div class="panel svelte-1pcdei1"><div class="scan-line svelte-1pcdei1"></div> <div class="bar svelte-1pcdei1"><div class="bar-left svelte-1pcdei1"><div class="bar-status svelte-1pcdei1"><span class="status-dot svelte-1pcdei1"></span> <span class="status-word svelte-1pcdei1"> </span></div> <!></div> <span class="flex-gap svelte-1pcdei1"></span> <div class="bar-center svelte-1pcdei1"><!> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="dropdown-wrap svelte-1pcdei1"><button class="dropdown-trigger svelte-1pcdei1"><span class="svelte-1pcdei1"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-1pcdei1"><polyline points="6 9 12 15 18 9" class="svelte-1pcdei1"></polyline></svg></button> <!></div></div> <div class="ctrl-divider svelte-1pcdei1"></div> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="stepper svelte-1pcdei1"><button class="step-btn svelte-1pcdei1">−</button> <span class="step-val svelte-1pcdei1"> </span> <button class="step-btn svelte-1pcdei1">+</button></div></div> <div class="ctrl-divider svelte-1pcdei1"></div> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="dropdown-wrap svelte-1pcdei1"><button class="dropdown-trigger svelte-1pcdei1"><span class="svelte-1pcdei1"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-1pcdei1"><polyline points="6 9 12 15 18 9" class="svelte-1pcdei1"></polyline></svg></button> <!></div></div> <!> <!> <div class="ctrl-divider svelte-1pcdei1"></div> <button class="run-btn svelte-1pcdei1"><svg width="9" height="10" viewBox="0 0 10 12" fill="currentColor" stroke="none" class="svelte-1pcdei1"><polygon points="0,0 10,6 0,12" class="svelte-1pcdei1"></polygon></svg> </button></div> <span class="flex-gap-sm svelte-1pcdei1"></span> <button class="expand-btn svelte-1pcdei1"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1pcdei1"><polyline points="18 15 12 9 6 15" class="svelte-1pcdei1"></polyline></svg></button></div> <!></div>',1);function Wi(n,e){lt(e,!1);const[t,s]=ut(),r=()=>ge(ke,"$runnerConfig",t),o=()=>ge(Ke,"$backgroundRuns",t),l=()=>ge(Dn,"$runsVersion",t),_=()=>ge(Be,"$panelExpanded",t),m=()=>ge(Ut,"$builtInEnabled",t),B=I(),A=I(),N=I(),q=I(),V=I(),ae=I(),be=I(),Re=I(),te=I();let H=I([]),Q=I([]),x=I(null),se=I(!1),Y=I(!1),Z=I(!1),ce=I(!1),he=I(!1),D=I({discordWebhookUrl:"",slackWebhookUrl:"",notifyPublicUrl:""}),O=I(!1),j=I(!1);function G(a){function u(k){a.contains(k.target)||a.dispatchEvent(new CustomEvent("clickoutside"))}return document.addEventListener("click",u,!0),{destroy(){document.removeEventListener("click",u,!0)}}}let ue,z,ie,X,ne=I(null);Yt(()=>{try{const c=localStorage.getItem("plum:runnerConfig");c&&ke.update(d=>({...d,...JSON.parse(c)}))}catch{}try{const c=localStorage.getItem("plum:panelExpanded");c!==null&&Be.set(c==="true")}catch{}try{const c=localStorage.getItem("plum:builtInEnabled");c!==null&&Ut.set(c!=="false")}catch{}wn().then(c=>{E(H,c);const d=new Set([Te,...c.map(f=>f.id)]);ke.update(f=>{const y=f.selectedRunners.filter(g=>d.has(g));return{...f,selectedRunners:y.length>0?y:[Te]}})}).catch(()=>{}),kn().then(c=>E(D,c)).catch(()=>{}),ir().then(c=>{c.length!==0&&(Ke.update(d=>{const f={...d};for(const{runId:y,kind:g,label:b,meta:C,status:$}of c)f[y]||(f[y]=_s({kind:g,label:b,meta:C,status:$}));return f}),Be.set(!0))}).catch(()=>{}),ue=ke.subscribe(c=>{try{localStorage.setItem("plum:runnerConfig",JSON.stringify(c))}catch{}}),z=Be.subscribe(c=>{try{localStorage.setItem("plum:panelExpanded",String(c))}catch{}}),ie=Ut.subscribe(c=>{try{localStorage.setItem("plum:builtInEnabled",String(c))}catch{}ke.update(d=>{if(!c&&d.selectedRunners.includes(Te)){const f=d.selectedRunners.filter(g=>g!==Te),y=f.length>0?f:i(H)[0]?[i(H)[0].id]:[];return{...d,selectedRunners:y}}return d})});const a=at(pn,{transports:["websocket"]});X=a,En.set(a),a.on(Ee.REPORT_READY,()=>gs.update(c=>c+1));function u(c,d){Ke.update(f=>f[c]?{...f,[c]:d(f[c])}:f)}function k(c,{kind:d,label:f,meta:y},g){Ke.update(b=>({...b,[c]:b[c]?{...b[c],status:g}:_s({kind:d,label:f,meta:y,status:g})})),Be.set(!0)}a.on(Ee.BG_RUN_QUEUED,({runId:c,kind:d,label:f,meta:y})=>{k(c,{kind:d,label:f,meta:y},"queued")}),a.on(Ee.BG_RUN_START,({runId:c,kind:d,label:f,meta:y})=>{k(c,{kind:d,label:f,meta:y},"running")}),a.on(Ee.BG_RUN_LOG,({runId:c,log:d})=>{u(c,f=>({...f,output:f.output+d}))}),a.on(Ee.BG_RUN_LANES_INIT,({runId:c,lanes:d})=>{u(c,f=>({...f,lanes:d.map(y=>({...y,status:"running",logs:""}))}))});function T(c,d,f){const y=c.lanes.some(g=>g.id===d)?c.lanes.map(g=>g.id===d?{...g,...f(g)}:g):[...c.lanes,{id:d,name:d,testCount:0,status:"running",logs:"",...f({logs:""})}];return{...c,lanes:y}}a.on(Ee.BG_RUN_LANE_LOG,({runId:c,laneId:d,log:f})=>{u(c,y=>T(y,d,g=>({logs:(g.logs||"")+f})))}),a.on(Ee.BG_RUN_LANE_STATUS,({runId:c,laneId:d,status:f})=>{u(c,y=>T(y,d,()=>({status:f})))}),a.on(Ee.BG_RUN_LANE_RRWEB_BATCH,({runId:c,...d})=>{u(c,f=>({...f,rrwebByLane:Rn(f.rrwebByLane,d)}))}),a.on(Ee.BG_RUN_DONE,({runId:c,code:d,reportId:f})=>{const y=d===0||d===null,g=d===130;u(c,b=>({...b,status:"done",testCompleted:!g,latestReportId:g?null:f,verdict:g?"cancelled":y?"pass":"fail"})),!g&&f&&E(ne,{reportId:f,verdict:y?"pass":"fail"}),g||gs.update(b=>b+1),setTimeout(()=>{Ke.update(b=>{const C={...b};return delete C[c],C})},fn+5e3)})}),ln(()=>{ue==null||ue(),z==null||z(),ie==null||ie(),X==null||X.disconnect()});async function Ne(a){E(ce,!1),E(x,{id:a.id,title:a.title,tags:null}),E(se,!0);try{const k=(await rr(a.id)).entries.filter(T=>{var c;return(c=T.case)==null?void 0:c.isAutomated}).map(T=>`@${T.case.displayId}`);E(x,{id:a.id,title:a.title,tags:k})}catch{E(x,null)}finally{E(se,!1)}}function Ge(){E(x,null)}function xe(){const a={notifyDiscord:i(O),notifySlack:i(j)};if(i(x)){if(i(se)||!i(x).tags||i(x).tags.length===0)return;qt(i(x).tags.join(" or "),i(x).id,a,i(x).title)}else r().testID.trim()===""?E(he,!0):qt(void 0,void 0,a)}function ft(a){a.key==="Enter"&&!i(x)&&xe()}function Zt(a){ke.update(u=>({...u,workers:Math.max(ps,Math.min(fs,u.workers+a))}))}function es(a){ke.update(u=>{const k=u.selectedRunners;if(k.includes(a)&&k.length===1)return u;const T=k.includes(a)?k.filter(c=>c!==a):[...k,a];return{...u,selectedRunners:T}})}function vt(a){return r().selectedRunners.includes(a)}_e(()=>r(),()=>{E(B,r())}),_e(()=>o(),()=>{E(A,Object.entries(o()).filter(([,a])=>a.status==="queued"||a.status==="running"))}),_e(()=>i(A),()=>{E(N,i(A).filter(([,a])=>a.status==="running").length)}),_e(()=>i(A),()=>{E(q,i(A).filter(([,a])=>a.status==="queued").length)}),_e(()=>i(A),()=>{E(V,i(A).length>0)}),_e(()=>(l(),ds),()=>{l()>=0&&nr({limit:ds}).then(a=>E(Q,a.runs)).catch(()=>{})}),_e(()=>(i(N),i(q),i(ne)),()=>{var a,u;E(ae,i(N)>0?"var(--accent)":i(q)>0?"var(--warn)":((a=i(ne))==null?void 0:a.verdict)==="pass"?"var(--pass)":((u=i(ne))==null?void 0:u.verdict)==="fail"?"var(--fail)":"var(--border)")}),_e(()=>(i(N),i(q),i(ne)),()=>{var a;E(be,xn({running:i(N),queued:i(q),verdict:(a=i(ne))==null?void 0:a.verdict}))}),_e(()=>i(B),()=>{E(Re,Nt.find(a=>a.id===i(B).browser)??Nt[0])}),_e(()=>(i(B),i(H)),()=>{E(te,An(i(B),i(H)))}),hn(),ct();var ts=Fi(),ss=ee(ts);cr(ss,{title:Tn,confirmLabel:Sn,get open(){return i(he)},set open(a){E(he,a)},$$events:{confirm:()=>{E(he,!1),qt(void 0,void 0,{notifyDiscord:i(O),notifySlack:i(j)})}},children:(a,u)=>{He();var k=yi(),T=ee(k);T.nodeValue=`${Bn} `;var c=h(T);c.textContent=Cn;var d=h(c);d.nodeValue=` ${Ln}`,w(a,k)},$$slots:{default:!0},$$legacy:!0});var _t=h(ss,2),Je=v(_t),gt=h(Je,2),mt=v(gt),yt=v(mt),bt=v(yt),wt=h(bt,2),Ms=v(wt,!0);p(wt),p(yt);var Vs=h(yt,2);{var Fs=a=>{var u=bi(),k=v(u);k.nodeValue=`${Mn} `,He(),p(u),M(T=>J(u,"href",T),[()=>tr(i(ne).reportId)],re),U("click",u,()=>Be.set(!1)),Ce(3,u,()=>Pe,()=>({x:-6,duration:200})),w(a,u)};P(Vs,a=>{var u;!i(V)&&((u=i(ne))!=null&&u.reportId)&&a(Fs)})}p(mt);var kt=h(mt,4),ns=v(kt);{var Ws=a=>{var u=Ei(),k=h(v(u),2),T=v(k,!0);p(k);var c=h(k,2);{var d=g=>{var b=wi();w(g,b)},f=g=>{var b=Ie(),C=ee(b);{var $=F=>{var oe=ki(),pe=v(oe,!0);p(oe),M(Fe=>{L(oe,"none",i(x).tags.length===0),K(pe,Fe)},[()=>er(i(x).tags.length)],re),w(F,oe)};P(C,F=>{i(x).tags!==null&&F($)},!0)}w(g,b)};P(c,g=>{i(se)?g(d):g(f,!1)})}var y=h(c,2);J(y,"aria-label",Vn),p(u),M(()=>{L(u,"loading",i(se)),K(T,i(x).title)}),U("click",y,Ge),w(a,u)},Hs=a=>{var u=Ri(),k=h(v(u),2);Ot(k),p(u),M(()=>vn(k,r().testID)),U("input",k,T=>ke.update(c=>({...c,testID:T.currentTarget.value}))),U("keydown",k,ft),w(a,u)};P(ns,a=>{i(x)?a(Ws):a(Hs,!1)})}var Et=h(ns,2),rs=v(Et);rs.textContent=Nn;var Xe=h(rs,2),Ue=v(Xe),Rt=v(Ue),Ks=v(Rt,!0);p(Rt);var zs=h(Rt,2);p(Ue);var Ys=h(Ue,2);{var js=a=>{var u=Ti(),k=v(u);{var T=y=>{var g=xi(),b=ee(g),C=h(v(b));C.nodeValue=` ${_n}`,p(b),He(2),U("click",b,Ge),w(y,g)};P(k,y=>{i(x)&&y(T)})}var c=h(k,2);{var d=y=>{var g=Ai();g.textContent=Jn,w(y,g)},f=y=>{var g=Ie(),b=ee(g);Oe(b,1,()=>i(Q).filter(C=>C.status!=="complete"),je,(C,$)=>{var F=Si(),oe=v(F,!0);p(F),M(()=>{var pe;L(F,"active",((pe=i(x))==null?void 0:pe.id)===i($).id),K(oe,i($).title)}),U("click",F,()=>Ne(i($))),w(C,F)}),w(y,g)};P(c,y=>{i(Q).filter(g=>g.status!=="complete").length===0?y(d):y(f,!1)})}p(u),Ce(3,u,()=>Pe,()=>({y:6,duration:130})),w(a,u)};P(Ys,a=>{i(ce)&&a(js)})}p(Xe),$t(Xe,a=>G==null?void 0:G(a)),nt(()=>U("clickoutside",Xe,()=>E(ce,!1))),p(Et);var xt=h(Et,4),is=v(xt);is.textContent=On;var os=h(is,2),At=v(os),St=h(At,2),Gs=v(St,!0);p(St);var as=h(St,2);p(os),p(xt);var Tt=h(xt,4),cs=v(Tt);cs.textContent=Un;var Qe=h(cs,2),Me=v(Qe),Bt=v(Me),Js=v(Bt,!0);p(Bt);var Xs=h(Bt,2);p(Me);var Qs=h(Me,2);{var Zs=a=>{var u=Ci();Oe(u,5,()=>Nt,je,(k,T)=>{var c=Bi(),d=v(c,!0);p(c),M(()=>{L(c,"active",i(B).browser===i(T).id),K(d,i(T).label)}),U("click",c,()=>{ke.update(f=>({...f,browser:i(T).id})),E(Y,!1)}),w(k,c)}),p(u),Ce(3,u,()=>Pe,()=>({y:6,duration:130})),w(a,u)};P(Qs,a=>{i(Y)&&a(Zs)})}p(Qe),$t(Qe,a=>G==null?void 0:G(a)),nt(()=>U("clickoutside",Qe,()=>E(Y,!1))),p(Tt);var ls=h(Tt,2);{var en=a=>{var u=Ui(),k=h(ee(u),2),T=v(k);T.textContent=Fn;var c=h(T,2),d=v(c),f=v(d),y=v(f,!0);p(f);var g=h(f,2);p(d);var b=h(d,2);{var C=$=>{var F=Oi(),oe=v(F);{var pe=Ae=>{var fe=Li(),ve=v(fe);Ot(ve);var Se=h(ve,4);Se.textContent=yn,p(fe),M(qe=>vs(ve,qe),[()=>vt(Te)],re),U("change",ve,()=>es(Te)),w(Ae,fe)};P(oe,Ae=>{(m()||vt(Te))&&Ae(pe)})}var Fe=h(oe,2);Oe(Fe,1,()=>i(H),je,(Ae,fe)=>{var ve=Ni(),Se=v(ve);Ot(Se);var qe=h(Se,4),Ct=v(qe,!0);p(qe),p(ve),M(We=>{vs(Se,We),K(Ct,i(fe).name)},[()=>vt(i(fe).id)],re),U("change",Se,()=>es(i(fe).id)),w(Ae,ve)}),p(F),Ce(3,F,()=>Pe,()=>({y:6,duration:130})),w($,F)};P(b,$=>{i(Z)&&$(C)})}p(c),$t(c,$=>G==null?void 0:G($)),nt(()=>U("clickoutside",c,()=>E(Z,!1))),p(k),M($=>{L(d,"open",i(Z)),L(d,"has-remote",$),K(y,i(te)),L(g,"open",i(Z))},[()=>i(B).selectedRunners.some($=>$!==Te)],re),U("click",d,()=>{E(Z,!i(Z))}),w(a,u)};P(ls,a=>{i(H).length>0&&a(en)})}var hs=h(ls,2);{var tn=a=>{var u=Pi(),k=h(ee(u),2),T=v(k);T.textContent=Wn;var c=h(T,2),d=v(c);{var f=b=>{var C=qi();C.textContent=gn,M($=>{J(C,"title",$),L(C,"active",i(O))},[()=>Xn(i(O))],re),U("click",C,()=>E(O,!i(O))),w(b,C)};P(d,b=>{i(D).discordWebhookUrl&&b(f)})}var y=h(d,2);{var g=b=>{var C=$i();C.textContent=mn,M($=>{J(C,"title",$),L(C,"active",i(j))},[()=>Qn(i(j))],re),U("click",C,()=>E(j,!i(j))),w(b,C)};P(y,b=>{i(D).slackWebhookUrl&&b(g)})}p(c),p(k),w(a,u)};P(hs,a=>{(i(D).discordWebhookUrl||i(D).slackWebhookUrl)&&a(tn)})}var Ve=h(hs,4),sn=h(v(Ve));sn.nodeValue=` ${qn}`,p(Ve),p(kt);var Ze=h(kt,4),nn=v(Ze);p(Ze),p(gt);var rn=h(gt,2);{var on=a=>{var u=Vi(),k=v(u);Oe(k,3,()=>i(A),([d,f])=>d,(d,f,y)=>{let g=()=>i(f)[0],b=()=>i(f)[1];var C=Di(),$=v(C),F=h($,2),oe=v(F),pe=v(oe),Fe=v(pe,!0);p(pe);var Ae=h(pe,2),fe=v(Ae),ve=h(fe);{var Se=we=>{var $e=Ii(),et=h(ee($e));M(Lt=>K(et,` ${Lt??""}`),[()=>Gn(b().currentRun.startedBy)],re),w(we,$e)};P(ve,we=>{var $e;($e=b().currentRun)!=null&&$e.startedBy&&we(Se)})}p(Ae),p(oe);var qe=h(oe,2);const Ct=re(()=>b().status==="queued"?"tag":ar(b().kind));lr(qe,{get variant(){return i(Ct)},children:(we,$e)=>{He();var et=an();M(Lt=>K(et,Lt),[()=>b().status==="queued"?Hn:or(b().kind)],re),w(we,et)},$$slots:{default:!0}}),He(2),p(F);var We=h(F,2);J(We,"title",ms),J(We,"aria-label",ms),p(C),M(we=>{L(C,"active-run",b().status==="running"),L(C,"queued-run",b().status==="queued"),L($,"pulse-accent",b().status==="running"),L($,"queued-dot",b().status==="queued"),J(F,"href",`/live/${g()??""}`),K(Fe,b().label||Yn),K(fe,`${we??""} `)},[()=>b().status==="queued"?Kn(i(A).slice(0,i(y)).filter(([,we])=>we.status==="queued").length+1):zn(b().kind)],re),U("click",F,()=>Be.set(!1)),U("click",We,()=>jn(g())),Ce(3,C,()=>Pe,()=>({x:-4,duration:160})),w(d,C)});var T=h(k,2);{var c=d=>{var f=Mi(),y=h(v(f));y.nodeValue=` ${Zn}`,p(f),w(d,f)};P(T,d=>{i(V)||d(c)})}p(u),Ce(3,u,()=>Rs,()=>({duration:200})),w(a,u)};P(rn,a=>{_()&&a(on)})}p(_t),M(a=>{var u,k,T,c;L(_t,"expanded",_()),L(Je,"scanning",i(N)>0),L(Je,"line-pass",((u=i(ne))==null?void 0:u.verdict)==="pass"&&!i(V)),L(Je,"line-fail",((k=i(ne))==null?void 0:k.verdict)==="fail"&&!i(V)),J(bt,"style",`background:${i(ae)??""}`),L(bt,"pulse",i(N)>0),J(wt,"style",`color:${i(ae)??""}`),K(Ms,i(be)),L(Ue,"open",i(ce)),L(Ue,"has-remote",!!i(x)),K(Ks,i(x)?i(x).title:Pn),L(zs,"open",i(ce)),At.disabled=i(B).workers<=ps,K(Gs,i(B).workers),as.disabled=i(B).workers>=fs,L(Me,"open",i(Y)),K(Js,i(Re).label),L(Xs,"open",i(Y)),Ve.disabled=i(se)||i(x)&&((T=i(x).tags)==null?void 0:T.length)===0,J(Ve,"title",i(x)&&((c=i(x).tags)==null?void 0:c.length)===0?In:void 0),J(Ze,"aria-label",a),L(nn,"flipped",_())},[()=>$n(_())],re),U("click",Ue,()=>{E(ce,!i(ce))}),U("click",At,()=>Zt(-1)),U("click",as,()=>Zt(1)),U("click",Me,()=>{E(Y,!i(Y))}),U("click",Ve,xe),U("click",Ze,()=>Be.update(a=>!a)),w(n,ts),ht(),s()}function Hi(n,{from:e,to:t},s={}){var{delay:r=0,duration:o=Y=>Math.sqrt(Y)*120,easing:l=hr}=s,_=getComputedStyle(n),m=_.transform==="none"?"":_.transform,[B,A]=_.transformOrigin.split(" ").map(parseFloat);B/=n.clientWidth,A/=n.clientHeight;var N=Ki(n),q=n.clientWidth/t.width/N,V=n.clientHeight/t.height/N,ae=e.left+e.width*B,be=e.top+e.height*A,Re=t.left+t.width*B,te=t.top+t.height*A,H=(ae-Re)*q,Q=(be-te)*V,x=e.width/t.width,se=e.height/t.height;return{delay:r,duration:typeof o=="function"?o(Math.sqrt(H*H+Q*Q)):o,easing:l,css:(Y,Z)=>{var ce=Z*H,he=Z*Q,D=Y+Z*x,O=Y+Z*se;return`transform: ${m} translate(${ce}px, ${he}px) scale(${D}, ${O});`}}}function Ki(n){if("currentCSSZoom"in n)return n.currentCSSZoom;for(var e=n,t=1;e!==null;)t*=+getComputedStyle(e).zoom,e=e.parentElement;return t}var zi=R('<div class="card svelte-19gnuo1"><div class="row svelte-19gnuo1"><span></span> <span class="msg svelte-19gnuo1"> </span> <button class="link svelte-19gnuo1"><svg width="12" height="12" viewBox="0 0 14 14" fill="none"><path d="M1 1l12 12M13 1L1 13" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path></svg></button></div></div>'),Yi=R('<div class="stack svelte-19gnuo1"></div>');function ji(n,e){lt(e,!1);const[t,s]=ut(),r=()=>ge(dr,"$notifications",t);ct();var o=Yi();Oe(o,13,r,l=>l.id,(l,_)=>{var m=zi(),B=v(m),A=v(B),N=h(A,2),q=v(N,!0);p(N);var V=h(N,2);J(V,"aria-label",sr),p(B),p(m),M(()=>{un(A,`dot ${i(_).type??""} svelte-19gnuo1`),K(q,i(_).message)}),U("click",V,()=>ur(i(_).id)),dn(m,()=>Hi,()=>({duration:180})),Ce(3,m,()=>Pe,()=>({y:12,duration:200})),w(l,m)}),p(o),w(n,o),ht(),s()}var Gi=R("<!> <!> <!> <!>",1),Ji=R('<div class="boot-loading svelte-3qbr79">Loading…</div>');function bo(n,e){lt(e,!1);const[t,s]=ut(),r=()=>ge(xs,"$page",t),o=()=>ge(As,"$auth",t),l=["/login","/setup"];let _=I(!1);Yt(async()=>{const q=r().url.pathname;if(l.includes(q)){E(_,!0);return}if(o().token){E(_,!0);return}try{const ae=await pr();await us(ae?"/setup":"/login")}catch{await us("/login")}finally{E(_,!0)}}),ct();var m=Ie(),B=ee(m);{var A=q=>{var V=Ie(),ae=ee(V);{var be=te=>{var H=Ie(),Q=ee(H);Mt(Q,e,"default",{},null),w(te,H)},Re=te=>{var H=Gi(),Q=ee(H);Rr(Q,{});var x=h(Q,2);Ar(x,{children:(Z,ce)=>{var he=Ie(),D=ee(he);Mt(D,e,"default",{},null),w(Z,he)},$$slots:{default:!0}});var se=h(x,2);Wi(se,{});var Y=h(se,2);ji(Y,{}),w(te,H)};P(ae,te=>{r().url.pathname==="/login"||r().url.pathname==="/setup"?te(be):te(Re,!1)})}w(q,V)},N=q=>{var V=Ji();w(q,V)};P(B,q=>{i(_)?q(A):q(N,!1)})}w(n,m),ht(),s()}export{bo as component,mo as universal};
|
|
6
|
+
import{s as K,a as w,e as U,t as R,b as an,c as Ie}from"../chunks/6VDMVB5U.js";import{i as ct}from"../chunks/CtgCYzu5.js";import{e as nt,u as cn,p as lt,o as Yt,s as E,d as v,j as h,f as ee,g as i,k as p,t as M,x as re,c as ht,m as I,ao as ln,l as _e,b as hn,n as He}from"../chunks/BIf7lHIm.js";import{i as P,s as ut,a as ge}from"../chunks/D_thT6pZ.js";import{e as Oe,t as L,i as je,a as Ce,b as Rs,c as Mt,f as Pe,s as un,h as dn}from"../chunks/BTV7EXZb.js";import{g as us}from"../chunks/7z7jeLBz.js";import{p as xs}from"../chunks/ChvVsiZ9.js";import{s as J,y as Te,A as pn,G as fn,O as ds,B as Nt,Q as ps,U as fs,r as Ot,N as vn,k as _n,q as vs,I as gn,J as mn,z as yn}from"../chunks/C4Z3p6jE.js";import{a as As}from"../chunks/CXQhSK1T.js";import{b as bn,f as wn,a as kn}from"../chunks/kFFd6Oo5.js";import{b as ke,p as Be,e as Ut,c as Ke,m as _s,s as En,S as Ee,a as gs,g as Rn,h as xn,i as An,R as Sn,j as Tn,k as Bn,l as Cn,n as Ln,t as qt,T as Nn,W as On,B as Un,o as qn,q as $n,N as Pn,u as In,r as Dn,V as Mn,C as Vn,v as Fn,w as Wn,Q as Hn,x as ms,y as Kn,z as zn,M as Yn,d as jn,A as Gn,D as Jn,E as Xn,F as Qn,G as Zn,H as er}from"../chunks/DrfshNlX.js";import{j as tr,am as sr}from"../chunks/Dn1b1Jgc.js";import{a as nr,v as rr}from"../chunks/B74j8LrV.js";import{f as ir}from"../chunks/gCgJ3Cwu.js";import{t as or,a as ar}from"../chunks/B2lVGNml.js";import{C as cr}from"../chunks/BWGoOYU0.js";import{B as lr}from"../chunks/DeiVAbyn.js";import{c as hr}from"../chunks/CUPWZLIN.js";import{d as ur,a as dr}from"../chunks/BDb8hZHu.js";import{c as pr}from"../chunks/DDx3no2z.js";function $t(n,e,t){nt(()=>{var s=cn(()=>e(n,t==null?void 0:t())||{});if(s!=null&&s.destroy)return()=>s.destroy()})}const fr=!1,mo=Object.freeze(Object.defineProperty({__proto__:null,ssr:fr},Symbol.toStringTag,{value:"Module"}));var vr=R('<span class="nav-sep svelte-10t98u4" aria-hidden="true"></span>'),_r=R('<!> <a class="link svelte-10t98u4"> </a>',1),gr=R('<img alt="" class="project-logo svelte-10t98u4">'),mr=R('<div class="project-card svelte-10t98u4"><!> <span class="project-name svelte-10t98u4"> </span></div>'),yr=R('<span class="nav-user svelte-10t98u4"> </span>'),br=R('<hr class="mobile-sep svelte-10t98u4">'),wr=R('<!> <a class="mobile-link svelte-10t98u4"> </a>',1),kr=R('<div class="mobile-menu svelte-10t98u4"><!> <a href="/settings" class="mobile-link svelte-10t98u4">Settings</a></div>'),Er=R('<nav class="nav svelte-10t98u4"><div class="inner svelte-10t98u4"><a href="/" class="brand svelte-10t98u4"><span class="brand-serif svelte-10t98u4">Pl</span><span class="brand-sans svelte-10t98u4">um</span></a> <div class="links svelte-10t98u4"></div> <div class="actions svelte-10t98u4"><!> <!> <a href="/settings" class="settings-btn svelte-10t98u4" aria-label="Settings" title="Settings"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></a> <button class="hamburger svelte-10t98u4"><span class="svelte-10t98u4"></span> <span class="svelte-10t98u4"></span> <span class="svelte-10t98u4"></span></button></div></div> <!></nav>');function Rr(n,e){lt(e,!1);const[t,s]=ut(),r=()=>ge(xs,"$page",t),o=()=>ge(As,"$auth",t);let l=I(!1),_=I({name:"",logoUrl:""});Yt(async()=>{try{E(_,await bn())}catch{}});const m=[{href:"/",label:"Automated Tests"},{href:"/reports",label:"Reports"},{href:"/scheduled-tests",label:"Scheduled"},{href:"/test-repository",label:"Test Repository",sep:!0}];function B(){E(l,!1)}ct();var A=Er(),N=v(A),q=v(N),V=h(q,2);Oe(V,5,()=>m,je,(D,O)=>{var j=_r(),G=ee(j);{var ue=X=>{var ne=vr();w(X,ne)};P(G,X=>{i(O).sep&&X(ue)})}var z=h(G,2),ie=v(z,!0);p(z),M(X=>{J(z,"href",i(O).href),L(z,"repo",i(O).sep),L(z,"active",X),K(ie,i(O).label)},[()=>i(O).href==="/"?r().url.pathname==="/":r().url.pathname.startsWith(i(O).href)],re),w(D,j)}),p(V);var ae=h(V,2),be=v(ae);{var Re=D=>{var O=mr(),j=v(O);{var G=ie=>{var X=gr();M(()=>J(X,"src",i(_).logoUrl)),w(ie,X)};P(j,ie=>{i(_).logoUrl&&ie(G)})}var ue=h(j,2),z=v(ue,!0);p(ue),p(O),M(()=>K(z,i(_).name)),w(D,O)};P(be,D=>{i(_).name&&D(Re)})}var te=h(be,2);{var H=D=>{var O=yr(),j=v(O,!0);p(O),M(()=>K(j,o().user.name)),w(D,O)};P(te,D=>{o().user&&D(H)})}var Q=h(te,2),x=h(Q,2),se=v(x),Y=h(se,2),Z=h(Y,2);p(x),p(ae),p(N);var ce=h(N,2);{var he=D=>{var O=kr(),j=v(O);Oe(j,1,()=>m,je,(ue,z)=>{var ie=wr(),X=ee(ie);{var ne=xe=>{var ft=br();w(xe,ft)};P(X,xe=>{i(z).sep&&xe(ne)})}var Ne=h(X,2),Ge=v(Ne,!0);p(Ne),M(xe=>{J(Ne,"href",i(z).href),L(Ne,"active",xe),K(Ge,i(z).label)},[()=>i(z).href==="/"?r().url.pathname==="/":r().url.pathname.startsWith(i(z).href)],re),U("click",Ne,B),w(ue,ie)});var G=h(j,2);p(O),M(()=>L(G,"active",r().url.pathname==="/settings")),U("click",G,B),Ce(3,O,()=>Rs,()=>({duration:200})),w(D,O)};P(ce,D=>{i(l)&&D(he)})}p(A),M(()=>{L(Q,"active",r().url.pathname==="/settings"),J(x,"aria-label",i(l)?"Close menu":"Open menu"),J(x,"aria-expanded",i(l)),L(se,"rotated",i(l)),L(Y,"hidden",i(l)),L(Z,"rotated-reverse",i(l))}),U("click",q,B),U("click",x,()=>E(l,!i(l))),w(n,A),ht(),s()}var xr=R('<main class="shell svelte-28zx1m"><!></main>');function Ar(n,e){var t=xr(),s=v(t);Mt(s,e,"default",{},null),p(t),w(n,t)}const ye=Object.create(null);ye.open="0";ye.close="1";ye.ping="2";ye.pong="3";ye.message="4";ye.upgrade="5";ye.noop="6";const rt=Object.create(null);Object.keys(ye).forEach(n=>{rt[ye[n]]=n});const Vt={type:"error",data:"parser error"},Ss=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ts=typeof ArrayBuffer=="function",Bs=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,jt=({type:n,data:e},t,s)=>Ss&&e instanceof Blob?t?s(e):ys(e,s):Ts&&(e instanceof ArrayBuffer||Bs(e))?t?s(e):ys(new Blob([e]),s):s(ye[n]+(e||"")),ys=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function bs(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Pt;function Sr(n,e){if(Ss&&n.data instanceof Blob)return n.data.arrayBuffer().then(bs).then(e);if(Ts&&(n.data instanceof ArrayBuffer||Bs(n.data)))return e(bs(n.data));jt(n,!1,t=>{Pt||(Pt=new TextEncoder),e(Pt.encode(t))})}const ws="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ye=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<ws.length;n++)Ye[ws.charCodeAt(n)]=n;const Tr=n=>{let e=n.length*.75,t=n.length,s,r=0,o,l,_,m;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const B=new ArrayBuffer(e),A=new Uint8Array(B);for(s=0;s<t;s+=4)o=Ye[n.charCodeAt(s)],l=Ye[n.charCodeAt(s+1)],_=Ye[n.charCodeAt(s+2)],m=Ye[n.charCodeAt(s+3)],A[r++]=o<<2|l>>4,A[r++]=(l&15)<<4|_>>2,A[r++]=(_&3)<<6|m&63;return B},Br=typeof ArrayBuffer=="function",Gt=(n,e)=>{if(typeof n!="string")return{type:"message",data:Cs(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:Cr(n.substring(1),e)}:rt[t]?n.length>1?{type:rt[t],data:n.substring(1)}:{type:rt[t]}:Vt},Cr=(n,e)=>{if(Br){const t=Tr(n);return Cs(t,e)}else return{base64:!0,data:n}},Cs=(n,e)=>{switch(e){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},Ls="",Lr=(n,e)=>{const t=n.length,s=new Array(t);let r=0;n.forEach((o,l)=>{jt(o,!1,_=>{s[l]=_,++r===t&&e(s.join(Ls))})})},Nr=(n,e)=>{const t=n.split(Ls),s=[];for(let r=0;r<t.length;r++){const o=Gt(t[r],e);if(s.push(o),o.type==="error")break}return s};function Or(){return new TransformStream({transform(n,e){Sr(n,t=>{const s=t.length;let r;if(s<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,s);else if(s<65536){r=new Uint8Array(3);const o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,s)}else{r=new Uint8Array(9);const o=new DataView(r.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(t)})}})}let It;function tt(n){return n.reduce((e,t)=>e+t.length,0)}function st(n,e){if(n[0].length===e)return n.shift();const t=new Uint8Array(e);let s=0;for(let r=0;r<e;r++)t[r]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),t}function Ur(n,e){It||(It=new TextDecoder);const t=[];let s=0,r=-1,o=!1;return new TransformStream({transform(l,_){for(t.push(l);;){if(s===0){if(tt(t)<1)break;const m=st(t,1);o=(m[0]&128)===128,r=m[0]&127,r<126?s=3:r===126?s=1:s=2}else if(s===1){if(tt(t)<2)break;const m=st(t,2);r=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),s=3}else if(s===2){if(tt(t)<8)break;const m=st(t,8),B=new DataView(m.buffer,m.byteOffset,m.length),A=B.getUint32(0);if(A>Math.pow(2,21)-1){_.enqueue(Vt);break}r=A*Math.pow(2,32)+B.getUint32(4),s=3}else{if(tt(t)<r)break;const m=st(t,r);_.enqueue(Gt(o?m:It.decode(m),e)),s=0}if(r===0||r>n){_.enqueue(Vt);break}}}})}const Ns=4;function W(n){if(n)return qr(n)}function qr(n){for(var e in W.prototype)n[e]=W.prototype[e];return n}W.prototype.on=W.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};W.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};W.prototype.off=W.prototype.removeListener=W.prototype.removeAllListeners=W.prototype.removeEventListener=function(n,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+n];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,r=0;r<t.length;r++)if(s=t[r],s===e||s.fn===e){t.splice(r,1);break}return t.length===0&&delete this._callbacks["$"+n],this};W.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+n],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,r=t.length;s<r;++s)t[s].apply(this,e)}return this};W.prototype.emitReserved=W.prototype.emit;W.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};W.prototype.hasListeners=function(n){return!!this.listeners(n).length};const dt=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),le=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),$r="arraybuffer";function Os(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const Pr=le.setTimeout,Ir=le.clearTimeout;function pt(n,e){e.useNativeTimers?(n.setTimeoutFn=Pr.bind(le),n.clearTimeoutFn=Ir.bind(le)):(n.setTimeoutFn=le.setTimeout.bind(le),n.clearTimeoutFn=le.clearTimeout.bind(le))}const Dr=1.33;function Mr(n){return typeof n=="string"?Vr(n):Math.ceil((n.byteLength||n.size)*Dr)}function Vr(n){let e=0,t=0;for(let s=0,r=n.length;s<r;s++)e=n.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function Us(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Fr(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function Wr(n){let e={},t=n.split("&");for(let s=0,r=t.length;s<r;s++){let o=t[s].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class Hr extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class Jt extends W{constructor(e){super(),this.writable=!1,pt(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new Hr(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Gt(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Fr(e);return t.length?"?"+t:""}}class Kr extends Jt{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Nr(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Lr(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Us()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let qs=!1;try{qs=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const zr=qs;function Yr(){}class jr extends Kr{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(r,o)=>{this.onError("xhr post error",r,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}}class me extends W{constructor(e,t,s){super(),this.createRequest=e,pt(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const t=Os(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&s.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var r;s.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=me.requestsCount++,me.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Yr,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete me.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}me.requestsCount=0;me.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ks);else if(typeof addEventListener=="function"){const n="onpagehide"in le?"pagehide":"unload";addEventListener(n,ks,!1)}}function ks(){for(let n in me.requests)me.requests.hasOwnProperty(n)&&me.requests[n].abort()}const Gr=function(){const n=$s({xdomain:!1});return n&&n.responseType!==null}();class Jr extends jr{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=Gr&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new me($s,this.uri(),e)}}function $s(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||zr))return new XMLHttpRequest}catch{}if(!e)try{return new le[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ps=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Xr extends Jt{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=Ps?{}:Os(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;jt(s,this.supportsBinary,o=>{try{this.doWrite(s,o)}catch{}r&&dt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Us()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Dt=le.WebSocket||le.MozWebSocket;class Qr extends Xr{createSocket(e,t,s){return Ps?new Dt(e,t,s):t?new Dt(e,t):new Dt(e)}doWrite(e,t){this.ws.send(t)}}class Zr extends Jt{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=Ur(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),r=Or();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const o=()=>{s.read().then(({done:_,value:m})=>{_||(this.onPacket(m),o())}).catch(_=>{})};o();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;this._writer.write(s).then(()=>{r&&dt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const ei={websocket:Qr,webtransport:Zr,polling:Jr},ti=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,si=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ft(n){if(n.length>8e3)throw"URI too long";const e=n,t=n.indexOf("["),s=n.indexOf("]");t!=-1&&s!=-1&&(n=n.substring(0,t)+n.substring(t,s).replace(/:/g,";")+n.substring(s,n.length));let r=ti.exec(n||""),o={},l=14;for(;l--;)o[si[l]]=r[l]||"";return t!=-1&&s!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=ni(o,o.path),o.queryKey=ri(o,o.query),o}function ni(n,e){const t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function ri(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,r,o){r&&(t[r]=o)}),t}const Wt=typeof addEventListener=="function"&&typeof removeEventListener=="function",it=[];Wt&&addEventListener("offline",()=>{it.forEach(n=>n())},!1);class Le extends W{constructor(e,t){if(super(),this.binaryType=$r,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const s=Ft(e);t.hostname=s.host,t.secure=s.protocol==="https"||s.protocol==="wss",t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=Ft(t.host).host);pt(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(s=>{const r=s.prototype.name;this.transports.push(r),this._transportsByName[r]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Wr(this.opts.query)),Wt&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},it.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Ns,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Le.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",Le.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const r=this.writeBuffer[s].data;if(r&&(t+=Mr(r)),s>0&&t>this._maxPayload)return this.writeBuffer.slice(0,s);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,dt(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,r){if(typeof t=="function"&&(r=t,t=void 0),typeof s=="function"&&(r=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const o={type:e,data:t,options:s};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(Le.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Wt&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=it.indexOf(this._offlineEventListener);s!==-1&&it.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}Le.protocol=Ns;class ii extends Le{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;Le.priorWebsocketSuccess=!1;const r=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",N=>{if(!s)if(N.type==="pong"&&N.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Le.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(A(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const q=new Error("probe error");q.transport=t.name,this.emitReserved("upgradeError",q)}}))};function o(){s||(s=!0,A(),t.close(),t=null)}const l=N=>{const q=new Error("probe error: "+N);q.transport=t.name,o(),this.emitReserved("upgradeError",q)};function _(){l("transport closed")}function m(){l("socket closed")}function B(N){t&&N.name!==t.name&&o()}const A=()=>{t.removeListener("open",r),t.removeListener("error",l),t.removeListener("close",_),this.off("close",m),this.off("upgrading",B)};t.once("open",r),t.once("error",l),t.once("close",_),this.once("close",m),this.once("upgrading",B),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let oi=class extends ii{constructor(e,t={}){const s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(r=>ei[r]).filter(r=>!!r)),super(e,s)}};function ai(n,e="",t){let s=n;t=t||typeof location<"u"&&location,n==null&&(n=t.protocol+"//"+t.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=t.protocol+n:n=t.host+n),/^(https?|wss?):\/\//.test(n)||(typeof t<"u"?n=t.protocol+"//"+n:n="https://"+n),s=Ft(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const o=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+o+":"+s.port+e,s.href=s.protocol+"://"+o+(t&&t.port===s.port?"":":"+s.port),s}const ci=typeof ArrayBuffer=="function",li=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Is=Object.prototype.toString,hi=typeof Blob=="function"||typeof Blob<"u"&&Is.call(Blob)==="[object BlobConstructor]",ui=typeof File=="function"||typeof File<"u"&&Is.call(File)==="[object FileConstructor]";function Xt(n){return ci&&(n instanceof ArrayBuffer||li(n))||hi&&n instanceof Blob||ui&&n instanceof File}function ot(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(ot(n[t]))return!0;return!1}if(Xt(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return ot(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&ot(n[t]))return!0;return!1}function di(n){const e=[],t=n.data,s=n;return s.data=Ht(t,e),s.attachments=e.length,{packet:s,buffers:e}}function Ht(n,e){if(!n)return n;if(Xt(n)){const t={_placeholder:!0,num:e.length};return e.push(n),t}else if(Array.isArray(n)){const t=new Array(n.length);for(let s=0;s<n.length;s++)t[s]=Ht(n[s],e);return t}else if(typeof n=="object"&&!(n instanceof Date)){const t={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=Ht(n[s],e));return t}return n}function pi(n,e){return n.data=Kt(n.data,e),delete n.attachments,n}function Kt(n,e){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<e.length)return e[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let t=0;t<n.length;t++)n[t]=Kt(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=Kt(n[t],e));return n}const fi=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var S;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(S||(S={}));class vi{constructor(e){this.replacer=e}encode(e){return(e.type===S.EVENT||e.type===S.ACK)&&ot(e)?this.encodeAsBinary({type:e.type===S.EVENT?S.BINARY_EVENT:S.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===S.BINARY_EVENT||e.type===S.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=di(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}}function Es(n){return Object.prototype.toString.call(n)==="[object Object]"}class Qt extends W{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===S.BINARY_EVENT;s||t.type===S.BINARY_ACK?(t.type=s?S.EVENT:S.ACK,this.reconstructor=new _i(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(Xt(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(S[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===S.BINARY_EVENT||s.type===S.BINARY_ACK){const o=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const l=e.substring(o,t);if(l!=Number(l)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(l)}if(e.charAt(t+1)==="/"){const o=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(o,t)}else s.nsp="/";const r=e.charAt(t+1);if(r!==""&&Number(r)==r){const o=t+1;for(;++t;){const l=e.charAt(t);if(l==null||Number(l)!=l){--t;break}if(t===e.length)break}s.id=Number(e.substring(o,t+1))}if(e.charAt(++t)){const o=this.tryParse(e.substr(t));if(Qt.isPayloadValid(s.type,o))s.data=o;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case S.CONNECT:return Es(t);case S.DISCONNECT:return t===void 0;case S.CONNECT_ERROR:return typeof t=="string"||Es(t);case S.EVENT:case S.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&fi.indexOf(t[0])===-1);case S.ACK:case S.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class _i{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=pi(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const gi=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Qt,Encoder:vi,get PacketType(){return S}},Symbol.toStringTag,{value:"Module"}));function de(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const mi=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ds extends W{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[de(e,"open",this.onopen.bind(this)),de(e,"packet",this.onpacket.bind(this)),de(e,"error",this.onerror.bind(this)),de(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,r,o;if(mi.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const l={type:S.EVENT,data:t};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const A=this.ids++,N=t.pop();this._registerAckCallback(A,N),l.id=A}const _=(r=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||r===void 0?void 0:r.writable,m=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!_||(m?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(e,t){var s;const r=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(r===void 0){this.acks[e]=t;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let _=0;_<this.sendBuffer.length;_++)this.sendBuffer[_].id===e&&this.sendBuffer.splice(_,1);t.call(this,new Error("operation has timed out"))},r),l=(..._)=>{this.io.clearTimeoutFn(o),t.apply(this,_)};l.withError=!0,this.acks[e]=l}emitWithAck(e,...t){return new Promise((s,r)=>{const o=(l,_)=>l?r(l):s(_);o.withError=!0,t.push(o),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...o)=>s!==this._queue[0]?void 0:(r!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(r)):(this._queue.shift(),t&&t(null,...o)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:S.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case S.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case S.EVENT:case S.BINARY_EVENT:this.onevent(e);break;case S.ACK:case S.BINARY_ACK:this.onack(e);break;case S.DISCONNECT:this.ondisconnect();break;case S.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,t.packet({type:S.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:S.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function De(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}De.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*n);n=Math.floor(e*10)&1?n+t:n-t}return Math.min(n,this.max)|0};De.prototype.reset=function(){this.attempts=0};De.prototype.setMin=function(n){this.ms=n};De.prototype.setMax=function(n){this.max=n};De.prototype.setJitter=function(n){this.jitter=n};class zt extends W{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,pt(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new De({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||gi;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new oi(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=de(t,"open",function(){s.onopen(),e&&e()}),o=_=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",_),e?e(_):this.maybeReconnectOnOpen()},l=de(t,"error",o);if(this._timeout!==!1){const _=this._timeout,m=this.setTimeoutFn(()=>{r(),o(new Error("timeout")),t.close()},_);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(r),this.subs.push(l),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(de(e,"ping",this.onping.bind(this)),de(e,"data",this.ondata.bind(this)),de(e,"error",this.onerror.bind(this)),de(e,"close",this.onclose.bind(this)),de(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){dt(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new Ds(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t)if(this.nsps[s].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const ze={};function at(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=ai(n,e.path||"/socket.io"),s=t.source,r=t.id,o=t.path,l=ze[r]&&o in ze[r].nsps,_=e.forceNew||e["force new connection"]||e.multiplex===!1||l;let m;return _?m=new zt(s,e):(ze[r]||(ze[r]=new zt(s,e)),m=ze[r]),t.query&&!e.query&&(e.query=t.queryKey),m.socket(t.path,e)}Object.assign(at,{Manager:zt,Socket:Ds,io:at,connect:at});var yi=R(' <strong class="svelte-1pcdei1"></strong> ',1),bi=R('<a class="view-report-btn svelte-1pcdei1"> <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1pcdei1"><line x1="5" y1="12" x2="19" y2="12" class="svelte-1pcdei1"></line><polyline points="12 5 19 12 12 19" class="svelte-1pcdei1"></polyline></svg></a>'),wi=R('<span class="run-chip-spinner svelte-1pcdei1"></span>'),ki=R('<span class="run-chip-count svelte-1pcdei1"> </span>'),Ei=R('<div class="run-chip svelte-1pcdei1"><svg width="9" height="10" viewBox="0 0 10 12" fill="currentColor" stroke="none" style="opacity:0.6;flex-shrink:0" class="svelte-1pcdei1"><polygon points="0,0 10,6 0,12" class="svelte-1pcdei1"></polygon></svg> <span class="run-chip-title svelte-1pcdei1"> </span> <!> <button class="run-chip-clear svelte-1pcdei1"><svg width="9" height="9" viewBox="0 0 14 14" fill="none" class="svelte-1pcdei1"><path d="M1 1l12 12M13 1L1 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" class="svelte-1pcdei1"></path></svg></button></div>'),Ri=R('<div class="input-wrap svelte-1pcdei1"><svg class="input-icon svelte-1pcdei1" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" class="svelte-1pcdei1"></circle><line x1="21" y1="21" x2="16.65" y2="16.65" class="svelte-1pcdei1"></line></svg> <input type="text" class="tag-input svelte-1pcdei1" placeholder="@tag or leave blank for all tests"></div>'),xi=R('<button class="dropdown-item svelte-1pcdei1"><span style="color:var(--text-muted)" class="svelte-1pcdei1">✕</span> </button> <div class="dropdown-divider svelte-1pcdei1"></div>',1),Ai=R('<div class="dropdown-empty svelte-1pcdei1"></div>'),Si=R('<button class="dropdown-item svelte-1pcdei1"> </button>'),Ti=R('<div class="dropdown-menu run-pick-menu svelte-1pcdei1"><!> <!></div>'),Bi=R('<button class="dropdown-item svelte-1pcdei1"> </button>'),Ci=R('<div class="dropdown-menu svelte-1pcdei1"></div>'),Li=R('<label class="runner-option svelte-1pcdei1"><input type="checkbox" class="svelte-1pcdei1"> <span class="runner-dot built-in svelte-1pcdei1"></span> <span class="svelte-1pcdei1"></span></label>'),Ni=R('<label class="runner-option svelte-1pcdei1"><input type="checkbox" class="svelte-1pcdei1"> <span class="runner-dot remote svelte-1pcdei1"></span> <span class="svelte-1pcdei1"> </span></label>'),Oi=R('<div class="dropdown-menu runners-menu svelte-1pcdei1"><!> <!></div>'),Ui=R('<div class="ctrl-divider svelte-1pcdei1"></div> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="dropdown-wrap svelte-1pcdei1"><button class="dropdown-trigger svelte-1pcdei1"><span class="svelte-1pcdei1"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-1pcdei1"><polyline points="6 9 12 15 18 9" class="svelte-1pcdei1"></polyline></svg></button> <!></div></div>',1),qi=R('<button type="button" class="notify-btn svelte-1pcdei1"></button>'),$i=R('<button type="button" class="notify-btn svelte-1pcdei1"></button>'),Pi=R('<div class="ctrl-divider svelte-1pcdei1"></div> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="notify-toggles svelte-1pcdei1"><!> <!></div></div>',1),Ii=R('<span class="meta-dot svelte-1pcdei1">·</span> ',1),Di=R('<div class="run-card svelte-1pcdei1"><span class="run-card-dot svelte-1pcdei1"></span> <a class="run-card-main svelte-1pcdei1"><div class="run-card-info svelte-1pcdei1"><span class="run-card-label svelte-1pcdei1"> </span> <span class="run-card-meta svelte-1pcdei1"> <!></span></div> <!> <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="run-card-arrow svelte-1pcdei1"><line x1="5" y1="12" x2="19" y2="12" class="svelte-1pcdei1"></line><polyline points="12 5 19 12 12 19" class="svelte-1pcdei1"></polyline></svg></a> <button class="run-card-cancel svelte-1pcdei1"><svg width="12" height="12" viewBox="0 0 14 14" fill="none" class="svelte-1pcdei1"><path d="M1 1l12 12M13 1L1 13" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" class="svelte-1pcdei1"></path></svg></button></div>'),Mi=R('<div class="empty-runs svelte-1pcdei1"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="empty-icon svelte-1pcdei1"><circle cx="12" cy="12" r="10" class="svelte-1pcdei1"></circle><line x1="10" y1="15" x2="10" y2="12" class="svelte-1pcdei1"></line><line x1="10" y1="9" x2="10.01" y2="9" class="svelte-1pcdei1"></line></svg> </div>'),Vi=R('<div class="body svelte-1pcdei1"><!> <!></div>'),Fi=R('<!> <div class="panel svelte-1pcdei1"><div class="scan-line svelte-1pcdei1"></div> <div class="bar svelte-1pcdei1"><div class="bar-left svelte-1pcdei1"><div class="bar-status svelte-1pcdei1"><span class="status-dot svelte-1pcdei1"></span> <span class="status-word svelte-1pcdei1"> </span></div> <!></div> <span class="flex-gap svelte-1pcdei1"></span> <div class="bar-center svelte-1pcdei1"><!> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="dropdown-wrap svelte-1pcdei1"><button class="dropdown-trigger svelte-1pcdei1"><span class="svelte-1pcdei1"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-1pcdei1"><polyline points="6 9 12 15 18 9" class="svelte-1pcdei1"></polyline></svg></button> <!></div></div> <div class="ctrl-divider svelte-1pcdei1"></div> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="stepper svelte-1pcdei1"><button class="step-btn svelte-1pcdei1">−</button> <span class="step-val svelte-1pcdei1"> </span> <button class="step-btn svelte-1pcdei1">+</button></div></div> <div class="ctrl-divider svelte-1pcdei1"></div> <div class="ctrl-group svelte-1pcdei1"><span class="ctrl-label svelte-1pcdei1"></span> <div class="dropdown-wrap svelte-1pcdei1"><button class="dropdown-trigger svelte-1pcdei1"><span class="svelte-1pcdei1"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-1pcdei1"><polyline points="6 9 12 15 18 9" class="svelte-1pcdei1"></polyline></svg></button> <!></div></div> <!> <!> <div class="ctrl-divider svelte-1pcdei1"></div> <button class="run-btn svelte-1pcdei1"><svg width="9" height="10" viewBox="0 0 10 12" fill="currentColor" stroke="none" class="svelte-1pcdei1"><polygon points="0,0 10,6 0,12" class="svelte-1pcdei1"></polygon></svg> </button></div> <span class="flex-gap-sm svelte-1pcdei1"></span> <button class="expand-btn svelte-1pcdei1"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1pcdei1"><polyline points="18 15 12 9 6 15" class="svelte-1pcdei1"></polyline></svg></button></div> <!></div>',1);function Wi(n,e){lt(e,!1);const[t,s]=ut(),r=()=>ge(ke,"$runnerConfig",t),o=()=>ge(Ke,"$backgroundRuns",t),l=()=>ge(Dn,"$runsVersion",t),_=()=>ge(Be,"$panelExpanded",t),m=()=>ge(Ut,"$builtInEnabled",t),B=I(),A=I(),N=I(),q=I(),V=I(),ae=I(),be=I(),Re=I(),te=I();let H=I([]),Q=I([]),x=I(null),se=I(!1),Y=I(!1),Z=I(!1),ce=I(!1),he=I(!1),D=I({discordWebhookUrl:"",slackWebhookUrl:"",notifyPublicUrl:""}),O=I(!1),j=I(!1);function G(a){function u(k){a.contains(k.target)||a.dispatchEvent(new CustomEvent("clickoutside"))}return document.addEventListener("click",u,!0),{destroy(){document.removeEventListener("click",u,!0)}}}let ue,z,ie,X,ne=I(null);Yt(()=>{try{const c=localStorage.getItem("plum:runnerConfig");c&&ke.update(d=>({...d,...JSON.parse(c)}))}catch{}try{const c=localStorage.getItem("plum:panelExpanded");c!==null&&Be.set(c==="true")}catch{}try{const c=localStorage.getItem("plum:builtInEnabled");c!==null&&Ut.set(c!=="false")}catch{}wn().then(c=>{E(H,c);const d=new Set([Te,...c.map(f=>f.id)]);ke.update(f=>{const y=f.selectedRunners.filter(g=>d.has(g));return{...f,selectedRunners:y.length>0?y:[Te]}})}).catch(()=>{}),kn().then(c=>E(D,c)).catch(()=>{}),ir().then(c=>{c.length!==0&&(Ke.update(d=>{const f={...d};for(const{runId:y,kind:g,label:b,meta:C,status:$}of c)f[y]||(f[y]=_s({kind:g,label:b,meta:C,status:$}));return f}),Be.set(!0))}).catch(()=>{}),ue=ke.subscribe(c=>{try{localStorage.setItem("plum:runnerConfig",JSON.stringify(c))}catch{}}),z=Be.subscribe(c=>{try{localStorage.setItem("plum:panelExpanded",String(c))}catch{}}),ie=Ut.subscribe(c=>{try{localStorage.setItem("plum:builtInEnabled",String(c))}catch{}ke.update(d=>{if(!c&&d.selectedRunners.includes(Te)){const f=d.selectedRunners.filter(g=>g!==Te),y=f.length>0?f:i(H)[0]?[i(H)[0].id]:[];return{...d,selectedRunners:y}}return d})});const a=at(pn,{transports:["websocket"]});X=a,En.set(a),a.on(Ee.REPORT_READY,()=>gs.update(c=>c+1));function u(c,d){Ke.update(f=>f[c]?{...f,[c]:d(f[c])}:f)}function k(c,{kind:d,label:f,meta:y},g){Ke.update(b=>({...b,[c]:b[c]?{...b[c],status:g}:_s({kind:d,label:f,meta:y,status:g})})),Be.set(!0)}a.on(Ee.BG_RUN_QUEUED,({runId:c,kind:d,label:f,meta:y})=>{k(c,{kind:d,label:f,meta:y},"queued")}),a.on(Ee.BG_RUN_START,({runId:c,kind:d,label:f,meta:y})=>{k(c,{kind:d,label:f,meta:y},"running")}),a.on(Ee.BG_RUN_LOG,({runId:c,log:d})=>{u(c,f=>({...f,output:f.output+d}))}),a.on(Ee.BG_RUN_LANES_INIT,({runId:c,lanes:d})=>{u(c,f=>({...f,lanes:d.map(y=>({...y,status:"running",logs:""}))}))});function T(c,d,f){const y=c.lanes.some(g=>g.id===d)?c.lanes.map(g=>g.id===d?{...g,...f(g)}:g):[...c.lanes,{id:d,name:d,testCount:0,status:"running",logs:"",...f({logs:""})}];return{...c,lanes:y}}a.on(Ee.BG_RUN_LANE_LOG,({runId:c,laneId:d,log:f})=>{u(c,y=>T(y,d,g=>({logs:(g.logs||"")+f})))}),a.on(Ee.BG_RUN_LANE_STATUS,({runId:c,laneId:d,status:f})=>{u(c,y=>T(y,d,()=>({status:f})))}),a.on(Ee.BG_RUN_LANE_RRWEB_BATCH,({runId:c,...d})=>{u(c,f=>({...f,rrwebByLane:Rn(f.rrwebByLane,d)}))}),a.on(Ee.BG_RUN_DONE,({runId:c,code:d,reportId:f})=>{const y=d===0||d===null,g=d===130;u(c,b=>({...b,status:"done",testCompleted:!g,latestReportId:g?null:f,verdict:g?"cancelled":y?"pass":"fail"})),!g&&f&&E(ne,{reportId:f,verdict:y?"pass":"fail"}),g||gs.update(b=>b+1),setTimeout(()=>{Ke.update(b=>{const C={...b};return delete C[c],C})},fn+5e3)})}),ln(()=>{ue==null||ue(),z==null||z(),ie==null||ie(),X==null||X.disconnect()});async function Ne(a){E(ce,!1),E(x,{id:a.id,title:a.title,tags:null}),E(se,!0);try{const k=(await rr(a.id)).entries.filter(T=>{var c;return(c=T.case)==null?void 0:c.isAutomated}).map(T=>`@${T.case.displayId}`);E(x,{id:a.id,title:a.title,tags:k})}catch{E(x,null)}finally{E(se,!1)}}function Ge(){E(x,null)}function xe(){const a={notifyDiscord:i(O),notifySlack:i(j)};if(i(x)){if(i(se)||!i(x).tags||i(x).tags.length===0)return;qt(i(x).tags.join(" or "),i(x).id,a,i(x).title)}else r().testID.trim()===""?E(he,!0):qt(void 0,void 0,a)}function ft(a){a.key==="Enter"&&!i(x)&&xe()}function Zt(a){ke.update(u=>({...u,workers:Math.max(ps,Math.min(fs,u.workers+a))}))}function es(a){ke.update(u=>{const k=u.selectedRunners;if(k.includes(a)&&k.length===1)return u;const T=k.includes(a)?k.filter(c=>c!==a):[...k,a];return{...u,selectedRunners:T}})}function vt(a){return r().selectedRunners.includes(a)}_e(()=>r(),()=>{E(B,r())}),_e(()=>o(),()=>{E(A,Object.entries(o()).filter(([,a])=>a.status==="queued"||a.status==="running"))}),_e(()=>i(A),()=>{E(N,i(A).filter(([,a])=>a.status==="running").length)}),_e(()=>i(A),()=>{E(q,i(A).filter(([,a])=>a.status==="queued").length)}),_e(()=>i(A),()=>{E(V,i(A).length>0)}),_e(()=>(l(),ds),()=>{l()>=0&&nr({limit:ds}).then(a=>E(Q,a.runs)).catch(()=>{})}),_e(()=>(i(N),i(q),i(ne)),()=>{var a,u;E(ae,i(N)>0?"var(--accent)":i(q)>0?"var(--warn)":((a=i(ne))==null?void 0:a.verdict)==="pass"?"var(--pass)":((u=i(ne))==null?void 0:u.verdict)==="fail"?"var(--fail)":"var(--border)")}),_e(()=>(i(N),i(q),i(ne)),()=>{var a;E(be,xn({running:i(N),queued:i(q),verdict:(a=i(ne))==null?void 0:a.verdict}))}),_e(()=>i(B),()=>{E(Re,Nt.find(a=>a.id===i(B).browser)??Nt[0])}),_e(()=>(i(B),i(H)),()=>{E(te,An(i(B),i(H)))}),hn(),ct();var ts=Fi(),ss=ee(ts);cr(ss,{title:Tn,confirmLabel:Sn,get open(){return i(he)},set open(a){E(he,a)},$$events:{confirm:()=>{E(he,!1),qt(void 0,void 0,{notifyDiscord:i(O),notifySlack:i(j)})}},children:(a,u)=>{He();var k=yi(),T=ee(k);T.nodeValue=`${Bn} `;var c=h(T);c.textContent=Cn;var d=h(c);d.nodeValue=` ${Ln}`,w(a,k)},$$slots:{default:!0},$$legacy:!0});var _t=h(ss,2),Je=v(_t),gt=h(Je,2),mt=v(gt),yt=v(mt),bt=v(yt),wt=h(bt,2),Ms=v(wt,!0);p(wt),p(yt);var Vs=h(yt,2);{var Fs=a=>{var u=bi(),k=v(u);k.nodeValue=`${Mn} `,He(),p(u),M(T=>J(u,"href",T),[()=>tr(i(ne).reportId)],re),U("click",u,()=>Be.set(!1)),Ce(3,u,()=>Pe,()=>({x:-6,duration:200})),w(a,u)};P(Vs,a=>{var u;!i(V)&&((u=i(ne))!=null&&u.reportId)&&a(Fs)})}p(mt);var kt=h(mt,4),ns=v(kt);{var Ws=a=>{var u=Ei(),k=h(v(u),2),T=v(k,!0);p(k);var c=h(k,2);{var d=g=>{var b=wi();w(g,b)},f=g=>{var b=Ie(),C=ee(b);{var $=F=>{var oe=ki(),pe=v(oe,!0);p(oe),M(Fe=>{L(oe,"none",i(x).tags.length===0),K(pe,Fe)},[()=>er(i(x).tags.length)],re),w(F,oe)};P(C,F=>{i(x).tags!==null&&F($)},!0)}w(g,b)};P(c,g=>{i(se)?g(d):g(f,!1)})}var y=h(c,2);J(y,"aria-label",Vn),p(u),M(()=>{L(u,"loading",i(se)),K(T,i(x).title)}),U("click",y,Ge),w(a,u)},Hs=a=>{var u=Ri(),k=h(v(u),2);Ot(k),p(u),M(()=>vn(k,r().testID)),U("input",k,T=>ke.update(c=>({...c,testID:T.currentTarget.value}))),U("keydown",k,ft),w(a,u)};P(ns,a=>{i(x)?a(Ws):a(Hs,!1)})}var Et=h(ns,2),rs=v(Et);rs.textContent=Nn;var Xe=h(rs,2),Ue=v(Xe),Rt=v(Ue),Ks=v(Rt,!0);p(Rt);var zs=h(Rt,2);p(Ue);var Ys=h(Ue,2);{var js=a=>{var u=Ti(),k=v(u);{var T=y=>{var g=xi(),b=ee(g),C=h(v(b));C.nodeValue=` ${_n}`,p(b),He(2),U("click",b,Ge),w(y,g)};P(k,y=>{i(x)&&y(T)})}var c=h(k,2);{var d=y=>{var g=Ai();g.textContent=Jn,w(y,g)},f=y=>{var g=Ie(),b=ee(g);Oe(b,1,()=>i(Q).filter(C=>C.status!=="complete"),je,(C,$)=>{var F=Si(),oe=v(F,!0);p(F),M(()=>{var pe;L(F,"active",((pe=i(x))==null?void 0:pe.id)===i($).id),K(oe,i($).title)}),U("click",F,()=>Ne(i($))),w(C,F)}),w(y,g)};P(c,y=>{i(Q).filter(g=>g.status!=="complete").length===0?y(d):y(f,!1)})}p(u),Ce(3,u,()=>Pe,()=>({y:6,duration:130})),w(a,u)};P(Ys,a=>{i(ce)&&a(js)})}p(Xe),$t(Xe,a=>G==null?void 0:G(a)),nt(()=>U("clickoutside",Xe,()=>E(ce,!1))),p(Et);var xt=h(Et,4),is=v(xt);is.textContent=On;var os=h(is,2),At=v(os),St=h(At,2),Gs=v(St,!0);p(St);var as=h(St,2);p(os),p(xt);var Tt=h(xt,4),cs=v(Tt);cs.textContent=Un;var Qe=h(cs,2),Me=v(Qe),Bt=v(Me),Js=v(Bt,!0);p(Bt);var Xs=h(Bt,2);p(Me);var Qs=h(Me,2);{var Zs=a=>{var u=Ci();Oe(u,5,()=>Nt,je,(k,T)=>{var c=Bi(),d=v(c,!0);p(c),M(()=>{L(c,"active",i(B).browser===i(T).id),K(d,i(T).label)}),U("click",c,()=>{ke.update(f=>({...f,browser:i(T).id})),E(Y,!1)}),w(k,c)}),p(u),Ce(3,u,()=>Pe,()=>({y:6,duration:130})),w(a,u)};P(Qs,a=>{i(Y)&&a(Zs)})}p(Qe),$t(Qe,a=>G==null?void 0:G(a)),nt(()=>U("clickoutside",Qe,()=>E(Y,!1))),p(Tt);var ls=h(Tt,2);{var en=a=>{var u=Ui(),k=h(ee(u),2),T=v(k);T.textContent=Fn;var c=h(T,2),d=v(c),f=v(d),y=v(f,!0);p(f);var g=h(f,2);p(d);var b=h(d,2);{var C=$=>{var F=Oi(),oe=v(F);{var pe=Ae=>{var fe=Li(),ve=v(fe);Ot(ve);var Se=h(ve,4);Se.textContent=yn,p(fe),M(qe=>vs(ve,qe),[()=>vt(Te)],re),U("change",ve,()=>es(Te)),w(Ae,fe)};P(oe,Ae=>{(m()||vt(Te))&&Ae(pe)})}var Fe=h(oe,2);Oe(Fe,1,()=>i(H),je,(Ae,fe)=>{var ve=Ni(),Se=v(ve);Ot(Se);var qe=h(Se,4),Ct=v(qe,!0);p(qe),p(ve),M(We=>{vs(Se,We),K(Ct,i(fe).name)},[()=>vt(i(fe).id)],re),U("change",Se,()=>es(i(fe).id)),w(Ae,ve)}),p(F),Ce(3,F,()=>Pe,()=>({y:6,duration:130})),w($,F)};P(b,$=>{i(Z)&&$(C)})}p(c),$t(c,$=>G==null?void 0:G($)),nt(()=>U("clickoutside",c,()=>E(Z,!1))),p(k),M($=>{L(d,"open",i(Z)),L(d,"has-remote",$),K(y,i(te)),L(g,"open",i(Z))},[()=>i(B).selectedRunners.some($=>$!==Te)],re),U("click",d,()=>{E(Z,!i(Z))}),w(a,u)};P(ls,a=>{i(H).length>0&&a(en)})}var hs=h(ls,2);{var tn=a=>{var u=Pi(),k=h(ee(u),2),T=v(k);T.textContent=Wn;var c=h(T,2),d=v(c);{var f=b=>{var C=qi();C.textContent=gn,M($=>{J(C,"title",$),L(C,"active",i(O))},[()=>Xn(i(O))],re),U("click",C,()=>E(O,!i(O))),w(b,C)};P(d,b=>{i(D).discordWebhookUrl&&b(f)})}var y=h(d,2);{var g=b=>{var C=$i();C.textContent=mn,M($=>{J(C,"title",$),L(C,"active",i(j))},[()=>Qn(i(j))],re),U("click",C,()=>E(j,!i(j))),w(b,C)};P(y,b=>{i(D).slackWebhookUrl&&b(g)})}p(c),p(k),w(a,u)};P(hs,a=>{(i(D).discordWebhookUrl||i(D).slackWebhookUrl)&&a(tn)})}var Ve=h(hs,4),sn=h(v(Ve));sn.nodeValue=` ${qn}`,p(Ve),p(kt);var Ze=h(kt,4),nn=v(Ze);p(Ze),p(gt);var rn=h(gt,2);{var on=a=>{var u=Vi(),k=v(u);Oe(k,3,()=>i(A),([d,f])=>d,(d,f,y)=>{let g=()=>i(f)[0],b=()=>i(f)[1];var C=Di(),$=v(C),F=h($,2),oe=v(F),pe=v(oe),Fe=v(pe,!0);p(pe);var Ae=h(pe,2),fe=v(Ae),ve=h(fe);{var Se=we=>{var $e=Ii(),et=h(ee($e));M(Lt=>K(et,` ${Lt??""}`),[()=>Gn(b().currentRun.startedBy)],re),w(we,$e)};P(ve,we=>{var $e;($e=b().currentRun)!=null&&$e.startedBy&&we(Se)})}p(Ae),p(oe);var qe=h(oe,2);const Ct=re(()=>b().status==="queued"?"tag":ar(b().kind));lr(qe,{get variant(){return i(Ct)},children:(we,$e)=>{He();var et=an();M(Lt=>K(et,Lt),[()=>b().status==="queued"?Hn:or(b().kind)],re),w(we,et)},$$slots:{default:!0}}),He(2),p(F);var We=h(F,2);J(We,"title",ms),J(We,"aria-label",ms),p(C),M(we=>{L(C,"active-run",b().status==="running"),L(C,"queued-run",b().status==="queued"),L($,"pulse-accent",b().status==="running"),L($,"queued-dot",b().status==="queued"),J(F,"href",`/live/${g()??""}`),K(Fe,b().label||Yn),K(fe,`${we??""} `)},[()=>b().status==="queued"?Kn(i(A).slice(0,i(y)).filter(([,we])=>we.status==="queued").length+1):zn(b().kind)],re),U("click",F,()=>Be.set(!1)),U("click",We,()=>jn(g())),Ce(3,C,()=>Pe,()=>({x:-4,duration:160})),w(d,C)});var T=h(k,2);{var c=d=>{var f=Mi(),y=h(v(f));y.nodeValue=` ${Zn}`,p(f),w(d,f)};P(T,d=>{i(V)||d(c)})}p(u),Ce(3,u,()=>Rs,()=>({duration:200})),w(a,u)};P(rn,a=>{_()&&a(on)})}p(_t),M(a=>{var u,k,T,c;L(_t,"expanded",_()),L(Je,"scanning",i(N)>0),L(Je,"line-pass",((u=i(ne))==null?void 0:u.verdict)==="pass"&&!i(V)),L(Je,"line-fail",((k=i(ne))==null?void 0:k.verdict)==="fail"&&!i(V)),J(bt,"style",`background:${i(ae)??""}`),L(bt,"pulse",i(N)>0),J(wt,"style",`color:${i(ae)??""}`),K(Ms,i(be)),L(Ue,"open",i(ce)),L(Ue,"has-remote",!!i(x)),K(Ks,i(x)?i(x).title:Pn),L(zs,"open",i(ce)),At.disabled=i(B).workers<=ps,K(Gs,i(B).workers),as.disabled=i(B).workers>=fs,L(Me,"open",i(Y)),K(Js,i(Re).label),L(Xs,"open",i(Y)),Ve.disabled=i(se)||i(x)&&((T=i(x).tags)==null?void 0:T.length)===0,J(Ve,"title",i(x)&&((c=i(x).tags)==null?void 0:c.length)===0?In:void 0),J(Ze,"aria-label",a),L(nn,"flipped",_())},[()=>$n(_())],re),U("click",Ue,()=>{E(ce,!i(ce))}),U("click",At,()=>Zt(-1)),U("click",as,()=>Zt(1)),U("click",Me,()=>{E(Y,!i(Y))}),U("click",Ve,xe),U("click",Ze,()=>Be.update(a=>!a)),w(n,ts),ht(),s()}function Hi(n,{from:e,to:t},s={}){var{delay:r=0,duration:o=Y=>Math.sqrt(Y)*120,easing:l=hr}=s,_=getComputedStyle(n),m=_.transform==="none"?"":_.transform,[B,A]=_.transformOrigin.split(" ").map(parseFloat);B/=n.clientWidth,A/=n.clientHeight;var N=Ki(n),q=n.clientWidth/t.width/N,V=n.clientHeight/t.height/N,ae=e.left+e.width*B,be=e.top+e.height*A,Re=t.left+t.width*B,te=t.top+t.height*A,H=(ae-Re)*q,Q=(be-te)*V,x=e.width/t.width,se=e.height/t.height;return{delay:r,duration:typeof o=="function"?o(Math.sqrt(H*H+Q*Q)):o,easing:l,css:(Y,Z)=>{var ce=Z*H,he=Z*Q,D=Y+Z*x,O=Y+Z*se;return`transform: ${m} translate(${ce}px, ${he}px) scale(${D}, ${O});`}}}function Ki(n){if("currentCSSZoom"in n)return n.currentCSSZoom;for(var e=n,t=1;e!==null;)t*=+getComputedStyle(e).zoom,e=e.parentElement;return t}var zi=R('<div class="card svelte-19gnuo1"><div class="row svelte-19gnuo1"><span></span> <span class="msg svelte-19gnuo1"> </span> <button class="link svelte-19gnuo1"><svg width="12" height="12" viewBox="0 0 14 14" fill="none"><path d="M1 1l12 12M13 1L1 13" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path></svg></button></div></div>'),Yi=R('<div class="stack svelte-19gnuo1"></div>');function ji(n,e){lt(e,!1);const[t,s]=ut(),r=()=>ge(dr,"$notifications",t);ct();var o=Yi();Oe(o,13,r,l=>l.id,(l,_)=>{var m=zi(),B=v(m),A=v(B),N=h(A,2),q=v(N,!0);p(N);var V=h(N,2);J(V,"aria-label",sr),p(B),p(m),M(()=>{un(A,`dot ${i(_).type??""} svelte-19gnuo1`),K(q,i(_).message)}),U("click",V,()=>ur(i(_).id)),dn(m,()=>Hi,()=>({duration:180})),Ce(3,m,()=>Pe,()=>({y:12,duration:200})),w(l,m)}),p(o),w(n,o),ht(),s()}var Gi=R("<!> <!> <!> <!>",1),Ji=R('<div class="boot-loading svelte-3qbr79">Loading…</div>');function bo(n,e){lt(e,!1);const[t,s]=ut(),r=()=>ge(xs,"$page",t),o=()=>ge(As,"$auth",t),l=["/login","/setup"];let _=I(!1);Yt(async()=>{const q=r().url.pathname;if(l.includes(q)){E(_,!0);return}if(o().token){E(_,!0);return}try{const ae=await pr();await us(ae?"/setup":"/login")}catch{await us("/login")}finally{E(_,!0)}}),ct();var m=Ie(),B=ee(m);{var A=q=>{var V=Ie(),ae=ee(V);{var be=te=>{var H=Ie(),Q=ee(H);Mt(Q,e,"default",{},null),w(te,H)},Re=te=>{var H=Gi(),Q=ee(H);Rr(Q,{});var x=h(Q,2);Ar(x,{children:(Z,ce)=>{var he=Ie(),D=ee(he);Mt(D,e,"default",{},null),w(Z,he)},$$slots:{default:!0}});var se=h(x,2);Wi(se,{});var Y=h(se,2);ji(Y,{}),w(te,H)};P(ae,te=>{r().url.pathname==="/login"||r().url.pathname==="/setup"?te(be):te(Re,!1)})}w(q,V)},N=q=>{var V=Ji();w(q,V)};P(B,q=>{i(_)?q(A):q(N,!1)})}w(n,m),ht(),s()}export{bo as component,mo as universal};
|
|
Binary file
|
|
Binary file
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Licensed under the MIT License. See LICENSE file in the project root for details.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import{a as g,t as h,s}from"../chunks/6VDMVB5U.js";import{i as d}from"../chunks/CtgCYzu5.js";import{p as l,f as v,t as x,c as _,d as o,k as p,j as k}from"../chunks/BIf7lHIm.js";import{s as $,p as i}from"../chunks/
|
|
6
|
+
import{a as g,t as h,s}from"../chunks/6VDMVB5U.js";import{i as d}from"../chunks/CtgCYzu5.js";import{p as l,f as v,t as x,c as _,d as o,k as p,j as k}from"../chunks/BIf7lHIm.js";import{s as $,p as i}from"../chunks/7z7jeLBz.js";const b={get error(){return i.error},get status(){return i.status}};$.updated.check;const m=b;var j=h("<h1> </h1> <p> </p>",1);function z(c,n){l(n,!1),d();var r=j(),t=v(r),f=o(t,!0);p(t);var e=k(t,2),u=o(e,!0);p(e),x(()=>{var a;s(f,m.status),s(u,(a=m.error)==null?void 0:a.message)}),g(c,r),_()}export{z as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Licensed under the MIT License. See LICENSE file in the project root for details.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import{h as $a,e as oe,a as i,t as _,c as _e,s as v,r as Aa,b as ke}from"../chunks/6VDMVB5U.js";import{i as Sa}from"../chunks/CtgCYzu5.js";import{p as wa,m as f,o as Ca,s as n,l as Fe,b as Ia,f as Y,t as I,g as e,c as Ra,d as s,j as r,$ as ka,k as a,n as Le,v as Da,x as ve,y as De}from"../chunks/BIf7lHIm.js";import{i as y,s as Ma,a as Oa}from"../chunks/D_thT6pZ.js";import{e as he,i as ut,t as Ke,a as pt,f as mt,s as je}from"../chunks/BTV7EXZb.js";import{s as D,r as gt,C as Nt,b as Ba,S as Pa,e as Na,c as Ua,d as Ut,L as Ht,R as ze}from"../chunks/C4Z3p6jE.js";import{b as Ze}from"../chunks/BnXsGCy3.js";import{B as Me,b as Ha}from"../chunks/qvxlSGpD.js";import{f as Va,a as Fa,s as Vt,d as ja,b as Ga,c as Ya,e as Wa,g as qa,h as Ja}from"../chunks/B74j8LrV.js";import{a as Qa}from"../chunks/CXQhSK1T.js";import{E as Xa}from"../chunks/zXSLr47H.js";import{H as Ka,a as za,S as Za,R as es,F as ts,P as as,D as Ft,b as ss,c as rs,N as ns,d as is,e as ls,f as os,g as vs,h as ds,i as cs,j as _s,T as us,k as ps,l as ms,m as gs,s as hs,n as fs,r as Es,o as ys,p as bs,q as xs,t as Ls,u as Ts,v as $s,w as As,x as Ss,y as ws,E as jt,I as Cs,z as Is,A as Rs,B as ks,C as Ds,G as Gt,J as et,K as tt,L as Ms,M as Os,O as Yt,Q as Wt,U as Bs,V as Ps,W as Ns,X as Us}from"../chunks/DFZtPGTY.js";import{r as qt}from"../chunks/htkwR9b-.js";import{P as Jt}from"../chunks/prk8PJfA.js";import{E as ht}from"../chunks/CNpD-yNH.js";import{C as Qt}from"../chunks/BWGoOYU0.js";import{M as Xt}from"../chunks/CUPWZLIN.js";import{n as de}from"../chunks/BDb8hZHu.js";var Hs=_("Delete <strong> </strong>? This cannot be undone.",1),Vs=_(" <strong> </strong> ",1),Fs=_("<option> </option>"),js=_('<p class="form-error svelte-g440mn"> </p>'),Gs=_('<div class="form-fields svelte-g440mn"><div class="field"><label class="field-label" for="suite-name"></label> <input id="suite-name" type="text" class="field-input"></div> <div class="field"><label class="field-label" for="suite-desc"></label> <textarea id="suite-desc" class="field-input field-textarea svelte-g440mn" rows="3"></textarea></div> <div class="field"><label class="field-label" for="suite-prio"></label> <select id="suite-prio" class="field-input"></select></div> <!> <div class="modal-actions svelte-g440mn"><!> <!></div></div>'),Ys=_('<p class="form-error svelte-g440mn"> </p>'),Ws=_('<div class="form-fields svelte-g440mn"><div class="field"><label class="field-label" for="run-title"></label> <input id="run-title" type="text" class="field-input"></div> <!> <div class="modal-actions svelte-g440mn"><!> <!></div></div>'),qs=_('<a class="import-link svelte-g440mn"></a>'),Js=_("<!> <!> <!>",1),Qs=_('<button class="search-clear svelte-g440mn"><svg width="12" height="12" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M1 1l12 12M13 1L1 13"></path></svg></button>'),Xs=_('<span class="sort-dir svelte-g440mn"> </span>'),Ks=_('<button class="sort-chip svelte-g440mn"> <!></button>'),zs=_('<span class="sort-dir svelte-g440mn"> </span>'),Zs=_('<button class="sort-chip svelte-g440mn"> <!></button>'),er=_('<div class="sort-bar svelte-g440mn"><span class="sort-label svelte-g440mn"></span> <!></div>'),tr=_('<div class="loading-row svelte-g440mn"></div>'),ar=_('<div class="loading-row svelte-g440mn"></div>'),sr=_('<span class="auto-badge svelte-g440mn"></span>'),rr=_('<a class="case-result-row svelte-g440mn"><span class="id-chip small svelte-g440mn"> </span> <span class="case-result-title svelte-g440mn"> </span> <!> <span> </span> <span class="case-result-suite svelte-g440mn"> </span></a>'),nr=_('<div class="search-section svelte-g440mn"><h2 class="search-section-title svelte-g440mn"> <span class="tab-count svelte-g440mn"> </span></h2> <div class="case-results svelte-g440mn"></div></div>'),ir=_('<p class="suite-desc svelte-g440mn"> </p>'),lr=_('<div class="suite-card svelte-g440mn"><a class="card-link svelte-g440mn"></a> <div class="suite-card-header svelte-g440mn"><span class="id-chip svelte-g440mn"> </span> <span> </span> <div class="suite-card-actions svelte-g440mn"><button class="icon-btn danger svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6M14 11v6"></path><path d="M9 6V4h6v2"></path></svg></button></div></div> <h3 class="suite-name svelte-g440mn"> </h3> <!> <div class="suite-meta svelte-g440mn"><span class="meta-item svelte-g440mn"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2"></path></svg> </span> <span class="meta-item svelte-g440mn"> </span></div></div>'),or=_('<div class="search-section svelte-g440mn"><h2 class="search-section-title svelte-g440mn"> <span class="tab-count svelte-g440mn"> </span></h2> <div class="suite-grid svelte-g440mn"></div></div>'),vr=_('<div class="run-row svelte-g440mn"><a class="card-link svelte-g440mn"></a> <div class="run-row-main svelte-g440mn"><span></span> <span class="run-title svelte-g440mn"> </span> <span class="run-count svelte-g440mn"> </span></div> <div class="run-meta svelte-g440mn"><span class="run-status-label svelte-g440mn"> </span> <span class="meta-sep svelte-g440mn">·</span> <span> </span> <span class="meta-sep svelte-g440mn">·</span> <span> </span></div> <div class="run-row-actions svelte-g440mn"><button class="icon-btn svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></button> <button class="icon-btn danger svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6M14 11v6"></path><path d="M9 6V4h6v2"></path></svg></button></div></div>'),dr=_('<div class="search-section svelte-g440mn"><h2 class="search-section-title svelte-g440mn">Runs <span class="tab-count svelte-g440mn"> </span></h2> <div class="runs-list svelte-g440mn"></div></div>'),cr=_("<!> <!> <!>",1),_r=_("<div><!></div>"),ur=_('<div class="loading-row svelte-g440mn"></div>'),pr=_('<p class="suite-desc svelte-g440mn"> </p>'),mr=_('<div class="suite-card svelte-g440mn"><a class="card-link svelte-g440mn"></a> <div class="suite-card-header svelte-g440mn"><span class="id-chip svelte-g440mn"> </span> <span> </span> <div class="suite-card-actions svelte-g440mn"><button class="icon-btn danger svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6M14 11v6"></path><path d="M9 6V4h6v2"></path></svg></button></div></div> <h3 class="suite-name svelte-g440mn"> </h3> <!> <div class="suite-meta svelte-g440mn"><span class="meta-item svelte-g440mn"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2"></path></svg> </span> <span class="meta-item svelte-g440mn"> </span></div></div>'),gr=_('<div class="pagination-row svelte-g440mn"><!></div>'),hr=_('<div class="suite-grid svelte-g440mn"></div> <!>',1),fr=_("<div><!></div>"),Er=_('<div class="loading-row svelte-g440mn"></div>'),yr=_('<div class="run-row svelte-g440mn"><a class="card-link svelte-g440mn"></a> <div class="run-row-main svelte-g440mn"><span></span> <span class="run-title svelte-g440mn"> </span> <span class="run-count svelte-g440mn"> </span></div> <div class="run-meta svelte-g440mn"><span class="run-status-label svelte-g440mn"> </span> <span class="meta-sep svelte-g440mn">·</span> <span> </span> <span class="meta-sep svelte-g440mn">·</span> <span> </span></div> <div class="run-row-actions svelte-g440mn"><button class="icon-btn svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></button> <button class="icon-btn danger svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6M14 11v6"></path><path d="M9 6V4h6v2"></path></svg></button></div></div>'),br=_('<div class="pagination-row svelte-g440mn"><!></div>'),xr=_('<div class="runs-list svelte-g440mn"></div> <!>',1),Lr=_("<div><!></div>"),Tr=_('<!> <!> <!> <!> <div class="page-header svelte-g440mn"><div class="header-text svelte-g440mn"><h1 class="svelte-g440mn"></h1> <p class="header-desc svelte-g440mn"></p></div> <div class="header-actions svelte-g440mn"><!></div></div> <div class="tabs svelte-g440mn"><button class="tab svelte-g440mn"> <span class="tab-count svelte-g440mn"> </span></button> <button class="tab svelte-g440mn"> <span class="tab-count svelte-g440mn"> </span></button></div> <div class="search-bar svelte-g440mn"><svg class="search-icon svelte-g440mn" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg> <input type="search" class="search-input svelte-g440mn"> <!></div> <!> <!>',1);function jr(Kt,zt){wa(zt,!1);const[Zt,ea]=Ma(),ta=()=>Oa(Qa,"$auth",Zt),ue=f(),Oe=f(),Te=f(),$e=f();let Ae=f(typeof sessionStorage<"u"&&sessionStorage.getItem("plum:repo:tab")||"suites");function ft(t){n(Ae,t);try{sessionStorage.setItem("plum:repo:tab",t)}catch{}}function Et(t,l){try{const d=sessionStorage.getItem(t);if(d)return JSON.parse(d)}catch{}return l}function yt(t,l){try{sessionStorage.setItem(t,JSON.stringify(l))}catch{}}let fe=f([]),pe=f(0),bt=f(1),K=f(Et("plum:repo:suites:sort",{by:"createdAt",order:"desc"})),ce=f([]),me=f(0),xt=f(1),re=f(Et("plum:repo:runs:sort",{by:"createdAt",order:"desc"}));const Lt={Critical:0,High:1,Medium:2,Low:3};function aa(t,l){return[...t].sort((d,$)=>{const k=(Lt[d.priority]??4)-(Lt[$.priority]??4);return l==="asc"?k:-k})}let at=f(!0),ne=f(null),Ge=f(!1),st=f(null),Be=f(!1),z=f({name:"",description:"",priority:"Medium"}),Ye=f(!1),Se=f(""),Pe=f(!1),we=f({title:""}),We=f(!1),Ce=f(""),q=f(null),ge=f(!1),Ie=f(null),qe=f(!1),Ee=f("");const sa=["Critical","High","Medium","Low"];let rt=f(!1);async function ra(t){n(rt,!0);try{await Ja("all",null,t),de("success",Na(jt))}catch{de("error",Ua(jt.toLowerCase()))}finally{n(rt,!1)}}async function nt(t=1){const l=e(K).by==="priority",d=await Va({page:t,sortBy:l?"createdAt":e(K).by,sortOrder:e(K).order});n(fe,l?aa(d.suites,e(K).order):d.suites),n(pe,d.total),n(bt,t)}async function it(t=1){const l=await Fa({page:t,sortBy:e(re).by,sortOrder:e(re).order});n(ce,l.runs),n(me,l.total),n(xt,t)}async function na(t){e(K).by===t?De(K,e(K).order=e(K).order==="asc"?"desc":"asc"):n(K,{by:t,order:t==="createdAt"?"desc":"asc"}),yt("plum:repo:suites:sort",e(K)),await nt(1)}async function ia(t){e(re).by===t?De(re,e(re).order=e(re).order==="asc"?"desc":"asc"):n(re,{by:t,order:t==="createdAt"||t==="updatedAt"?"desc":"asc"}),yt("plum:repo:runs:sort",e(re)),await it(1)}Ca(async()=>{try{await Promise.all([nt(1),it(1)])}catch{de("error",ts)}finally{n(at,!1)}});async function la(){if(!e(z).name.trim()){n(Se,Ts);return}n(Se,""),n(Ye,!0);try{const t=await Wa(e(z));n(fe,[...e(fe),t]),n(pe,e(pe)+1),n(Be,!1),n(z,{name:"",description:"",priority:"Medium"}),de("success",$s(t.name))}catch(t){n(Se,t.message)}finally{n(Ye,!1)}}async function oa(t,l){try{await ja(t),n(fe,e(fe).filter(d=>d.id!==t)),n(pe,e(pe)-1),de("success",hs(l))}catch{de("error",fs)}n(q,null),n(ge,!1)}async function va(){if(!e(we).title.trim()){n(Ce,As);return}n(Ce,""),n(We,!0);try{const t=await qa({title:e(we).title,caseIds:[]});n(ce,[t,...e(ce)]),n(Pe,!1),n(we,{title:""}),window.location.href=`/test-repository/runs/${t.id}`}catch(t){n(Ce,t.message)}finally{n(We,!1)}}async function Tt(t){n(Ie,t),n(qe,!0)}async function da(){if(!e(Ie))return;const t=e(Ie);n(Ie,null),n(qe,!1);try{const l=await Ya(t.id);n(ce,[l,...e(ce)]),n(me,e(me)+1),qt.update(d=>d+1),de("success",xs(l.title))}catch{de("error",Ls)}}async function ca(t,l){try{await Ga(t),n(ce,e(ce).filter(d=>d.id!==t)),n(me,e(me)-1),qt.update(d=>d+1),de("success",Es(l))}catch{de("error",ys)}n(q,null),n(ge,!1)}function lt(t){return(t==null?void 0:t.toLowerCase())??"medium"}function $t(t){return t==="complete"?"pass":t==="in-progress"?"warn":"muted"}Fe(()=>e(Ee),()=>{n(ue,e(Ee).trim())}),Fe(()=>(e(st),e(ue),Vt),()=>{clearTimeout(e(st)),e(ue)?(n(Ge,!0),n(ne,null),n(st,setTimeout(async()=>{try{n(ne,await Vt(e(ue)))}catch{n(ne,{suites:[],cases:[],runs:[]})}finally{n(Ge,!1)}},300))):(n(ne,null),n(Ge,!1))}),Fe(()=>e(ne),()=>{var t;n(Oe,((t=e(ne))==null?void 0:t.cases)??[])}),Fe(()=>e(ne),()=>{var t;n(Te,((t=e(ne))==null?void 0:t.suites)??[])}),Fe(()=>e(ne),()=>{var t;n($e,((t=e(ne))==null?void 0:t.runs)??[])}),Ia(),Sa();var At=Tr();$a(t=>{ka.title=as});var St=Y(At);const _a=ve(()=>{var t;return bs((t=e(q))==null?void 0:t.type)});Qt(St,{get title(){return e(_a)},get open(){return e(ge)},set open(t){n(ge,t)},$$events:{confirm:()=>{var t;return((t=e(q))==null?void 0:t.type)==="suite"?oa(e(q).id,e(q).name):ca(e(q).id,e(q).name)}},children:(t,l)=>{var d=_e(),$=Y(d);{var k=m=>{var o=Hs(),E=r(Y(o)),T=s(E);a(E),Le(),I(()=>v(T,`"${e(q).name??""}"`)),i(m,o)};y($,m=>{e(q)&&m(k)})}i(t,d)},$$slots:{default:!0},$$legacy:!0});var wt=r(St,2);Qt(wt,{title:ss,confirmLabel:Ft,get open(){return e(qe)},set open(t){n(qe,t)},$$events:{confirm:da},children:(t,l)=>{var d=_e(),$=Y(d);{var k=m=>{var o=Vs(),E=Y(o);E.nodeValue=`${Ft} `;var T=r(E),M=s(T);a(T);var g=r(T,1,!0);g.nodeValue=rs,I(()=>v(M,`"${e(Ie).title??""}"`)),i(m,o)};y($,m=>{e(Ie)&&m(k)})}i(t,d)},$$slots:{default:!0},$$legacy:!0});var Ct=r(wt,2);Xt(Ct,{title:ns,get open(){return e(Be)},set open(t){n(Be,t)},children:(t,l)=>{var d=Gs(),$=s(d),k=s($);k.textContent=is;var m=r(k,2);gt(m),D(m,"placeholder",ls),a($);var o=r($,2),E=s(o);E.textContent=os;var T=r(E,2);Aa(T),D(T,"placeholder",vs),a(o);var M=r(o,2),g=s(M);g.textContent=ds;var c=r(g,2);I(()=>{e(z),Da(()=>{})}),he(c,5,()=>sa,ut,(p,A)=>{var S=Fs(),R={},u=s(S,!0);a(S),I(()=>{R!==(R=e(A))&&(S.value=(S.__value=e(A))==null?"":e(A)),v(u,e(A))}),i(p,S)}),a(c),a(M);var O=r(M,2);{var b=p=>{var A=js(),S=s(A,!0);a(A),I(()=>v(S,e(Se))),i(p,A)};y(O,p=>{e(Se)&&p(b)})}var U=r(O,2),x=s(U);Me(x,{get disabled(){return e(Ye)},$$events:{click:la},children:(p,A)=>{Le();var S=ke();I(R=>v(S,R),[()=>cs(e(Ye))],ve),i(p,S)},$$slots:{default:!0}});var H=r(x,2);Me(H,{variant:"ghost",$$events:{click:()=>{n(Be,!1),n(Se,"")}},children:(p,A)=>{Le();var S=ke();S.nodeValue=Nt,i(p,S)},$$slots:{default:!0}}),a(U),a(d),Ze(m,()=>e(z).name,p=>De(z,e(z).name=p)),Ze(T,()=>e(z).description,p=>De(z,e(z).description=p)),Ha(c,()=>e(z).priority,p=>De(z,e(z).priority=p)),i(t,d)},$$slots:{default:!0},$$legacy:!0});var It=r(Ct,2);Xt(It,{title:_s,get open(){return e(Pe)},set open(t){n(Pe,t)},children:(t,l)=>{var d=Ws(),$=s(d),k=s($);k.textContent=us;var m=r(k,2);gt(m),D(m,"placeholder",ps),a($);var o=r($,2);{var E=c=>{var O=Ys(),b=s(O,!0);a(O),I(()=>v(b,e(Ce))),i(c,O)};y(o,c=>{e(Ce)&&c(E)})}var T=r(o,2),M=s(T);Me(M,{get disabled(){return e(We)},$$events:{click:va},children:(c,O)=>{Le();var b=ke();I(U=>v(b,U),[()=>ms(e(We))],ve),i(c,b)},$$slots:{default:!0}});var g=r(M,2);Me(g,{variant:"ghost",$$events:{click:()=>{n(Pe,!1),n(Ce,"")}},children:(c,O)=>{Le();var b=ke();b.nodeValue=Nt,i(c,b)},$$slots:{default:!0}}),a(T),a(d),Ze(m,()=>e(we).title,c=>De(we,e(we).title=c)),i(t,d)},$$slots:{default:!0},$$legacy:!0});var ot=r(It,2),vt=s(ot),Rt=s(vt);Rt.textContent=Ka;var ua=r(Rt,2);ua.textContent=za,a(vt);var kt=r(vt,2),pa=s(kt);{var ma=t=>{var l=Js(),d=Y(l);{var $=o=>{var E=qs();D(E,"href",Cs),E.textContent=Is,i(o,E)};y(d,o=>{var E;((E=ta().user)==null?void 0:E.role)==="admin"&&o($)})}var k=r(d,2);Xa(k,{get busy(){return e(rt)},$$events:{select:o=>ra(o.detail)}});var m=r(k,2);Me(m,{$$events:{click:()=>n(Be,!0)},children:(o,E)=>{Le();var T=ke();T.nodeValue=Ss,i(o,T)},$$slots:{default:!0}}),i(t,l)},ga=t=>{Me(t,{$$events:{click:()=>n(Pe,!0)},children:(l,d)=>{Le();var $=ke();$.nodeValue=ws,i(l,$)},$$slots:{default:!0}})};y(pa,t=>{e(Ae)==="suites"?t(ma):t(ga,!1)})}a(kt),a(ot);var dt=r(ot,2),Ne=s(dt),Dt=s(Ne);Dt.nodeValue=`${Za} `;var Mt=r(Dt),ha=s(Mt);a(Mt),a(Ne);var Je=r(Ne,2),Ot=s(Je);Ot.nodeValue=`${es} `;var Bt=r(Ot),fa=s(Bt);a(Bt),a(Je),a(dt);var ct=r(dt,2),Qe=r(s(ct),2);gt(Qe),D(Qe,"placeholder",gs);var Ea=r(Qe,2);{var ya=t=>{var l=Qs();D(l,"aria-label",Ba),oe("click",l,()=>n(Ee,"")),i(t,l)};y(Ea,t=>{e(Ee)&&t(ya)})}a(ct);var Pt=r(ct,2);{var ba=t=>{var l=er(),d=s(l);d.textContent=Pa;var $=r(d,2);{var k=o=>{var E=_e(),T=Y(E);he(T,0,()=>[["createdAt","Date Created"],["displayId","ID"],["name","Name"],["priority","Priority"]],ut,(M,g)=>{let c=()=>g[0],O=()=>g[1];var b=Ks(),U=s(b),x=r(U);{var H=p=>{var A=Xs(),S=s(A,!0);a(A),I(()=>v(S,e(K).order==="asc"?"↑":"↓")),i(p,A)};y(x,p=>{e(K).by===c()&&p(H)})}a(b),I(()=>{Ke(b,"active",e(K).by===c()),v(U,`${O()??""} `)}),oe("click",b,()=>na(c())),i(M,b)}),i(o,E)},m=o=>{var E=_e(),T=Y(E);he(T,0,()=>[["createdAt","Date Created"],["updatedAt","Last Updated"],["title","Name"]],ut,(M,g)=>{let c=()=>g[0],O=()=>g[1];var b=Zs(),U=s(b),x=r(U);{var H=p=>{var A=zs(),S=s(A,!0);a(A),I(()=>v(S,e(re).order==="asc"?"↑":"↓")),i(p,A)};y(x,p=>{e(re).by===c()&&p(H)})}a(b),I(()=>{Ke(b,"active",e(re).by===c()),v(U,`${O()??""} `)}),oe("click",b,()=>ia(c())),i(M,b)}),i(o,E)};y($,o=>{e(Ae)==="suites"?o(k):o(m,!1)})}a(l),i(t,l)};y(Pt,t=>{e(ue)||t(ba)})}var xa=r(Pt,2);{var La=t=>{var l=_r(),d=s(l);{var $=m=>{var o=tr();o.textContent=Ut,i(m,o)},k=m=>{var o=_e(),E=Y(o);{var T=g=>{var c=ar();c.textContent=Ut,i(g,c)},M=g=>{var c=_e(),O=Y(c);{var b=x=>{const H=ve(()=>Bs(e(Ee)));ht(x,{title:Rs,get description(){return e(H)}})},U=x=>{var H=cr(),p=Y(H);{var A=w=>{var C=nr(),B=s(C),J=s(B);J.nodeValue=`${Ps} `;var Q=r(J),ie=s(Q,!0);a(Q),a(B);var X=r(B,2);he(X,5,()=>e(Oe),L=>L.id,(L,h)=>{var V=rr(),P=s(V),te=s(P,!0);a(P);var N=r(P,2),le=s(N,!0);a(N);var W=r(N,2);{var ae=se=>{var ye=sr();ye.textContent=Ns,i(se,ye)};y(W,se=>{e(h).isAutomated&&se(ae)})}var F=r(W,2),j=s(F,!0);a(F);var G=r(F,2),ee=s(G);a(G),a(V),I(se=>{D(V,"href",`/test-repository/suites/${e(h).suite.id??""}`),v(te,e(h).displayId),v(le,e(h).title),je(F,`priority-badge small ${se??""} svelte-g440mn`),v(j,e(h).priority),v(ee,`${e(h).suite.displayId??""} · ${e(h).suite.name??""}`)},[()=>lt(e(h).priority)],ve),i(L,V)}),a(X),a(C),I(()=>v(ie,e(Oe).length)),i(w,C)};y(p,w=>{e(Oe).length>0&&w(A)})}var S=r(p,2);{var R=w=>{var C=or(),B=s(C),J=s(B);J.nodeValue=`${Us} `;var Q=r(J),ie=s(Q,!0);a(Q),a(B);var X=r(B,2);he(X,5,()=>e(Te),L=>L.id,(L,h)=>{var V=lr(),P=s(V),te=r(P,2),N=s(te),le=s(N,!0);a(N);var W=r(N,2),ae=s(W,!0);a(W);var F=r(W,2),j=s(F);D(j,"title",Gt),a(F),a(te);var G=r(te,2),ee=s(G,!0);a(G);var se=r(G,2);{var ye=be=>{var xe=ir(),Ve=s(xe,!0);a(xe),I(()=>v(Ve,e(h).description)),i(be,xe)};y(se,be=>{e(h).description&&be(ye)})}var Xe=r(se,2),Re=s(Xe),Ue=r(s(Re));a(Re);var He=r(Re,2),_t=s(He,!0);a(He),a(Xe),a(V),I((be,xe,Ve)=>{D(P,"href",`/test-repository/suites/${e(h).id??""}`),D(P,"aria-label",e(h).name),v(le,e(h).displayId),je(W,`priority-badge ${be??""} svelte-g440mn`),v(ae,e(h).priority),v(ee,e(h).name),v(Ue,` ${xe??""}`),v(_t,Ve)},[()=>lt(e(h).priority),()=>et(e(h)._count.cases),()=>tt(e(h).createdBy.name)],ve),oe("click",j,()=>{n(q,{type:"suite",id:e(h).id,name:e(h).name}),n(ge,!0)}),i(L,V)}),a(X),a(C),I(()=>v(ie,e(Te).length)),i(w,C)};y(S,w=>{e(Te).length>0&&w(R)})}var u=r(S,2);{var Z=w=>{var C=dr(),B=s(C),J=r(s(B)),Q=s(J,!0);a(J),a(B);var ie=r(B,2);he(ie,5,()=>e($e),X=>X.id,(X,L)=>{var h=vr(),V=s(h),P=r(V,2),te=s(P),N=r(te,2),le=s(N,!0);a(N);var W=r(N,2),ae=s(W,!0);a(W),a(P);var F=r(P,2),j=s(F),G=s(j,!0);a(j);var ee=r(j,4),se=s(ee,!0);a(ee);var ye=r(ee,4),Xe=s(ye,!0);a(ye),a(F);var Re=r(F,2),Ue=s(Re);D(Ue,"title",Yt);var He=r(Ue,2);D(He,"title",Wt),a(Re),a(h),I((_t,be,xe,Ve)=>{D(V,"href",`/test-repository/runs/${e(L).id??""}`),D(V,"aria-label",e(L).title),je(te,`run-status-dot ${_t??""} svelte-g440mn`),v(le,e(L).title),v(ae,be),v(G,e(L).status),v(se,xe),v(Xe,Ve)},[()=>$t(e(L).status),()=>et(e(L)._count.entries),()=>tt(e(L).createdBy.name),()=>new Date(e(L).createdAt).toLocaleDateString()],ve),oe("click",Ue,()=>Tt(e(L))),oe("click",He,()=>{n(q,{type:"run",id:e(L).id,name:e(L).title}),n(ge,!0)}),i(X,h)}),a(ie),a(C),I(()=>v(Q,e($e).length)),i(w,C)};y(u,w=>{e($e).length>0&&w(Z)})}i(x,H)};y(O,x=>{e(Oe).length===0&&e(Te).length===0&&e($e).length===0?x(b):x(U,!1)},!0)}i(g,c)};y(E,g=>{e(ne)?g(M,!1):g(T)},!0)}i(m,o)};y(d,m=>{e(Ge)?m($):m(k,!1)})}a(l),pt(3,l,()=>mt,()=>({y:4,duration:160})),i(t,l)},Ta=t=>{var l=_e(),d=Y(l);{var $=m=>{var o=fr(),E=s(o);{var T=g=>{var c=ur();c.textContent=Ht,i(g,c)},M=g=>{var c=_e(),O=Y(c);{var b=x=>{ht(x,{title:Ds,description:ks})},U=x=>{var H=hr(),p=Y(H);he(p,5,()=>e(fe),R=>R.id,(R,u)=>{var Z=mr(),w=s(Z),C=r(w,2),B=s(C),J=s(B,!0);a(B);var Q=r(B,2),ie=s(Q,!0);a(Q);var X=r(Q,2),L=s(X);D(L,"title",Gt),a(X),a(C);var h=r(C,2),V=s(h,!0);a(h);var P=r(h,2);{var te=j=>{var G=pr(),ee=s(G,!0);a(G),I(()=>v(ee,e(u).description)),i(j,G)};y(P,j=>{e(u).description&&j(te)})}var N=r(P,2),le=s(N),W=r(s(le));a(le);var ae=r(le,2),F=s(ae,!0);a(ae),a(N),a(Z),I((j,G,ee)=>{D(w,"href",`/test-repository/suites/${e(u).id??""}`),D(w,"aria-label",e(u).name),v(J,e(u).displayId),je(Q,`priority-badge ${j??""} svelte-g440mn`),v(ie,e(u).priority),v(V,e(u).name),v(W,` ${G??""}`),v(F,ee)},[()=>lt(e(u).priority),()=>et(e(u)._count.cases),()=>tt(e(u).createdBy.name)],ve),oe("click",L,()=>{n(q,{type:"suite",id:e(u).id,name:e(u).name}),n(ge,!0)}),i(R,Z)}),a(p);var A=r(p,2);{var S=R=>{var u=gr(),Z=s(u);const w=ve(()=>Math.ceil(e(pe)/ze));Jt(Z,{get current(){return e(bt)},get total(){return e(w)},$$events:{change:C=>nt(C.detail)}}),a(u),i(R,u)};y(A,R=>{Math.ceil(e(pe)/ze)>1&&R(S)})}i(x,H)};y(O,x=>{e(fe).length===0?x(b):x(U,!1)},!0)}i(g,c)};y(E,g=>{e(at)?g(T):g(M,!1)})}a(o),pt(3,o,()=>mt,()=>({y:4,duration:160})),i(m,o)},k=m=>{var o=Lr(),E=s(o);{var T=g=>{var c=Er();c.textContent=Ht,i(g,c)},M=g=>{var c=_e(),O=Y(c);{var b=x=>{ht(x,{title:Os,description:Ms})},U=x=>{var H=xr(),p=Y(H);he(p,5,()=>e(ce),R=>R.id,(R,u)=>{var Z=yr(),w=s(Z),C=r(w,2),B=s(C),J=r(B,2),Q=s(J,!0);a(J);var ie=r(J,2),X=s(ie,!0);a(ie),a(C);var L=r(C,2),h=s(L),V=s(h,!0);a(h);var P=r(h,4),te=s(P,!0);a(P);var N=r(P,4),le=s(N,!0);a(N),a(L);var W=r(L,2),ae=s(W);D(ae,"title",Yt);var F=r(ae,2);D(F,"title",Wt),a(W),a(Z),I((j,G,ee,se)=>{D(w,"href",`/test-repository/runs/${e(u).id??""}`),D(w,"aria-label",e(u).title),je(B,`run-status-dot ${j??""} svelte-g440mn`),v(Q,e(u).title),v(X,G),v(V,e(u).status),v(te,ee),v(le,se)},[()=>$t(e(u).status),()=>et(e(u)._count.entries),()=>tt(e(u).createdBy.name),()=>new Date(e(u).createdAt).toLocaleDateString()],ve),oe("click",ae,()=>Tt(e(u))),oe("click",F,()=>{n(q,{type:"run",id:e(u).id,name:e(u).title}),n(ge,!0)}),i(R,Z)}),a(p);var A=r(p,2);{var S=R=>{var u=br(),Z=s(u);const w=ve(()=>Math.ceil(e(me)/ze));Jt(Z,{get current(){return e(xt)},get total(){return e(w)},$$events:{change:C=>it(C.detail)}}),a(u),i(R,u)};y(A,R=>{Math.ceil(e(me)/ze)>1&&R(S)})}i(x,H)};y(O,x=>{e(ce).length===0?x(b):x(U,!1)},!0)}i(g,c)};y(E,g=>{e(at)?g(T):g(M,!1)})}a(o),pt(3,o,()=>mt,()=>({y:4,duration:160})),i(m,o)};y(d,m=>{e(Ae)==="suites"?m($):m(k,!1)},!0)}i(t,l)};y(xa,t=>{e(ue)?t(La):t(Ta,!1)})}I(()=>{Ke(Ne,"active",e(Ae)==="suites"),v(ha,`${(e(ue)?e(Te).length+"/":"")??""}${e(pe)??""}`),Ke(Je,"active",e(Ae)==="runs"),v(fa,`${(e(ue)?e($e).length+"/":"")??""}${e(me)??""}`)}),oe("click",Ne,()=>ft("suites")),oe("click",Je,()=>ft("runs")),Ze(Qe,()=>e(Ee),t=>n(Ee,t)),i(Kt,At),Ra(),ea()}export{jr as component};
|
|
6
|
+
import{h as $a,e as oe,a as i,t as _,c as _e,s as v,r as Aa,b as ke}from"../chunks/6VDMVB5U.js";import{i as Sa}from"../chunks/CtgCYzu5.js";import{p as wa,m as f,o as Ca,s as n,l as Fe,b as Ia,f as Y,t as I,g as e,c as Ra,d as s,j as r,$ as ka,k as a,n as Le,v as Da,x as ve,y as De}from"../chunks/BIf7lHIm.js";import{i as y,s as Ma,a as Oa}from"../chunks/D_thT6pZ.js";import{e as he,i as ut,t as Ke,a as pt,f as mt,s as je}from"../chunks/BTV7EXZb.js";import{s as D,r as gt,C as Nt,b as Ba,S as Pa,e as Na,c as Ua,d as Ut,L as Ht,R as ze}from"../chunks/C4Z3p6jE.js";import{b as Ze}from"../chunks/BnXsGCy3.js";import{B as Me,b as Ha}from"../chunks/qvxlSGpD.js";import{f as Va,a as Fa,s as Vt,d as ja,b as Ga,c as Ya,e as Wa,g as qa,h as Ja}from"../chunks/B74j8LrV.js";import{a as Qa}from"../chunks/CXQhSK1T.js";import{E as Xa}from"../chunks/zXSLr47H.js";import{H as Ka,a as za,S as Za,R as es,F as ts,P as as,D as Ft,b as ss,c as rs,N as ns,d as is,e as ls,f as os,g as vs,h as ds,i as cs,j as _s,T as us,k as ps,l as ms,m as gs,s as hs,n as fs,r as Es,o as ys,p as bs,q as xs,t as Ls,u as Ts,v as $s,w as As,x as Ss,y as ws,E as jt,I as Cs,z as Is,A as Rs,B as ks,C as Ds,G as Gt,J as et,K as tt,L as Ms,M as Os,O as Yt,Q as Wt,U as Bs,V as Ps,W as Ns,X as Us}from"../chunks/DFZtPGTY.js";import{r as qt}from"../chunks/DrfshNlX.js";import{P as Jt}from"../chunks/prk8PJfA.js";import{E as ht}from"../chunks/CNpD-yNH.js";import{C as Qt}from"../chunks/BWGoOYU0.js";import{M as Xt}from"../chunks/CUPWZLIN.js";import{n as de}from"../chunks/BDb8hZHu.js";var Hs=_("Delete <strong> </strong>? This cannot be undone.",1),Vs=_(" <strong> </strong> ",1),Fs=_("<option> </option>"),js=_('<p class="form-error svelte-g440mn"> </p>'),Gs=_('<div class="form-fields svelte-g440mn"><div class="field"><label class="field-label" for="suite-name"></label> <input id="suite-name" type="text" class="field-input"></div> <div class="field"><label class="field-label" for="suite-desc"></label> <textarea id="suite-desc" class="field-input field-textarea svelte-g440mn" rows="3"></textarea></div> <div class="field"><label class="field-label" for="suite-prio"></label> <select id="suite-prio" class="field-input"></select></div> <!> <div class="modal-actions svelte-g440mn"><!> <!></div></div>'),Ys=_('<p class="form-error svelte-g440mn"> </p>'),Ws=_('<div class="form-fields svelte-g440mn"><div class="field"><label class="field-label" for="run-title"></label> <input id="run-title" type="text" class="field-input"></div> <!> <div class="modal-actions svelte-g440mn"><!> <!></div></div>'),qs=_('<a class="import-link svelte-g440mn"></a>'),Js=_("<!> <!> <!>",1),Qs=_('<button class="search-clear svelte-g440mn"><svg width="12" height="12" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M1 1l12 12M13 1L1 13"></path></svg></button>'),Xs=_('<span class="sort-dir svelte-g440mn"> </span>'),Ks=_('<button class="sort-chip svelte-g440mn"> <!></button>'),zs=_('<span class="sort-dir svelte-g440mn"> </span>'),Zs=_('<button class="sort-chip svelte-g440mn"> <!></button>'),er=_('<div class="sort-bar svelte-g440mn"><span class="sort-label svelte-g440mn"></span> <!></div>'),tr=_('<div class="loading-row svelte-g440mn"></div>'),ar=_('<div class="loading-row svelte-g440mn"></div>'),sr=_('<span class="auto-badge svelte-g440mn"></span>'),rr=_('<a class="case-result-row svelte-g440mn"><span class="id-chip small svelte-g440mn"> </span> <span class="case-result-title svelte-g440mn"> </span> <!> <span> </span> <span class="case-result-suite svelte-g440mn"> </span></a>'),nr=_('<div class="search-section svelte-g440mn"><h2 class="search-section-title svelte-g440mn"> <span class="tab-count svelte-g440mn"> </span></h2> <div class="case-results svelte-g440mn"></div></div>'),ir=_('<p class="suite-desc svelte-g440mn"> </p>'),lr=_('<div class="suite-card svelte-g440mn"><a class="card-link svelte-g440mn"></a> <div class="suite-card-header svelte-g440mn"><span class="id-chip svelte-g440mn"> </span> <span> </span> <div class="suite-card-actions svelte-g440mn"><button class="icon-btn danger svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6M14 11v6"></path><path d="M9 6V4h6v2"></path></svg></button></div></div> <h3 class="suite-name svelte-g440mn"> </h3> <!> <div class="suite-meta svelte-g440mn"><span class="meta-item svelte-g440mn"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2"></path></svg> </span> <span class="meta-item svelte-g440mn"> </span></div></div>'),or=_('<div class="search-section svelte-g440mn"><h2 class="search-section-title svelte-g440mn"> <span class="tab-count svelte-g440mn"> </span></h2> <div class="suite-grid svelte-g440mn"></div></div>'),vr=_('<div class="run-row svelte-g440mn"><a class="card-link svelte-g440mn"></a> <div class="run-row-main svelte-g440mn"><span></span> <span class="run-title svelte-g440mn"> </span> <span class="run-count svelte-g440mn"> </span></div> <div class="run-meta svelte-g440mn"><span class="run-status-label svelte-g440mn"> </span> <span class="meta-sep svelte-g440mn">·</span> <span> </span> <span class="meta-sep svelte-g440mn">·</span> <span> </span></div> <div class="run-row-actions svelte-g440mn"><button class="icon-btn svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></button> <button class="icon-btn danger svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6M14 11v6"></path><path d="M9 6V4h6v2"></path></svg></button></div></div>'),dr=_('<div class="search-section svelte-g440mn"><h2 class="search-section-title svelte-g440mn">Runs <span class="tab-count svelte-g440mn"> </span></h2> <div class="runs-list svelte-g440mn"></div></div>'),cr=_("<!> <!> <!>",1),_r=_("<div><!></div>"),ur=_('<div class="loading-row svelte-g440mn"></div>'),pr=_('<p class="suite-desc svelte-g440mn"> </p>'),mr=_('<div class="suite-card svelte-g440mn"><a class="card-link svelte-g440mn"></a> <div class="suite-card-header svelte-g440mn"><span class="id-chip svelte-g440mn"> </span> <span> </span> <div class="suite-card-actions svelte-g440mn"><button class="icon-btn danger svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6M14 11v6"></path><path d="M9 6V4h6v2"></path></svg></button></div></div> <h3 class="suite-name svelte-g440mn"> </h3> <!> <div class="suite-meta svelte-g440mn"><span class="meta-item svelte-g440mn"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2"></path></svg> </span> <span class="meta-item svelte-g440mn"> </span></div></div>'),gr=_('<div class="pagination-row svelte-g440mn"><!></div>'),hr=_('<div class="suite-grid svelte-g440mn"></div> <!>',1),fr=_("<div><!></div>"),Er=_('<div class="loading-row svelte-g440mn"></div>'),yr=_('<div class="run-row svelte-g440mn"><a class="card-link svelte-g440mn"></a> <div class="run-row-main svelte-g440mn"><span></span> <span class="run-title svelte-g440mn"> </span> <span class="run-count svelte-g440mn"> </span></div> <div class="run-meta svelte-g440mn"><span class="run-status-label svelte-g440mn"> </span> <span class="meta-sep svelte-g440mn">·</span> <span> </span> <span class="meta-sep svelte-g440mn">·</span> <span> </span></div> <div class="run-row-actions svelte-g440mn"><button class="icon-btn svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></button> <button class="icon-btn danger svelte-g440mn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6M14 11v6"></path><path d="M9 6V4h6v2"></path></svg></button></div></div>'),br=_('<div class="pagination-row svelte-g440mn"><!></div>'),xr=_('<div class="runs-list svelte-g440mn"></div> <!>',1),Lr=_("<div><!></div>"),Tr=_('<!> <!> <!> <!> <div class="page-header svelte-g440mn"><div class="header-text svelte-g440mn"><h1 class="svelte-g440mn"></h1> <p class="header-desc svelte-g440mn"></p></div> <div class="header-actions svelte-g440mn"><!></div></div> <div class="tabs svelte-g440mn"><button class="tab svelte-g440mn"> <span class="tab-count svelte-g440mn"> </span></button> <button class="tab svelte-g440mn"> <span class="tab-count svelte-g440mn"> </span></button></div> <div class="search-bar svelte-g440mn"><svg class="search-icon svelte-g440mn" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg> <input type="search" class="search-input svelte-g440mn"> <!></div> <!> <!>',1);function jr(Kt,zt){wa(zt,!1);const[Zt,ea]=Ma(),ta=()=>Oa(Qa,"$auth",Zt),ue=f(),Oe=f(),Te=f(),$e=f();let Ae=f(typeof sessionStorage<"u"&&sessionStorage.getItem("plum:repo:tab")||"suites");function ft(t){n(Ae,t);try{sessionStorage.setItem("plum:repo:tab",t)}catch{}}function Et(t,l){try{const d=sessionStorage.getItem(t);if(d)return JSON.parse(d)}catch{}return l}function yt(t,l){try{sessionStorage.setItem(t,JSON.stringify(l))}catch{}}let fe=f([]),pe=f(0),bt=f(1),K=f(Et("plum:repo:suites:sort",{by:"createdAt",order:"desc"})),ce=f([]),me=f(0),xt=f(1),re=f(Et("plum:repo:runs:sort",{by:"createdAt",order:"desc"}));const Lt={Critical:0,High:1,Medium:2,Low:3};function aa(t,l){return[...t].sort((d,$)=>{const k=(Lt[d.priority]??4)-(Lt[$.priority]??4);return l==="asc"?k:-k})}let at=f(!0),ne=f(null),Ge=f(!1),st=f(null),Be=f(!1),z=f({name:"",description:"",priority:"Medium"}),Ye=f(!1),Se=f(""),Pe=f(!1),we=f({title:""}),We=f(!1),Ce=f(""),q=f(null),ge=f(!1),Ie=f(null),qe=f(!1),Ee=f("");const sa=["Critical","High","Medium","Low"];let rt=f(!1);async function ra(t){n(rt,!0);try{await Ja("all",null,t),de("success",Na(jt))}catch{de("error",Ua(jt.toLowerCase()))}finally{n(rt,!1)}}async function nt(t=1){const l=e(K).by==="priority",d=await Va({page:t,sortBy:l?"createdAt":e(K).by,sortOrder:e(K).order});n(fe,l?aa(d.suites,e(K).order):d.suites),n(pe,d.total),n(bt,t)}async function it(t=1){const l=await Fa({page:t,sortBy:e(re).by,sortOrder:e(re).order});n(ce,l.runs),n(me,l.total),n(xt,t)}async function na(t){e(K).by===t?De(K,e(K).order=e(K).order==="asc"?"desc":"asc"):n(K,{by:t,order:t==="createdAt"?"desc":"asc"}),yt("plum:repo:suites:sort",e(K)),await nt(1)}async function ia(t){e(re).by===t?De(re,e(re).order=e(re).order==="asc"?"desc":"asc"):n(re,{by:t,order:t==="createdAt"||t==="updatedAt"?"desc":"asc"}),yt("plum:repo:runs:sort",e(re)),await it(1)}Ca(async()=>{try{await Promise.all([nt(1),it(1)])}catch{de("error",ts)}finally{n(at,!1)}});async function la(){if(!e(z).name.trim()){n(Se,Ts);return}n(Se,""),n(Ye,!0);try{const t=await Wa(e(z));n(fe,[...e(fe),t]),n(pe,e(pe)+1),n(Be,!1),n(z,{name:"",description:"",priority:"Medium"}),de("success",$s(t.name))}catch(t){n(Se,t.message)}finally{n(Ye,!1)}}async function oa(t,l){try{await ja(t),n(fe,e(fe).filter(d=>d.id!==t)),n(pe,e(pe)-1),de("success",hs(l))}catch{de("error",fs)}n(q,null),n(ge,!1)}async function va(){if(!e(we).title.trim()){n(Ce,As);return}n(Ce,""),n(We,!0);try{const t=await qa({title:e(we).title,caseIds:[]});n(ce,[t,...e(ce)]),n(Pe,!1),n(we,{title:""}),window.location.href=`/test-repository/runs/${t.id}`}catch(t){n(Ce,t.message)}finally{n(We,!1)}}async function Tt(t){n(Ie,t),n(qe,!0)}async function da(){if(!e(Ie))return;const t=e(Ie);n(Ie,null),n(qe,!1);try{const l=await Ya(t.id);n(ce,[l,...e(ce)]),n(me,e(me)+1),qt.update(d=>d+1),de("success",xs(l.title))}catch{de("error",Ls)}}async function ca(t,l){try{await Ga(t),n(ce,e(ce).filter(d=>d.id!==t)),n(me,e(me)-1),qt.update(d=>d+1),de("success",Es(l))}catch{de("error",ys)}n(q,null),n(ge,!1)}function lt(t){return(t==null?void 0:t.toLowerCase())??"medium"}function $t(t){return t==="complete"?"pass":t==="in-progress"?"warn":"muted"}Fe(()=>e(Ee),()=>{n(ue,e(Ee).trim())}),Fe(()=>(e(st),e(ue),Vt),()=>{clearTimeout(e(st)),e(ue)?(n(Ge,!0),n(ne,null),n(st,setTimeout(async()=>{try{n(ne,await Vt(e(ue)))}catch{n(ne,{suites:[],cases:[],runs:[]})}finally{n(Ge,!1)}},300))):(n(ne,null),n(Ge,!1))}),Fe(()=>e(ne),()=>{var t;n(Oe,((t=e(ne))==null?void 0:t.cases)??[])}),Fe(()=>e(ne),()=>{var t;n(Te,((t=e(ne))==null?void 0:t.suites)??[])}),Fe(()=>e(ne),()=>{var t;n($e,((t=e(ne))==null?void 0:t.runs)??[])}),Ia(),Sa();var At=Tr();$a(t=>{ka.title=as});var St=Y(At);const _a=ve(()=>{var t;return bs((t=e(q))==null?void 0:t.type)});Qt(St,{get title(){return e(_a)},get open(){return e(ge)},set open(t){n(ge,t)},$$events:{confirm:()=>{var t;return((t=e(q))==null?void 0:t.type)==="suite"?oa(e(q).id,e(q).name):ca(e(q).id,e(q).name)}},children:(t,l)=>{var d=_e(),$=Y(d);{var k=m=>{var o=Hs(),E=r(Y(o)),T=s(E);a(E),Le(),I(()=>v(T,`"${e(q).name??""}"`)),i(m,o)};y($,m=>{e(q)&&m(k)})}i(t,d)},$$slots:{default:!0},$$legacy:!0});var wt=r(St,2);Qt(wt,{title:ss,confirmLabel:Ft,get open(){return e(qe)},set open(t){n(qe,t)},$$events:{confirm:da},children:(t,l)=>{var d=_e(),$=Y(d);{var k=m=>{var o=Vs(),E=Y(o);E.nodeValue=`${Ft} `;var T=r(E),M=s(T);a(T);var g=r(T,1,!0);g.nodeValue=rs,I(()=>v(M,`"${e(Ie).title??""}"`)),i(m,o)};y($,m=>{e(Ie)&&m(k)})}i(t,d)},$$slots:{default:!0},$$legacy:!0});var Ct=r(wt,2);Xt(Ct,{title:ns,get open(){return e(Be)},set open(t){n(Be,t)},children:(t,l)=>{var d=Gs(),$=s(d),k=s($);k.textContent=is;var m=r(k,2);gt(m),D(m,"placeholder",ls),a($);var o=r($,2),E=s(o);E.textContent=os;var T=r(E,2);Aa(T),D(T,"placeholder",vs),a(o);var M=r(o,2),g=s(M);g.textContent=ds;var c=r(g,2);I(()=>{e(z),Da(()=>{})}),he(c,5,()=>sa,ut,(p,A)=>{var S=Fs(),R={},u=s(S,!0);a(S),I(()=>{R!==(R=e(A))&&(S.value=(S.__value=e(A))==null?"":e(A)),v(u,e(A))}),i(p,S)}),a(c),a(M);var O=r(M,2);{var b=p=>{var A=js(),S=s(A,!0);a(A),I(()=>v(S,e(Se))),i(p,A)};y(O,p=>{e(Se)&&p(b)})}var U=r(O,2),x=s(U);Me(x,{get disabled(){return e(Ye)},$$events:{click:la},children:(p,A)=>{Le();var S=ke();I(R=>v(S,R),[()=>cs(e(Ye))],ve),i(p,S)},$$slots:{default:!0}});var H=r(x,2);Me(H,{variant:"ghost",$$events:{click:()=>{n(Be,!1),n(Se,"")}},children:(p,A)=>{Le();var S=ke();S.nodeValue=Nt,i(p,S)},$$slots:{default:!0}}),a(U),a(d),Ze(m,()=>e(z).name,p=>De(z,e(z).name=p)),Ze(T,()=>e(z).description,p=>De(z,e(z).description=p)),Ha(c,()=>e(z).priority,p=>De(z,e(z).priority=p)),i(t,d)},$$slots:{default:!0},$$legacy:!0});var It=r(Ct,2);Xt(It,{title:_s,get open(){return e(Pe)},set open(t){n(Pe,t)},children:(t,l)=>{var d=Ws(),$=s(d),k=s($);k.textContent=us;var m=r(k,2);gt(m),D(m,"placeholder",ps),a($);var o=r($,2);{var E=c=>{var O=Ys(),b=s(O,!0);a(O),I(()=>v(b,e(Ce))),i(c,O)};y(o,c=>{e(Ce)&&c(E)})}var T=r(o,2),M=s(T);Me(M,{get disabled(){return e(We)},$$events:{click:va},children:(c,O)=>{Le();var b=ke();I(U=>v(b,U),[()=>ms(e(We))],ve),i(c,b)},$$slots:{default:!0}});var g=r(M,2);Me(g,{variant:"ghost",$$events:{click:()=>{n(Pe,!1),n(Ce,"")}},children:(c,O)=>{Le();var b=ke();b.nodeValue=Nt,i(c,b)},$$slots:{default:!0}}),a(T),a(d),Ze(m,()=>e(we).title,c=>De(we,e(we).title=c)),i(t,d)},$$slots:{default:!0},$$legacy:!0});var ot=r(It,2),vt=s(ot),Rt=s(vt);Rt.textContent=Ka;var ua=r(Rt,2);ua.textContent=za,a(vt);var kt=r(vt,2),pa=s(kt);{var ma=t=>{var l=Js(),d=Y(l);{var $=o=>{var E=qs();D(E,"href",Cs),E.textContent=Is,i(o,E)};y(d,o=>{var E;((E=ta().user)==null?void 0:E.role)==="admin"&&o($)})}var k=r(d,2);Xa(k,{get busy(){return e(rt)},$$events:{select:o=>ra(o.detail)}});var m=r(k,2);Me(m,{$$events:{click:()=>n(Be,!0)},children:(o,E)=>{Le();var T=ke();T.nodeValue=Ss,i(o,T)},$$slots:{default:!0}}),i(t,l)},ga=t=>{Me(t,{$$events:{click:()=>n(Pe,!0)},children:(l,d)=>{Le();var $=ke();$.nodeValue=ws,i(l,$)},$$slots:{default:!0}})};y(pa,t=>{e(Ae)==="suites"?t(ma):t(ga,!1)})}a(kt),a(ot);var dt=r(ot,2),Ne=s(dt),Dt=s(Ne);Dt.nodeValue=`${Za} `;var Mt=r(Dt),ha=s(Mt);a(Mt),a(Ne);var Je=r(Ne,2),Ot=s(Je);Ot.nodeValue=`${es} `;var Bt=r(Ot),fa=s(Bt);a(Bt),a(Je),a(dt);var ct=r(dt,2),Qe=r(s(ct),2);gt(Qe),D(Qe,"placeholder",gs);var Ea=r(Qe,2);{var ya=t=>{var l=Qs();D(l,"aria-label",Ba),oe("click",l,()=>n(Ee,"")),i(t,l)};y(Ea,t=>{e(Ee)&&t(ya)})}a(ct);var Pt=r(ct,2);{var ba=t=>{var l=er(),d=s(l);d.textContent=Pa;var $=r(d,2);{var k=o=>{var E=_e(),T=Y(E);he(T,0,()=>[["createdAt","Date Created"],["displayId","ID"],["name","Name"],["priority","Priority"]],ut,(M,g)=>{let c=()=>g[0],O=()=>g[1];var b=Ks(),U=s(b),x=r(U);{var H=p=>{var A=Xs(),S=s(A,!0);a(A),I(()=>v(S,e(K).order==="asc"?"↑":"↓")),i(p,A)};y(x,p=>{e(K).by===c()&&p(H)})}a(b),I(()=>{Ke(b,"active",e(K).by===c()),v(U,`${O()??""} `)}),oe("click",b,()=>na(c())),i(M,b)}),i(o,E)},m=o=>{var E=_e(),T=Y(E);he(T,0,()=>[["createdAt","Date Created"],["updatedAt","Last Updated"],["title","Name"]],ut,(M,g)=>{let c=()=>g[0],O=()=>g[1];var b=Zs(),U=s(b),x=r(U);{var H=p=>{var A=zs(),S=s(A,!0);a(A),I(()=>v(S,e(re).order==="asc"?"↑":"↓")),i(p,A)};y(x,p=>{e(re).by===c()&&p(H)})}a(b),I(()=>{Ke(b,"active",e(re).by===c()),v(U,`${O()??""} `)}),oe("click",b,()=>ia(c())),i(M,b)}),i(o,E)};y($,o=>{e(Ae)==="suites"?o(k):o(m,!1)})}a(l),i(t,l)};y(Pt,t=>{e(ue)||t(ba)})}var xa=r(Pt,2);{var La=t=>{var l=_r(),d=s(l);{var $=m=>{var o=tr();o.textContent=Ut,i(m,o)},k=m=>{var o=_e(),E=Y(o);{var T=g=>{var c=ar();c.textContent=Ut,i(g,c)},M=g=>{var c=_e(),O=Y(c);{var b=x=>{const H=ve(()=>Bs(e(Ee)));ht(x,{title:Rs,get description(){return e(H)}})},U=x=>{var H=cr(),p=Y(H);{var A=w=>{var C=nr(),B=s(C),J=s(B);J.nodeValue=`${Ps} `;var Q=r(J),ie=s(Q,!0);a(Q),a(B);var X=r(B,2);he(X,5,()=>e(Oe),L=>L.id,(L,h)=>{var V=rr(),P=s(V),te=s(P,!0);a(P);var N=r(P,2),le=s(N,!0);a(N);var W=r(N,2);{var ae=se=>{var ye=sr();ye.textContent=Ns,i(se,ye)};y(W,se=>{e(h).isAutomated&&se(ae)})}var F=r(W,2),j=s(F,!0);a(F);var G=r(F,2),ee=s(G);a(G),a(V),I(se=>{D(V,"href",`/test-repository/suites/${e(h).suite.id??""}`),v(te,e(h).displayId),v(le,e(h).title),je(F,`priority-badge small ${se??""} svelte-g440mn`),v(j,e(h).priority),v(ee,`${e(h).suite.displayId??""} · ${e(h).suite.name??""}`)},[()=>lt(e(h).priority)],ve),i(L,V)}),a(X),a(C),I(()=>v(ie,e(Oe).length)),i(w,C)};y(p,w=>{e(Oe).length>0&&w(A)})}var S=r(p,2);{var R=w=>{var C=or(),B=s(C),J=s(B);J.nodeValue=`${Us} `;var Q=r(J),ie=s(Q,!0);a(Q),a(B);var X=r(B,2);he(X,5,()=>e(Te),L=>L.id,(L,h)=>{var V=lr(),P=s(V),te=r(P,2),N=s(te),le=s(N,!0);a(N);var W=r(N,2),ae=s(W,!0);a(W);var F=r(W,2),j=s(F);D(j,"title",Gt),a(F),a(te);var G=r(te,2),ee=s(G,!0);a(G);var se=r(G,2);{var ye=be=>{var xe=ir(),Ve=s(xe,!0);a(xe),I(()=>v(Ve,e(h).description)),i(be,xe)};y(se,be=>{e(h).description&&be(ye)})}var Xe=r(se,2),Re=s(Xe),Ue=r(s(Re));a(Re);var He=r(Re,2),_t=s(He,!0);a(He),a(Xe),a(V),I((be,xe,Ve)=>{D(P,"href",`/test-repository/suites/${e(h).id??""}`),D(P,"aria-label",e(h).name),v(le,e(h).displayId),je(W,`priority-badge ${be??""} svelte-g440mn`),v(ae,e(h).priority),v(ee,e(h).name),v(Ue,` ${xe??""}`),v(_t,Ve)},[()=>lt(e(h).priority),()=>et(e(h)._count.cases),()=>tt(e(h).createdBy.name)],ve),oe("click",j,()=>{n(q,{type:"suite",id:e(h).id,name:e(h).name}),n(ge,!0)}),i(L,V)}),a(X),a(C),I(()=>v(ie,e(Te).length)),i(w,C)};y(S,w=>{e(Te).length>0&&w(R)})}var u=r(S,2);{var Z=w=>{var C=dr(),B=s(C),J=r(s(B)),Q=s(J,!0);a(J),a(B);var ie=r(B,2);he(ie,5,()=>e($e),X=>X.id,(X,L)=>{var h=vr(),V=s(h),P=r(V,2),te=s(P),N=r(te,2),le=s(N,!0);a(N);var W=r(N,2),ae=s(W,!0);a(W),a(P);var F=r(P,2),j=s(F),G=s(j,!0);a(j);var ee=r(j,4),se=s(ee,!0);a(ee);var ye=r(ee,4),Xe=s(ye,!0);a(ye),a(F);var Re=r(F,2),Ue=s(Re);D(Ue,"title",Yt);var He=r(Ue,2);D(He,"title",Wt),a(Re),a(h),I((_t,be,xe,Ve)=>{D(V,"href",`/test-repository/runs/${e(L).id??""}`),D(V,"aria-label",e(L).title),je(te,`run-status-dot ${_t??""} svelte-g440mn`),v(le,e(L).title),v(ae,be),v(G,e(L).status),v(se,xe),v(Xe,Ve)},[()=>$t(e(L).status),()=>et(e(L)._count.entries),()=>tt(e(L).createdBy.name),()=>new Date(e(L).createdAt).toLocaleDateString()],ve),oe("click",Ue,()=>Tt(e(L))),oe("click",He,()=>{n(q,{type:"run",id:e(L).id,name:e(L).title}),n(ge,!0)}),i(X,h)}),a(ie),a(C),I(()=>v(Q,e($e).length)),i(w,C)};y(u,w=>{e($e).length>0&&w(Z)})}i(x,H)};y(O,x=>{e(Oe).length===0&&e(Te).length===0&&e($e).length===0?x(b):x(U,!1)},!0)}i(g,c)};y(E,g=>{e(ne)?g(M,!1):g(T)},!0)}i(m,o)};y(d,m=>{e(Ge)?m($):m(k,!1)})}a(l),pt(3,l,()=>mt,()=>({y:4,duration:160})),i(t,l)},Ta=t=>{var l=_e(),d=Y(l);{var $=m=>{var o=fr(),E=s(o);{var T=g=>{var c=ur();c.textContent=Ht,i(g,c)},M=g=>{var c=_e(),O=Y(c);{var b=x=>{ht(x,{title:Ds,description:ks})},U=x=>{var H=hr(),p=Y(H);he(p,5,()=>e(fe),R=>R.id,(R,u)=>{var Z=mr(),w=s(Z),C=r(w,2),B=s(C),J=s(B,!0);a(B);var Q=r(B,2),ie=s(Q,!0);a(Q);var X=r(Q,2),L=s(X);D(L,"title",Gt),a(X),a(C);var h=r(C,2),V=s(h,!0);a(h);var P=r(h,2);{var te=j=>{var G=pr(),ee=s(G,!0);a(G),I(()=>v(ee,e(u).description)),i(j,G)};y(P,j=>{e(u).description&&j(te)})}var N=r(P,2),le=s(N),W=r(s(le));a(le);var ae=r(le,2),F=s(ae,!0);a(ae),a(N),a(Z),I((j,G,ee)=>{D(w,"href",`/test-repository/suites/${e(u).id??""}`),D(w,"aria-label",e(u).name),v(J,e(u).displayId),je(Q,`priority-badge ${j??""} svelte-g440mn`),v(ie,e(u).priority),v(V,e(u).name),v(W,` ${G??""}`),v(F,ee)},[()=>lt(e(u).priority),()=>et(e(u)._count.cases),()=>tt(e(u).createdBy.name)],ve),oe("click",L,()=>{n(q,{type:"suite",id:e(u).id,name:e(u).name}),n(ge,!0)}),i(R,Z)}),a(p);var A=r(p,2);{var S=R=>{var u=gr(),Z=s(u);const w=ve(()=>Math.ceil(e(pe)/ze));Jt(Z,{get current(){return e(bt)},get total(){return e(w)},$$events:{change:C=>nt(C.detail)}}),a(u),i(R,u)};y(A,R=>{Math.ceil(e(pe)/ze)>1&&R(S)})}i(x,H)};y(O,x=>{e(fe).length===0?x(b):x(U,!1)},!0)}i(g,c)};y(E,g=>{e(at)?g(T):g(M,!1)})}a(o),pt(3,o,()=>mt,()=>({y:4,duration:160})),i(m,o)},k=m=>{var o=Lr(),E=s(o);{var T=g=>{var c=Er();c.textContent=Ht,i(g,c)},M=g=>{var c=_e(),O=Y(c);{var b=x=>{ht(x,{title:Os,description:Ms})},U=x=>{var H=xr(),p=Y(H);he(p,5,()=>e(ce),R=>R.id,(R,u)=>{var Z=yr(),w=s(Z),C=r(w,2),B=s(C),J=r(B,2),Q=s(J,!0);a(J);var ie=r(J,2),X=s(ie,!0);a(ie),a(C);var L=r(C,2),h=s(L),V=s(h,!0);a(h);var P=r(h,4),te=s(P,!0);a(P);var N=r(P,4),le=s(N,!0);a(N),a(L);var W=r(L,2),ae=s(W);D(ae,"title",Yt);var F=r(ae,2);D(F,"title",Wt),a(W),a(Z),I((j,G,ee,se)=>{D(w,"href",`/test-repository/runs/${e(u).id??""}`),D(w,"aria-label",e(u).title),je(B,`run-status-dot ${j??""} svelte-g440mn`),v(Q,e(u).title),v(X,G),v(V,e(u).status),v(te,ee),v(le,se)},[()=>$t(e(u).status),()=>et(e(u)._count.entries),()=>tt(e(u).createdBy.name),()=>new Date(e(u).createdAt).toLocaleDateString()],ve),oe("click",ae,()=>Tt(e(u))),oe("click",F,()=>{n(q,{type:"run",id:e(u).id,name:e(u).title}),n(ge,!0)}),i(R,Z)}),a(p);var A=r(p,2);{var S=R=>{var u=br(),Z=s(u);const w=ve(()=>Math.ceil(e(me)/ze));Jt(Z,{get current(){return e(xt)},get total(){return e(w)},$$events:{change:C=>it(C.detail)}}),a(u),i(R,u)};y(A,R=>{Math.ceil(e(me)/ze)>1&&R(S)})}i(x,H)};y(O,x=>{e(ce).length===0?x(b):x(U,!1)},!0)}i(g,c)};y(E,g=>{e(at)?g(T):g(M,!1)})}a(o),pt(3,o,()=>mt,()=>({y:4,duration:160})),i(m,o)};y(d,m=>{e(Ae)==="suites"?m($):m(k,!1)},!0)}i(t,l)};y(xa,t=>{e(ue)?t(La):t(Ta,!1)})}I(()=>{Ke(Ne,"active",e(Ae)==="suites"),v(ha,`${(e(ue)?e(Te).length+"/":"")??""}${e(pe)??""}`),Ke(Je,"active",e(Ae)==="runs"),v(fa,`${(e(ue)?e($e).length+"/":"")??""}${e(me)??""}`)}),oe("click",Ne,()=>ft("suites")),oe("click",Je,()=>ft("runs")),Ze(Qe,()=>e(Ee),t=>n(Ee,t)),i(Kt,At),Ra(),ea()}export{jr as component};
|
|
Binary file
|
|
Binary file
|