signetai 0.82.2 → 0.82.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dashboard/_app/immutable/chunks/{B-kccdvK.js → 6QQayao3.js} +2 -2
  2. package/dashboard/_app/immutable/chunks/{C8n6MUA5.js → 7QfNC2tO.js} +1 -1
  3. package/dashboard/_app/immutable/chunks/{CgytmeWL.js → 9RxFDYgf.js} +1 -1
  4. package/dashboard/_app/immutable/chunks/{1Q68eYvu.js → B37O4oEo.js} +1 -1
  5. package/dashboard/_app/immutable/chunks/{BFuSQEak.js → BBQ5Aw9w.js} +2 -2
  6. package/dashboard/_app/immutable/chunks/{CFGlMKB9.js → BCfJujlY.js} +1 -1
  7. package/dashboard/_app/immutable/chunks/{BzRQnGPj.js → BCnd-Lzn.js} +1 -1
  8. package/dashboard/_app/immutable/chunks/{CQjlljeJ.js → BV4JdBu0.js} +3 -3
  9. package/dashboard/_app/immutable/chunks/{pgAhHv2c.js → BYrqQzwp.js} +1 -1
  10. package/dashboard/_app/immutable/chunks/{FwPtkZZE.js → BbKeZGjs.js} +1 -1
  11. package/dashboard/_app/immutable/chunks/{awbRdlBM.js → Bfb6IrrY.js} +1 -1
  12. package/dashboard/_app/immutable/chunks/{DHIs_HOM.js → BkwxUPCZ.js} +1 -1
  13. package/dashboard/_app/immutable/chunks/{6or1KV6K.js → Bn93pzIi.js} +1 -1
  14. package/dashboard/_app/immutable/chunks/{BUS5nQyj.js → Bo3vPMKS.js} +1 -1
  15. package/dashboard/_app/immutable/chunks/{snoubzjY.js → BpNdgn80.js} +1 -1
  16. package/dashboard/_app/immutable/chunks/{CM3Ez5Zb.js → BwmeuHxQ.js} +1 -1
  17. package/dashboard/_app/immutable/chunks/{852TS80n.js → C4tAfFup.js} +1 -1
  18. package/dashboard/_app/immutable/chunks/{1wENB9Fv.js → CHiXoU1o.js} +1 -1
  19. package/dashboard/_app/immutable/chunks/{Cbk0kQP5.js → CYmGHBe3.js} +1 -1
  20. package/dashboard/_app/immutable/chunks/{BBKe1vca.js → CaU0Clxv.js} +1 -1
  21. package/dashboard/_app/immutable/chunks/{rjiWOQwm.js → Cazc3SAR.js} +1 -1
  22. package/dashboard/_app/immutable/chunks/{CwnhW_Rr.js → CkUGTTIW.js} +1 -1
  23. package/dashboard/_app/immutable/chunks/{xcrNeRwl.js → Cm5xlRAy.js} +1 -1
  24. package/dashboard/_app/immutable/chunks/{CuvNi-av.js → CmaFY7PY.js} +1 -1
  25. package/dashboard/_app/immutable/chunks/{BvFycAhF.js → CmkIeyIZ.js} +1 -1
  26. package/dashboard/_app/immutable/chunks/{BJdKlhKO.js → Cnb3SeHM.js} +1 -1
  27. package/dashboard/_app/immutable/chunks/{DHvkPM9v.js → DEH19dOR.js} +1 -1
  28. package/dashboard/_app/immutable/chunks/{xOiKZTGm.js → DJ6UjsfG.js} +1 -1
  29. package/dashboard/_app/immutable/chunks/{DK3Rbu4L.js → DO0BCp8u.js} +1 -1
  30. package/dashboard/_app/immutable/chunks/{jzXL31dT.js → DbR8Hpay.js} +1 -1
  31. package/dashboard/_app/immutable/chunks/{HOTJvN83.js → Di6D7Klw.js} +1 -1
  32. package/dashboard/_app/immutable/chunks/{Bkr-PEYs.js → DqBMrXJB.js} +1 -1
  33. package/dashboard/_app/immutable/chunks/{D43mjuJx.js → Dt9BubDK.js} +1 -1
  34. package/dashboard/_app/immutable/chunks/{DVe5pC9Y.js → Duh83i3C.js} +1 -1
  35. package/dashboard/_app/immutable/chunks/{Cr8sLgDL.js → DyJRCbTH.js} +1 -1
  36. package/dashboard/_app/immutable/chunks/{-GB9BHh5.js → E3CptpiY.js} +1 -1
  37. package/dashboard/_app/immutable/chunks/{D9ZAYnCR.js → F3rfl8a8.js} +1 -1
  38. package/dashboard/_app/immutable/chunks/{BWbT4F5H.js → F3wfQkst.js} +1 -1
  39. package/dashboard/_app/immutable/chunks/{BChLYXWi.js → Rg8vdugb.js} +1 -1
  40. package/dashboard/_app/immutable/chunks/{CDMcm1RD.js → SQHdjZe8.js} +1 -1
  41. package/dashboard/_app/immutable/chunks/{CNH5O-MO.js → _Q3l5Fvj.js} +1 -1
  42. package/dashboard/_app/immutable/chunks/{NA4Ojz1i.js → bLj1eiv0.js} +1 -1
  43. package/dashboard/_app/immutable/chunks/gfpvseTL.js +1 -0
  44. package/dashboard/_app/immutable/chunks/{y2gm4xUz.js → os79pylT.js} +1 -1
  45. package/dashboard/_app/immutable/chunks/{BCteBoj0.js → p0WVzFGB.js} +1 -1
  46. package/dashboard/_app/immutable/chunks/{hmTB_1dN.js → phKhVyBq.js} +1 -1
  47. package/dashboard/_app/immutable/chunks/{D9KlJ5Yg.js → sRzY9ruW.js} +1 -1
  48. package/dashboard/_app/immutable/entry/{app.5FvbB9fS.js → app.DpFa2HXH.js} +2 -2
  49. package/dashboard/_app/immutable/entry/start.CToYG0MZ.js +1 -0
  50. package/dashboard/_app/immutable/nodes/{1.BvVPeaUx.js → 1.BvRv4BPw.js} +1 -1
  51. package/dashboard/_app/immutable/nodes/2.DoQkaPGl.js +1 -0
  52. package/dashboard/_app/version.json +1 -1
  53. package/dashboard/index.html +6 -6
  54. package/package.json +1 -1
  55. package/dashboard/_app/immutable/chunks/BDhqtJbW.js +0 -1
  56. package/dashboard/_app/immutable/entry/start.DrmR0YWN.js +0 -1
  57. package/dashboard/_app/immutable/nodes/2.BTg2Yidd.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./1Q68eYvu.js","./Ddm7yfuh.js","../assets/vendor-ui.BHIBfuhK.css","./CQjlljeJ.js","./Cik1Y8bQ.js","./PPVm8Dsz.js","../assets/2.BqUJ-YIW.css","./BChLYXWi.js","./1wENB9Fv.js","./CgytmeWL.js","./NA4Ojz1i.js","./-GB9BHh5.js","../assets/OsTab.DonahdAl.css","./y2gm4xUz.js","./DK3Rbu4L.js","./BCteBoj0.js","./FwPtkZZE.js","./CwnhW_Rr.js","./D9ZAYnCR.js","./BUS5nQyj.js","./HOTJvN83.js","./C8n6MUA5.js","./pgAhHv2c.js","./CFGlMKB9.js","./BzRQnGPj.js","./CM3Ez5Zb.js","../assets/CortexTasksPanel.C4153GOT.css","./BBKe1vca.js","../assets/TroubleshooterPanel.Bj27xjMc.css"])))=>i.map(i=>d[i]);
2
- import{_ as T}from"./PPVm8Dsz.js";import{p as F,m as V,o as X,Q as C,h as u,v as y,i as n,t as E,w as P,x as A,b as s,k as d,j as z,d as B,u as R,l,T as I,y as L,z as O,c as q,f as N,g as S}from"./Ddm7yfuh.js";import M from"./xOiKZTGm.js";import j from"./6or1KV6K.js";import{B as D}from"./CQjlljeJ.js";var G=l('<div class="unified-main svelte-1vrq4s9"><!></div>'),H=l('<div class="unified-main svelte-1vrq4s9"><div class="extra-body svelte-1vrq4s9"><!></div></div>'),Q=l('<div class="unified-memory svelte-1vrq4s9"><div class="tab-header svelte-1vrq4s9"><div class="tab-header-left svelte-1vrq4s9"><span class="tab-header-title svelte-1vrq4s9">ONTOLOGY</span> <span class="tab-header-sep svelte-1vrq4s9" aria-hidden="true"></span> <span class="tab-header-count svelte-1vrq4s9">CORTEX INDEX + CONSTELLATION</span></div> <div class="unified-actions svelte-1vrq4s9"><!> <!></div></div> <div class="unified-body svelte-1vrq4s9"><!></div></div>');function U(k,c){F(c,!0);const x=new Set(["cortex","constellation"]);function w(){if(typeof window>"u")return"cortex";const t=window.location.hash.replace("#","").split("/");return t[0]!=="cortex-memory"&&t[0]!=="ontology"?"cortex":t[1]&&x.has(t[1])?t[1]:"cortex"}let m=V(X(w()));C(()=>{if(typeof window>"u")return;const e=u(m)==="cortex"?"cortex-memory":"cortex-memory/constellation";window.location.hash!==`#${e}`&&window.history.replaceState(null,"",`#${e}`)}),C(()=>{if(typeof window>"u")return;const e=()=>{const t=w();t!==u(m)&&y(m,t,!0)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)});var g=Q(),h=n(g),p=E(n(h),2),v=n(p);{let e=R(()=>`tab-switch ${u(m)==="cortex"?"tab-switch-active":""}`);D(v,{variant:"outline",size:"sm",get class(){return u(e)},onclick:()=>y(m,"cortex"),children:(t,_)=>{P();var b=A("CORTEX");s(t,b)},$$slots:{default:!0}})}var i=E(v,2);{let e=R(()=>`tab-switch ${u(m)==="constellation"?"tab-switch-active":""}`);D(i,{variant:"outline",size:"sm",get class(){return u(e)},onclick:()=>y(m,"constellation"),children:(t,_)=>{P();var b=A("CONSTELLATION");s(t,b)},$$slots:{default:!0}})}d(p),d(h);var f=E(h,2),r=n(f);{var o=e=>{var t=G(),_=n(t);j(_,{get memories(){return c.memories},get agentId(){return c.agentId},embedded:!0}),d(t),s(e,t)},a=e=>{var t=H(),_=n(t),b=n(_);M(b,{get onopenglobalsimilar(){return c.onopenglobalsimilar},get agentId(){return c.agentId},embedded:!0}),d(_),d(t),s(e,t)};z(r,e=>{u(m)==="cortex"?e(o):e(a,-1)})}d(f),d(g),s(k,g),B()}var Y=l('<div class="cortex-content svelte-10uk01t"><!></div>'),J=l('<div class="cortex-error svelte-10uk01t"> </div>'),K=l('<div class="cortex-loading svelte-10uk01t">Loading apps...</div>'),W=l('<div class="cortex-content svelte-10uk01t"><!></div>'),Z=l('<div class="cortex-error svelte-10uk01t"> </div>'),$=l('<div class="cortex-loading svelte-10uk01t">Loading tasks...</div>'),ee=l('<div class="cortex-content svelte-10uk01t"><!></div>'),te=l('<div class="cortex-error svelte-10uk01t"> </div>'),ae=l('<div class="cortex-loading svelte-10uk01t">Loading troubleshooter...</div>'),re=l('<div class="cortex-content svelte-10uk01t"><!></div>'),oe=l('<div class="cortex-tab svelte-10uk01t"><!></div>');function le(k,c){var x=oe(),w=n(x);{var m=v=>{var i=Y(),f=n(i);U(f,{get memories(){return c.memories},get agentId(){return c.agentId},get onopenglobalsimilar(){return c.onopenglobalsimilar}}),d(i),s(v,i)},g=v=>{var i=W(),f=n(i);I(f,()=>T(()=>import("./1Q68eYvu.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),r=>{var o=K();s(r,o)},(r,o)=>{var a=q(),e=N(a);S(e,()=>u(o).default,(t,_)=>{_(t,{})}),s(r,a)},(r,o)=>{var a=J(),e=n(a);d(a),L(()=>O(e,`Failed to load: ${u(o)?.message??"unknown"??""}`)),s(r,a)}),d(i),s(v,i)},h=v=>{var i=ee(),f=n(i);I(f,()=>T(()=>import("./y2gm4xUz.js"),__vite__mapDeps([13,1,2,3,4,5,6,14,15,16,17,18,19,20,21,22,23,24,11,9,25,26]),import.meta.url),r=>{var o=$();s(r,o)},(r,o)=>{var a=q(),e=N(a);S(e,()=>u(o).default,(t,_)=>{_(t,{})}),s(r,a)},(r,o)=>{var a=Z(),e=n(a);d(a),L(()=>O(e,`Failed to load: ${u(o)?.message??"unknown"??""}`)),s(r,a)}),d(i),s(v,i)},p=v=>{var i=re(),f=n(i);I(f,()=>T(()=>import("./BBKe1vca.js"),__vite__mapDeps([27,1,2,3,4,5,6,18,19,20,7,11,28]),import.meta.url),r=>{var o=ae();s(r,o)},(r,o)=>{var a=q(),e=N(a);S(e,()=>u(o).default,(t,_)=>{_(t,{})}),s(r,a)},(r,o)=>{var a=te(),e=n(a);d(a),L(()=>O(e,`Failed to load: ${u(o)?.message??"unknown"??""}`)),s(r,a)}),d(i),s(v,i)};z(w,v=>{c.activeTab==="cortex-memory"?v(m):c.activeTab==="cortex-apps"?v(g,1):c.activeTab==="cortex-tasks"?v(h,2):c.activeTab==="cortex-troubleshooter"&&v(p,3)})}d(x),s(k,x)}export{le as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./B37O4oEo.js","./Ddm7yfuh.js","../assets/vendor-ui.BHIBfuhK.css","./BV4JdBu0.js","./Cik1Y8bQ.js","./PPVm8Dsz.js","../assets/2.BqUJ-YIW.css","./Rg8vdugb.js","./CHiXoU1o.js","./9RxFDYgf.js","./bLj1eiv0.js","./E3CptpiY.js","../assets/OsTab.DonahdAl.css","./os79pylT.js","./DO0BCp8u.js","./p0WVzFGB.js","./BbKeZGjs.js","./CkUGTTIW.js","./F3rfl8a8.js","./Bo3vPMKS.js","./Di6D7Klw.js","./7QfNC2tO.js","./BYrqQzwp.js","./BCfJujlY.js","./BCnd-Lzn.js","./BwmeuHxQ.js","../assets/CortexTasksPanel.C4153GOT.css","./CaU0Clxv.js","../assets/TroubleshooterPanel.Bj27xjMc.css"])))=>i.map(i=>d[i]);
2
+ import{_ as T}from"./PPVm8Dsz.js";import{p as F,m as V,o as X,Q as C,h as u,v as y,i as n,t as E,w as P,x as A,b as s,k as d,j as z,d as B,u as R,l,T as I,y as L,z as O,c as q,f as N,g as S}from"./Ddm7yfuh.js";import M from"./DJ6UjsfG.js";import j from"./Bn93pzIi.js";import{B as D}from"./BV4JdBu0.js";var G=l('<div class="unified-main svelte-1vrq4s9"><!></div>'),H=l('<div class="unified-main svelte-1vrq4s9"><div class="extra-body svelte-1vrq4s9"><!></div></div>'),Q=l('<div class="unified-memory svelte-1vrq4s9"><div class="tab-header svelte-1vrq4s9"><div class="tab-header-left svelte-1vrq4s9"><span class="tab-header-title svelte-1vrq4s9">ONTOLOGY</span> <span class="tab-header-sep svelte-1vrq4s9" aria-hidden="true"></span> <span class="tab-header-count svelte-1vrq4s9">CORTEX INDEX + CONSTELLATION</span></div> <div class="unified-actions svelte-1vrq4s9"><!> <!></div></div> <div class="unified-body svelte-1vrq4s9"><!></div></div>');function U(k,c){F(c,!0);const x=new Set(["cortex","constellation"]);function w(){if(typeof window>"u")return"cortex";const t=window.location.hash.replace("#","").split("/");return t[0]!=="cortex-memory"&&t[0]!=="ontology"?"cortex":t[1]&&x.has(t[1])?t[1]:"cortex"}let m=V(X(w()));C(()=>{if(typeof window>"u")return;const e=u(m)==="cortex"?"cortex-memory":"cortex-memory/constellation";window.location.hash!==`#${e}`&&window.history.replaceState(null,"",`#${e}`)}),C(()=>{if(typeof window>"u")return;const e=()=>{const t=w();t!==u(m)&&y(m,t,!0)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)});var g=Q(),h=n(g),p=E(n(h),2),v=n(p);{let e=R(()=>`tab-switch ${u(m)==="cortex"?"tab-switch-active":""}`);D(v,{variant:"outline",size:"sm",get class(){return u(e)},onclick:()=>y(m,"cortex"),children:(t,_)=>{P();var b=A("CORTEX");s(t,b)},$$slots:{default:!0}})}var i=E(v,2);{let e=R(()=>`tab-switch ${u(m)==="constellation"?"tab-switch-active":""}`);D(i,{variant:"outline",size:"sm",get class(){return u(e)},onclick:()=>y(m,"constellation"),children:(t,_)=>{P();var b=A("CONSTELLATION");s(t,b)},$$slots:{default:!0}})}d(p),d(h);var f=E(h,2),r=n(f);{var o=e=>{var t=G(),_=n(t);j(_,{get memories(){return c.memories},get agentId(){return c.agentId},embedded:!0}),d(t),s(e,t)},a=e=>{var t=H(),_=n(t),b=n(_);M(b,{get onopenglobalsimilar(){return c.onopenglobalsimilar},get agentId(){return c.agentId},embedded:!0}),d(_),d(t),s(e,t)};z(r,e=>{u(m)==="cortex"?e(o):e(a,-1)})}d(f),d(g),s(k,g),B()}var Y=l('<div class="cortex-content svelte-10uk01t"><!></div>'),J=l('<div class="cortex-error svelte-10uk01t"> </div>'),K=l('<div class="cortex-loading svelte-10uk01t">Loading apps...</div>'),W=l('<div class="cortex-content svelte-10uk01t"><!></div>'),Z=l('<div class="cortex-error svelte-10uk01t"> </div>'),$=l('<div class="cortex-loading svelte-10uk01t">Loading tasks...</div>'),ee=l('<div class="cortex-content svelte-10uk01t"><!></div>'),te=l('<div class="cortex-error svelte-10uk01t"> </div>'),ae=l('<div class="cortex-loading svelte-10uk01t">Loading troubleshooter...</div>'),re=l('<div class="cortex-content svelte-10uk01t"><!></div>'),oe=l('<div class="cortex-tab svelte-10uk01t"><!></div>');function le(k,c){var x=oe(),w=n(x);{var m=v=>{var i=Y(),f=n(i);U(f,{get memories(){return c.memories},get agentId(){return c.agentId},get onopenglobalsimilar(){return c.onopenglobalsimilar}}),d(i),s(v,i)},g=v=>{var i=W(),f=n(i);I(f,()=>T(()=>import("./B37O4oEo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),r=>{var o=K();s(r,o)},(r,o)=>{var a=q(),e=N(a);S(e,()=>u(o).default,(t,_)=>{_(t,{})}),s(r,a)},(r,o)=>{var a=J(),e=n(a);d(a),L(()=>O(e,`Failed to load: ${u(o)?.message??"unknown"??""}`)),s(r,a)}),d(i),s(v,i)},h=v=>{var i=ee(),f=n(i);I(f,()=>T(()=>import("./os79pylT.js"),__vite__mapDeps([13,1,2,3,4,5,6,14,15,16,17,18,19,20,21,22,23,24,11,9,25,26]),import.meta.url),r=>{var o=$();s(r,o)},(r,o)=>{var a=q(),e=N(a);S(e,()=>u(o).default,(t,_)=>{_(t,{})}),s(r,a)},(r,o)=>{var a=Z(),e=n(a);d(a),L(()=>O(e,`Failed to load: ${u(o)?.message??"unknown"??""}`)),s(r,a)}),d(i),s(v,i)},p=v=>{var i=re(),f=n(i);I(f,()=>T(()=>import("./CaU0Clxv.js"),__vite__mapDeps([27,1,2,3,4,5,6,18,19,20,7,11,28]),import.meta.url),r=>{var o=ae();s(r,o)},(r,o)=>{var a=q(),e=N(a);S(e,()=>u(o).default,(t,_)=>{_(t,{})}),s(r,a)},(r,o)=>{var a=te(),e=n(a);d(a),L(()=>O(e,`Failed to load: ${u(o)?.message??"unknown"??""}`)),s(r,a)}),d(i),s(v,i)};z(w,v=>{c.activeTab==="cortex-memory"?v(m):c.activeTab==="cortex-apps"?v(g,1):c.activeTab==="cortex-tasks"?v(h,2):c.activeTab==="cortex-troubleshooter"&&v(p,3)})}d(x),s(k,x)}export{le as default};
@@ -1 +1 @@
1
- import{p as h,e as s,c as o,f as d,M as p,F as m,E as x,a as y,n as w,b as c,d as _,r as k}from"./Ddm7yfuh.js";import{c as B,e as V}from"./CQjlljeJ.js";const j=V({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",destructive:"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function F(v,e){h(e,!0);let a=s(e,"ref",15,null),f=s(e,"variant",3,"default"),l=k(e,["$$slots","$$events","$$legacy","ref","href","class","variant","children"]);var t=o(),u=d(t);p(u,()=>e.href?"a":"span",!1,(i,g)=>{m(i,r=>a(r),()=>a()),x(i,r=>({"data-slot":"badge",href:e.href,class:r,...l}),[()=>B(j({variant:f()}),e.class)]);var n=o(),b=d(n);y(b,()=>e.children??w),c(g,n)}),c(v,t),_()}export{F as B};
1
+ import{p as h,e as s,c as o,f as d,M as p,F as m,E as x,a as y,n as w,b as c,d as _,r as k}from"./Ddm7yfuh.js";import{c as B,e as V}from"./BV4JdBu0.js";const j=V({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",destructive:"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function F(v,e){h(e,!0);let a=s(e,"ref",15,null),f=s(e,"variant",3,"default"),l=k(e,["$$slots","$$events","$$legacy","ref","href","class","variant","children"]);var t=o(),u=d(t);p(u,()=>e.href?"a":"span",!1,(i,g)=>{m(i,r=>a(r),()=>a()),x(i,r=>({"data-slot":"badge",href:e.href,class:r,...l}),[()=>B(j({variant:f()}),e.class)]);var n=o(),b=d(n);y(b,()=>e.children??w),c(g,n)}),c(v,t),_()}export{F as B};
@@ -1 +1 @@
1
- import{p as n,s as d,c,f as l,a as i,n as m,b as u,d as f,r as h}from"./Ddm7yfuh.js";import{I as $}from"./CQjlljeJ.js";function P(e,s){n(s,!0);let o=h(s,["$$slots","$$events","$$legacy"]);const t=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];$(e,d({name:"plus"},()=>o,{get iconNode(){return t},children:(r,v)=>{var a=c(),p=l(a);i(p,()=>s.children??m),u(r,a)},$$slots:{default:!0}})),f()}export{P};
1
+ import{p as n,s as d,c,f as l,a as i,n as m,b as u,d as f,r as h}from"./Ddm7yfuh.js";import{I as $}from"./BV4JdBu0.js";function P(e,s){n(s,!0);let o=h(s,["$$slots","$$events","$$legacy"]);const t=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];$(e,d({name:"plus"},()=>o,{get iconNode(){return t},children:(r,v)=>{var a=c(),p=l(a);i(p,()=>s.children??m),u(r,a)},$$slots:{default:!0}})),f()}export{P};
@@ -1,4 +1,4 @@
1
- import{o as We,p as re,s as he,c as de,f as se,a as fe,n as ve,b as w,d as ie,r as we,i as c,j as J,t as _,k as s,y as ee,z as ae,D as ge,A as Te,h as t,l as N,v as m,m as Y,e as ft,Q as Ze,q as ze,aU as Ve,F as Je,B as xe,u as pe,O as U,P as Se,aa as et,N as Ee,ac as Ie,w as ke,I as Me,x as vt,K as wt,U as yt}from"./Ddm7yfuh.js";import{o as me,I as ye,aG as bt,bc as xt,bd as _t,H as Et}from"./CQjlljeJ.js";import{W as at,L as Tt}from"./BChLYXWi.js";import{R as st}from"./1wENB9Fv.js";import{P as qe}from"./CgytmeWL.js";import{P as kt}from"./NA4Ojz1i.js";import{T as St}from"./-GB9BHh5.js";const k=We({entries:[],loading:!1,error:null,groups:[],activeGroup:null,draggingId:null,focusedId:null,widgetCacheVersion:0}),be=new Map,He=new Set;function Ct(){return k.entries.filter(n=>n.state==="tray")}function Nt(){const n=k.entries.filter(e=>e.state==="grid");if(k.activeGroup){const e=k.groups.find(r=>r.id===k.activeGroup);if(e)return n.filter(r=>e.items.includes(r.id))}return n}function It(){return k.entries.filter(n=>n.state==="dock")}const tt=12;function Qe(n,e,r){const a=r?.x??0,d=r?.y??0;function p(R,P,D,H){for(const A of n)if(R<A.x+A.w&&R+D>A.x&&P<A.y+A.h&&P+H>A.y)return!0;return!1}const o=Math.max(0,Math.min(tt-e.w,a)),y=Math.max(0,d);if(!p(o,y,e.w,e.h))return{x:o,y,w:e.w,h:e.h};for(let R=1;R<=20;R++)for(let P=-R;P<=R;P++)for(let D=-R;D<=R;D++){if(Math.abs(D)!==R&&Math.abs(P)!==R)continue;const H=Math.max(0,Math.min(tt-e.w,a+D)),A=Math.max(0,d+P);if(!p(H,A,e.w,e.h))return{x:H,y:A,w:e.w,h:e.h}}return{x:0,y:n.reduce((R,P)=>Math.max(R,P.y+P.h),0),w:e.w,h:e.h}}async function Oe(){k.loading=!0,k.error=null;try{const n=await fetch(`${me}/api/os/tray`);if(!n.ok)throw new Error(`HTTP ${n.status}`);const e=await n.json();k.entries=e.entries??[]}catch(n){k.error=n instanceof Error?n.message:String(n)}finally{k.loading=!1}}async function Ae(n,e,r){try{const a={state:e};r&&(a.gridPosition=r);const d=await fetch(`${me}/api/os/tray/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!d.ok)return!1;const p=await d.json();if(p.success&&p.entry){const o=k.entries.findIndex(y=>y.id===n);o>=0&&(k.entries[o]=p.entry)}return!0}catch{return!1}}async function nt(n,e){return Ae(n,"grid",e)}async function Xe(n,e){const r=k.entries.find(o=>o.id===n);if(!r)return!1;if(e)return Ae(n,"grid",e);const a=r.manifest?.defaultSize??{w:4,h:3},d=k.entries.flatMap(o=>o.id!==n&&o.state==="grid"&&o.gridPosition?[o.gridPosition]:[]),p=Qe(d,a);return Ae(n,"grid",p)}async function Mt(n){return Ae(n,"dock")}async function lt(n){return Ae(n,"tray")}const ct="signet-os-sidebar-groups";function At(){try{const n=localStorage.getItem(ct);n&&(k.groups=JSON.parse(n))}catch{k.groups=[]}}function Fe(){localStorage.setItem(ct,JSON.stringify(k.groups))}function Dt(n){const e={id:`group_${Date.now()}`,name:n,items:[]};return k.groups=[...k.groups,e],Fe(),e}function Lt(n){k.groups=k.groups.filter(e=>e.id!==n),k.activeGroup===n&&(k.activeGroup=null),Fe()}function Rt(n,e){k.groups=k.groups.map(r=>r.id===n?{...r,name:e}:r),Fe()}function Ht(n,e){k.groups=k.groups.map(r=>r.id!==n||r.items.includes(e)?r:{...r,items:[...r.items,e]}),Fe()}function Ue(n){k.activeGroup=n}let Pe=We(new Map),rt=0;function it(n,e,r){Pe.set(n,{action:e,data:r,_seq:++rt}),setTimeout(()=>{const a=Pe.get(n);a&&a._seq===rt&&Pe.delete(n)},500)}function Pt(n){return Pe.get(n)}function Ot(n){k.focusedId=n}function Le(){k.focusedId=null}async function $e(n){if(be.has(n))return be.get(n)??null;try{const e=await fetch(`${me}/api/os/widget/${encodeURIComponent(n)}`);if(!e.ok)return null;const r=await e.json();return r.html?(be.set(n,r.html),k.widgetCacheVersion++,r.html):null}catch{return null}}async function dt(n){if(!He.has(n)){He.add(n),k.widgetCacheVersion++;try{const r=await(await fetch(`${me}/api/os/widget/generate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverId:n,force:!1})})).json();r.status==="cached"&&r.html&&be.set(n,r.html)}catch{}finally{be.has(n)&&He.delete(n),k.widgetCacheVersion++}}}const Ke=new Map;function $t(n,e){Ke.set(n,e)}function Wt(n){Ke.delete(n)}function Re(n){return Ke.get(n)}const zt=We({current:null});function _e(n){zt.current=n}function Ye(n,e){re(e,!0);let r=we(e,["$$slots","$$events","$$legacy"]);const a=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"}],["path",{d:"m3.3 7 8.7 5 8.7-5"}],["path",{d:"M12 22V12"}]];ye(n,he({name:"box"},()=>r,{get iconNode(){return a},children:(d,p)=>{var o=de(),y=se(o);fe(y,()=>e.children??ve),w(d,o)},$$slots:{default:!0}})),ie()}var Vt=N('<img class="auto-card-icon svelte-1y09vim" referrerpolicy="no-referrer"/>'),Ft=N('<div class="auto-card-icon-placeholder svelte-1y09vim"><!></div>'),jt=N('<button class="auto-card-tool-btn sig-switch svelte-1y09vim" disabled=""><!> <span class="truncate"> </span></button>'),Bt=N('<div class="auto-card-tools svelte-1y09vim"></div>'),Ut=N('<div class="auto-card-empty svelte-1y09vim"><span class="sig-label">No tools exposed</span></div>'),Gt=N('<div class="auto-card svelte-1y09vim"><div class="auto-card-header svelte-1y09vim"><!> <span class="auto-card-name svelte-1y09vim"> </span> <span class="sig-meta ml-auto"> </span></div> <!></div>');function qt(n,e){re(e,!0);var r=Gt(),a=c(r),d=c(a);{var p=O=>{var S=Vt();ee(()=>{ge(S,"src",e.icon),ge(S,"alt",e.name)}),w(O,S)},o=O=>{var S=Ft(),$=c(S);Ye($,{class:"size-4"}),s(S),w(O,S)};J(d,O=>{e.icon?O(p):O(o,-1)})}var y=_(d,2),G=c(y,!0);s(y);var R=_(y,2),P=c(R);s(R),s(a);var D=_(a,2);{var H=O=>{var S=Bt();Te(S,21,()=>e.autoCard.tools,$=>$.name,($,W)=>{var j=jt(),F=c(j);at(F,{class:"size-3 shrink-0 opacity-50"});var te=_(F,2),I=c(te,!0);s(te),s(j),ee(()=>{ge(j,"title",t(W).description||t(W).name),ae(I,t(W).name)}),w($,j)}),s(S),w(O,S)},A=O=>{var S=Ut();w(O,S)};J(D,O=>{e.autoCard.tools.length>0?O(H):O(A,-1)})}s(r),ee(()=>{ae(G,e.name),ae(P,`${e.autoCard.tools.length??""} tools`)}),w(n,r),ie()}const Xt='// Signet Page Agent bundle - PageController + lightweight cursor mask\n// Auto-generated from @page-agent/page-controller v1.6.0\n\n\n(function(){\n // Lightweight SimulatorMask - cursor + overlay, no ai-motion dependency\n var CSS_TEXT = \'.__pa_mask{position:fixed;inset:0;z-index:2147483641;cursor:wait;overflow:hidden;display:none;background:rgba(0,0,0,0.02)}.__pa_mask.__pa_vis{display:block}.__pa_cur{position:absolute;width:40px;height:40px;pointer-events:none;z-index:10000;transition:none}.__pa_cur_fill{position:absolute;width:100%;height:100%;background:url("data:image/svg+xml,%3csvg xmlns=\\\'http://www.w3.org/2000/svg\\\' viewBox=\\\'0 0 100 100\\\'%3e%3cpath d=\\\'M 15 42 L 15 36.99 Q 15 31.99 23.7 31.99 L 28.05 31.99 Q 32.41 31.99 32.41 21.99 L 32.41 17 Q 32.41 12 41.09 16.95 L 76.31 37.05 Q 85 42 76.31 46.95 L 41.09 67.05 Q 32.41 72 32.41 62.01 L 32.41 57.01 Q 32.41 52.01 23.7 52.01 L 19.35 52.01 Q 15 52.01 15 47.01 Z\\\' fill=\\\'%23ffffff\\\' stroke=\\\'%23333\\\' stroke-width=\\\'4\\\'/%3e%3c/svg%3e");background-size:100% 100%;transform-origin:center;transform:rotate(-135deg) scale(1.1);margin-left:-8px;margin-top:-14px}.__pa_cur_border{position:absolute;width:100%;height:100%;background:linear-gradient(45deg,rgb(57,182,255),rgb(189,69,251));mask-image:url("data:image/svg+xml,%3csvg xmlns=\\\'http://www.w3.org/2000/svg\\\' viewBox=\\\'0 0 100 100\\\' fill=\\\'none\\\'%3e%3cpath d=\\\'M 15 42 L 15 36.99 Q 15 31.99 23.7 31.99 L 28.05 31.99 Q 32.41 31.99 32.41 21.99 L 32.41 17 Q 32.41 12 41.09 16.95 L 76.31 37.05 Q 85 42 76.31 46.95 L 41.09 67.05 Q 32.41 72 32.41 62.01 L 32.41 57.01 Q 32.41 52.01 23.7 52.01 L 19.35 52.01 Q 15 52.01 15 47.01 Z\\\' stroke=\\\'%23000\\\' stroke-width=\\\'6\\\'/%3e%3c/svg%3e");mask-size:100% 100%;mask-repeat:no-repeat;transform-origin:center;transform:rotate(-135deg) scale(1.2);margin-left:-10px;margin-top:-18px}.__pa_ripple{position:absolute;width:100%;height:100%;pointer-events:none;margin-left:-50%;margin-top:-50%}.__pa_ripple::after{content:\\\'\\\';opacity:0;position:absolute;inset:0;border:3px solid rgba(57,182,255,1);border-radius:50%}.__pa_cur.__pa_click .__pa_ripple::after{animation:__pa_rip 300ms ease-out forwards}@keyframes __pa_rip{0%{transform:scale(0);opacity:1}100%{transform:scale(2);opacity:0}}\';\n \n try{\n var s=document.createElement(\'style\');\n s.appendChild(document.createTextNode(CSS_TEXT));\n document.head.appendChild(s);\n }catch(e){}\n\n function LiteMask(){\n this.shown=false;\n this.wrapper=document.createElement(\'div\');\n this.wrapper.className=\'__pa_mask\';\n this.wrapper.setAttribute(\'data-page-agent-ignore\',\'true\');\n \n this._cursor=document.createElement(\'div\');\n this._cursor.className=\'__pa_cur\';\n var ripple=document.createElement(\'div\');ripple.className=\'__pa_ripple\';this._cursor.appendChild(ripple);\n var fill=document.createElement(\'div\');fill.className=\'__pa_cur_fill\';this._cursor.appendChild(fill);\n var border=document.createElement(\'div\');border.className=\'__pa_cur_border\';this._cursor.appendChild(border);\n this.wrapper.appendChild(this._cursor);\n \n this._cx=0;this._cy=0;this._tx=0;this._ty=0;\n \n // Block interactions on mask\n [\'click\',\'mousedown\',\'mouseup\',\'mousemove\',\'wheel\',\'keydown\',\'keyup\'].forEach(function(evt){\n this.wrapper.addEventListener(evt,function(e){e.stopPropagation();e.preventDefault();});\n }.bind(this));\n \n document.body.appendChild(this.wrapper);\n this._animate();\n \n var self=this;\n window.addEventListener(\'PageAgent::MovePointerTo\',function(e){\n var d=e.detail;self._tx=d.x;self._ty=d.y;\n });\n window.addEventListener(\'PageAgent::ClickPointer\',function(){\n self._cursor.classList.remove(\'__pa_click\');\n void self._cursor.offsetHeight;\n self._cursor.classList.add(\'__pa_click\');\n });\n }\n \n LiteMask.prototype._animate=function(){\n var nx=this._cx+(this._tx-this._cx)*0.2;\n var ny=this._cy+(this._ty-this._cy)*0.2;\n if(Math.abs(nx-this._tx)>0){this._cx=Math.abs(nx-this._tx)<2?this._tx:nx;this._cursor.style.left=this._cx+\'px\';}\n if(Math.abs(ny-this._ty)>0){this._cy=Math.abs(ny-this._ty)<2?this._ty:ny;this._cursor.style.top=this._cy+\'px\';}\n requestAnimationFrame(this._animate.bind(this));\n };\n \n LiteMask.prototype.show=function(){\n if(this.shown)return;this.shown=true;\n this.wrapper.classList.add(\'__pa_vis\');\n this._cx=window.innerWidth/2;this._cy=window.innerHeight/2;\n this._tx=this._cx;this._ty=this._cy;\n this._cursor.style.left=this._cx+\'px\';this._cursor.style.top=this._cy+\'px\';\n };\n \n LiteMask.prototype.hide=function(){\n if(!this.shown)return;this.shown=false;\n this._cursor.classList.remove(\'__pa_click\');\n var w=this.wrapper;\n setTimeout(function(){w.classList.remove(\'__pa_vis\');},300);\n };\n \n LiteMask.prototype.dispose=function(){this.wrapper.remove();};\n \n window.__LiteMask=LiteMask;\n})();\n\n// --- PageController (modified: SimulatorMask replaced with LiteMask) ---\n(function(){\n(function(){var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:true});function isHTMLElement(el){return!!el&&el.nodeType===1}__name(isHTMLElement,"isHTMLElement");function isInputElement(el){return el?.nodeType===1&&el.tagName==="INPUT"}__name(isInputElement,"isInputElement");function isTextAreaElement(el){return el?.nodeType===1&&el.tagName==="TEXTAREA"}__name(isTextAreaElement,"isTextAreaElement");function isSelectElement(el){return el?.nodeType===1&&el.tagName==="SELECT"}__name(isSelectElement,"isSelectElement");function isAnchorElement(el){return el?.nodeType===1&&el.tagName==="A"}__name(isAnchorElement,"isAnchorElement");function getIframeOffset(element){const frame=element.ownerDocument.defaultView?.frameElement;if(!frame)return{x:0,y:0};const rect=frame.getBoundingClientRect();return{x:rect.left,y:rect.top}}__name(getIframeOffset,"getIframeOffset");function getNativeValueSetter(element){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element),"value").set}__name(getNativeValueSetter,"getNativeValueSetter");async function waitFor(seconds){await new Promise((resolve)=>setTimeout(resolve,seconds*1000))}__name(waitFor,"waitFor");async function movePointerToElement(element){const rect=element.getBoundingClientRect();const offset=getIframeOffset(element);const x=rect.left+rect.width/2+offset.x;const y=rect.top+rect.height/2+offset.y;window.dispatchEvent(new CustomEvent("PageAgent::MovePointerTo",{detail:{x,y}}));await waitFor(0.3)}__name(movePointerToElement,"movePointerToElement");function getElementByIndex(selectorMap,index){const interactiveNode=selectorMap.get(index);if(!interactiveNode){throw new Error(`No interactive element found at index ${index}`)}const element=interactiveNode.ref;if(!element){throw new Error(`Element at index ${index} does not have a reference`)}if(!isHTMLElement(element)){throw new Error(`Element at index ${index} is not an HTMLElement`)}return element}__name(getElementByIndex,"getElementByIndex");let lastClickedElement=null;function blurLastClickedElement(){if(lastClickedElement){lastClickedElement.blur();lastClickedElement.dispatchEvent(new MouseEvent("mouseout",{bubbles:true,cancelable:true}));lastClickedElement.dispatchEvent(new MouseEvent("mouseleave",{bubbles:false,cancelable:true}));lastClickedElement=null}}__name(blurLastClickedElement,"blurLastClickedElement");async function clickElement(element){blurLastClickedElement();lastClickedElement=element;await scrollIntoViewIfNeeded(element);const frame=element.ownerDocument.defaultView?.frameElement;if(frame)await scrollIntoViewIfNeeded(frame);await movePointerToElement(element);window.dispatchEvent(new CustomEvent("PageAgent::ClickPointer"));await waitFor(0.1);element.dispatchEvent(new MouseEvent("mouseenter",{bubbles:true,cancelable:true}));element.dispatchEvent(new MouseEvent("mouseover",{bubbles:true,cancelable:true}));element.dispatchEvent(new MouseEvent("mousedown",{bubbles:true,cancelable:true}));element.focus();element.dispatchEvent(new MouseEvent("mouseup",{bubbles:true,cancelable:true}));element.dispatchEvent(new MouseEvent("click",{bubbles:true,cancelable:true}));await waitFor(0.2)}__name(clickElement,"clickElement");async function inputTextElement(element,text){const isContentEditable=element.isContentEditable;if(!isInputElement(element)&&!isTextAreaElement(element)&&!isContentEditable){throw new Error("Element is not an input, textarea, or contenteditable")}await clickElement(element);if(isContentEditable){if(element.dispatchEvent(new InputEvent("beforeinput",{bubbles:true,cancelable:true,inputType:"deleteContent"}))){element.innerText="";element.dispatchEvent(new InputEvent("input",{bubbles:true,inputType:"deleteContent"}))}if(element.dispatchEvent(new InputEvent("beforeinput",{bubbles:true,cancelable:true,inputType:"insertText",data:text}))){element.innerText=text;element.dispatchEvent(new InputEvent("input",{bubbles:true,inputType:"insertText",data:text}))}const planASucceeded=element.innerText.trim()===text.trim();if(!planASucceeded){element.focus();const doc=element.ownerDocument;const selection=(doc.defaultView||window).getSelection();const range=doc.createRange();range.selectNodeContents(element);selection?.removeAllRanges();selection?.addRange(range);doc.execCommand("delete",false);doc.execCommand("insertText",false,text)}element.dispatchEvent(new Event("change",{bubbles:true}));element.blur()}else{getNativeValueSetter(element).call(element,text)}if(!isContentEditable){element.dispatchEvent(new Event("input",{bubbles:true}))}await waitFor(0.1);blurLastClickedElement()}__name(inputTextElement,"inputTextElement");async function selectOptionElement(selectElement,optionText){if(!isSelectElement(selectElement)){throw new Error("Element is not a select element")}const options=Array.from(selectElement.options);const option=options.find((opt)=>opt.textContent?.trim()===optionText.trim());if(!option){throw new Error(`Option with text "${optionText}" not found in select element`)}selectElement.value=option.value;selectElement.dispatchEvent(new Event("change",{bubbles:true}));await waitFor(0.1)}__name(selectOptionElement,"selectOptionElement");async function scrollIntoViewIfNeeded(element){const el=element;if(typeof el.scrollIntoViewIfNeeded==="function"){el.scrollIntoViewIfNeeded()}else{element.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"})}}__name(scrollIntoViewIfNeeded,"scrollIntoViewIfNeeded");async function scrollVertically(down,scroll_amount,element){if(element){const targetElement=element;let currentElement=targetElement;let scrollSuccess=false;let scrolledElement=null;let scrollDelta=0;let attempts=0;const dy2=scroll_amount;while(currentElement&&attempts<10){const computedStyle=window.getComputedStyle(currentElement);const hasScrollableY=/(auto|scroll|overlay)/.test(computedStyle.overflowY);const canScrollVertically=currentElement.scrollHeight>currentElement.clientHeight;if(hasScrollableY&&canScrollVertically){const beforeScroll=currentElement.scrollTop;const maxScroll=currentElement.scrollHeight-currentElement.clientHeight;let scrollAmount=dy2/3;if(scrollAmount>0){scrollAmount=Math.min(scrollAmount,maxScroll-beforeScroll)}else{scrollAmount=Math.max(scrollAmount,-beforeScroll)}currentElement.scrollTop=beforeScroll+scrollAmount;const afterScroll=currentElement.scrollTop;const actualScrollDelta=afterScroll-beforeScroll;if(Math.abs(actualScrollDelta)>0.5){scrollSuccess=true;scrolledElement=currentElement;scrollDelta=actualScrollDelta;break}}if(currentElement===document.body||currentElement===document.documentElement){break}currentElement=currentElement.parentElement;attempts++}if(scrollSuccess){return`Scrolled container (${scrolledElement?.tagName}) by ${scrollDelta}px`}else{return`No scrollable container found for element (${targetElement.tagName})`}}const dy=scroll_amount;const bigEnough=__name((el2)=>el2.clientHeight>=window.innerHeight*0.5,"bigEnough");const canScroll=__name((el2)=>el2&&/(auto|scroll|overlay)/.test(getComputedStyle(el2).overflowY)&&el2.scrollHeight>el2.clientHeight&&bigEnough(el2),"canScroll");let el=document.activeElement;while(el&&!canScroll(el)&&el!==document.body)el=el.parentElement;el=canScroll(el)?el:Array.from(document.querySelectorAll("*")).find(canScroll)||document.scrollingElement||document.documentElement;if(el===document.scrollingElement||el===document.documentElement||el===document.body){const scrollBefore=window.scrollY;const scrollMax=document.documentElement.scrollHeight-window.innerHeight;window.scrollBy(0,dy);const scrollAfter=window.scrollY;const scrolled=scrollAfter-scrollBefore;if(Math.abs(scrolled)<1){return dy>0?`⚠️ Already at the bottom of the page, cannot scroll down further.`:`⚠️ Already at the top of the page, cannot scroll up further.`}const reachedBottom=dy>0&&scrollAfter>=scrollMax-1;const reachedTop=dy<0&&scrollAfter<=1;if(reachedBottom)return`✅ Scrolled page by ${scrolled}px. Reached the bottom of the page.`;if(reachedTop)return`✅ Scrolled page by ${scrolled}px. Reached the top of the page.`;return`✅ Scrolled page by ${scrolled}px.`}else{const scrollBefore=el.scrollTop;const scrollMax=el.scrollHeight-el.clientHeight;el.scrollBy({top:dy,behavior:"smooth"});await waitFor(0.1);const scrollAfter=el.scrollTop;const scrolled=scrollAfter-scrollBefore;if(Math.abs(scrolled)<1){return dy>0?`⚠️ Already at the bottom of container (${el.tagName}), cannot scroll down further.`:`⚠️ Already at the top of container (${el.tagName}), cannot scroll up further.`}const reachedBottom=dy>0&&scrollAfter>=scrollMax-1;const reachedTop=dy<0&&scrollAfter<=1;if(reachedBottom)return`✅ Scrolled container (${el.tagName}) by ${scrolled}px. Reached the bottom.`;if(reachedTop)return`✅ Scrolled container (${el.tagName}) by ${scrolled}px. Reached the top.`;return`✅ Scrolled container (${el.tagName}) by ${scrolled}px.`}}__name(scrollVertically,"scrollVertically");async function scrollHorizontally(right,scroll_amount,element){if(element){const targetElement=element;let currentElement=targetElement;let scrollSuccess=false;let scrolledElement=null;let scrollDelta=0;let attempts=0;const dx2=right?scroll_amount:-scroll_amount;while(currentElement&&attempts<10){const computedStyle=window.getComputedStyle(currentElement);const hasScrollableX=/(auto|scroll|overlay)/.test(computedStyle.overflowX);const canScrollHorizontally=currentElement.scrollWidth>currentElement.clientWidth;if(hasScrollableX&&canScrollHorizontally){const beforeScroll=currentElement.scrollLeft;const maxScroll=currentElement.scrollWidth-currentElement.clientWidth;let scrollAmount=dx2/3;if(scrollAmount>0){scrollAmount=Math.min(scrollAmount,maxScroll-beforeScroll)}else{scrollAmount=Math.max(scrollAmount,-beforeScroll)}currentElement.scrollLeft=beforeScroll+scrollAmount;const afterScroll=currentElement.scrollLeft;const actualScrollDelta=afterScroll-beforeScroll;if(Math.abs(actualScrollDelta)>0.5){scrollSuccess=true;scrolledElement=currentElement;scrollDelta=actualScrollDelta;break}}if(currentElement===document.body||currentElement===document.documentElement){break}currentElement=currentElement.parentElement;attempts++}if(scrollSuccess){return`Scrolled container (${scrolledElement?.tagName}) horizontally by ${scrollDelta}px`}else{return`No horizontally scrollable container found for element (${targetElement.tagName})`}}const dx=right?scroll_amount:-scroll_amount;const bigEnough=__name((el2)=>el2.clientWidth>=window.innerWidth*0.5,"bigEnough");const canScroll=__name((el2)=>el2&&/(auto|scroll|overlay)/.test(getComputedStyle(el2).overflowX)&&el2.scrollWidth>el2.clientWidth&&bigEnough(el2),"canScroll");let el=document.activeElement;while(el&&!canScroll(el)&&el!==document.body)el=el.parentElement;el=canScroll(el)?el:Array.from(document.querySelectorAll("*")).find(canScroll)||document.scrollingElement||document.documentElement;if(el===document.scrollingElement||el===document.documentElement||el===document.body){const scrollBefore=window.scrollX;const scrollMax=document.documentElement.scrollWidth-window.innerWidth;window.scrollBy(dx,0);const scrollAfter=window.scrollX;const scrolled=scrollAfter-scrollBefore;if(Math.abs(scrolled)<1){return dx>0?`⚠️ Already at the right edge of the page, cannot scroll right further.`:`⚠️ Already at the left edge of the page, cannot scroll left further.`}const reachedRight=dx>0&&scrollAfter>=scrollMax-1;const reachedLeft=dx<0&&scrollAfter<=1;if(reachedRight)return`✅ Scrolled page by ${scrolled}px. Reached the right edge of the page.`;if(reachedLeft)return`✅ Scrolled page by ${scrolled}px. Reached the left edge of the page.`;return`✅ Scrolled page horizontally by ${scrolled}px.`}else{const scrollBefore=el.scrollLeft;const scrollMax=el.scrollWidth-el.clientWidth;el.scrollBy({left:dx,behavior:"smooth"});await waitFor(0.1);const scrollAfter=el.scrollLeft;const scrolled=scrollAfter-scrollBefore;if(Math.abs(scrolled)<1){return dx>0?`⚠️ Already at the right edge of container (${el.tagName}), cannot scroll right further.`:`⚠️ Already at the left edge of container (${el.tagName}), cannot scroll left further.`}const reachedRight=dx>0&&scrollAfter>=scrollMax-1;const reachedLeft=dx<0&&scrollAfter<=1;if(reachedRight)return`✅ Scrolled container (${el.tagName}) by ${scrolled}px. Reached the right edge.`;if(reachedLeft)return`✅ Scrolled container (${el.tagName}) by ${scrolled}px. Reached the left edge.`;return`✅ Scrolled container (${el.tagName}) horizontally by ${scrolled}px.`}}__name(scrollHorizontally,"scrollHorizontally");const domTree=__name((args={doHighlightElements:true,focusHighlightIndex:-1,viewportExpansion:0,debugMode:false,interactiveBlacklist:[],interactiveWhitelist:[],highlightOpacity:0.1,highlightLabelOpacity:0.5})=>{const{interactiveBlacklist,interactiveWhitelist,highlightOpacity,highlightLabelOpacity}=args;const{doHighlightElements,focusHighlightIndex,viewportExpansion,debugMode}=args;let highlightIndex=0;const extraData=new WeakMap;function addExtraData(element,data){if(!element||element.nodeType!==Node.ELEMENT_NODE)return;extraData.set(element,{...extraData.get(element),...data})}__name(addExtraData,"addExtraData");const DOM_CACHE={boundingRects:new WeakMap,clientRects:new WeakMap,computedStyles:new WeakMap,clearCache:__name(()=>{DOM_CACHE.boundingRects=new WeakMap;DOM_CACHE.clientRects=new WeakMap;DOM_CACHE.computedStyles=new WeakMap},"clearCache")};function getCachedBoundingRect(element){if(!element)return null;if(DOM_CACHE.boundingRects.has(element)){return DOM_CACHE.boundingRects.get(element)}const rect=element.getBoundingClientRect();if(rect){DOM_CACHE.boundingRects.set(element,rect)}return rect}__name(getCachedBoundingRect,"getCachedBoundingRect");function getCachedComputedStyle(element){if(!element)return null;if(DOM_CACHE.computedStyles.has(element)){return DOM_CACHE.computedStyles.get(element)}const style=window.getComputedStyle(element);if(style){DOM_CACHE.computedStyles.set(element,style)}return style}__name(getCachedComputedStyle,"getCachedComputedStyle");function getCachedClientRects(element){if(!element)return null;if(DOM_CACHE.clientRects.has(element)){return DOM_CACHE.clientRects.get(element)}const rects=element.getClientRects();if(rects){DOM_CACHE.clientRects.set(element,rects)}return rects}__name(getCachedClientRects,"getCachedClientRects");const DOM_HASH_MAP={};const ID={current:0};const HIGHLIGHT_CONTAINER_ID="playwright-highlight-container";function highlightElement(element,index,parentIframe=null){if(!element)return index;const overlays=[];let label=null;let labelWidth=20;let labelHeight=16;let cleanupFn=null;try{let container=document.getElementById(HIGHLIGHT_CONTAINER_ID);if(!container){container=document.createElement("div");container.id=HIGHLIGHT_CONTAINER_ID;container.style.position="fixed";container.style.pointerEvents="none";container.style.top="0";container.style.left="0";container.style.width="100%";container.style.height="100%";container.style.zIndex="2147483640";container.style.backgroundColor="transparent";document.body.appendChild(container)}const rects=element.getClientRects();if(!rects||rects.length===0)return index;const colors=["#FF0000","#00FF00","#0000FF","#FFA500","#800080","#008080","#FF69B4","#4B0082","#FF4500","#2E8B57","#DC143C","#4682B4"];const colorIndex=index%colors.length;let baseColor=colors[colorIndex];const backgroundColor=baseColor+Math.floor(highlightOpacity*255).toString(16).padStart(2,"0");baseColor=baseColor+Math.floor(highlightLabelOpacity*255).toString(16).padStart(2,"0");let iframeOffset={x:0,y:0};if(parentIframe){const iframeRect=parentIframe.getBoundingClientRect();iframeOffset.x=iframeRect.left;iframeOffset.y=iframeRect.top}const fragment=document.createDocumentFragment();for(const rect of rects){if(rect.width===0||rect.height===0)continue;const overlay=document.createElement("div");overlay.style.position="fixed";overlay.style.border=`2px solid ${baseColor}`;overlay.style.backgroundColor=backgroundColor;overlay.style.pointerEvents="none";overlay.style.boxSizing="border-box";const top=rect.top+iframeOffset.y;const left=rect.left+iframeOffset.x;overlay.style.top=`${top}px`;overlay.style.left=`${left}px`;overlay.style.width=`${rect.width}px`;overlay.style.height=`${rect.height}px`;fragment.appendChild(overlay);overlays.push({element:overlay,initialRect:rect})}const firstRect=rects[0];label=document.createElement("div");label.className="playwright-highlight-label";label.style.position="fixed";label.style.background=baseColor;label.style.color="white";label.style.padding="1px 4px";label.style.borderRadius="4px";label.style.fontSize=`${Math.min(12,Math.max(8,firstRect.height/2))}px`;label.textContent=index.toString();labelWidth=label.offsetWidth>0?label.offsetWidth:labelWidth;labelHeight=label.offsetHeight>0?label.offsetHeight:labelHeight;const firstRectTop=firstRect.top+iframeOffset.y;const firstRectLeft=firstRect.left+iframeOffset.x;let labelTop=firstRectTop+2;let labelLeft=firstRectLeft+firstRect.width-labelWidth-2;if(firstRect.width<labelWidth+4||firstRect.height<labelHeight+4){labelTop=firstRectTop-labelHeight-2;labelLeft=firstRectLeft+firstRect.width-labelWidth;if(labelLeft<iframeOffset.x)labelLeft=firstRectLeft}labelTop=Math.max(0,Math.min(labelTop,window.innerHeight-labelHeight));labelLeft=Math.max(0,Math.min(labelLeft,window.innerWidth-labelWidth));label.style.top=`${labelTop}px`;label.style.left=`${labelLeft}px`;fragment.appendChild(label);const updatePositions=__name(()=>{const newRects=element.getClientRects();let newIframeOffset={x:0,y:0};if(parentIframe){const iframeRect=parentIframe.getBoundingClientRect();newIframeOffset.x=iframeRect.left;newIframeOffset.y=iframeRect.top}overlays.forEach((overlayData,i)=>{if(i<newRects.length){const newRect=newRects[i];const newTop=newRect.top+newIframeOffset.y;const newLeft=newRect.left+newIframeOffset.x;overlayData.element.style.top=`${newTop}px`;overlayData.element.style.left=`${newLeft}px`;overlayData.element.style.width=`${newRect.width}px`;overlayData.element.style.height=`${newRect.height}px`;overlayData.element.style.display=newRect.width===0||newRect.height===0?"none":"block"}else{overlayData.element.style.display="none"}});if(newRects.length<overlays.length){for(let i=newRects.length;i<overlays.length;i++){overlays[i].element.style.display="none"}}if(label&&newRects.length>0){const firstNewRect=newRects[0];const firstNewRectTop=firstNewRect.top+newIframeOffset.y;const firstNewRectLeft=firstNewRect.left+newIframeOffset.x;let newLabelTop=firstNewRectTop+2;let newLabelLeft=firstNewRectLeft+firstNewRect.width-labelWidth-2;if(firstNewRect.width<labelWidth+4||firstNewRect.height<labelHeight+4){newLabelTop=firstNewRectTop-labelHeight-2;newLabelLeft=firstNewRectLeft+firstNewRect.width-labelWidth;if(newLabelLeft<newIframeOffset.x)newLabelLeft=firstNewRectLeft}newLabelTop=Math.max(0,Math.min(newLabelTop,window.innerHeight-labelHeight));newLabelLeft=Math.max(0,Math.min(newLabelLeft,window.innerWidth-labelWidth));label.style.top=`${newLabelTop}px`;label.style.left=`${newLabelLeft}px`;label.style.display="block"}else if(label){label.style.display="none"}},"updatePositions");const throttleFunction=__name((func,delay)=>{let lastCall=0;return(...args2)=>{const now=performance.now();if(now-lastCall<delay)return;lastCall=now;return func(...args2)}},"throttleFunction");const throttledUpdatePositions=throttleFunction(updatePositions,16);window.addEventListener("scroll",throttledUpdatePositions,true);window.addEventListener("resize",throttledUpdatePositions);cleanupFn=__name(()=>{window.removeEventListener("scroll",throttledUpdatePositions,true);window.removeEventListener("resize",throttledUpdatePositions);overlays.forEach((overlay)=>overlay.element.remove());if(label)label.remove()},"cleanupFn");container.appendChild(fragment);return index+1}finally{if(cleanupFn){(window._highlightCleanupFunctions=window._highlightCleanupFunctions||[]).push(cleanupFn)}}}__name(highlightElement,"highlightElement");function isScrollableElement(element){if(!element||element.nodeType!==Node.ELEMENT_NODE){return null}const style=getCachedComputedStyle(element);if(!style)return null;const display=style.display;if(display==="inline"||display==="inline-block"){return null}const overflowX=style.overflowX;const overflowY=style.overflowY;const scrollableX=overflowX==="auto"||overflowX==="scroll";const scrollableY=overflowY==="auto"||overflowY==="scroll";if(!scrollableX&&!scrollableY){return null}const scrollWidth=element.scrollWidth-element.clientWidth;const scrollHeight=element.scrollHeight-element.clientHeight;const threshold=4;if(scrollWidth<threshold&&scrollHeight<threshold){return null}if(!scrollableY&&scrollWidth<threshold){return null}if(!scrollableX&&scrollHeight<threshold){return null}const distanceToTop=element.scrollTop;const distanceToLeft=element.scrollLeft;const distanceToRight=element.scrollWidth-element.clientWidth-element.scrollLeft;const distanceToBottom=element.scrollHeight-element.clientHeight-element.scrollTop;const scrollData={top:distanceToTop,right:distanceToRight,bottom:distanceToBottom,left:distanceToLeft};addExtraData(element,{scrollable:true,scrollData});return scrollData}__name(isScrollableElement,"isScrollableElement");function isTextNodeVisible(textNode){try{if(viewportExpansion===-1){const parentElement2=textNode.parentElement;if(!parentElement2)return false;try{return parentElement2.checkVisibility({checkOpacity:true,checkVisibilityCSS:true})}catch(e){const style=window.getComputedStyle(parentElement2);return style.display!=="none"&&style.visibility!=="hidden"&&style.opacity!=="0"}}const range=document.createRange();range.selectNodeContents(textNode);const rects=range.getClientRects();if(!rects||rects.length===0){return false}let isAnyRectVisible=false;let isAnyRectInViewport=false;for(const rect of rects){if(rect.width>0&&rect.height>0){isAnyRectVisible=true;if(!(rect.bottom<-viewportExpansion||rect.top>window.innerHeight+viewportExpansion||rect.right<-viewportExpansion||rect.left>window.innerWidth+viewportExpansion)){isAnyRectInViewport=true;break}}}if(!isAnyRectVisible||!isAnyRectInViewport){return false}const parentElement=textNode.parentElement;if(!parentElement)return false;try{return parentElement.checkVisibility({checkOpacity:true,checkVisibilityCSS:true})}catch(e){const style=window.getComputedStyle(parentElement);return style.display!=="none"&&style.visibility!=="hidden"&&style.opacity!=="0"}}catch(e){console.warn("Error checking text node visibility:",e);return false}}__name(isTextNodeVisible,"isTextNodeVisible");function isElementAccepted(element){if(!element||!element.tagName)return false;const alwaysAccept=new Set(["body","div","main","article","section","nav","header","footer"]);const tagName=element.tagName.toLowerCase();if(alwaysAccept.has(tagName))return true;const leafElementDenyList=new Set(["svg","script","style","link","meta","noscript","template"]);return!leafElementDenyList.has(tagName)}__name(isElementAccepted,"isElementAccepted");function isElementVisible(element){const style=getCachedComputedStyle(element);return element.offsetWidth>0&&element.offsetHeight>0&&style?.visibility!=="hidden"&&style?.display!=="none"}__name(isElementVisible,"isElementVisible");function isInteractiveElement(element){if(!element||element.nodeType!==Node.ELEMENT_NODE){return false}if(interactiveBlacklist.includes(element)){return false}if(interactiveWhitelist.includes(element)){return true}const tagName=element.tagName.toLowerCase();const style=getCachedComputedStyle(element);const interactiveCursors=new Set(["pointer","move","text","grab","grabbing","cell","copy","alias","all-scroll","col-resize","context-menu","crosshair","e-resize","ew-resize","help","n-resize","ne-resize","nesw-resize","ns-resize","nw-resize","nwse-resize","row-resize","s-resize","se-resize","sw-resize","vertical-text","w-resize","zoom-in","zoom-out"]);const nonInteractiveCursors=new Set(["not-allowed","no-drop","wait","progress","initial","inherit"]);function doesElementHaveInteractivePointer(element2){if(element2.tagName.toLowerCase()==="html")return false;if(style?.cursor&&interactiveCursors.has(style.cursor))return true;return false}__name(doesElementHaveInteractivePointer,"doesElementHaveInteractivePointer");let isInteractiveCursor=doesElementHaveInteractivePointer(element);if(isInteractiveCursor){return true}const interactiveElements=new Set(["a","button","input","select","textarea","details","summary","label","option","optgroup","fieldset","legend"]);const explicitDisableTags=new Set(["disabled","readonly"]);if(interactiveElements.has(tagName)){if(style?.cursor&&nonInteractiveCursors.has(style.cursor)){return false}for(const disableTag of explicitDisableTags){if(element.hasAttribute(disableTag)||element.getAttribute(disableTag)==="true"||element.getAttribute(disableTag)===""){return false}}if(element.disabled){return false}if(element.readOnly){return false}if(element.inert){return false}return true}const role=element.getAttribute("role");const ariaRole=element.getAttribute("aria-role");if(element.getAttribute("contenteditable")==="true"||element.isContentEditable){return true}if(element.classList&&(element.classList.contains("button")||element.classList.contains("dropdown-toggle")||element.getAttribute("data-index")||element.getAttribute("data-toggle")==="dropdown"||element.getAttribute("aria-haspopup")==="true")){return true}const interactiveRoles=new Set(["button","menu","menubar","menuitem","menuitemradio","menuitemcheckbox","radio","checkbox","tab","switch","slider","spinbutton","combobox","searchbox","textbox","listbox","option","scrollbar"]);const hasInteractiveRole=interactiveElements.has(tagName)||role&&interactiveRoles.has(role)||ariaRole&&interactiveRoles.has(ariaRole);if(hasInteractiveRole)return true;try{if(typeof getEventListeners==="function"){const listeners=getEventListeners(element);const mouseEvents=["click","mousedown","mouseup","dblclick"];for(const eventType of mouseEvents){if(listeners[eventType]&&listeners[eventType].length>0){return true}}}const getEventListenersForNode=element?.ownerDocument?.defaultView?.getEventListenersForNode||window.getEventListenersForNode;if(typeof getEventListenersForNode==="function"){const listeners=getEventListenersForNode(element);const interactionEvents=["click","mousedown","mouseup","keydown","keyup","submit","change","input","focus","blur"];for(const eventType of interactionEvents){for(const listener of listeners){if(listener.type===eventType){return true}}}}const commonMouseAttrs=["onclick","onmousedown","onmouseup","ondblclick"];for(const attr of commonMouseAttrs){if(element.hasAttribute(attr)||typeof element[attr]==="function"){return true}}}catch(e){}if(isScrollableElement(element)){return true}return false}__name(isInteractiveElement,"isInteractiveElement");function isTopElement(element){if(viewportExpansion===-1){return true}const rects=getCachedClientRects(element);if(!rects||rects.length===0){return false}let isAnyRectInViewport=false;for(const rect2 of rects){if(rect2.width>0&&rect2.height>0&&!(rect2.bottom<-viewportExpansion||rect2.top>window.innerHeight+viewportExpansion||rect2.right<-viewportExpansion||rect2.left>window.innerWidth+viewportExpansion)){isAnyRectInViewport=true;break}}if(!isAnyRectInViewport){return false}let doc=element.ownerDocument;if(doc!==window.document){return true}let rect=Array.from(rects).find((r)=>r.width>0&&r.height>0);if(!rect){return false}const shadowRoot=element.getRootNode();if(shadowRoot instanceof ShadowRoot){const centerX=rect.left+rect.width/2;const centerY=rect.top+rect.height/2;try{const topEl=shadowRoot.elementFromPoint(centerX,centerY);if(!topEl)return false;let current=topEl;while(current&&current!==shadowRoot){if(current===element)return true;current=current.parentElement}return false}catch(e){return true}}const margin=5;const checkPoints=[{x:rect.left+rect.width/2,y:rect.top+rect.height/2},{x:rect.left+margin,y:rect.top+margin},{x:rect.right-margin,y:rect.bottom-margin}];return checkPoints.some(({x,y})=>{try{const topEl=document.elementFromPoint(x,y);if(!topEl)return false;let current=topEl;while(current&&current!==document.documentElement){if(current===element)return true;current=current.parentElement}return false}catch(e){return true}})}__name(isTopElement,"isTopElement");function isInExpandedViewport(element,viewportExpansion2){if(viewportExpansion2===-1){return true}const rects=element.getClientRects();if(!rects||rects.length===0){const boundingRect=getCachedBoundingRect(element);if(!boundingRect||boundingRect.width===0||boundingRect.height===0){return false}return!(boundingRect.bottom<-viewportExpansion2||boundingRect.top>window.innerHeight+viewportExpansion2||boundingRect.right<-viewportExpansion2||boundingRect.left>window.innerWidth+viewportExpansion2)}for(const rect of rects){if(rect.width===0||rect.height===0)continue;if(!(rect.bottom<-viewportExpansion2||rect.top>window.innerHeight+viewportExpansion2||rect.right<-viewportExpansion2||rect.left>window.innerWidth+viewportExpansion2)){return true}}return false}__name(isInExpandedViewport,"isInExpandedViewport");function isInteractiveCandidate(element){if(!element||element.nodeType!==Node.ELEMENT_NODE)return false;const tagName=element.tagName.toLowerCase();const interactiveElements=new Set(["a","button","input","select","textarea","details","summary","label"]);if(interactiveElements.has(tagName))return true;const hasQuickInteractiveAttr=element.hasAttribute("onclick")||element.hasAttribute("role")||element.hasAttribute("tabindex")||element.hasAttribute("aria-")||element.hasAttribute("data-action")||element.getAttribute("contenteditable")==="true";return hasQuickInteractiveAttr}__name(isInteractiveCandidate,"isInteractiveCandidate");const DISTINCT_INTERACTIVE_TAGS=new Set(["a","button","input","select","textarea","summary","details","label","option"]);const INTERACTIVE_ROLES=new Set(["button","link","menuitem","menuitemradio","menuitemcheckbox","radio","checkbox","tab","switch","slider","spinbutton","combobox","searchbox","textbox","listbox","option","scrollbar"]);function isHeuristicallyInteractive(element){if(!element||element.nodeType!==Node.ELEMENT_NODE)return false;if(!isElementVisible(element))return false;const hasInteractiveAttributes=element.hasAttribute("role")||element.hasAttribute("tabindex")||element.hasAttribute("onclick")||typeof element.onclick==="function";const hasInteractiveClass=/\\b(btn|clickable|menu|item|entry|link)\\b/i.test(element.className||"");const isInKnownContainer=Boolean(element.closest(\'button,a,[role="button"],.menu,.dropdown,.list,.toolbar\'));const hasVisibleChildren=[...element.children].some(isElementVisible);const isParentBody=element.parentElement&&element.parentElement.isSameNode(document.body);return(isInteractiveElement(element)||hasInteractiveAttributes||hasInteractiveClass)&&hasVisibleChildren&&isInKnownContainer&&!isParentBody}__name(isHeuristicallyInteractive,"isHeuristicallyInteractive");function isElementDistinctInteraction(element){if(!element||element.nodeType!==Node.ELEMENT_NODE){return false}const tagName=element.tagName.toLowerCase();const role=element.getAttribute("role");if(tagName==="iframe"){return true}if(DISTINCT_INTERACTIVE_TAGS.has(tagName)){return true}if(role&&INTERACTIVE_ROLES.has(role)){return true}if(element.isContentEditable||element.getAttribute("contenteditable")==="true"){return true}if(element.hasAttribute("data-testid")||element.hasAttribute("data-cy")||element.hasAttribute("data-test")){return true}if(element.hasAttribute("onclick")||typeof element.onclick==="function"){return true}try{const getEventListenersForNode=element?.ownerDocument?.defaultView?.getEventListenersForNode||window.getEventListenersForNode;if(typeof getEventListenersForNode==="function"){const listeners=getEventListenersForNode(element);const interactionEvents=["click","mousedown","mouseup","keydown","keyup","submit","change","input","focus","blur"];for(const eventType of interactionEvents){for(const listener of listeners){if(listener.type===eventType){return true}}}}const commonEventAttrs=["onmousedown","onmouseup","onkeydown","onkeyup","onsubmit","onchange","oninput","onfocus","onblur"];if(commonEventAttrs.some((attr)=>element.hasAttribute(attr))){return true}}catch(e){}if(isHeuristicallyInteractive(element)){return true}return false}__name(isElementDistinctInteraction,"isElementDistinctInteraction");function handleHighlighting(nodeData,node,parentIframe,isParentHighlighted){if(!nodeData.isInteractive)return false;let shouldHighlight=false;if(!isParentHighlighted){shouldHighlight=true}else{if(isElementDistinctInteraction(node)){shouldHighlight=true}else{shouldHighlight=false}}if(shouldHighlight){nodeData.isInViewport=isInExpandedViewport(node,viewportExpansion);if(nodeData.isInViewport||viewportExpansion===-1){nodeData.highlightIndex=highlightIndex++;if(doHighlightElements){if(focusHighlightIndex>=0){if(focusHighlightIndex===nodeData.highlightIndex){highlightElement(node,nodeData.highlightIndex,parentIframe)}}else{highlightElement(node,nodeData.highlightIndex,parentIframe)}return true}}}return false}__name(handleHighlighting,"handleHighlighting");function buildDomTree(node,parentIframe=null,isParentHighlighted=false){if(!node||node.id===HIGHLIGHT_CONTAINER_ID||node.nodeType!==Node.ELEMENT_NODE&&node.nodeType!==Node.TEXT_NODE){return null}if(!node||node.id===HIGHLIGHT_CONTAINER_ID){return null}if(node.dataset?.browserUseIgnore==="true"||node.dataset?.pageAgentIgnore==="true"){return null}if(node.getAttribute&&node.getAttribute("aria-hidden")==="true"){return null}if(node===document.body){const nodeData2={tagName:"body",attributes:{},xpath:"/body",children:[]};for(const child of node.childNodes){const domElement=buildDomTree(child,parentIframe,false);if(domElement)nodeData2.children.push(domElement)}const id2=`${ID.current++}`;DOM_HASH_MAP[id2]=nodeData2;return id2}if(node.nodeType!==Node.ELEMENT_NODE&&node.nodeType!==Node.TEXT_NODE){return null}if(node.nodeType===Node.TEXT_NODE){const textContent=node.textContent?.trim();if(!textContent){return null}const parentElement=node.parentElement;if(!parentElement||parentElement.tagName.toLowerCase()==="script"){return null}const id2=`${ID.current++}`;DOM_HASH_MAP[id2]={type:"TEXT_NODE",text:textContent,isVisible:isTextNodeVisible(node)};return id2}if(node.nodeType===Node.ELEMENT_NODE&&!isElementAccepted(node)){return null}if(viewportExpansion!==-1&&!node.shadowRoot){const rect=getCachedBoundingRect(node);const style=getCachedComputedStyle(node);const isFixedOrSticky=style&&(style.position==="fixed"||style.position==="sticky");const hasSize=node.offsetWidth>0||node.offsetHeight>0;if(!rect||!isFixedOrSticky&&!hasSize&&(rect.bottom<-viewportExpansion||rect.top>window.innerHeight+viewportExpansion||rect.right<-viewportExpansion||rect.left>window.innerWidth+viewportExpansion)){return null}}const nodeData={tagName:node.tagName.toLowerCase(),attributes:{},children:[]};if(isInteractiveCandidate(node)||node.tagName.toLowerCase()==="iframe"||node.tagName.toLowerCase()==="body"){const attributeNames=node.getAttributeNames?.()||[];for(const name of attributeNames){const value=node.getAttribute(name);nodeData.attributes[name]=value}if(node.tagName.toLowerCase()==="input"&&(node.type==="checkbox"||node.type==="radio")){nodeData.attributes.checked=node.checked?"true":"false"}}let nodeWasHighlighted=false;if(node.nodeType===Node.ELEMENT_NODE){nodeData.isVisible=isElementVisible(node);if(nodeData.isVisible){nodeData.isTopElement=isTopElement(node);const role=node.getAttribute("role");const isMenuContainer=role==="menu"||role==="menubar"||role==="listbox";if(nodeData.isTopElement||isMenuContainer){nodeData.isInteractive=isInteractiveElement(node);nodeWasHighlighted=handleHighlighting(nodeData,node,parentIframe,isParentHighlighted);nodeData.ref=node;if(nodeData.isInteractive&&Object.keys(nodeData.attributes).length===0){const attributeNames=node.getAttributeNames?.()||[];for(const name of attributeNames){const value=node.getAttribute(name);nodeData.attributes[name]=value}}}}}if(node.tagName){const tagName=node.tagName.toLowerCase();if(tagName==="iframe"){try{const iframeDoc=node.contentDocument||node.contentWindow?.document;if(iframeDoc){for(const child of iframeDoc.childNodes){const domElement=buildDomTree(child,node,false);if(domElement)nodeData.children.push(domElement)}}}catch(e){console.warn("Unable to access iframe:",e)}}else if(node.isContentEditable||node.getAttribute("contenteditable")==="true"||node.id==="tinymce"||node.classList.contains("mce-content-body")||tagName==="body"&&node.getAttribute("data-id")?.startsWith("mce_")){for(const child of node.childNodes){const domElement=buildDomTree(child,parentIframe,nodeWasHighlighted);if(domElement)nodeData.children.push(domElement)}}else{if(node.shadowRoot){nodeData.shadowRoot=true;for(const child of node.shadowRoot.childNodes){const domElement=buildDomTree(child,parentIframe,nodeWasHighlighted);if(domElement)nodeData.children.push(domElement)}}for(const child of node.childNodes){const passHighlightStatusToChild=nodeWasHighlighted||isParentHighlighted;const domElement=buildDomTree(child,parentIframe,passHighlightStatusToChild);if(domElement)nodeData.children.push(domElement)}}}if(nodeData.tagName==="a"&&nodeData.children.length===0&&!nodeData.attributes.href){const rect=getCachedBoundingRect(node);const hasSize=rect&&rect.width>0&&rect.height>0||node.offsetWidth>0||node.offsetHeight>0;if(!hasSize){return null}}nodeData.extra=extraData.get(node)||null;const id=`${ID.current++}`;DOM_HASH_MAP[id]=nodeData;return id}__name(buildDomTree,"buildDomTree");const rootId=buildDomTree(document.body);DOM_CACHE.clearCache();return{rootId,map:DOM_HASH_MAP}},"domTree");const DEFAULT_VIEWPORT_EXPANSION=-1;function resolveViewportExpansion(viewportExpansion){return viewportExpansion??DEFAULT_VIEWPORT_EXPANSION}__name(resolveViewportExpansion,"resolveViewportExpansion");const newElementsCache=new WeakMap;function getFlatTree(config){const viewportExpansion=resolveViewportExpansion(config.viewportExpansion);const interactiveBlacklist=[];for(const item of config.interactiveBlacklist||[]){if(typeof item==="function"){interactiveBlacklist.push(item())}else{interactiveBlacklist.push(item)}}const interactiveWhitelist=[];for(const item of config.interactiveWhitelist||[]){if(typeof item==="function"){interactiveWhitelist.push(item())}else{interactiveWhitelist.push(item)}}const elements=domTree({doHighlightElements:true,debugMode:true,focusHighlightIndex:-1,viewportExpansion,interactiveBlacklist,interactiveWhitelist,highlightOpacity:config.highlightOpacity??0,highlightLabelOpacity:config.highlightLabelOpacity??0.1});const currentUrl=window.location.href;for(const nodeId in elements.map){const node=elements.map[nodeId];if(node.isInteractive&&node.ref){const ref=node.ref;if(!newElementsCache.has(ref)){newElementsCache.set(ref,currentUrl);node.isNew=true}}}return elements}__name(getFlatTree,"getFlatTree");const globRegexCache=new Map;function globToRegex(pattern){let regex=globRegexCache.get(pattern);if(!regex){const escaped=pattern.replace(/[.+^${}()|[\\]\\\\]/g,"\\\\$&");regex=new RegExp(`^${escaped.replace(/\\*/g,".*")}$`);globRegexCache.set(pattern,regex)}return regex}__name(globToRegex,"globToRegex");function matchAttributes(attrs,patterns){const result2={};for(const pattern of patterns){if(pattern.includes("*")){const regex=globToRegex(pattern);for(const key of Object.keys(attrs)){if(regex.test(key)&&attrs[key].trim()){result2[key]=attrs[key].trim()}}}else{const value=attrs[pattern];if(value&&value.trim()){result2[pattern]=value.trim()}}}return result2}__name(matchAttributes,"matchAttributes");function flatTreeToString(flatTree,includeAttributes){const DEFAULT_INCLUDE_ATTRIBUTES=["title","type","checked","name","role","value","placeholder","data-date-format","alt","aria-label","aria-expanded","data-state","aria-checked","id","for","target","aria-haspopup","aria-controls","aria-owns","contenteditable"];const includeAttrs=[...includeAttributes||[],...DEFAULT_INCLUDE_ATTRIBUTES];const capTextLength=__name((text,maxLength)=>{if(text.length>maxLength){return text.substring(0,maxLength)+"..."}return text},"capTextLength");const buildTreeNode=__name((nodeId)=>{const node=flatTree.map[nodeId];if(!node)return null;if(node.type==="TEXT_NODE"){const textNode=node;return{type:"text",text:textNode.text,isVisible:textNode.isVisible,parent:null,children:[]}}else{const elementNode=node;const children=[];if(elementNode.children){for(const childId of elementNode.children){const child=buildTreeNode(childId);if(child){child.parent=null;children.push(child)}}}return{type:"element",tagName:elementNode.tagName,attributes:elementNode.attributes??{},isVisible:elementNode.isVisible??false,isInteractive:elementNode.isInteractive??false,isTopElement:elementNode.isTopElement??false,isNew:elementNode.isNew??false,highlightIndex:elementNode.highlightIndex,parent:null,children,extra:elementNode.extra??{}}}},"buildTreeNode");const setParentReferences=__name((node,parent=null)=>{node.parent=parent;for(const child of node.children){setParentReferences(child,node)}},"setParentReferences");const rootNode=buildTreeNode(flatTree.rootId);if(!rootNode)return"";setParentReferences(rootNode);const hasParentWithHighlightIndex=__name((node)=>{let current=node.parent;while(current){if(current.type==="element"&&current.highlightIndex!==undefined){return true}current=current.parent}return false},"hasParentWithHighlightIndex");const processNode=__name((node,depth,result22)=>{let nextDepth=depth;const depthStr="\\t".repeat(depth);if(node.type==="element"){if(node.highlightIndex!==undefined){nextDepth+=1;const text=getAllTextTillNextClickableElement(node);let attributesHtmlStr="";if(includeAttrs.length>0&&node.attributes){const attributesToInclude=matchAttributes(node.attributes,includeAttrs);const keys=Object.keys(attributesToInclude);if(keys.length>1){const keysToRemove=new Set;const seenValues={};for(const key of keys){const value=attributesToInclude[key];if(value.length>5){if(value in seenValues){keysToRemove.add(key)}else{seenValues[value]=key}}}for(const key of keysToRemove){delete attributesToInclude[key]}}if(attributesToInclude.role===node.tagName){delete attributesToInclude.role}const attrsToRemoveIfTextMatches=["aria-label","placeholder","title"];for(const attr of attrsToRemoveIfTextMatches){if(attributesToInclude[attr]&&attributesToInclude[attr].toLowerCase().trim()===text.toLowerCase().trim()){delete attributesToInclude[attr]}}if(Object.keys(attributesToInclude).length>0){attributesHtmlStr=Object.entries(attributesToInclude).map(([key,value])=>`${key}=${capTextLength(value,20)}`).join(" ")}}const highlightIndicator=node.isNew?`*[${node.highlightIndex}]`:`[${node.highlightIndex}]`;let line=`${depthStr}${highlightIndicator}<${node.tagName??""}`;if(attributesHtmlStr){line+=` ${attributesHtmlStr}`}if(node.extra){if(node.extra.scrollable){let scrollDataText="";if(node.extra.scrollData?.left)scrollDataText+=`left=${node.extra.scrollData.left}, `;if(node.extra.scrollData?.top)scrollDataText+=`top=${node.extra.scrollData.top}, `;if(node.extra.scrollData?.right)scrollDataText+=`right=${node.extra.scrollData.right}, `;if(node.extra.scrollData?.bottom)scrollDataText+=`bottom=${node.extra.scrollData.bottom}`;line+=` data-scrollable="${scrollDataText}"`}}if(text){const trimmedText=text.trim();if(!attributesHtmlStr){line+=" "}line+=`>${trimmedText}`}else if(!attributesHtmlStr){line+=" "}line+=" />";result22.push(line)}for(const child of node.children){processNode(child,nextDepth,result22)}}else if(node.type==="text"){if(hasParentWithHighlightIndex(node)){return}if(node.parent&&node.parent.type==="element"&&node.parent.isVisible&&node.parent.isTopElement){result22.push(`${depthStr}${node.text??""}`)}}},"processNode");const result2=[];processNode(rootNode,0,result2);return result2.join(`\n`)}__name(flatTreeToString,"flatTreeToString");const getAllTextTillNextClickableElement=__name((node,maxDepth=-1)=>{const textParts=[];const collectText=__name((currentNode,currentDepth)=>{if(maxDepth!==-1&&currentDepth>maxDepth){return}if(currentNode.type==="element"&&currentNode!==node&&currentNode.highlightIndex!==undefined){return}if(currentNode.type==="text"&&currentNode.text){textParts.push(currentNode.text)}else if(currentNode.type==="element"){for(const child of currentNode.children){collectText(child,currentDepth+1)}}},"collectText");collectText(node,0);return textParts.join(`\n`).trim()},"getAllTextTillNextClickableElement");function getSelectorMap(flatTree){const selectorMap=new Map;const keys=Object.keys(flatTree.map);for(const key of keys){const node=flatTree.map[key];if(node.isInteractive&&typeof node.highlightIndex==="number"){selectorMap.set(node.highlightIndex,node)}}return selectorMap}__name(getSelectorMap,"getSelectorMap");function getElementTextMap(simplifiedHTML){const lines=simplifiedHTML.split(`\n`).map((line)=>line.trim()).filter((line)=>line.length>0);const elementTextMap=new Map;for(const line of lines){const regex=/^\\[(\\d+)\\]<[^>]+>([^<]*)/;const match=regex.exec(line);if(match){const index=parseInt(match[1],10);elementTextMap.set(index,line)}}return elementTextMap}__name(getElementTextMap,"getElementTextMap");function cleanUpHighlights(){const cleanupFunctions=window._highlightCleanupFunctions||[];for(const cleanup of cleanupFunctions){if(typeof cleanup==="function"){cleanup()}}window._highlightCleanupFunctions=[]}__name(cleanUpHighlights,"cleanUpHighlights");window.addEventListener("popstate",()=>{cleanUpHighlights()});window.addEventListener("hashchange",()=>{cleanUpHighlights()});window.addEventListener("beforeunload",()=>{cleanUpHighlights()});const navigation=window.navigation;if(navigation&&typeof navigation.addEventListener==="function"){navigation.addEventListener("navigate",()=>{cleanUpHighlights()})}else{let currentUrl=window.location.href;setInterval(()=>{if(window.location.href!==currentUrl){currentUrl=window.location.href;cleanUpHighlights()}},500)}function getPageInfo(){const viewport_width=window.innerWidth;const viewport_height=window.innerHeight;const page_width=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth||0);const page_height=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight||0);const scroll_x=window.scrollX||window.pageXOffset||document.documentElement.scrollLeft||0;const scroll_y=window.scrollY||window.pageYOffset||document.documentElement.scrollTop||0;const pixels_below=Math.max(0,page_height-(window.innerHeight+scroll_y));const pixels_right=Math.max(0,page_width-(window.innerWidth+scroll_x));return{viewport_width,viewport_height,page_width,page_height,scroll_x,scroll_y,pixels_above:scroll_y,pixels_below,pages_above:viewport_height>0?scroll_y/viewport_height:0,pages_below:viewport_height>0?pixels_below/viewport_height:0,total_pages:viewport_height>0?page_height/viewport_height:0,current_page_position:scroll_y/Math.max(1,page_height-viewport_height),pixels_left:scroll_x,pixels_right}}__name(getPageInfo,"getPageInfo");function patchReact(pageController){const reactRootElements=document.querySelectorAll(\'[data-reactroot], [data-reactid], [data-react-checksum], #root, #app, [id^="root-"], [id^="app-"], #adex-wrapper, #adex-root\');for(const element of reactRootElements){element.setAttribute("data-page-agent-not-interactive","true")}}__name(patchReact,"patchReact");const _PageController=class _PageController extends EventTarget{config;flatTree=null;selectorMap=new Map;elementTextMap=new Map;simplifiedHTML="<EMPTY>";lastTimeUpdate=0;isIndexed=false;mask=null;maskReady=null;constructor(config={}){super();this.config=config;patchReact();if(config.enableMask)this.initMask()}initMask(){if(this.maskReady!==null)return;this.maskReady=(async()=>{var SimulatorMask = window.__LiteMask;this.mask=new SimulatorMask})()}async getCurrentUrl(){return window.location.href}async getLastUpdateTime(){return this.lastTimeUpdate}async getBrowserState(){const url=window.location.href;const title=document.title;const pi=getPageInfo();const viewportExpansion=resolveViewportExpansion(this.config.viewportExpansion);await this.updateTree();const content=this.simplifiedHTML;const titleLine=`Current Page: [${title}](${url})`;const pageInfoLine=`Page info: ${pi.viewport_width}x${pi.viewport_height}px viewport, ${pi.page_width}x${pi.page_height}px total page size, ${pi.pages_above.toFixed(1)} pages above, ${pi.pages_below.toFixed(1)} pages below, ${pi.total_pages.toFixed(1)} total pages, at ${(pi.current_page_position*100).toFixed(0)}% of page`;const elementsLabel=viewportExpansion===-1?"Interactive elements from top layer of the current page (full page):":"Interactive elements from top layer of the current page inside the viewport:";const hasContentAbove=pi.pixels_above>4;const scrollHintAbove=hasContentAbove&&viewportExpansion!==-1?`... ${pi.pixels_above} pixels above (${pi.pages_above.toFixed(1)} pages) - scroll to see more ...`:"[Start of page]";const header=`${titleLine}\n${pageInfoLine}\n\n${elementsLabel}\n\n${scrollHintAbove}`;const hasContentBelow=pi.pixels_below>4;const footer=hasContentBelow&&viewportExpansion!==-1?`... ${pi.pixels_below} pixels below (${pi.pages_below.toFixed(1)} pages) - scroll to see more ...`:"[End of page]";return{url,title,header,content,footer}}async updateTree(){this.dispatchEvent(new Event("beforeUpdate"));this.lastTimeUpdate=Date.now();if(this.mask){this.mask.wrapper.style.pointerEvents="none"}cleanUpHighlights();const blacklist=[...this.config.interactiveBlacklist||[],...document.querySelectorAll("[data-page-agent-not-interactive]").values()];this.flatTree=getFlatTree({...this.config,interactiveBlacklist:blacklist});this.simplifiedHTML=flatTreeToString(this.flatTree,this.config.includeAttributes);this.selectorMap.clear();this.selectorMap=getSelectorMap(this.flatTree);this.elementTextMap.clear();this.elementTextMap=getElementTextMap(this.simplifiedHTML);this.isIndexed=true;if(this.mask){this.mask.wrapper.style.pointerEvents="auto"}this.dispatchEvent(new Event("afterUpdate"));return this.simplifiedHTML}async cleanUpHighlights(){cleanUpHighlights()}assertIndexed(){if(!this.isIndexed){throw new Error("DOM tree not indexed yet. Can not perform actions on elements.")}}async clickElement(index){try{this.assertIndexed();const element=getElementByIndex(this.selectorMap,index);const elemText=this.elementTextMap.get(index);await clickElement(element);if(isAnchorElement(element)&&element.target==="_blank"){return{success:true,message:`✅ Clicked element (${elemText??index}). ⚠️ Link opened in a new tab.`}}return{success:true,message:`✅ Clicked element (${elemText??index}).`}}catch(error){return{success:false,message:`❌ Failed to click element: ${error}`}}}async inputText(index,text){try{this.assertIndexed();const element=getElementByIndex(this.selectorMap,index);const elemText=this.elementTextMap.get(index);await inputTextElement(element,text);return{success:true,message:`✅ Input text (${text}) into element (${elemText??index}).`}}catch(error){return{success:false,message:`❌ Failed to input text: ${error}`}}}async selectOption(index,optionText){try{this.assertIndexed();const element=getElementByIndex(this.selectorMap,index);const elemText=this.elementTextMap.get(index);await selectOptionElement(element,optionText);return{success:true,message:`✅ Selected option (${optionText}) in element (${elemText??index}).`}}catch(error){return{success:false,message:`❌ Failed to select option: ${error}`}}}async scroll(options){try{const{down,numPages,pixels,index}=options;this.assertIndexed();const scrollAmount=pixels??numPages*(down?1:-1)*window.innerHeight;const element=index!==undefined?getElementByIndex(this.selectorMap,index):null;const message=await scrollVertically(down,scrollAmount,element);return{success:true,message}}catch(error){return{success:false,message:`❌ Failed to scroll: ${error}`}}}async scrollHorizontally(options){try{const{right,pixels,index}=options;this.assertIndexed();const scrollAmount=pixels*(right?1:-1);const element=index!==undefined?getElementByIndex(this.selectorMap,index):null;const message=await scrollHorizontally(right,scrollAmount,element);return{success:true,message}}catch(error){return{success:false,message:`❌ Failed to scroll horizontally: ${error}`}}}async executeJavascript(script){try{const asyncFunction=eval(`(async () => { ${script} })`);const result=await asyncFunction();return{success:true,message:`✅ Executed JavaScript. Result: ${result}`}}catch(error){return{success:false,message:`❌ Error executing JavaScript: ${error}`}}}async showMask(){await this.maskReady;this.mask?.show()}async hideMask(){await this.maskReady;this.mask?.hide()}dispose(){cleanUpHighlights();this.flatTree=null;this.selectorMap.clear();this.elementTextMap.clear();this.simplifiedHTML="<EMPTY>";this.isIndexed=false;this.mask?.dispose();this.mask=null}};__name(_PageController,"PageController");let PageController=_PageController;window.__PageController=PageController})();\n})();\n\n// --- Signet Page Agent API ---\n(function(){\n var pc = new window.__PageController({ enableMask: false, highlightOpacity: 0, highlightLabelOpacity: 0 });\n \n window.signet = window.signet || {};\n window.signet.pageController = pc;\n \n window.signet.getDomState = async function(){\n try {\n var state = await pc.getBrowserState();\n return { success: true, state: state };\n } catch(e) {\n return { success: false, error: e.message || String(e) };\n }\n };\n \n window.signet.executeAction = async function(action){\n try {\n var result;\n switch(action.type){\n case \'click_element\':\n result = await pc.clickElement(action.index);\n break;\n case \'input_text\':\n result = await pc.inputText(action.index, action.text);\n break;\n case \'select_option\':\n result = await pc.selectOption(action.index, action.text);\n break;\n case \'scroll\':\n result = await pc.scroll({ down: action.direction === \'down\', numPages: action.amount || 1 });\n break;\n default:\n result = { success: false, message: \'Unknown action type: \' + action.type };\n }\n return result;\n } catch(e) {\n return { success: false, message: e.message || String(e) };\n }\n };\n \n window.signet.agentStart = async function(){\n pc.initMask();\n await pc.showMask();\n };\n \n window.signet.agentStop = async function(){\n await pc.hideMask();\n };\n})();',Yt=`
1
+ import{o as We,p as re,s as he,c as de,f as se,a as fe,n as ve,b as w,d as ie,r as we,i as c,j as J,t as _,k as s,y as ee,z as ae,D as ge,A as Te,h as t,l as N,v as m,m as Y,e as ft,Q as Ze,q as ze,aU as Ve,F as Je,B as xe,u as pe,O as U,P as Se,aa as et,N as Ee,ac as Ie,w as ke,I as Me,x as vt,K as wt,U as yt}from"./Ddm7yfuh.js";import{o as me,I as ye,aG as bt,bc as xt,bd as _t,H as Et}from"./BV4JdBu0.js";import{W as at,L as Tt}from"./Rg8vdugb.js";import{R as st}from"./CHiXoU1o.js";import{P as qe}from"./9RxFDYgf.js";import{P as kt}from"./bLj1eiv0.js";import{T as St}from"./E3CptpiY.js";const k=We({entries:[],loading:!1,error:null,groups:[],activeGroup:null,draggingId:null,focusedId:null,widgetCacheVersion:0}),be=new Map,He=new Set;function Ct(){return k.entries.filter(n=>n.state==="tray")}function Nt(){const n=k.entries.filter(e=>e.state==="grid");if(k.activeGroup){const e=k.groups.find(r=>r.id===k.activeGroup);if(e)return n.filter(r=>e.items.includes(r.id))}return n}function It(){return k.entries.filter(n=>n.state==="dock")}const tt=12;function Qe(n,e,r){const a=r?.x??0,d=r?.y??0;function p(R,P,D,H){for(const A of n)if(R<A.x+A.w&&R+D>A.x&&P<A.y+A.h&&P+H>A.y)return!0;return!1}const o=Math.max(0,Math.min(tt-e.w,a)),y=Math.max(0,d);if(!p(o,y,e.w,e.h))return{x:o,y,w:e.w,h:e.h};for(let R=1;R<=20;R++)for(let P=-R;P<=R;P++)for(let D=-R;D<=R;D++){if(Math.abs(D)!==R&&Math.abs(P)!==R)continue;const H=Math.max(0,Math.min(tt-e.w,a+D)),A=Math.max(0,d+P);if(!p(H,A,e.w,e.h))return{x:H,y:A,w:e.w,h:e.h}}return{x:0,y:n.reduce((R,P)=>Math.max(R,P.y+P.h),0),w:e.w,h:e.h}}async function Oe(){k.loading=!0,k.error=null;try{const n=await fetch(`${me}/api/os/tray`);if(!n.ok)throw new Error(`HTTP ${n.status}`);const e=await n.json();k.entries=e.entries??[]}catch(n){k.error=n instanceof Error?n.message:String(n)}finally{k.loading=!1}}async function Ae(n,e,r){try{const a={state:e};r&&(a.gridPosition=r);const d=await fetch(`${me}/api/os/tray/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!d.ok)return!1;const p=await d.json();if(p.success&&p.entry){const o=k.entries.findIndex(y=>y.id===n);o>=0&&(k.entries[o]=p.entry)}return!0}catch{return!1}}async function nt(n,e){return Ae(n,"grid",e)}async function Xe(n,e){const r=k.entries.find(o=>o.id===n);if(!r)return!1;if(e)return Ae(n,"grid",e);const a=r.manifest?.defaultSize??{w:4,h:3},d=k.entries.flatMap(o=>o.id!==n&&o.state==="grid"&&o.gridPosition?[o.gridPosition]:[]),p=Qe(d,a);return Ae(n,"grid",p)}async function Mt(n){return Ae(n,"dock")}async function lt(n){return Ae(n,"tray")}const ct="signet-os-sidebar-groups";function At(){try{const n=localStorage.getItem(ct);n&&(k.groups=JSON.parse(n))}catch{k.groups=[]}}function Fe(){localStorage.setItem(ct,JSON.stringify(k.groups))}function Dt(n){const e={id:`group_${Date.now()}`,name:n,items:[]};return k.groups=[...k.groups,e],Fe(),e}function Lt(n){k.groups=k.groups.filter(e=>e.id!==n),k.activeGroup===n&&(k.activeGroup=null),Fe()}function Rt(n,e){k.groups=k.groups.map(r=>r.id===n?{...r,name:e}:r),Fe()}function Ht(n,e){k.groups=k.groups.map(r=>r.id!==n||r.items.includes(e)?r:{...r,items:[...r.items,e]}),Fe()}function Ue(n){k.activeGroup=n}let Pe=We(new Map),rt=0;function it(n,e,r){Pe.set(n,{action:e,data:r,_seq:++rt}),setTimeout(()=>{const a=Pe.get(n);a&&a._seq===rt&&Pe.delete(n)},500)}function Pt(n){return Pe.get(n)}function Ot(n){k.focusedId=n}function Le(){k.focusedId=null}async function $e(n){if(be.has(n))return be.get(n)??null;try{const e=await fetch(`${me}/api/os/widget/${encodeURIComponent(n)}`);if(!e.ok)return null;const r=await e.json();return r.html?(be.set(n,r.html),k.widgetCacheVersion++,r.html):null}catch{return null}}async function dt(n){if(!He.has(n)){He.add(n),k.widgetCacheVersion++;try{const r=await(await fetch(`${me}/api/os/widget/generate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverId:n,force:!1})})).json();r.status==="cached"&&r.html&&be.set(n,r.html)}catch{}finally{be.has(n)&&He.delete(n),k.widgetCacheVersion++}}}const Ke=new Map;function $t(n,e){Ke.set(n,e)}function Wt(n){Ke.delete(n)}function Re(n){return Ke.get(n)}const zt=We({current:null});function _e(n){zt.current=n}function Ye(n,e){re(e,!0);let r=we(e,["$$slots","$$events","$$legacy"]);const a=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"}],["path",{d:"m3.3 7 8.7 5 8.7-5"}],["path",{d:"M12 22V12"}]];ye(n,he({name:"box"},()=>r,{get iconNode(){return a},children:(d,p)=>{var o=de(),y=se(o);fe(y,()=>e.children??ve),w(d,o)},$$slots:{default:!0}})),ie()}var Vt=N('<img class="auto-card-icon svelte-1y09vim" referrerpolicy="no-referrer"/>'),Ft=N('<div class="auto-card-icon-placeholder svelte-1y09vim"><!></div>'),jt=N('<button class="auto-card-tool-btn sig-switch svelte-1y09vim" disabled=""><!> <span class="truncate"> </span></button>'),Bt=N('<div class="auto-card-tools svelte-1y09vim"></div>'),Ut=N('<div class="auto-card-empty svelte-1y09vim"><span class="sig-label">No tools exposed</span></div>'),Gt=N('<div class="auto-card svelte-1y09vim"><div class="auto-card-header svelte-1y09vim"><!> <span class="auto-card-name svelte-1y09vim"> </span> <span class="sig-meta ml-auto"> </span></div> <!></div>');function qt(n,e){re(e,!0);var r=Gt(),a=c(r),d=c(a);{var p=O=>{var S=Vt();ee(()=>{ge(S,"src",e.icon),ge(S,"alt",e.name)}),w(O,S)},o=O=>{var S=Ft(),$=c(S);Ye($,{class:"size-4"}),s(S),w(O,S)};J(d,O=>{e.icon?O(p):O(o,-1)})}var y=_(d,2),G=c(y,!0);s(y);var R=_(y,2),P=c(R);s(R),s(a);var D=_(a,2);{var H=O=>{var S=Bt();Te(S,21,()=>e.autoCard.tools,$=>$.name,($,W)=>{var j=jt(),F=c(j);at(F,{class:"size-3 shrink-0 opacity-50"});var te=_(F,2),I=c(te,!0);s(te),s(j),ee(()=>{ge(j,"title",t(W).description||t(W).name),ae(I,t(W).name)}),w($,j)}),s(S),w(O,S)},A=O=>{var S=Ut();w(O,S)};J(D,O=>{e.autoCard.tools.length>0?O(H):O(A,-1)})}s(r),ee(()=>{ae(G,e.name),ae(P,`${e.autoCard.tools.length??""} tools`)}),w(n,r),ie()}const Xt='// Signet Page Agent bundle - PageController + lightweight cursor mask\n// Auto-generated from @page-agent/page-controller v1.6.0\n\n\n(function(){\n // Lightweight SimulatorMask - cursor + overlay, no ai-motion dependency\n var CSS_TEXT = \'.__pa_mask{position:fixed;inset:0;z-index:2147483641;cursor:wait;overflow:hidden;display:none;background:rgba(0,0,0,0.02)}.__pa_mask.__pa_vis{display:block}.__pa_cur{position:absolute;width:40px;height:40px;pointer-events:none;z-index:10000;transition:none}.__pa_cur_fill{position:absolute;width:100%;height:100%;background:url("data:image/svg+xml,%3csvg xmlns=\\\'http://www.w3.org/2000/svg\\\' viewBox=\\\'0 0 100 100\\\'%3e%3cpath d=\\\'M 15 42 L 15 36.99 Q 15 31.99 23.7 31.99 L 28.05 31.99 Q 32.41 31.99 32.41 21.99 L 32.41 17 Q 32.41 12 41.09 16.95 L 76.31 37.05 Q 85 42 76.31 46.95 L 41.09 67.05 Q 32.41 72 32.41 62.01 L 32.41 57.01 Q 32.41 52.01 23.7 52.01 L 19.35 52.01 Q 15 52.01 15 47.01 Z\\\' fill=\\\'%23ffffff\\\' stroke=\\\'%23333\\\' stroke-width=\\\'4\\\'/%3e%3c/svg%3e");background-size:100% 100%;transform-origin:center;transform:rotate(-135deg) scale(1.1);margin-left:-8px;margin-top:-14px}.__pa_cur_border{position:absolute;width:100%;height:100%;background:linear-gradient(45deg,rgb(57,182,255),rgb(189,69,251));mask-image:url("data:image/svg+xml,%3csvg xmlns=\\\'http://www.w3.org/2000/svg\\\' viewBox=\\\'0 0 100 100\\\' fill=\\\'none\\\'%3e%3cpath d=\\\'M 15 42 L 15 36.99 Q 15 31.99 23.7 31.99 L 28.05 31.99 Q 32.41 31.99 32.41 21.99 L 32.41 17 Q 32.41 12 41.09 16.95 L 76.31 37.05 Q 85 42 76.31 46.95 L 41.09 67.05 Q 32.41 72 32.41 62.01 L 32.41 57.01 Q 32.41 52.01 23.7 52.01 L 19.35 52.01 Q 15 52.01 15 47.01 Z\\\' stroke=\\\'%23000\\\' stroke-width=\\\'6\\\'/%3e%3c/svg%3e");mask-size:100% 100%;mask-repeat:no-repeat;transform-origin:center;transform:rotate(-135deg) scale(1.2);margin-left:-10px;margin-top:-18px}.__pa_ripple{position:absolute;width:100%;height:100%;pointer-events:none;margin-left:-50%;margin-top:-50%}.__pa_ripple::after{content:\\\'\\\';opacity:0;position:absolute;inset:0;border:3px solid rgba(57,182,255,1);border-radius:50%}.__pa_cur.__pa_click .__pa_ripple::after{animation:__pa_rip 300ms ease-out forwards}@keyframes __pa_rip{0%{transform:scale(0);opacity:1}100%{transform:scale(2);opacity:0}}\';\n \n try{\n var s=document.createElement(\'style\');\n s.appendChild(document.createTextNode(CSS_TEXT));\n document.head.appendChild(s);\n }catch(e){}\n\n function LiteMask(){\n this.shown=false;\n this.wrapper=document.createElement(\'div\');\n this.wrapper.className=\'__pa_mask\';\n this.wrapper.setAttribute(\'data-page-agent-ignore\',\'true\');\n \n this._cursor=document.createElement(\'div\');\n this._cursor.className=\'__pa_cur\';\n var ripple=document.createElement(\'div\');ripple.className=\'__pa_ripple\';this._cursor.appendChild(ripple);\n var fill=document.createElement(\'div\');fill.className=\'__pa_cur_fill\';this._cursor.appendChild(fill);\n var border=document.createElement(\'div\');border.className=\'__pa_cur_border\';this._cursor.appendChild(border);\n this.wrapper.appendChild(this._cursor);\n \n this._cx=0;this._cy=0;this._tx=0;this._ty=0;\n \n // Block interactions on mask\n [\'click\',\'mousedown\',\'mouseup\',\'mousemove\',\'wheel\',\'keydown\',\'keyup\'].forEach(function(evt){\n this.wrapper.addEventListener(evt,function(e){e.stopPropagation();e.preventDefault();});\n }.bind(this));\n \n document.body.appendChild(this.wrapper);\n this._animate();\n \n var self=this;\n window.addEventListener(\'PageAgent::MovePointerTo\',function(e){\n var d=e.detail;self._tx=d.x;self._ty=d.y;\n });\n window.addEventListener(\'PageAgent::ClickPointer\',function(){\n self._cursor.classList.remove(\'__pa_click\');\n void self._cursor.offsetHeight;\n self._cursor.classList.add(\'__pa_click\');\n });\n }\n \n LiteMask.prototype._animate=function(){\n var nx=this._cx+(this._tx-this._cx)*0.2;\n var ny=this._cy+(this._ty-this._cy)*0.2;\n if(Math.abs(nx-this._tx)>0){this._cx=Math.abs(nx-this._tx)<2?this._tx:nx;this._cursor.style.left=this._cx+\'px\';}\n if(Math.abs(ny-this._ty)>0){this._cy=Math.abs(ny-this._ty)<2?this._ty:ny;this._cursor.style.top=this._cy+\'px\';}\n requestAnimationFrame(this._animate.bind(this));\n };\n \n LiteMask.prototype.show=function(){\n if(this.shown)return;this.shown=true;\n this.wrapper.classList.add(\'__pa_vis\');\n this._cx=window.innerWidth/2;this._cy=window.innerHeight/2;\n this._tx=this._cx;this._ty=this._cy;\n this._cursor.style.left=this._cx+\'px\';this._cursor.style.top=this._cy+\'px\';\n };\n \n LiteMask.prototype.hide=function(){\n if(!this.shown)return;this.shown=false;\n this._cursor.classList.remove(\'__pa_click\');\n var w=this.wrapper;\n setTimeout(function(){w.classList.remove(\'__pa_vis\');},300);\n };\n \n LiteMask.prototype.dispose=function(){this.wrapper.remove();};\n \n window.__LiteMask=LiteMask;\n})();\n\n// --- PageController (modified: SimulatorMask replaced with LiteMask) ---\n(function(){\n(function(){var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:true});function isHTMLElement(el){return!!el&&el.nodeType===1}__name(isHTMLElement,"isHTMLElement");function isInputElement(el){return el?.nodeType===1&&el.tagName==="INPUT"}__name(isInputElement,"isInputElement");function isTextAreaElement(el){return el?.nodeType===1&&el.tagName==="TEXTAREA"}__name(isTextAreaElement,"isTextAreaElement");function isSelectElement(el){return el?.nodeType===1&&el.tagName==="SELECT"}__name(isSelectElement,"isSelectElement");function isAnchorElement(el){return el?.nodeType===1&&el.tagName==="A"}__name(isAnchorElement,"isAnchorElement");function getIframeOffset(element){const frame=element.ownerDocument.defaultView?.frameElement;if(!frame)return{x:0,y:0};const rect=frame.getBoundingClientRect();return{x:rect.left,y:rect.top}}__name(getIframeOffset,"getIframeOffset");function getNativeValueSetter(element){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element),"value").set}__name(getNativeValueSetter,"getNativeValueSetter");async function waitFor(seconds){await new Promise((resolve)=>setTimeout(resolve,seconds*1000))}__name(waitFor,"waitFor");async function movePointerToElement(element){const rect=element.getBoundingClientRect();const offset=getIframeOffset(element);const x=rect.left+rect.width/2+offset.x;const y=rect.top+rect.height/2+offset.y;window.dispatchEvent(new CustomEvent("PageAgent::MovePointerTo",{detail:{x,y}}));await waitFor(0.3)}__name(movePointerToElement,"movePointerToElement");function getElementByIndex(selectorMap,index){const interactiveNode=selectorMap.get(index);if(!interactiveNode){throw new Error(`No interactive element found at index ${index}`)}const element=interactiveNode.ref;if(!element){throw new Error(`Element at index ${index} does not have a reference`)}if(!isHTMLElement(element)){throw new Error(`Element at index ${index} is not an HTMLElement`)}return element}__name(getElementByIndex,"getElementByIndex");let lastClickedElement=null;function blurLastClickedElement(){if(lastClickedElement){lastClickedElement.blur();lastClickedElement.dispatchEvent(new MouseEvent("mouseout",{bubbles:true,cancelable:true}));lastClickedElement.dispatchEvent(new MouseEvent("mouseleave",{bubbles:false,cancelable:true}));lastClickedElement=null}}__name(blurLastClickedElement,"blurLastClickedElement");async function clickElement(element){blurLastClickedElement();lastClickedElement=element;await scrollIntoViewIfNeeded(element);const frame=element.ownerDocument.defaultView?.frameElement;if(frame)await scrollIntoViewIfNeeded(frame);await movePointerToElement(element);window.dispatchEvent(new CustomEvent("PageAgent::ClickPointer"));await waitFor(0.1);element.dispatchEvent(new MouseEvent("mouseenter",{bubbles:true,cancelable:true}));element.dispatchEvent(new MouseEvent("mouseover",{bubbles:true,cancelable:true}));element.dispatchEvent(new MouseEvent("mousedown",{bubbles:true,cancelable:true}));element.focus();element.dispatchEvent(new MouseEvent("mouseup",{bubbles:true,cancelable:true}));element.dispatchEvent(new MouseEvent("click",{bubbles:true,cancelable:true}));await waitFor(0.2)}__name(clickElement,"clickElement");async function inputTextElement(element,text){const isContentEditable=element.isContentEditable;if(!isInputElement(element)&&!isTextAreaElement(element)&&!isContentEditable){throw new Error("Element is not an input, textarea, or contenteditable")}await clickElement(element);if(isContentEditable){if(element.dispatchEvent(new InputEvent("beforeinput",{bubbles:true,cancelable:true,inputType:"deleteContent"}))){element.innerText="";element.dispatchEvent(new InputEvent("input",{bubbles:true,inputType:"deleteContent"}))}if(element.dispatchEvent(new InputEvent("beforeinput",{bubbles:true,cancelable:true,inputType:"insertText",data:text}))){element.innerText=text;element.dispatchEvent(new InputEvent("input",{bubbles:true,inputType:"insertText",data:text}))}const planASucceeded=element.innerText.trim()===text.trim();if(!planASucceeded){element.focus();const doc=element.ownerDocument;const selection=(doc.defaultView||window).getSelection();const range=doc.createRange();range.selectNodeContents(element);selection?.removeAllRanges();selection?.addRange(range);doc.execCommand("delete",false);doc.execCommand("insertText",false,text)}element.dispatchEvent(new Event("change",{bubbles:true}));element.blur()}else{getNativeValueSetter(element).call(element,text)}if(!isContentEditable){element.dispatchEvent(new Event("input",{bubbles:true}))}await waitFor(0.1);blurLastClickedElement()}__name(inputTextElement,"inputTextElement");async function selectOptionElement(selectElement,optionText){if(!isSelectElement(selectElement)){throw new Error("Element is not a select element")}const options=Array.from(selectElement.options);const option=options.find((opt)=>opt.textContent?.trim()===optionText.trim());if(!option){throw new Error(`Option with text "${optionText}" not found in select element`)}selectElement.value=option.value;selectElement.dispatchEvent(new Event("change",{bubbles:true}));await waitFor(0.1)}__name(selectOptionElement,"selectOptionElement");async function scrollIntoViewIfNeeded(element){const el=element;if(typeof el.scrollIntoViewIfNeeded==="function"){el.scrollIntoViewIfNeeded()}else{element.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"})}}__name(scrollIntoViewIfNeeded,"scrollIntoViewIfNeeded");async function scrollVertically(down,scroll_amount,element){if(element){const targetElement=element;let currentElement=targetElement;let scrollSuccess=false;let scrolledElement=null;let scrollDelta=0;let attempts=0;const dy2=scroll_amount;while(currentElement&&attempts<10){const computedStyle=window.getComputedStyle(currentElement);const hasScrollableY=/(auto|scroll|overlay)/.test(computedStyle.overflowY);const canScrollVertically=currentElement.scrollHeight>currentElement.clientHeight;if(hasScrollableY&&canScrollVertically){const beforeScroll=currentElement.scrollTop;const maxScroll=currentElement.scrollHeight-currentElement.clientHeight;let scrollAmount=dy2/3;if(scrollAmount>0){scrollAmount=Math.min(scrollAmount,maxScroll-beforeScroll)}else{scrollAmount=Math.max(scrollAmount,-beforeScroll)}currentElement.scrollTop=beforeScroll+scrollAmount;const afterScroll=currentElement.scrollTop;const actualScrollDelta=afterScroll-beforeScroll;if(Math.abs(actualScrollDelta)>0.5){scrollSuccess=true;scrolledElement=currentElement;scrollDelta=actualScrollDelta;break}}if(currentElement===document.body||currentElement===document.documentElement){break}currentElement=currentElement.parentElement;attempts++}if(scrollSuccess){return`Scrolled container (${scrolledElement?.tagName}) by ${scrollDelta}px`}else{return`No scrollable container found for element (${targetElement.tagName})`}}const dy=scroll_amount;const bigEnough=__name((el2)=>el2.clientHeight>=window.innerHeight*0.5,"bigEnough");const canScroll=__name((el2)=>el2&&/(auto|scroll|overlay)/.test(getComputedStyle(el2).overflowY)&&el2.scrollHeight>el2.clientHeight&&bigEnough(el2),"canScroll");let el=document.activeElement;while(el&&!canScroll(el)&&el!==document.body)el=el.parentElement;el=canScroll(el)?el:Array.from(document.querySelectorAll("*")).find(canScroll)||document.scrollingElement||document.documentElement;if(el===document.scrollingElement||el===document.documentElement||el===document.body){const scrollBefore=window.scrollY;const scrollMax=document.documentElement.scrollHeight-window.innerHeight;window.scrollBy(0,dy);const scrollAfter=window.scrollY;const scrolled=scrollAfter-scrollBefore;if(Math.abs(scrolled)<1){return dy>0?`⚠️ Already at the bottom of the page, cannot scroll down further.`:`⚠️ Already at the top of the page, cannot scroll up further.`}const reachedBottom=dy>0&&scrollAfter>=scrollMax-1;const reachedTop=dy<0&&scrollAfter<=1;if(reachedBottom)return`✅ Scrolled page by ${scrolled}px. Reached the bottom of the page.`;if(reachedTop)return`✅ Scrolled page by ${scrolled}px. Reached the top of the page.`;return`✅ Scrolled page by ${scrolled}px.`}else{const scrollBefore=el.scrollTop;const scrollMax=el.scrollHeight-el.clientHeight;el.scrollBy({top:dy,behavior:"smooth"});await waitFor(0.1);const scrollAfter=el.scrollTop;const scrolled=scrollAfter-scrollBefore;if(Math.abs(scrolled)<1){return dy>0?`⚠️ Already at the bottom of container (${el.tagName}), cannot scroll down further.`:`⚠️ Already at the top of container (${el.tagName}), cannot scroll up further.`}const reachedBottom=dy>0&&scrollAfter>=scrollMax-1;const reachedTop=dy<0&&scrollAfter<=1;if(reachedBottom)return`✅ Scrolled container (${el.tagName}) by ${scrolled}px. Reached the bottom.`;if(reachedTop)return`✅ Scrolled container (${el.tagName}) by ${scrolled}px. Reached the top.`;return`✅ Scrolled container (${el.tagName}) by ${scrolled}px.`}}__name(scrollVertically,"scrollVertically");async function scrollHorizontally(right,scroll_amount,element){if(element){const targetElement=element;let currentElement=targetElement;let scrollSuccess=false;let scrolledElement=null;let scrollDelta=0;let attempts=0;const dx2=right?scroll_amount:-scroll_amount;while(currentElement&&attempts<10){const computedStyle=window.getComputedStyle(currentElement);const hasScrollableX=/(auto|scroll|overlay)/.test(computedStyle.overflowX);const canScrollHorizontally=currentElement.scrollWidth>currentElement.clientWidth;if(hasScrollableX&&canScrollHorizontally){const beforeScroll=currentElement.scrollLeft;const maxScroll=currentElement.scrollWidth-currentElement.clientWidth;let scrollAmount=dx2/3;if(scrollAmount>0){scrollAmount=Math.min(scrollAmount,maxScroll-beforeScroll)}else{scrollAmount=Math.max(scrollAmount,-beforeScroll)}currentElement.scrollLeft=beforeScroll+scrollAmount;const afterScroll=currentElement.scrollLeft;const actualScrollDelta=afterScroll-beforeScroll;if(Math.abs(actualScrollDelta)>0.5){scrollSuccess=true;scrolledElement=currentElement;scrollDelta=actualScrollDelta;break}}if(currentElement===document.body||currentElement===document.documentElement){break}currentElement=currentElement.parentElement;attempts++}if(scrollSuccess){return`Scrolled container (${scrolledElement?.tagName}) horizontally by ${scrollDelta}px`}else{return`No horizontally scrollable container found for element (${targetElement.tagName})`}}const dx=right?scroll_amount:-scroll_amount;const bigEnough=__name((el2)=>el2.clientWidth>=window.innerWidth*0.5,"bigEnough");const canScroll=__name((el2)=>el2&&/(auto|scroll|overlay)/.test(getComputedStyle(el2).overflowX)&&el2.scrollWidth>el2.clientWidth&&bigEnough(el2),"canScroll");let el=document.activeElement;while(el&&!canScroll(el)&&el!==document.body)el=el.parentElement;el=canScroll(el)?el:Array.from(document.querySelectorAll("*")).find(canScroll)||document.scrollingElement||document.documentElement;if(el===document.scrollingElement||el===document.documentElement||el===document.body){const scrollBefore=window.scrollX;const scrollMax=document.documentElement.scrollWidth-window.innerWidth;window.scrollBy(dx,0);const scrollAfter=window.scrollX;const scrolled=scrollAfter-scrollBefore;if(Math.abs(scrolled)<1){return dx>0?`⚠️ Already at the right edge of the page, cannot scroll right further.`:`⚠️ Already at the left edge of the page, cannot scroll left further.`}const reachedRight=dx>0&&scrollAfter>=scrollMax-1;const reachedLeft=dx<0&&scrollAfter<=1;if(reachedRight)return`✅ Scrolled page by ${scrolled}px. Reached the right edge of the page.`;if(reachedLeft)return`✅ Scrolled page by ${scrolled}px. Reached the left edge of the page.`;return`✅ Scrolled page horizontally by ${scrolled}px.`}else{const scrollBefore=el.scrollLeft;const scrollMax=el.scrollWidth-el.clientWidth;el.scrollBy({left:dx,behavior:"smooth"});await waitFor(0.1);const scrollAfter=el.scrollLeft;const scrolled=scrollAfter-scrollBefore;if(Math.abs(scrolled)<1){return dx>0?`⚠️ Already at the right edge of container (${el.tagName}), cannot scroll right further.`:`⚠️ Already at the left edge of container (${el.tagName}), cannot scroll left further.`}const reachedRight=dx>0&&scrollAfter>=scrollMax-1;const reachedLeft=dx<0&&scrollAfter<=1;if(reachedRight)return`✅ Scrolled container (${el.tagName}) by ${scrolled}px. Reached the right edge.`;if(reachedLeft)return`✅ Scrolled container (${el.tagName}) by ${scrolled}px. Reached the left edge.`;return`✅ Scrolled container (${el.tagName}) horizontally by ${scrolled}px.`}}__name(scrollHorizontally,"scrollHorizontally");const domTree=__name((args={doHighlightElements:true,focusHighlightIndex:-1,viewportExpansion:0,debugMode:false,interactiveBlacklist:[],interactiveWhitelist:[],highlightOpacity:0.1,highlightLabelOpacity:0.5})=>{const{interactiveBlacklist,interactiveWhitelist,highlightOpacity,highlightLabelOpacity}=args;const{doHighlightElements,focusHighlightIndex,viewportExpansion,debugMode}=args;let highlightIndex=0;const extraData=new WeakMap;function addExtraData(element,data){if(!element||element.nodeType!==Node.ELEMENT_NODE)return;extraData.set(element,{...extraData.get(element),...data})}__name(addExtraData,"addExtraData");const DOM_CACHE={boundingRects:new WeakMap,clientRects:new WeakMap,computedStyles:new WeakMap,clearCache:__name(()=>{DOM_CACHE.boundingRects=new WeakMap;DOM_CACHE.clientRects=new WeakMap;DOM_CACHE.computedStyles=new WeakMap},"clearCache")};function getCachedBoundingRect(element){if(!element)return null;if(DOM_CACHE.boundingRects.has(element)){return DOM_CACHE.boundingRects.get(element)}const rect=element.getBoundingClientRect();if(rect){DOM_CACHE.boundingRects.set(element,rect)}return rect}__name(getCachedBoundingRect,"getCachedBoundingRect");function getCachedComputedStyle(element){if(!element)return null;if(DOM_CACHE.computedStyles.has(element)){return DOM_CACHE.computedStyles.get(element)}const style=window.getComputedStyle(element);if(style){DOM_CACHE.computedStyles.set(element,style)}return style}__name(getCachedComputedStyle,"getCachedComputedStyle");function getCachedClientRects(element){if(!element)return null;if(DOM_CACHE.clientRects.has(element)){return DOM_CACHE.clientRects.get(element)}const rects=element.getClientRects();if(rects){DOM_CACHE.clientRects.set(element,rects)}return rects}__name(getCachedClientRects,"getCachedClientRects");const DOM_HASH_MAP={};const ID={current:0};const HIGHLIGHT_CONTAINER_ID="playwright-highlight-container";function highlightElement(element,index,parentIframe=null){if(!element)return index;const overlays=[];let label=null;let labelWidth=20;let labelHeight=16;let cleanupFn=null;try{let container=document.getElementById(HIGHLIGHT_CONTAINER_ID);if(!container){container=document.createElement("div");container.id=HIGHLIGHT_CONTAINER_ID;container.style.position="fixed";container.style.pointerEvents="none";container.style.top="0";container.style.left="0";container.style.width="100%";container.style.height="100%";container.style.zIndex="2147483640";container.style.backgroundColor="transparent";document.body.appendChild(container)}const rects=element.getClientRects();if(!rects||rects.length===0)return index;const colors=["#FF0000","#00FF00","#0000FF","#FFA500","#800080","#008080","#FF69B4","#4B0082","#FF4500","#2E8B57","#DC143C","#4682B4"];const colorIndex=index%colors.length;let baseColor=colors[colorIndex];const backgroundColor=baseColor+Math.floor(highlightOpacity*255).toString(16).padStart(2,"0");baseColor=baseColor+Math.floor(highlightLabelOpacity*255).toString(16).padStart(2,"0");let iframeOffset={x:0,y:0};if(parentIframe){const iframeRect=parentIframe.getBoundingClientRect();iframeOffset.x=iframeRect.left;iframeOffset.y=iframeRect.top}const fragment=document.createDocumentFragment();for(const rect of rects){if(rect.width===0||rect.height===0)continue;const overlay=document.createElement("div");overlay.style.position="fixed";overlay.style.border=`2px solid ${baseColor}`;overlay.style.backgroundColor=backgroundColor;overlay.style.pointerEvents="none";overlay.style.boxSizing="border-box";const top=rect.top+iframeOffset.y;const left=rect.left+iframeOffset.x;overlay.style.top=`${top}px`;overlay.style.left=`${left}px`;overlay.style.width=`${rect.width}px`;overlay.style.height=`${rect.height}px`;fragment.appendChild(overlay);overlays.push({element:overlay,initialRect:rect})}const firstRect=rects[0];label=document.createElement("div");label.className="playwright-highlight-label";label.style.position="fixed";label.style.background=baseColor;label.style.color="white";label.style.padding="1px 4px";label.style.borderRadius="4px";label.style.fontSize=`${Math.min(12,Math.max(8,firstRect.height/2))}px`;label.textContent=index.toString();labelWidth=label.offsetWidth>0?label.offsetWidth:labelWidth;labelHeight=label.offsetHeight>0?label.offsetHeight:labelHeight;const firstRectTop=firstRect.top+iframeOffset.y;const firstRectLeft=firstRect.left+iframeOffset.x;let labelTop=firstRectTop+2;let labelLeft=firstRectLeft+firstRect.width-labelWidth-2;if(firstRect.width<labelWidth+4||firstRect.height<labelHeight+4){labelTop=firstRectTop-labelHeight-2;labelLeft=firstRectLeft+firstRect.width-labelWidth;if(labelLeft<iframeOffset.x)labelLeft=firstRectLeft}labelTop=Math.max(0,Math.min(labelTop,window.innerHeight-labelHeight));labelLeft=Math.max(0,Math.min(labelLeft,window.innerWidth-labelWidth));label.style.top=`${labelTop}px`;label.style.left=`${labelLeft}px`;fragment.appendChild(label);const updatePositions=__name(()=>{const newRects=element.getClientRects();let newIframeOffset={x:0,y:0};if(parentIframe){const iframeRect=parentIframe.getBoundingClientRect();newIframeOffset.x=iframeRect.left;newIframeOffset.y=iframeRect.top}overlays.forEach((overlayData,i)=>{if(i<newRects.length){const newRect=newRects[i];const newTop=newRect.top+newIframeOffset.y;const newLeft=newRect.left+newIframeOffset.x;overlayData.element.style.top=`${newTop}px`;overlayData.element.style.left=`${newLeft}px`;overlayData.element.style.width=`${newRect.width}px`;overlayData.element.style.height=`${newRect.height}px`;overlayData.element.style.display=newRect.width===0||newRect.height===0?"none":"block"}else{overlayData.element.style.display="none"}});if(newRects.length<overlays.length){for(let i=newRects.length;i<overlays.length;i++){overlays[i].element.style.display="none"}}if(label&&newRects.length>0){const firstNewRect=newRects[0];const firstNewRectTop=firstNewRect.top+newIframeOffset.y;const firstNewRectLeft=firstNewRect.left+newIframeOffset.x;let newLabelTop=firstNewRectTop+2;let newLabelLeft=firstNewRectLeft+firstNewRect.width-labelWidth-2;if(firstNewRect.width<labelWidth+4||firstNewRect.height<labelHeight+4){newLabelTop=firstNewRectTop-labelHeight-2;newLabelLeft=firstNewRectLeft+firstNewRect.width-labelWidth;if(newLabelLeft<newIframeOffset.x)newLabelLeft=firstNewRectLeft}newLabelTop=Math.max(0,Math.min(newLabelTop,window.innerHeight-labelHeight));newLabelLeft=Math.max(0,Math.min(newLabelLeft,window.innerWidth-labelWidth));label.style.top=`${newLabelTop}px`;label.style.left=`${newLabelLeft}px`;label.style.display="block"}else if(label){label.style.display="none"}},"updatePositions");const throttleFunction=__name((func,delay)=>{let lastCall=0;return(...args2)=>{const now=performance.now();if(now-lastCall<delay)return;lastCall=now;return func(...args2)}},"throttleFunction");const throttledUpdatePositions=throttleFunction(updatePositions,16);window.addEventListener("scroll",throttledUpdatePositions,true);window.addEventListener("resize",throttledUpdatePositions);cleanupFn=__name(()=>{window.removeEventListener("scroll",throttledUpdatePositions,true);window.removeEventListener("resize",throttledUpdatePositions);overlays.forEach((overlay)=>overlay.element.remove());if(label)label.remove()},"cleanupFn");container.appendChild(fragment);return index+1}finally{if(cleanupFn){(window._highlightCleanupFunctions=window._highlightCleanupFunctions||[]).push(cleanupFn)}}}__name(highlightElement,"highlightElement");function isScrollableElement(element){if(!element||element.nodeType!==Node.ELEMENT_NODE){return null}const style=getCachedComputedStyle(element);if(!style)return null;const display=style.display;if(display==="inline"||display==="inline-block"){return null}const overflowX=style.overflowX;const overflowY=style.overflowY;const scrollableX=overflowX==="auto"||overflowX==="scroll";const scrollableY=overflowY==="auto"||overflowY==="scroll";if(!scrollableX&&!scrollableY){return null}const scrollWidth=element.scrollWidth-element.clientWidth;const scrollHeight=element.scrollHeight-element.clientHeight;const threshold=4;if(scrollWidth<threshold&&scrollHeight<threshold){return null}if(!scrollableY&&scrollWidth<threshold){return null}if(!scrollableX&&scrollHeight<threshold){return null}const distanceToTop=element.scrollTop;const distanceToLeft=element.scrollLeft;const distanceToRight=element.scrollWidth-element.clientWidth-element.scrollLeft;const distanceToBottom=element.scrollHeight-element.clientHeight-element.scrollTop;const scrollData={top:distanceToTop,right:distanceToRight,bottom:distanceToBottom,left:distanceToLeft};addExtraData(element,{scrollable:true,scrollData});return scrollData}__name(isScrollableElement,"isScrollableElement");function isTextNodeVisible(textNode){try{if(viewportExpansion===-1){const parentElement2=textNode.parentElement;if(!parentElement2)return false;try{return parentElement2.checkVisibility({checkOpacity:true,checkVisibilityCSS:true})}catch(e){const style=window.getComputedStyle(parentElement2);return style.display!=="none"&&style.visibility!=="hidden"&&style.opacity!=="0"}}const range=document.createRange();range.selectNodeContents(textNode);const rects=range.getClientRects();if(!rects||rects.length===0){return false}let isAnyRectVisible=false;let isAnyRectInViewport=false;for(const rect of rects){if(rect.width>0&&rect.height>0){isAnyRectVisible=true;if(!(rect.bottom<-viewportExpansion||rect.top>window.innerHeight+viewportExpansion||rect.right<-viewportExpansion||rect.left>window.innerWidth+viewportExpansion)){isAnyRectInViewport=true;break}}}if(!isAnyRectVisible||!isAnyRectInViewport){return false}const parentElement=textNode.parentElement;if(!parentElement)return false;try{return parentElement.checkVisibility({checkOpacity:true,checkVisibilityCSS:true})}catch(e){const style=window.getComputedStyle(parentElement);return style.display!=="none"&&style.visibility!=="hidden"&&style.opacity!=="0"}}catch(e){console.warn("Error checking text node visibility:",e);return false}}__name(isTextNodeVisible,"isTextNodeVisible");function isElementAccepted(element){if(!element||!element.tagName)return false;const alwaysAccept=new Set(["body","div","main","article","section","nav","header","footer"]);const tagName=element.tagName.toLowerCase();if(alwaysAccept.has(tagName))return true;const leafElementDenyList=new Set(["svg","script","style","link","meta","noscript","template"]);return!leafElementDenyList.has(tagName)}__name(isElementAccepted,"isElementAccepted");function isElementVisible(element){const style=getCachedComputedStyle(element);return element.offsetWidth>0&&element.offsetHeight>0&&style?.visibility!=="hidden"&&style?.display!=="none"}__name(isElementVisible,"isElementVisible");function isInteractiveElement(element){if(!element||element.nodeType!==Node.ELEMENT_NODE){return false}if(interactiveBlacklist.includes(element)){return false}if(interactiveWhitelist.includes(element)){return true}const tagName=element.tagName.toLowerCase();const style=getCachedComputedStyle(element);const interactiveCursors=new Set(["pointer","move","text","grab","grabbing","cell","copy","alias","all-scroll","col-resize","context-menu","crosshair","e-resize","ew-resize","help","n-resize","ne-resize","nesw-resize","ns-resize","nw-resize","nwse-resize","row-resize","s-resize","se-resize","sw-resize","vertical-text","w-resize","zoom-in","zoom-out"]);const nonInteractiveCursors=new Set(["not-allowed","no-drop","wait","progress","initial","inherit"]);function doesElementHaveInteractivePointer(element2){if(element2.tagName.toLowerCase()==="html")return false;if(style?.cursor&&interactiveCursors.has(style.cursor))return true;return false}__name(doesElementHaveInteractivePointer,"doesElementHaveInteractivePointer");let isInteractiveCursor=doesElementHaveInteractivePointer(element);if(isInteractiveCursor){return true}const interactiveElements=new Set(["a","button","input","select","textarea","details","summary","label","option","optgroup","fieldset","legend"]);const explicitDisableTags=new Set(["disabled","readonly"]);if(interactiveElements.has(tagName)){if(style?.cursor&&nonInteractiveCursors.has(style.cursor)){return false}for(const disableTag of explicitDisableTags){if(element.hasAttribute(disableTag)||element.getAttribute(disableTag)==="true"||element.getAttribute(disableTag)===""){return false}}if(element.disabled){return false}if(element.readOnly){return false}if(element.inert){return false}return true}const role=element.getAttribute("role");const ariaRole=element.getAttribute("aria-role");if(element.getAttribute("contenteditable")==="true"||element.isContentEditable){return true}if(element.classList&&(element.classList.contains("button")||element.classList.contains("dropdown-toggle")||element.getAttribute("data-index")||element.getAttribute("data-toggle")==="dropdown"||element.getAttribute("aria-haspopup")==="true")){return true}const interactiveRoles=new Set(["button","menu","menubar","menuitem","menuitemradio","menuitemcheckbox","radio","checkbox","tab","switch","slider","spinbutton","combobox","searchbox","textbox","listbox","option","scrollbar"]);const hasInteractiveRole=interactiveElements.has(tagName)||role&&interactiveRoles.has(role)||ariaRole&&interactiveRoles.has(ariaRole);if(hasInteractiveRole)return true;try{if(typeof getEventListeners==="function"){const listeners=getEventListeners(element);const mouseEvents=["click","mousedown","mouseup","dblclick"];for(const eventType of mouseEvents){if(listeners[eventType]&&listeners[eventType].length>0){return true}}}const getEventListenersForNode=element?.ownerDocument?.defaultView?.getEventListenersForNode||window.getEventListenersForNode;if(typeof getEventListenersForNode==="function"){const listeners=getEventListenersForNode(element);const interactionEvents=["click","mousedown","mouseup","keydown","keyup","submit","change","input","focus","blur"];for(const eventType of interactionEvents){for(const listener of listeners){if(listener.type===eventType){return true}}}}const commonMouseAttrs=["onclick","onmousedown","onmouseup","ondblclick"];for(const attr of commonMouseAttrs){if(element.hasAttribute(attr)||typeof element[attr]==="function"){return true}}}catch(e){}if(isScrollableElement(element)){return true}return false}__name(isInteractiveElement,"isInteractiveElement");function isTopElement(element){if(viewportExpansion===-1){return true}const rects=getCachedClientRects(element);if(!rects||rects.length===0){return false}let isAnyRectInViewport=false;for(const rect2 of rects){if(rect2.width>0&&rect2.height>0&&!(rect2.bottom<-viewportExpansion||rect2.top>window.innerHeight+viewportExpansion||rect2.right<-viewportExpansion||rect2.left>window.innerWidth+viewportExpansion)){isAnyRectInViewport=true;break}}if(!isAnyRectInViewport){return false}let doc=element.ownerDocument;if(doc!==window.document){return true}let rect=Array.from(rects).find((r)=>r.width>0&&r.height>0);if(!rect){return false}const shadowRoot=element.getRootNode();if(shadowRoot instanceof ShadowRoot){const centerX=rect.left+rect.width/2;const centerY=rect.top+rect.height/2;try{const topEl=shadowRoot.elementFromPoint(centerX,centerY);if(!topEl)return false;let current=topEl;while(current&&current!==shadowRoot){if(current===element)return true;current=current.parentElement}return false}catch(e){return true}}const margin=5;const checkPoints=[{x:rect.left+rect.width/2,y:rect.top+rect.height/2},{x:rect.left+margin,y:rect.top+margin},{x:rect.right-margin,y:rect.bottom-margin}];return checkPoints.some(({x,y})=>{try{const topEl=document.elementFromPoint(x,y);if(!topEl)return false;let current=topEl;while(current&&current!==document.documentElement){if(current===element)return true;current=current.parentElement}return false}catch(e){return true}})}__name(isTopElement,"isTopElement");function isInExpandedViewport(element,viewportExpansion2){if(viewportExpansion2===-1){return true}const rects=element.getClientRects();if(!rects||rects.length===0){const boundingRect=getCachedBoundingRect(element);if(!boundingRect||boundingRect.width===0||boundingRect.height===0){return false}return!(boundingRect.bottom<-viewportExpansion2||boundingRect.top>window.innerHeight+viewportExpansion2||boundingRect.right<-viewportExpansion2||boundingRect.left>window.innerWidth+viewportExpansion2)}for(const rect of rects){if(rect.width===0||rect.height===0)continue;if(!(rect.bottom<-viewportExpansion2||rect.top>window.innerHeight+viewportExpansion2||rect.right<-viewportExpansion2||rect.left>window.innerWidth+viewportExpansion2)){return true}}return false}__name(isInExpandedViewport,"isInExpandedViewport");function isInteractiveCandidate(element){if(!element||element.nodeType!==Node.ELEMENT_NODE)return false;const tagName=element.tagName.toLowerCase();const interactiveElements=new Set(["a","button","input","select","textarea","details","summary","label"]);if(interactiveElements.has(tagName))return true;const hasQuickInteractiveAttr=element.hasAttribute("onclick")||element.hasAttribute("role")||element.hasAttribute("tabindex")||element.hasAttribute("aria-")||element.hasAttribute("data-action")||element.getAttribute("contenteditable")==="true";return hasQuickInteractiveAttr}__name(isInteractiveCandidate,"isInteractiveCandidate");const DISTINCT_INTERACTIVE_TAGS=new Set(["a","button","input","select","textarea","summary","details","label","option"]);const INTERACTIVE_ROLES=new Set(["button","link","menuitem","menuitemradio","menuitemcheckbox","radio","checkbox","tab","switch","slider","spinbutton","combobox","searchbox","textbox","listbox","option","scrollbar"]);function isHeuristicallyInteractive(element){if(!element||element.nodeType!==Node.ELEMENT_NODE)return false;if(!isElementVisible(element))return false;const hasInteractiveAttributes=element.hasAttribute("role")||element.hasAttribute("tabindex")||element.hasAttribute("onclick")||typeof element.onclick==="function";const hasInteractiveClass=/\\b(btn|clickable|menu|item|entry|link)\\b/i.test(element.className||"");const isInKnownContainer=Boolean(element.closest(\'button,a,[role="button"],.menu,.dropdown,.list,.toolbar\'));const hasVisibleChildren=[...element.children].some(isElementVisible);const isParentBody=element.parentElement&&element.parentElement.isSameNode(document.body);return(isInteractiveElement(element)||hasInteractiveAttributes||hasInteractiveClass)&&hasVisibleChildren&&isInKnownContainer&&!isParentBody}__name(isHeuristicallyInteractive,"isHeuristicallyInteractive");function isElementDistinctInteraction(element){if(!element||element.nodeType!==Node.ELEMENT_NODE){return false}const tagName=element.tagName.toLowerCase();const role=element.getAttribute("role");if(tagName==="iframe"){return true}if(DISTINCT_INTERACTIVE_TAGS.has(tagName)){return true}if(role&&INTERACTIVE_ROLES.has(role)){return true}if(element.isContentEditable||element.getAttribute("contenteditable")==="true"){return true}if(element.hasAttribute("data-testid")||element.hasAttribute("data-cy")||element.hasAttribute("data-test")){return true}if(element.hasAttribute("onclick")||typeof element.onclick==="function"){return true}try{const getEventListenersForNode=element?.ownerDocument?.defaultView?.getEventListenersForNode||window.getEventListenersForNode;if(typeof getEventListenersForNode==="function"){const listeners=getEventListenersForNode(element);const interactionEvents=["click","mousedown","mouseup","keydown","keyup","submit","change","input","focus","blur"];for(const eventType of interactionEvents){for(const listener of listeners){if(listener.type===eventType){return true}}}}const commonEventAttrs=["onmousedown","onmouseup","onkeydown","onkeyup","onsubmit","onchange","oninput","onfocus","onblur"];if(commonEventAttrs.some((attr)=>element.hasAttribute(attr))){return true}}catch(e){}if(isHeuristicallyInteractive(element)){return true}return false}__name(isElementDistinctInteraction,"isElementDistinctInteraction");function handleHighlighting(nodeData,node,parentIframe,isParentHighlighted){if(!nodeData.isInteractive)return false;let shouldHighlight=false;if(!isParentHighlighted){shouldHighlight=true}else{if(isElementDistinctInteraction(node)){shouldHighlight=true}else{shouldHighlight=false}}if(shouldHighlight){nodeData.isInViewport=isInExpandedViewport(node,viewportExpansion);if(nodeData.isInViewport||viewportExpansion===-1){nodeData.highlightIndex=highlightIndex++;if(doHighlightElements){if(focusHighlightIndex>=0){if(focusHighlightIndex===nodeData.highlightIndex){highlightElement(node,nodeData.highlightIndex,parentIframe)}}else{highlightElement(node,nodeData.highlightIndex,parentIframe)}return true}}}return false}__name(handleHighlighting,"handleHighlighting");function buildDomTree(node,parentIframe=null,isParentHighlighted=false){if(!node||node.id===HIGHLIGHT_CONTAINER_ID||node.nodeType!==Node.ELEMENT_NODE&&node.nodeType!==Node.TEXT_NODE){return null}if(!node||node.id===HIGHLIGHT_CONTAINER_ID){return null}if(node.dataset?.browserUseIgnore==="true"||node.dataset?.pageAgentIgnore==="true"){return null}if(node.getAttribute&&node.getAttribute("aria-hidden")==="true"){return null}if(node===document.body){const nodeData2={tagName:"body",attributes:{},xpath:"/body",children:[]};for(const child of node.childNodes){const domElement=buildDomTree(child,parentIframe,false);if(domElement)nodeData2.children.push(domElement)}const id2=`${ID.current++}`;DOM_HASH_MAP[id2]=nodeData2;return id2}if(node.nodeType!==Node.ELEMENT_NODE&&node.nodeType!==Node.TEXT_NODE){return null}if(node.nodeType===Node.TEXT_NODE){const textContent=node.textContent?.trim();if(!textContent){return null}const parentElement=node.parentElement;if(!parentElement||parentElement.tagName.toLowerCase()==="script"){return null}const id2=`${ID.current++}`;DOM_HASH_MAP[id2]={type:"TEXT_NODE",text:textContent,isVisible:isTextNodeVisible(node)};return id2}if(node.nodeType===Node.ELEMENT_NODE&&!isElementAccepted(node)){return null}if(viewportExpansion!==-1&&!node.shadowRoot){const rect=getCachedBoundingRect(node);const style=getCachedComputedStyle(node);const isFixedOrSticky=style&&(style.position==="fixed"||style.position==="sticky");const hasSize=node.offsetWidth>0||node.offsetHeight>0;if(!rect||!isFixedOrSticky&&!hasSize&&(rect.bottom<-viewportExpansion||rect.top>window.innerHeight+viewportExpansion||rect.right<-viewportExpansion||rect.left>window.innerWidth+viewportExpansion)){return null}}const nodeData={tagName:node.tagName.toLowerCase(),attributes:{},children:[]};if(isInteractiveCandidate(node)||node.tagName.toLowerCase()==="iframe"||node.tagName.toLowerCase()==="body"){const attributeNames=node.getAttributeNames?.()||[];for(const name of attributeNames){const value=node.getAttribute(name);nodeData.attributes[name]=value}if(node.tagName.toLowerCase()==="input"&&(node.type==="checkbox"||node.type==="radio")){nodeData.attributes.checked=node.checked?"true":"false"}}let nodeWasHighlighted=false;if(node.nodeType===Node.ELEMENT_NODE){nodeData.isVisible=isElementVisible(node);if(nodeData.isVisible){nodeData.isTopElement=isTopElement(node);const role=node.getAttribute("role");const isMenuContainer=role==="menu"||role==="menubar"||role==="listbox";if(nodeData.isTopElement||isMenuContainer){nodeData.isInteractive=isInteractiveElement(node);nodeWasHighlighted=handleHighlighting(nodeData,node,parentIframe,isParentHighlighted);nodeData.ref=node;if(nodeData.isInteractive&&Object.keys(nodeData.attributes).length===0){const attributeNames=node.getAttributeNames?.()||[];for(const name of attributeNames){const value=node.getAttribute(name);nodeData.attributes[name]=value}}}}}if(node.tagName){const tagName=node.tagName.toLowerCase();if(tagName==="iframe"){try{const iframeDoc=node.contentDocument||node.contentWindow?.document;if(iframeDoc){for(const child of iframeDoc.childNodes){const domElement=buildDomTree(child,node,false);if(domElement)nodeData.children.push(domElement)}}}catch(e){console.warn("Unable to access iframe:",e)}}else if(node.isContentEditable||node.getAttribute("contenteditable")==="true"||node.id==="tinymce"||node.classList.contains("mce-content-body")||tagName==="body"&&node.getAttribute("data-id")?.startsWith("mce_")){for(const child of node.childNodes){const domElement=buildDomTree(child,parentIframe,nodeWasHighlighted);if(domElement)nodeData.children.push(domElement)}}else{if(node.shadowRoot){nodeData.shadowRoot=true;for(const child of node.shadowRoot.childNodes){const domElement=buildDomTree(child,parentIframe,nodeWasHighlighted);if(domElement)nodeData.children.push(domElement)}}for(const child of node.childNodes){const passHighlightStatusToChild=nodeWasHighlighted||isParentHighlighted;const domElement=buildDomTree(child,parentIframe,passHighlightStatusToChild);if(domElement)nodeData.children.push(domElement)}}}if(nodeData.tagName==="a"&&nodeData.children.length===0&&!nodeData.attributes.href){const rect=getCachedBoundingRect(node);const hasSize=rect&&rect.width>0&&rect.height>0||node.offsetWidth>0||node.offsetHeight>0;if(!hasSize){return null}}nodeData.extra=extraData.get(node)||null;const id=`${ID.current++}`;DOM_HASH_MAP[id]=nodeData;return id}__name(buildDomTree,"buildDomTree");const rootId=buildDomTree(document.body);DOM_CACHE.clearCache();return{rootId,map:DOM_HASH_MAP}},"domTree");const DEFAULT_VIEWPORT_EXPANSION=-1;function resolveViewportExpansion(viewportExpansion){return viewportExpansion??DEFAULT_VIEWPORT_EXPANSION}__name(resolveViewportExpansion,"resolveViewportExpansion");const newElementsCache=new WeakMap;function getFlatTree(config){const viewportExpansion=resolveViewportExpansion(config.viewportExpansion);const interactiveBlacklist=[];for(const item of config.interactiveBlacklist||[]){if(typeof item==="function"){interactiveBlacklist.push(item())}else{interactiveBlacklist.push(item)}}const interactiveWhitelist=[];for(const item of config.interactiveWhitelist||[]){if(typeof item==="function"){interactiveWhitelist.push(item())}else{interactiveWhitelist.push(item)}}const elements=domTree({doHighlightElements:true,debugMode:true,focusHighlightIndex:-1,viewportExpansion,interactiveBlacklist,interactiveWhitelist,highlightOpacity:config.highlightOpacity??0,highlightLabelOpacity:config.highlightLabelOpacity??0.1});const currentUrl=window.location.href;for(const nodeId in elements.map){const node=elements.map[nodeId];if(node.isInteractive&&node.ref){const ref=node.ref;if(!newElementsCache.has(ref)){newElementsCache.set(ref,currentUrl);node.isNew=true}}}return elements}__name(getFlatTree,"getFlatTree");const globRegexCache=new Map;function globToRegex(pattern){let regex=globRegexCache.get(pattern);if(!regex){const escaped=pattern.replace(/[.+^${}()|[\\]\\\\]/g,"\\\\$&");regex=new RegExp(`^${escaped.replace(/\\*/g,".*")}$`);globRegexCache.set(pattern,regex)}return regex}__name(globToRegex,"globToRegex");function matchAttributes(attrs,patterns){const result2={};for(const pattern of patterns){if(pattern.includes("*")){const regex=globToRegex(pattern);for(const key of Object.keys(attrs)){if(regex.test(key)&&attrs[key].trim()){result2[key]=attrs[key].trim()}}}else{const value=attrs[pattern];if(value&&value.trim()){result2[pattern]=value.trim()}}}return result2}__name(matchAttributes,"matchAttributes");function flatTreeToString(flatTree,includeAttributes){const DEFAULT_INCLUDE_ATTRIBUTES=["title","type","checked","name","role","value","placeholder","data-date-format","alt","aria-label","aria-expanded","data-state","aria-checked","id","for","target","aria-haspopup","aria-controls","aria-owns","contenteditable"];const includeAttrs=[...includeAttributes||[],...DEFAULT_INCLUDE_ATTRIBUTES];const capTextLength=__name((text,maxLength)=>{if(text.length>maxLength){return text.substring(0,maxLength)+"..."}return text},"capTextLength");const buildTreeNode=__name((nodeId)=>{const node=flatTree.map[nodeId];if(!node)return null;if(node.type==="TEXT_NODE"){const textNode=node;return{type:"text",text:textNode.text,isVisible:textNode.isVisible,parent:null,children:[]}}else{const elementNode=node;const children=[];if(elementNode.children){for(const childId of elementNode.children){const child=buildTreeNode(childId);if(child){child.parent=null;children.push(child)}}}return{type:"element",tagName:elementNode.tagName,attributes:elementNode.attributes??{},isVisible:elementNode.isVisible??false,isInteractive:elementNode.isInteractive??false,isTopElement:elementNode.isTopElement??false,isNew:elementNode.isNew??false,highlightIndex:elementNode.highlightIndex,parent:null,children,extra:elementNode.extra??{}}}},"buildTreeNode");const setParentReferences=__name((node,parent=null)=>{node.parent=parent;for(const child of node.children){setParentReferences(child,node)}},"setParentReferences");const rootNode=buildTreeNode(flatTree.rootId);if(!rootNode)return"";setParentReferences(rootNode);const hasParentWithHighlightIndex=__name((node)=>{let current=node.parent;while(current){if(current.type==="element"&&current.highlightIndex!==undefined){return true}current=current.parent}return false},"hasParentWithHighlightIndex");const processNode=__name((node,depth,result22)=>{let nextDepth=depth;const depthStr="\\t".repeat(depth);if(node.type==="element"){if(node.highlightIndex!==undefined){nextDepth+=1;const text=getAllTextTillNextClickableElement(node);let attributesHtmlStr="";if(includeAttrs.length>0&&node.attributes){const attributesToInclude=matchAttributes(node.attributes,includeAttrs);const keys=Object.keys(attributesToInclude);if(keys.length>1){const keysToRemove=new Set;const seenValues={};for(const key of keys){const value=attributesToInclude[key];if(value.length>5){if(value in seenValues){keysToRemove.add(key)}else{seenValues[value]=key}}}for(const key of keysToRemove){delete attributesToInclude[key]}}if(attributesToInclude.role===node.tagName){delete attributesToInclude.role}const attrsToRemoveIfTextMatches=["aria-label","placeholder","title"];for(const attr of attrsToRemoveIfTextMatches){if(attributesToInclude[attr]&&attributesToInclude[attr].toLowerCase().trim()===text.toLowerCase().trim()){delete attributesToInclude[attr]}}if(Object.keys(attributesToInclude).length>0){attributesHtmlStr=Object.entries(attributesToInclude).map(([key,value])=>`${key}=${capTextLength(value,20)}`).join(" ")}}const highlightIndicator=node.isNew?`*[${node.highlightIndex}]`:`[${node.highlightIndex}]`;let line=`${depthStr}${highlightIndicator}<${node.tagName??""}`;if(attributesHtmlStr){line+=` ${attributesHtmlStr}`}if(node.extra){if(node.extra.scrollable){let scrollDataText="";if(node.extra.scrollData?.left)scrollDataText+=`left=${node.extra.scrollData.left}, `;if(node.extra.scrollData?.top)scrollDataText+=`top=${node.extra.scrollData.top}, `;if(node.extra.scrollData?.right)scrollDataText+=`right=${node.extra.scrollData.right}, `;if(node.extra.scrollData?.bottom)scrollDataText+=`bottom=${node.extra.scrollData.bottom}`;line+=` data-scrollable="${scrollDataText}"`}}if(text){const trimmedText=text.trim();if(!attributesHtmlStr){line+=" "}line+=`>${trimmedText}`}else if(!attributesHtmlStr){line+=" "}line+=" />";result22.push(line)}for(const child of node.children){processNode(child,nextDepth,result22)}}else if(node.type==="text"){if(hasParentWithHighlightIndex(node)){return}if(node.parent&&node.parent.type==="element"&&node.parent.isVisible&&node.parent.isTopElement){result22.push(`${depthStr}${node.text??""}`)}}},"processNode");const result2=[];processNode(rootNode,0,result2);return result2.join(`\n`)}__name(flatTreeToString,"flatTreeToString");const getAllTextTillNextClickableElement=__name((node,maxDepth=-1)=>{const textParts=[];const collectText=__name((currentNode,currentDepth)=>{if(maxDepth!==-1&&currentDepth>maxDepth){return}if(currentNode.type==="element"&&currentNode!==node&&currentNode.highlightIndex!==undefined){return}if(currentNode.type==="text"&&currentNode.text){textParts.push(currentNode.text)}else if(currentNode.type==="element"){for(const child of currentNode.children){collectText(child,currentDepth+1)}}},"collectText");collectText(node,0);return textParts.join(`\n`).trim()},"getAllTextTillNextClickableElement");function getSelectorMap(flatTree){const selectorMap=new Map;const keys=Object.keys(flatTree.map);for(const key of keys){const node=flatTree.map[key];if(node.isInteractive&&typeof node.highlightIndex==="number"){selectorMap.set(node.highlightIndex,node)}}return selectorMap}__name(getSelectorMap,"getSelectorMap");function getElementTextMap(simplifiedHTML){const lines=simplifiedHTML.split(`\n`).map((line)=>line.trim()).filter((line)=>line.length>0);const elementTextMap=new Map;for(const line of lines){const regex=/^\\[(\\d+)\\]<[^>]+>([^<]*)/;const match=regex.exec(line);if(match){const index=parseInt(match[1],10);elementTextMap.set(index,line)}}return elementTextMap}__name(getElementTextMap,"getElementTextMap");function cleanUpHighlights(){const cleanupFunctions=window._highlightCleanupFunctions||[];for(const cleanup of cleanupFunctions){if(typeof cleanup==="function"){cleanup()}}window._highlightCleanupFunctions=[]}__name(cleanUpHighlights,"cleanUpHighlights");window.addEventListener("popstate",()=>{cleanUpHighlights()});window.addEventListener("hashchange",()=>{cleanUpHighlights()});window.addEventListener("beforeunload",()=>{cleanUpHighlights()});const navigation=window.navigation;if(navigation&&typeof navigation.addEventListener==="function"){navigation.addEventListener("navigate",()=>{cleanUpHighlights()})}else{let currentUrl=window.location.href;setInterval(()=>{if(window.location.href!==currentUrl){currentUrl=window.location.href;cleanUpHighlights()}},500)}function getPageInfo(){const viewport_width=window.innerWidth;const viewport_height=window.innerHeight;const page_width=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth||0);const page_height=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight||0);const scroll_x=window.scrollX||window.pageXOffset||document.documentElement.scrollLeft||0;const scroll_y=window.scrollY||window.pageYOffset||document.documentElement.scrollTop||0;const pixels_below=Math.max(0,page_height-(window.innerHeight+scroll_y));const pixels_right=Math.max(0,page_width-(window.innerWidth+scroll_x));return{viewport_width,viewport_height,page_width,page_height,scroll_x,scroll_y,pixels_above:scroll_y,pixels_below,pages_above:viewport_height>0?scroll_y/viewport_height:0,pages_below:viewport_height>0?pixels_below/viewport_height:0,total_pages:viewport_height>0?page_height/viewport_height:0,current_page_position:scroll_y/Math.max(1,page_height-viewport_height),pixels_left:scroll_x,pixels_right}}__name(getPageInfo,"getPageInfo");function patchReact(pageController){const reactRootElements=document.querySelectorAll(\'[data-reactroot], [data-reactid], [data-react-checksum], #root, #app, [id^="root-"], [id^="app-"], #adex-wrapper, #adex-root\');for(const element of reactRootElements){element.setAttribute("data-page-agent-not-interactive","true")}}__name(patchReact,"patchReact");const _PageController=class _PageController extends EventTarget{config;flatTree=null;selectorMap=new Map;elementTextMap=new Map;simplifiedHTML="<EMPTY>";lastTimeUpdate=0;isIndexed=false;mask=null;maskReady=null;constructor(config={}){super();this.config=config;patchReact();if(config.enableMask)this.initMask()}initMask(){if(this.maskReady!==null)return;this.maskReady=(async()=>{var SimulatorMask = window.__LiteMask;this.mask=new SimulatorMask})()}async getCurrentUrl(){return window.location.href}async getLastUpdateTime(){return this.lastTimeUpdate}async getBrowserState(){const url=window.location.href;const title=document.title;const pi=getPageInfo();const viewportExpansion=resolveViewportExpansion(this.config.viewportExpansion);await this.updateTree();const content=this.simplifiedHTML;const titleLine=`Current Page: [${title}](${url})`;const pageInfoLine=`Page info: ${pi.viewport_width}x${pi.viewport_height}px viewport, ${pi.page_width}x${pi.page_height}px total page size, ${pi.pages_above.toFixed(1)} pages above, ${pi.pages_below.toFixed(1)} pages below, ${pi.total_pages.toFixed(1)} total pages, at ${(pi.current_page_position*100).toFixed(0)}% of page`;const elementsLabel=viewportExpansion===-1?"Interactive elements from top layer of the current page (full page):":"Interactive elements from top layer of the current page inside the viewport:";const hasContentAbove=pi.pixels_above>4;const scrollHintAbove=hasContentAbove&&viewportExpansion!==-1?`... ${pi.pixels_above} pixels above (${pi.pages_above.toFixed(1)} pages) - scroll to see more ...`:"[Start of page]";const header=`${titleLine}\n${pageInfoLine}\n\n${elementsLabel}\n\n${scrollHintAbove}`;const hasContentBelow=pi.pixels_below>4;const footer=hasContentBelow&&viewportExpansion!==-1?`... ${pi.pixels_below} pixels below (${pi.pages_below.toFixed(1)} pages) - scroll to see more ...`:"[End of page]";return{url,title,header,content,footer}}async updateTree(){this.dispatchEvent(new Event("beforeUpdate"));this.lastTimeUpdate=Date.now();if(this.mask){this.mask.wrapper.style.pointerEvents="none"}cleanUpHighlights();const blacklist=[...this.config.interactiveBlacklist||[],...document.querySelectorAll("[data-page-agent-not-interactive]").values()];this.flatTree=getFlatTree({...this.config,interactiveBlacklist:blacklist});this.simplifiedHTML=flatTreeToString(this.flatTree,this.config.includeAttributes);this.selectorMap.clear();this.selectorMap=getSelectorMap(this.flatTree);this.elementTextMap.clear();this.elementTextMap=getElementTextMap(this.simplifiedHTML);this.isIndexed=true;if(this.mask){this.mask.wrapper.style.pointerEvents="auto"}this.dispatchEvent(new Event("afterUpdate"));return this.simplifiedHTML}async cleanUpHighlights(){cleanUpHighlights()}assertIndexed(){if(!this.isIndexed){throw new Error("DOM tree not indexed yet. Can not perform actions on elements.")}}async clickElement(index){try{this.assertIndexed();const element=getElementByIndex(this.selectorMap,index);const elemText=this.elementTextMap.get(index);await clickElement(element);if(isAnchorElement(element)&&element.target==="_blank"){return{success:true,message:`✅ Clicked element (${elemText??index}). ⚠️ Link opened in a new tab.`}}return{success:true,message:`✅ Clicked element (${elemText??index}).`}}catch(error){return{success:false,message:`❌ Failed to click element: ${error}`}}}async inputText(index,text){try{this.assertIndexed();const element=getElementByIndex(this.selectorMap,index);const elemText=this.elementTextMap.get(index);await inputTextElement(element,text);return{success:true,message:`✅ Input text (${text}) into element (${elemText??index}).`}}catch(error){return{success:false,message:`❌ Failed to input text: ${error}`}}}async selectOption(index,optionText){try{this.assertIndexed();const element=getElementByIndex(this.selectorMap,index);const elemText=this.elementTextMap.get(index);await selectOptionElement(element,optionText);return{success:true,message:`✅ Selected option (${optionText}) in element (${elemText??index}).`}}catch(error){return{success:false,message:`❌ Failed to select option: ${error}`}}}async scroll(options){try{const{down,numPages,pixels,index}=options;this.assertIndexed();const scrollAmount=pixels??numPages*(down?1:-1)*window.innerHeight;const element=index!==undefined?getElementByIndex(this.selectorMap,index):null;const message=await scrollVertically(down,scrollAmount,element);return{success:true,message}}catch(error){return{success:false,message:`❌ Failed to scroll: ${error}`}}}async scrollHorizontally(options){try{const{right,pixels,index}=options;this.assertIndexed();const scrollAmount=pixels*(right?1:-1);const element=index!==undefined?getElementByIndex(this.selectorMap,index):null;const message=await scrollHorizontally(right,scrollAmount,element);return{success:true,message}}catch(error){return{success:false,message:`❌ Failed to scroll horizontally: ${error}`}}}async executeJavascript(script){try{const asyncFunction=eval(`(async () => { ${script} })`);const result=await asyncFunction();return{success:true,message:`✅ Executed JavaScript. Result: ${result}`}}catch(error){return{success:false,message:`❌ Error executing JavaScript: ${error}`}}}async showMask(){await this.maskReady;this.mask?.show()}async hideMask(){await this.maskReady;this.mask?.hide()}dispose(){cleanUpHighlights();this.flatTree=null;this.selectorMap.clear();this.elementTextMap.clear();this.simplifiedHTML="<EMPTY>";this.isIndexed=false;this.mask?.dispose();this.mask=null}};__name(_PageController,"PageController");let PageController=_PageController;window.__PageController=PageController})();\n})();\n\n// --- Signet Page Agent API ---\n(function(){\n var pc = new window.__PageController({ enableMask: false, highlightOpacity: 0, highlightLabelOpacity: 0 });\n \n window.signet = window.signet || {};\n window.signet.pageController = pc;\n \n window.signet.getDomState = async function(){\n try {\n var state = await pc.getBrowserState();\n return { success: true, state: state };\n } catch(e) {\n return { success: false, error: e.message || String(e) };\n }\n };\n \n window.signet.executeAction = async function(action){\n try {\n var result;\n switch(action.type){\n case \'click_element\':\n result = await pc.clickElement(action.index);\n break;\n case \'input_text\':\n result = await pc.inputText(action.index, action.text);\n break;\n case \'select_option\':\n result = await pc.selectOption(action.index, action.text);\n break;\n case \'scroll\':\n result = await pc.scroll({ down: action.direction === \'down\', numPages: action.amount || 1 });\n break;\n default:\n result = { success: false, message: \'Unknown action type: \' + action.type };\n }\n return result;\n } catch(e) {\n return { success: false, message: e.message || String(e) };\n }\n };\n \n window.signet.agentStart = async function(){\n pc.initMask();\n await pc.showMask();\n };\n \n window.signet.agentStop = async function(){\n await pc.hideMask();\n };\n})();',Yt=`
2
2
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
3
3
  html { font-family: 'Geist Mono', 'IBM Plex Mono', monospace; font-size: 13px; line-height: 1.5; color: var(--sig-text); background: var(--sig-bg); -webkit-font-smoothing: antialiased; }
4
4
  body { margin: 0; padding: 8px; min-height: 100%; }
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BBKe1vca.js","./Ddm7yfuh.js","../assets/vendor-ui.BHIBfuhK.css","./CQjlljeJ.js","./Cik1Y8bQ.js","./PPVm8Dsz.js","../assets/2.BqUJ-YIW.css","./D9ZAYnCR.js","./BUS5nQyj.js","./HOTJvN83.js","./BChLYXWi.js","./-GB9BHh5.js","../assets/TroubleshooterPanel.Bj27xjMc.css","./CNH5O-MO.js","./anLJSqtR.js","../assets/PageBanner.BodUOjhn.css","./DOaCXx_K.js","./BWbT4F5H.js","./pgAhHv2c.js","../assets/LogsTab.DpPjv4Ww.css"])))=>i.map(i=>d[i]);
2
- import{_ as $}from"./PPVm8Dsz.js";import{p as N,m as Q,o as q,Q as A,h as o,v as x,i as v,t as w,k as l,j as J,y as E,B as I,R as P,O as B,b as n,d as K,c as u,f as c,T as D,z as H,g as U,l as f,P as M}from"./Ddm7yfuh.js";var W=f('<div class="audit-error svelte-1xfrv6f"> </div>'),X=f('<div class="audit-loading svelte-1xfrv6f">Loading troubleshooter...</div>'),Y=f('<div class="audit-error svelte-1xfrv6f"> </div>'),Z=f('<div class="audit-loading svelte-1xfrv6f">Loading logs...</div>'),ee=f('<div class="audit-tab svelte-1xfrv6f"><header class="tab-header svelte-1xfrv6f"><div class="tab-header-left svelte-1xfrv6f"><span class="tab-header-title svelte-1xfrv6f">AUDIT</span> <span class="tab-header-sep svelte-1xfrv6f" aria-hidden="true"></span> <span class="tab-header-count svelte-1xfrv6f">TROUBLESHOOTER + LOGS</span></div> <div class="sub-group svelte-1xfrv6f"><button>TROUBLESHOOTER</button> <button>LOGS</button></div></header> <div class="audit-content audit-embed svelte-1xfrv6f"><!></div></div>');function ae(F,G){N(G,!0);const V=new Set(["troubleshooter","logs"]);function O(){if(typeof window>"u")return"troubleshooter";const t=window.location.hash.replace("#","").split("/");return t[0]!=="audit"?"troubleshooter":t[1]&&V.has(t[1])?t[1]:"troubleshooter"}let i=Q(q(O()));A(()=>{if(typeof window>"u")return;const e=o(i)==="troubleshooter"?"audit":`audit/${o(i)}`;window.location.hash!==`#${e}`&&window.history.replaceState(null,"",`#${e}`)}),A(()=>{if(typeof window>"u")return;const e=()=>{const t=O();t!==o(i)&&x(i,t,!0)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)});const T="px-2.5 py-1 text-[10px] font-medium uppercase tracking-[0.06em] rounded-md transition-colors duration-150 border-none cursor-pointer whitespace-nowrap",L=`${T} text-[var(--sig-highlight)] bg-[color-mix(in_srgb,var(--sig-highlight),var(--sig-bg)_90%)] border border-[color-mix(in_srgb,var(--sig-highlight),transparent_85%)]`,k=`${T} bg-transparent text-[var(--sig-text-muted)] hover:text-[var(--sig-highlight)] hover:bg-[color-mix(in_srgb,var(--sig-highlight),var(--sig-bg)_94%)]`;var h=ee(),g=v(h),S=w(v(g),2),_=v(S),y=w(_,2);l(S),l(g);var R=w(g,2),j=v(R);{var z=e=>{var t=u(),p=c(t);D(p,()=>$(()=>import("./BBKe1vca.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),a=>{var s=X();n(a,s)},(a,s)=>{var r=u(),d=c(r);U(d,()=>o(s).default,(b,m)=>{m(b,{})}),n(a,r)},(a,s)=>{var r=W(),d=v(r);l(r),E(()=>H(d,`Failed to load: ${o(s)?.message??"unknown"??""}`)),n(a,r)}),n(e,t)},C=e=>{var t=u(),p=c(t);D(p,()=>$(()=>import("./CNH5O-MO.js"),__vite__mapDeps([13,1,2,3,4,5,6,14,15,16,17,8,18,7,9,19]),import.meta.url),a=>{var s=Z();n(a,s)},(a,s)=>{var r=u(),d=c(r);U(d,()=>o(s).default,(b,m)=>{m(b,{})}),n(a,r)},(a,s)=>{var r=Y(),d=v(r);l(r),E(()=>H(d,`Failed to load: ${o(s)?.message??"unknown"??""}`)),n(a,r)}),n(e,t)};J(j,e=>{o(i)==="troubleshooter"?e(z):e(C,-1)})}l(R),l(h),E(()=>{I(_,1,P(o(i)==="troubleshooter"?L:k),"svelte-1xfrv6f"),I(y,1,P(o(i)==="logs"?L:k),"svelte-1xfrv6f")}),B("click",_,()=>x(i,"troubleshooter")),B("click",y,()=>x(i,"logs")),n(F,h),K()}M(["click"]);export{ae as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CaU0Clxv.js","./Ddm7yfuh.js","../assets/vendor-ui.BHIBfuhK.css","./BV4JdBu0.js","./Cik1Y8bQ.js","./PPVm8Dsz.js","../assets/2.BqUJ-YIW.css","./F3rfl8a8.js","./Bo3vPMKS.js","./Di6D7Klw.js","./Rg8vdugb.js","./E3CptpiY.js","../assets/TroubleshooterPanel.Bj27xjMc.css","./_Q3l5Fvj.js","./anLJSqtR.js","../assets/PageBanner.BodUOjhn.css","./DOaCXx_K.js","./F3wfQkst.js","./BYrqQzwp.js","../assets/LogsTab.DpPjv4Ww.css"])))=>i.map(i=>d[i]);
2
+ import{_ as $}from"./PPVm8Dsz.js";import{p as N,m as Q,o as q,Q as A,h as o,v as x,i as v,t as w,k as l,j as J,y as E,B as I,R as P,O as B,b as n,d as K,c as u,f as c,T as D,z as H,g as U,l as f,P as M}from"./Ddm7yfuh.js";var W=f('<div class="audit-error svelte-1xfrv6f"> </div>'),X=f('<div class="audit-loading svelte-1xfrv6f">Loading troubleshooter...</div>'),Y=f('<div class="audit-error svelte-1xfrv6f"> </div>'),Z=f('<div class="audit-loading svelte-1xfrv6f">Loading logs...</div>'),ee=f('<div class="audit-tab svelte-1xfrv6f"><header class="tab-header svelte-1xfrv6f"><div class="tab-header-left svelte-1xfrv6f"><span class="tab-header-title svelte-1xfrv6f">AUDIT</span> <span class="tab-header-sep svelte-1xfrv6f" aria-hidden="true"></span> <span class="tab-header-count svelte-1xfrv6f">TROUBLESHOOTER + LOGS</span></div> <div class="sub-group svelte-1xfrv6f"><button>TROUBLESHOOTER</button> <button>LOGS</button></div></header> <div class="audit-content audit-embed svelte-1xfrv6f"><!></div></div>');function ae(F,G){N(G,!0);const V=new Set(["troubleshooter","logs"]);function O(){if(typeof window>"u")return"troubleshooter";const t=window.location.hash.replace("#","").split("/");return t[0]!=="audit"?"troubleshooter":t[1]&&V.has(t[1])?t[1]:"troubleshooter"}let i=Q(q(O()));A(()=>{if(typeof window>"u")return;const e=o(i)==="troubleshooter"?"audit":`audit/${o(i)}`;window.location.hash!==`#${e}`&&window.history.replaceState(null,"",`#${e}`)}),A(()=>{if(typeof window>"u")return;const e=()=>{const t=O();t!==o(i)&&x(i,t,!0)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)});const T="px-2.5 py-1 text-[10px] font-medium uppercase tracking-[0.06em] rounded-md transition-colors duration-150 border-none cursor-pointer whitespace-nowrap",L=`${T} text-[var(--sig-highlight)] bg-[color-mix(in_srgb,var(--sig-highlight),var(--sig-bg)_90%)] border border-[color-mix(in_srgb,var(--sig-highlight),transparent_85%)]`,k=`${T} bg-transparent text-[var(--sig-text-muted)] hover:text-[var(--sig-highlight)] hover:bg-[color-mix(in_srgb,var(--sig-highlight),var(--sig-bg)_94%)]`;var h=ee(),g=v(h),S=w(v(g),2),_=v(S),y=w(_,2);l(S),l(g);var R=w(g,2),j=v(R);{var z=e=>{var t=u(),p=c(t);D(p,()=>$(()=>import("./CaU0Clxv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),a=>{var s=X();n(a,s)},(a,s)=>{var r=u(),d=c(r);U(d,()=>o(s).default,(b,m)=>{m(b,{})}),n(a,r)},(a,s)=>{var r=W(),d=v(r);l(r),E(()=>H(d,`Failed to load: ${o(s)?.message??"unknown"??""}`)),n(a,r)}),n(e,t)},C=e=>{var t=u(),p=c(t);D(p,()=>$(()=>import("./_Q3l5Fvj.js"),__vite__mapDeps([13,1,2,3,4,5,6,14,15,16,17,8,18,7,9,19]),import.meta.url),a=>{var s=Z();n(a,s)},(a,s)=>{var r=u(),d=c(r);U(d,()=>o(s).default,(b,m)=>{m(b,{})}),n(a,r)},(a,s)=>{var r=Y(),d=v(r);l(r),E(()=>H(d,`Failed to load: ${o(s)?.message??"unknown"??""}`)),n(a,r)}),n(e,t)};J(j,e=>{o(i)==="troubleshooter"?e(z):e(C,-1)})}l(R),l(h),E(()=>{I(_,1,P(o(i)==="troubleshooter"?L:k),"svelte-1xfrv6f"),I(y,1,P(o(i)==="logs"?L:k),"svelte-1xfrv6f")}),B("click",_,()=>x(i,"troubleshooter")),B("click",y,()=>x(i,"logs")),n(F,h),K()}M(["click"]);export{ae as default};
@@ -1 +1 @@
1
- import{p as n,e as c,E as o,i,a as f,n as v,k as u,F as h,b as m,d as x,r as b,l as g}from"./Ddm7yfuh.js";import{c as p}from"./CQjlljeJ.js";var _=g("<div><!></div>");function k(t,a){n(a,!0);let s=c(a,"ref",15,null),d=b(a,["$$slots","$$events","$$legacy","ref","class","children"]);var e=_();o(e,r=>({"data-slot":"card",class:r,...d}),[()=>p("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",a.class)]);var l=i(e);f(l,()=>a.children??v),u(e),h(e,r=>s(r),()=>s()),m(t,e),x()}var y=g("<div><!></div>");function w(t,a){n(a,!0);let s=c(a,"ref",15,null),d=b(a,["$$slots","$$events","$$legacy","ref","class","children"]);var e=y();o(e,r=>({"data-slot":"card-content",class:r,...d}),[()=>p("px-6",a.class)]);var l=i(e);f(l,()=>a.children??v),u(e),h(e,r=>s(r),()=>s()),m(t,e),x()}export{k as C,w as a};
1
+ import{p as n,e as c,E as o,i,a as f,n as v,k as u,F as h,b as m,d as x,r as b,l as g}from"./Ddm7yfuh.js";import{c as p}from"./BV4JdBu0.js";var _=g("<div><!></div>");function k(t,a){n(a,!0);let s=c(a,"ref",15,null),d=b(a,["$$slots","$$events","$$legacy","ref","class","children"]);var e=_();o(e,r=>({"data-slot":"card",class:r,...d}),[()=>p("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",a.class)]);var l=i(e);f(l,()=>a.children??v),u(e),h(e,r=>s(r),()=>s()),m(t,e),x()}var y=g("<div><!></div>");function w(t,a){n(a,!0);let s=c(a,"ref",15,null),d=b(a,["$$slots","$$events","$$legacy","ref","class","children"]);var e=y();o(e,r=>({"data-slot":"card-content",class:r,...d}),[()=>p("px-6",a.class)]);var l=i(e);f(l,()=>a.children??v),u(e),h(e,r=>s(r),()=>s()),m(t,e),x()}export{k as C,w as a};
@@ -1 +1 @@
1
- import{p,s as c,c as l,f as d,a as i,n as m,b as f,d as h,r as u}from"./Ddm7yfuh.js";import{I as $}from"./CQjlljeJ.js";function P(e,a){p(a,!0);let o=u(a,["$$slots","$$events","$$legacy"]);const t=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];$(e,c({name:"pencil"},()=>o,{get iconNode(){return t},children:(n,_)=>{var s=l(),r=d(s);i(r,()=>a.children??m),f(n,s)},$$slots:{default:!0}})),h()}export{P};
1
+ import{p,s as c,c as l,f as d,a as i,n as m,b as f,d as h,r as u}from"./Ddm7yfuh.js";import{I as $}from"./BV4JdBu0.js";function P(e,a){p(a,!0);let o=u(a,["$$slots","$$events","$$legacy"]);const t=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];$(e,c({name:"pencil"},()=>o,{get iconNode(){return t},children:(n,_)=>{var s=l(),r=d(s);i(r,()=>a.children??m),f(n,s)},$$slots:{default:!0}})),h()}export{P};