@dylanpiercey/work 0.0.159 → 0.0.160

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 (74) hide show
  1. package/bin/work.mjs +57 -16
  2. package/dist/{_B8Ruz8T9.js → _BRBF-t9p.js} +9 -7
  3. package/dist/_Cr-5sjB_.js +2 -0
  4. package/dist/index.mjs +362 -362
  5. package/dist/public/assets/_BU6w6X4q.js +1 -0
  6. package/dist/public/assets/_BbqN_0Hf.js +1 -0
  7. package/dist/public/assets/_BfEhpnxc.js +1 -0
  8. package/dist/public/assets/_Bjs6hRWD.js +1 -0
  9. package/dist/public/assets/_BjtlvkCt.js +1 -0
  10. package/dist/public/assets/_BnZSGKpL.js +1 -0
  11. package/dist/public/assets/_BnepJiz-.js +1 -0
  12. package/dist/public/assets/{_DrrcCvtP.js → _BpIalLUl.js} +1 -1
  13. package/dist/public/assets/_BpIalLUl.js.br +0 -0
  14. package/dist/public/assets/_BvcYfwFl.js +1 -0
  15. package/dist/public/assets/_C0zwP2qH.js +1 -0
  16. package/dist/public/assets/_C9oWRx13.js +1 -0
  17. package/dist/public/assets/_CC3Ffsld.js +1 -0
  18. package/dist/public/assets/_ClG30-Cs.js +1 -0
  19. package/dist/public/assets/_CxFNOCPZ.js +1 -0
  20. package/dist/public/assets/{_DzlXAMSp.js → _D6gBuUWs.js} +4 -4
  21. package/dist/public/assets/_D6gBuUWs.js.br +0 -0
  22. package/dist/public/assets/_D9-BvOKl.js +1 -0
  23. package/dist/public/assets/_D_opOE0v.js +1 -0
  24. package/dist/public/assets/_DdJpsshP.js +1 -0
  25. package/dist/public/assets/_L9P-Lxf4.js +1 -0
  26. package/dist/public/assets/{_DgrVjbbj.js → __CI6owKB.js} +4 -4
  27. package/dist/public/assets/__CI6owKB.js.br +0 -0
  28. package/dist/public/assets/_dvB7DobJ.js +1 -0
  29. package/dist/public/assets/_o7CRZZeJ.js +1 -0
  30. package/dist/public/assets/{app-page-DkJHV2Hb.css → app-page-DyrVoVeZ.css} +1 -1
  31. package/dist/public/assets/app-page-DyrVoVeZ.css.br +0 -0
  32. package/dist/public/assets/diff-view-DH-5ACi2.js +2 -0
  33. package/dist/public/assets/{diff-view-D_kTcxOl.css → diff-view-DKJzuUb0.css} +1 -1
  34. package/dist/public/assets/diff-view-DKJzuUb0.css.br +0 -0
  35. package/dist/public/assets/{icon-arrow-down-ptjlirxL.css → icon-arrow-down-Bh8nsodJ.css} +1 -1
  36. package/dist/public/assets/icon-arrow-down-Bh8nsodJ.css.br +0 -0
  37. package/dist/public/assets/new-qqqf-1EI.js +1 -0
  38. package/dist/public/assets/settings-qqqf-1EI.js +1 -0
  39. package/dist/public/assets/w-qqqf-1EI.js +1 -0
  40. package/dist/public/assets/w._-Bmrox8Ci.js +1 -0
  41. package/dist/public/assets/w._-qqqf-1EI.js +1 -0
  42. package/package.json +1 -1
  43. package/dist/_wmfv4tOT.js +0 -2
  44. package/dist/public/assets/_BEMlWJ3i.js +0 -1
  45. package/dist/public/assets/_BF3jdOKL.js +0 -1
  46. package/dist/public/assets/_BN2MNMec.js +0 -1
  47. package/dist/public/assets/_BX85X6vL.js +0 -1
  48. package/dist/public/assets/_BgTyVBoz.js +0 -1
  49. package/dist/public/assets/_BtPnCFTI.js +0 -1
  50. package/dist/public/assets/_C62EU_76.js +0 -1
  51. package/dist/public/assets/_C9t1K6t0.js +0 -1
  52. package/dist/public/assets/_CV1AUMfT.js +0 -1
  53. package/dist/public/assets/_DONc62ot.js +0 -1
  54. package/dist/public/assets/_DQxAgIZ5.js +0 -1
  55. package/dist/public/assets/_DRrf0ps3.js +0 -1
  56. package/dist/public/assets/_DUwNzfo2.js +0 -1
  57. package/dist/public/assets/_DgrVjbbj.js.br +0 -0
  58. package/dist/public/assets/_DliuBq2F.js +0 -1
  59. package/dist/public/assets/_DrrcCvtP.js.br +0 -0
  60. package/dist/public/assets/_Dt9shJET.js +0 -1
  61. package/dist/public/assets/_DzlXAMSp.js.br +0 -0
  62. package/dist/public/assets/_KbIm5gXb.js +0 -1
  63. package/dist/public/assets/_kP4m5eyY.js +0 -1
  64. package/dist/public/assets/_kRAx7xJD.js +0 -1
  65. package/dist/public/assets/_wGg-Flxh.js +0 -1
  66. package/dist/public/assets/app-page-DkJHV2Hb.css.br +0 -0
  67. package/dist/public/assets/diff-view-B7Akkn43.js +0 -2
  68. package/dist/public/assets/diff-view-D_kTcxOl.css.br +0 -0
  69. package/dist/public/assets/icon-arrow-down-ptjlirxL.css.br +0 -0
  70. package/dist/public/assets/new-CjRAL7y8.js +0 -1
  71. package/dist/public/assets/settings-CjRAL7y8.js +0 -1
  72. package/dist/public/assets/w-CjRAL7y8.js +0 -1
  73. package/dist/public/assets/w._-CjRAL7y8.js +0 -1
  74. package/dist/public/assets/w._-DvPeuuNc.js +0 -1
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_DliuBq2F.js","assets/_DzlXAMSp.js","assets/_hePW80VL.js","assets/_BOllftHQ.js","assets/_DrrcCvtP.js","assets/icon-arrow-down-ptjlirxL.css","assets/diff-view-D_kTcxOl.css","assets/_BEMlWJ3i.js","assets/_Dt9shJET.js","assets/_C9t1K6t0.js","assets/_CV1AUMfT.js","assets/_DRrf0ps3.js","assets/_BN2MNMec.js","assets/_BX85X6vL.js","assets/_kP4m5eyY.js","assets/_wGg-Flxh.js","assets/_DQxAgIZ5.js","assets/_kRAx7xJD.js","assets/_BF3jdOKL.js","assets/_BgTyVBoz.js","assets/_DONc62ot.js","assets/_DUwNzfo2.js","assets/_C62EU_76.js","assets/_BtPnCFTI.js","assets/_KbIm5gXb.js"])))=>i.map(i=>d[i]);
2
- import"./_hePW80VL.js";import{$ as e,A as t,B as n,C as r,D as i,F as a,G as o,H as s,I as c,J as l,K as u,L as d,M as f,N as p,O as m,P as h,Q as g,R as _,S as v,T as y,U as b,V as ee,W as x,X as te,Y as ne,_ as re,a as S,at as C,b as w,c as ie,ct as ae,d as oe,et as se,f as T,g as E,h as D,i as O,it as ce,j as le,k as ue,l as de,m as fe,n as pe,nt as me,ot as he,p as ge,q as _e,r as ve,s as eee,st as ye,t as be,tt as xe,u as Se,v as k,w as Ce,x as we,y as A,z as j}from"./_BOllftHQ.js";import{$ as Te,$t as tee,A as Ee,At as De,B as Oe,C as ke,Ct as M,D as Ae,Dt as je,E as Me,Et as Ne,F as Pe,Ft as Fe,G as Ie,Gt as Le,H as Re,I as ze,It as Be,K as Ve,L as He,Lt as nee,M as Ue,Mt as We,N as Ge,O as Ke,Ot as qe,P as Je,Pt as Ye,Q as Xe,Qt as Ze,R as Qe,S as $e,St as et,T as tt,U as nt,Ut as ree,V as rt,W as it,Wt as at,X as ot,Xt as st,Y as ct,Z as lt,Zt as ut,_ as dt,_t as iee,a as ft,an as pt,at as mt,b as ht,bt as gt,cn as N,ct as _t,d as vt,dn as yt,dt as bt,en as xt,et as St,f as Ct,fn as wt,ft as P,g as Tt,gt as F,h as Et,ht as I,i as Dt,in as aee,it as Ot,j as kt,jt as At,k as jt,kt as Mt,l as oee,ln as Nt,lt as Pt,m as Ft,mt as L,n as It,nn as Lt,nt as Rt,o as zt,on as Bt,ot as Vt,p as Ht,pt as R,r as Ut,rn as Wt,rt as Gt,s as Kt,sn as qt,st as Jt,t as Yt,tn as Xt,tt as Zt,un as Qt,ut as $t,v as see,vt as cee,w as en,wt as lee,x as tn,xt as nn,y as rn,yt as an,z as on}from"./_DrrcCvtP.js";var sn=[],cn=Symbol(),ln=ae((e,t,n)=>{e=te(e),t=te(t);let r,i,a=(e,t)=>pn(i,e,t);return o=>{let s=o[t];if(i)me(s,a,-1,o[e]);else{let t=_e(o);s.X||=new Map,(r||=n()).then(n=>{i=we(``,...n._)(),xe(s,n=>pn(i,n,o[e],t))},mn(s,t))}}}),un=ae(e=>{let t,n=(r,i)=>{t||=e(),r.X||!(`X`in r)&&r.H===C?(r.X||=new Map).set(t,[i,n]):n._?n._(r,i):t.then(e=>xe(r,n._=e._,i),()=>0)};return n});function dn(e){return e[Symbol.iterator]=fn,e[cn]=sn,e}function*fn(){yield this,yield*this[cn]}function pn(e,t,n,r){let i=n.parentNode,a=t.X,o=()=>{ye(t),e.b(t,i.namespaceURI),t.X=0},s=()=>{g(t,i,n),n.remove(),r?.c()},c;if(c=a?.size){let n=mn(t,r);a.forEach(([,r],i)=>i.then(n=>(r._=n._)&&!--c&&xe(t,t=>{o(),e.c?.(t),a.forEach(([e,n])=>n(t,e)),s()}),e=>c>0&&(c=0,n(e))))}else o(),he(e,t),s()}function mn(e,t){return n=>{t&&(t.m?t.i=0:t.c()),xe(e,ce,n)}}var hn=null;function gn(e){if(typeof document>`u`)return;if(hn?.isConnected){hn.querySelector(`[data-msg]`).textContent=e;return}hn=document.createElement(`div`),hn.setAttribute(`role`,`alert`),hn.style.cssText=`position:fixed;left:0;right:0;bottom:0;z-index:2147483647;display:flex;gap:.75rem;align-items:center;padding:.6rem calc(env(safe-area-inset-left) + .9rem) calc(env(safe-area-inset-bottom) + .6rem);background:#3a1d1d;color:#fff;font:13px/1.4 system-ui,sans-serif;box-shadow:0 -4px 16px rgba(0,0,0,.3)`;let t=document.createElement(`span`);t.dataset.msg=``,t.style.cssText=`flex:1;min-width:0;overflow-wrap:anywhere`,t.textContent=e;let n=document.createElement(`button`);n.type=`button`,n.textContent=`Reload`,n.style.cssText=`flex:none;padding:.35rem .8rem;border:0;border-radius:.4rem;background:#fff;color:#3a1d1d;font:inherit;font-weight:600;cursor:pointer`,n.onclick=()=>location.reload();let r=document.createElement(`button`);r.type=`button`,r.textContent=`×`,r.setAttribute(`aria-label`,`Dismiss`),r.style.cssText=`flex:none;padding:.2rem .5rem;border:0;background:transparent;color:inherit;font:inherit;font-size:16px;cursor:pointer`,r.onclick=()=>hn?.remove(),hn.append(t,n,r),document.body.append(hn)}var _n=350;function vn(){let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function yn(){let e=vn();if(!e||e.inputMode===`none`)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`?!e.readOnly:e.isContentEditable}var bn=0;function xn(){return bn}var Sn=new Set;function Cn(e,t){Sn.add(e),t.addEventListener(`abort`,()=>Sn.delete(e))}function wn(e){let t=window.visualViewport,n,r=``,i=(e=!1)=>{let n=``;if(t){let e=Math.abs(t.height-window.innerHeight)<1||!yn();bn=e?0:Math.max(0,Math.round(window.innerHeight-t.height)),n=e?``:`${Math.round(t.height)}px`,document.documentElement.style.setProperty(`--app-height`,n),document.documentElement.style.setProperty(`--vv-top`,e?``:`${Math.round(t.offsetTop)}px`),document.documentElement.style.setProperty(`--bar-inset-bottom`,bn?`0.35rem`:``),document.documentElement.toggleAttribute(`data-keyboard`,bn>0),e||window.scrollTo(0,0)}let i=`${bn}:${n}:${t?Math.round(t.offsetTop):0}`;if(!(!e&&i===r)){r=i;for(let e of Sn)e()}},a=()=>{clearTimeout(n),n=setTimeout(()=>i(),_n)},o=()=>{i(!0),a()};t?.addEventListener(`resize`,o,{signal:e}),t?.addEventListener(`scroll`,()=>i(),{signal:e}),window.addEventListener(`resize`,o,{signal:e}),window.addEventListener(`orientationchange`,o,{signal:e}),document.addEventListener(`focusin`,a,{signal:e}),document.addEventListener(`focusout`,a,{signal:e}),document.addEventListener(`visibilitychange`,()=>{document.hidden||o()},{signal:e}),window.addEventListener(`pageshow`,o,{signal:e}),window.addEventListener(`focus`,o,{signal:e})}var Tn=[{id:`claude`,label:`Claude`,bins:[`claude`],install:{url:`https://claude.ai/install.sh`,shell:`bash`},icon:`M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z`},{id:`codex`,label:`Codex`,bins:[`codex`],install:{url:`https://chatgpt.com/codex/install.sh`,shell:`sh`},icon:`M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z`,reauth:`codex login`,pathDirs:[`~/.codex/bin`]},{id:`copilot`,label:`Copilot`,bins:[`copilot`],install:{url:`https://gh.io/copilot-install`,shell:`bash`},icon:`M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z`,reauth:`gh auth login`},{id:`cursor`,label:`Cursor`,bins:[`cursor-agent`],install:{url:`https://cursor.com/install`,shell:`bash`},icon:`M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z`,reauth:`cursor-agent login`},{id:`grok`,label:`Grok`,bins:[`grok`],install:{url:`https://x.ai/cli/install.sh`,shell:`bash`},icon:`M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815`,reauth:`grok`,pathDirs:[`~/.grok/bin`]},{id:`opencode`,label:`opencode`,bins:[`opencode`],install:{url:`https://opencode.ai/install`,shell:`bash`},icon:`M6 4.5h12v15H6V4.5zM9 7.5v9h6v-9H9zM9 13.5v3h6v-3H9z`,reauth:`opencode auth login`,pathDirs:[`~/.opencode/bin`]},{id:`pi`,label:`Pi`,bins:[`pi`],install:{url:`https://pi.dev/install.sh`,shell:`sh`},icon:`M4 5.25h16v2.9h-2.35v10.6h-2.9V8.15h-3.5v10.6h-2.9V8.15H7.1c-.62 0-1.13.32-1.46.86l-.36.6L4 8.6V5.25z`,reauth:`pi`}],En=new Map(Tn.map(e=>[e.id,e]));function Dn(e){return En.get(e)}function On(e){let t=/^([a-z]+?)(\d*)$/.exec(e||``),n=t&&En.get(t[1]);return n?{family:n,suffix:t[2]}:null}function kn(e){return On(e)?.family.id??e}function An(e){return On(e)?.suffix??``}function jn(e){let t=On(e);return t?`${t.family.label}${t.suffix?` ${t.suffix}`:``}`:e===`shell`?`Shell`:e}function Mn(e){for(let t of Tn)for(let n of t.bins){if(e===n)return t.id;if(e.startsWith(n)&&/^\d+$/.test(e.slice(n.length)))return`${t.id}${e.slice(n.length)}`}return null}function Nn(e){let t=Math.round(e);return t!==e&&(t===100||t===0)?`${e.toFixed(1)}%`:`${t}%`}function Pn(e){let t=Math.round(e/6e4);if(t<60)return`${t}m`;let n=Math.round(t/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}var Fn=6e4,In=null,Ln=null,Rn=new Set;function zn(e,t){t?.aborted||(Rn.add(e),t?.addEventListener(`abort`,()=>Rn.delete(e)))}function uee(e){In={at:Date.now(),value:e};for(let t of Rn)t(e)}function Bn(){return In?.value??null}function Vn(e=!1){if(!e){if(In&&Date.now()-In.at<Fn)return Promise.resolve(In.value);if(Ln)return Ln}return Ln=N(`/api/usage${e?`?refresh`:``}`).then(e=>(uee(e),e)).catch(e=>{let t=String(e.message||e);return{...In?.value,error:t}}).finally(()=>{Ln=null}),Ln}function Hn(e,t){let n=t?.agents||[],r=n.find(t=>t.agent===e);if(r)return r;let i=kn(e);return n.find(e=>e.agent===i)??null}function Un(e){let t=!1,n=!1;return async()=>{if(t){n=!0;return}t=!0;try{do n=!1,await e();while(n)}finally{t=!1}}}function Wn(){return typeof window<`u`&&`serviceWorker`in navigator&&`PushManager`in window}async function Gn(){return Wn()?(await Kn()).pushManager.getSubscription():null}async function dee(){if(await Notification.requestPermission()!==`granted`)return!1;let e=await Kn(),t=await e.pushManager.getSubscription();if(!t){let{publicKey:n}=await N(`/api/push`);t=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:mee(n)})}return await N(`/api/push`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t.toJSON())}),!0}async function fee(){let e=await Gn();e&&(await N(`/api/push?endpoint=${encodeURIComponent(e.endpoint)}`,{method:`DELETE`}).catch(()=>{}),await e.unsubscribe())}function pee(e){let t=()=>{document.visibilityState===`visible`&&navigator.clearAppBadge?.().catch(()=>{})};t(),document.addEventListener(`visibilitychange`,t,{signal:e})}async function Kn(){return await navigator.serviceWorker.getRegistration()??navigator.serviceWorker.register(`/sw.js`)}function mee(e){let t=e.padEnd(e.length+(4-e.length%4)%4,`=`),n=atob(t.replace(/-/g,`+`).replace(/_/g,`/`));return Uint8Array.from(n,e=>e.charCodeAt(0))}var qn=e=>e.status===`active`&&!e.pending,Jn=e=>e.filter(qn).sort((e,t)=>e.name.localeCompare(t.name)),Yn=2500,Xn=p(0,`<div role=status aria-live=polite><span></span> Reconnecting…</div>`,` D `,e=>{S(e.a,`_bi`),S(e.b,`_G`)}),Zn=a(1,e=>Xn(e,+!e.b));s(`e0`,e=>d(e,{onMount:function(){let t=new AbortController,n,r=t=>{if(clearTimeout(n),t){Zn(e,!1);return}n=setTimeout(()=>{Zn(e,!0)},Yn)};return Bt().addEventListener(`app.reachable`,e=>r(e.data.reachable),{signal:t.signal}),r(wt()),t.signal.addEventListener(`abort`,()=>clearTimeout(n)),{abort:t}},onDestroy:function(){this.abort.abort()}}));var Qn=3500;function $n(e){return setTimeout(e,Qn)}function er(e,t){let n=-1,r=!1,i=r=>{for(let i of r)i.op!==e||i.seq<=n||(n=i.seq,i.message&&t(i.message))},a=new AbortController;Bt().addEventListener(`workspace.progress`,e=>i([e.data]),{signal:a.signal});let o=N(`/api/progress`).then(e=>{n<0&&(n=e.seq)}).catch(()=>{}).then(()=>{r=!0}),s=setInterval(async()=>{if(!(!r||n<0))try{let t=await N(`/api/progress?since=${n}&op=${encodeURIComponent(e)}`);i(t.messages)}catch{}},800);return{ready:o,stop(){a.abort(),clearInterval(s)}}}var tr=[{name:`Violet`,value:`#8b5cf6`},{name:`Teal`,value:`#14b8a6`},{name:`Green`,value:`#22a05b`},{name:`Amber`,value:`#d97706`},{name:`Orange`,value:`#ea580c`},{name:`Rose`,value:`#e11d48`},{name:`Pink`,value:`#db2777`},{name:`Sky`,value:`#0284c7`}];function nr(e){if(typeof document>`u`)return;let t=document.documentElement;e.accent?t.style.setProperty(`--accent`,e.accent):t.style.removeProperty(`--accent`),document.title=e.name||`work`;let n=document.querySelector(`link[rel="icon"]`);n&&(n.href=`/api/instance/icon${e.accent?`?v=${e.accent.slice(1)}`:``}`),ct(Wt(),e.accent||``)}var rr=`_ed _ck _d1 _eb`,ir=`_fA _d2`,ar=`_fI _eb`,or=`_fJ _ec`,sr=`_f7 _be`,cr=`_gC _ci`,lr=`_ed _ck _d1 _eb`,ur=`_ee _ec`,dr=`_fu __`,fr=`_fx _2 _G`,pr=`_fk _fj`,mr=`_fm __`,hr=`<header><!><div><h1> </h1><!></div><!></header>`,gr=` D%b D D l%l%l`,_r=Ce(1),vr=h(6,0,e=>_r(e,e._.q)),yr=e=>{vr._(e),S(e.a,`_d0`)},br=Ce(1),xr=h(5,0,e=>br(e,e._.p)),Sr=e=>{xr._(e),S(e.a,`_dZ`)},Cr=h(1,1,e=>{O(e.a,`title`,e._.k||`Back (Esc)`),O(e.a,`aria-label`,e._.k||`Back`)}),wr=s(`u0`,e=>_(e.a,`click`,function(){e._.l?.()})),Tr=e=>{Cr._(e),S(e.a,[Ne,`_gM`]),ze(e.b),Pe(e.b,14),Je(e.b),wr(e)},Er=h(1,0,e=>O(e.a,`href`,e._.j)),Dr=e=>{Er._(e),Or._(e),S(e.a,[Ne,`_gM`]),ze(e.b),Pe(e.b,14),Je(e.b)},Or=h(1,0,e=>{O(e.a,`title`,e._.k||`Back (Esc)`),O(e.a,`aria-label`,e._.k||`Back`)});function kr(e){S(e.a,`_dW`),S(e.c,`_dY`),S(e.d,`_dX`)}var Ar=p(1,(e=>`<a>${e}</a>`)(He),(e=>` D/${e}&l`)(Qe),Dr,(e=>`<button>${e}</button>`)(He),(e=>` D/${e}&l`)(Qe),Tr),jr=j(12,e=>Ar(e,e.j?0:e.l?1:2)),Mr=w(9,e=>{jr(e),Er(e)}),Nr=w(11,jr),Pr=(e,t)=>O(e.d,`id`,t),Fr=(e,t)=>b(e.e,t),Ir=p(5,`<p><!></p>`,` D%`,Sr),Lr=w(15,e=>{Ir(e,+!e.p),xr(e)}),Rr=p(6,`<div><!></div>`,` D%`,yr),zr=w(16,e=>{Rr(e,+!e.q),vr(e)}),Br=w(10,e=>{Or(e),Cr(e)}),Vr=`<!><!><!>`,Hr=A(13,e=>b(e.a,e._._.i),e=>e._._),Ur=Hr,Wr=h(0,1,e=>L(e.a,e._.d)),Gr=e=>{Wr._(e),Kr._(e),R(e.a,`M5 7L10 12L5 17 M13 17H20`)},Kr=h(0,1,e=>P(e.a,e._.f)),qr=h(0,0,e=>S(e.a,[`_m`,e._.f])),Jr=e=>{qr._(e),Yr._(e),Xr._(e),Zr._(e)},Yr=h(0,0,e=>{O(e.a,`width`,e._.g),O(e.a,`height`,e._.g)}),Xr=h(0,0,e=>O(e.b,`d`,e._.h)),hee=p(2,`<circle cx=18 cy=18 r=6.5 fill="var(--panel, canvas)"></circle><text x=18 y=18 text-anchor=middle dominant-baseline=central font-size=9 font-weight=700 font-family="system-ui, sans-serif" fill=currentColor> </text>`,`bD `,Ur),Zr=h(0,0,e=>hee(e,+!e._.i)),gee=w(6,Yr),Qr=w(3,e=>{gee(e,e.d??15),Wr(e)}),_ee=p(0,`<svg viewBox="0 0 24 24" fill=currentColor fill-rule=evenodd aria-hidden=true><path></path><!></svg>`,` D b%`,Jr,I,(e=>`/${e}&`)(F),Gr),vee=w(7,e=>{_ee(e,+!e.h),Xr(e)}),yee=k(Hr),bee=w(8,e=>{Zr(e),yee(e)}),$r=(e,t)=>{vee(e,Dn(kn(t))?.icon),bee(e,An(t))},ei=w(5,e=>{qr(e),Kr(e)}),xee=`_hc _X`,ti=I,ni=(e=>`/${e}&`)(F);function ri(e){R(e.a,`M20.0429 21H3.95705C2.41902 21 1.45658 19.3364 2.22324 18.0031L10.2662 4.01533C11.0352 2.67792 12.9648 2.67791 13.7338 4.01532L21.7768 18.0031C22.5434 19.3364 21.581 21 20.0429 21Z M12 9V13 M12 17.01L12.01 16.9989`)}var ii=(e,t)=>L(e.a,t),ai=(e,t)=>P(e.a,t),oi=`<div><div><!><!><!></div><div><!><!></div></div>`,si=` D D%b%b%l D%b%m`;function See(e,t){if(!e)return null;let n=new Date(e).getTime()-Date.now();return n<=0?t?null:`now`:Pn(n)}var ci=h(7,0,e=>b(e.b,e._.q)),Cee=e=>{ci._(e),rt(e.a),Oe(e.a,12),on(e.a)},li=h(7,0,e=>b(e.b,e._.q)),ui=e=>{li._(e),S(e.a,xee)},di=p(7,(e=>`${e} <!>`)(Re),(e=>`/${e}&b%b`)(nt),Cee),fi=w(16,e=>{di(e,+!e.q),ci(e)}),pi=j(12,e=>fi(e,See(e.l,e._.p!=null))),mi=i(6,pi),hi=e=>{mi._(e),S(e.a,`_hd`),S(e.b,`_he`),S(e.d,`_hf`),S(e.h,`_hq`)},gi=j(15,e=>O(e.a,`title`,`${e.n}: ${e.o} used${e.l?`, resets ${new Date(e.l).toLocaleString()}`:``}`),2),_i=w(14,e=>{b(e.g,e.o),gi(e)}),vi=(e,t)=>S(e.e,[`_hg`,t]),yi=(e,t)=>S(e.f,[`_hl`,t]),bi=(e,t)=>{ge(e.e,`width:${Math.min(100,Math.max(2,t))}%`),_i(e,Nn(t)),vi(e,t>=90?`_hk`:t>=70?`_hj`:t>=40?`_hi`:`_hh`),yi(e,t>=90?`_hp`:t>=70?`_ho`:t>=40?`_hn`:`_hm`)},xi=w(11,e=>{pi(e),gi(e)}),Si=w(13,e=>{b(e.c,e.n),gi(e)}),Ci=(e,t)=>{bi(e,t[0]?.used_percent),xi(e,t[0]?.resets_at),Si(e,t[0]?.window)},wi=j(3,e=>O(e.a,`title`,`${e._.q||`provider unreachable`}. Last cached numbers, ${Pn(e._.p*1e3)} old`)),Ti=h(4,0,e=>{b(e.c,Pn(e._.p*1e3)),wi(e)}),Ei=e=>{Ti._(e),Di._(e),S(e.a,`_ha`),ri(e.b),ii(e.b,12),ai(e.b)},Di=h(4,0,wi),Oi=h(3,0,e=>b(e.b,e._.o.replace(/^default_/,``).replaceAll(`_`,` `))),ki=e=>{Oi._(e),S(e.a,`_g_`)},Ai=h(2,0,e=>b(e.b,e._.n)),ji=e=>{Ai._(e),S(e.a,`_hr`)},Mi=(e,t)=>{Ni(e,t?.agent),Pi(e,t?.plan),Ii(e,t?.stale_seconds),Ri(e,t?.note),Bi(e,t?.windows)},Ni=w(13,Ai),Pi=w(14,Oi),Fi=p(4,(e=>`<span>${e} <!> old</span>`)(ti),(e=>` D/${e}&b%l`)(ni),Ei),Ii=w(15,e=>{S(e.f,[`_hb`,{_hs:e.p!=null}]),Fi(e,+(e.p==null)),Ti(e),mi(e)}),Li=p(7,`<p> </p>`,` D `,ui),Ri=w(16,e=>{Li(e,+!e.q),Di(e),li(e)}),zi=m(6,`<div><span> </span><span><span></span></span><span> </span><span></span></div>`,` D D l D l D l `,hi,Ci),Bi=(e,t)=>zi(e,[t||[],`window`]),Vi=p(3,`<span> </span>`,` D `,ki),Hi=e=>{Vi(e,e.o&&e.o.toLowerCase()!==e.n.toLowerCase()?0:1)},Ui=w(10,e=>{Mi(e,e.k),Hi(e)}),Wi=p(2,`<strong> </strong>`,` D `,ji),Gi=(e,t)=>{S(e.a,[`_g7`,{_g8:t}]),Wi(e,+!!t)};function Ki(e){S(e.b,`_g9`)}var qi=I,Ji=(e=>`/${e}&`)(F);function Yi(e){R(e.a,`M6 12H12M18 12H12M12 12V6M12 12V18`)}var Xi=(e,t)=>L(e.a,t),Zi=(e,t)=>P(e.a,t),Qi=`<svg viewBox="0 0 24 24" fill=currentColor aria-hidden=true><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path></svg>`,$i=(e,t)=>{O(e.a,`width`,t),O(e.a,`height`,t)},ea=(e,t)=>$i(e,t??iee.md),ta=(e,t)=>S(e.a,[`_m`,t]),na=I,ra=(e=>`/${e}&`)(F);function ia(e){R(e.a,`M5 13L9 17L19 7`)}var aa=(e,t)=>L(e.a,t),oa=(e,t)=>P(e.a,t),sa=`<div><!><!><!><!></div>`,ca=` D%b%b%b%l`,la=e=>{S(e.a,[`_iA`,`_iH`]),S(e.b,`_G`)},ua=h(3,0,e=>b(e.b,e._.w)),da=e=>{ua._(e),S(e.a,[`_iA`,`_iK`])},fa=h(2,0,e=>{O(e.e,`href`,`https://${e._.r}/login/device`),b(e.f,e._.r)}),pa=s(`D2`,e=>_(e.e,`click`,function(t){t.preventDefault(),Fe(`https://${e._.r}/login/device`,{system:!0})})),ma=e=>{fa._(e),ha._(e),S(e.a,[`_iA`,`_iH`]),S(e.b,`_G`),S(e.c,`_iI`),S(e.e,`_iJ`),pa(e)},ha=h(2,0,e=>b(e.d,e._.u)),ga=s(`D3`,e=>_(e.f,`click`,function(){aee(e.i),e._.p?.()})),_a=e=>{S(e.a,[`_iA`,`_iB`]),S(e.b,`_iC`),S(e.c,`_iD`),S(e.e,`_iE`),S(e.f,[M,`_iG`]),ga(e)},va=w(8,e=>{b(e.d,e.i),O(e.f,`title`,`Ask about ${e.i} again`)}),ya=(e,t)=>va(e,t[0]?.org),ba=h(5,0,e=>O(e.b,`title`,`Ignore ${e._.i} — stop asking about it`)),xa=s(`D1`,e=>{_(e.a,`click`,function(){e._._.z()}),_(e.b,`click`,function(){at(e._.i),e._._.p?.()})}),Sa=p(5,`<button type=button title="Re-authorize GitHub CLI (same device flow as Sign in)">Authorize</button><button type=button>Ignore</button>`,` b `,e=>{ba._(e),S(e.a,[M,`_r`]),S(e.b,[M,`_iG`]),xa(e)}),Ca=i(1,e=>Sa(e,+!!e._.x)),wa=e=>{Ca._(e),S(e.a,`_iA`),S(e.b,`_iC`),S(e.c,`_iD`),S(e.e,[`_iE`,`_iF`])},Ta=w(8,e=>{b(e.d,e.i),ba(e)}),Ea=(e,t)=>Ta(e,t[0]?.org),Da=m(4,`<div><span><span> </span><span>Ignored</span></span><button type=button>Undo</button></div>`,` D D D l l `,_a,ya),Oa=(e,t)=>Da(e,[t,`org`]),ka=(e,t)=>Oa(e,t||[]),Aa=w(25),ja=j(24,e=>Aa(e,Xa(e)),3),Ma=w(17,e=>{ja(e),fa(e)}),Na=(e,t)=>Ma(e,t||`github.com`),Pa=w(23,e=>{ja(e),Ca(e)}),Fa=j(19,e=>Pa(e,e.l||e.s)),Ia=p(2,`<div><span></span> Enter code <strong> </strong> at <a><!>/login/device</a></div>`,` D c D lb D%`,ma,`<div><span></span>Starting GitHub re-authorization…</div>`,` D `,la),La=j(21,e=>Ia(e,e.s&&e.u?0:e.s?1:2)),Ra=a(18,e=>{Fa(e),La(e)}),za=a(20,e=>{La(e),ha(e)}),Ba=p(3,`<p> </p>`,` D `,da),Va=a(22,e=>{Ba(e,+!e.w),ua(e)});function Ha(e){Ra(e,!1),za(e,null),Va(e,null)}var Ua=w(11,Fa),Wa=w(12,ja),Ga=w(13,ja),Ka=(e,t)=>S(e.a,[`_iz`,t]),qa=m(1,`<div><span><span> </span><span title="Repos and PRs in this org stay hidden until the GitHub CLI is authorized for it.">SSO not authorized</span></span><!></div>`,` D D D l l%`,wa,Ea),Ja=(e,t)=>{Na(e,t?.[0]?.host),qa(e,[t,`org`])},Ya=w(15),Xa=e=>async()=>{if(e.x)return;if(Va(e,null),e.m){await e.m();return}Ra(e,!0),za(e,null);let t=er(`setup:${e.r}`,t=>{let n=/one-time code:\s*([A-Z0-9]{4}-[A-Z0-9]{4})/i.exec(t)?.[1];n&&za(e,n)});await t.ready;try{await N(`/api/setup/${encodeURIComponent(e.r)}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`auth-refresh`})}),await e.n?.()}catch(t){Va(e,String(t.message||t))}finally{t.stop(),Ra(e,!1),za(e,null)}};n(`D0`,Xa);var Za=`<li></li>`,Qa=e=>S(e.a,[`_co`,`_x`]),$a=Ce(0),eo=A(22,e=>$a(e,e._._.m),e=>e._._),to=eo,no=Ce(1),ro=A(21,e=>no(e,e._._.l),e=>e._._),io=e=>{ro(e),S(e.a,`_fn`)},ao=Ce(1),oo=A(20,e=>ao(e,e._._.k),e=>e._._),so=e=>{oo(e),S(e.a,`_cn`)},co=A(18,e=>b(e.b,e._._.i),e=>e._._),lo=e=>{co(e),S(e.a,`_co`)},uo=A(17,e=>O(e.a,`href`,e._._.h),e=>e._._),fo=e=>{uo(e),po(e),S(e.a,[`_co`,`_K`])},po=A(18,e=>{O(e.a,`title`,`Open ${e._._.i} on GitHub`),b(e.b,e._._.i)},e=>e._._),mo=A(16,e=>{O(e.a,`title`,e._._.g),b(e.b,e._._.g)},e=>e._._),ho=e=>{mo(e),S(e.a,`_co`)},go=A(15,e=>b(e.b,e._._.f),e=>e._._),_o=e=>{go(e),S(e.a,`_fl`)},vo=h(0,1,e=>{O(e.a,`title`,`About ${e._.e}`),b(e.b,e._.e),b(e.f,e._.e)}),wee=(e,t)=>{O(e.a,`popovertarget`,t),O(e.d,`id`,t)},Tee=s(`C0`,e=>_(e.d,`toggle`,function(t,n){if(t.newState===`open`){let t=e.a.getBoundingClientRect(),r=t.bottom+4,i=r+n.offsetHeight>window.innerHeight-8?t.top-n.offsetHeight-4:r;n.style.top=`${Math.max(8,i)}px`,n.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-n.offsetWidth-8))}px`}})),Eee=e=>{vo._(e),yo._(e),bo._(e),So._(e),Co._(e),wo._(e),To._(e),Eo._(e),Do._(e),S(e.a,`_fj`),S(e.d,mr),S(e.e,[`_cm`,`_y`]),wee(e,f(e)),Tee(e)},Dee=p(2,`<span> </span>`,` D `,_o),yo=h(0,1,e=>Dee(e,+!e._.f)),Oee=p(6,`<span> </span>`,` D `,ho),bo=h(0,1,e=>Oee(e,+!e._.g)),kee=p(7,`<a target=_blank rel=noopener> </a>`,` D `,fo,`<span> </span>`,` D `,lo,`<span title="Not installed from a source, so it cannot be updated">local only</span>`,` `,Qa),xo=j(11,e=>kee(e,e._.h?0:e._.i?1:e._.j?2:3),2),So=h(0,1,xo),Co=h(0,1,xo),wo=h(0,1,xo),Aee=p(8,`<span><!></span>`,` D%`,so),To=h(0,1,e=>Aee(e,+!e._.k)),jee=p(9,`<div><!></div>`,` D%`,io),Eo=h(0,1,e=>jee(e,+!e._.l)),Mee=p(10,`<!><!><!>`,`b%`,to),Do=h(0,1,e=>Mee(e,+!e._.m)),Oo=h(0,0,e=>O(e.a,`title`,e._.d||`Starting…`)),Nee=e=>{Oo._(e),ko._(e),S(e.a,pr),S(e.b,`_G`)},ko=h(0,0,e=>b(e.c,e._.e));function Pee(e){S(e.a,`_fi`)}var Fee=p(0,`<span><span></span> </span>`,` D b `,Nee,`<button><!><!></button><div popover=auto><span> </span><!><!><!><!></div><!><!>`,` D%b%l D D l%b%b%b%l%`,Eee),Iee=w(3,e=>{Fee(e,+(e.d==null)),Oo(e)}),Lee=w(4,e=>{ko(e),vo(e)}),Ree=k(go),zee=w(5,e=>{yo(e),Ree(e)}),Bee=k(mo),Vee=w(6,e=>{bo(e),Bee(e)}),Hee=k(uo),Uee=w(7,e=>{So(e),Hee(e)}),Wee=k(po,co),Gee=w(8,e=>{Co(e),Wee(e)}),Kee=w(9,wo),qee=k(oo),Jee=w(10,e=>{To(e),qee(e)}),Yee=k(ro),Xee=w(11,e=>{Eo(e),Yee(e)}),Zee=k(eo),Qee=w(12,e=>{Do(e),Zee(e)}),$ee=I,ete=(e=>`/${e}&`)(F);function tte(e){R(e.a,`M2 21L17 21 M21 21L22 21 M2 16.4V3.6C2 3.26863 2.26863 3 2.6 3H21.4C21.7314 3 22 3.26863 22 3.6V16.4C22 16.7314 21.7314 17 21.4 17H2.6C2.26863 17 2 16.7314 2 16.4Z`)}var nte=(e,t)=>L(e.a,t),rte=(e,t)=>P(e.a,t),ite=I,ate=(e=>`/${e}&`)(F);function ote(e){R(e.a,`M12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18Z M22 12L23 12 M12 2V1 M12 23V22 M20 20L19 19 M20 4L19 5 M4 20L5 19 M4 4L5 5 M1 12L2 12`)}var ste=(e,t)=>L(e.a,t),cte=(e,t)=>P(e.a,t),lte=I,ute=(e=>`/${e}&`)(F);function dte(e){R(e.a,`M3 11.5066C3 16.7497 7.25034 21 12.4934 21C16.2209 21 19.4466 18.8518 21 15.7259C12.4934 15.7259 8.27411 11.5066 8.27411 3C5.14821 4.55344 3 7.77915 3 11.5066Z`)}var fte=(e,t)=>L(e.a,t),pte=(e,t)=>P(e.a,t),mte=`_ih _hL`,Ao=`<button><!></button>`,jo=` D%l`,Mo=y(1),hte=s(`f0`,e=>E(e,`a`)),No=w(5,e=>{fe(e,`a`,{type:`submit`,...e.f}),hte(e)});ne[4]=eee;var Po=`<dialog><div><!></div><!></dialog>`,Fo=` D D%l%l`,Io=y(2),gte=we(`s0`,`Done`),_te=e=>{S(e.a,`_hO`),Mo(e.b,gte(e)),No(e.b,{class:[`_q`,`_r`]})},vte=Ce(1),Lo=h(3,0,e=>vte(e,e._.p)),yte=e=>{Lo._(e),S(e.a,`_hO`)},bte=w(20,e=>O(e.a,`closedby`,e.u?`any`:`none`)),Ro=(e,t)=>bte(e,t!==!1),xte=s(`s3`,e=>{{let t=e.a;e.v?t.open||t.showModal():t.open&&t.close()}}),zo=c(21,xte),Bo=j(9,e=>zo(e,e.h,e.i)),Vo=w(7,Bo),Ho=p(3,`<form method=dialog><!></form>`,` D%`,yte,(e=>`<form method=dialog>${e}</form>`)(Ao),(e=>` D/${e}&l`)(jo),_te),Uo=j(14,e=>Ho(e,e.n?0:e.i?1:2)),Wo=w(8,e=>{Bo(e),Uo(e)}),Go=(e,t)=>S(e.a,[`_hK`,t]),Ko=j(18,e=>O(e.a,`aria-label`,e.r?e.q:e.q||e.k),2),qo=w(17,e=>{O(e.a,`aria-labelledby`,e.r),Ko(e)}),Jo=w(10,Ko),Yo=w(16,Ko),Xo=s(`s2`,e=>{_(e.a,`cancel`,function(t){t.preventDefault(),e.u&&zo(e,!1)}),_(e.a,`close`,function(){e.v&&zo(e,!1)})});function Zo(e){S(e.b,`_hN`),Xo(e)}var Qo=s(`s1`,e=>E(e,`a`)),$o=w(19,e=>{D(e,`a`,{...e.t,open:null},{class:1,"aria-labelledby":1,"aria-label":1,closedby:1,"on-cancel":1,"on-close":1},r),Qo(e)}),es=w(13,e=>{ts(e,e.n?.content),Uo(e)}),ts=w(15,Lo),ns=Po,rs=(e=>`/${e}&`)(Fo),is=we(`v3`,`Cancel`),as=t(2,`B2`),os=A(17,e=>b(e.b,e._.i)),ss=s(`v5`,e=>{Se(e,`c`),_(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._.n()):t.key===`Escape`&&e._.l&&Ds(e._,!1)})}),cs=e=>{os(e),ls(e),us(e),ds(e),S(e.a,`_hM`),ss(e)},ls=A(19,e=>O(e.c,`placeholder`,e._.k)),us=A(20,e=>de(e,`c`,e._.l,Fs(e))),ds=A(21,e=>O(e.a,`id`,e._.q)),fs=we(`v7`,`<h2> </h2><input>`,` D l `,cs,0,`B2`),ps=A(18,e=>b(e.d,e._.j||`OK`)),ms=s(`v4`,e=>_(e.c,`click`,function(){e._.n()})),hs=e=>{ps(e),gs(e),S(e.a,`_z`),Mo(e.b,is(e)),No(e.b,{class:`_q`}),S(e.c,[`_q`,`_r`]),ms(e)},gs=A(20,e=>O(e.c,`disabled`,!e._.l.trim())),_s=we(`v6`,(e=>`<div></div>${e}<button type=button> </button>`)(Ao),(e=>` b/${e}& D l`)(jo),hs),vs=w(13),ys=j(12,e=>vs(e,Is(e))),bs=k(gs,us),xs=a(11,e=>{ys(e),bs(e)}),Ss=(e,t)=>xs(e,t||``),Cs=w(4,ys),ws=w(16,e=>qo(e.a,e.q)),Ts=s(`v8`,e=>d(e,{onMount:function(){setTimeout(()=>{let t=as(e)();t?.focus(),t?.select()},0)}}));function Es(e){Zo(e.a),es(e.a,dn({content:_s(e)})),Io(e.a,fs(e)),Go(e.a,mte),Wo(e.a,Ls(e)),Yo(e.a),Ro(e.a),$o(e.a,{}),ws(e,f(e)),Ts(e)}var Ds=c(14,e=>Vo(e.a,e.o)),Os=j(7,e=>Ds(e,e.f,e.g)),ks=w(5,Os),As=w(6,Os),js=k(os),Ms=w(8,e=>{Jo(e.a,e.i),js(e)}),Ns=w(9,k(ps)),Ps=w(10,k(ls)),Fs=e=>t=>{xs(e._,t)},Is=e=>()=>{let t=e.l.trim();t&&e.e(t)},Ls=e=>t=>{Ds(e,t)};n(`v0`,Fs),n(`v1`,Is),n(`v2`,Ls);var Rs=((e,t,n)=>`<div role=region><div><div>${e}<!><!><section><div><h2>Agents</h2><div></div><label><span>Default</span><span><select aria-label="Default agent (starts when a workspace has no session yet)" title="Starts when a workspace has no session yet"></select></span></label></div><ul><!><!></ul><!></section><section><div><h2>GitHub</h2><!><!></div><div></div><!></section><section><div><h2>Machine</h2></div><div><div><div><button>${t}<span>Skills</span><!></button><!><!></div><!></div><div><div><button>${n}<span>Tools</span><span><!> installed <!><!></span></button><!><!><!><!></div><!></div></div></section><section><div><h2>Appearance</h2></div><div><div><img alt aria-hidden=true><span><span> </span><span>Sidebar, tab title, home-screen icon and notifications</span></span></div><label><span>Name</span><input type=text placeholder=work maxlength=32 autocomplete=off spellcheck=false></label><div><span>Theme</span><span><span role=radiogroup aria-label="Color theme"></span><span><select aria-label="Color theme"></select></span></span></div><div><span>Accent</span><span role=radiogroup aria-label="Accent colour"><button type=button role=radio title="Default (blue)" aria-label="Default (blue)"></button><!><label><input type=color aria-label="Custom accent colour"><!></label></span></div></div></section><section><div><h2>Backup</h2></div><div><div><div><div></div><!></div><!></div><div><div><div></div><!></div><!></div></div></section></div></div></div><!><!>`)(hr,Ue,Ue),zs=((e,t,n)=>` D D D/${e}&%b%b D D b b D b D n D%b%l%l D D b%b%l b%l D D l D D D D/${t}& b%l%b%l%l D D D/${n}& b D%c%b%m%b%b%b%l%n D D l D D b D D l m D b l D b D b D n D b D b%b D b%p D D l D D D b%l%l D D b%l%q%c`)(gr,Ge,Ge),Bs={"github-auth":`GitHub sign-in`,agent:`an agent CLI`};function Vs(e,t){return t.find(t=>RegExp(`^${t.id}\\d*$`).test(e))?.id??null}var Hs=null,Us=null;function Ws(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:String(e)}function Gs(e){let t=e.trim();return t.includes(`/`)&&!/\s/.test(t)}var Ks=A(8,e=>b(e.a,e._._.d),e=>e._._),qs=Ks,Js=A(9,e=>b(e.b,e._._.e.join(`, `)),e=>e._._),Ys=e=>{Js(e),Xs(e)},Xs=A(10,e=>b(e.a,e._._.f),e=>e._._),Zs=A(9,e=>b(e.b,e._._._.e.join(`, `)),e=>e._._._),Qs=e=>{Zs(e),$s(e)},$s=A(10,e=>b(e.a,e._._._.f===1?``:`s`),e=>e._._._),ec=e=>S(e.a,`_N`),tc=e=>S(e.a,[`_N`,`_P`]),nc=h(7,1,e=>b(e.b,e._.n)),rc=e=>{nc._(e),S(e.a,[`_N`,At.warn])},ic=e=>S(e.a,`_cq`),ac=A(344,e=>{b(e.a,e._._._._.gu),b(e.b,e._._._._.gu===1?``:`s`)},e=>e._._._._),oc=e=>{ac(e),cc(e)},sc=p(2,`, add host<!> <!>`,`b%c%`,Qs),cc=A(10,e=>sc(e,+!e._._.f),e=>e._._),lc=e=>S(e.a,`_co`),uc=e=>{S(e.a,`_gA`),S(e.b,[`_N`,`_P`]),S(e.c,[`_y`,`_bb`])},dc=(e,t)=>b(e.d,t),fc=(e,t)=>dc(e,t[0]),pc=e=>{S(e.a,`_gA`),S(e.b,[`_N`,`_P`]),S(e.c,[`_y`,`_bb`])},mc=(e,t)=>b(e.d,t),hc=(e,t)=>mc(e,t[0]),gc=e=>{S(e.a,`_gA`),S(e.b,[`_N`,`_P`,At.warn]),S(e.c,[`_y`,`_bb`])},_c=(e,t)=>b(e.d,t),vc=(e,t)=>_c(e,t[0]),yc=h(2,0,e=>b(e.b,e._.f)),bc=e=>{yc._(e),S(e.a,`_y`)},xc=A(21,e=>b(e.b,e._._.r),e=>e._._),Sc=e=>{xc(e),S(e.a,[`_gA`,`_x`])},Cc=m(1,`<li><span title="Modified, not committed">M</span><span> </span></li>`,` D b D `,gc,vc),wc=h(5,0,e=>Cc(e,[e._.k,e=>e])),Tc=e=>{wc._(e),Dc._(e),kc._(e),jc._(e),S(e.a,`_gz`)},Ec=m(2,`<li><span title=Untracked>?</span><span> </span></li>`,` D b D `,pc,hc),Dc=h(5,0,e=>Ec(e,[e._.m,e=>e])),Oc=m(3,`<li><span title="Ignored by git — a restore cannot bring it back">ignored</span><span> </span></li>`,` D b D `,uc,fc),kc=h(5,0,e=>Oc(e,[e._.o,e=>e])),Ac=p(4,`<li>+<!> more</li>`,` Db%`,Sc),jc=h(5,0,e=>Ac(e,+!e._.r)),Mc=p(2,`<span> </span>`,` D `,bc),Nc=j(6,e=>Mc(e,+(e.f===e._._.g))),Pc=A(8,Nc,e=>e._._),Fc=e=>{Pc(e),S(e.a,[`_N`,At.warn])},Ic=j(8,e=>O(e.a,`title`,`${e.f}: ${e.h} commit${e.h===1?``:`s`} origin does not have`)),Lc=w(5,e=>{Ic(e),Nc(e),yc(e)}),Rc=w(7,e=>{b(e.b,e.h),Ic(e)}),zc=(e,t)=>{Lc(e,t[0]?.branch),Rc(e,t[0]?.count)},Bc=e=>{S(e.a,`_gx`),S(e.b,`_gy`),S(e.c,`_y`)},Vc=(e,t)=>b(e.d,t),Hc=m(4,`<span><!> unpushed <!></span>`,` D%c%`,Fc,zc),Uc=(e,t)=>Hc(e,[t,`branch`]),Wc=p(5,`<ul><!><!><!><!></ul>`,` D%b%b%b%`,Tc),Gc=j(16,e=>Wc(e,e.l||e.n||e.p?0:1),2),Kc=w(11,Gc),qc=w(13,Gc),Jc=w(15,Gc),Yc=(e,t)=>{Vc(e,t[0]?.worktree),Uc(e,t[0]?.unpushed),Xc(e,t[0]?.modified),Zc(e,t[0]?.untracked),Qc(e,t[0]?.ignored),el(e,t[0]?.more)},Xc=w(10,e=>{Kc(e,e.k?.length),wc(e)}),Zc=w(12,e=>{qc(e,e.m?.length),Dc(e)}),Qc=w(14,e=>{Jc(e,e.o?.length),kc(e)}),$c=k(xc),el=w(17,e=>{jc(e),$c(e)}),tl=e=>{S(e.a,`_gw`),S(e.b,`_cm`),S(e.d,`_gv`)},nl=k(Pc),rl=w(6,e=>{b(e.c,e.g),nl(e)}),il=m(3,`<li><span><span><!>/</span><!></span><!></li>`,` D D D%l%l%`,Bc,Yc),al=(e,t)=>il(e,[t,`worktree`]),ol=(e,t)=>{rl(e,t[0]?.name),al(e,t[0]?.repos)},sl=e=>S(e.a,`_co`),cl=e=>{Yi(e.a),Xi(e.a,12),Zi(e.a)},ll=e=>{ia(e.a),aa(e.a,12),oa(e.a,`_gn`)},ul=e=>{ia(e.a),aa(e.a,12),oa(e.a,`_gn`)},dl=e=>{ia(e.a),aa(e.a,12),oa(e.a,`_gn`)},fl=(e,t)=>O(e.a,`value`,t),pl=(e,t)=>b(e.b,t),ml=(e,t)=>{fl(e,t[0]?.id),pl(e,t[0]?.label)},hl=e=>{dte(e.a),fte(e.a,14),pte(e.a)},gl=e=>{ote(e.a),ste(e.a,14),cte(e.a)},_l=e=>{tte(e.a),nte(e.a,14),rte(e.a)},vl=e=>{Pt(e.a),_t(e.a,12),Jt(e.a)},yl=e=>S(e.a,`_N`),bl=e=>S(e.a,Mt),xl=e=>S(e.a,Mt),Sl=A(25,e=>{O(e.a,`title`,e._._.n),b(e.b,e._._.n)},e=>e._._),Cl=e=>{Sl(e),S(e.a,[Mt,`_y`])},wl=A(26,e=>b(e.b,e._._._.o),e=>e._._._),Tl=e=>{wl(e),S(e.a,`_fM`)},El=e=>S(e.a,`_N`),Dl=e=>S(e.a,Mt),Ol=e=>S(e.a,Mt),kl=e=>{S(e.a,`_fy`),S(e.b,`_G`)},Al=e=>S(e.a,`_N`),jl=h(4,1,e=>{O(e.a,`title`,e._.k),b(e.b,e._.k)}),Ml=e=>{jl._(e),S(e.a,`_co`)},Nl=e=>S(e.a,`_fw`),Pl=e=>{Me(e.a),tt(e.a,14),en(e.a,`_2`)},Fl=e=>S(e.a,fr),Il=e=>S(e.a,`_cq`),Ll=e=>{Pt(e.a),_t(e.a,12),Jt(e.a)},Rl=A(15,e=>{O(e.a,`title`,`Only installed for ${e._.k.map(jn).join(`, `)}`),b(e.b,e._.k.map(jn).join(`, `))}),zl=v(`y63`,`<span><!> only</span>`,` D%`,e=>{Rl(e),S(e.a,`_N`)}),Bl=e=>S(e.a,`_cq`),Vl=e=>S(e.a,`_N`),Hl=A(16,e=>{O(e.a,`title`,`${e._._.m} installs`),b(e.b,Ws(e._._.m))},e=>e._._),Ul=e=>{Hl(e),S(e.a,[`_N`,`_O`])},Wl=h(4,1,e=>{O(e.a,`title`,e._.l),b(e.b,e._.l)}),Gl=e=>{Wl._(e),S(e.a,`_co`)},Kl=e=>S(e.a,`_co`),ql=e=>S(e.a,`_fw`),Jl=e=>{Me(e.a),tt(e.a,14),en(e.a,`_2`)},Yl=e=>S(e.a,fr),Xl=e=>S(e.a,`_cq`),Zl=e=>{Pt(e.a),_t(e.a,14),Jt(e.a)},Ql=e=>S(e.a,[`_co`,`_fU`]),$l=e=>S(e.a,`_N`),eu=h(8,2,e=>b(e.c,e._.v)),tu=e=>{eu._(e),S(e.a,[`_co`,`_fU`,`_fW`]),ri(e.b),ii(e.b,12),ai(e.b)},nu=h(8,1,e=>b(e.d,e._.u||`?`)),ru=e=>{nu._(e),S(e.a,[`_co`,`_fU`]),ia(e.b),aa(e.b,12),oa(e.b,`_fV`),S(e.c,`_fX`)},iu=e=>{S(e.a,`_cq`),S(e.b,`_G`)},au=e=>{S(e.a,ir),Ki(e.b),Gi(e.b)},ou=(e,t)=>Ui(e.b,t),su=(e,t)=>ou(e,t[0]),cu=e=>{Ki(e.a),Gi(e.a)},lu=(e,t)=>Ui(e.a,t),uu=(e,t)=>lu(e,t[0]),du=e=>{Ki(e.a),Gi(e.a,!0)},fu=(e,t)=>Ui(e.a,t),pu=(e,t)=>fu(e,t[0]),mu=e=>{Ki(e.a),Gi(e.a,!0)},hu=(e,t)=>Ui(e.a,t),gu=(e,t)=>hu(e,t[0]),_u=e=>S(e.a,[`_N`,At.accent]),vu=e=>S(e.a,`_co`),yu=e=>S(e.a,[`_N`,At.accent]),bu=(e,t)=>{O(e.a,`value`,t),b(e.b,jn(t))},xu=(e,t)=>bu(e,t[0]),Su=e=>{S(e.a,`_gc`),S(e.b,`_G`),S(e.c,`_gd`)},Cu=s(`y49`,e=>_(e.a,`click`,function(){e._._.fp(e._.a1,!e._.a2)})),wu=j(1,Cu),Tu=h(10,0,wu),Eu=e=>{Tu._(e),Du._(e),S(e.a,`_H`)},Du=h(10,0,e=>{O(e.a,`aria-checked`,e._.a2?`true`:`false`),O(e.a,`title`,e._.a2?`Shown in session pickers. Hide it`:`Hidden from session pickers. Show it`),wu(e)}),Ou=p(0,na,(e=>`/${e}&`)(ra),ul),ku=ue(75,257,3,e=>{S(e.a,[`_gl`,{_gm:e._.gf===e.d}]),O(e.a,`aria-checked`,e._.gf===e.d?`true`:`false`),Ou(e,e._.gf===e.d?0:1)}),Au=s(`y79`,e=>_(e.a,`click`,function(){e._.fn({accent:e.d})})),ju=e=>{ku._(e),Au(e)},Mu=w(3,e=>ge(e.a,`--swatch:${e.d}`)),Nu=(e,t)=>{O(e.a,`title`,t),O(e.a,`aria-label`,t)},Pu=(e,t)=>{Mu(e,t[0]?.value),Nu(e,t[0]?.name)},Fu=s(`y82`,e=>_(e.b,`change`,function(t,n){e._.fc(n)})),Iu=e=>{S(e.a,M),S(e.b,`_gs`),Fu(e)},Lu=s(`y80`,e=>_(e.a,`click`,function(){e._.fb()})),Ru=e=>{S(e.a,M),Lu(e)},zu=h(90,1,e=>b(e.b,e._.f7)),Bu=e=>{zu._(e),S(e.a,`_co`)},Vu=j(6,e=>ie(e,`b`,e._._._.f5[e._.g])),Hu=A(325,Vu,e=>e._._._),Uu=s(`y84`,e=>_(e.b,`change`,function(t,n){cb(e._._._,{...e._._._.f5,[e._.g]:n.checked})})),Wu=e=>{Hu(e),qu._(e),Ju._(e),Yu._(e),S(e.b,`_gE`),S(e.c,`_cl`),S(e.d,`_cm`),S(e.f,`_co`),Uu(e)},Gu=p(5,`<!> value<!><!><!>`,`%c%b%`,oc,`<!> to install: <!>`,`%c%`,Ys,`all <!> already installed`,`b%`,qs),Ku=j(7,e=>{S(e.a,[`_gD`,{_gF:!e._.f&&e._.g!==`settings`}]),O(e.b,`disabled`,!e._.f&&e._.g!==`settings`),Gu(e,e._.g===`settings`?0:e._.f?1:2)}),qu=h(0,0,Ku),Ju=h(0,0,e=>{Ku(e),Vu(e)}),Yu=h(0,0,e=>b(e.e,e._.h)),Xu=p(0,`<li><label><input type=checkbox><span><span> </span><span></span></span></label></li>`,`D D b D D l `,Wu),Zu=k(Ks),Qu=w(3,e=>{Xu(e,+!e.d),Zu(e)}),$u=(e,t)=>{Qu(e,t[0]?.total),td(e,t[0]?.missing),id(e,t[0]?.key),ad(e,t[0]?.label)},ed=k(Zs,Js),td=w(4,e=>{rd(e,e.e?.length),ed(e)}),nd=k(cc,$s,Xs),rd=w(5,e=>{qu(e),nd(e)}),id=w(6,Ju),ad=w(7,Yu),od=j(16,e=>ie(e,`b`,e._._._.f3.has(e.p))),sd=A(323,od,e=>e._._._),cd=s(`y83`,e=>_(e.b,`change`,function(t,n){e._._._.fd(e.p,n.checked)})),ld=e=>{sd(e),S(e.b,`_gE`),S(e.c,`_cl`),S(e.d,`_cn`),S(e.e,`_cm`),S(e.i,`_co`),cd(e)},ud=p(7,`<span>already here</span>`,` `,ec,`<span title="Add this GitHub host above first">unknown host <!></span>`,` Db%`,rc),dd=j(14,e=>{S(e.a,[`_gD`,{_gF:e.m||!!e.n}]),O(e.b,`disabled`,e.m||!!e.n),ud(e,e.m?0:e.n?1:2)}),fd=w(12,dd),pd=w(13,e=>{dd(e),nc(e)}),md=w(15,od),hd=(e,t)=>b(e.f,t),gd=p(6,`<span>archived</span>`,` `,tc),_d=(e,t)=>gd(e,t===`archived`?0:1),vd=(e,t)=>b(e.j,t.join(`, `)||`no repos`),yd=m(0,`<li><label><input type=checkbox><span><span><span> </span><!><!></span><span> </span></span></label></li>`,`D D b D D D l%b%l D `,ld,(e,t)=>{fd(e,t[0]?.exists),pd(e,t[0]?.unknownHost),md(e,t[0]?.id),hd(e,t[0]?.name),_d(e,t[0]?.status),vd(e,t[0]?.repos)}),bd=A(338,e=>yd(e,[e._._.go,`id`]),e=>e._._),xd=e=>{bd(e),S(e.a,cr)},Sd=j(11,e=>O(e.j,`disabled`,!e._.f4&&!Object.values(e._.f5).some(Boolean))),Cd=h(92,0,Sd),wd=s(`y85`,e=>{_(e.j,`click`,function(){e._.fe()}),_(e.k,`click`,function(){rb(e._,null)})}),Td=e=>{Cd._(e),Ed._(e),Dd._(e),Od._(e),kd._(e),jd._(e),Fd._(e),Id._(e),Ld._(e),Rd._(e),zd._(e),S(e.a,`_gt`),S(e.b,`_gu`),S(e.g,cr),S(e.i,`_gB`),S(e.j,[M,`_r`]),S(e.k,M),wd(e)},Ed=h(92,0,Sd),Dd=h(92,0,e=>b(e.c,e._.gl)),Od=h(92,0,e=>b(e.d,new Date(e._.gm).toLocaleDateString())),kd=h(92,0,e=>b(e.e,e._.gn?` (work ${e._.gn})`:``)),Ad=p(5,`<ul></ul>`,` `,xd,`<p>No workspaces in this file.</p>`,` `,ic),jd=h(92,0,e=>Ad(e,+!e._.gp)),Md=m(7,`<!><!><!>`,`b%`,0,$u),Nd=(e,t)=>Md(e,[t,`key`]),Pd=j(12,e=>Nd(e,[{key:`tools`,label:`Tools`,missing:e._.gq.filter(e=>!e.installed).map(e=>e.name),total:e._.gq.length},{key:`skills`,label:`Skills`,missing:e._.gr.filter(e=>!e.installed).map(e=>e.id),total:e._.gr.length},{key:`agents`,label:`Agents`,missing:e._.gs.filter(e=>!e.installed).map(e=>e.label),total:e._.gs.length},{key:`settings`,label:`Settings`,missing:e._.gt.filter(e=>!e.known).map(e=>e.host),total:e._.gu+e._.gt.length}]),4),Fd=h(92,0,Pd),Id=h(92,0,Pd),Ld=h(92,0,Pd),Rd=h(92,0,Pd),zd=h(92,0,Pd),Bd=A(320,e=>{b(e.a,e._._.ey),b(e.b,e._._.ey===1?``:`s`)},e=>e._._),Vd=e=>{Bd(e),Ud(e)},Hd=p(2,`,`),Ud=A(321,e=>Hd(e,+!e._._.ez),e=>e._._),Wd=h(87,0,e=>{b(e.c,e._.et),b(e.d,e._.et===1?``:`s`)}),Gd=s(`y81`,e=>{_(e.q,`click`,function(){e._.f9()}),_(e.s,`click`,function(){nb(e._,null)})}),Kd=e=>{Wd._(e),qd._(e),Jd._(e),Yd._(e),Xd._(e),Qd._(e),$d._(e),tf._(e),S(e.a,`_gt`),S(e.b,`_gu`),S(e.l,`_gu`),S(e.o,`_gv`),S(e.p,`_gB`),S(e.s,M),Gd(e)},qd=h(87,0,e=>b(e.e,e._.eu?`${x(` `)}(${x(e._.eu)} archived)`:``)),Jd=h(87,0,e=>{b(e.f,e._.ev),b(e.g,e._.ev===1?``:`s`)}),Yd=h(87,0,e=>{b(e.h,e._.ew),b(e.i,e._.ew===1?``:`s`)}),Xd=h(87,0,e=>{b(e.j,e._.ex),b(e.k,e._.ex===1?``:`s`)}),Zd=p(12,` <!> unpushed commit<!><!><!>`,`b%c%b%`,Vd),Qd=h(87,0,e=>{S(e.q,[M,{_r:!e._.ey}]),b(e.r,e._.ey?`Export anyway`:`Export`),Zd(e,+!e._.ey)}),$d=h(87,0,e=>b(e.n,e._.ez?`${x(` `)}${x(e._.ez)} uncommitted file${x(e._.ez===1?``:`s`)}`:``)),ef=m(14,`<li><span> </span><ul></ul></li>`,` D D l `,tl,ol),tf=h(87,0,e=>ef(e,[e._.f0,`id`])),nf=h(90,0,e=>b(e.c,e._.ep||`Restoring…`)),rf=e=>{nf._(e),S(e.a,`_fy`),S(e.b,`_G`)},af=h(85,0,e=>b(e.c,e._.ep||`Checking workspaces…`)),of=e=>{af._(e),S(e.a,`_fy`),S(e.b,`_G`)},sf=s(`y61`,e=>_(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.en(e._.i,{action:`update`,id:e._.i})})),cf=v(`y64`,`<button>Update</button>`,` `,e=>{S(e.a,M),sf(e)}),lf=s(`y58`,e=>_(e.a,`click`,function(){e._._._._.en(e._._.j,{action:`add`,source:e._._.l||e._._.j})})),uf=e=>{S(e.a,M),lf(e)},df=p(0,`<span> </span>`,` D `,Ul),ff=h(5,0,e=>df(e,+!e._.m)),pf=e=>{ff._(e),hf._(e)},mf=p(1,`<span>installed</span>`,` `,Vl,`<button>Add</button>`,` `,uf),hf=h(5,0,e=>mf(e,+!e._.n)),gf=s(`y76`,e=>_(e.a,`click`,function(){e._._._._.ef(e._._.k,`install`)})),_f=e=>{S(e.a,M),gf(e)},vf=j(2,e=>O(e.a,`title`,`v${e._._.p} is out; ${e._._.o} holds ${e._._.j} at v${e._._.m}. Pin v${e._._.p} instead`),3),yf=A(22,vf,e=>e._._),bf=s(`y75`,e=>_(e.a,`click`,function(){e._._._._.ef(e._._.k,`install`,e._._.p)})),xf=e=>{yf(e),Sf(e),Cf(e),wf(e),S(e.a,[`_fN`,`_y`]),bf(e)},Sf=A(24,vf,e=>e._._),Cf=A(26,vf,e=>e._._),wf=A(27,e=>{b(e.b,e._._.p),vf(e)},e=>e._._),Tf=A(28,e=>{O(e.a,`title`,`Update to v${e._._.q}`),b(e.c,e._._.q)},e=>e._._),Ef=s(`y74`,e=>_(e.a,`click`,function(){e._._._._.ef(e._._.k,`update`)})),Df=e=>{Tf(e),S(e.a,[M,`_fO`]),tn(e.b),ht(e.b,12),rn(e.b),Ef(e)},Of=s(`y53`,e=>_(e.a,`click`,function(){e._._._.ef(e._._.q,`auth`)})),kf=e=>{S(e.a,[M,`_r`]),Of(e)},Af=s(`y48`,e=>_(e.a,`click`,function(){e._._.ef(e._.s,`install`)})),jf=e=>{S(e.a,M),Af(e)},Mf=s(`y68`,e=>_(e.a,`click`,function(){Bne(e._)()?.focus({preventScroll:!0}),jy(e._,!0)})),Nf=e=>{S(e.a,Ne),Yi(e.b),Xi(e.b,16),Zi(e.b),Mf(e)},Pf=s(`y56`,e=>_(e.a,`click`,function(){yh(e._)()?.focus({preventScroll:!0}),Ay(e._,!0)})),Ff=e=>{S(e.a,Ne),Yi(e.b),Xi(e.b,16),Zi(e.b),Pf(e)},If=p(0,`Remove?`,0,0,$t,(e=>`/${e}&`)(bt),Ll),Lf=j(1,e=>{S(e.a,[lee,`_8`,`_9`,{_s:e._._._.dn===e._.i}]),If(e,e._._._.dn===e._.i?0:1)}),Rf=j(2,e=>O(e.a,`title`,e._._._.dn===e._.i?`Remove ${e._.d}?`:`Remove ${e._.d}`),2),zf=A(309,e=>{Lf(e),Rf(e)},e=>e._._._),Bf=s(`y62`,e=>_(e.a,`click`,function(){e._._._.dn===e._.i?(Sy(e._._._,null),e._._._.en(e._.i,{action:`remove`,id:e._.i})):(Sy(e._._._,e._.i),$n(()=>{e._._._.dn===e._.i&&Sy(e._._._,null)}))})),Vf=e=>{zf(e),Hf(e),Uf(e),Bf(e)},Hf=A(13,Rf),Uf=A(14,e=>{Lf(e),Rf(e)}),Wf=v(`y65`,`<button></button>`,` `,Vf),Gf=A(305,e=>b(e.b,e._._.dj),e=>e._._),Kf=e=>{Gf(e),S(e.a,`_fw`)},qf=s(`y57`,e=>_(e.a,`click`,function(){e._._._.en(e._._._.dj.trim(),{action:`add`,source:e._._._.dj.trim()})})),Jf=e=>{S(e.a,M),qf(e)},Yf=h(34,0,e=>b(e.b,e._.df)),Xf=e=>{Yf._(e),S(e.a,`_d8`)},Zf=ue(68,142,5,e=>{S(e.a,[`_bg`,`_gj`,{_bf:e._.d8===e.f}]),O(e.a,`aria-checked`,e._.d8===e.f?`true`:`false`)}),Qf=s(`y78`,e=>_(e.a,`click`,function(){e._.dx(e.f)})),$f=e=>{Zf._(e),Qf(e)},ep=p(1,$ee,(e=>`/${e}&`)(ete),_l,ite,(e=>`/${e}&`)(ate),gl,lte,(e=>`/${e}&`)(ute),hl),tp=w(5,e=>ep(e,e.f===`system`?0:e.f===`light`?1:2)),np=(e,t)=>b(e.c,t),rp=(e,t)=>{tp(e,t[0]?.id),np(e,t[0]?.label)},ip=A(296,e=>{O(e.a,`title`,`Update work to v${e._._._._.d4} and restart`),b(e.c,e._._._._.d4)},e=>e._._._._),ap=s(`y72`,e=>_(e.a,`click`,function(){e._._._._.e8()})),op=p(2,`<span title="Started from a checkout, not the published package">source checkout — update with git</span>`,` `,Ol,(e=>`<button>${e} <!></button>`)($e),(e=>` D/${e}&b%l`)(ke),e=>{ip(e),S(e.a,[M,`_fO`]),tn(e.b),ht(e.b,12),rn(e.b),ap(e)},`<span>up to date</span>`,` `,Dl),sp=j(3,e=>op(e,e._._._.d3===`source`?0:e._._._.d4&&e._._._.d4!==e._._._.d5?1:e._._._.d4?2:3),2),cp=A(295,sp,e=>e._._._),lp=e=>{cp(e),up(e),dp(e),S(e.a,[`_y`,Mt])},up=A(296,sp,e=>e._._._),dp=A(297,e=>{b(e.b,e._._._.d5),sp(e)},e=>e._._._),Ste=p(2,`<span><span></span>Updating — the app restarts and reloads when it is done…</span>`,` D `,kl,`<span title="Running version">v<!></span><!><!>`,` Db%l%`,lp),Cte=p(4,`<span>app</span>`,` `,El),fp=A(298,e=>{Ste(e,+!e._._.d6),Cte(e,+!!e._._.d6)},e=>e._._),wte=e=>{fp(e),S(e.a,or),S(e.b,[`_fL`,`_y`]),S(e.d,`_z`)},pp=A(296,e=>O(e.a,`title`,`Update work to v${e._._.d4} and restart`),e=>e._._),Tte=s(`y47`,e=>_(e.a,`click`,function(){e._._.e8()})),Ete=e=>{pp(e),S(e.a,[`_q`,`_r`]),Tte(e)},mp=A(296,e=>b(e.d,e._._.d4),e=>e._._),Dte=e=>{mp(e),hp(e),S(e.a,`_gc`),S(e.b,`_gd`)},hp=A(297,e=>b(e.c,e._._.d5),e=>e._._),Ote=p(1,`<span><span></span> Updating work…</span><span>The app restarts and reloads when it is done.</span>`,` D l `,Su,`<span>Update available</span><span>v<!> → v<!></span>`,` b Db%c%`,Dte),kte=p(2,`<button>Update and restart</button>`,` `,Ete),gp=h(5,0,e=>{Ote(e,+!e._.d6),kte(e,+!!e._.d6)}),Ate=e=>{gp._(e),S(e.a,`_ga`),S(e.b,`_gb`)},_p=A(291,e=>b(e.b,e._._.cz),e=>e._._),jte=e=>{_p(e),S(e.a,`_fw`)},Mte=s(`y51`,e=>_(e.a,`click`,function(){Pte(e._)()?.focus({preventScroll:!0}),qv(e._,!0)})),Nte=e=>{S(e.a,[Ne,`_fQ`]),Yi(e.b),Xi(e.b,16),Zi(e.b),Mte(e)},Pte=t(3,`Aw`),vp=j(8,e=>O(e.e,`disabled`,!e._.cv.trim()||e._.cy)),yp=h(22,0,e=>{de(e,`d`,e._.cv,oS(e)),vp(e)}),Fte=s(`y52`,e=>{_(e.a,`submit`,function(t){t.preventDefault();let n=e._.cv.trim().toLowerCase();n&&e._.fg(n,!1)}),Se(e,`d`),_(e.d,`keydown`,function(t){t.key===`Escape`&&(t.preventDefault(),qv(e._,!1),Kv(e._,``),e.d?.blur())}),_(e.g,`click`,function(){qv(e._,!1),Kv(e._,``),e.d?.blur()})}),Ite=e=>{yp._(e),bp._(e),xp._(e),S(e.b,[`_1`,`_fr`]),ea(e.c,14),ta(e.c,`_2`),S(e.d,[`_Z`,`_3`,`_fs`]),S(e.e,[M,`_r`,`_fP`]),S(e.g,[Ne,`_ft`]),Pt(e.h),_t(e.h,14),Jt(e.h),Fte(e)},bp=h(22,0,e=>{S(e.a,[`_fo`,`_fQ`,{_fp:!e._.cw}]),O(e.e,`hidden`,!e._.cw),O(e.g,`hidden`,!e._.cw)}),xp=h(22,0,e=>{b(e.f,e._.cy?`Adding…`:`Add`),O(e.g,`disabled`,e._.cy),vp(e)}),Lte=p(2,`<span> </span>`,` D `,Tl),Sp=j(3,e=>{O(e.a,`title`,`${e._._.h?.path||e._._.h?.label}${e._._._._.fs(e._._.h)?`, pinned to ${e._._.h?.pin}`:``}. Pin a version`),Lte(e,+!e._._._._.fs(e._._.h))}),Rte=A(330,Sp,e=>e._._._._),zte=s(`y73`,e=>_(e.a,`click`,function(){Gv(e._._._._,{id:e._._.k,label:e._._.j,current:e._._.o||e._._.m,newest:e._._.p})})),Bte=e=>{Rte(e),Cp(e),wp(e),S(e.a,[`_fN`,`_y`]),zte(e)},Cp=A(20,Sp,e=>e._._),wp=A(24,e=>b(e.b,e._._.m),e=>e._._),Vte=p(1,(e=>`<button>${e} <!></button>`)($e),(e=>` D/${e}&b%l`)(ke),Df,`<button><!> available</button>`,` D%`,xf),Tp=j(2,e=>Vte(e,e._._._.fr(e._.h)?0:e._.h?.newest?1:2)),Hte=A(329,Tp,e=>e._._._),Ute=e=>{Hte(e),Ep._(e),Dp._(e)},Ep=h(3,1,Tp),Wte=p(0,`<button>v<!><!></button>`,` Db%b%`,Bte,`<span> </span>`,` D `,Cl),Dp=h(3,1,e=>Wte(e,+!e._.m)),Gte=s(`y69`,e=>{_(e.a,`click`,function(){e._._._._.ef(e._._.i,`install`)}),_(e.b,`click`,function(){Gv(e._._._._,{id:e._._.i,label:e._._.i,current:`latest`})})}),Kte=p(0,`<span>installed</span>`,` `,Al,`<button>Install</button><button title="Install a specific version">@…</button>`,` b `,e=>{S(e.a,M),S(e.b,M),Gte(e)}),Op=h(5,0,e=>Kte(e,+!e._.m)),qte=Op,kp=j(1,e=>Cs(e.a,sS(e))),Ap=h(93,0,e=>{ks(e.a,e._.cr!=null),kp(e)}),Jte=e=>{Ap._(e),Mp._(e),Np._(e),Pp._(e),Fp._(e),Es(e.a),Ps(e.a,`latest`),Ns(e.a,`Install`),As(e.a,cS(e))},jp=j(2,e=>Ms(e.a,`Pin ${e._.cs}: latest, lts, a prefix (22), or exact (22.11.0)${e._.ct?`. Newest release: ${e._.ct}`:``}`)),Mp=h(93,0,jp),Np=h(93,0,jp),Pp=h(93,0,e=>Ss(e.a,e._.cu)),Fp=h(93,0,kp),Yte=p(0,`Remove?`,0,0,$t,(e=>`/${e}&`)(bt),vl),Ip=j(1,e=>{S(e.a,[je,`_8`,`_9`,{_s:e._._._._.cq===e._._.k}]),Yte(e,e._._._._.cq===e._._.k?0:1)}),Lp=j(2,e=>O(e.a,`title`,e._._._._.cq===e._._.k?`Remove ${e._._.j}?`:`Remove ${e._._.j}`),2),Rp=A(283,e=>{Ip(e),Lp(e)},e=>e._._._._),Xte=s(`y77`,e=>_(e.a,`click`,function(){e._._._._.cq===e._._.k?(Uv(e._._._._,null),e._._._._.ef(e._._.k,`remove`)):(Uv(e._._._._,e._._.k),$n(()=>{e._._._._.cq===e._._.k&&Uv(e._._._._,null)}))})),Zte=e=>{Rp(e),zp(e),Bp(e),Xte(e)},zp=A(22,Lp,e=>e._._),Bp=A(23,e=>{Ip(e),Lp(e)},e=>e._._),Qte=p(1,`<button>Install</button>`,` `,_f,`<button></button>`,` `,Zte),Vp=j(2,e=>Qte(e,!e._.i&&e._.r?0:e._.i&&e._.m&&!e._.t?1:2),3),Hp=h(5,0,Vp),$te=e=>{Hp._(e),Up._(e),Wp._(e),Gp._(e)},Up=h(5,0,Vp),Wp=h(5,0,Vp),ene=p(0,`<span>required</span>`,` `,yl),Gp=h(5,0,e=>{ene(e,+!e._.t),Vp(e)}),tne=p(0,`Forget?`,0,0,$t,(e=>`/${e}&`)(bt),Zl),Kp=j(1,e=>{S(e.a,[`_cp`,`_8`,`_9`,{_s:e._._._.cq===e._._.q}]),O(e.a,`title`,e._._._.cq===e._._.q?`Forget ${e._._.q}? (gh stays signed in)`:`Forget ${e._._.q}`),tne(e,e._._._.cq===e._._.q?0:1)}),qp=A(283,Kp,e=>e._._._),nne=s(`y55`,e=>_(e.a,`click`,function(){e._._._.cq===e._._.q?(Uv(e._._._,null),e._._._.fg(e._._.q,!0)):(Uv(e._._._,e._._.q),$n(()=>{e._._._.cq===e._._.q&&Uv(e._._._,null)}))})),rne=e=>{qp(e),Jp(e),nne(e)},Jp=A(30,Kp,e=>e._._),Yp=j(2,e=>{S(e.a,[M,{_t:e._._._.cq===`out:${e._._.q}`,_s:e._._._.cq===`out:${e._._.q}`}]),O(e.a,`title`,e._._._.cq===`out:${e._._.q}`?`Sign out of ${e._._.q}?`:`Sign out of ${e._._.q}`),b(e.b,e._._._.cq===`out:${e._._.q}`?`Sign out?`:`Sign out`)}),Xp=A(283,Yp,e=>e._._._),ine=s(`y54`,e=>_(e.a,`click`,function(){let t=`out:${e._._.q}`;e._._._.cq===t?(Uv(e._._._,null),e._._._.ef(e._._.q,`logout`)):(Uv(e._._._,t),$n(()=>{e._._._.cq===t&&Uv(e._._._,null)}))})),ane=e=>{Xp(e),Zp(e),ine(e)},Zp=A(30,Yp,e=>e._._),one=p(1,`<button></button>`,` `,rne),Qp=h(9,0,e=>one(e,+!e._.s)),sne=e=>{Qp._(e),$p._(e)},cne=p(0,`<button>Sign in</button>`,` `,kf,`<button> </button>`,` D `,ane),$p=h(9,0,e=>cne(e,+!!e._.t)),em=j(6,e=>b(e.f,e._._.cp.get(e._.q))),tm=A(282,em,e=>e._._),lne=e=>{tm(e),nm._(e),S(e.a,`_fY`),S(e.b,`_fZ`),S(e.c,`_f1`),S(e.e,`_f0`)},nm=h(10,0,e=>{O(e.c,`href`,`https://${e._.q}/login/device`),b(e.d,e._.q),em(e)}),rm=j(3,e=>b(e.c,e._._._.cn.get(e._.k)||`Starting…`)),im=A(280,rm,e=>e._._._),une=e=>{im(e),am._(e),S(e.a,`_fy`),S(e.b,`_G`)},am=h(3,0,rm),dne=p(3,`<span><span></span> </span>`,` D b `,une,`<!><!><!><!>`,`b%b%`,Ute,`<span>not installed</span>`,` `,xl,`<span title="Installed with the system package manager">system package</span>`,` `,bl),om=j(18,e=>dne(e,e._._.cn.has(e.k)?0:e.i?1:e.r?2:3),3),fne=p(5,`<!><!><!><!>`,`b%b%`,$te),sm=j(11,e=>fne(e,+!!e._._.cn.has(e.k))),cm=A(280,e=>{om(e),sm(e)},e=>e._._),pne=e=>{cm(e),S(e.b,[`_fL`,`_y`]),S(e.e,`_z`)},mne=w(8,e=>{S(e.a,[or,{_fK:!e.i}]),om(e),Hp(e)}),hne=k(zp,yf),gne=w(9,e=>{b(e.c,e.j),hne(e)}),_ne=k(Bp),vne=w(10,e=>{om(e),sm(e),am(e),_ne(e)}),yne=w(17,e=>{om(e),Wp(e)}),bne=(e,t)=>Sne(e,t[0]),xne=k(Cp),Sne=w(7,e=>{mne(e,e.h?.installed),gne(e,e.h?.label),vne(e,e.h?.id),wne(e,e.h?.version),Tne(e,e.h?.path),Ene(e,e.h?.pin),Dne(e,e.h?.newest),One(e,e.h?.latest),yne(e,e.h?.installable),kne(e,e.h?.required),Ep(e),xne(e)}),Cne=k(wp,Sf),wne=w(12,e=>{Up(e),Dp(e),Cne(e)}),Tne=w(13,k(Sl)),Ene=w(14,k(Cf,wl)),Dne=w(15,k(wf)),One=w(16,k(Tf)),kne=w(19,Gp),lm=A(280,e=>{O(e.b,`disabled`,e._._.cn.has(`mise`)),b(e.c,e._._.cn.has(`mise`)?`Installing…`:`Install mise`)},e=>e._._),Ane=s(`y71`,e=>_(e.b,`click`,function(){e._._.ef(`mise`,`install`)})),jne=e=>{lm(e),S(e.a,`_cq`),S(e.b,M),Ane(e)},um=j(3,e=>b(e.c,e._._._.cn.get(e._.i)||`Starting…`)),dm=A(280,um,e=>e._._._),Mne=e=>{dm(e),fm._(e),S(e.a,`_fy`),S(e.b,`_G`)},fm=h(4,0,um),Nne=p(4,`<span><span></span> </span>`,` D b `,Mne,`<span> </span>`,` D `,Ml),pm=j(11,e=>Nne(e,e._._.cn.has(e.i)?0:e.k?1:2),2),Pne=p(5,`<!><!><!>`,`b%`,qte),mm=j(9,e=>Pne(e,+!!e._._.cn.has(e.i))),hm=A(280,e=>{pm(e),mm(e)},e=>e._._),Fne=e=>{hm(e),S(e.a,or),S(e.b,`_cl`),S(e.c,[`_fL`,`_y`])},Ine=w(8,e=>{b(e.d,e.i),pm(e),mm(e),fm(e)}),Lne=w(10,e=>{pm(e),jl(e)}),Rne=(e,t)=>{Ine(e,t[0]?.name),Lne(e,t[0]?.description),zne(e,t[0]?.installed)},zne=w(12,Op),Bne=t(3,`Aao`),gm=j(11,e=>de(e,`d`,e._.cz,e._.fq)),_m=j(10,e=>O(e.g,`hidden`,!e._.dv||!e._.cz.trim())),vm=h(50,0,e=>{gm(e),_m(e)}),Vne=s(`y70`,e=>{Se(e,`d`),_(e.d,`keydown`,function(t){t.key===`Escape`&&(t.preventDefault(),e._.fq(``),jy(e._,!1),e.d?.blur())}),_(e.e,`click`,function(){e._.fq(``),jy(e._,!1),e.d?.blur()})}),Hne=e=>{vm._(e),bm._(e),Sm._(e),Cm._(e),wm._(e),Tm._(e),S(e.b,[`_1`,`_fr`]),S(e.d,[`_Z`,`_3`,`_fs`]),S(e.e,[Ne,`_ft`]),Pt(e.f),_t(e.f,14),Jt(e.f),S(e.g,[dr,`_fv`]),Vne(e)},Une=m(9,`<li><div><span> </span><!></div><!></li>`,` D D D l%l%`,Fne,Rne),Wne=p(8,`<li>No tools match "<!>".</li>`,` Db%`,jte),ym=j(12,e=>Wne(e,e._.d0&&!e._.d0?.length&&!e._.d9?0:1)),bm=h(50,0,e=>{Une(e,[e._.d0||[],`name`]),ym(e)}),Gne=p(7,`<li>Searching the mise registry…</li>`,` `,Nl),xm=j(13,e=>Gne(e,e._.d9&&!e._.d1?0:1)),Sm=h(50,0,xm),Kne=p(2,`<span></span>`,` `,Fl,Ae,(e=>`/${e}&`)(Ke),Pl),Cm=h(50,0,e=>{Kne(e,+!e._.d9),xm(e),ym(e)}),wm=h(50,0,e=>{S(e.a,[`_fo`,{_fp:!e._.dv}]),O(e.e,`hidden`,!e._.dv),_m(e)}),Tm=h(50,0,gm),Em=h(48,0,e=>O(e.a,`disabled`,e._.co>0)),qne=s(`y67`,e=>_(e.a,`click`,function(){e._.fh(e._.fv.map(e=>e.id),`install`)})),Jne=e=>{Em._(e),S(e.a,M),qne(e)},Dm=h(47,0,e=>O(e.a,`disabled`,e._.co>0)),Yne=s(`y66`,e=>_(e.a,`click`,function(){e._.fh(e._.fy,`update`)})),Xne=e=>{Dm._(e),S(e.a,M),Yne(e)},Om=j(9,e=>Iee(e.a,e._._.cn.has(e.i)?e._._.cn.get(e.i)||``:null)),km=A(280,Om,e=>e._._),Zne=e=>{km(e),jm(e),Nm(e),Pee(e.a),Kee(e.a,!0),zee(e.a)},Am=j(12,e=>{let t;e._._.dd&&e.l<(e._._.dd?.agents).length&&(t=dn({content:zl(e)})),Jee(e.a,t)}),jm=A(301,Am,e=>e._._),Mm=j(6,e=>{let t;e._._.dg&&e.f&&(t=dn({content:cf(e)})),Xee(e.a,t)}),Nm=A(304,e=>{let t;e._._.dg&&(t=dn({content:Wf(e)})),Qee(e.a,t),Mm(e)},e=>e._._),Qne=w(11,Am),$ne=w(5,e=>{Gee(e.a,e.f),Mm(e)}),ere=k(Hf),tre=w(3,e=>{Lee(e.a,e.d),ere(e)}),nre=(e,t)=>Vee(e.a,t),rre=(e,t)=>Uee(e.a,t),Pm=k(Uf),Fm=w(8,e=>{Om(e),Pm(e)}),Im=(e,t)=>{tre(e,t[0]?.name),nre(e,t[0]?.description),$ne(e,t[0]?.source),rre(e,t[0]?.sourceUrl),Fm(e,t[0]?.id),Rm(e,t[0]?.agents)},Lm=k(Rl),Rm=w(10,e=>{Qne(e,e.k?.length),Lm(e)}),zm=A(280,e=>{O(e.b,`disabled`,e._._.cn.has(`skills`)),b(e.c,e._._.cn.has(`skills`)?`Installing…`:`Install it`)},e=>e._._),Bm=s(`y60`,e=>_(e.b,`click`,function(){e._._.ef(`skills`,`install`)})),Vm=p(1,`<p>No agent CLIs are installed, so a skill would have nowhere to go. Install one from Agents above.</p>`,` `,Bl,`<p>The skills CLI is not installed, so skills can be listed but not added or removed. <button> </button></p>`,` Db D `,e=>{zm(e),S(e.a,`_cq`),S(e.b,M),Bm(e)}),Hm=p(3,`<p>No skills installed. Search below, or paste an owner/repo.</p>`,` `,Il),Um=h(37,0,e=>{Vm(e,e._.dd&&!(e._.dd?.agents).length?0:e._.dd&&!e._.dd?.available?1:2),Hm(e,e._.dd&&!(e._.dd?.global).length&&e._.dd?.available&&(e._.dd?.agents).length?0:1)}),Wm=e=>{Um._(e),Km._(e),S(e.a,`_d9`),S(e.c,`_fh`)},Gm=m(2,Za,(e=>`/${e}&`)(` b`),Zne,Im),Km=h(37,0,e=>Gm(e,[e._.de||[],`id`])),qm=j(3,e=>b(e.c,e._._._.cn.get(e._.j)||`Starting…`)),Jm=A(280,qm,e=>e._._._),Ym=e=>{Jm(e),Xm._(e),S(e.a,`_fy`),S(e.b,`_G`)},Xm=h(4,0,qm),Zm=p(4,`<span><span></span> </span>`,` D b `,Ym,`<span> </span>`,` D `,Gl),Qm=p(5,`<!><!><!><!>`,`b%b%`,pf),$m=j(10,e=>{Zm(e,+!e._._.cn.has(e.j)),Qm(e,+!!e._._.cn.has(e.j))}),eh=A(280,$m,e=>e._._),th=e=>{eh(e),S(e.a,or),S(e.b,`_cl`),S(e.c,[`_fL`,`_y`])},nh=(e,t)=>b(e.d,t),rh=w(9,e=>{$m(e),Xm(e)}),ih=(e,t)=>{nh(e,t[0]?.name),rh(e,t[0]?.skillId),ah(e,t[0]?.source),sh(e,t[0]?.installs),ch(e,t[0]?.installed)},ah=w(11,Wl),oh=k(Hl),sh=w(12,e=>{ff(e),oh(e)}),ch=w(13,hf),lh=j(3,e=>b(e.c,e._._._.cn.get(e._._._.dj.trim())||`Starting…`)),uh=A(280,lh,e=>e._._._),dh=e=>{uh(e),fh(e),S(e.a,`_fy`),S(e.b,`_G`)},fh=A(305,lh,e=>e._._._),ph=p(4,`<span><span></span> </span>`,` D b `,dh,`<span>Add straight from this source</span>`,` `,Kl),mh=p(5,`<button>Add</button>`,` `,Jf),hh=j(6,e=>{ph(e,+!e._._.cn.has(e._._.dj.trim())),mh(e,+!!e._._.cn.has(e._._.dj.trim()))}),gh=A(280,hh,e=>e._._),_h=e=>{gh(e),vh(e),S(e.a,or),S(e.b,`_cl`),S(e.c,[`_fL`,`_y`])},vh=A(305,e=>{b(e.d,e._._.dj.trim()),hh(e)},e=>e._._),yh=t(3,`Aaa`),bh=p(8,`<li><div><span> </span><!></div><!></li>`,` D D D l%l%`,_h),xh=j(12,e=>de(e,`d`,e._.dj,e._.ff)),Sh=j(11,e=>O(e.g,`hidden`,!e._.dt||!e._.dj.trim())),Ch=p(7,`<li>Searching skills.sh…</li>`,` `,ql),wh=j(14,e=>Ch(e,e._.dm&&!e._.dl&&!Gs(e._.dj)?0:1),2),Th=p(10,`<li>No skills match "<!>".</li>`,` Db%`,Kf),Eh=j(13,e=>Th(e,e._.dk&&!e._.dk?.length&&!e._.dm&&!Gs(e._.dj)?0:1),2),Dh=h(36,0,e=>{bh(e,+!Gs(e._.dj)),xh(e),Sh(e),wh(e),Eh(e)}),Oh=s(`y59`,e=>{Se(e,`d`),_(e.d,`keydown`,function(t){t.key===`Escape`&&(t.preventDefault(),e._.ff(``),Ay(e._,!1),e.d?.blur())}),_(e.e,`click`,function(){e._.ff(``),Ay(e._,!1),e.d?.blur()})}),kh=e=>{Dh._(e),jh._(e),Mh._(e),Ph._(e),Fh._(e),Ih._(e),S(e.b,[`_1`,`_fr`]),S(e.d,[`_Z`,`_3`,`_fs`]),S(e.e,[Ne,`_ft`]),Pt(e.f),_t(e.f,14),Jt(e.f),S(e.g,[dr,`_fv`]),Oh(e)},Ah=m(9,`<li><div><span> </span><!></div><!></li>`,` D D D l%l%`,th,ih),jh=h(36,0,e=>{Ah(e,[e._.dk||[],`skillId`]),Eh(e)}),Mh=h(36,0,wh),Nh=p(2,`<span></span>`,` `,Yl,Ae,(e=>`/${e}&`)(Ke),Jl),Ph=h(36,0,e=>{Nh(e,+!e._.dm),wh(e),Eh(e)}),Fh=h(36,0,e=>{S(e.a,[`_fo`,{_fp:!e._.dt}]),O(e.e,`hidden`,!e._.dt),Sh(e)}),Ih=h(36,0,xh),Lh=j(3,e=>b(e.c,e._._.cp.has(e._.q)?`Waiting for the browser…`:e._._.cn.get(e._.q)||`Starting…`),2),Rh=A(280,Lh,e=>e._._),zh=e=>{Rh(e),Bh(e),Vh._(e),S(e.a,[`_co`,`_fU`]),S(e.b,`_G`)},Bh=A(282,Lh,e=>e._._),Vh=h(8,0,Lh),Hh=j(3,e=>b(e.c,e._._.cn.get(e._.s)||`Starting…`)),Uh=A(280,Hh,e=>e._._),Wh=e=>{Uh(e),Gh._(e),S(e.a,`_fy`),S(e.b,`_G`)},Gh=h(8,0,Hh),Kh=A(279,e=>{O(e.a,`disabled`,e._.cm),on(e.b,e._.cm&&`_F`)}),qh=s(`y43`,e=>_(e.a,`click`,function(){e._.eb()})),Jh=we(`y45`,(e=>`<button title="Refresh: re-check this machine and agent usage" aria-label="Re-check this machine">${e}</button>`)(Re),(e=>` D/${e}&l`)(nt),e=>{Kh(e),S(e.a,Ne),rt(e.b),Oe(e.b,14),qh(e)}),Yh=A(278,e=>b(e.a,e._._.cl),e=>e._._),Xh=we(`y46`,` `,` `,Yh),Zh=e=>{Gt(e.a),lt(e.a,Xh(e)),Zt(e.a,`inline`),Rt(e.a,lS(e)),ot(e.a),Te(e.a),St(e.a),mt(e.a),Xe(e.a,{})},Qh=h(17,1,e=>b(e.b,e._.ck)),$h=e=>{Qh._(e),S(e.a,`_cq`)},eg=A(312,e=>Ga(e.a,uS(e)),e=>e._._),tg=e=>{eg(e),rg(e),ig._(e),ag._(e),og._(e),sg._(e),Ha(e.a),Ka(e.a,[`_d2`,`_f2`]),Ya(e.a,dS(e))},ng=j(1,e=>Wa(e.a,fS(e))),rg=A(313,ng,e=>e._._),ig=h(11,0,ng),ag=h(11,0,e=>Ja(e.a,e._.w)),og=h(11,0,e=>ka(e.a,e._.y)),sg=h(11,0,e=>Ua(e.a,e._.a1)),cg=w(22,e=>{wg(e,e.w?.length),ag(e)}),lg=w(24,e=>{Eg(e,e.y?.length),og(e)}),ug=j(15,e=>{cg(e,(e.o||[]).filter(t=>!e._.cg.has(t.org))),lg(e,(e.o||[]).filter(t=>e._.cg.has(t.org)))}),dg=i(23,ug),fg=e=>{dg._(e),bg._(e),xg._(e),S(e.a,[`_d2`,`_fR`]),S(e.b,`_fS`),ea(e.c,18),ta(e.c,`_fT`),S(e.d,`_cl`),S(e.e,`_cn`),S(e.f,`_cm`)},pg=p(9,`<!><!><!><!>`,`b%b%`,sne),mg=p(8,`<span><span></span> </span>`,` D b `,zh,(e=>`<span>${e} Signed in as <strong> </strong></span>`)(na),(e=>` D/${e}&b D m`)(ra),ru,(e=>`<span>${e} </span>`)(ti),(e=>` D/${e}& l`)(ni),tu,`<span>Not signed in</span>`,` `,Ql),hg=j(29,e=>mg(e,e.a1?0:e.t?1:e.v?2:3),2),gg=p(10,`<div><span>Enter this code at <a target=_blank rel=noopener><!>/login/device</a></span><code> </code></div>`,` D Db D%m D `,lne),_g=j(28,e=>gg(e,e.a1&&e._.cp.has(e.q)?0:1),2),vg=w(27,e=>{pg(e,+!!e.a1),hg(e),_g(e),sg(e)}),yg=j(17,e=>vg(e,e._.cn.has(e.q))),bg=i(23,yg),xg=i(23,_g),Sg=p(11,sa,(e=>`/${e}&`)(ca),tg),Cg=j(26,e=>Sg(e,e.x||e.z?0:1)),wg=w(23,Cg),Tg=w(14,ug),Eg=w(25,Cg),Dg=k(Zp,Jp),Og=w(16,e=>{b(e.g,e.q),yg(e),_g(e),ig(e),Vh(e),nm(e),Dg(e)}),kg=p(7,`<span>Enterprise</span>`,` `,$l),Ag=w(18,e=>{kg(e,+!e.s),Qp(e)}),jg=w(19,e=>{hg(e),$p(e)}),Mg=w(21,e=>{hg(e),eu(e)}),Ng=(e,t)=>{Tg(e,t[0]?.sso),Og(e,t[0]?.host),Ag(e,t[0]?.isEnterprise),jg(e,t[0]?.authed),Pg(e,t[0]?.user),Mg(e,t[0]?.error)},Pg=w(20,nu),Fg=p(1,`<p>mise is not installed. It provides every tool below. <button> </button></p>`,` Db D `,jne),Ig=h(51,0,e=>Fg(e,e._.cb&&!(e._.cb?.mise).installed?0:1)),Lg=e=>{Ig._(e),zg._(e),Vg._(e),S(e.a,`_d9`),S(e.c,ar)},Rg=p(3,`<li><span>work</span><!><span></span><!></li>`,` D b%b b%`,wte),zg=h(51,0,e=>Rg(e,+!e._.d2)),Bg=m(4,`<li><span> </span><!><span></span><!></li>`,` D D l%b b%`,pne,bne),Vg=h(51,0,e=>Bg(e,[e._.ft,`id`])),Hg=A(275,e=>b(e.b,e._.ce.map(e=>Bs[e]||e).join(`, `))),Ug=v(`y44`,`<span>Not ready</span>. Missing <!>.`,` c%`,e=>{Hg(e),S(e.a,`_fz`)}),Wg=p(5,`<span>default</span>`,` `,_u),Gg=j(12,e=>Wg(e,e._._._.c1===e.l?0:1)),Kg=A(273,Gg,e=>e._._._),qg=s(`y50`,e=>_(e.h,`click`,function(){e._._._.fp(e.l,!e.o)})),Jg=e=>{Kg(e),Qg(e),S(e.b,`_fD`),Qr(e.c),ei(e.c),S(e.d,[`_fG`,`_y`]),S(e.g,`_z`),S(e.h,`_H`),qg(e)},Yg=m(8,oi,(e=>`/${e}&`)(si),mu,gu),Xg=(e,t)=>Yg(e,[t,e=>`${e.agent}-${e.account||``}`]),Zg=j(13,e=>Xg(e,e._._._.g6(e.l))),Qg=A(332,Zg,e=>e._._._),$g=w(11,e=>{$r(e.c,e.l),Zg(e),Gg(e)}),e_=w(14,e=>{S(e.a,[`_fE`,{_fF:!e.o}]),O(e.h,`aria-checked`,e.o?`true`:`false`),O(e.h,`title`,e.o?`Shown in session pickers. Hide it`:`Hidden from session pickers. Show it`)}),t_=(e,t)=>b(e.e,t),n_=(e,t)=>{$g(e,t[0]?.id),e_(e,t[0]?.enabled),t_(e,t[0]?.command)},r_=h(11,0,e=>S(e.a,[`_fH`,{_fF:e._.x&&!e._.x?.enabled}])),i_=e=>{r_._(e),o_._(e),c_._(e),u_._(e)},a_=m(1,(e=>`<li><div>${e}<span> </span><!><span></span><button role=switch></button></div><!></li>`)(Vr),(e=>` D D/${e}& D l%b b l%l`)(`b%c`),Jg,n_),o_=h(11,0,e=>a_(e,[e._.a3,`id`])),s_=m(2,(e=>`<li>${e}</li>`)(oi),(e=>`D/${e}&l`)(si),du,pu),c_=h(11,0,e=>s_(e,[e._.a5,e=>`${e.agent}-${e.account||``}`])),l_=m(3,(e=>`<li>${e}</li>`)(oi),(e=>`D/${e}&l`)(si),cu,uu),u_=h(11,0,e=>l_(e,[e._.a7,e=>`${e.agent}-${e.account||``}`])),d_=p(7,`<span>default</span>`,` `,yu),f_=j(24,e=>d_(e,e.x&&e._.c1===e.x?.id?0:1)),p_=i(15,f_),m_=e=>{p_._(e),v_._(e),x_._(e),w_._(e),S(e.a,ir),Qr(e.c,18),ei(e.c),S(e.d,`_cl`),S(e.e,`_cn`),S(e.f,`_cm`)},h_=p(8,`<span><span></span> </span>`,` D b `,Wh,`<span>Not installed</span>`,` `,vu),g_=p(9,`<button>Install</button>`,` `,jf),__=j(21,e=>{h_(e,e._.cn.has(e.s)?0:e.u?2:1),g_(e,!e.u&&!e._.cn.has(e.s)?0:1)},2),v_=i(15,__),y_=w(31,e=>{z_(e,e.a5?.length),c_(e)}),b_=j(25,e=>y_(e,e.x?e._.g6(e.x?.id):[])),x_=i(15,b_),S_=w(33,e=>{B_(e,e.a7?.length),u_(e)}),C_=j(14,e=>S_(e,e.n?.installed?e._.g7(e.n):[])),w_=i(15,C_),T_=p(10,`<button role=switch></button>`,` `,Eu),E_=w(29,e=>{L_(e,e.a3?.length),o_(e)}),D_=j(26,e=>E_(e,e.x?[]:e.p)),O_=w(23,e=>{S(e.b,[`_fD`,{_fF:e.x&&!e.x?.enabled}]),k_(e,e.x?.id),A_(e,e.x?.enabled),T_(e,+!e.x),D_(e),b_(e),f_(e),r_(e)}),k_=w(27,Tu),A_=w(28,Du),j_=j(19,e=>O_(e,e.q===1&&e.r.id===e.s?e.r:null),2),M_=w(16,j_),N_=w(17,j_),P_=w(18,e=>{$r(e.c,e.s),j_(e),__(e),Gh(e)}),F_=p(11,`<ul><!><!><!></ul>`,` D%b%b%`,i_),I_=j(35,e=>F_(e,e.a4||e.a6||e.a8?0:1),2),L_=w(30,I_),R_=w(15,e=>{M_(e,e.p?.length),N_(e,e.p?.[0]),D_(e)}),z_=w(32,I_),B_=w(34,I_),V_=w(13,e=>{R_(e,e.n?.instances),P_(e,e.n?.id),U_(e,e.n?.installed),H_(e,e.n?.label),C_(e)}),H_=(e,t)=>b(e.g,t),U_=w(20,__),W_=(e,t)=>V_(e,t[0]),G_=t(182),K_=t(192),q_=p(22,((e,t)=>`<form><label>${e}<input type=text placeholder=github.example.com aria-label="GitHub Enterprise host" autocomplete=off spellcheck=false></label><button type=submit> </button><button type=button title=Cancel aria-label=Cancel>${t}</button></form>`)(Qi,$t),((e,t)=>` D D/${e}& l D l D/${t}&m`)(` b`,bt),Ite),J_=p(24,`<p>Install the GitHub CLI below to sign in.</p>`,` `,Xl),Y_=p(50,(e=>`<div><label><!><input type=text placeholder="Search the mise registry…" aria-label="Search the mise registry" autocomplete=off></label><button type=button title="Close search" aria-label="Close search">${e}</button><ul><!><!><!></ul></div>`)($t),(e=>` D D%b l D/${e}&l D%b%b%m`)(bt),Hne),X_=w(231),Z_=j(172,e=>X_(e,pS(e)),4),Q_=p(21,(e=>`<button title="Add Enterprise host" aria-label="Add Enterprise host">${e}</button>`)(qi),(e=>` D/${e}&l`)(Ji),Nte),$_=j(131,e=>Q_(e,e.cb&&!e.cw?0:1)),ev=p(49,(e=>`<button title="Add tool" aria-label="Add tool">${e}</button>`)(qi),(e=>` D/${e}&l`)(Ji),Nf),tv=j(166,e=>ev(e,e.cb&&(e.cb?.mise).installed&&!e.dv?0:1)),nv=a(109,e=>{let t;e.cb&&!e.cb?.ready&&(t=dn({content:Ug(e)})),Lr(e.d,t),hv(e,e.cb?.agents),xv(e,e.cb?.tools),Sv(e,e.cb?.missing),wv(e,e.cb?.github),q_(e,+!e.cb),J_(e,e.cb&&!(e.cb?.github).length?0:1),Y_(e,e.cb&&(e.cb?.mise).installed?0:1),Z_(e),$_(e),tv(e),Ig(e)}),rv=w(249,w_),iv=j(247,e=>rv(e,mS(e)),2),av=w(246,iv),ov=m(15,(e=>`<li><div>${e}<div><span><span> </span><!></span><!></div><!><!></div><!></li>`)(Vr),(e=>` D D/${e}& D D D l%l%l%b%l%l`)(`b%c`),m_,W_),sv=m(16,(e=>`<li>${e}</li>`)(oi),(e=>` D/${e}&l`)(si),au,su),cv=(e,t)=>sv(e,[t,e=>`${e.agent}-${e.account||``}`]),lv=j(243,e=>cv(e,(e.cj||[]).filter(t=>Vs(t.agent,e.g0)===null))),uv=w(242,e=>{Jx(e,e.g0.length),av(e,new Set(e.g0.flatMap(e=>e.instances.map(e=>e.id)))),ov(e,[e.g0,`id`]),iv(e),lv(e)}),dv=w(223),fv=k(rg),pv=w(185,e=>{dv(e,hS(e)),fv(e),Fp(e)}),mv=j(184,e=>pv(e,gS(e)),6),hv=w(110,e=>{uv(e,e.cc||[]),mv(e)}),gv=w(237,e=>Gx(e,e.fv?.length)),_v=(e,t)=>b(e.aj,t?`${x(` · `)}${x(t)} missing`:``),vv=w(240,e=>qx(e,e.fy?.length)),yv=j(236,e=>vv(e,e.ft.filter(e.fr).map(e=>e.id))),bv=w(235,e=>{b(e.ai,e.ft.filter(e=>e.installed).length),gv(e,e.ft.filter(e=>e.recommended&&!e.installed&&e.installable)),_v(e,e.ft.filter(e=>e.recommended&&!e.installed).length),yv(e),Vg(e)}),xv=w(111,e=>bv(e,e.cd||[])),Sv=w(112,k(Hg)),Cv=m(23,(e=>`<div><div>${e}<div><span><span> </span><!></span><!></div><!></div><!></div><!><!>`)(Qi),(e=>` D D/${e}& D D D l%l%l%l%l%c`)(` b`),fg,Ng),wv=w(113,e=>Cv(e,[e.cf||[],`host`])),Tv=(e,t)=>nv(e,t||Hs),Ev=a(114,dg),Dv=s(`y87`,e=>d(e,{onMount:function(){Lt().then(e.ch),e.e5(!1),e.e9(!1),e.e6(!1),K_(e)();let t=new AbortController;return zn(t=>{Mv(e,t)},t.signal),Bt().addEventListener(`app.reachable`,t=>{t.data.reachable&&e.e4&&(Ny(e,!1),e.e5(!1),e.e6(!1))},{signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}})),Ov=j(180,Dv,4),kv=w(115,Ov),Av=p(17,`<p><span></span> Loading usage…</p>`,` D `,iu,`<p> </p>`,` D `,$h),jv=j(245,e=>Av(e,!e.ci&&e.g2?0:e.ci?.error?1:2)),Mv=a(116,e=>{Ob(e,e.ci?.agents),kb(e,e.ci?.error),jv(e)}),Nv=p(4,Ot,(e=>`/${e}&`)(Vt),Zh),Pv=k(Yh),z=a(119,e=>{Nv(e,+!e.cl),Pv(e)}),Fv=a(120,k(Kh)),Iv=w(193),Lv=j(191,e=>Iv(e,vS(e)),4),Rv=w(183,e=>{mv(e),Lv(e)}),zv=k(Uh,Rh,gh,uh,eh,Jm,zm,km,hm,dm,lm,cm,im),Bv=a(121,e=>{Ab(e,e.cn?.size),Rv(e,yS(e)),mv(e),Lv(e),v_(e),bg(e),zv(e)}),Vv=k(Bh,tm),Hv=a(123,e=>{mv(e),xg(e),Vv(e)}),Uv=a(124,k(Xp,qp,Rp)),Wv=p(93,ns,(e=>`/${e}&`)(rs),Jte),Gv=a(125,e=>{jb(e,e.cr?.label),Mb(e,e.cr?.newest),Nb(e,e.cr?.current),Wv(e,+!e.cr),Ap(e)}),Kv=a(129,yp),qv=a(130,e=>{$_(e),bp(e)}),Jv=a(132,xp),Yv=w(232,Tm),Xv=j(146,e=>Yv(e,bS(e))),Zv=k(_p),Qv=a(133,e=>{Xv(e),vm(e),Zv(e)}),$v=a(134,e=>{Pb(e,e.d0?.length),mv(e),bm(e)}),ey=p(5,`<div role=status><div></div><!></div>`,` D b%`,Ate),ty=j(170,e=>ey(e,e.dz||e.d6?0:1)),ny=w(169,ty),ry=w(178),iy=j(141,e=>{ny(e,!!(e.d2&&!e.d6&&e.d2?.install!==`source`&&e.d2?.latest&&e.d2?.latest!==e.d2?.version)),ry(e,xS(e))}),ay=a(136,e=>{Fb(e,e.d2?.install),Ib(e,e.d2?.latest),Lb(e,e.d2?.version),iy(e),zg(e)}),oy=k(fp),sy=a(140,e=>{iy(e),ty(e),gp(e),oy(e)}),cy=j(168,e=>oe(e,`b8`,e.d8,SS(e))),ly=a(142,e=>{cy(e),Zf(e)}),uy=a(143,Cm),dy=(e,t)=>Rb(e,t.id),fy=p(36,(e=>`<div><label><!><input type=text placeholder="Search skills, or paste owner/repo…" aria-label="Search for a skill" autocomplete=off spellcheck=false></label><button type=button title="Close search" aria-label="Close search">${e}</button><ul><!><!><!><!></ul></div>`)($t),(e=>` D D%b l D/${e}&l D%b%b%b%m`)(bt),kh),py=e=>{fy(e,e.dg&&e.di?0:1)},my=k(jm),hy=a(147,e=>{zb(e,e.dd?.global),Ub(e,e.dd?.available),Wb(e,e.dd?.agents),py(e),Um(e),my(e)}),gy=w(221,Ih),_y=j(160,e=>gy(e,CS(e))),vy=k(vh,fh,Gf),yy=a(153,e=>{_y(e),Dh(e),vy(e)}),by=a(154,e=>{Kb(e,e.dk?.length),Lv(e),jh(e)}),xy=a(156,Ph),Sy=a(157,k(zf)),Cy=(e,t)=>qb(e,t.id),wy=p(51,`<div><!><ul><!><!></ul></div>`,` D%b D%b%`,Lg),Ty=a(161,e=>{S(e.ad,[`_d4`,{_d5:e.dr}]),O(e.ae,`aria-expanded`,e.dr?`true`:`false`),jt(e.af,[`_d_`,{_ea:e.dr}]),wy(e,+!e.dr)}),Ey=p(37,`<div><!><ul></ul><!></div>`,` D%b b%`,Wm),Dy=a(162,e=>{S(e.a4,[`_d4`,{_d5:e.ds}]),O(e.a5,`aria-expanded`,e.ds?`true`:`false`),jt(e.a6,[`_d_`,{_ea:e.ds}]),Ey(e,+!e.ds)}),Oy=p(35,(e=>`<button title="Add skill" aria-label="Add skill">${e}</button>`)(qi),(e=>` D/${e}&l`)(Ji),Ff),ky=j(164,e=>Oy(e,e.dg&&e.di&&!e.dt?0:1),2),Ay=a(163,e=>{ky(e),Fh(e)}),jy=a(165,e=>{tv(e),wm(e)}),My=w(167,cy),Ny=a(174,Ov),Py=w(181,k(eg)),Fy=j(177,e=>Py(e,TS(e))),Iy=w(176,e=>{Ov(e),Fy(e)}),Ly=w(182),Ry=w(179,e=>{Ly(e,DS(e)),Ov(e)}),zy=(e,t)=>{lx(e,t.applied),ux(e,t.issued)},By=w(218),Vy=p(85,`<span><span></span> </span>`,` D b `,of,`<span>Save workspaces, settings, skills and tool pins to a file. Code stays on GitHub.</span>`,` `,sl),Hy=w(217),Uy=j(216,e=>Hy(e,AS(e))),Wy=w(220),Gy=j(212,e=>Wy(e,jS(e)),6),Ky=p(86,`<button>Export…</button>`,` `,Ru),qy=p(87,`<div><p>In the file: <!> workspace<!><!> , <!> tool pin<!>, <!> skill<!>, <!> agent<!>.</p><p>Not in the file: <!><!> .</p><ul></ul><div><button> </button><button>Cancel</button></div></div>`,` D Db%c%b%c%c%c%c%c%c%l Db%b%l b D D l `,Kd),Jy=j(197,e=>{Ky(e,!e.eo&&!e.eq?0:1),qy(e,e.eq&&!e.eo?0:1)}),Yy=p(90,`<span><span></span> </span>`,` D b `,rf,`<span> </span>`,` D `,Bu,`<span>Load a backup file. Repos clone in the background.</span>`,` `,lc),Xy=j(214,e=>Yy(e,e.eo===`restore`?0:e.f7?1:2)),Zy=p(91,`<label title="Pick a work backup file">Restore… <input type=file accept=application/json,.json aria-label="Backup file"></label>`,` Db `,Iu),Qy=p(92,`<div><p>From <!> on <!><!>.</p><!><ul><!></ul><div><button>Restore</button><button>Cancel</button></div></div>`,` D Db%c%b%l%b D%l D b `,Td),$y=j(208,e=>{Zy(e,!e.f1&&e.eo!==`restore`?0:1),Qy(e,e.f1&&e.eo!==`restore`?0:1)}),eb=a(194,e=>{By(e,kS(e)),Vy(e,e.eo===`preflight`?0:1),Uy(e),Gy(e),Jy(e),Xy(e),$y(e)}),tb=a(195,e=>{af(e),nf(e)}),nb=a(196,e=>{dx(e,e.eq?.contents),vx(e,e.eq?.unpushed),bx(e,e.eq?.files),xx(e,e.eq?.workspaces),Jy(e)}),rb=a(207,e=>{Sx(e,e.f1?.preview),Gy(e),$y(e)}),ib=w(219),ab=k(sd),ob=a(209,e=>{Ix(e,e.f3?.size),ib(e,MS(e)),Gy(e),ab(e)}),sb=k(Hu),cb=a(211,e=>{Gy(e),Ed(e),sb(e)}),lb=a(213,e=>{Xy(e),zu(e)}),ub=w(215,Uy),db=(e,t)=>Vx(e,t.id),fb=w(233,yv),pb=w(234),mb=(e,t)=>{O(e.a,`aria-labelledby`,t),Pr(e.d,t)},hb=(e,t)=>{O(e.g,`aria-labelledby`,t),O(e.i,`id`,t)},gb=(e,t)=>{O(e.aq,`aria-labelledby`,t),O(e.as,`id`,t)},_b=(e,t)=>{O(e.s,`aria-labelledby`,t),O(e.u,`id`,t)},vb=(e,t)=>{O(e.bh,`aria-labelledby`,t),O(e.bj,`id`,t)},yb=(e,t)=>{O(e.z,`aria-labelledby`,t),O(e.a1,`id`,t)},bb=m(68,`<button type=button role=radio><!><!></button>`,` D%b%`,$f,rp),xb=m(70,`<option> </option>`,` D `,0,ml),Sb=(e,t)=>{bb(e,[t,`id`]),xb(e,[t,`id`])},Cb=m(75,`<button type=button role=radio></button>`,` `,ju,Pu),wb=s(`y86`,e=>{T(e,`n`),_(e.a5,`click`,function(){Dy(e,!e.ds)}),_(e.ae,`click`,function(){Ty(e,!e.dr)}),Se(e,`b2`),T(e,`b8`),_(e.bc,`click`,function(){e.fn({accent:``})}),Se(e,`bf`)});function Tb(e){S(e.a,`_dT`),S(e.b,`_dU`),S(e.c,`_dV`),kr(e.d),zr(e.d,dn({content:Jh(e)})),Fr(e.d,`Settings`),Br(e.d),S(e.g,`_cf`),S(e.h,`_cg`),S(e.i,`_ct`),S(e.j,`_z`),S(e.k,`_fB`),S(e.l,`_X`),S(e.m,`_o`),S(e.n,[`_p`,`_fC`]),S(e.o,rr),S(e.s,`_cf`),S(e.t,`_cg`),S(e.u,`_ct`),S(e.x,[`_ck`,`_d1`]),S(e.z,`_cf`),S(e.a0,`_cg`),S(e.a1,`_ct`),S(e.a2,[`_ck`,`_d1`]),S(e.a3,[`_d2`,`_d3`]),S(e.a5,`_d6`),kt(e.a6),Ee(e.a6,12),S(e.a7,`_d7`),S(e.ac,[`_d2`,`_d3`]),S(e.ae,`_d6`),kt(e.af),Ee(e.af,12),S(e.ag,`_d7`),S(e.ah,`_d8`),S(e.aq,`_cf`),S(e.ar,`_cg`),S(e.as,`_ct`),S(e.at,[`_ck`,`_f3`]),S(e.au,`_ge`),S(e.av,`_gf`),S(e.aw,`_gg`),S(e.ax,`_gh`),S(e.az,`_gi`),S(e.b0,`_f4`),S(e.b1,`_f5`),S(e.b2,[`_Z`,`_f6`]),S(e.b3,`_f4`),S(e.b4,`_f5`),S(e.b5,`_f8`),S(e.b6,sr),S(e.b7,[`_o`,`_f9`]),S(e.b8,[`_p`,`_f_`]),S(e.b9,`_f4`),S(e.ba,`_f5`),S(e.bb,`_gk`),S(e.bf,`_gq`),S(e.bh,`_cf`),S(e.bi,`_cg`),S(e.bj,`_ct`),S(e.bk,[`_ck`,`_d1`]),S(e.bl,`_d2`),S(e.bm,`_gr`),S(e.bn,`_cl`),S(e.bq,`_d2`),S(e.br,`_gr`),S(e.bs,`_cl`),Ev(e,new Set),kv(e,_S(e)),Mv(e,Bn()),z(e,null),Fv(e,!1),Bv(e,new Map),Hv(e,new Map),Uv(e,null),Gv(e,null),Kv(e,``),qv(e,!1),Jv(e,!1),Qv(e,``),$v(e,null),ay(e,null),sy(e,!1),ly(e,Wt()),uy(e,!1),dy(e,{id:0}),hy(e,Us),yy(e,``),by(e,null),xy(e,!1),Sy(e,null),Cy(e,{id:0}),Ty(e,!1),Dy(e,!0),Ay(e,!1),jy(e,!1),My(e,wS(e)),Ny(e,!1),Iy(e,ES(e)),Ry(e,OS(e)),zy(e,{issued:0,applied:0}),eb(e,null),tb(e,``),nb(e,null),rb(e,null),ob(e,new Set),cb(e,{tools:!0,skills:!0,agents:!0,settings:!0}),lb(e,null),ub(e,NS(e)),db(e,{id:0}),fb(e,PS),pb(e,FS),mb(e,f(e)),hb(e,f(e)),gb(e,f(e)),_b(e,f(e)),vb(e,f(e)),yb(e,f(e)),Sb(e,[{id:`system`,label:`System`},{id:`light`,label:`Light`},{id:`dark`,label:`Dark`}]),Cb(e,[tr,`value`]),wb(e)}var Eb=k(Qg),Db=w(248,e=>{x_(e),Eb(e)}),Ob=w(117,e=>{Db(e,IS(e)),iv(e),lv(e)}),kb=w(118,Qh),Ab=w(122,e=>{Dm(e),Em(e)}),jb=w(126,Mp),Mb=w(127,Np),Nb=w(128,Pp),Pb=w(135,Sm),Fb=w(137,k(cp)),Ib=w(138,k(mp,pp,up,ip)),Lb=w(139,k(hp,dp)),Rb=w(145,Xv),zb=w(148,e=>{Vb(e,e.de?.length),Km(e)}),Bb=p(34,`<span><!> installed</span>`,` D%`,Xf),Vb=w(149,e=>{Bb(e,+!e.df),Yf(e)}),Hb=k(Nm),Ub=w(150,e=>{ky(e),Hb(e)}),Wb=w(151,e=>Gb(e,e.dh?.length)),Gb=w(152,ky),Kb=w(155,Mh),qb=w(159,_y),Jb=w(175,e=>{Ov(e),Fy(e),Gy(e)}),Yb=w(222),Xb=w(171,e=>{Jb(e,LS(e)),Yb(e,RS(e)),mv(e),Z_(e)}),Zb=w(97,e=>Xb(e,zS(e))),Qb=w(173,e=>{mv(e),Gy(e)}),$b=j(101,e=>Qb(e,BS(e)),2),ex=w(98,e=>{$b(e),Z_(e)}),tx=j(225,e=>oe(e,`n`,e.c1,VS(e))),nx=k(Kg),rx=w(99,e=>{$b(e),Z_(e),tx(e),p_(e),nx(e)}),ix=w(224,tx),ax=w(100,e=>{ix(e,HS(e)),$b(e),Z_(e)}),ox=w(192,Gy),sx=j(190,e=>ox(e,US(e))),cx=w(189,e=>{sx(e),Lv(e)}),lx=w(187,e=>cx(e,WS(e))),ux=w(188,e=>{sx(e),Lv(e)}),dx=w(198,e=>{fx(e,e.es?.workspaces),px(e,e.es?.archived),mx(e,e.es?.tools),hx(e,e.es?.skills),gx(e,e.es?.agents)}),fx=w(199,Wd),px=w(200,qd),mx=w(201,Jd),hx=w(202,Yd),gx=w(203,Xd),_x=k(Bd),vx=w(204,e=>{Qd(e),_x(e)}),yx=k(Ud),bx=w(205,e=>{$d(e),yx(e)}),xx=w(206,tf),Sx=w(261,e=>{Cx(e,e.gj?.from),Ox(e,e.gj?.workspaces),Ax(e,e.gj?.tools),jx(e,e.gj?.skills),Mx(e,e.gj?.agents),Nx(e,e.gj?.hosts),Fx(e,e.gj?.settings)}),Cx=w(262,e=>{wx(e,e.gk?.host),Tx(e,e.gk?.exportedAt),Ex(e,e.gk?.version)}),wx=w(263,Dd),Tx=w(264,Od),Ex=w(265,kd),Dx=k(bd),Ox=w(266,e=>{kx(e,e.go?.length),Dx(e)}),kx=w(267,jd),Ax=w(268,Fd),jx=w(269,Id),Mx=w(270,Ld),Nx=w(271,Rd),Px=k(ac),Fx=w(272,e=>{zd(e),Px(e)}),Ix=w(210,Cd),Lx=j(230,e=>de(e,`b2`,e.ca,GS(e))),Rx=j(258,e=>de(e,`bf`,e.gf||`#3556d8`,KS(e))),zx=w(229,e=>{Lx(e),Rx(e)}),Bx=j(228,e=>zx(e,qS(e)),2),Vx=w(227,Bx),Hx=w(102,e=>{iS(e,e.c4?.accent),aS(e,e.c4?.name),Bx(e)}),Ux=w(103,Bx),Wx=p(48,`<button>Install missing</button>`,` `,Jne),Gx=(e,t)=>Wx(e,t>1?0:1),Kx=p(47,`<button>Update all</button>`,` `,Xne),qx=(e,t)=>{b(e.ak,t?`${x(` · `)}${x(t)} outdated`:``),Kx(e,t>1?0:1)},Jx=w(244,jv),Yx=(e,t)=>Mr(e.d,t),Xx=w(105,e=>Nr(e.d,e.c7&&JS(e))),Zx=m(13,`<option> </option>`,` D `,0,xu),Qx=(e,t)=>Zx(e,[t.filter(e=>e!==`shell`),e=>e]),$x=p(74,na,(e=>`/${e}&`)(ra),dl),eS=p(78,na,(e=>`/${e}&`)(ra),ll,qi,(e=>`/${e}&`)(Ji),cl),tS=w(260,e=>{S(e.be,[`_gl`,`_gp`,{_gm:e.gi}]),eS(e,+!e.gi)}),nS=w(257,e=>{O(e.av,`src`,`/api/instance/icon${e.gf?`?v=${e.gf.slice(1)}`:``}`),S(e.bc,[`_gl`,`_go`,{_gm:!e.gf}]),O(e.bc,`aria-checked`,e.gf?`false`:`true`),$x(e,+!!e.gf),tS(e,!!e.gf&&!tr.some(t=>t.value===e.gf)),Rx(e),ku(e)}),rS=e=>{ge(e.be,e.gi?`--swatch:${e.gf}`:void 0),O(e.be,`title`,e.gi?`Custom ${e.gf}`:`Custom colour`)},iS=w(107,e=>{nS(e,e.c9),rS(e)}),aS=w(108,e=>{b(e.ay,e.ca||`work`),Lx(e)}),oS=e=>t=>{Kv(e._,t)},sS=e=>function(t){let n=e._.cr;Gv(e._,null),e._.ef(n.id,`install`,t)},cS=e=>function(t){t||Gv(e._,null)},lS=e=>function(){z(e._,null)},uS=e=>function(){e._._.eb()},dS=e=>function(){e._._.ch()},fS=e=>function(){e._._.ef(e._.q,`auth-refresh`)},pS=e=>async(t,n)=>{if(!e.cb)return;let r=new Set((e.cb?.agents).flatMap(e=>e.instances.filter(e=>!e.enabled).map(e=>e.id)));n?r.delete(t):r.add(t);try{let i=await N(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({disabledAgents:[...r]})});e.c0?.(i.agents),i.preferredAgent!==e.c1&&e.c2?.(i.preferredAgent),e.e1({...e.cb,agents:(e.cb?.agents).map(e=>({...e,instances:e.instances.map(e=>e.id===t?{...e,enabled:n}:e)}))})}catch(t){z(e,String(t.message||t))}},mS=e=>t=>(e.cj||[]).filter(n=>!e.g4.has(n.agent)&&Vs(n.agent,e.g0)===t.id),hS=e=>async(t,n)=>{for(let r of t)await e.ef(r,n)},gS=e=>async(t,n,r)=>{if(e.cn.has(t))return;z(e,null),e.ed(t,``);let i=er(`setup:${t}`,n=>{let r=/one-time code:\s*([A-Z0-9]{4}-[A-Z0-9]{4})/i.exec(n)?.[1];r&&Hv(e,new Map(e.cp).set(t,r)),e.ed(t,n)});await i.ready;try{e.e1(await N(`/api/setup/${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:n,version:r})})),e.d0&&$v(e,e.d0.map(e=>e.name===t?{...e,installed:n!==`remove`}:e)),(e.cc||[]).some(e=>e.id===t)&&await e.e3(),t===`skills`&&await K_(e)()}catch(t){z(e,String(t.message||t))}finally{i.stop(),e.ed(t,null)}},_S=e=>()=>{Ev(e,new Set(Le()))},vS=e=>async(t,n)=>{if(e.cn.has(t))return;z(e,null),e.ed(t,``);let r=er(`skills:${t}`,n=>e.ed(t,n));await r.ready;let i=++e.ei;try{e.ej(await N(`/api/skills`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n)}),i),e.dk&&by(e,e.dk.map(e=>e.skillId===t?{...e,installed:n.action!==`remove`}:e))}catch(t){z(e,String(t.message||t))}finally{r.stop(),e.ed(t,null)}},yS=e=>(t,n)=>{let r=new Map(e.cn);n===null?r.delete(t):r.set(t,n),Bv(e,r)},bS=e=>t=>{if(Qv(e,t),clearTimeout(e.db),!t.trim()){$v(e,null),uy(e,!1);return}uy(e,!0),e.db=setTimeout(async()=>{try{let n=await N(`/api/setup/search?q=${encodeURIComponent(t.trim())}`);e.cz===t&&$v(e,n)}catch(t){z(e,String(t.message||t))}finally{e.cz===t&&uy(e,!1)}},250)},xS=e=>async()=>{if(!e.d2||e.d6)return;sy(e,!0);let t=e.d2?.version;try{await N(`/api/setup/self`,{method:`POST`})}catch(t){sy(e,!1),z(e,String(t.message||t));return}let n=Date.now(),r=async()=>{try{if((await N(`/api/setup/self`)).version!==t){location.reload();return}}catch{}Date.now()-n<3e5?setTimeout(r,2e3):sy(e,!1)};setTimeout(r,4e3)},SS=e=>function(t){e.dx(t)},CS=e=>t=>{if(yy(e,t),clearTimeout(e.dp),!t.trim()){by(e,null),xy(e,!1);return}xy(e,!0),e.dp=setTimeout(async()=>{try{let n=await N(`/api/skills/search?q=${encodeURIComponent(t.trim())}`);e.dj===t&&by(e,n)}catch(t){z(e,String(t.message||t))}finally{e.dj===t&&xy(e,!1)}},250)},wS=e=>t=>{ly(e,t),tee(t),Ve(t)},TS=e=>async()=>{Fv(e,!0),await Promise.all([e.e5(!0),e.e6(!0),G_(e)()]),Fv(e,!1)},ES=e=>async t=>{try{let n=await N(`/api/setup/self${t?`?refresh`:``}`);ay(e,n),n.updating&&sy(e,!0)}catch{}},DS=e=>async()=>{await e.e9(!0)},OS=e=>t=>Vn(t).then(t=>{Mv(e,t)}),kS=e=>async t=>{let n=t.files?.[0];if(t.value=``,!n||e.eo)return;z(e,null),lb(e,null);let r;try{r=JSON.parse(await n.text())}catch{z(e,`${n.name} is not a work backup file.`);return}try{let t=await N(`/api/backup/preview`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(r)});ob(e,new Set(t.workspaces.filter(e=>!e.exists&&!e.unknownHost).map(e=>e.id))),cb(e,{tools:t.tools.some(e=>!e.installed),skills:t.skills.some(e=>!e.installed),agents:t.agents.some(e=>!e.installed),settings:t.settings>0||t.hosts.some(e=>!e.known)}),rb(e,{manifest:r,preview:t})}catch(t){z(e,String(t.message||t))}},AS=e=>async()=>{if(!e.eo){z(e,null),eb(e,`preflight`),tb(e,``);try{let t=await N(`/api/backup/preflight`,{method:`POST`});t.workspaces.length?nb(e,t):e.f9()}catch(t){z(e,String(t.message||t))}finally{eb(e,null)}}},jS=e=>async()=>{if(!e.f1||e.eo)return;z(e,null),eb(e,`restore`),tb(e,``);let t=er(`restore`,t=>{tb(e,t)});await t.ready;try{let t=(await N(`/api/backup/restore`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({manifest:e.f1?.manifest,selection:{workspaces:[...e.f3],...e.f5}})})).restored.length;lb(e,t?`Restored ${t} workspace${t===1?``:`s`} — repos are cloning in the background.`:`Nothing to restore.`),rb(e,null),await Promise.all([e.e5(!0),e.em(),e.e3()])}catch(t){z(e,String(t.message||t))}finally{t.stop(),eb(e,null)}},MS=e=>(t,n)=>{let r=new Set(e.f3);n?r.add(t):r.delete(t),ob(e,r)},NS=e=>()=>{let t=document.createElement(`a`);t.href=`/api/backup/export`,t.download=``,document.body.append(t),t.click(),t.remove(),nb(e,null)};function PS(e){return!!(e.installed&&e.latest&&e.latest!==e.version)}function FS(e){return!!e.pin&&e.pin!==`latest`&&!/^\d/.test(e.pin)}var IS=e=>t=>(e.cj||[]).filter(e=>e.agent===t),LS=e=>async t=>{try{e.e1(await N(`/api/setup${t?`?refresh`:``}`)),Ny(e,!1)}catch(t){Nt(t)?Ny(e,!0):z(e,String(t.message||t))}},RS=e=>async(t,n)=>{Jv(e,!0),z(e,null);try{e.e1(await N(`/api/github/hosts`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:t,remove:n})})),n||(Kv(e,``),qv(e,!1))}catch(t){z(e,String(t.message||t))}finally{Jv(e,!1)}},zS=e=>t=>{nv(e,t),Hs=t,t.ready||Ty(e,!0),nn(t.github),e.bz?.(t)},BS=e=>async()=>{try{let t=await N(`/api/settings`);e.c0?.(t.agents),t.preferredAgent!==e.c1&&e.c2?.(t.preferredAgent)}catch{}},VS=e=>function(t){e.fi(t)},HS=e=>async t=>{e.c2?.(t);try{await N(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({preferredAgent:t})})}catch(t){z(e,String(t.message||t))}},US=e=>async()=>{let t=++e.ei;try{e.ej(await N(`/api/skills`),t)}catch{}},WS=e=>(t,n)=>{n<=e.eh||(e.eh=n,hy(e,t),Us=t)},GS=e=>function(t){e.fn({name:t})},KS=e=>function(t){e.fn({accent:t})},qS=e=>t=>{let n={...e.c4,...t};e.c5?.(n),nr(n),clearTimeout(e.fl),e.fl=setTimeout(async()=>{try{let t=await N(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({instance:n})});(t.instance.name!==n.name||t.instance.accent!==n.accent)&&(e.c5?.(t.instance),nr(t.instance))}catch(t){z(e,String(t.message||t))}},300)},JS=e=>()=>e.c7?.();n(`y3`,oS),n(`y42`,sS),n(`y41`,cS),n(`y37`,lS),n(`y40`,uS),n(`y38`,dS),n(`y39`,fS),n(`y31`,pS),n(`y35`,mS),n(`y28`,hS),n(`y18`,gS),n(`y7`,_S),n(`y21`,vS),n(`y17`,yS),n(`y1`,bS),n(`y13`,xS),n(`y5`,SS),n(`y0`,CS),n(`y8`,wS),n(`y15`,TS),n(`y12`,ES),n(`y16`,DS),n(`y14`,OS),n(`y24`,kS),n(`y23`,AS),n(`y26`,jS),n(`y25`,MS),n(`y22`,NS),n(`y32`,PS),n(`y33`,FS),n(`y34`,IS),n(`y11`,LS),n(`y27`,RS),n(`y9`,zS),n(`y10`,BS),n(`y2`,VS),n(`y29`,HS),n(`y20`,US),n(`y19`,WS),n(`y4`,GS),n(`y6`,KS),n(`y30`,qS),n(`y36`,JS);var YS=`_bN _l`,XS=`_bO _bc`,ZS=`_bS _l`,QS=`_bT _l`,$S=I,eC=(e=>`/${e}&`)(F);function tC(e){R(e.a,`M18 8.4C18 6.70261 17.3679 5.07475 16.2426 3.87452C15.1174 2.67428 13.5913 2 12 2C10.4087 2 8.88258 2.67428 7.75736 3.87452C6.63214 5.07475 6 6.70261 6 8.4C6 15.8667 3 18 3 18H21C21 18 18 15.8667 18 8.4Z M13.73 21C13.5542 21.3031 13.3019 21.5547 12.9982 21.7295C12.6946 21.9044 12.3504 21.9965 12 21.9965C11.6496 21.9965 11.3054 21.9044 11.0018 21.7295C10.6982 21.5547 10.4458 21.3031 10.27 21`)}var nC=(e,t)=>L(e.a,t),rC=(e,t)=>P(e.a,t),iC=I,aC=(e=>`/${e}&`)(F);function oC(e){R(e.a,`M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z M19.6224 10.3954L18.5247 7.7448L20 6L18 4L16.2647 5.48295L13.5578 4.36974L12.9353 2H10.981L10.3491 4.40113L7.70441 5.51596L6 4L4 6L5.45337 7.78885L4.3725 10.4463L2 11V13L4.40111 13.6555L5.51575 16.2997L4 18L6 20L7.79116 18.5403L10.397 19.6123L11 22H13L13.6045 19.6132L16.2551 18.5155C16.6969 18.8313 18 20 18 20L20 18L18.5159 16.2494L19.6139 13.598L21.9999 12.9772L22 11L19.6224 10.3954Z`)}var sC=(e,t)=>L(e.a,t),cC=(e,t)=>P(e.a,t);function lC(e){return e?.working?`working`:e?.waiting?`waiting`:e?.agents?`idle`:`off`}function uC(e){return e?.phase===`working`?`working`:e?.phase===`waiting`?`waiting`:e?.alive?`idle`:`off`}function dC(e){if(e.agent!==`shell`)return e.agent;let t=e.state?.command?.trim();return t&&Mn(t)||e.agent}var fC=`_c_ _N`;function pC(e,t=location){if(hC(t))return`http://${t.hostname}:${e}`;let n=document.querySelector(`meta[name="work-port-hosts"]`)?.getAttribute(`content`);return`${t.protocol}//${e}${n===`dash`?`-`:`.`}${t.host}`}var mC=e=>e.hostname===`localhost`||e.hostname===`127.0.0.1`||e.hostname===`[::1]`,hC=e=>e.port!==``||mC(e)||/^\d+\.\d+\.\d+\.\d+$/.test(e.hostname)||e.hostname.endsWith(`.local`);function gC(e,t,n=location){return!t||mC(n)||!hC(n)?null:`Port ${e} listens only on localhost on the host, so it cannot be opened from this device`}var _C=`_hv _u _hu`,vC=`_hw _u _hu`,yC={open:`_hA`,merged:`_hB`,closed:`_hC`},bC=I,xC=(e=>`/${e}&`)(F);function SC(e){R(e.a,`M18 21C19.1046 21 20 20.1046 20 19C20 17.8954 19.1046 17 18 17C16.8954 17 16 17.8954 16 19C16 20.1046 16.8954 21 18 21Z M6 7C7.10457 7 8 6.10457 8 5C8 3.89543 7.10457 3 6 3C4.89543 3 4 3.89543 4 5C4 6.10457 4.89543 7 6 7Z M18 17V7C18 7 18 5 16 5H13 M6 7V17C6 17 6 19 8 19H11 M15.0005 7.50012L12.5005 5.00012L15.0005 2.50012 M8.5 16.5L11 19L8.5 21.5`)}var CC=(e,t)=>L(e.a,t),wC=(e,t)=>P(e.a,t),TC=`<!><!><!>`,EC=(e,t)=>{let n=[`${e.worktree}: ${t.title}`];return t.state===`MERGED`?n.push(`merged`):t.state===`CLOSED`?n.push(`closed`):t.isDraft?n.push(`draft`):n.push(`open`),n.join(` · `)},DC=e=>!e.state||e.state===`OPEN`,OC=h(1,1,e=>{O(e.a,`title`,`Open port ${e._.h}`),b(e.b,e._.h)}),kC=s(`z6`,e=>_(e.a,`click`,function(){window.open(pC(e._.h),`_blank`,`noopener`)})),AC=e=>{OC._(e),S(e.a,[`_hx`,`_hE`]),kC(e)},jC=j(2,e=>O(e.a,`title`,e._._._.x.get(e._.h))),MC=A(29,jC,e=>e._._._),NC=e=>{MC(e),PC._(e),S(e.a,[`_hx`,`_hD`])},PC=h(1,0,e=>{b(e.b,e._.h),jC(e)}),FC=h(4,1,e=>O(e.a,`title`,`Dismiss #${e._.m}`)),IC=s(`z5`,e=>_(e.a,`click`,function(){e._._._._.p(e._.o??e._._.f,e._.m)})),LC=e=>{FC._(e),S(e.a,[`_hx`,`_hy`,`_hz`]),Pt(e.b),_t(e.b,12),Jt(e.b),IC(e)},RC=j(10,e=>S(e.c,[`_hx`,`_hy`,`_hz`,{_s:e._._.h===e.j}])),zC=j(11,e=>O(e.c,`title`,e._._.h===e.j?`Kill?`:`Kill ${e.g} (pid ${e.j})`),2),BC=A(26,e=>{RC(e),zC(e)},e=>e._._),VC=s(`z7`,e=>_(e.c,`click`,function(){e._._.h===e.j?(Ow(e._._,null),e._._.s(e.j)):e._._.k(e.j)})),HC=e=>{BC(e),GC(e),S(e.a,[`_u`,vC]),Pt(e.d),_t(e.d,12),Jt(e.d),VC(e)},UC=p(1,`<span aria-disabled=true>:<!></span>`,` Db%`,NC,`<button type=button>:<!></button>`,` Db%`,AC),WC=j(8,e=>UC(e,+!e._._.x.has(e.h))),GC=A(29,WC,e=>e._._),KC=w(6,e=>{O(e.a,`title`,e.g),zC(e)}),qC=w(7,e=>{WC(e),PC(e),OC(e)}),JC=w(9,e=>{RC(e),zC(e)}),YC=(e,t)=>{KC(e,t[0]?.cmd),qC(e,t[0]?.port),JC(e,t[0]?.pid)},XC=j(2,e=>O(e.a,`href`,`/w/${e._._._._.d}/review?pr=${encodeURIComponent(`${e._._.e}/${e._.m}`)}`),2),ZC=A(25,XC,e=>e._._._._),QC=e=>{ZC(e),$C(e),ew._(e),S(e.a,[`_hx`,`_hy`]),SC(e.b),CC(e.b,12),wC(e.b)},$C=A(7,XC,e=>e._._),ew=h(4,0,e=>{O(e.a,`title`,`Review #${e._.m} changes`),XC(e)}),tw=j(5,e=>b(e.c,e._._.d(e._.c))),nw=A(4,tw,e=>e._._),rw=e=>{nw(e),aw._(e)},iw=j(8,e=>O(e.a,`title`,EC(e._.c,e.h))),aw=i(0,e=>{iw(e),tw(e)}),ow=p(4,(e=>`<a>${e}</a>`)(bC),(e=>` D/${e}&l`)(xC),QC,(e=>`<button type=button>${e}</button>`)($t),(e=>` D/${e}&l`)(bt),LC),sw=j(16,e=>S(e.a,[`_u`,_C,{_v:e.p&&!e.j,_w:e.p&&e.j,[yC.merged]:e.k===`MERGED`,[yC.closed]:e.k===`CLOSED`}]),2),cw=w(15,e=>{S(e.b,[`_hx`,{_hF:!e.p}]),ow(e,+!e.p),sw(e)}),lw=w(7,e=>{uw(e,e.h?.isDraft),dw(e,e.h?.state),fw(e,e.h?.url),pw(e,e.h?.number),hw(e,e.h?.repository?.nameWithOwner),cw(e,DC(e.h)),iw(e)}),uw=w(9,sw),dw=w(10,sw),fw=(e,t)=>O(e.b,`href`,t),pw=w(12,e=>{b(e.d,e.m),ew(e),FC(e)}),mw=(e,t)=>lw(e,t[0]),hw=w(14),gw=m(0,`<span><a target=_blank rel=noopener><!>#<!></a><!></span>`,` D D%c%l%`,rw,mw),_w=(e,t)=>gw(e,[t||[],`number`]),vw=(e,t)=>yw(e,t[0]),yw=w(2,e=>{_w(e,e.c?.prs),bw(e,e.c?.worktree),xw(e,e.c?.full_name),aw(e)}),bw=w(4,k($C)),xw=w(5),Sw=w(3,k(nw)),Cw=m(1,`<!><!><!>`,`b%`,0,vw),ww=h(0,0,e=>{Sw(e,tT(e)),Cw(e,[e._.t,`full_name`])}),Tw=e=>{ww._(e),Dw._(e),S(e.a,`_ht`)},Ew=m(2,(e=>`<span><!><button type=button>${e}</button></span>`)($t),(e=>` D%b D/${e}&m`)(bt),HC,YC),Dw=h(0,0,e=>Ew(e,[e._.u,`port`])),Ow=a(7,k(BC)),kw=(e,t)=>Jw(e,t.timer),Aw=w(15),jw=j(13,e=>Aw(e,nT(e)),2),Mw=p(0,`<div><!><!></div>`,` D%b%`,Tw),Nw=j(22,e=>Mw(e,e.t.some(e=>(e.prs||[]).length)||e.v?0:1)),Pw=w(19,e=>{Nw(e),ww(e)}),Fw=j(14,e=>Pw(e,(e.f||[]).map(t=>({...t,prs:(t.prs||[]).filter(n=>!e.l.has(e.m(t.full_name,n.number)))}))),2),Iw=a(11,e=>{jw(e),Fw(e)}),Lw=w(12,e=>{jw(e),Fw(e)}),Rw=w(18),zw=s(`z8`,e=>{{let t=new Map;for(let n of e.u){let e=gC(n.port,n.local);e&&t.set(n.port,e)}(t.size!==e.x?.size||[...t].some(([t,n])=>e.x.get(t)!==n))&&Gw(e,t)}}),Bw=j(24,zw),Vw=w(20,e=>{Qw(e,e.u?.length),Bw(e),Dw(e)}),Hw=j(17,e=>Vw(e,(e.g||[]).filter(t=>!e.q.has(t.pid)))),Uw=a(16,e=>{Rw(e,iT(e)),Hw(e)}),Ww=k(GC,MC),Gw=a(23,e=>{Bw(e),Ww(e)});function Kw(e){Ow(e,null),kw(e,{timer:0}),Iw(e,new Set),Lw(e,rT),Uw(e,new Set),Gw(e,new Map)}var qw=w(10),Jw=w(9,e=>qw(e,aT(e))),Yw=k(ZC),Xw=w(3,e=>{jw(e),Yw(e)}),Zw=w(5,Fw),Qw=w(21,Nw),$w=w(6,Hw),eT=(e,t)=>{Zw(e,t?.repos),$w(e,t?.ports)},tT=e=>t=>{if(e._.t?.length<2)return``;let n=t.full_name.split(`/`).at(-1);return e._.t.some(e=>e.full_name!==t.full_name&&e.full_name.split(`/`).at(-1)===n)?an(t.full_name):n},nT=e=>(t,n)=>{let r=e.m(t,n);Iw(e,new Set(e.l).add(r)),fetch(`/api/workspaces/${e.d}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,number:n})}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`)}).catch(()=>{let t=new Set(e.l);t.delete(r),Iw(e,t)})};function rT(e,t){return`${e}#${t}`}var iT=e=>t=>{Uw(e,new Set(e.q).add(t)),fetch(`/api/procs/${t}`,{method:`DELETE`}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`)}).catch(()=>{let n=new Set(e.q);n.delete(t),Uw(e,n)})},aT=e=>t=>{clearTimeout(e.j),Ow(e,t),e.j=$n(()=>{Ow(e,null)})};n(`z4`,tT),n(`z2`,nT),n(`z1`,rT),n(`z3`,iT),n(`z0`,aT);var oT=`_dq _l`,sT=`_dv _I`,cT=`_dy _4 _l`,lT=`_dz _7 _l _8`,uT=`_dK _J`,dT=`_dM _I`,fT=`_dm __`,pT=`_dn _I`,mT=I,hT=(e=>`/${e}&`)(F);function gT(e){R(e.a,`M2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H21.4C21.7314 7 22 7.26863 22 7.6V10.4C22 10.7314 21.7314 11 21.4 11H2.6C2.26863 11 2 10.7314 2 10.4V4.6C2 4.26863 2.26863 4 2.6 4Z M22 10L22 14 M2 10V19.4C2 19.7314 2.26863 20 2.6 20H13 M19 21C20.1046 21 21 20.1046 21 19C21 17.8954 20.1046 17 19 17C18.6357 17 18.2942 17.0974 18 17.2676C17.4022 17.6134 17 18.2597 17 19C17 19.7403 17.4022 20.3866 18 20.7324C18.2942 20.9026 18.6357 21 19 21Z M19 22C20.6569 22 22 20.6569 22 19C22 17.3431 20.6569 16 19 16C17.3431 16 16 17.3431 16 19C16 20.6569 17.3431 22 19 22Z`)}var _T=(e,t)=>L(e.a,t),vT=(e,t)=>P(e.a,t),yT=`<!><!><!>`,bT=e=>S(e.a,`_gL`),xT=e=>{S(e.a,`_gI`),S(e.c,`_gJ`)},ST=p(1,`<span aria-hidden=true>·</span>`,` `,bT),CT=(e,t)=>ST(e,+!t),wT=(e,t)=>b(e.d,t),TT=(e,t)=>{S(e.e,[`_gK`,t>=90?`_hp`:t>=70?`_ho`:t>=40?`_hn`:`_hm`]),b(e.f,Nn(t))},ET=(e,t)=>{wT(e,t[0]?.window),TT(e,t[0]?.used_percent),CT(e,t[1])},DT=j(1,e=>S(e.a,[`_gG`,e._.e,{_gH:e._.h!=null}])),OT=h(0,0,DT),kT=e=>{OT._(e),jT._(e),MT._(e),PT._(e)},AT=j(2,e=>O(e.a,`title`,e._.h==null?`Plan usage`:`${e._.i||`provider unreachable`}; last cached numbers`)),jT=h(0,0,e=>{DT(e),AT(e)}),MT=h(0,0,AT),NT=m(0,`<span><!><span> </span><span> </span></span>`,` D%b D l D `,xT,ET),PT=h(0,0,e=>NT(e,[e._.j,`window`])),FT=(e,t)=>{LT(e,t?.windows),RT(e,t?.stale_seconds),zT(e,t?.note)},IT=w(9,e=>{HT(e,e.j.length),PT(e)}),LT=(e,t)=>IT(e,t||[]),RT=w(7,jT),zT=w(8,MT),BT=FT,VT=p(0,`<span></span>`,` `,kT),HT=(e,t)=>VT(e,+!t),UT=w(4,OT),WT=I,GT=(e=>`/${e}&`)(F);function KT(e){R(e.a,`M14.3632 5.65156L15.8431 4.17157C16.6242 3.39052 17.8905 3.39052 18.6716 4.17157L20.0858 5.58579C20.8668 6.36683 20.8668 7.63316 20.0858 8.41421L18.6058 9.8942M14.3632 5.65156L4.74749 15.2672C4.41542 15.5993 4.21079 16.0376 4.16947 16.5054L3.92738 19.2459C3.87261 19.8659 4.39148 20.3848 5.0115 20.33L7.75191 20.0879C8.21972 20.0466 8.65806 19.8419 8.99013 19.5099L18.6058 9.8942M14.3632 5.65156L18.6058 9.8942`)}var qT=(e,t)=>L(e.a,t),JT=(e,t)=>P(e.a,t),YT=`<!><!><!>`,XT=h(8,0,e=>b(e.b,e._.v)),ZT=e=>{XT._(e),S(e.a,`_dF`)},QT=h(4,0,e=>$r(e.a,dC(e._.s))),$T=e=>{QT._(e),Qr(e.a,12),ei(e.a,`_dA`)},eE=e=>S(e.a,[`_G`,`_dP`]),tE=e=>{ri(e.a),ii(e.a,12),ai(e.a,`_dQ`)},nE=A(67,e=>{S(e.c,[`_q`,M,{_s:e._._._.af}]),O(e.c,`title`,e._._._.af?`Delete this workspace?`:`Delete workspace`),b(e.d,e._._._.af?`Delete?`:`Delete`)},e=>e._._._),rE=s(`A4`,e=>{_(e.b,`click`,function(){e._._._.ah(`retry`)}),_(e.c,`click`,function(){e._._._.af?e._._._.ah(`delete`):(gO(e._._._,!0),$n(()=>{gO(e._._._,!1)}))})}),iE=e=>{nE(e),S(e.a,`_dR`),S(e.b,[`_q`,M]),rE(e)},aE=A(63,e=>O(e.a,`href`,`/w/${e._._._._.ab}/review`),e=>e._._._._),oE=e=>{aE(e),S(e.a,cT),SC(e.b),CC(e.b,12),wC(e.b)},sE=A(61,e=>BT(e.a,e._._._._._.a7),e=>e._._._._._),cE=e=>{sE(e),UT(e.a,`_dE`)},lE=A(61,e=>BT(e.a,e._._._.a7),e=>e._._._),uE=e=>{lE(e),UT(e.a,`_dD`)},dE=A(59,e=>de(e,`c`,e._._._._.a0,RO(e)),e=>e._._._._),fE=s(`A7`,e=>{Se(e,`c`),_(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._._._._.a2(e._.c)):t.key===`Escape`&&(t.preventDefault(),lO(e._._._._,null))}),_(e.c,`blur`,function(){e._._._._.a2(e._.c)}),d(e,{onMount:function(){queueMicrotask(()=>{let t=e.c;t?.focus(),t?.select()})}})}),pE=e=>{dE(e),mE._(e),hE._(e),Qr(e.b,12),ei(e.b,`_dN`),S(e.c,[`_Z`,uT]),fE(e)},mE=h(0,0,e=>$r(e.b,dC(e._.c))),hE=h(0,0,e=>S(e.a,[`_A`,De[uC(e._.g)],`_dJ`])),gE=j(11,e=>{S(e.i,[lT,{_s:e._._._._.v===e._.d}]),O(e.i,`title`,e._._._._.v===e._.d?`Close?`:`Close session`)}),_E=A(57,gE,e=>e._._._._),vE=s(`A8`,e=>{_(e.g,`click`,function(){lO(e._._._._,e._.d),dO(e._._._._,e._.h||e._.i)}),_(e.i,`click`,function(){e._._._._.v===e._.d?(iO(e._._._._,null),e._._._._.u?.(e._.d)):e._._._._.y(e._.d)})}),yE=e=>{_E(e),SE(e),CE(e),TE(e),EE._(e),DE._(e),OE._(e),S(e.a,dT),Qr(e.c,12),ei(e.c,`_dN`),S(e.d,`_dH`),S(e.f,`_dI`),S(e.g,cT),KT(e.h),qT(e.h,12),JT(e.h),Pt(e.j),_t(e.j,12),Jt(e.j),vE(e)},bE=p(10,(e=>`<!>${e}<!>`)(yT),(e=>`b/${e}&b`)(`b%c`),cE),xE=j(13,e=>bE(e,e._._._._.a7&&e._.d===e._._._._.a6?0:1),2),SE=A(60,xE,e=>e._._._._),CE=A(61,xE,e=>e._._._._),wE=j(12,e=>O(e.a,`href`,`/w/${e._._._._.ab}?s=${e._.d}`)),TE=A(63,wE,e=>e._._._._),EE=h(0,1,e=>{$r(e.c,dC(e._.c)),b(e.e,e._.c?.title||dC(e._.c))}),DE=h(0,1,e=>{wE(e),gE(e),xE(e)}),OE=h(0,1,e=>S(e.b,[`_A`,De[uC(e._.g)]])),kE=j(4,e=>S(e.a,[`_dx`,{_do:e.d===e._._._.i}])),AE=A(48,kE,e=>e._._._),jE=e=>{AE(e),PE(e)},ME=p(0,(e=>`<span></span>${e}<input aria-label="Session name">`)(Vr),(e=>` b/${e}& b`)(`b%c`),pE,((e,t,n)=>`<a><span></span>${e}<span> </span></a><div><button title="Rename session">${t}</button><button>${n}</button></div><!><!>`)(Vr,WT,$t),((e,t,n)=>` D b/${e}& D m D D/${t}&l D/${n}&m%c`)(`b%c`,GT,bt),yE),NE=j(5,e=>ME(e,e._._._.z===e.d?0:1)),PE=A(58,NE,e=>e._._._),FE=w(3,e=>{kE(e),NE(e),DE(e)}),IE=(e,t)=>LE(e,t[0]),LE=w(2,e=>{FE(e,e.c?.id),RE(e,e.c?.state),zE(e,e.c?.title),BE(e,e.c?.agent),EE(e),mE(e)}),RE=w(6,e=>{OE(e),hE(e)}),zE=w(7),BE=w(8),VE=s(`A5`,e=>_(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._._.q?.(e.e)})),HE=e=>{S(e.a,pT),Qr(e.b,14),ei(e.b),VE(e)},UE=w(4,e=>{$r(e.b,e.e),b(e.c,e.e)}),WE=m(2,(e=>`<button>${e}<!></button>`)(Vr),(e=>` D/${e}&%l`)(`b%c`),HE,(e,t)=>UE(e,t[0])),GE=j(5,e=>WE(e,[e.e?[`shell`,...e._._._._.r||[]]:[],e=>e])),KE=A(54,GE,e=>e._._._._),qE=(e,t)=>{O(e.a,`popovertarget`,t),O(e.c,`id`,t)},JE=a(4,GE),YE=s(`A6`,e=>{_(e.a,`pointerdown`,function(){JE(e,!0)}),_(e.a,`focus`,function(){JE(e,!0)}),_(e.c,`toggle`,function(t,n){if(t.newState===`open`){JE(e,!0);let t=e.a.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-n.offsetWidth-8))}px`}})}),XE=p(1,(e=>`<button title="New session">${e}</button><div popover=auto></div>`)(Vr),(e=>` D/${e}&l b`)(`b%c`),e=>{KE(e),S(e.a,cT),$r(e.b,`shell`),Qr(e.b,12),ei(e.b),S(e.c,fT),qE(e,f(e)),JE(e,!1),YE(e)}),ZE=A(53,e=>XE(e,+!e._._._.q),e=>e._._._),QE=e=>{ZE(e),eD(e),nD(e),rD(e),S(e.a,`_dw`),gT(e.e),_T(e.e,12),vT(e.e)},$E=p(2,(e=>`<a title="Review changes">${e}</a>`)(bC),(e=>` D/${e}&l`)(xC),oE),eD=A(55,e=>$E(e,+!e._._._.s),e=>e._._._),tD=j(5,e=>O(e.d,`href`,e._._._.t?`/w/${e._._._.ab}`:`/w/${e._._._.ab}/manage`)),nD=A(56,e=>{S(e.d,[cT,{_dp:e._._._.t}]),O(e.d,`title`,e._._._.t?`Back to terminal`:`Manage workspace`),O(e.d,`aria-current`,e._._._.t?`page`:void 0),tD(e)},e=>e._._._),rD=A(63,tD,e=>e._._._),iD=j(14,e=>S(e.a,[`_ds`,{_do:e._._.e,_bd:e._._.e,_dt:e._._.o,_dr:e._._.f}]),2),aD=A(44,iD,e=>e._._),oD=s(`A9`,e=>_(e.a,`click`,function(t){t.target?.closest(`button, input, a, [popover]`)||e._._.p()})),sD=e=>{aD(e),dD(e),mD(e),hD(e),gD(e),yD(e),bD(e),xD(e),SD._(e),ED._(e),S(e.b,`_du`),S(e.c,sT),S(e.f,`_dB`),S(e.g,`_dC`),S(e.k,`_dL`),Kw(e.n),oD(e)},cD=p(9,(e=>`<div><!><!><a>${e}</a></div>`)(mT),(e=>` D%b%b D/${e}&m`)(hT),QE),lD=p(8,`<span> </span>`,` D `,ZT),uD=j(22,e=>lD(e,e._._.f&&e.v?0:1)),dD=A(45,e=>{cD(e,+!!e._._.f),iD(e),uD(e)},e=>e._._),fD=m(12,`<div></div>`,` `,jE,IE),pD=(e,t)=>{OD(e,t.length),kD(e,t[0]),fD(e,[t.length>1?t:[],`id`])},mD=A(47,e=>pD(e,e._._.h||[]),e=>e._._),hD=A(49,e=>Xw(e.n,e._._.l),e=>e._._),gD=A(52,iD,e=>e._._),_D=p(11,(e=>`<!>${e}<!>`)(yT),(e=>`b/${e}&b`)(`b%c`),uE),vD=j(17,e=>_D(e,e.q===1&&e._._.a7?0:1)),yD=A(61,vD,e=>e._._),bD=A(63,e=>O(e.c,`href`,`/w/${e._._.ab}`),e=>e._._),xD=A(64,e=>b(e.h,e._._.ac),e=>e._._),SD=h(0,2,e=>eT(e.n,e._.c)),CD=w(21,e=>{uD(e),XT(e)}),wD=j(20,e=>CD(e,e.q===0?e.t:e.q>1?`${e.q} sessions`:``)),TD=w(19,e=>{O(e.d,`title`,e.t),wD(e)}),ED=h(0,2,e=>{S(e.d,[`_A`,De[e._.d],`_dG`]),TD(e,e._.d===`working`?`Working`:e._.d===`waiting`?`Needs input`:e._.d===`idle`?`Idle`:`Not running`)}),DD=p(4,(e=>`<!>${e}<!>`)(Vr),(e=>`b/${e}&b`)(`b%c`),$T),OD=w(16,e=>{DD(e,e.q===1?0:1),wD(e),vD(e)}),kD=w(18,QT),AD=j(10,e=>S(e.a,[`_ds`,`_dO`,{_dt:e._._.o,_dr:e._._.f}])),jD=A(45,AD,e=>e._._),MD=e=>{jD(e),ND(e),PD(e),zD(e),BD(e),VD(e),S(e.b,`_du`),S(e.c,sT),S(e.e,`_dB`),S(e.f,`_dC`),S(e.h,`_dS`)},ND=A(52,AD,e=>e._._),PD=A(64,e=>b(e.g,e._._.ac),e=>e._._),FD=p(3,ti,(e=>`/${e}&`)(ni),tE,`<span></span>`,` `,eE),ID=j(11,e=>{O(e.h,`title`,e._._.ad||e._._.ae),b(e.i,e._._.ad?`Restore failed: ${e._._.ad}`:e._._.ae||`Restoring…`)}),LD=p(9,`<div><button type=button title="Run the restore again">Retry</button><button type=button> </button></div>`,` D b D `,iE),RD=j(12,e=>LD(e,e._._.ad&&!e._._.ag?0:1)),zD=A(65,e=>{O(e.a,`aria-busy`,e._._.ad?`false`:`true`),FD(e,+!e._._.ad),ID(e),RD(e)},e=>e._._),BD=A(66,ID,e=>e._._),VD=A(68,RD,e=>e._._),HD=A(44,e=>S(e.a,[oT,{_do:e._._.e}]),e=>e._._),UD=e=>{HD(e),WD(e),KD(e),qD(e),JD(e),YD._(e)},WD=A(51,e=>b(e.b,e._._.n===void 0?`·`:e._._.n+1),e=>e._._),GD=j(3,e=>O(e.a,`title`,e._._.a9?`${e._._.ac} — restoring`:e._._.ac)),KD=A(62,GD,e=>e._._),qD=A(63,e=>O(e.a,`href`,`/w/${e._._.ab}`),e=>e._._),JD=A(64,GD,e=>e._._),YD=h(0,0,e=>S(e.c,[`_A`,De[e._.d],`_bc`])),XD=p(0,`<a> <span></span></a>`,` D b `,UD,`<section><div><div><!><span><span> </span><span> </span></span></div></div><!></section>`,` D D D%b D D l D o%`,MD,(e=>`<section><div><a><span></span><!><span><span> </span><!></span></a><!></div><div><!><!>${e}</div></section>`)(TC),(e=>` D D D b%b D D l%m%l D%b%b/${e}&m`)(`b%c`),sD),ZD=j(1,e=>XD(e,e._.g?0:e._.a9?1:2)),QD=h(0,0,ZD),$D=e=>{QD._(e),nO._(e),rO._(e)},eO=w(3,e=>{YD(e),ED(e)}),tO=w(2,e=>{eO(e,lC(e.c)),SD(e)}),nO=h(0,0,e=>tO(e,e._.m)),rO=h(0,0,ZD),iO=a(21,k(_E)),aO=(e,t)=>ore(e,t.timer),oO=w(28),sO=j(27,e=>oO(e,zO(e)),2),cO=k(PE),lO=a(25,e=>{sO(e),cO(e)}),uO=k(dE),dO=a(26,e=>{sO(e),uO(e)}),fO=w(33,k(yD,CE,lE,sE)),pO=j(31,e=>fO(e,e.a4?Hn(e.a4?.agent,e.a3):null)),mO=a(29,pO),hO=a(40,k(BD)),gO=a(41,k(nE)),_O=a(42,k(VD)),ire=s(`A12`,e=>d(e,{onMount:function(){let t=new AbortController;return zn(t=>{mO(e,t)},t.signal),{abort:t}},onDestroy:function(){this.abort.abort()}}));function vO(e){iO(e,null),aO(e,{timer:0}),lO(e,null),dO(e,``),mO(e,Bn()),hO(e,``),gO(e,!1),_O(e,!1),ire(e)}var are=w(24),ore=w(23,e=>are(e,BO(e))),yO=w(3,sO),sre=w(30,e=>{ure(e,e.a4?.id),pO(e)}),cre=k(SE),lre=s(`A11`,e=>{if(e.a6){let t=Bn();t&&mO(e,t),Vn().then(t=>{mO(e,t)})}}),ure=w(32,e=>{cre(e),lre(e)}),bO=j(9,e=>sre(e,(()=>{if(!e.e||e.f||e.g)return null;let t=e.h||[],n=t.find(t=>t.id===e.i)??(t.length===1?t[0]:null);return n&&n.agent!==`shell`?n:null})()),4),dre=k(HD,aD),xO=w(4,e=>{bO(e),dre(e)}),fre=k(jD,dD),SO=w(5,e=>{bO(e),fre(e)}),CO=w(6,e=>{bO(e),QD(e)}),pre=k(mD),wO=w(7,e=>{bO(e),pre(e)}),mre=k(AE),TO=w(8,e=>{bO(e),mre(e)}),hre=p(0,`<!><!><!>`,`b%`,$D),gre=(e,t)=>{yre(e,t?.pending),bre(e,t?.id),xre(e,t?.name),Sre(e,t?.pending_error),hre(e,+!t)},_re=s(`A10`,e=>d(e,{pending:!!e.a9,workspaceId:e.l,onMount:function(){let t=new AbortController;return Bt().addEventListener(`workspace.progress`,t=>{let n=t.data;this.pending&&n?.op===`restore:${this.workspaceId}`&&hO(e,n.message||``)},{signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}},1)),EO=j(36,_re),vre=k(KD),yre=w(35,e=>{EO(e),rO(e),vre(e)}),bre=w(37,k(qD,bD,rD,TE,aE)),xre=w(38,k(JD,PD,xD)),Sre=w(39,k(zD)),DO=gre,Cre=w(43),wre=k(hD),OO=w(11,e=>{Cre(e,VO(e)),EO(e),wre(e)}),kO=w(12,nO),AO=w(13,k(WD)),jO=w(14,k(ND,gD)),MO=w(15),NO=w(16,k(ZE)),PO=w(17,k(KE)),FO=w(18,k(eD)),IO=w(19,k(nD)),LO=w(20),RO=e=>t=>{dO(e._._._._,t)},zO=e=>t=>{e.z===t.id&&(lO(e,null),e.d?.(t,e.a0.trim()))},BO=e=>t=>{clearTimeout(e.x),iO(e,t),e.x=$n(()=>{iO(e,null)})},VO=e=>async t=>{_O(e,t===`retry`),gO(e,!1);try{await N(`/api/workspaces/${e.l}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t})})}catch(n){hO(e,`${t===`retry`?`Retry`:`Delete`} failed: ${String(n.message||n)}`)}finally{_O(e,!1)}};n(`A0`,RO),n(`A2`,zO),n(`A1`,BO),n(`A3`,VO);var Tre=`<div><!><!></div>`,Ere=` D%b%l`,HO=h(6,0,e=>b(e.b,e._.o)),Dre=e=>{HO._(e),S(e.a,fC)},UO=h(3,0,e=>$r(e.a,dC(e._.p))),Ore=e=>{UO._(e),Qr(e.a,16),ei(e.a,`_c9`)},WO=A(36,e=>$r(e.a,dC(e._._.w)),e=>e._._),kre=e=>{WO(e),Qr(e.a,16),ei(e.a,`_c0`)},Are=(e,t)=>S(e.c,[`_A`,De[t]]),jre=(e,t)=>{eT(e.i,t),Pre(e,t?.sessions),Are(e,lC(t))},GO=j(9,e=>jre(e,e._._._.g[e._.c])),KO=A(26,GO,e=>e._._._),Mre=e=>{KO(e),qO._(e),JO._(e),S(e.a,`_c6`),S(e.b,`_c7`),S(e.e,`_c8`),kt(e.h),Ee(e.h,14),jt(e.h,`_da`),Kw(e.i)},qO=h(0,1,e=>{O(e.b,`href`,`/w/${e._.c}`),Xw(e.i,e._.c),GO(e)}),JO=h(0,1,e=>b(e.f,e._.f)),Nre=(e,t)=>{Rre(e,t.length),zre(e,t[0])},Pre=(e,t)=>Nre(e,t||[]),Fre=p(6,`<span><!> sessions</span>`,` D%`,Dre),Ire=(e,t)=>Fre(e,+!t),Lre=p(3,(e=>`<!>${e}<!>`)(Vr),(e=>`b/${e}&b`)(`b%c`),Ore),Rre=w(14,e=>{Ire(e,e.o>1),Lre(e,e.o===1?0:1),HO(e)}),zre=w(15,UO),YO=j(1,e=>kO(e.a,e._._._.g[e._.c])),XO=A(26,YO,e=>e._._._),Bre=e=>{XO(e),ZO._(e),QO._(e),vO(e.a),SO(e.a,!0),xO(e.a,!1),MO(e.a,_k),yO(e.a),CO(e.a),wO(e.a),TO(e.a),AO(e.a),jO(e.a),NO(e.a),PO(e.a),FO(e.a),IO(e.a),LO(e.a)},ZO=h(0,0,e=>{OO(e.a,e._.c),YO(e)}),QO=h(0,0,e=>DO(e.a,e._.e)),Vre=p(0,(e=>`<!>${e}<!>`)(YT),(e=>`b/${e}&b`)(`b%c`),Bre,((e,t)=>`<div><a><span></span><!><span> </span><!>${e}</a>${t}</div>`)(Ue,TC),((e,t)=>` D D b%b D l%b/${e}&l/${t}&l`)(Ge,`b%c`),Mre),Hre=w(4,e=>{Wre(e,e.e?.name),Vre(e,e.e?.pending?0:e.e?1:2),QO(e)}),$O=j(3,e=>Hre(e,e._._.l.get(e.c))),ek=A(29,$O,e=>e._._),Ure=ek,Wre=w(5,JO),Gre=w(2,e=>{$O(e),ZO(e),qO(e)}),Kre=m(0,`<!><!><!>`,`b%`,Ure,(e,t)=>Gre(e,t[0])),tk=h(2,0,e=>Kre(e,[e._.j,e=>e])),qre=e=>{tk._(e),S(e.a,`_c5`)},nk=j(8,e=>S(e.a,[`_c3`,{_c2:e.h===e._._._.i}])),rk=A(27,nk,e=>e._._._),Jre=e=>{rk(e),ak(e),Qr(e.c,14),ei(e.c),S(e.d,`_c4`)},ik=j(9,e=>O(e.a,`href`,`/w/${e._._._.o}?s=${e.h}`)),ak=A(30,ik,e=>e._._._),Yre=w(7,e=>{ik(e),nk(e)}),Xre=(e,t)=>S(e.b,[`_A`,De[uC(t)]]),Zre=(e,t)=>{$r(e.c,dC(t)),b(e.e,t.title||dC(t)),Yre(e,t?.id),Xre(e,t?.state)},Qre=m(0,(e=>`<a><span></span>${e}<span> </span></a>`)(Vr),(e=>` D b/${e}& D m`)(`b%c`),Jre,(e,t)=>Zre(e,t[0])),ok=A(34,e=>Qre(e,[e._._.u,`id`]),e=>e._._),$re=e=>{ok(e),S(e.a,`_c1`)},sk=h(1,0,e=>{O(e.b,`href`,`/w/${e._.o}`),Xw(e.j,e._.o)}),eie=s(`K1`,e=>_(e.a,`click`,function(e,t){e.target?.closest(`button, a, input, [popover]`)||t.querySelector(`a[data-open]`)?.click()})),tie=e=>{sk._(e),ck._(e),lk._(e),uk._(e),dk._(e),fk._(e),pk._(e),S(e.a,`_cW`),S(e.b,`_cX`),S(e.e,`_cY`),S(e.g,`_cZ`),Kw(e.j),eie(e)},ck=h(1,0,e=>b(e.f,e._.p)),lk=h(1,0,e=>eT(e.j,e._.q)),uk=h(1,0,e=>S(e.c,[`_A`,De[e._.t]])),nie=p(3,(e=>`<!>${e}<!>`)(Vr),(e=>`b/${e}&b`)(`b%c`),kre),dk=h(1,0,e=>nie(e,e._.v===1?0:1)),rie=p(8,`<div></div>`,` `,$re),fk=h(1,0,e=>rie(e,+!e._.x)),pk=h(1,0,e=>b(e.h,e._.z)),iie=p(1,(e=>`<section aria-current=page><a data-open><span></span><!><span> </span><span> </span></a><!>${e}</section>`)(TC),(e=>` D D b%b D l D m%b/${e}&l`)(`b%c`),tie),aie=w(19,uk),oie=w(16,e=>{mie(e,e.q?.sessions),aie(e,lC(e.q)),lk(e)}),mk=j(13,e=>oie(e,e.m?e.g[e.m?.id]:void 0)),sie=w(12,e=>{lie(e,e.m?.id),uie(e,e.m?.name),iie(e,+!e.m),mk(e)}),cie=k(ak),lie=w(14,e=>{sk(e),cie(e)}),uie=w(15,ck),die=sie,fie=k(ok),pie=w(20,e=>{yie(e,e.u.length),bie(e,e.u[0]),fie(e)}),hk=j(18,e=>pie(e,e.h||e.r||[])),mie=w(17,hk),hie=k(XO,KO),gie=w(6,e=>{mk(e),hie(e)}),_ie=w(25,pk),gk=j(24,e=>_ie(e,e.v===0?`No sessions`:e.x?`${e.v} sessions`:``)),vie=w(23,e=>{gk(e),fk(e)}),yie=w(21,e=>{vie(e,e.v>1),gk(e),dk(e)}),bie=w(22,k(WO)),xie=w(7,hk);function Sie(e){S(e.a,`_cV`)}var Cie=p(2,`<div></div>`,` `,qre),wie=(e,t)=>Cie(e,+!t),Tie=w(8,k(rk)),Eie=w(9,e=>{wie(e,e.j?.length),tk(e)}),Die=w(11,k(ek));function _k(){}n(`K0`,_k);var vk=I,yk=(e=>`/${e}&`)(F);function bk(e){R(e.a,`M18 6H20M22 6H20M20 6V4M20 6V8 M21.4 20H2.6C2.26863 20 2 19.7314 2 19.4V11H21.4C21.7314 11 22 11.2686 22 11.6V19.4C22 19.7314 21.7314 20 21.4 20Z M2 11V4.6C2 4.26863 2.26863 4 2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H14`)}var xk=(e,t)=>L(e.a,t),Sk=(e,t)=>P(e.a,t),Oie=I,kie=(e=>`/${e}&`)(F);function Aie(e){R(e.a,`M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z M7.25 10L5.5 12L7.25 14 M9.5 21V3`)}var jie=(e,t)=>L(e.a,t),Mie=(e,t)=>P(e.a,t);function Nie(e,t){return e.filter(e=>t.has(e)).sort((e,n)=>t.get(e).name.localeCompare(t.get(n).name))}var Pie=e=>S(e.a,[`_A`,XS]),Fie=e=>{Tt(e.a),Et(e.a),Ft(e.a)},Iie=e=>{Aie(e.a),jie(e.a),Mie(e.a)},Lie=e=>S(e.a,[`_A`,XS]),Ck=A(71,e=>{S(e.a,[QS,{_bM:e._._.ac}]),O(e.a,`title`,e._._.ac?`Notifying when an agent needs input. Turn off`:`Notify when an agent needs input`)},e=>e._._),Rie=s(`B14`,e=>_(e.a,`click`,function(){e._._.ag()})),zie=e=>{Ck(e),tC(e.b),nC(e.b),rC(e.b),Rie(e)},wk=A(71,e=>{S(e.a,[QS,`_bX`,{_bM:e._._.ac}]),O(e.a,`title`,e._._.ac?`Notifying when an agent needs input. Turn off`:`Notify when an agent needs input`)},e=>e._._),Bie=s(`B11`,e=>_(e.a,`click`,function(){e._._.ag()})),Vie=e=>{wk(e),tC(e.b),nC(e.b,16),rC(e.b),Bie(e)},Tk=j(2,e=>O(e.a,`href`,e._.a9===`new`?e._.as:`/new`)),Ek=h(5,0,e=>{O(e.a,`title`,e._.a9===`new`?`Back to workspace`:`New workspace`),O(e.a,`aria-current`,e._.a9===`new`?`page`:void 0),Tk(e)}),Hie=e=>{Ek._(e),Dk._(e),S(e.a,[`_q`,`_r`,et,`_bY`]),bk(e.b),xk(e.b,16),Sk(e.b)},Dk=h(5,0,Tk),Uie=p(5,`<span title="Machine setup incomplete"></span>`,` `,Pie),Ok=h(5,1,e=>Uie(e,e._.v===!1?0:1)),Wie=s(`B15`,e=>_(e.a,`click`,function(){ij(e._,!e._.ab),Ze(e._.ab)})),Gie=e=>{Ok._(e),Ak._(e),jk._(e),Mk._(e),Nk._(e),S(e.a,ZS),S(e.b,[`_z`,`_b6`]),oC(e.e),sC(e.e),cC(e.e),bk(e.h),xk(e.h,16),Sk(e.h),Wie(e)},kk=j(8,e=>{O(e.d,`href`,e._.a9===`settings`?e._.as:`/settings`),O(e.g,`href`,e._.a9===`new`?e._.as:`/new`)}),Ak=h(5,1,e=>{S(e.d,[YS,{_bM:e._.a9===`settings`}]),O(e.d,`title`,e._.a9===`settings`?`Back to workspace`:`Settings`),O(e.d,`aria-current`,e._.a9===`settings`?`page`:void 0),S(e.g,[YS,{_bM:e._.a9===`new`}]),O(e.g,`title`,e._.a9===`new`?`Back to workspace`:`New workspace`),O(e.g,`aria-current`,e._.a9===`new`?`page`:void 0),kk(e)}),Kie=p(0,Oie,(e=>`/${e}&`)(kie),Iie,dt,(e=>`/${e}&`)(see),Fie),jk=h(5,1,e=>{O(e.a,`title`,e._.ab?`Collapse sidebar`:`Expand sidebar`),Kie(e,+!e._.ab)}),qie=p(2,(e=>`<button>${e}</button>`)($S),(e=>` D/${e}&l`)(eC),zie),Mk=h(5,1,e=>qie(e,+!e._.ae)),Nk=h(5,1,kk),Pk=j(9,e=>wO(e.b,e.d===e._._.a6&&e._._.w?e._._.w:e._._.al[e.d]?.sessions||[]),3),Fk=A(59,Pk,e=>e._._),Jie=s(`B13`,e=>{_(e.a,`mouseenter`,function(){e._.i()}),_(e.a,`mouseleave`,function(){e._.j()})}),Yie=e=>{Fk(e),Ik(e),Rk(e),Bk(e),Vk(e),Hk(e),Xie(e),Kk(e),qk(e),Jk(e),Xk(e),Qk(e),$k._(e),tA._(e),nA._(e),S(e.a,[`__`,`_b7`]),vO(e.b),jO(e.b,!0),SO(e.b),CO(e.b),AO(e.b),Jie(e)},Ik=A(60,e=>PO(e.b,e._._.y),e=>e._._),Lk=j(4,e=>NO(e.b,oj(e))),Rk=A(61,Lk,e=>e._._),zk=j(11,e=>FO(e.b,sj(e)),4),Bk=A(62,zk,e=>e._._),Vk=A(63,zk,e=>e._._),Hk=A(64,e=>yO(e.b,e._._.a2),e=>e._._),Xie=A(65,e=>LO(e.b,e._._.a3),e=>e._._),Uk=j(5,e=>xO(e.b,e.d===e._._.a6)),Wk=j(8,e=>IO(e.b,e._._.a9===`manage`&&e.d===e._._.a6),2),Gk=j(10,e=>TO(e.b,e.d===e._._.a6&&e._._.a9===`term`?e._._.a7:null),3),Kk=A(67,e=>{MO(e.b,cj(e)),Uk(e),Wk(e),zk(e),Pk(e),Gk(e)},e=>e._._),qk=A(68,Gk,e=>e._._),Jk=A(69,e=>{Wk(e),zk(e),Gk(e)},e=>e._._),Yk=j(6,e=>DO(e.b,e._._.aj.get(e.d))),Xk=A(74,Yk,e=>e._._),Zk=j(7,e=>kO(e.b,e._._.al[e.d])),Qk=A(75,e=>{Zk(e),Pk(e)},e=>e._._),Zie=w(3,e=>{OO(e.b,e.d),Yk(e),Zk(e),Uk(e),Wk(e),Lk(e),zk(e),Pk(e),Gk(e)}),$k=h(1,0,e=>Zie(e,e._.d)),eA=j(2,e=>ge(e.a,`top:${e._.e}px;left:${e._.f}px`)),tA=h(1,0,eA),nA=h(1,0,eA),rA=j(4,e=>xO(e.b,e.d===e._._.a6)),iA=A(67,e=>{MO(e.b,lj(e)),rA(e)},e=>e._._),Qie=s(`B12`,e=>{_(e.a,`mouseenter`,function(t,n){e._.i();let r=n.getBoundingClientRect();fA(e._,{id:e.d,top:r.top,left:r.right+8})}),_(e.a,`mouseleave`,function(){e._.j()})}),$ie=e=>{iA(e),oA(e),cA(e),uA(e),vO(e.b),CO(e.b,!0),yO(e.b),SO(e.b),wO(e.b),TO(e.b),jO(e.b),NO(e.b),PO(e.b),FO(e.b),IO(e.b),LO(e.b),Qie(e)},aA=j(5,e=>DO(e.b,e._._.aj.get(e.d))),oA=A(74,aA,e=>e._._),sA=j(6,e=>kO(e.b,e._._.al[e.d])),cA=A(75,sA,e=>e._._),lA=j(7,e=>AO(e.b,e._._.ao.get(e.d))),uA=A(77,lA,e=>e._._),eae=w(3,e=>{OO(e.b,e.d),lA(e),aA(e),sA(e),rA(e)}),tae=m(0,(e=>`<span>${e}</span>`)(YT),(e=>` D/${e}&l`)(`b%c`),$ie,(e,t)=>eae(e,t[0])),dA=h(4,0,e=>tae(e,[e._.am,e=>e])),nae=p(1,(e=>`<div>${e}</div>`)(YT),(e=>` D/${e}&l`)(`b%c`),Yie),fA=a(2,e=>{aae(e,e.c?.id),oae(e,e.c?.top),sae(e,e.c?.left),nae(e,+!e.c)}),rae=(e,t)=>uae(e,t.timer),iae=e=>{dA._(e),S(e.a,`_b4`),fA(e,null),rae(e,{timer:0})},aae=w(3,$k),oae=w(4,tA),sae=w(5,nA),cae=w(8),lae=w(9),uae=w(7,e=>{cae(e,uj(e)),lae(e,dj(e))}),pA=j(8,e=>wO(e.a,e.c===e._._.a6&&e._._.w?e._._.w:e._._.al[e.c]?.sessions||[]),3),mA=A(59,pA,e=>e._._),dae=e=>{mA(e),hA(e),_A(e),yA(e),bA(e),xA(e),fae(e),TA(e),EA(e),DA(e),OA(e),AA(e),MA(e),vO(e.a),SO(e.a,!1),CO(e.a),AO(e.a),jO(e.a)},hA=A(60,e=>PO(e.a,e._._.y),e=>e._._),gA=j(6,e=>NO(e.a,fj(e)),2),_A=A(61,gA,e=>e._._),vA=j(10,e=>FO(e.a,pj(e)),4),yA=A(62,vA,e=>e._._),bA=A(63,vA,e=>e._._),xA=A(64,e=>yO(e.a,e._._.a2),e=>e._._),fae=A(65,e=>LO(e.a,e._._.a3),e=>e._._),SA=j(3,e=>xO(e.a,e.c===e._._.a6)),CA=j(7,e=>IO(e.a,e._._.a9===`manage`&&e.c===e._._.a6),2),wA=j(9,e=>TO(e.a,e.c===e._._.a6&&e._._.a9===`term`?e._._.a7:null),3),TA=A(67,e=>{MO(e.a,mj(e)),SA(e),CA(e),vA(e),pA(e),wA(e)},e=>e._._),EA=A(68,wA,e=>e._._),DA=A(69,e=>{CA(e),vA(e),wA(e)},e=>e._._),OA=A(73,gA,e=>e._._),kA=j(4,e=>DO(e.a,e._._.aj.get(e.c))),AA=A(74,kA,e=>e._._),jA=j(5,e=>kO(e.a,e._._.al[e.c])),MA=A(75,e=>{jA(e),pA(e)},e=>e._._),pae=w(2,e=>{OO(e.a,e.c),kA(e),jA(e),SA(e),CA(e),gA(e),vA(e),pA(e),wA(e)}),mae=m(0,(e=>`<!>${e}<!>`)(YT),(e=>`b/${e}&b`)(`b%c`),dae,(e,t)=>pae(e,t[0])),NA=h(3,1,e=>mae(e,[e._.am,e=>e])),hae=e=>{NA._(e),S(e.a,`_b3`)},PA=h(3,0,e=>xie(e.a,e._.w)),gae=e=>{PA._(e),FA._(e),IA._(e),LA._(e),RA._(e),zA._(e),Sie(e.a)},FA=h(3,0,e=>die(e.a,e._.a4)),IA=h(3,0,e=>Tie(e.a,e._.a7)),LA=h(3,0,e=>Die(e.a,e._.aj)),RA=h(3,0,e=>gie(e.a,e._.al)),zA=h(3,0,e=>Eie(e.a,e._.au)),BA=h(2,0,e=>b(e.d,e._.u)),_ae=e=>{BA._(e),VA._(e),S(e.a,`_bZ`),S(e.b,`_b0`),S(e.c,`_b1`)},VA=h(2,0,e=>O(e.b,`src`,e._.at)),HA=A(57,e=>b(e.d,e._._.u),e=>e._._),vae=e=>{HA(e),UA(e),S(e.a,`_bZ`),S(e.b,`_b0`),S(e.c,`_b1`)},UA=A(79,e=>O(e.b,`src`,e._._.at),e=>e._._),yae=p(2,`<div title="This work server (Settings → Appearance)"><img alt aria-hidden=true><span> </span></div>`,` D b D `,vae),WA=h(1,0,e=>yae(e,+!e._.u)),bae=e=>{WA._(e),GA._(e),qA._(e),JA._(e),YA._(e),S(e.a,`_bU`),S(e.b,`_b2`),S(e.d,`_bV`),S(e.e,`_bW`),oC(e.h),sC(e.h,16),cC(e.h)},xae=p(8,`<span title="Machine setup incomplete"></span>`,` `,Lie),GA=h(1,0,e=>xae(e,e._.v===!1?0:1)),KA=j(9,e=>O(e.g,`href`,e._.a9===`settings`?e._.as:`/settings`)),qA=h(1,0,e=>{S(e.g,[YS,`_bX`,{_bM:e._.a9===`settings`}]),O(e.g,`title`,e._.a9===`settings`?`Back to workspace`:`Settings`),O(e.g,`aria-current`,e._.a9===`settings`?`page`:void 0),KA(e)}),Sae=p(5,(e=>`<button>${e}</button>`)($S),(e=>` D/${e}&l`)(eC),Vie),JA=h(1,0,e=>Sae(e,+!e._.ae)),YA=h(1,0,KA),Cae=w(54,e=>{YA(e),Nk(e),Dk(e)}),wae=w(56,zA),XA=j(49,e=>wae(e,e.am.filter(t=>t!==e.a6))),Tae=w(48,e=>{XA(e),NA(e),dA(e)}),ZA=j(46,e=>Tae(e,Nie(e.ah,e.aj))),Eae=w(43,ZA),Dae=k(AA,oA,Xk),Oae=w(45,e=>{ZA(e),LA(e),Dae(e)}),kae=w(50,k(uA)),Aae=(e,t)=>{Oae(e,new Map(t.map(e=>[e.id,e]))),kae(e,new Map(Jn(t).map((e,t)=>[e.id,t])))},QA=j(31,e=>{Eae(e,e.r?.length?e.r.filter(e=>e.status===`active`).map(e=>e.id):e.a4?[e.a4?.id]:[]),Aae(e,e.r||(e.a4?[e.a4]:[]))}),jae=w(30,e=>{Nae(e,e.a4?.id),Cae(e,e.a4?`/w/${e.a4?.id}`:`/new`),QA(e),FA(e)}),Mae=k(TA,iA,Kk),Nae=w(32,e=>{XA(e),Mae(e)}),Pae=(e,t)=>jae(e,t||null),Fae=k(EA,qk),Iae=c(33,e=>{IA(e),Fae(e)}),$A=j(11,e=>Iae(e,e.j,e.k)),Lae=w(9,$A),Rae=w(10,$A),zae=w(41,k(OA)),Bae=p(1,(e=>`<header><div><!><h1>Workspaces</h1></div><div><!><a>${e}<!></a></div></header>`)(iC),(e=>` D D%b l D%b D/${e}&%n`)(aC),bae),Vae=p(5,(e=>`<a>${e} New workspace</a>`)(vk),(e=>` D/${e}&l`)(yk),Hie,((e,t)=>`<button></button><div></div><!><a>${e}<!></a><a>${t}</a>`)(iC,vk),((e,t)=>` b b%b D/${e}&%l D/${t}&l`)(aC,yk),Gie),Hae=p(3,Tre,(e=>`/${e}&`)(Ere),gae,`<div></div>`,` `,hae),ej=j(53,e=>{S(e.a,[`_bR`,{_bP:!e.ab,_bQ:e.ap}]),Hae(e,e.ap?0:e.ab?1:2)}),Uae=p(2,`<div title="This work server (Settings → Appearance)"><img alt aria-hidden=true><span> </span></div>`,` D b D `,_ae),tj=j(52,e=>Uae(e,!e.ap&&e.u?0:1)),Wae=w(51,e=>{Bae(e,+!e.ap),Vae(e,+!e.ap),ej(e),tj(e)}),Gae=k(DA,Jk),nj=c(35,e=>{O(e.a,`hidden`,e.a9===`diff`),zae(e,hj(e)),Wae(e,e.a9===`nav`),qA(e),Gae(e),Ak(e),Ek(e)}),rj=j(14,e=>nj(e,e.m,e.n)),Kae=w(12,rj),qae=w(13,rj),Jae=p(4,`<div></div><!><!>`,` b%`,iae),ij=a(37,e=>{Jae(e,+!!e.ab),ej(e),jk(e)}),Yae=w(42),Xae=j(39,e=>Yae(e,gj(e))),Zae=k(wk,Ck),aj=a(38,e=>{Xae(e),Zae(e)}),Qae=s(`B17`,e=>d(e,{onMount:function(){$ae(e,Wn()),e.ae&&Gn().then(t=>{aj(e,!!t)})}})),$ae=a(40,e=>{JA(e),Mk(e),Qae(e)});s(`B16`,e=>{e.q&&ij(e,Xt())});var eoe=w(17,QA),toe=k(MA,cA,Qk),noe=w(47,e=>{RA(e),toe(e)}),roe=(e,t)=>noe(e,t||{}),ioe=k(UA),aoe=w(55,e=>{ioe(e),VA(e)}),ooe=(e,t)=>aoe(e,`/api/instance/icon${t?`?v=${t.slice(1)}`:``}`),soe=k(HA),coe=w(20,e=>{tj(e),WA(e),soe(e),BA(e)}),loe=w(21,e=>{GA(e),Ok(e)}),uoe=k(mA,Fk),doe=w(22,e=>{PA(e),uoe(e)}),foe=w(24,k(hA,Ik)),poe=w(25,k(_A,Rk)),moe=w(26,k(yA,Bk)),hoe=w(27,k(bA,Vk)),goe=w(28,k(xA,Hk)),oj=e=>function(t){fA(e._,null),e._._.z(e.d,t)},sj=e=>function(){fA(e._,null),e.d===e._._.a6?e._._.a9===`diff`?nj(e._._,`term`):e._._.a0?.():e._._.a1?.(e.d)},cj=e=>function(){fA(e._,null),e.d===e._._.a6?(e._._.a9===`nav`||e._._.a9===`manage`||e._._.a9===`settings`||e._._.a9===`new`)&&nj(e._._,`term`):e._._.x?.(e.d)},lj=e=>function(){e.d===e._._.a6?(e._._.a9===`nav`||e._._.a9===`manage`||e._._.a9===`settings`||e._._.a9===`new`)&&nj(e._._,`term`):e._._.x?.(e.d)},uj=e=>()=>clearTimeout(e.h),dj=e=>()=>{clearTimeout(e.h),e.h=setTimeout(()=>{fA(e,null)},150)},fj=e=>function(t){e._._.af(),e._._.z(e.c,t)},pj=e=>function(){e.c===e._._.a6?e._._.a9===`diff`?nj(e._._,`term`):e._._.a0?.():e._._.a1?.(e.c)},mj=e=>function(){e.c===e._._.a6?(e._._.a9===`nav`||e._._.a9===`manage`||e._._.a9===`settings`||e._._.a9===`new`)&&nj(e._._,`term`):(e._._.af(),e._._.x?.(e.c))},hj=e=>()=>{e.a9===`nav`&&nj(e,`term`)},gj=e=>async()=>{try{e.ac?(await fee(),aj(e,!1)):(aj(e,await dee()),e.ac||e.p?.(`Notifications blocked. Allow them for this site in browser or system settings.`))}catch(t){aj(e,!1),e.p?.(`Notifications failed: ${String(t.message||t)}`)}};n(`B9`,oj),n(`B10`,sj),n(`B8`,cj),n(`B7`,lj),n(`B5`,uj),n(`B6`,dj),n(`B3`,fj),n(`B4`,pj),n(`B2`,mj),n(`B0`,hj),n(`B1`,gj);var _oe=(e,t,n)=>{for(;n;){if(n.O?.i)return(n.J||=[]).push(e,t);n=n.N}};e(e=>(t,n=se.has(t))=>{if(n||l.has(t)){let e=0,r,i,a;for(;e<t.length;)r=t[e++],i=t[e++],(a=i.F)?.H!==0&&!(n&&_oe(r,i,a))&&r(i)}else e(t)},e=>t=>{try{let n=t.b.F;for(;n;){if(n.W)return t.f=1,n.W.push(t);n=n.N}t.f=0,e(t)}catch(e){ce(t.b,e)}});var _j=/^[\w./+@-]+$/,voe=/^(?:[\w-]+(?:\.[\w-]+)+\/)?[\w.-]+\/[\w.-]+$/,yoe=/^(?!\.{1,2}$)[\w.-]+$/;function boe(e){let t=``,n,r;if(typeof e==`string`){let n=e.lastIndexOf(`@`);t=n>0?e.slice(0,n):e,r=n>0?e.slice(n+1):void 0}else if(e&&typeof e==`object`){let i=e;t=String(i.repo??i.full_name??i.fullName??``),n=typeof i.dir==`string`?i.dir:void 0,typeof i.worktree==`string`&&(n=i.worktree),r=typeof i.base==`string`?i.base:void 0,typeof i.base_branch==`string`&&(r=i.base_branch)}else return null;if(t=t.trim(),!voe.test(t))return null;let i=t.split(`/`);return i.length===3&&(t=[i[0].toLowerCase(),i[1],i[2]].join(`/`)),r!==void 0&&!_j.test(r)||n!==void 0&&!yoe.test(n)?null:{full_name:t,worktree:n||t.split(`/`).at(-1),base_branch:r||``,default_branch:e&&typeof e==`object`&&typeof e.default_branch==`string`?e.default_branch:r||``}}function xoe(e){return JSON.stringify({name:e.name,branch:e.branch,repos:e.repos},null,1)+`
3
- `}function vj(e){let t=String(e??``).trim();if(!t)throw Error(`paste a workspace invite`);let n;try{n=JSON.parse(t)}catch{throw Error(`not an invite (expected JSON)`)}if(!n||typeof n!=`object`)throw Error(`not an invite`);if(Array.isArray(n.workspaces)){if(n.workspaces.length!==1)throw Error(n.workspaces.length?`this is a whole backup — restore it from Settings, or paste one workspace entry`:`this backup holds no workspaces`);if(n=n.workspaces[0],!n||typeof n!=`object`)throw Error(`not an invite`)}let r=String(n.branch??``).trim();if(!r)throw Error(`the invite has no branch`);if(!_j.test(r))throw Error(`not a branch name: ${r}`);let i=Array.isArray(n.repos)?n.repos:[],a=[];for(let e of i){let t=boe(e);if(!t)throw Error(`not a repo: ${JSON.stringify(e)}`);a.includes(t.full_name)||a.push(t.full_name)}if(!a.length)throw Error(`the invite lists no repos`);return{name:String(n.name??``).trim()||r,branch:r,repos:a}}var Soe=`_ez _dZ`,Coe=`_eC _y`,woe=`_eI _eD`,Toe=`_eK _eE`,Eoe=`_eN _eF`,Doe=`_eO _eG`,yj=I,bj=(e=>`/${e}&`)(F);function xj(e){R(e.a,`M8.5 4H6C4.89543 4 4 4.89543 4 6V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V6C20 4.89543 19.1046 4 18 4H15.5 M8 6.4V4.5C8 4.22386 8.22386 4 8.5 4C8.77614 4 9.00422 3.77604 9.05152 3.50398C9.19968 2.65171 9.77399 1 12 1C14.226 1 14.8003 2.65171 14.9485 3.50398C14.9958 3.77604 15.2239 4 15.5 4C15.7761 4 16 4.22386 16 4.5V6.4C16 6.73137 15.7314 7 15.4 7H8.6C8.26863 7 8 6.73137 8 6.4Z`)}var Sj=(e,t)=>L(e.a,t),Cj=(e,t)=>P(e.a,t),wj=`_gV _I`,Tj=`_gX _4 _l`,Ej=`_g5 _0 _Z`,Dj=I,Oj=(e=>`/${e}&`)(F);function kj(e){R(e.a,`M18 8C19.1046 8 20 7.10457 20 6C20 4.89543 19.1046 4 18 4C16.8954 4 16 4.89543 16 6C16 7.10457 16.8954 8 18 8Z M6 20C7.10457 20 8 19.1046 8 18C8 16.8954 7.10457 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20Z M6 16V3 M8 18H9C12.5 18 18 15.9 18 9.5V8`)}var Aj=(e,t)=>L(e.a,t),jj=(e,t)=>P(e.a,t),Mj=`<div></div>`,Nj=e=>S(e.a,`_cq`),Pj=e=>S(e.a,`_N`),Fj=j(2,e=>b(e.b,e._.m-e._.o)),Ij=h(6,1,Fj),Lj=e=>{Ij._(e),Rj._(e),S(e.a,`_cq`)},Rj=h(6,1,Fj),zj=e=>{S(e.a,`_cq`),S(e.b,`_G`)},Bj=A(18,e=>de(e,`a`,e._._.k,PM(e)),e=>e._._),Vj=s(`d1`,e=>Se(e,`a`)),Hj=e=>{Bj(e),S(e.a,Ej),Vj(e)},Uj=p(3,`<span>default</span>`,` `,Pj),Wj=j(6,e=>Uj(e,e.f===e._._.j?0:1)),Gj=A(17,Wj,e=>e._._),Kj=s(`d2`,e=>_(e.a,`click`,function(){e._._.g(e.f,e.f===e._._.j)})),qj=e=>{Gj(e),Jj._(e),S(e.a,[wj,`_g6`]),Kj(e)},Jj=ue(5,16,5,e=>S(e.b,[`_g2`,`_y`,{_g3:e.f===e._.q}])),Yj=w(5,e=>{b(e.c,e.f),Wj(e)}),Xj=(e,t)=>Yj(e,t[0]),Zj=w(16,Jj),Qj=j(7,e=>Zj(e,e._.f??e._.j)),$j=h(0,1,Qj),eM=s(`d3`,e=>_(e.c,`click`,function(){OM(e._,!0),DM(e._,+e._.l+1)})),tM=e=>{$j._(e),cM._(e),uM._(e),dM._(e),fM._(e),pM._(e),S(e.a,`_g4`),S(e.c,Ne),rt(e.d),Oe(e.d,14),S(e.e,`_g0`),eM(e)},nM=m(5,`<li><button><span> </span><!></button></li>`,`D D D l%`,qj,Xj),rM=(e,t)=>{_M(e,t?.length),nM(e,[t,e=>e])},iM=(e,t)=>{gM(e,t?.length),rM(e,t.slice(0,12))},aM=j(10,e=>iM(e,vt(e._.k,e.j))),oM=w(9,aM),sM=j(8,e=>oM(e,e._.j&&e._.h.includes(e._.j)?[e._.j,...e._.h.filter(t=>t!==e._.j)]:e._.h)),cM=h(0,1,sM),lM=p(1,`<input placeholder="Filter branches…" aria-label="Filter branches" autofocus>`,` `,Hj),uM=h(0,1,e=>lM(e,e._.i>8?0:1)),dM=h(0,1,e=>{sM(e),Qj(e)}),fM=h(0,1,aM),pM=h(0,1,e=>{O(e.c,`disabled`,e._.n),on(e.d,e._.n&&`_F`)}),mM=p(6,`<li><p>No branches match.</p></li>`,`D `,Nj,`<li><p><!> more — keep typing to narrow.</p></li>`,`D D%`,Lj),hM=j(15,e=>mM(e,e.o?e.m>e.o?1:2:0)),gM=w(12,e=>{hM(e),Ij(e)}),_M=w(14,e=>{hM(e),Rj(e)}),vM=p(0,`<p><span></span> Loading branches…</p>`,` D `,zj,(e=>`<div><!><button title="Refresh branches" aria-label="Refresh branches">${e}</button></div><ul><!><!></ul>`)(Re),(e=>` D%b D/${e}&m D%b%l`)(nt),tM),yM=a(7,e=>{bM(e,e.h?.length),vM(e,+!!e.h),cM(e)}),bM=w(8,uM),xM=k(Gj),SM=a(9,e=>{dM(e),xM(e)}),CM=k(Bj),wM=a(10,e=>{fM(e),CM(e)}),TM=s(`d4`,e=>{{let t=e.l>0;N(`/api/repos/branches?repo=${encodeURIComponent(e.d)}${t?`&refresh`:``}`,{signal:pe(e,0)}).then(t=>{yM(e,t.branches),SM(e,t.defaultBranch),OM(e,!1)},t=>{pe(e,0).aborted||(OM(e,!1),e.e?.(String(t.message||t)))})}}),EM=j(12,e=>{ve(e,0),TM(e)},2),DM=a(11,EM),OM=a(13,pM);function kM(e){S(e.a,`_gZ`),yM(e,null),SM(e,null),wM(e,``),DM(e,0),OM(e,!1)}var AM=w(3,EM),jM=w(4,EM),MM=w(5,$j),NM=w(6),PM=e=>t=>{wM(e._._,t)};n(`d0`,PM);var FM=(e=>`/${e}&`)(ca),IM=sa,LM=(e=>`<div><!><div><label>${e}<input placeholder="Add a repo…" aria-label="Add a repo"></label><!></div><!><div><!><!><!></div></div>`)(Ae),RM=(e=>` D%b D D/${e}& l%l%b D%b%b%m`)(Ke),zM=null,BM=e=>{ia(e.a),aa(e.a,12),oa(e.a)},VM=e=>S(e.a,`_cq`),HM=e=>{S(e.a,`_gQ`),ZM._(e.b,e._)},UM=e=>{S(e.a,`_gQ`),ZM._(e.b,e._)},WM=j(1,e=>O(e.a,`title`,e._._.al?`Will fork to your account; click to clone as-is instead`:`Fork ${e._._.ae} to your account and clone the fork`)),GM=A(70,WM,e=>e._._),KM=s(`w15`,e=>_(e.a,`click`,function(){e._._.aj===e._._.ae?hP(e._._,!e._._.al):e._._.am(e._._.ae,void 0,!0)})),qM=e=>{GM(e),YM(e),KM(e)},JM=p(0,(e=>`${e} fork`)(na),(e=>`/${e}&b`)(ra),BM,`Fork`),YM=A(73,e=>{S(e.a,[`_gY`,{_gW:e._._.al}]),O(e.a,`aria-pressed`,e._._.al?`true`:`false`),JM(e,+!e._._.al),WM(e)},e=>e._._),XM=A(68,e=>Ga(e.a,WP(e))),ZM=re(e=>{XM(e),QM(e),Ha(e.a),Ya(e.a,GP(e)),ka(e.a),Ua(e.a),Wa(e.a),Ka(e.a)}),QM=A(74,e=>Ja(e.a,e._.au)),$M=h(11,1,e=>b(e.b,e._.a6)),eN=e=>{$M._(e),S(e.a,`_cq`)},tN=A(63,e=>jM(e.a,KP(e)),e=>e._._._),nN=e=>{tN(e),rN._(e),kM(e.a),NM(e.a,qP(e)),MM(e.a)},rN=h(7,0,e=>AM(e.a,e._.k)),iN=j(13,e=>S(e.a,[`_gU`,{_gT:e.m===e._._.a7}])),aN=A(67,iN,e=>e._._),oN=s(`w17`,e=>{_(e.a,`mouseenter`,function(){dP(e._._,e.m)}),_(e.b,`click`,function(){e._._.am(e.k)}),_(e.f,`click`,function(){e._._.ao(e.k)})}),sN=e=>{aN(e),uN(e),S(e.b,wj),Yi(e.c),Xi(e.c,12),Zi(e.c,`_g1`),S(e.d,`_g2`),kj(e.g),Aj(e.g,12),jj(e.g),oN(e)},cN=p(7,Mj,(e=>`/${e}&`)(` b`),nN),lN=j(11,e=>{S(e.f,[Tj,{_gW:e._._.aj===e.k}]),cN(e,e._._.aj===e.k?0:1)}),uN=A(72,lN,e=>e._._),dN=w(12,iN),fN=w(10,e=>{b(e.e,an(e.k)),O(e.f,`title`,`Pick a base branch for ${e.k}`),O(e.f,`aria-label`,`Pick a base branch for ${e.k}`),lN(e),rN(e)}),pN=m(0,((e,t)=>`<li><div><button>${e}<span> </span></button><button>${t}</button></div><!></li>`)(qi,Dj),((e,t)=>`D D D/${e}& D m D/${t}&m%l`)(Ji,Oj),sN,(e,t)=>{fN(e,t[0]?.nameWithOwner),dN(e,t[1])}),mN=h(11,0,e=>pN(e,[e._.ac,`nameWithOwner`])),hN=e=>{mN._(e),S(e.a,`_gS`)},gN=A(63,e=>jM(e.a,JP(e)),e=>e._._),_N=e=>{gN(e),vN(e),kM(e.a),NM(e.a,YP(e)),MM(e.a)},vN=A(70,e=>AM(e.a,e._._.ae),e=>e._._),yN=j(11,e=>O(e.c,`title`,e._.al?`Fork ${e._.ae} to your account and add the fork`:`Add ${e._.ae} as-is (pushes go to that repo)`)),bN=p(9,Mj,(e=>`/${e}&`)(` b`),_N),xN=j(10,e=>{S(e.h,[Tj,{_gW:e._.aj===e._.ae}]),bN(e,e._.aj===e._.ae?0:1)}),SN=h(10,0,e=>{b(e.f,an(e._.ae)),O(e.h,`title`,`Pick a base branch for ${e._.ae}`),O(e.h,`aria-label`,`Pick a base branch for ${e._.ae}`),yN(e),xN(e)}),CN=s(`w16`,e=>{_(e.c,`click`,function(){e._.am(e._.ae,void 0,e._.an(e._.al))}),_(e.h,`click`,function(){e._.ao(e._.ae)})}),wN=e=>{SN._(e),EN._(e),DN._(e),ON._(e),S(e.a,`_gS`),S(e.b,[`_gU`,`_gT`]),S(e.c,wj),Yi(e.d),Xi(e.d,12),Zi(e.d,`_g1`),S(e.e,`_g2`),kj(e.i),Aj(e.i,12),jj(e.i),CN(e)},TN=p(6,`<button></button>`,` `,qM),EN=h(10,0,e=>TN(e,+!e._.ai)),DN=h(10,0,xN),ON=h(10,0,yN),kN=h(7,0,e=>O(e.a,`hidden`,!e._.v)),AN=s(`w14`,e=>_(e.a,`click`,function(){uP(e._,``),e._.z?.(),e._.f.blur()})),jN=e=>{kN._(e),S(e.a,[Ne,`_ft`]),Pt(e.b),_t(e.b,14),Jt(e.b),AN(e)},MN=Ce(0),NN=h(6,0,e=>MN(e,e._.x)),PN=NN,FN=c(26),IN=j(16,e=>FN(e,e.o,e.p)),LN=w(14,IN),RN=w(15,IN),zN=w(38,e=>{EP(e,e.ac?.length),mN(e)}),BN=j(37,e=>zN(e,e.a2&&e.a6?Ct(e.a6,e.a2?.repos,t=>e.a9(t)):[]),2),VN=j(61,e=>O(e.i,`hidden`,!e.ay||e.ap&&!e.v&&!e.w),3),HN=w(60,VN),UN=j(59,e=>HN(e,!!(e.ae||e.ad||e.a6&&(!e.a2||!e.ae)||e.ap&&e.av)),5),WN=p(10,((e,t)=>`<ul><li><div><button>${e}<span> </span></button><!><button>${t}</button></div><!></li></ul>`)(qi,Dj),((e,t)=>` E D D/${e}& D m%b D/${t}&m%m`)(Ji,Oj),wN,`<p>Loading repos…</p>`,` `,VM),GN=j(42,e=>WN(e,e.ae?0:e.a6&&!e.a2?1:2),2),KN=p(11,`<ul></ul>`,` `,hN,`<p>No repos match "<!>". Paste a clone URL to add any repo.</p>`,` Db%`,eN),qN=j(43,e=>KN(e,e.ad?0:e.a6&&e.a2&&!e.ae?1:2),3),JN=a(28,e=>{aP(e,e.a2?.repos),lP(e,e.a2?.sso),BN(e),UN(e),GN(e),qN(e)}),YN=w(49),XN=w(44,e=>{YN(e,XP(e)),EN(e)}),ZN=j(41,e=>XN(e,!!e.ae&&!e.a3.some(t=>t.nameWithOwner===e.ae))),QN=w(50),$N=j(46,e=>QN(e,ZP(e))),eP=k(vN,GM),tP=w(40,e=>{ZN(e),$N(e),UN(e),GN(e),qN(e),SN(e),eP(e)}),nP=j(36,e=>tP(e,(()=>{let t=cee(e.a6);return t&&!e.a9(t)?t:null})())),rP=w(35,e=>{BN(e),nP(e)}),iP=j(30,e=>rP(e,QP(e))),aP=w(29,e=>{iP(e),ZN(e)}),oP=k(QM),sP=w(56,e=>{RP(e,e.au?.length),oP(e)}),cP=j(55,e=>sP(e,(()=>{e.as;let t=new Set(Le?.()??[]);return(e.a5||[]).filter(e=>!t.has(e.org))})())),lP=w(31,cP),uP=a(32,e=>{de(e,`f`,e.a6,$P(e)),BN(e),nP(e),UN(e),GN(e),qN(e),$M(e)}),dP=a(33,k(aN)),fP=k(uN),pP=a(45,e=>{$N(e),DN(e),fP(e)}),mP=k(YM),hP=a(47,e=>{ON(e),mP(e)}),gP=a(54,cP),_P=s(`w18`,e=>{Se(e,`f`),_(e.f,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),dP(e,Math.min(e.a7+1,e.ac?.length-1))):t.key===`ArrowUp`?(t.preventDefault(),dP(e,Math.max(e.a7-1,0))):t.key===`Enter`?(t.preventDefault(),e.ae?e.am(e.ae,void 0,e.an(e.al)):e.ac[e.a7]&&e.am(e.ac[e.a7].nameWithOwner)):t.key===`Escape`&&e.a6?(t.preventDefault(),uP(e,``)):t.key===`Escape`&&e.ap&&(t.preventDefault(),e.z?.(),e.f.blur())})});function vP(e){Me(e.e),tt(e.e,14),en(e.e,`_2`),JN(e,null),uP(e,``),dP(e,0),pP(e,null),hP(e,!1),gP(e,0),_P(e)}var yP=w(62,e=>ee(e,e.b0)),bP=k(XM),xP=s(`w19`,e=>d(e,{onMount:function(){zM&&JN(e,zM),e.a8(!1)}})),SP=w(34,e=>{yP(e,eF(e)),bP(e),xP(e)}),CP=k(gN,tN),wP=w(17,e=>{SP(e,tF(e)),CP(e)}),TP=w(18,iP),EP=w(39,e=>{UN(e),qN(e)}),DP=w(48),OP=w(19,e=>DP(e,nF(e))),kP=p(7,(e=>`<button type=button title="Close search" aria-label="Close search">${e}</button>`)($t),(e=>` D/${e}&l`)(bt),jN),AP=j(53,e=>S(e.a,[e.ap?`_fo`:`_gN`,{_fp:e.ap&&!e.v,_fq:e.w}]),2),jP=p(1,(e=>`<div>${e}</div>`)(IM),(e=>` D/${e}&l`)(FM),UM),MP=p(9,(e=>`<div>${e}</div>`)(IM),(e=>` D/${e}&l`)(FM),HM),NP=j(58,e=>{jP(e,!e.ap&&e.av?0:1),MP(e,e.ap&&e.av?0:1)}),PP=p(6,`<!><!><!>`,`b%`,PN),FP=j(52,e=>{S(e.c,!e.ap&&e.x?`_gO`:`_gP`),PP(e,!e.ap&&e.x?0:1)}),IP=w(51,e=>{S(e.d,[`_1`,e.ap&&`_fr`]),S(e.f,[e.ap?`_Z`:qe,`_3`,e.ap&&`_fs`]),S(e.i,[e.ap?dr:`_gR`]),kP(e,+!e.ap),UN(e),AP(e),NP(e),FP(e),VN(e)}),LP=(e,t)=>IP(e,!!t),RP=w(57,e=>{UN(e),NP(e)}),zP=w(21,e=>{AP(e),VN(e),kN(e)}),BP=w(22,e=>{AP(e),VN(e)}),VP=w(23,e=>{FP(e),NN(e)}),HP=(e,t)=>O(e.f,`disabled`,t),UP=w(25),WP=e=>function(){e._.a8(!0)},GP=e=>function(){gP(e._,+e._.as+1)},KP=e=>function(t){pP(e._._._,null),e._._._.r?.(t)},qP=e=>function(t,n){e._._._.am(e._.k,n?void 0:t)},JP=e=>function(t){pP(e._._,null),e._._.r?.(t)},YP=e=>function(t,n){e._._.am(e._._.ae,n?void 0:t,e._._.an(e._._.al))},XP=e=>t=>e.ai?t:void 0,ZP=e=>t=>{pP(e,e.aj===t?null:t),t!==e.ae&&hP(e,!1)},QP=e=>t=>{if(e.s.has(t))return!0;let n=e.a3||[];if(n.some(n=>e.s.has(n.nameWithOwner)&&n.parent===t))return!0;let r=n.find(e=>e.nameWithOwner===t);return!!(r?.parent&&e.s.has(r.parent))},$P=e=>function(t){uP(e,t),dP(e,0),hP(e,!1)},eF=e=>t=>{t===`focus`?e.f?.focus({preventScroll:!0}):e.a8(!0)},tF=e=>async t=>{t&&FN(e,!0);try{let n=await N(`/api/repos${t?`?refresh`:``}`);zM=n,JN(e,n)}catch(t){e.r?.(String(t.message||t))}t&&FN(e,!1)},nF=e=>(t,n,r)=>{uP(e,``),pP(e,null),hP(e,!1),e.t(t,n,r)};n(`w8`,WP),n(`w7`,GP),n(`w12`,KP),n(`w11`,qP),n(`w10`,JP),n(`w9`,YP),n(`w5`,XP),n(`w6`,ZP),n(`w3`,QP),n(`w0`,$P),n(`w1`,eF),n(`w2`,tF),n(`w4`,nF);var rF=((e,t,n,r)=>`<div role=region><div><div>${e}<!><!><section><div><h2>Repos</h2><span> </span><div></div><button title="Add repo" aria-label="Add repo">${t}</button>${n}<button title="Refresh repo list" aria-label="Refresh repo list">${r}</button></div><ul><!><!><!></ul></section><!><!></div></div></div>`)(hr,qi,LM,Re),iF=((e,t,n,r)=>` D D D/${e}&%b%b D D b D l b D/${t}&l0${n}& D/${r}&m D%b%b%m%b%n`)(gr,Ji,RM,nt),aF=new Map,oF=s(`r27`,e=>_(e.a,`click`,function(){window.open(pC(e.d),`_blank`,`noopener`)})),sF=e=>{S(e.a,[`_u`,`_K`]),oF(e)},cF=w(3,e=>{O(e.a,`title`,`Open port ${e.d}`),b(e.b,e.d)}),lF=(e,t)=>cF(e,t[0]),uF=e=>{Pt(e.a),_t(e.a,14),Jt(e.a)},dF=e=>S(e.a,`_N`),fF=h(11,0,e=>{O(e.a,`title`,`Only for ${e._.a0.map(jn).join(`, `)}`),b(e.b,e._.a0.map(jn).join(`, `))}),pF=e=>{fF._(e),S(e.a,`_N`)},mF=h(10,0,e=>O(e.a,`title`,`A ${e._.z} skill of the same name already exists`)),hF=e=>{mF._(e),S(e.a,`_N`)},gF=h(8,1,e=>O(e.a,`href`,e._.x)),_F=e=>{gF._(e),vF._(e),S(e.a,[`_N`,`_K`])},vF=h(8,1,e=>{O(e.a,`title`,`Installed from ${e._.y}`),b(e.b,e._.y)}),yF=h(8,0,e=>O(e.a,`title`,`Points into ${e._.t||`a repo`} that is no longer here`)),bF=e=>{yF._(e),S(e.a,[`_N`,`_P`,At.danger])},xF=j(2,e=>O(e.a,`title`,e._.a3?`Linked from ${e._.t}/ in this workspace`:`Ships in ${e._.t}/ — not linked into this workspace yet`)),SF=h(4,0,e=>{b(e.b,e._.t),xF(e)}),CF=e=>{SF._(e),wF._(e),S(e.a,[`_N`,`_y`,`_eM`])},wF=h(4,0,xF),TF=e=>{S(e.a,ur),S(e.b,`_co`)},EF=e=>{S(e.a,[ur,`_cj`]),S(e.b,`_G`),S(e.c,`_cl`),S(e.d,`_co`)},DF=(e,t)=>b(e.e,t),OF=(e,t)=>DF(e,t[0]),kF=e=>{Pt(e.a),_t(e.a,14),Jt(e.a)},AF=e=>S(e.a,`_G`),jF=h(7,0,e=>b(e.c,e._.o)),MF=e=>{jF._(e),S(e.a,[`_N`,`_y`]),kj(e.b),Aj(e.b,12),jj(e.b)},NF=e=>{xj(e.a),Sj(e.a,14),Cj(e.a)},PF=e=>{ia(e.a),aa(e.a,14),oa(e.a)},FF=e=>S(e.a,[`_N`,`_P`]),IF=s(`r28`,e=>_(e.j,`click`,function(){e._._.bg(e.r)})),LF=e=>{S(e.a,`_eD`),S(e.b,[`_y`,`_eE`]),S(e.d,[`_y`,`_eF`]),S(e.f,`_eG`),S(e.h,[`_y`,`_eH`]),S(e.j,[`_cp`,`_8`,`_eQ`]),Pt(e.k),_t(e.k,14),Jt(e.k),IF(e)},RF=j(15,e=>O(e.a,`title`,`${e.n} ${e.o}`.trim())),zF=w(13,e=>{b(e.c,e.n),RF(e)}),BF=w(14,e=>{b(e.e,e.o),RF(e)}),VF=m(6,`<button>:<!></button>`,` Db%`,sF,lF),HF=(e,t)=>VF(e,[t,e=>String(e)]),UF=w(17,e=>{b(e.i,e.r),O(e.j,`title`,`Kill process ${e.r}`),O(e.j,`aria-label`,`Kill process ${e.r}`)}),WF=m(5,(e=>`<li><span> </span><span> </span><span><!><span> </span><button type=button>${e}</button></span></li>`)($t),(e=>` D D l D l D%b D l D/${e}&n`)(bt),LF,(e,t)=>{zF(e,t[0]?.cmd),BF(e,t[0]?.args),HF(e,t[0]?.ports),UF(e,t[0]?.pid)}),GF=h(23,0,e=>WF(e,[e._.bo,`pid`])),KF=e=>{GF._(e),qF._(e),S(e.a,`_cf`),S(e.b,`_cg`),S(e.c,`_ct`),S(e.d,Ie),S(e.f,lr)},qF=h(23,0,e=>b(e.e,e._.bp)),JF=h(12,1,e=>O(e.a,`title`,`Link ${e._.s} into this workspace so every agent here sees it`)),YF=s(`r26`,e=>_(e.a,`click`,function(){e._._._.bc(e._.q,{action:`elevate`,id:e._.q,worktree:e._.t||``})})),XF=e=>{JF._(e),ZF._(e),S(e.a,M),YF(e)},ZF=h(12,1,e=>{O(e.a,`disabled`,e._.a7),O(e.a,`aria-busy`,e._.a7?`true`:void 0)}),QF=A(108,e=>b(e.c,e._.as)),$F=e=>{QF(e),tI(e),nI(e),iI(e),S(e.a,Soe),S(e.b,`_eA`),S(e.e,`_eB`),S(e.f,Coe)},eI=j(7,e=>{O(e.a,`title`,e._.ax||e._.ay),b(e.g,e._.ax||e._.ay)}),tI=A(111,eI),nI=A(112,eI),rI=p(3,`<span>Archived</span>`,` `,FF),iI=A(113,e=>rI(e,+(e._.az===`active`))),aI=we(`r20`,`<span><span> </span><!><span aria-hidden=true>·</span><span> </span></span>`,` D D l%b b D `,$F),oI=p(0,na,(e=>`/${e}&`)(ra),PF,yj,(e=>`/${e}&`)(bj),NF),sI=j(1,e=>O(e.a,`title`,e._._.an?`Invite copied`:`Copy invite — anyone with it can join from New: the same repos on their own lane of ${e._._.at||e._._.au}`),2),cI=A(107,e=>{oI(e,+!e._._.an),sI(e)},e=>e._._),lI=s(`r16`,e=>_(e.a,`click`,function(){e._._.b2()})),uI=e=>{cI(e),dI(e),fI(e),S(e.a,Ne),lI(e)},dI=A(109,sI,e=>e._._),fI=A(110,sI,e=>e._._),pI=p(0,`Remove?`,0,0,$t,(e=>`/${e}&`)(bt),uF),mI=j(1,e=>{S(e.a,[`_cp`,`_8`,`_9`,`_eP`,{_s:e._._._.am===e._.q}]),pI(e,e._._._.am===e._.q?0:1)}),hI=j(2,e=>O(e.a,`title`,e._._._.am===e._.q?`Remove ${e._.s} from this workspace?`:e._.a2?`Stop using ${e._.s} here`:`Remove ${e._.s}`),3),gI=A(106,e=>{mI(e),hI(e)},e=>e._._._),_I=s(`r25`,e=>_(e.a,`click`,function(){e._._._.am===e._.q?(_R(e._._._,null),e._._._.bc(e._.q,e._.a2?{action:`unelevate`,id:e._.q}:{action:`remove`,id:e._.q})):(_R(e._._._,e._.q),$n(()=>{_R(e._._._,null)}))})),vI=e=>{gI(e),yI._(e),bI._(e),xI._(e),SI._(e),_I(e)},yI=h(12,0,e=>{mI(e),hI(e)}),bI=h(12,0,hI),xI=h(12,0,hI),SI=h(12,0,e=>{O(e.a,`disabled`,e._.a7),O(e.a,`aria-busy`,e._.a7?`true`:void 0)}),CI=h(5,0,e=>b(e.c,e._.ah)),wI=e=>{CI._(e),S(e.a,`_ce`),S(e.b,`_G`)},TI=p(0,`Remove?`,0,0,$t,(e=>`/${e}&`)(bt),kF),EI=j(1,e=>{S(e.a,[`_cp`,`_8`,`_9`,{_s:e._._.ag===e._.m}]),TI(e,e._._.ag===e._.m?0:1)}),DI=j(2,e=>O(e.a,`title`,e._._.ag===e._.m?`Remove ${e._.l}/? Uncommitted changes are lost.`:`Remove ${e._.l}/`),2),OI=A(103,e=>{EI(e),DI(e)},e=>e._._),kI=s(`r24`,e=>_(e.a,`click`,function(){e._._.ag===e._.k?.full_name?(hR(e._._,null),e._._.be(e._.k)):(hR(e._._,e._.k?.full_name),$n(()=>{hR(e._._,null)}))})),AI=e=>{OI(e),jI._(e),MI._(e),kI(e)},jI=h(8,1,DI),MI=h(8,1,e=>{EI(e),DI(e)}),NI=A(101,e=>{O(e.a,`disabled`,!!e._._.ad),b(e.b,e._._.ad===`restore`?`Restoring…`:`Restore`)},e=>e._._),PI=s(`r18`,e=>_(e.a,`click`,function(){e._._.bf(`restore`)})),FI=e=>{NI(e),S(e.a,[M,`_r`]),PI(e)},II=A(101,e=>{O(e.a,`disabled`,!!e._._.ad),b(e.b,e._._.ad===`archive`?`Archiving…`:`Archive`)},e=>e._._),LI=s(`r17`,e=>_(e.a,`click`,function(){e._._.bf(`archive`)})),RI=e=>{II(e),S(e.a,M),LI(e)},zI=j(4,e=>b(e.d,e._.ad===`delete`?`Deleting…`:e._.ae?`Delete?`:`Delete`)),BI=A(101,e=>{O(e.c,`disabled`,!!e._.ad),zI(e)}),VI=s(`r19`,e=>_(e.c,`click`,function(){e._.ae?(pR(e._,!1),e._.bf(`delete`)):(pR(e._,!0),$n(()=>{pR(e._,!1)}))})),HI=e=>{BI(e),UI(e),GI(e),qI(e),VI(e)},UI=A(102,e=>{S(e.c,[M,`_t`,{_s:e._.ae}]),zI(e)}),WI=p(1,`<button type=button title="Hide from the list. Worktrees stay on disk."> </button>`,` D `,RI,`<button type=button title="Archived and hidden from the list. Bring it back."> </button>`,` D `,FI),GI=A(113,e=>WI(e,e._.az===`active`?0:1)),KI=p(0,`<button type=button aria-label="Copy invite"></button>`,` `,uI),qI=A(114,e=>KI(e,+!e._.b0)),JI=we(`r21`,`<!><!><!><button type=button title="Remove the workspace and its worktrees. Branches on origin stay."> </button>`,`b%b%b D `,HI),YI=A(100,e=>b(e.a,e._._.ac),e=>e._._),XI=we(`r22`,` `,` `,YI),ZI=e=>{Gt(e.a),lt(e.a,XI(e)),Zt(e.a,`inline`),Rt(e.a,Ez(e)),ot(e.a),Te(e.a),St(e.a),mt(e.a),Xe(e.a,{})},QI=w(33,e=>{SI(e),ZF(e)}),$I=j(17,e=>QI(e,e._._.aa.has(e.q))),eL=A(99,$I,e=>e._._),tL=e=>{eL(e),iL(e),S(e.b,`_eL`),S(e.c,[`_y`,Toe]),S(e.f,Eoe),S(e.h,Doe)},nL=p(11,`<span><!> only</span>`,` D%`,pF),rL=j(31,e=>nL(e,e.a3&&e._._.aj&&e.a1<(e._._.aj?.agents).length?0:1),2),iL=A(105,rL,e=>e._._),aL=w(16,e=>{$I(e),yI(e)}),oL=p(8,`<span>broken link</span>`,` `,bF,`<a target=_blank rel=noopener> </a>`,` D `,_F),sL=j(32,e=>oL(e,e.u?0:e.a3&&e.x?1:2),2),cL=p(9,`<span title="Used instead of the system skill of the same name">overrides system</span>`,` `,dF),lL=p(10,`<span>name taken</span>`,` `,hF),uL=p(12,`<button type=button></button>`,` `,vI,`<button>Link</button>`,` `,XF),dL=j(30,e=>{cL(e,e.a3&&e.z===`global`?0:1),lL(e,!e.a3&&e.z?0:1),uL(e,e.a3?0:e.z?2:1)}),fL=w(29,e=>{S(e.a,[woe,{_eJ:!e.a3}]),sL(e),dL(e),rL(e),wF(e)}),pL=w(18,e=>{b(e.d,e.s),bI(e),JF(e)}),mL=p(4,`<span><!>/</span>`,` D%`,CF),hL=j(21,e=>mL(e,e.t&&!e.u?0:1)),gL=w(19,e=>{hL(e),SF(e),yF(e)}),_L=w(20,e=>{hL(e),sL(e)}),vL=(e,t)=>{O(e.f,`title`,t||void 0),b(e.g,t||``)},yL=w(23,e=>{sL(e),gF(e)}),bL=w(25,e=>{dL(e),mF(e)}),xL=w(27,rL),SL=(e,t)=>{aL(e,(t?.[0]).s?.id),pL(e,(t?.[0]).s?.name),gL(e,(t?.[0]).s?.worktree),_L(e,(t?.[0]).s?.broken),vL(e,(t?.[0]).s?.description),yL(e,(t?.[0]).s?.sourceUrl),CL(e,(t?.[0]).s?.source),bL(e,(t?.[0]).s?.shadows),wL(e,(t?.[0]).s?.agents),TL(e,(t?.[0]).s?.linked),fL(e,(t?.[0]).linked)},CL=w(24,vF),wL=w(26,e=>{xL(e,e.a0?.length),fF(e)}),TL=w(28,xI),EL=h(22,0,e=>b(e.e,e._.bk)),DL=e=>{EL._(e),kL._(e),AL._(e),S(e.a,`_cf`),S(e.b,`_cg`),S(e.c,`_ct`),S(e.d,Ie),S(e.g,lr)},OL=m(6,`<li><span><span> </span><!></span><span> </span><span><!><!><!><!><!></span></li>`,` D D D l%l D l D%b%b%b%b%`,tL,SL),kL=h(22,0,e=>OL(e,[e._.bm,e=>e.s.id])),AL=h(22,0,e=>b(e.f,e._.bn)),jL=p(8,`<span></span>`,` `,AF,`<button></button>`,` `,AI),ML=j(13,e=>jL(e,+!e._.a8.has(e.m))),NL=i(19,ML),PL=e=>{NL._(e),S(e.a,ur),S(e.b,`_cl`),S(e.c,[`_cm`,`_y`]),S(e.e,`_cn`),S(e.f,[`_co`,`_K`])},FL=w(11,e=>{b(e.d,e.l),jI(e)}),IL=w(12,e=>{O(e.f,`href`,gt(e.m)),O(e.f,`title`,`Open ${e.m} on GitHub`),b(e.g,an(e.m)),ML(e),MI(e)}),LL=p(7,(e=>`<span title="Base branch">${e} <!></span>`)(Dj),(e=>` D/${e}&b%l`)(Oj),MF),RL=j(16,e=>LL(e,+(e.o===e.p))),zL=w(14,e=>{RL(e),jF(e)}),BL=w(15,RL),VL=(e,t)=>HL(e,t[0]),HL=w(10,e=>{FL(e,e.k?.worktree),IL(e,e.k?.full_name),zL(e,e.k?.base_branch),BL(e,e.k?.default_branch)}),UL=t(80),WL=a(32,e=>{O(e.q,`disabled`,e.a6),on(e.r,e.a6&&`_F`)}),GL=w(75,e=>OP(e.o,Dz(e))),KL=j(96,e=>GL(e,Oz(e)),2),qL=w(76),JL=j(95,e=>qL(e,kz(e)),2),YL=w(72,e=>{KL(e),JL(e)}),XL=m(20,`<li><span></span><div><span>Adding <!>…</span></div></li>`,` D b D Db%`,EF,OF),ZL=j(94,e=>XL(e,[[...e.a8].filter(t=>!e.b9.has(t)),e=>e])),QL=a(34,e=>{FR(e,e.a8?.size),YL(e,Az(e)),KL(e),JL(e),ZL(e),NL(e)}),$L=w(74),eR=j(97,e=>$L(e,jz(e)),4),tR=w(73,eR),nR=k(eL),rR=a(36,e=>{IR(e,e.aa?.size),tR(e,Mz(e)),eR(e),nR(e)}),iR=p(4,Ot,(e=>`/${e}&`)(Vt),ZI),aR=k(YI),oR=a(38,e=>{iR(e,+!e.ac),aR(e)}),sR=s(`r30`,e=>d(e,{busyCount:e.a9+e.ab,pendingAction:e.ad,onMount:function(){let t=new AbortController,n=t.signal;return Bt().addEventListener(`workspace.progress`,t=>{(this.pendingAction||this.busyCount)&&t.data?.message&&(t.data.op===e.aw||String(t.data.op||``).startsWith(`skills:${e.aw}:`))&&gR(e,t.data.message)},{signal:n}),e.b8(n),e.b7(n),{abort:t}},onDestroy:function(){this.abort.abort(),clearTimeout(e.ap)}})),cR=j(93,sR,6),lR=p(5,`<p><span></span> </p>`,` D b `,wI),uR=j(44,e=>lR(e,e.ad&&e.ah?0:1)),dR=k(BI,II,NI),fR=a(39,e=>{cR(e),uR(e),dR(e)}),pR=a(40,k(UI)),mR=a(41,e=>{O(e.m,`hidden`,e.af),zP(e.o,e.af)}),hR=a(42,k(OI)),gR=a(43,e=>{uR(e),CI(e)}),_R=a(48,k(gI)),vR=a(49,k(cI)),yR=(e,t)=>HR(e,t.id),bR=(e,t)=>{gz(e,t.applied),_z(e,t.issued)},xR=(e,t)=>{O(e.a,`aria-labelledby`,t),Pr(e.d,t)},SR=s(`r29`,e=>{_(e.m,`click`,function(){UL(e)(`focus`),mR(e,!0)}),_(e.q,`click`,function(){e.bi()})});function CR(e){o(e,14,bz),S(e.a,`_dT`),S(e.b,`_dU`),S(e.c,`_dV`),kr(e.d),Lr(e.d,dn({content:aI(e)})),zr(e.d,dn({content:JI(e)})),Fr(e.d,`Manage`),Br(e.d),S(e.g,`_cf`),S(e.h,`_cg`),S(e.i,`_ct`),S(e.j,Ie),S(e.l,`_z`),S(e.m,[Ne,`_eR`]),Yi(e.n),Xi(e.n,16),Zi(e.n),vP(e.o),LP(e.o,!0),BP(e.o,!0),UP(e.o,Pz(e)),wP(e.o,Nz(e)),RN(e.o,function(t){WL(e,t)}),LN(e.o),VP(e.o),HP(e.o),S(e.q,it),rt(e.r),Oe(e.r,14),S(e.s,lr),WL(e,!1),QL(e,new Set),rR(e,new Set),oR(e,null),fR(e,null),pR(e,!1),mR(e,!1),hR(e,null),gR(e,null),_R(e,null),vR(e,!1),yR(e,{id:0}),bR(e,{issued:0,applied:0}),xR(e,f(e)),SR(e)}var wR=w(86,e=>{Tz(e,e.bo.length),GF(e)}),TR=a(33,e=>wR(e,e.a7||[])),ER=w(83),DR=e=>{ER(e,(e.al||[]).filter(t=>!e.bj.some(e=>e.id===t.id)))},OR=w(84,e=>{Cz(e,e.bm?.length),kL(e)}),kR=e=>{OR(e,[...e.bj.map(e=>({s:e,linked:!0})),...e.bl.map(e=>({s:e,linked:!1}))].sort((e,t)=>e.s.name.localeCompare(t.s.name)))},AR=k(iL),jR=a(45,e=>{RR(e,e.aj?.workspace),zR(e,e.aj?.repo),DR(e),kR(e),AR(e)}),MR=(e,t)=>{TR(e,aF.get(`procs:${t}`)||null),jR(e,aF.get(`skills:${t}`)||null)},NR=p(21,`<li><span>No repos yet. Add one to start.</span></li>`,` D `,TF),PR=j(89,e=>NR(e,!e.b0&&!e.a9?0:1)),FR=w(35,e=>{cR(e),PR(e)}),IR=w(37,cR),LR=w(81,e=>xz(e,e.bj.length)),RR=w(46,e=>LR(e,e.ak||[])),zR=w(47),BR=w(64),VR=j(90,e=>BR(e,Fz(e))),HR=w(51,e=>{VR(e),cR(e)}),UR=w(63,VR),WR=e=>{UR(e,xoe({name:e.as,branch:e.at||e.au,repos:e.av.map(e=>e.full_name)}))},GR=w(77),KR=j(88,e=>GR(e,Iz(e))),qR=c(52,e=>{JR(e,e.aq),WR(e),JL(e),KR(e)}),JR=e=>{YR(e,e.aq?.name),XR(e,e.aq?.origin_branch),ZR(e,e.aq?.branch),ez(e,e.aq?.repos),lz(e,e.aq?.id),uz(e,e.aq?.display_path),dz(e,e.aq?.path),fz(e,e.aq?.status)},YR=w(54,k(QF)),XR=w(55,k(dI)),ZR=w(56,k(fI)),QR=w(71,e=>{TP(e.o,e.b9),ZL(e)}),$R=m(19,`<li><div><span><!>/</span><span><a target=_blank rel=noopener> </a><!></span></div><!></li>`,` D D D%l D D l%m%`,PL,VL),ez=w(57,e=>{nz(e,e.av?.length),QR(e,new Set(e.av.map(e=>e.full_name))),$R(e,[e.av,`full_name`])}),tz=k(qI),nz=w(62,e=>{b(e.k,e.b0),PR(e),tz(e)}),rz=w(78),iz=w(70,e=>{rz(e,Lz(e)),cR(e)}),az=w(69,cR),oz=j(92,e=>az(e,zz(e)),2),sz=w(68,e=>{oz(e),eR(e)}),cz=j(91,e=>sz(e,Bz(e))),lz=w(58,e=>{Mr(e.d,`/w/${e.aw}`),iz(e,Rz(e)),cz(e),oz(e),cR(e),eR(e),KL(e)}),uz=w(59,k(tI)),dz=w(60,k(nI)),fz=w(61,k(GI,iI)),pz=j(29,e=>qR(e,e.a0,e.a2)),mz=w(26,e=>{MR(e,e.a0?.id),pz(e)}),hz=w(28,pz),gz=w(66,cz),_z=w(67,e=>{oz(e),eR(e)}),vz=w(30,KR),yz=w(31,e=>Nr(e.d,Vz(e))),bz=u(`r23`,w(80)),xz=w(82,EL),Sz=p(22,`<section><div><h2>Skills</h2><span><!>/<!></span></div><ul></ul></section>`,` D D b D%c%m `,DL),Cz=w(85,e=>{Sz(e,+!e.bn),AL(e)}),wz=p(23,`<section><div><h2>Running</h2><span> </span></div><ul></ul></section>`,` D D b D m `,KF),Tz=w(87,e=>{wz(e,+!e.bp),qF(e)}),Ez=e=>function(){oR(e._,null)},Dz=e=>function(t,n,r){e.bd(t,n,r)},Oz=e=>async(t,n,r)=>{if(!(!t||e.a8.has(t))){oR(e,null),e.ba(t,!0);try{qR(e,await N(`/api/workspaces/${e.aw}/repos`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,baseBranch:n,fork:r})}))}catch(t){oR(e,String(t.message||t))}e.ba(t,!1)}},kz=e=>async t=>{if(!e.a8.has(t.full_name)){oR(e,null),e.ba(t.full_name,!0);try{await N(`/api/workspaces/${e.aq?.id}/repos/${encodeURIComponent(t.worktree)}`,{method:`DELETE`}),qR(e,{...e.aq,repos:(e.aq?.repos).filter(e=>e.full_name!==t.full_name)})}catch(t){oR(e,String(t.message||t))}e.ba(t.full_name,!1)}},Az=e=>(t,n)=>{let r=new Set(e.a8);n?r.add(t):r.delete(t),QL(e,r)},jz=e=>async(t,n)=>{if(e.aa.has(t))return;oR(e,null),e.bb(t,!0);let r=++e.b5;try{e.b6(await N(`/api/workspaces/${e.aw}/skills`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n)}),r)}catch(t){oR(e,String(t.message||t))}finally{e.bb(t,!1)}},Mz=e=>(t,n)=>{let r=new Set(e.aa);n?r.add(t):r.delete(t),rR(e,r)},Nz=e=>function(t){oR(e,t)},Pz=e=>function(){mR(e,!1)},Fz=e=>async()=>{vR(e,await Ht(e.b1)),clearTimeout(e.ap),e.ap=setTimeout(()=>{vR(e,!1)},1500)},Iz=e=>async t=>{oR(e,null),fR(e,t),gR(e,null);try{await N(`/api/workspaces/${e.aq?.id}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t})}),t===`archive`?qR(e,{...e.aq,status:`archived`}):t===`delete`&&e.a4?.()}catch(t){oR(e,String(t.message||t))}finally{fR(e,null),gR(e,null)}},Lz=e=>async t=>{await fetch(`/api/procs/${t}`,{method:`DELETE`}),setTimeout(()=>e.b8(void 0),500)},Rz=e=>async t=>{try{let n=await N(`/api/workspaces/${e.aw}/procs`,{signal:t});TR(e,n),aF.set(`procs:${e.aw}`,n)}catch{}},zz=e=>async t=>{let n=++e.b5;try{e.b6(await N(`/api/workspaces/${e.aw}/skills`,{signal:t}),n)}catch{}},Bz=e=>(t,n)=>{n<=e.b4||(e.b4=n,jR(e,t),aF.set(`skills:${e.aw}`,t))},Vz=e=>function(){e.a5?.()};n(`r12`,Ez),n(`r14`,Dz),n(`r7`,Oz),n(`r8`,kz),n(`r4`,Az),n(`r6`,jz),n(`r5`,Mz),n(`r15`,Nz),n(`r13`,Pz),n(`r0`,Fz),n(`r9`,Iz),n(`r10`,Lz),n(`r3`,Rz),n(`r2`,zz),n(`r1`,Bz),n(`r11`,Vz);var Hz=`_ed _ck _d1 _eb`,Uz=`_el _ee _ec`,Wz=`_en _cq`,Gz=`_eq _Y _X`,Kz=`_ev _cf`,qz=`_ew _X`,Jz=`_ed _ck _d1 _eb`,Yz=`_ex _ee _ec`,Xz=I,Zz=(e=>`/${e}&`)(F);function Qz(e){R(e.a,`M1 20V19C1 15.134 4.13401 12 8 12C11.866 12 15 15.134 15 19V20 M13 14C13 11.2386 15.2386 9 18 9C20.7614 9 23 11.2386 23 14V14.5 M8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12Z M18 9C19.6569 9 21 7.65685 21 6C21 4.34315 19.6569 3 18 3C16.3431 3 15 4.34315 15 6C15 7.65685 16.3431 9 18 9Z`)}var $z=(e,t)=>L(e.a,t),eB=(e,t)=>P(e.a,t),tB=`_hP _hL`,nB=`_hQ _X`,rB=Po,iB=(e=>`/${e}&`)(Fo),aB=e=>{S(e.a,`_h0`),ia(e.b),aa(e.b,14),oa(e.b)},oB=e=>S(e.a,`_G`),sB=e=>{S(e.a,`_hU`),S(e.b,`_hV`)},cB=(e,t)=>b(e.c,an(t)),lB=(e,t)=>cB(e,t[0]),uB=A(42,e=>b(e.b,e._._.x),e=>e._._),dB=e=>{uB(e),S(e.a,[nB,`_hR`])},fB=p(1,`<span></span>`,` `,oB,(e=>`<span>${e}</span>`)(na),(e=>` D/${e}&l`)(ra),aB),pB=A(38,e=>{S(e.a,[`_hZ`,{_hY:e.M===e._._._.p-1}]),fB(e,e.M===e._._._.p-1?0:1)},e=>e._._._),mB=pB,hB=(e,t)=>b(e.c,t),gB=m(0,`<li><!><!></li>`,` D%b%`,mB,(e,t)=>hB(e,t[0])),_B=A(37,e=>gB(e,[e._._.o]),e=>e._._),vB=e=>{_B(e),S(e.a,`_hX`)},yB=A(36,e=>b(e.a,e._._._.n),e=>e._._._),bB=we(`o9`,` `,` `,yB),xB=e=>{Gt(e.a),lt(e.a,bB(e)),Zt(e.a,`inline`),Rt(e.a,FV(e)),ot(e.a),Te(e.a),St(e.a),mt(e.a),Xe(e.a,{})},SB=A(34,e=>de(e,`g`,e._._.i,IV(e)),e=>e._._),CB=s(`o8`,e=>Se(e,`g`)),wB=e=>{SB(e),TB(e),DB(e),OB(e),kB(e),S(e.a,`_hT`),S(e.b,nB),S(e.c,`_y`),S(e.e,`_hW`),S(e.f,`_ct`),S(e.g,`_Z`),CB(e)},TB=A(35,e=>O(e.g,`disabled`,e._._.m),e=>e._._),EB=m(0,`<li><span> </span></li>`,` D D `,sB,lB),DB=A(40,e=>EB(e,[e._._.v,e=>e]),e=>e._._),OB=A(41,e=>b(e.d,e._._.w),e=>e._._),kB=A(43,e=>O(e.g,`placeholder`,e._._.y),e=>e._._),AB=j(4,e=>O(e.c,`disabled`,e._.m||!e._.u||!e._.i.trim()),2),jB=A(34,AB),MB=s(`o7`,e=>{_(e.b,`click`,function(){e._.a3()}),_(e.c,`click`,function(){e._.a5()})}),NB=e=>{jB(e),PB(e),FB(e),S(e.a,`_z`),S(e.b,`_q`),S(e.c,[`_q`,`_r`]),MB(e)},PB=A(35,e=>{b(e.d,e._.m?`Joining…`:`Join workspace`),AB(e)}),FB=A(39,AB),IB=we(`o11`,`<div></div><button type=button>Cancel</button><button type=button> </button>`,` b b D `,NB),LB=j(6,e=>de(e,`c`,e._.h,e._.z)),RB=A(33,LB),zB=s(`o10`,e=>Se(e,`c`)),BB=e=>{RB(e),UB(e),GB(e),KB(e),YB(e),XB(e),ZB(e),QB(e),S(e.a,`_hM`),S(e.b,nB),S(e.c,[`_Z`,`_y`,`_hS`]),zB(e)},VB=p(5,`<ul></ul>`,` `,vB),HB=j(7,e=>VB(e,e._.m&&e._.p?0:1)),UB=A(35,e=>{O(e.c,`disabled`,e._.m),HB(e)}),WB=p(4,Ot,(e=>`/${e}&`)(Vt),xB),GB=A(36,e=>WB(e,+!e._.n)),KB=A(38,HB),qB=p(3,`<p> </p>`,` D `,dB,`<ul></ul><p>Your own lane of <span> </span> in each; PRs target theirs.</p><label><span>Name</span><input></label>`,` b Db D m D b `,wB),JB=j(8,e=>qB(e,e._.x?0:e._.u?1:2)),YB=A(39,JB),XB=A(42,JB),ZB=A(44,LB),QB=A(45,e=>O(e.a,`id`,e._.a6)),$B=we(`o12`,`<h2>Join a workspace</h2><p>Paste an invite: the same repos, on your own lane of their branch.</p><textarea placeholder="{ &#34;name&#34;: …, &#34;branch&#34;: …, &#34;repos&#34;: [&#34;owner/name&#34;, …] }" aria-label="Workspace invite" rows=6 autocomplete=off spellcheck=false autofocus></textarea><!><!><!><!>`,` b b b%b%b%`,BB),eV=(e,t)=>{TV(e,t?.ok),kV(e,t?.error)},tV=k(RB),nV=a(7,e=>{eV(e,(()=>{if(!e.h.trim())return{ok:null,error:``};try{return{ok:vj(e.h),error:``}}catch(e){return{ok:null,error:e.message}}})()),tV(e)}),rV=w(25,k(ZB)),iV=j(11,e=>rV(e,LV(e))),aV=w(31),oV=j(30,e=>aV(e,RV(e)),6),sV=k(jB,SB),cV=a(8,e=>{iV(e),oV(e),sV(e)}),lV=(e,t)=>xV(e,t.v),uV=k(UB,PB,TB),dV=a(12,e=>{Ro(e.a,!e.m),oV(e),uV(e)}),fV=a(13,k(GB,yB)),pV=k(_B),mV=a(14,e=>{SV(e,e.o?.length),oV(e),pV(e)}),hV=(e,t)=>CV(e,t.n),gV=w(32,e=>qo(e.a,e.a6));function _V(e){Zo(e.a),es(e.a,dn({content:IB(e)})),Io(e.a,$B(e)),Jo(e.a,`Join a workspace`),Go(e.a,tB),Yo(e.a),$o(e.a,{}),nV(e,``),cV(e,``),lV(e,{v:``}),dV(e,!1),fV(e,null),mV(e,[]),hV(e,{n:0}),gV(e,f(e))}var vV=w(29,oV),yV=w(26,e=>{Wo(e.a,BV(e)),vV(e,zV(e))}),bV=j(18,e=>yV(e,VV(e))),xV=w(10,e=>{iV(e),bV(e)}),SV=w(15,k(KB,pB)),CV=w(17,e=>{bV(e),oV(e)}),wV=k(YB,FB),TV=w(20,e=>{EV(e,e.u?.repos),DV(e,e.u?.branch),OV(e,e.u?.name),oV(e),wV(e)}),EV=w(21,k(DB)),DV=w(22,k(OB)),OV=w(24,k(kB)),kV=w(23,k(XB,uB)),AV=c(27,e=>Vo(e.a,e.a1)),jV=j(5,e=>AV(e,e.d,e.e)),MV=w(3,jV),NV=w(4,jV),PV=w(6,oV),FV=e=>function(){fV(e._._,null)},IV=e=>t=>{cV(e._._,t)},LV=e=>t=>{nV(e,t);try{let n=vj(t);(!e.i.trim()||e.i===e.k)&&(cV(e,n.name),e.k=n.name)}catch{}},RV=e=>async()=>{if(e.m||!e.u||!e.i.trim())return;let t=++e.r;dV(e,!0),fV(e,null),mV(e,[]);let n=Math.random().toString(36).slice(2,10),r=er(n,n=>{t===e.r&&mV(e,e.o.concat(n))});await r.ready;try{let r=await N(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e.i,repos:e.u.repos.map(e=>({fullName:e})),opId:n,join:e.u.branch})});if(t!==e.r)return;e.a3(),e.g?.(r)}catch(n){if(t!==e.r)return;dV(e,!1),fV(e,String(n.message||n))}finally{r.stop()}},zV=e=>()=>{e.a0(),AV(e,!1)},BV=e=>function(t){t||e.a0(),AV(e,t)},VV=e=>()=>{e.r++,nV(e,``),cV(e,``),e.k=``,dV(e,!1),fV(e,null),mV(e,[])};n(`o6`,FV),n(`o1`,IV),n(`o0`,LV),n(`o4`,RV),n(`o3`,zV),n(`o5`,BV),n(`o2`,VV);var HV=((e,t)=>`<div role=region><div><div>${e}<!><label><span>Name</span><input placeholder=my-feature autofocus></label><section><div><h2>Repos</h2></div><ul><!><!></ul>${t}</section><!><div><button type=button> </button></div><!></div></div><!></div>`)(hr,LM),UV=((e,t)=>` D D D/${e}&%b D b l D D l D%b%l0${t}&l%b D D m%m%l`)(gr,RM),WV=e=>S(e.a,`_G`),GV=e=>{S(e.a,`_eu`),ia(e.b),aa(e.b,14),oa(e.b)},KV=e=>S(e.a,`_G`),qV=e=>S(e.a,Wz),JV=e=>{ia(e.a),aa(e.a,12),oa(e.a)},YV=we(`t15`,`Name the workspace and pick repos, or restore an archived one below.`),XV=p(1,`<span></span>`,` `,KV,(e=>`<span>${e}</span>`)(na),(e=>` D/${e}&l`)(ra),GV),ZV=A(64,e=>{S(e.a,[`_ey`,{_et:e.M===e._._.ae-1}]),XV(e,e.M===e._._.ae-1?0:1)},e=>e._._),QV=ZV,$V=(e,t)=>b(e.c,t),eH=m(0,`<li><!><!></li>`,` D%b%`,QV,(e,t)=>$V(e,t[0])),tH=h(16,0,e=>eH(e,[e._.ad])),nH=e=>{tH._(e),S(e.a,`_es`)},rH=h(10,0,e=>AM(e.b,e._.n)),iH=e=>{rH._(e),aH._(e),S(e.a,`_em`),kM(e.b),NM(e.b,GU(e)),jM(e.b,WU(e))},aH=h(10,0,e=>MM(e.b,e._.q)),oH=A(62,e=>b(e.a,e._._.ac),e=>e._._),sH=we(`t17`,` `,` `,oH),cH=e=>{Gt(e.a),lt(e.a,sH(e)),Zt(e.a,`inline`),Rt(e.a,KU(e)),ot(e.a),Te(e.a),St(e.a),mt(e.a),Xe(e.a,{})},lH=j(7,e=>O(e.g,`disabled`,e._._.a8||!!e._._.a9)),uH=A(60,lH,e=>e._._),dH=s(`t23`,e=>_(e.g,`click`,function(){e._._.ao(e.j)})),fH=e=>{uH(e),hH(e),S(e.a,Yz),S(e.b,`_cl`),S(e.c,`_cm`),S(e.e,[Mt,`_y`]),S(e.g,M),dH(e)},pH=p(6,`<span></span> Restoring…`,` `,WV,`Restore`),mH=j(15,e=>pH(e,e._._.a9===e.o?0:1)),hH=A(61,e=>{lH(e),mH(e)},e=>e._._),gH=(e,t)=>b(e.d,t),_H=j(13,e=>{O(e.e,`title`,e.l||e.m),b(e.f,e.l||e.m)}),vH=w(11,_H),yH=w(12,_H),bH=w(14,mH),xH=(e,t)=>SH(e,t[0]),SH=w(9,e=>{gH(e,e.j?.name),vH(e,e.j?.display_path),yH(e,e.j?.path),bH(e,e.j?.id)}),CH=m(6,`<li><div><span> </span><span> </span></div><button type=button></button></li>`,` D D D l D m `,fH,xH),wH=h(20,0,e=>CH(e,[e._.ag,`id`])),TH=e=>{wH._(e),EH._(e),S(e.a,Kz),S(e.b,`_ej`),S(e.c,`_ct`),S(e.d,Ie),S(e.f,qz),S(e.g,Jz)},EH=h(20,0,e=>b(e.e,e._.ah)),DH=A(60,e=>O(e.a,`disabled`,e._._.a8),e=>e._._),OH=s(`t18`,e=>_(e.a,`click`,function(){e._._.am(e._.n)})),kH=e=>{DH(e),jH._(e),NH._(e),OH(e)},AH=j(1,e=>O(e.a,`title`,e._.p?`${e._.n} will be forked to your account; click to clone as-is instead`:`Fork ${e._.n} to your account and clone the fork`)),jH=h(4,0,AH),MH=p(0,(e=>`${e} fork`)(na),(e=>`/${e}&b`)(ra),JV,`fork`),NH=h(4,0,e=>{S(e.a,[`_er`,{_ep:e._.p}]),O(e.a,`aria-pressed`,e._.p?`true`:`false`),MH(e,+!e._.p),AH(e)}),PH=i(12,e=>{O(e.f,`disabled`,e._.a8),O(e.i,`disabled`,e._.a8)}),FH=s(`t19`,e=>{_(e.f,`click`,function(){TU(e._,e._.aj===e.n?null:e.n)}),_(e.i,`click`,function(){e._.al(e.n)})}),IH=e=>{PH._(e),RH._(e),S(e.a,`_ek`),S(e.b,Uz),S(e.c,`_eo`),kj(e.g),Aj(e.g,12),jj(e.g),S(e.i,[je,`_8`]),Pt(e.j),_t(e.j,12),Jt(e.j),FH(e)},LH=p(10,(e=>`<div>${e}</div>`)(Mj),(e=>` D/${e}&l`)(` b`),iH),RH=ue(12,45,13,e=>{S(e.f,[Gz,`_y`,{_ep:e._.aj===e.n}]),LH(e,e._.aj===e.n?0:1)}),zH=w(13,e=>{b(e.d,an(e.n)),O(e.f,`title`,`Change base branch for ${e.n}`),O(e.f,`aria-label`,`Change base branch for ${e.n}`),O(e.i,`title`,`Remove ${e.n}`),jH(e),rH(e)}),BH=p(4,`<button></button>`,` `,kH),VH=w(15,e=>{BH(e,+(e.p===void 0)),NH(e)}),HH=w(16,e=>{b(e.h,e.q?`${x(` `)}${x(e.q)}`:``),aH(e)}),UH=(e,t)=>{zH(e,t[0]?.fullName),VH(e,t[0]?.fork),HH(e,t[0]?.baseBranch)},WH=A(60,e=>O(e.a,`disabled`,e._.a8)),GH=s(`t14`,e=>_(e.a,`click`,function(){aU(e._,!0)})),KH=we(`t16`,(e=>`<button type=button aria-label="Join a workspace" title="Join a workspace from an invite">${e}</button>`)(Xz),(e=>` D/${e}&l`)(Zz),e=>{WH(e),S(e.a,Ne),Qz(e.b),$z(e.b,14),eB(e.b),GH(e)}),qH=A(58,e=>{O(e.a,`disabled`,e._.a4),on(e.b,e._.a4&&`_F`)}),JH=s(`t20`,e=>_(e.a,`click`,function(){e._.au()})),YH=we(`t21`,(e=>`<button title="Refresh repo list" aria-label="Refresh repo list">${e}</button>`)(Re),(e=>` D/${e}&l`)(nt),e=>{qH(e),S(e.a,[Ne,`_ei`]),rt(e.b),Oe(e.b,14),JH(e)}),XH=h(21,0,e=>PV(e.a,e._.a0)),ZH=e=>{XH._(e),QH._(e),_V(e.a),NV(e.a,qU(e))},QH=h(21,0,e=>MV(e.a,e._.a5)),$H=w(54),eU=j(53,e=>$H(e,JU(e)),5),tU=j(37,e=>O(e.s,`disabled`,e.a8||!!e.a9||!e.a3.trim()),2),nU=a(29,e=>{de(e,`h`,e.a3,YU(e)),eU(e),tU(e)}),rU=a(30,k(qH)),iU=p(21,rB,(e=>`/${e}&`)(iB),ZH),aU=a(31,e=>{iU(e,+!e.a5),QH(e)}),oU=w(44,e=>OP(e.o,XU(e))),sU=w(48),cU=w(49),lU=m(12,((e,t)=>`<li><div><span> </span><!><button>${e} </button><button>${t}</button></div><!></li>`)(Dj,$t),((e,t)=>` D D D l%b D/${e}& l D/${t}&m%l`)(Oj,bt),IH,UH),uU=w(47),dU=j(46,e=>uU(e,eW(e))),fU=a(32,e=>{TP(e.o,new Set(e.a6.map(e=>e.fullName))),jU(e,e.a6?.length),oU(e,ZU(e)),sU(e,QU(e)),cU(e,$U(e)),lU(e,[e.a6,`fullName`]),dU(e),eU(e)}),pU=w(50),mU=j(36,e=>pU(e,tW(e)),2),hU=p(16,`<ul></ul>`,` `,nH),gU=j(41,e=>hU(e,e.a8&&e.ae?0:1)),_U=k(WH,DH,uH),vU=a(34,e=>{O(e.h,`disabled`,e.a8),HP(e.o,e.a8),b(e.t,e.a8?`Creating…`:`Create workspace`),mU(e),gU(e),tU(e),_U(e),PH(e)}),yU=k(hH),bU=a(35,e=>{mU(e),eU(e),tU(e),yU(e)}),xU=p(4,Ot,(e=>`/${e}&`)(Vt),cH),SU=k(oH),CU=a(38,e=>{xU(e,+!e.ac),SU(e)}),wU=a(39,e=>{NU(e,e.ad?.length),eU(e),tH(e)}),TU=a(45,e=>{dU(e),RH(e)}),EU=(e,t)=>zU(e,t.n),DU=(e,t)=>{O(e.a,`aria-labelledby`,t),Pr(e.d,t)},OU=s(`t24`,e=>{Se(e,`h`),_(e.s,`click`,function(){e.as()})});function kU(e){o(e,14,UU),S(e.a,`_dT`),S(e.b,`_dU`),S(e.c,`_dV`),kr(e.d),Lr(e.d,dn({content:YV(e)})),zr(e.d,dn({content:KH(e)})),Fr(e.d,`New workspace`),Br(e.d),S(e.f,`_eh`),S(e.g,`_ct`),S(e.h,qe),S(e.i,`_cf`),S(e.j,`_ej`),S(e.k,`_ct`),S(e.l,Hz),vP(e.o),VP(e.o,dn({content:YH(e)})),wP(e.o,nW(e)),RN(e.o,function(t){rU(e,t)}),LN(e.o),LP(e.o),zP(e.o),BP(e.o),UP(e.o),S(e.r,`_ef`),S(e.s,[et,`_r`,`_eg`]),nU(e,``),rU(e,!1),aU(e,!1),fU(e,[]),vU(e,!1),bU(e,null),CU(e,null),wU(e,[]),TU(e,null),EU(e,{n:0}),DU(e,f(e)),OU(e)}var AU=p(13,`<li>No repos yet. Search below to add one, or create it empty.</li>`,` `,qV),jU=w(33,e=>AU(e,+!!e.a7)),MU=k(ZV),NU=w(40,e=>{gU(e),MU(e)}),PU=w(42,e=>{IU(e,e.ag?.length),wH(e)}),FU=p(20,`<section><div><h2>Archived</h2><span> </span></div><p>Restore an archived workspace instead of creating a new one.</p><ul></ul></section>`,` D D b D m b `,TH),IU=w(43,e=>{FU(e,+!e.ah),EH(e)}),LU=(e,t)=>PU(e,(t||[]).filter(e=>e.status===`archived`).slice().sort((e,t)=>t.created_at.localeCompare(e.created_at))),RU=w(25,mU),zU=w(52,eU),BU=w(26,e=>{eU(e),XH(e)}),VU=(e,t)=>Mr(e.d,t),HU=w(28,e=>Nr(e.d,e.a2&&rW(e))),UU=u(`t22`,w(56)),WU=e=>function(t){TU(e._._,null),CU(e._._,t)},GU=e=>function(t,n){e._._.an(e._.n,n?void 0:t)},KU=e=>function(){CU(e._,null)},qU=e=>t=>{aU(e._,t)},JU=e=>async()=>{if(e.a9)return;let t=++e.aq;vU(e,!0),CU(e,null),wU(e,[]);let n=Math.random().toString(36).slice(2,10),r=er(n,t=>{wU(e,e.ad.concat(t))});await r.ready;try{let r=await N(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e.a3,repos:e.a6,opId:n})});if(t!==e.aq)return;vU(e,!1),e.a0?.(r)}catch(n){if(t!==e.aq)return;vU(e,!1),CU(e,String(n.message||n))}finally{r.stop()}},YU=e=>t=>{nU(e,t)},XU=e=>function(t,n,r){e.ai(t,n,r)},ZU=e=>(t,n,r)=>{!t||e.a6.some(e=>e.fullName===t)||fU(e,e.a6.concat({fullName:t,baseBranch:n,fork:r}))},QU=e=>t=>{fU(e,e.a6.map(e=>e.fullName===t?{...e,fork:!e.fork}:e))},$U=e=>(t,n)=>{fU(e,e.a6.map(e=>e.fullName===t?{...e,baseBranch:n}:e)),TU(e,null)},eW=e=>t=>{fU(e,e.a6.filter(e=>e.fullName!==t)),e.aj===t&&TU(e,null)},tW=e=>async t=>{if(!(e.a8||e.a9)){CU(e,null),bU(e,t.id);try{await N(`/api/workspaces/${t.id}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}),e.z?.({...t,status:`active`})}catch(t){CU(e,String(t.message||t))}finally{bU(e,null)}}},nW=e=>function(t){CU(e,t)},rW=e=>()=>e.a2?.();n(`t10`,WU),n(`t9`,GU),n(`t8`,KU),n(`t13`,qU),n(`t6`,JU),n(`t0`,YU),n(`t11`,XU),n(`t1`,ZU),n(`t3`,QU),n(`t4`,$U),n(`t2`,eW),n(`t5`,tW),n(`t12`,nW),n(`t7`,rW);var iW=Object.defineProperty,aW=Object.getOwnPropertyDescriptor,oW=(e,t)=>{for(var n in t)iW(e,n,{get:t[n],enumerable:!0})},B=(e,t,n,r)=>{for(var i=r>1?void 0:r?aW(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&iW(t,n,i),i},V=(e,t)=>(n,r)=>t(n,r,e),sW=`Terminal input`,cW={get:()=>sW,set:e=>sW=e},lW=`Too much output to announce, navigate to rows manually to read`,uW={get:()=>lW,set:e=>lW=e};function dW(e){return e.replace(/\r?\n/g,`\r`)}function fW(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function pW(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function mW(e,t,n,r){e.stopPropagation(),e.clipboardData&&hW(e.clipboardData.getData(`text/plain`),t,n,r)}function hW(e,t,n,r){e=dW(e),e=fW(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function gW(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function _W(e,t,n,r,i){gW(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function vW(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function yW(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var bW=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},xW=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},SW=``,CW=` `,wW=class e{constructor(){this.fg=0,this.bg=0,this.extended=new TW}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},TW=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},EW=class e extends wW{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new TW,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?vW(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},DW=`di$target`,OW=`di$dependencies`,kW=new Map;function AW(e){return e[OW]||[]}function jW(e){if(kW.has(e))return kW.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);MW(t,e,r)};return t._id=e,kW.set(e,t),t}function MW(e,t,n){t[DW]===t?t[OW].push({id:e,index:n}):(t[OW]=[{id:e,index:n}],t[DW]=t)}var NW=jW(`BufferService`),PW=jW(`CoreMouseService`),FW=jW(`CoreService`),IW=jW(`CharsetService`),LW=jW(`InstantiationService`),RW=jW(`LogService`),zW=jW(`OptionsService`),BW=jW(`OscLinkService`),VW=jW(`UnicodeService`),HW=jW(`DecorationService`),UW=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new EW,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):WW(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};UW=B([V(0,NW),V(1,zW),V(2,BW)],UW);function WW(e,t){if(confirm(`Do you want to navigate to ${t}?
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_ClG30-Cs.js","assets/_D6gBuUWs.js","assets/_hePW80VL.js","assets/_BOllftHQ.js","assets/_BpIalLUl.js","assets/icon-arrow-down-Bh8nsodJ.css","assets/diff-view-DKJzuUb0.css","assets/_dvB7DobJ.js","assets/_BvcYfwFl.js","assets/_BnZSGKpL.js","assets/_o7CRZZeJ.js","assets/_C9oWRx13.js","assets/_D_opOE0v.js","assets/_C0zwP2qH.js","assets/_Bjs6hRWD.js","assets/_CxFNOCPZ.js","assets/_L9P-Lxf4.js","assets/_D9-BvOKl.js","assets/_BbqN_0Hf.js","assets/_CC3Ffsld.js","assets/_DdJpsshP.js","assets/_BfEhpnxc.js","assets/_BjtlvkCt.js","assets/_BU6w6X4q.js","assets/_BnepJiz-.js"])))=>i.map(i=>d[i]);
2
+ import"./_hePW80VL.js";import{$ as e,A as t,B as n,C as r,D as i,F as a,G as o,H as s,I as c,J as l,K as u,L as d,M as f,N as p,O as m,P as h,Q as g,R as _,S as v,T as y,U as b,V as ee,W as x,X as te,Y as ne,_ as re,a as S,at as C,b as w,c as ie,ct as ae,d as oe,et as se,f as T,g as E,h as D,i as O,it as ce,j as le,k as ue,l as de,m as fe,n as pe,nt as me,ot as he,p as ge,q as _e,r as ve,s as eee,st as ye,t as be,tt as xe,u as Se,v as k,w as Ce,x as we,y as A,z as j}from"./_BOllftHQ.js";import{$ as Te,$t as tee,A as Ee,At as De,B as Oe,C as ke,Ct as M,D as Ae,Dt as je,E as Me,Et as Ne,F as Pe,Ft as Fe,G as Ie,Gt as Le,H as Re,I as ze,It as Be,K as Ve,L as He,Lt as nee,M as Ue,Mt as We,N as Ge,O as Ke,Ot as qe,P as Je,Pt as Ye,Q as Xe,Qt as Ze,R as Qe,S as $e,St as et,T as tt,U as nt,Ut as ree,V as rt,W as it,Wt as at,X as ot,Xt as st,Y as ct,Z as lt,Zt as ut,_ as dt,_t as iee,a as ft,an as pt,at as mt,b as ht,bt as gt,cn as N,ct as _t,d as vt,dn as yt,dt as bt,en as xt,et as St,f as Ct,fn as wt,ft as P,g as Tt,gt as F,h as Et,ht as I,i as Dt,in as aee,it as Ot,j as kt,jt as At,k as jt,kt as Mt,l as oee,ln as Nt,lt as Pt,m as Ft,mt as L,n as It,nn as Lt,nt as Rt,o as zt,on as Bt,ot as Vt,p as Ht,pt as R,r as Ut,rn as Wt,rt as Gt,s as Kt,sn as qt,st as Jt,t as Yt,tn as Xt,tt as Zt,un as Qt,ut as $t,v as see,vt as cee,w as en,wt as lee,x as tn,xt as nn,y as rn,yt as an,z as on}from"./_BpIalLUl.js";var sn=[],cn=Symbol(),ln=ae((e,t,n)=>{e=te(e),t=te(t);let r,i,a=(e,t)=>pn(i,e,t);return o=>{let s=o[t];if(i)me(s,a,-1,o[e]);else{let t=_e(o);s.X||=new Map,(r||=n()).then(n=>{i=we(``,...n._)(),xe(s,n=>pn(i,n,o[e],t))},mn(s,t))}}}),un=ae(e=>{let t,n=(r,i)=>{t||=e(),r.X||!(`X`in r)&&r.H===C?(r.X||=new Map).set(t,[i,n]):n._?n._(r,i):t.then(e=>xe(r,n._=e._,i),()=>0)};return n});function dn(e){return e[Symbol.iterator]=fn,e[cn]=sn,e}function*fn(){yield this,yield*this[cn]}function pn(e,t,n,r){let i=n.parentNode,a=t.X,o=()=>{ye(t),e.b(t,i.namespaceURI),t.X=0},s=()=>{g(t,i,n),n.remove(),r?.c()},c;if(c=a?.size){let n=mn(t,r);a.forEach(([,r],i)=>i.then(n=>(r._=n._)&&!--c&&xe(t,t=>{o(),e.c?.(t),a.forEach(([e,n])=>n(t,e)),s()}),e=>c>0&&(c=0,n(e))))}else o(),he(e,t),s()}function mn(e,t){return n=>{t&&(t.m?t.i=0:t.c()),xe(e,ce,n)}}var hn=null;function gn(e){if(typeof document>`u`)return;if(hn?.isConnected){hn.querySelector(`[data-msg]`).textContent=e;return}hn=document.createElement(`div`),hn.setAttribute(`role`,`alert`),hn.style.cssText=`position:fixed;left:0;right:0;bottom:0;z-index:2147483647;display:flex;gap:.75rem;align-items:center;padding:.6rem calc(env(safe-area-inset-left) + .9rem) calc(env(safe-area-inset-bottom) + .6rem);background:#3a1d1d;color:#fff;font:13px/1.4 system-ui,sans-serif;box-shadow:0 -4px 16px rgba(0,0,0,.3)`;let t=document.createElement(`span`);t.dataset.msg=``,t.style.cssText=`flex:1;min-width:0;overflow-wrap:anywhere`,t.textContent=e;let n=document.createElement(`button`);n.type=`button`,n.textContent=`Reload`,n.style.cssText=`flex:none;padding:.35rem .8rem;border:0;border-radius:.4rem;background:#fff;color:#3a1d1d;font:inherit;font-weight:600;cursor:pointer`,n.onclick=()=>location.reload();let r=document.createElement(`button`);r.type=`button`,r.textContent=`×`,r.setAttribute(`aria-label`,`Dismiss`),r.style.cssText=`flex:none;padding:.2rem .5rem;border:0;background:transparent;color:inherit;font:inherit;font-size:16px;cursor:pointer`,r.onclick=()=>hn?.remove(),hn.append(t,n,r),document.body.append(hn)}var _n=350;function vn(){let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function yn(){let e=vn();if(!e||e.inputMode===`none`)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`?!e.readOnly:e.isContentEditable}var bn=0;function xn(){return bn}var Sn=new Set;function Cn(e,t){Sn.add(e),t.addEventListener(`abort`,()=>Sn.delete(e))}function wn(e){let t=window.visualViewport,n,r=``,i=(e=!1)=>{let n=``;if(t){let e=Math.abs(t.height-window.innerHeight)<1||!yn();bn=e?0:Math.max(0,Math.round(window.innerHeight-t.height)),n=e?``:`${Math.round(t.height)}px`,document.documentElement.style.setProperty(`--app-height`,n),document.documentElement.style.setProperty(`--vv-top`,e?``:`${Math.round(t.offsetTop)}px`),document.documentElement.style.setProperty(`--bar-inset-bottom`,bn?`0.35rem`:``),document.documentElement.toggleAttribute(`data-keyboard`,bn>0),e||window.scrollTo(0,0)}let i=`${bn}:${n}:${t?Math.round(t.offsetTop):0}`;if(!(!e&&i===r)){r=i;for(let e of Sn)e()}},a=()=>{clearTimeout(n),n=setTimeout(()=>i(),_n)},o=()=>{i(!0),a()};t?.addEventListener(`resize`,o,{signal:e}),t?.addEventListener(`scroll`,()=>i(),{signal:e}),window.addEventListener(`resize`,o,{signal:e}),window.addEventListener(`orientationchange`,o,{signal:e}),document.addEventListener(`focusin`,a,{signal:e}),document.addEventListener(`focusout`,a,{signal:e}),document.addEventListener(`visibilitychange`,()=>{document.hidden||o()},{signal:e}),window.addEventListener(`pageshow`,o,{signal:e}),window.addEventListener(`focus`,o,{signal:e})}var Tn=[{id:`claude`,label:`Claude`,bins:[`claude`],install:{url:`https://claude.ai/install.sh`,shell:`bash`},icon:`M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z`},{id:`codex`,label:`Codex`,bins:[`codex`],install:{url:`https://chatgpt.com/codex/install.sh`,shell:`sh`},icon:`M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z`,reauth:`codex login`,pathDirs:[`~/.codex/bin`]},{id:`copilot`,label:`Copilot`,bins:[`copilot`],install:{url:`https://gh.io/copilot-install`,shell:`bash`},icon:`M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z`,reauth:`gh auth login`},{id:`cursor`,label:`Cursor`,bins:[`cursor-agent`],install:{url:`https://cursor.com/install`,shell:`bash`},icon:`M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z`,reauth:`cursor-agent login`},{id:`grok`,label:`Grok`,bins:[`grok`],install:{url:`https://x.ai/cli/install.sh`,shell:`bash`},icon:`M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815`,reauth:`grok`,pathDirs:[`~/.grok/bin`]},{id:`opencode`,label:`opencode`,bins:[`opencode`],install:{url:`https://opencode.ai/install`,shell:`bash`},icon:`M6 4.5h12v15H6V4.5zM9 7.5v9h6v-9H9zM9 13.5v3h6v-3H9z`,reauth:`opencode auth login`,pathDirs:[`~/.opencode/bin`]},{id:`pi`,label:`Pi`,bins:[`pi`],install:{url:`https://pi.dev/install.sh`,shell:`sh`},icon:`M4 5.25h16v2.9h-2.35v10.6h-2.9V8.15h-3.5v10.6h-2.9V8.15H7.1c-.62 0-1.13.32-1.46.86l-.36.6L4 8.6V5.25z`,reauth:`pi`}],En=new Map(Tn.map(e=>[e.id,e]));function Dn(e){return En.get(e)}function On(e){let t=/^([a-z]+?)(\d*)$/.exec(e||``),n=t&&En.get(t[1]);return n?{family:n,suffix:t[2]}:null}function kn(e){return On(e)?.family.id??e}function An(e){return On(e)?.suffix??``}function jn(e){let t=On(e);return t?`${t.family.label}${t.suffix?` ${t.suffix}`:``}`:e===`shell`?`Shell`:e}function Mn(e){for(let t of Tn)for(let n of t.bins){if(e===n)return t.id;if(e.startsWith(n)&&/^\d+$/.test(e.slice(n.length)))return`${t.id}${e.slice(n.length)}`}return null}function Nn(e){let t=Math.round(e);return t!==e&&(t===100||t===0)?`${e.toFixed(1)}%`:`${t}%`}function Pn(e){let t=Math.round(e/6e4);if(t<60)return`${t}m`;let n=Math.round(t/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}var Fn=6e4,In=null,Ln=null,Rn=new Set;function zn(e,t){t?.aborted||(Rn.add(e),t?.addEventListener(`abort`,()=>Rn.delete(e)))}function uee(e){In={at:Date.now(),value:e};for(let t of Rn)t(e)}function Bn(){return In?.value??null}function Vn(e=!1){if(!e){if(In&&Date.now()-In.at<Fn)return Promise.resolve(In.value);if(Ln)return Ln}return Ln=N(`/api/usage${e?`?refresh`:``}`).then(e=>(uee(e),e)).catch(e=>{let t=String(e.message||e);return{...In?.value,error:t}}).finally(()=>{Ln=null}),Ln}function Hn(e,t){let n=t?.agents||[],r=n.find(t=>t.agent===e);if(r)return r;let i=kn(e);return n.find(e=>e.agent===i)??null}function Un(e){let t=!1,n=!1;return async()=>{if(t){n=!0;return}t=!0;try{do n=!1,await e();while(n)}finally{t=!1}}}function Wn(){return typeof window<`u`&&`serviceWorker`in navigator&&`PushManager`in window}async function Gn(){return Wn()?(await Kn()).pushManager.getSubscription():null}async function dee(){if(await Notification.requestPermission()!==`granted`)return!1;let e=await Kn(),t=await e.pushManager.getSubscription();if(!t){let{publicKey:n}=await N(`/api/push`);t=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:mee(n)})}return await N(`/api/push`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t.toJSON())}),!0}async function fee(){let e=await Gn();e&&(await N(`/api/push?endpoint=${encodeURIComponent(e.endpoint)}`,{method:`DELETE`}).catch(()=>{}),await e.unsubscribe())}function pee(e){let t=()=>{document.visibilityState===`visible`&&navigator.clearAppBadge?.().catch(()=>{})};t(),document.addEventListener(`visibilitychange`,t,{signal:e})}async function Kn(){return await navigator.serviceWorker.getRegistration()??navigator.serviceWorker.register(`/sw.js`)}function mee(e){let t=e.padEnd(e.length+(4-e.length%4)%4,`=`),n=atob(t.replace(/-/g,`+`).replace(/_/g,`/`));return Uint8Array.from(n,e=>e.charCodeAt(0))}var qn=e=>e.status===`active`&&!e.pending,Jn=e=>e.filter(qn).sort((e,t)=>e.name.localeCompare(t.name)),Yn=2500,Xn=p(0,`<div role=status aria-live=polite><span></span> Reconnecting…</div>`,` D `,e=>{S(e.a,`_bi`),S(e.b,`_G`)}),Zn=a(1,e=>Xn(e,+!e.b));s(`e0`,e=>d(e,{onMount:function(){let t=new AbortController,n,r=t=>{if(clearTimeout(n),t){Zn(e,!1);return}n=setTimeout(()=>{Zn(e,!0)},Yn)};return Bt().addEventListener(`app.reachable`,e=>r(e.data.reachable),{signal:t.signal}),r(wt()),t.signal.addEventListener(`abort`,()=>clearTimeout(n)),{abort:t}},onDestroy:function(){this.abort.abort()}}));var Qn=3500;function $n(e){return setTimeout(e,Qn)}function er(e,t){let n=-1,r=!1,i=r=>{for(let i of r)i.op!==e||i.seq<=n||(n=i.seq,i.message&&t(i.message))},a=new AbortController;Bt().addEventListener(`workspace.progress`,e=>i([e.data]),{signal:a.signal});let o=N(`/api/progress`).then(e=>{n<0&&(n=e.seq)}).catch(()=>{}).then(()=>{r=!0}),s=setInterval(async()=>{if(!(!r||n<0))try{let t=await N(`/api/progress?since=${n}&op=${encodeURIComponent(e)}`);i(t.messages)}catch{}},800);return{ready:o,stop(){a.abort(),clearInterval(s)}}}var tr=[{name:`Violet`,value:`#8b5cf6`},{name:`Teal`,value:`#14b8a6`},{name:`Green`,value:`#22a05b`},{name:`Amber`,value:`#d97706`},{name:`Orange`,value:`#ea580c`},{name:`Rose`,value:`#e11d48`},{name:`Pink`,value:`#db2777`},{name:`Sky`,value:`#0284c7`}];function nr(e){if(typeof document>`u`)return;let t=document.documentElement;e.accent?t.style.setProperty(`--accent`,e.accent):t.style.removeProperty(`--accent`),document.title=e.name||`work`;let n=document.querySelector(`link[rel="icon"]`);n&&(n.href=`/api/instance/icon${e.accent?`?v=${e.accent.slice(1)}`:``}`),ct(Wt(),e.accent||``)}var rr=`_cO _ck _cB _cM`,ir=`_cS _cC`,ar=`_c0 _cM`,or=`_c1 _cN`,sr=`_do _be`,cr=`_dU _ci`,lr=`_cO _ck _cB _cM`,ur=`_cP _cN`,dr=`_d4 __`,fr=`_d7 _2 _G`,pr=`_cx _cw`,mr=`_cz __`,hr=`<header><!><div><h1> </h1><!></div><!></header>`,gr=` D%b D D l%l%l`,_r=Ce(1),vr=h(6,0,e=>_r(e,e._.q)),yr=e=>{vr._(e),S(e.a,`_ee`)},br=Ce(1),xr=h(5,0,e=>br(e,e._.p)),Sr=e=>{xr._(e),S(e.a,`_ed`)},Cr=h(1,1,e=>{O(e.a,`title`,e._.k||`Back (Esc)`),O(e.a,`aria-label`,e._.k||`Back`)}),wr=s(`u0`,e=>_(e.a,`click`,function(){e._.l?.()})),Tr=e=>{Cr._(e),S(e.a,[Ne,`_gG`]),ze(e.b),Pe(e.b,14),Je(e.b),wr(e)},Er=h(1,0,e=>O(e.a,`href`,e._.j)),Dr=e=>{Er._(e),Or._(e),S(e.a,[Ne,`_gG`]),ze(e.b),Pe(e.b,14),Je(e.b)},Or=h(1,0,e=>{O(e.a,`title`,e._.k||`Back (Esc)`),O(e.a,`aria-label`,e._.k||`Back`)});function kr(e){S(e.a,`_ea`),S(e.c,`_ec`),S(e.d,`_eb`)}var Ar=p(1,(e=>`<a>${e}</a>`)(He),(e=>` D/${e}&l`)(Qe),Dr,(e=>`<button>${e}</button>`)(He),(e=>` D/${e}&l`)(Qe),Tr),jr=j(12,e=>Ar(e,e.j?0:e.l?1:2)),Mr=w(9,e=>{jr(e),Er(e)}),Nr=w(11,jr),Pr=(e,t)=>O(e.d,`id`,t),Fr=(e,t)=>b(e.e,t),Ir=p(5,`<p><!></p>`,` D%`,Sr),Lr=w(15,e=>{Ir(e,+!e.p),xr(e)}),Rr=p(6,`<div><!></div>`,` D%`,yr),zr=w(16,e=>{Rr(e,+!e.q),vr(e)}),Br=w(10,e=>{Or(e),Cr(e)}),Vr=`<!><!><!>`,Hr=A(13,e=>b(e.a,e._._.i),e=>e._._),Ur=Hr,Wr=h(0,1,e=>L(e.a,e._.d)),Gr=e=>{Wr._(e),Kr._(e),R(e.a,`M5 7L10 12L5 17 M13 17H20`)},Kr=h(0,1,e=>P(e.a,e._.f)),qr=h(0,0,e=>S(e.a,[`_m`,e._.f])),Jr=e=>{qr._(e),Yr._(e),Xr._(e),Zr._(e)},Yr=h(0,0,e=>{O(e.a,`width`,e._.g),O(e.a,`height`,e._.g)}),Xr=h(0,0,e=>O(e.b,`d`,e._.h)),hee=p(2,`<circle cx=18 cy=18 r=6.5 fill="var(--panel, canvas)"></circle><text x=18 y=18 text-anchor=middle dominant-baseline=central font-size=9 font-weight=700 font-family="system-ui, sans-serif" fill=currentColor> </text>`,`bD `,Ur),Zr=h(0,0,e=>hee(e,+!e._.i)),gee=w(6,Yr),Qr=w(3,e=>{gee(e,e.d??15),Wr(e)}),_ee=p(0,`<svg viewBox="0 0 24 24" fill=currentColor fill-rule=evenodd aria-hidden=true><path></path><!></svg>`,` D b%`,Jr,I,(e=>`/${e}&`)(F),Gr),vee=w(7,e=>{_ee(e,+!e.h),Xr(e)}),yee=k(Hr),bee=w(8,e=>{Zr(e),yee(e)}),$r=(e,t)=>{vee(e,Dn(kn(t))?.icon),bee(e,An(t))},ei=w(5,e=>{qr(e),Kr(e)}),xee=`_g5 _X`,ti=I,ni=(e=>`/${e}&`)(F);function ri(e){R(e.a,`M20.0429 21H3.95705C2.41902 21 1.45658 19.3364 2.22324 18.0031L10.2662 4.01533C11.0352 2.67792 12.9648 2.67791 13.7338 4.01532L21.7768 18.0031C22.5434 19.3364 21.581 21 20.0429 21Z M12 9V13 M12 17.01L12.01 16.9989`)}var ii=(e,t)=>L(e.a,t),ai=(e,t)=>P(e.a,t),oi=`<div><div><!><!><!></div><div><!><!></div></div>`,si=` D D%b%b%l D%b%m`;function See(e,t){if(!e)return null;let n=new Date(e).getTime()-Date.now();return n<=0?t?null:`now`:Pn(n)}var ci=h(7,0,e=>b(e.b,e._.q)),Cee=e=>{ci._(e),rt(e.a),Oe(e.a,12),on(e.a)},li=h(7,0,e=>b(e.b,e._.q)),ui=e=>{li._(e),S(e.a,xee)},di=p(7,(e=>`${e} <!>`)(Re),(e=>`/${e}&b%b`)(nt),Cee),fi=w(16,e=>{di(e,+!e.q),ci(e)}),pi=j(12,e=>fi(e,See(e.l,e._.p!=null))),mi=i(6,pi),hi=e=>{mi._(e),S(e.a,`_g6`),S(e.b,`_g7`),S(e.d,`_g8`),S(e.h,`_hi`)},gi=j(15,e=>O(e.a,`title`,`${e.n}: ${e.o} used${e.l?`, resets ${new Date(e.l).toLocaleString()}`:``}`),2),_i=w(14,e=>{b(e.g,e.o),gi(e)}),vi=(e,t)=>S(e.e,[`_g9`,t]),yi=(e,t)=>S(e.f,[`_hd`,t]),bi=(e,t)=>{ge(e.e,`width:${Math.min(100,Math.max(2,t))}%`),_i(e,Nn(t)),vi(e,t>=90?`_hc`:t>=70?`_hb`:t>=40?`_ha`:`_g_`),yi(e,t>=90?`_hh`:t>=70?`_hg`:t>=40?`_hf`:`_he`)},xi=w(11,e=>{pi(e),gi(e)}),Si=w(13,e=>{b(e.c,e.n),gi(e)}),Ci=(e,t)=>{bi(e,t[0]?.used_percent),xi(e,t[0]?.resets_at),Si(e,t[0]?.window)},wi=j(3,e=>O(e.a,`title`,`${e._.q||`provider unreachable`}. Last cached numbers, ${Pn(e._.p*1e3)} old`)),Ti=h(4,0,e=>{b(e.c,Pn(e._.p*1e3)),wi(e)}),Ei=e=>{Ti._(e),Di._(e),S(e.a,`_g3`),ri(e.b),ii(e.b,12),ai(e.b)},Di=h(4,0,wi),Oi=h(3,0,e=>b(e.b,e._.o.replace(/^default_/,``).replaceAll(`_`,` `))),ki=e=>{Oi._(e),S(e.a,`_g2`)},Ai=h(2,0,e=>b(e.b,e._.n)),ji=e=>{Ai._(e),S(e.a,`_hj`)},Mi=(e,t)=>{Ni(e,t?.agent),Pi(e,t?.plan),Ii(e,t?.stale_seconds),Ri(e,t?.note),Bi(e,t?.windows)},Ni=w(13,Ai),Pi=w(14,Oi),Fi=p(4,(e=>`<span>${e} <!> old</span>`)(ti),(e=>` D/${e}&b%l`)(ni),Ei),Ii=w(15,e=>{S(e.f,[`_g4`,{_hk:e.p!=null}]),Fi(e,+(e.p==null)),Ti(e),mi(e)}),Li=p(7,`<p> </p>`,` D `,ui),Ri=w(16,e=>{Li(e,+!e.q),Di(e),li(e)}),zi=m(6,`<div><span> </span><span><span></span></span><span> </span><span></span></div>`,` D D l D l D l `,hi,Ci),Bi=(e,t)=>zi(e,[t||[],`window`]),Vi=p(3,`<span> </span>`,` D `,ki),Hi=e=>{Vi(e,e.o&&e.o.toLowerCase()!==e.n.toLowerCase()?0:1)},Ui=w(10,e=>{Mi(e,e.k),Hi(e)}),Wi=p(2,`<strong> </strong>`,` D `,ji),Gi=(e,t)=>{S(e.a,[`_gZ`,{_g0:t}]),Wi(e,+!!t)};function Ki(e){S(e.b,`_g1`)}var qi=I,Ji=(e=>`/${e}&`)(F);function Yi(e){R(e.a,`M6 12H12M18 12H12M12 12V6M12 12V18`)}var Xi=(e,t)=>L(e.a,t),Zi=(e,t)=>P(e.a,t),Qi=`<svg viewBox="0 0 24 24" fill=currentColor aria-hidden=true><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path></svg>`,$i=(e,t)=>{O(e.a,`width`,t),O(e.a,`height`,t)},ea=(e,t)=>$i(e,t??iee.md),ta=(e,t)=>S(e.a,[`_m`,t]),na=I,ra=(e=>`/${e}&`)(F);function ia(e){R(e.a,`M5 13L9 17L19 7`)}var aa=(e,t)=>L(e.a,t),oa=(e,t)=>P(e.a,t),sa=`<div><!><!><!><!></div>`,ca=` D%b%b%b%l`,la=e=>{S(e.a,[`_gO`,`_gV`]),S(e.b,`_G`)},ua=h(3,0,e=>b(e.b,e._.w)),da=e=>{ua._(e),S(e.a,[`_gO`,`_gY`])},fa=h(2,0,e=>{O(e.e,`href`,`https://${e._.r}/login/device`),b(e.f,e._.r)}),pa=s(`D2`,e=>_(e.e,`click`,function(t){t.preventDefault(),Fe(`https://${e._.r}/login/device`,{system:!0})})),ma=e=>{fa._(e),ha._(e),S(e.a,[`_gO`,`_gV`]),S(e.b,`_G`),S(e.c,`_gW`),S(e.e,`_gX`),pa(e)},ha=h(2,0,e=>b(e.d,e._.u)),ga=s(`D3`,e=>_(e.f,`click`,function(){aee(e.i),e._.p?.()})),_a=e=>{S(e.a,[`_gO`,`_gP`]),S(e.b,`_gQ`),S(e.c,`_gR`),S(e.e,`_gS`),S(e.f,[M,`_gU`]),ga(e)},va=w(8,e=>{b(e.d,e.i),O(e.f,`title`,`Ask about ${e.i} again`)}),ya=(e,t)=>va(e,t[0]?.org),ba=h(5,0,e=>O(e.b,`title`,`Ignore ${e._.i} — stop asking about it`)),xa=s(`D1`,e=>{_(e.a,`click`,function(){e._._.z()}),_(e.b,`click`,function(){at(e._.i),e._._.p?.()})}),Sa=p(5,`<button type=button title="Re-authorize GitHub CLI (same device flow as Sign in)">Authorize</button><button type=button>Ignore</button>`,` b `,e=>{ba._(e),S(e.a,[M,`_r`]),S(e.b,[M,`_gU`]),xa(e)}),Ca=i(1,e=>Sa(e,+!!e._.x)),wa=e=>{Ca._(e),S(e.a,`_gO`),S(e.b,`_gQ`),S(e.c,`_gR`),S(e.e,[`_gS`,`_gT`])},Ta=w(8,e=>{b(e.d,e.i),ba(e)}),Ea=(e,t)=>Ta(e,t[0]?.org),Da=m(4,`<div><span><span> </span><span>Ignored</span></span><button type=button>Undo</button></div>`,` D D D l l `,_a,ya),Oa=(e,t)=>Da(e,[t,`org`]),ka=(e,t)=>Oa(e,t||[]),Aa=w(25),ja=j(24,e=>Aa(e,Xa(e)),3),Ma=w(17,e=>{ja(e),fa(e)}),Na=(e,t)=>Ma(e,t||`github.com`),Pa=w(23,e=>{ja(e),Ca(e)}),Fa=j(19,e=>Pa(e,e.l||e.s)),Ia=p(2,`<div><span></span> Enter code <strong> </strong> at <a><!>/login/device</a></div>`,` D c D lb D%`,ma,`<div><span></span>Starting GitHub re-authorization…</div>`,` D `,la),La=j(21,e=>Ia(e,e.s&&e.u?0:e.s?1:2)),Ra=a(18,e=>{Fa(e),La(e)}),za=a(20,e=>{La(e),ha(e)}),Ba=p(3,`<p> </p>`,` D `,da),Va=a(22,e=>{Ba(e,+!e.w),ua(e)});function Ha(e){Ra(e,!1),za(e,null),Va(e,null)}var Ua=w(11,Fa),Wa=w(12,ja),Ga=w(13,ja),Ka=(e,t)=>S(e.a,[`_gN`,t]),qa=m(1,`<div><span><span> </span><span title="Repos and PRs in this org stay hidden until the GitHub CLI is authorized for it.">SSO not authorized</span></span><!></div>`,` D D D l l%`,wa,Ea),Ja=(e,t)=>{Na(e,t?.[0]?.host),qa(e,[t,`org`])},Ya=w(15),Xa=e=>async()=>{if(e.x)return;if(Va(e,null),e.m){await e.m();return}Ra(e,!0),za(e,null);let t=er(`setup:${e.r}`,t=>{let n=/one-time code:\s*([A-Z0-9]{4}-[A-Z0-9]{4})/i.exec(t)?.[1];n&&za(e,n)});await t.ready;try{await N(`/api/setup/${encodeURIComponent(e.r)}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`auth-refresh`})}),await e.n?.()}catch(t){Va(e,String(t.message||t))}finally{t.stop(),Ra(e,!1),za(e,null)}};n(`D0`,Xa);var Za=`<li></li>`,Qa=e=>S(e.a,[`_co`,`_x`]),$a=Ce(0),eo=A(22,e=>$a(e,e._._.m),e=>e._._),to=eo,no=Ce(1),ro=A(21,e=>no(e,e._._.l),e=>e._._),io=e=>{ro(e),S(e.a,`_cA`)},ao=Ce(1),oo=A(20,e=>ao(e,e._._.k),e=>e._._),so=e=>{oo(e),S(e.a,`_cn`)},co=A(18,e=>b(e.b,e._._.i),e=>e._._),lo=e=>{co(e),S(e.a,`_co`)},uo=A(17,e=>O(e.a,`href`,e._._.h),e=>e._._),fo=e=>{uo(e),po(e),S(e.a,[`_co`,`_K`])},po=A(18,e=>{O(e.a,`title`,`Open ${e._._.i} on GitHub`),b(e.b,e._._.i)},e=>e._._),mo=A(16,e=>{O(e.a,`title`,e._._.g),b(e.b,e._._.g)},e=>e._._),ho=e=>{mo(e),S(e.a,`_co`)},go=A(15,e=>b(e.b,e._._.f),e=>e._._),_o=e=>{go(e),S(e.a,`_cy`)},vo=h(0,1,e=>{O(e.a,`title`,`About ${e._.e}`),b(e.b,e._.e),b(e.f,e._.e)}),wee=(e,t)=>{O(e.a,`popovertarget`,t),O(e.d,`id`,t)},Tee=s(`C0`,e=>_(e.d,`toggle`,function(t,n){if(t.newState===`open`){let t=e.a.getBoundingClientRect(),r=t.bottom+4,i=r+n.offsetHeight>window.innerHeight-8?t.top-n.offsetHeight-4:r;n.style.top=`${Math.max(8,i)}px`,n.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-n.offsetWidth-8))}px`}})),Eee=e=>{vo._(e),yo._(e),bo._(e),So._(e),Co._(e),wo._(e),To._(e),Eo._(e),Do._(e),S(e.a,`_cw`),S(e.d,mr),S(e.e,[`_cm`,`_y`]),wee(e,f(e)),Tee(e)},Dee=p(2,`<span> </span>`,` D `,_o),yo=h(0,1,e=>Dee(e,+!e._.f)),Oee=p(6,`<span> </span>`,` D `,ho),bo=h(0,1,e=>Oee(e,+!e._.g)),kee=p(7,`<a target=_blank rel=noopener> </a>`,` D `,fo,`<span> </span>`,` D `,lo,`<span title="Not installed from a source, so it cannot be updated">local only</span>`,` `,Qa),xo=j(11,e=>kee(e,e._.h?0:e._.i?1:e._.j?2:3),2),So=h(0,1,xo),Co=h(0,1,xo),wo=h(0,1,xo),Aee=p(8,`<span><!></span>`,` D%`,so),To=h(0,1,e=>Aee(e,+!e._.k)),jee=p(9,`<div><!></div>`,` D%`,io),Eo=h(0,1,e=>jee(e,+!e._.l)),Mee=p(10,`<!><!><!>`,`b%`,to),Do=h(0,1,e=>Mee(e,+!e._.m)),Oo=h(0,0,e=>O(e.a,`title`,e._.d||`Starting…`)),Nee=e=>{Oo._(e),ko._(e),S(e.a,pr),S(e.b,`_G`)},ko=h(0,0,e=>b(e.c,e._.e));function Pee(e){S(e.a,`_cv`)}var Fee=p(0,`<span><span></span> </span>`,` D b `,Nee,`<button><!><!></button><div popover=auto><span> </span><!><!><!><!></div><!><!>`,` D%b%l D D l%b%b%b%l%`,Eee),Iee=w(3,e=>{Fee(e,+(e.d==null)),Oo(e)}),Lee=w(4,e=>{ko(e),vo(e)}),Ree=k(go),zee=w(5,e=>{yo(e),Ree(e)}),Bee=k(mo),Vee=w(6,e=>{bo(e),Bee(e)}),Hee=k(uo),Uee=w(7,e=>{So(e),Hee(e)}),Wee=k(po,co),Gee=w(8,e=>{Co(e),Wee(e)}),Kee=w(9,wo),qee=k(oo),Jee=w(10,e=>{To(e),qee(e)}),Yee=k(ro),Xee=w(11,e=>{Eo(e),Yee(e)}),Zee=k(eo),Qee=w(12,e=>{Do(e),Zee(e)}),$ee=I,ete=(e=>`/${e}&`)(F);function tte(e){R(e.a,`M2 21L17 21 M21 21L22 21 M2 16.4V3.6C2 3.26863 2.26863 3 2.6 3H21.4C21.7314 3 22 3.26863 22 3.6V16.4C22 16.7314 21.7314 17 21.4 17H2.6C2.26863 17 2 16.7314 2 16.4Z`)}var nte=(e,t)=>L(e.a,t),rte=(e,t)=>P(e.a,t),ite=I,ate=(e=>`/${e}&`)(F);function ote(e){R(e.a,`M12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18Z M22 12L23 12 M12 2V1 M12 23V22 M20 20L19 19 M20 4L19 5 M4 20L5 19 M4 4L5 5 M1 12L2 12`)}var ste=(e,t)=>L(e.a,t),cte=(e,t)=>P(e.a,t),lte=I,ute=(e=>`/${e}&`)(F);function dte(e){R(e.a,`M3 11.5066C3 16.7497 7.25034 21 12.4934 21C16.2209 21 19.4466 18.8518 21 15.7259C12.4934 15.7259 8.27411 11.5066 8.27411 3C5.14821 4.55344 3 7.77915 3 11.5066Z`)}var fte=(e,t)=>L(e.a,t),pte=(e,t)=>P(e.a,t),mte=`_gM _gI`,Ao=`<button><!></button>`,jo=` D%l`,Mo=y(1),hte=s(`f0`,e=>E(e,`a`)),No=w(5,e=>{fe(e,`a`,{type:`submit`,...e.f}),hte(e)});ne[4]=eee;var Po=`<dialog><div><!></div><!></dialog>`,Fo=` D D%l%l`,Io=y(2),gte=we(`s0`,`Done`),_te=e=>{S(e.a,`_gL`),Mo(e.b,gte(e)),No(e.b,{class:[`_q`,`_r`]})},vte=Ce(1),Lo=h(3,0,e=>vte(e,e._.p)),yte=e=>{Lo._(e),S(e.a,`_gL`)},bte=w(20,e=>O(e.a,`closedby`,e.u?`any`:`none`)),Ro=(e,t)=>bte(e,t!==!1),xte=s(`s3`,e=>{{let t=e.a;e.v?t.open||t.showModal():t.open&&t.close()}}),zo=c(21,xte),Bo=j(9,e=>zo(e,e.h,e.i)),Vo=w(7,Bo),Ho=p(3,`<form method=dialog><!></form>`,` D%`,yte,(e=>`<form method=dialog>${e}</form>`)(Ao),(e=>` D/${e}&l`)(jo),_te),Uo=j(14,e=>Ho(e,e.n?0:e.i?1:2)),Wo=w(8,e=>{Bo(e),Uo(e)}),Go=(e,t)=>S(e.a,[`_gH`,t]),Ko=j(18,e=>O(e.a,`aria-label`,e.r?e.q:e.q||e.k),2),qo=w(17,e=>{O(e.a,`aria-labelledby`,e.r),Ko(e)}),Jo=w(10,Ko),Yo=w(16,Ko),Xo=s(`s2`,e=>{_(e.a,`cancel`,function(t){t.preventDefault(),e.u&&zo(e,!1)}),_(e.a,`close`,function(){e.v&&zo(e,!1)})});function Zo(e){S(e.b,`_gK`),Xo(e)}var Qo=s(`s1`,e=>E(e,`a`)),$o=w(19,e=>{D(e,`a`,{...e.t,open:null},{class:1,"aria-labelledby":1,"aria-label":1,closedby:1,"on-cancel":1,"on-close":1},r),Qo(e)}),es=w(13,e=>{ts(e,e.n?.content),Uo(e)}),ts=w(15,Lo),ns=Po,rs=(e=>`/${e}&`)(Fo),is=we(`v3`,`Cancel`),as=t(2,`B2`),os=A(17,e=>b(e.b,e._.i)),ss=s(`v5`,e=>{Se(e,`c`),_(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._.n()):t.key===`Escape`&&e._.l&&Ds(e._,!1)})}),cs=e=>{os(e),ls(e),us(e),ds(e),S(e.a,`_gJ`),ss(e)},ls=A(19,e=>O(e.c,`placeholder`,e._.k)),us=A(20,e=>de(e,`c`,e._.l,Fs(e))),ds=A(21,e=>O(e.a,`id`,e._.q)),fs=we(`v7`,`<h2> </h2><input>`,` D l `,cs,0,`B2`),ps=A(18,e=>b(e.d,e._.j||`OK`)),ms=s(`v4`,e=>_(e.c,`click`,function(){e._.n()})),hs=e=>{ps(e),gs(e),S(e.a,`_z`),Mo(e.b,is(e)),No(e.b,{class:`_q`}),S(e.c,[`_q`,`_r`]),ms(e)},gs=A(20,e=>O(e.c,`disabled`,!e._.l.trim())),_s=we(`v6`,(e=>`<div></div>${e}<button type=button> </button>`)(Ao),(e=>` b/${e}& D l`)(jo),hs),vs=w(13),ys=j(12,e=>vs(e,Is(e))),bs=k(gs,us),xs=a(11,e=>{ys(e),bs(e)}),Ss=(e,t)=>xs(e,t||``),Cs=w(4,ys),ws=w(16,e=>qo(e.a,e.q)),Ts=s(`v8`,e=>d(e,{onMount:function(){setTimeout(()=>{let t=as(e)();t?.focus(),t?.select()},0)}}));function Es(e){Zo(e.a),es(e.a,dn({content:_s(e)})),Io(e.a,fs(e)),Go(e.a,mte),Wo(e.a,Ls(e)),Yo(e.a),Ro(e.a),$o(e.a,{}),ws(e,f(e)),Ts(e)}var Ds=c(14,e=>Vo(e.a,e.o)),Os=j(7,e=>Ds(e,e.f,e.g)),ks=w(5,Os),As=w(6,Os),js=k(os),Ms=w(8,e=>{Jo(e.a,e.i),js(e)}),Ns=w(9,k(ps)),Ps=w(10,k(ls)),Fs=e=>t=>{xs(e._,t)},Is=e=>()=>{let t=e.l.trim();t&&e.e(t)},Ls=e=>t=>{Ds(e,t)};n(`v0`,Fs),n(`v1`,Is),n(`v2`,Ls);var Rs=((e,t,n)=>`<div role=region><div><div>${e}<!><!><section><div><h2>Agents</h2><div></div><label><span>Default</span><span><select aria-label="Default agent (starts when a workspace has no session yet)" title="Starts when a workspace has no session yet"></select></span></label></div><ul><!><!></ul><!></section><section><div><h2>GitHub</h2><!><!></div><div></div><!></section><section><div><h2>Machine</h2></div><div><div><div><button>${t}<span>Skills</span><!></button><!><!></div><!></div><div><div><button>${n}<span>Tools</span><span><!> installed <!><!></span></button><!><!><!><!></div><!></div></div></section><section><div><h2>Appearance</h2></div><div><div><img alt aria-hidden=true><span><span> </span><span>Sidebar, tab title, home-screen icon and notifications</span></span></div><label><span>Name</span><input type=text placeholder=work maxlength=32 autocomplete=off spellcheck=false></label><div><span>Theme</span><span><span role=radiogroup aria-label="Color theme"></span><span><select aria-label="Color theme"></select></span></span></div><div><span>Accent</span><span role=radiogroup aria-label="Accent colour"><button type=button role=radio title="Default (blue)" aria-label="Default (blue)"></button><!><label><input type=color aria-label="Custom accent colour"><!></label></span></div></div></section><section><div><h2>Backup</h2></div><div><div><div><div></div><!></div><!></div><div><div><div></div><!></div><!></div></div></section></div></div></div><!><!>`)(hr,Ue,Ue),zs=((e,t,n)=>` D D D/${e}&%b%b D D b b D b D n D%b%l%l D D b%b%l b%l D D l D D D D/${t}& b%l%b%l%l D D D/${n}& b D%c%b%m%b%b%b%l%n D D l D D b D D l m D b l D b D b D n D b D b%b D b%p D D l D D D b%l%l D D b%l%q%c`)(gr,Ge,Ge),Bs={"github-auth":`GitHub sign-in`,agent:`an agent CLI`};function Vs(e,t){return t.find(t=>RegExp(`^${t.id}\\d*$`).test(e))?.id??null}var Hs=null,Us=null;function Ws(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:String(e)}function Gs(e){let t=e.trim();return t.includes(`/`)&&!/\s/.test(t)}var Ks=A(8,e=>b(e.a,e._._.d),e=>e._._),qs=Ks,Js=A(9,e=>b(e.b,e._._.e.join(`, `)),e=>e._._),Ys=e=>{Js(e),Xs(e)},Xs=A(10,e=>b(e.a,e._._.f),e=>e._._),Zs=A(9,e=>b(e.b,e._._._.e.join(`, `)),e=>e._._._),Qs=e=>{Zs(e),$s(e)},$s=A(10,e=>b(e.a,e._._._.f===1?``:`s`),e=>e._._._),ec=e=>S(e.a,`_N`),tc=e=>S(e.a,[`_N`,`_P`]),nc=h(7,1,e=>b(e.b,e._.n)),rc=e=>{nc._(e),S(e.a,[`_N`,At.warn])},ic=e=>S(e.a,`_cq`),ac=A(344,e=>{b(e.a,e._._._._.gu),b(e.b,e._._._._.gu===1?``:`s`)},e=>e._._._._),oc=e=>{ac(e),cc(e)},sc=p(2,`, add host<!> <!>`,`b%c%`,Qs),cc=A(10,e=>sc(e,+!e._._.f),e=>e._._),lc=e=>S(e.a,`_co`),uc=e=>{S(e.a,`_dS`),S(e.b,[`_N`,`_P`]),S(e.c,[`_y`,`_bb`])},dc=(e,t)=>b(e.d,t),fc=(e,t)=>dc(e,t[0]),pc=e=>{S(e.a,`_dS`),S(e.b,[`_N`,`_P`]),S(e.c,[`_y`,`_bb`])},mc=(e,t)=>b(e.d,t),hc=(e,t)=>mc(e,t[0]),gc=e=>{S(e.a,`_dS`),S(e.b,[`_N`,`_P`,At.warn]),S(e.c,[`_y`,`_bb`])},_c=(e,t)=>b(e.d,t),vc=(e,t)=>_c(e,t[0]),yc=h(2,0,e=>b(e.b,e._.f)),bc=e=>{yc._(e),S(e.a,`_y`)},xc=A(21,e=>b(e.b,e._._.r),e=>e._._),Sc=e=>{xc(e),S(e.a,[`_dS`,`_x`])},Cc=m(1,`<li><span title="Modified, not committed">M</span><span> </span></li>`,` D b D `,gc,vc),wc=h(5,0,e=>Cc(e,[e._.k,e=>e])),Tc=e=>{wc._(e),Dc._(e),kc._(e),jc._(e),S(e.a,`_dR`)},Ec=m(2,`<li><span title=Untracked>?</span><span> </span></li>`,` D b D `,pc,hc),Dc=h(5,0,e=>Ec(e,[e._.m,e=>e])),Oc=m(3,`<li><span title="Ignored by git — a restore cannot bring it back">ignored</span><span> </span></li>`,` D b D `,uc,fc),kc=h(5,0,e=>Oc(e,[e._.o,e=>e])),Ac=p(4,`<li>+<!> more</li>`,` Db%`,Sc),jc=h(5,0,e=>Ac(e,+!e._.r)),Mc=p(2,`<span> </span>`,` D `,bc),Nc=j(6,e=>Mc(e,+(e.f===e._._.g))),Pc=A(8,Nc,e=>e._._),Fc=e=>{Pc(e),S(e.a,[`_N`,At.warn])},Ic=j(8,e=>O(e.a,`title`,`${e.f}: ${e.h} commit${e.h===1?``:`s`} origin does not have`)),Lc=w(5,e=>{Ic(e),Nc(e),yc(e)}),Rc=w(7,e=>{b(e.b,e.h),Ic(e)}),zc=(e,t)=>{Lc(e,t[0]?.branch),Rc(e,t[0]?.count)},Bc=e=>{S(e.a,`_dP`),S(e.b,`_dQ`),S(e.c,`_y`)},Vc=(e,t)=>b(e.d,t),Hc=m(4,`<span><!> unpushed <!></span>`,` D%c%`,Fc,zc),Uc=(e,t)=>Hc(e,[t,`branch`]),Wc=p(5,`<ul><!><!><!><!></ul>`,` D%b%b%b%`,Tc),Gc=j(16,e=>Wc(e,e.l||e.n||e.p?0:1),2),Kc=w(11,Gc),qc=w(13,Gc),Jc=w(15,Gc),Yc=(e,t)=>{Vc(e,t[0]?.worktree),Uc(e,t[0]?.unpushed),Xc(e,t[0]?.modified),Zc(e,t[0]?.untracked),Qc(e,t[0]?.ignored),el(e,t[0]?.more)},Xc=w(10,e=>{Kc(e,e.k?.length),wc(e)}),Zc=w(12,e=>{qc(e,e.m?.length),Dc(e)}),Qc=w(14,e=>{Jc(e,e.o?.length),kc(e)}),$c=k(xc),el=w(17,e=>{jc(e),$c(e)}),tl=e=>{S(e.a,`_dO`),S(e.b,`_cm`),S(e.d,`_dN`)},nl=k(Pc),rl=w(6,e=>{b(e.c,e.g),nl(e)}),il=m(3,`<li><span><span><!>/</span><!></span><!></li>`,` D D D%l%l%`,Bc,Yc),al=(e,t)=>il(e,[t,`worktree`]),ol=(e,t)=>{rl(e,t[0]?.name),al(e,t[0]?.repos)},sl=e=>S(e.a,`_co`),cl=e=>{Yi(e.a),Xi(e.a,12),Zi(e.a)},ll=e=>{ia(e.a),aa(e.a,12),oa(e.a,`_dF`)},ul=e=>{ia(e.a),aa(e.a,12),oa(e.a,`_dF`)},dl=e=>{ia(e.a),aa(e.a,12),oa(e.a,`_dF`)},fl=(e,t)=>O(e.a,`value`,t),pl=(e,t)=>b(e.b,t),ml=(e,t)=>{fl(e,t[0]?.id),pl(e,t[0]?.label)},hl=e=>{dte(e.a),fte(e.a,14),pte(e.a)},gl=e=>{ote(e.a),ste(e.a,14),cte(e.a)},_l=e=>{tte(e.a),nte(e.a,14),rte(e.a)},vl=e=>{Pt(e.a),_t(e.a,12),Jt(e.a)},yl=e=>S(e.a,`_N`),bl=e=>S(e.a,Mt),xl=e=>S(e.a,Mt),Sl=A(25,e=>{O(e.a,`title`,e._._.n),b(e.b,e._._.n)},e=>e._._),Cl=e=>{Sl(e),S(e.a,[Mt,`_y`])},wl=A(26,e=>b(e.b,e._._._.o),e=>e._._._),Tl=e=>{wl(e),S(e.a,`_c4`)},El=e=>S(e.a,`_N`),Dl=e=>S(e.a,Mt),Ol=e=>S(e.a,Mt),kl=e=>{S(e.a,`_cQ`),S(e.b,`_G`)},Al=e=>S(e.a,`_N`),jl=h(4,1,e=>{O(e.a,`title`,e._.k),b(e.b,e._.k)}),Ml=e=>{jl._(e),S(e.a,`_co`)},Nl=e=>S(e.a,`_d6`),Pl=e=>{Me(e.a),tt(e.a,14),en(e.a,`_2`)},Fl=e=>S(e.a,fr),Il=e=>S(e.a,`_cq`),Ll=e=>{Pt(e.a),_t(e.a,12),Jt(e.a)},Rl=A(15,e=>{O(e.a,`title`,`Only installed for ${e._.k.map(jn).join(`, `)}`),b(e.b,e._.k.map(jn).join(`, `))}),zl=v(`y63`,`<span><!> only</span>`,` D%`,e=>{Rl(e),S(e.a,`_N`)}),Bl=e=>S(e.a,`_cq`),Vl=e=>S(e.a,`_N`),Hl=A(16,e=>{O(e.a,`title`,`${e._._.m} installs`),b(e.b,Ws(e._._.m))},e=>e._._),Ul=e=>{Hl(e),S(e.a,[`_N`,`_O`])},Wl=h(4,1,e=>{O(e.a,`title`,e._.l),b(e.b,e._.l)}),Gl=e=>{Wl._(e),S(e.a,`_co`)},Kl=e=>S(e.a,`_co`),ql=e=>S(e.a,`_d6`),Jl=e=>{Me(e.a),tt(e.a,14),en(e.a,`_2`)},Yl=e=>S(e.a,fr),Xl=e=>S(e.a,`_cq`),Zl=e=>{Pt(e.a),_t(e.a,14),Jt(e.a)},Ql=e=>S(e.a,[`_co`,`_db`]),$l=e=>S(e.a,`_N`),eu=h(8,2,e=>b(e.c,e._.v)),tu=e=>{eu._(e),S(e.a,[`_co`,`_db`,`_dd`]),ri(e.b),ii(e.b,12),ai(e.b)},nu=h(8,1,e=>b(e.d,e._.u||`?`)),ru=e=>{nu._(e),S(e.a,[`_co`,`_db`]),ia(e.b),aa(e.b,12),oa(e.b,`_dc`),S(e.c,`_de`)},iu=e=>{S(e.a,`_cq`),S(e.b,`_G`)},au=e=>{S(e.a,ir),Ki(e.b),Gi(e.b)},ou=(e,t)=>Ui(e.b,t),su=(e,t)=>ou(e,t[0]),cu=e=>{Ki(e.a),Gi(e.a)},lu=(e,t)=>Ui(e.a,t),uu=(e,t)=>lu(e,t[0]),du=e=>{Ki(e.a),Gi(e.a,!0)},fu=(e,t)=>Ui(e.a,t),pu=(e,t)=>fu(e,t[0]),mu=e=>{Ki(e.a),Gi(e.a,!0)},hu=(e,t)=>Ui(e.a,t),gu=(e,t)=>hu(e,t[0]),_u=e=>S(e.a,[`_N`,At.accent]),vu=e=>S(e.a,`_co`),yu=e=>S(e.a,[`_N`,At.accent]),bu=(e,t)=>{O(e.a,`value`,t),b(e.b,jn(t))},xu=(e,t)=>bu(e,t[0]),Su=e=>{S(e.a,`_du`),S(e.b,`_G`),S(e.c,`_dv`)},Cu=s(`y49`,e=>_(e.a,`click`,function(){e._._.fp(e._.a1,!e._.a2)})),wu=j(1,Cu),Tu=h(10,0,wu),Eu=e=>{Tu._(e),Du._(e),S(e.a,`_H`)},Du=h(10,0,e=>{O(e.a,`aria-checked`,e._.a2?`true`:`false`),O(e.a,`title`,e._.a2?`Shown in session pickers. Hide it`:`Hidden from session pickers. Show it`),wu(e)}),Ou=p(0,na,(e=>`/${e}&`)(ra),ul),ku=ue(75,257,3,e=>{S(e.a,[`_dD`,{_dE:e._.gf===e.d}]),O(e.a,`aria-checked`,e._.gf===e.d?`true`:`false`),Ou(e,e._.gf===e.d?0:1)}),Au=s(`y79`,e=>_(e.a,`click`,function(){e._.fn({accent:e.d})})),ju=e=>{ku._(e),Au(e)},Mu=w(3,e=>ge(e.a,`--swatch:${e.d}`)),Nu=(e,t)=>{O(e.a,`title`,t),O(e.a,`aria-label`,t)},Pu=(e,t)=>{Mu(e,t[0]?.value),Nu(e,t[0]?.name)},Fu=s(`y82`,e=>_(e.b,`change`,function(t,n){e._.fc(n)})),Iu=e=>{S(e.a,M),S(e.b,`_dK`),Fu(e)},Lu=s(`y80`,e=>_(e.a,`click`,function(){e._.fb()})),Ru=e=>{S(e.a,M),Lu(e)},zu=h(90,1,e=>b(e.b,e._.f7)),Bu=e=>{zu._(e),S(e.a,`_co`)},Vu=j(6,e=>ie(e,`b`,e._._._.f5[e._.g])),Hu=A(325,Vu,e=>e._._._),Uu=s(`y84`,e=>_(e.b,`change`,function(t,n){cb(e._._._,{...e._._._.f5,[e._.g]:n.checked})})),Wu=e=>{Hu(e),qu._(e),Ju._(e),Yu._(e),S(e.b,`_dW`),S(e.c,`_cl`),S(e.d,`_cm`),S(e.f,`_co`),Uu(e)},Gu=p(5,`<!> value<!><!><!>`,`%c%b%`,oc,`<!> to install: <!>`,`%c%`,Ys,`all <!> already installed`,`b%`,qs),Ku=j(7,e=>{S(e.a,[`_dV`,{_dX:!e._.f&&e._.g!==`settings`}]),O(e.b,`disabled`,!e._.f&&e._.g!==`settings`),Gu(e,e._.g===`settings`?0:e._.f?1:2)}),qu=h(0,0,Ku),Ju=h(0,0,e=>{Ku(e),Vu(e)}),Yu=h(0,0,e=>b(e.e,e._.h)),Xu=p(0,`<li><label><input type=checkbox><span><span> </span><span></span></span></label></li>`,`D D b D D l `,Wu),Zu=k(Ks),Qu=w(3,e=>{Xu(e,+!e.d),Zu(e)}),$u=(e,t)=>{Qu(e,t[0]?.total),td(e,t[0]?.missing),id(e,t[0]?.key),ad(e,t[0]?.label)},ed=k(Zs,Js),td=w(4,e=>{rd(e,e.e?.length),ed(e)}),nd=k(cc,$s,Xs),rd=w(5,e=>{qu(e),nd(e)}),id=w(6,Ju),ad=w(7,Yu),od=j(16,e=>ie(e,`b`,e._._._.f3.has(e.p))),sd=A(323,od,e=>e._._._),cd=s(`y83`,e=>_(e.b,`change`,function(t,n){e._._._.fd(e.p,n.checked)})),ld=e=>{sd(e),S(e.b,`_dW`),S(e.c,`_cl`),S(e.d,`_cn`),S(e.e,`_cm`),S(e.i,`_co`),cd(e)},ud=p(7,`<span>already here</span>`,` `,ec,`<span title="Add this GitHub host above first">unknown host <!></span>`,` Db%`,rc),dd=j(14,e=>{S(e.a,[`_dV`,{_dX:e.m||!!e.n}]),O(e.b,`disabled`,e.m||!!e.n),ud(e,e.m?0:e.n?1:2)}),fd=w(12,dd),pd=w(13,e=>{dd(e),nc(e)}),md=w(15,od),hd=(e,t)=>b(e.f,t),gd=p(6,`<span>archived</span>`,` `,tc),_d=(e,t)=>gd(e,t===`archived`?0:1),vd=(e,t)=>b(e.j,t.join(`, `)||`no repos`),yd=m(0,`<li><label><input type=checkbox><span><span><span> </span><!><!></span><span> </span></span></label></li>`,`D D b D D D l%b%l D `,ld,(e,t)=>{fd(e,t[0]?.exists),pd(e,t[0]?.unknownHost),md(e,t[0]?.id),hd(e,t[0]?.name),_d(e,t[0]?.status),vd(e,t[0]?.repos)}),bd=A(338,e=>yd(e,[e._._.go,`id`]),e=>e._._),xd=e=>{bd(e),S(e.a,cr)},Sd=j(11,e=>O(e.j,`disabled`,!e._.f4&&!Object.values(e._.f5).some(Boolean))),Cd=h(92,0,Sd),wd=s(`y85`,e=>{_(e.j,`click`,function(){e._.fe()}),_(e.k,`click`,function(){rb(e._,null)})}),Td=e=>{Cd._(e),Ed._(e),Dd._(e),Od._(e),kd._(e),jd._(e),Fd._(e),Id._(e),Ld._(e),Rd._(e),zd._(e),S(e.a,`_dL`),S(e.b,`_dM`),S(e.g,cr),S(e.i,`_dT`),S(e.j,[M,`_r`]),S(e.k,M),wd(e)},Ed=h(92,0,Sd),Dd=h(92,0,e=>b(e.c,e._.gl)),Od=h(92,0,e=>b(e.d,new Date(e._.gm).toLocaleDateString())),kd=h(92,0,e=>b(e.e,e._.gn?` (work ${e._.gn})`:``)),Ad=p(5,`<ul></ul>`,` `,xd,`<p>No workspaces in this file.</p>`,` `,ic),jd=h(92,0,e=>Ad(e,+!e._.gp)),Md=m(7,`<!><!><!>`,`b%`,0,$u),Nd=(e,t)=>Md(e,[t,`key`]),Pd=j(12,e=>Nd(e,[{key:`tools`,label:`Tools`,missing:e._.gq.filter(e=>!e.installed).map(e=>e.name),total:e._.gq.length},{key:`skills`,label:`Skills`,missing:e._.gr.filter(e=>!e.installed).map(e=>e.id),total:e._.gr.length},{key:`agents`,label:`Agents`,missing:e._.gs.filter(e=>!e.installed).map(e=>e.label),total:e._.gs.length},{key:`settings`,label:`Settings`,missing:e._.gt.filter(e=>!e.known).map(e=>e.host),total:e._.gu+e._.gt.length}]),4),Fd=h(92,0,Pd),Id=h(92,0,Pd),Ld=h(92,0,Pd),Rd=h(92,0,Pd),zd=h(92,0,Pd),Bd=A(320,e=>{b(e.a,e._._.ey),b(e.b,e._._.ey===1?``:`s`)},e=>e._._),Vd=e=>{Bd(e),Ud(e)},Hd=p(2,`,`),Ud=A(321,e=>Hd(e,+!e._._.ez),e=>e._._),Wd=h(87,0,e=>{b(e.c,e._.et),b(e.d,e._.et===1?``:`s`)}),Gd=s(`y81`,e=>{_(e.q,`click`,function(){e._.f9()}),_(e.s,`click`,function(){nb(e._,null)})}),Kd=e=>{Wd._(e),qd._(e),Jd._(e),Yd._(e),Xd._(e),Qd._(e),$d._(e),tf._(e),S(e.a,`_dL`),S(e.b,`_dM`),S(e.l,`_dM`),S(e.o,`_dN`),S(e.p,`_dT`),S(e.s,M),Gd(e)},qd=h(87,0,e=>b(e.e,e._.eu?`${x(` `)}(${x(e._.eu)} archived)`:``)),Jd=h(87,0,e=>{b(e.f,e._.ev),b(e.g,e._.ev===1?``:`s`)}),Yd=h(87,0,e=>{b(e.h,e._.ew),b(e.i,e._.ew===1?``:`s`)}),Xd=h(87,0,e=>{b(e.j,e._.ex),b(e.k,e._.ex===1?``:`s`)}),Zd=p(12,` <!> unpushed commit<!><!><!>`,`b%c%b%`,Vd),Qd=h(87,0,e=>{S(e.q,[M,{_r:!e._.ey}]),b(e.r,e._.ey?`Export anyway`:`Export`),Zd(e,+!e._.ey)}),$d=h(87,0,e=>b(e.n,e._.ez?`${x(` `)}${x(e._.ez)} uncommitted file${x(e._.ez===1?``:`s`)}`:``)),ef=m(14,`<li><span> </span><ul></ul></li>`,` D D l `,tl,ol),tf=h(87,0,e=>ef(e,[e._.f0,`id`])),nf=h(90,0,e=>b(e.c,e._.ep||`Restoring…`)),rf=e=>{nf._(e),S(e.a,`_cQ`),S(e.b,`_G`)},af=h(85,0,e=>b(e.c,e._.ep||`Checking workspaces…`)),of=e=>{af._(e),S(e.a,`_cQ`),S(e.b,`_G`)},sf=s(`y61`,e=>_(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.en(e._.i,{action:`update`,id:e._.i})})),cf=v(`y64`,`<button>Update</button>`,` `,e=>{S(e.a,M),sf(e)}),lf=s(`y58`,e=>_(e.a,`click`,function(){e._._._._.en(e._._.j,{action:`add`,source:e._._.l||e._._.j})})),uf=e=>{S(e.a,M),lf(e)},df=p(0,`<span> </span>`,` D `,Ul),ff=h(5,0,e=>df(e,+!e._.m)),pf=e=>{ff._(e),hf._(e)},mf=p(1,`<span>installed</span>`,` `,Vl,`<button>Add</button>`,` `,uf),hf=h(5,0,e=>mf(e,+!e._.n)),gf=s(`y76`,e=>_(e.a,`click`,function(){e._._._._.ef(e._._.k,`install`)})),_f=e=>{S(e.a,M),gf(e)},vf=j(2,e=>O(e.a,`title`,`v${e._._.p} is out; ${e._._.o} holds ${e._._.j} at v${e._._.m}. Pin v${e._._.p} instead`),3),yf=A(22,vf,e=>e._._),bf=s(`y75`,e=>_(e.a,`click`,function(){e._._._._.ef(e._._.k,`install`,e._._.p)})),xf=e=>{yf(e),Sf(e),Cf(e),wf(e),S(e.a,[`_c5`,`_y`]),bf(e)},Sf=A(24,vf,e=>e._._),Cf=A(26,vf,e=>e._._),wf=A(27,e=>{b(e.b,e._._.p),vf(e)},e=>e._._),Tf=A(28,e=>{O(e.a,`title`,`Update to v${e._._.q}`),b(e.c,e._._.q)},e=>e._._),Ef=s(`y74`,e=>_(e.a,`click`,function(){e._._._._.ef(e._._.k,`update`)})),Df=e=>{Tf(e),S(e.a,[M,`_c6`]),tn(e.b),ht(e.b,12),rn(e.b),Ef(e)},Of=s(`y53`,e=>_(e.a,`click`,function(){e._._._.ef(e._._.q,`auth`)})),kf=e=>{S(e.a,[M,`_r`]),Of(e)},Af=s(`y48`,e=>_(e.a,`click`,function(){e._._.ef(e._.s,`install`)})),jf=e=>{S(e.a,M),Af(e)},Mf=s(`y68`,e=>_(e.a,`click`,function(){Bne(e._)()?.focus({preventScroll:!0}),jy(e._,!0)})),Nf=e=>{S(e.a,Ne),Yi(e.b),Xi(e.b,16),Zi(e.b),Mf(e)},Pf=s(`y56`,e=>_(e.a,`click`,function(){yh(e._)()?.focus({preventScroll:!0}),Ay(e._,!0)})),Ff=e=>{S(e.a,Ne),Yi(e.b),Xi(e.b,16),Zi(e.b),Pf(e)},If=p(0,`Remove?`,0,0,$t,(e=>`/${e}&`)(bt),Ll),Lf=j(1,e=>{S(e.a,[lee,`_8`,`_9`,{_s:e._._._.dn===e._.i}]),If(e,e._._._.dn===e._.i?0:1)}),Rf=j(2,e=>O(e.a,`title`,e._._._.dn===e._.i?`Remove ${e._.d}?`:`Remove ${e._.d}`),2),zf=A(309,e=>{Lf(e),Rf(e)},e=>e._._._),Bf=s(`y62`,e=>_(e.a,`click`,function(){e._._._.dn===e._.i?(Sy(e._._._,null),e._._._.en(e._.i,{action:`remove`,id:e._.i})):(Sy(e._._._,e._.i),$n(()=>{e._._._.dn===e._.i&&Sy(e._._._,null)}))})),Vf=e=>{zf(e),Hf(e),Uf(e),Bf(e)},Hf=A(13,Rf),Uf=A(14,e=>{Lf(e),Rf(e)}),Wf=v(`y65`,`<button></button>`,` `,Vf),Gf=A(305,e=>b(e.b,e._._.dj),e=>e._._),Kf=e=>{Gf(e),S(e.a,`_d6`)},qf=s(`y57`,e=>_(e.a,`click`,function(){e._._._.en(e._._._.dj.trim(),{action:`add`,source:e._._._.dj.trim()})})),Jf=e=>{S(e.a,M),qf(e)},Yf=h(34,0,e=>b(e.b,e._.df)),Xf=e=>{Yf._(e),S(e.a,`_cI`)},Zf=ue(68,142,5,e=>{S(e.a,[`_bg`,`_dB`,{_bf:e._.d8===e.f}]),O(e.a,`aria-checked`,e._.d8===e.f?`true`:`false`)}),Qf=s(`y78`,e=>_(e.a,`click`,function(){e._.dx(e.f)})),$f=e=>{Zf._(e),Qf(e)},ep=p(1,$ee,(e=>`/${e}&`)(ete),_l,ite,(e=>`/${e}&`)(ate),gl,lte,(e=>`/${e}&`)(ute),hl),tp=w(5,e=>ep(e,e.f===`system`?0:e.f===`light`?1:2)),np=(e,t)=>b(e.c,t),rp=(e,t)=>{tp(e,t[0]?.id),np(e,t[0]?.label)},ip=A(296,e=>{O(e.a,`title`,`Update work to v${e._._._._.d4} and restart`),b(e.c,e._._._._.d4)},e=>e._._._._),ap=s(`y72`,e=>_(e.a,`click`,function(){e._._._._.e8()})),op=p(2,`<span title="Started from a checkout, not the published package">source checkout — update with git</span>`,` `,Ol,(e=>`<button>${e} <!></button>`)($e),(e=>` D/${e}&b%l`)(ke),e=>{ip(e),S(e.a,[M,`_c6`]),tn(e.b),ht(e.b,12),rn(e.b),ap(e)},`<span>up to date</span>`,` `,Dl),sp=j(3,e=>op(e,e._._._.d3===`source`?0:e._._._.d4&&e._._._.d4!==e._._._.d5?1:e._._._.d4?2:3),2),cp=A(295,sp,e=>e._._._),lp=e=>{cp(e),up(e),dp(e),S(e.a,[`_y`,Mt])},up=A(296,sp,e=>e._._._),dp=A(297,e=>{b(e.b,e._._._.d5),sp(e)},e=>e._._._),Ste=p(2,`<span><span></span>Updating — the app restarts and reloads when it is done…</span>`,` D `,kl,`<span title="Running version">v<!></span><!><!>`,` Db%l%`,lp),Cte=p(4,`<span>app</span>`,` `,El),fp=A(298,e=>{Ste(e,+!e._._.d6),Cte(e,+!!e._._.d6)},e=>e._._),wte=e=>{fp(e),S(e.a,or),S(e.b,[`_c3`,`_y`]),S(e.d,`_z`)},pp=A(296,e=>O(e.a,`title`,`Update work to v${e._._.d4} and restart`),e=>e._._),Tte=s(`y47`,e=>_(e.a,`click`,function(){e._._.e8()})),Ete=e=>{pp(e),S(e.a,[`_q`,`_r`]),Tte(e)},mp=A(296,e=>b(e.d,e._._.d4),e=>e._._),Dte=e=>{mp(e),hp(e),S(e.a,`_du`),S(e.b,`_dv`)},hp=A(297,e=>b(e.c,e._._.d5),e=>e._._),Ote=p(1,`<span><span></span> Updating work…</span><span>The app restarts and reloads when it is done.</span>`,` D l `,Su,`<span>Update available</span><span>v<!> → v<!></span>`,` b Db%c%`,Dte),kte=p(2,`<button>Update and restart</button>`,` `,Ete),gp=h(5,0,e=>{Ote(e,+!e._.d6),kte(e,+!!e._.d6)}),Ate=e=>{gp._(e),S(e.a,`_ds`),S(e.b,`_dt`)},_p=A(291,e=>b(e.b,e._._.cz),e=>e._._),jte=e=>{_p(e),S(e.a,`_d6`)},Mte=s(`y51`,e=>_(e.a,`click`,function(){Pte(e._)()?.focus({preventScroll:!0}),qv(e._,!0)})),Nte=e=>{S(e.a,[Ne,`_c8`]),Yi(e.b),Xi(e.b,16),Zi(e.b),Mte(e)},Pte=t(3,`Aw`),vp=j(8,e=>O(e.e,`disabled`,!e._.cv.trim()||e._.cy)),yp=h(22,0,e=>{de(e,`d`,e._.cv,oS(e)),vp(e)}),Fte=s(`y52`,e=>{_(e.a,`submit`,function(t){t.preventDefault();let n=e._.cv.trim().toLowerCase();n&&e._.fg(n,!1)}),Se(e,`d`),_(e.d,`keydown`,function(t){t.key===`Escape`&&(t.preventDefault(),qv(e._,!1),Kv(e._,``),e.d?.blur())}),_(e.g,`click`,function(){qv(e._,!1),Kv(e._,``),e.d?.blur()})}),Ite=e=>{yp._(e),bp._(e),xp._(e),S(e.b,[`_1`,`_d1`]),ea(e.c,14),ta(e.c,`_2`),S(e.d,[`_Z`,`_3`,`_d2`]),S(e.e,[M,`_r`,`_c7`]),S(e.g,[Ne,`_d3`]),Pt(e.h),_t(e.h,14),Jt(e.h),Fte(e)},bp=h(22,0,e=>{S(e.a,[`_dY`,`_c8`,{_dZ:!e._.cw}]),O(e.e,`hidden`,!e._.cw),O(e.g,`hidden`,!e._.cw)}),xp=h(22,0,e=>{b(e.f,e._.cy?`Adding…`:`Add`),O(e.g,`disabled`,e._.cy),vp(e)}),Lte=p(2,`<span> </span>`,` D `,Tl),Sp=j(3,e=>{O(e.a,`title`,`${e._._.h?.path||e._._.h?.label}${e._._._._.fs(e._._.h)?`, pinned to ${e._._.h?.pin}`:``}. Pin a version`),Lte(e,+!e._._._._.fs(e._._.h))}),Rte=A(330,Sp,e=>e._._._._),zte=s(`y73`,e=>_(e.a,`click`,function(){Gv(e._._._._,{id:e._._.k,label:e._._.j,current:e._._.o||e._._.m,newest:e._._.p})})),Bte=e=>{Rte(e),Cp(e),wp(e),S(e.a,[`_c5`,`_y`]),zte(e)},Cp=A(20,Sp,e=>e._._),wp=A(24,e=>b(e.b,e._._.m),e=>e._._),Vte=p(1,(e=>`<button>${e} <!></button>`)($e),(e=>` D/${e}&b%l`)(ke),Df,`<button><!> available</button>`,` D%`,xf),Tp=j(2,e=>Vte(e,e._._._.fr(e._.h)?0:e._.h?.newest?1:2)),Hte=A(329,Tp,e=>e._._._),Ute=e=>{Hte(e),Ep._(e),Dp._(e)},Ep=h(3,1,Tp),Wte=p(0,`<button>v<!><!></button>`,` Db%b%`,Bte,`<span> </span>`,` D `,Cl),Dp=h(3,1,e=>Wte(e,+!e._.m)),Gte=s(`y69`,e=>{_(e.a,`click`,function(){e._._._._.ef(e._._.i,`install`)}),_(e.b,`click`,function(){Gv(e._._._._,{id:e._._.i,label:e._._.i,current:`latest`})})}),Kte=p(0,`<span>installed</span>`,` `,Al,`<button>Install</button><button title="Install a specific version">@…</button>`,` b `,e=>{S(e.a,M),S(e.b,M),Gte(e)}),Op=h(5,0,e=>Kte(e,+!e._.m)),qte=Op,kp=j(1,e=>Cs(e.a,sS(e))),Ap=h(93,0,e=>{ks(e.a,e._.cr!=null),kp(e)}),Jte=e=>{Ap._(e),Mp._(e),Np._(e),Pp._(e),Fp._(e),Es(e.a),Ps(e.a,`latest`),Ns(e.a,`Install`),As(e.a,cS(e))},jp=j(2,e=>Ms(e.a,`Pin ${e._.cs}: latest, lts, a prefix (22), or exact (22.11.0)${e._.ct?`. Newest release: ${e._.ct}`:``}`)),Mp=h(93,0,jp),Np=h(93,0,jp),Pp=h(93,0,e=>Ss(e.a,e._.cu)),Fp=h(93,0,kp),Yte=p(0,`Remove?`,0,0,$t,(e=>`/${e}&`)(bt),vl),Ip=j(1,e=>{S(e.a,[je,`_8`,`_9`,{_s:e._._._._.cq===e._._.k}]),Yte(e,e._._._._.cq===e._._.k?0:1)}),Lp=j(2,e=>O(e.a,`title`,e._._._._.cq===e._._.k?`Remove ${e._._.j}?`:`Remove ${e._._.j}`),2),Rp=A(283,e=>{Ip(e),Lp(e)},e=>e._._._._),Xte=s(`y77`,e=>_(e.a,`click`,function(){e._._._._.cq===e._._.k?(Uv(e._._._._,null),e._._._._.ef(e._._.k,`remove`)):(Uv(e._._._._,e._._.k),$n(()=>{e._._._._.cq===e._._.k&&Uv(e._._._._,null)}))})),Zte=e=>{Rp(e),zp(e),Bp(e),Xte(e)},zp=A(22,Lp,e=>e._._),Bp=A(23,e=>{Ip(e),Lp(e)},e=>e._._),Qte=p(1,`<button>Install</button>`,` `,_f,`<button></button>`,` `,Zte),Vp=j(2,e=>Qte(e,!e._.i&&e._.r?0:e._.i&&e._.m&&!e._.t?1:2),3),Hp=h(5,0,Vp),$te=e=>{Hp._(e),Up._(e),Wp._(e),Gp._(e)},Up=h(5,0,Vp),Wp=h(5,0,Vp),ene=p(0,`<span>required</span>`,` `,yl),Gp=h(5,0,e=>{ene(e,+!e._.t),Vp(e)}),tne=p(0,`Forget?`,0,0,$t,(e=>`/${e}&`)(bt),Zl),Kp=j(1,e=>{S(e.a,[`_cp`,`_8`,`_9`,{_s:e._._._.cq===e._._.q}]),O(e.a,`title`,e._._._.cq===e._._.q?`Forget ${e._._.q}? (gh stays signed in)`:`Forget ${e._._.q}`),tne(e,e._._._.cq===e._._.q?0:1)}),qp=A(283,Kp,e=>e._._._),nne=s(`y55`,e=>_(e.a,`click`,function(){e._._._.cq===e._._.q?(Uv(e._._._,null),e._._._.fg(e._._.q,!0)):(Uv(e._._._,e._._.q),$n(()=>{e._._._.cq===e._._.q&&Uv(e._._._,null)}))})),rne=e=>{qp(e),Jp(e),nne(e)},Jp=A(30,Kp,e=>e._._),Yp=j(2,e=>{S(e.a,[M,{_t:e._._._.cq===`out:${e._._.q}`,_s:e._._._.cq===`out:${e._._.q}`}]),O(e.a,`title`,e._._._.cq===`out:${e._._.q}`?`Sign out of ${e._._.q}?`:`Sign out of ${e._._.q}`),b(e.b,e._._._.cq===`out:${e._._.q}`?`Sign out?`:`Sign out`)}),Xp=A(283,Yp,e=>e._._._),ine=s(`y54`,e=>_(e.a,`click`,function(){let t=`out:${e._._.q}`;e._._._.cq===t?(Uv(e._._._,null),e._._._.ef(e._._.q,`logout`)):(Uv(e._._._,t),$n(()=>{e._._._.cq===t&&Uv(e._._._,null)}))})),ane=e=>{Xp(e),Zp(e),ine(e)},Zp=A(30,Yp,e=>e._._),one=p(1,`<button></button>`,` `,rne),Qp=h(9,0,e=>one(e,+!e._.s)),sne=e=>{Qp._(e),$p._(e)},cne=p(0,`<button>Sign in</button>`,` `,kf,`<button> </button>`,` D `,ane),$p=h(9,0,e=>cne(e,+!!e._.t)),em=j(6,e=>b(e.f,e._._.cp.get(e._.q))),tm=A(282,em,e=>e._._),lne=e=>{tm(e),nm._(e),S(e.a,`_df`),S(e.b,`_dg`),S(e.c,`_di`),S(e.e,`_dh`)},nm=h(10,0,e=>{O(e.c,`href`,`https://${e._.q}/login/device`),b(e.d,e._.q),em(e)}),rm=j(3,e=>b(e.c,e._._._.cn.get(e._.k)||`Starting…`)),im=A(280,rm,e=>e._._._),une=e=>{im(e),am._(e),S(e.a,`_cQ`),S(e.b,`_G`)},am=h(3,0,rm),dne=p(3,`<span><span></span> </span>`,` D b `,une,`<!><!><!><!>`,`b%b%`,Ute,`<span>not installed</span>`,` `,xl,`<span title="Installed with the system package manager">system package</span>`,` `,bl),om=j(18,e=>dne(e,e._._.cn.has(e.k)?0:e.i?1:e.r?2:3),3),fne=p(5,`<!><!><!><!>`,`b%b%`,$te),sm=j(11,e=>fne(e,+!!e._._.cn.has(e.k))),cm=A(280,e=>{om(e),sm(e)},e=>e._._),pne=e=>{cm(e),S(e.b,[`_c3`,`_y`]),S(e.e,`_z`)},mne=w(8,e=>{S(e.a,[or,{_c2:!e.i}]),om(e),Hp(e)}),hne=k(zp,yf),gne=w(9,e=>{b(e.c,e.j),hne(e)}),_ne=k(Bp),vne=w(10,e=>{om(e),sm(e),am(e),_ne(e)}),yne=w(17,e=>{om(e),Wp(e)}),bne=(e,t)=>Sne(e,t[0]),xne=k(Cp),Sne=w(7,e=>{mne(e,e.h?.installed),gne(e,e.h?.label),vne(e,e.h?.id),wne(e,e.h?.version),Tne(e,e.h?.path),Ene(e,e.h?.pin),Dne(e,e.h?.newest),One(e,e.h?.latest),yne(e,e.h?.installable),kne(e,e.h?.required),Ep(e),xne(e)}),Cne=k(wp,Sf),wne=w(12,e=>{Up(e),Dp(e),Cne(e)}),Tne=w(13,k(Sl)),Ene=w(14,k(Cf,wl)),Dne=w(15,k(wf)),One=w(16,k(Tf)),kne=w(19,Gp),lm=A(280,e=>{O(e.b,`disabled`,e._._.cn.has(`mise`)),b(e.c,e._._.cn.has(`mise`)?`Installing…`:`Install mise`)},e=>e._._),Ane=s(`y71`,e=>_(e.b,`click`,function(){e._._.ef(`mise`,`install`)})),jne=e=>{lm(e),S(e.a,`_cq`),S(e.b,M),Ane(e)},um=j(3,e=>b(e.c,e._._._.cn.get(e._.i)||`Starting…`)),dm=A(280,um,e=>e._._._),Mne=e=>{dm(e),fm._(e),S(e.a,`_cQ`),S(e.b,`_G`)},fm=h(4,0,um),Nne=p(4,`<span><span></span> </span>`,` D b `,Mne,`<span> </span>`,` D `,Ml),pm=j(11,e=>Nne(e,e._._.cn.has(e.i)?0:e.k?1:2),2),Pne=p(5,`<!><!><!>`,`b%`,qte),mm=j(9,e=>Pne(e,+!!e._._.cn.has(e.i))),hm=A(280,e=>{pm(e),mm(e)},e=>e._._),Fne=e=>{hm(e),S(e.a,or),S(e.b,`_cl`),S(e.c,[`_c3`,`_y`])},Ine=w(8,e=>{b(e.d,e.i),pm(e),mm(e),fm(e)}),Lne=w(10,e=>{pm(e),jl(e)}),Rne=(e,t)=>{Ine(e,t[0]?.name),Lne(e,t[0]?.description),zne(e,t[0]?.installed)},zne=w(12,Op),Bne=t(3,`Aao`),gm=j(11,e=>de(e,`d`,e._.cz,e._.fq)),_m=j(10,e=>O(e.g,`hidden`,!e._.dv||!e._.cz.trim())),vm=h(50,0,e=>{gm(e),_m(e)}),Vne=s(`y70`,e=>{Se(e,`d`),_(e.d,`keydown`,function(t){t.key===`Escape`&&(t.preventDefault(),e._.fq(``),jy(e._,!1),e.d?.blur())}),_(e.e,`click`,function(){e._.fq(``),jy(e._,!1),e.d?.blur()})}),Hne=e=>{vm._(e),bm._(e),Sm._(e),Cm._(e),wm._(e),Tm._(e),S(e.b,[`_1`,`_d1`]),S(e.d,[`_Z`,`_3`,`_d2`]),S(e.e,[Ne,`_d3`]),Pt(e.f),_t(e.f,14),Jt(e.f),S(e.g,[dr,`_d5`]),Vne(e)},Une=m(9,`<li><div><span> </span><!></div><!></li>`,` D D D l%l%`,Fne,Rne),Wne=p(8,`<li>No tools match "<!>".</li>`,` Db%`,jte),ym=j(12,e=>Wne(e,e._.d0&&!e._.d0?.length&&!e._.d9?0:1)),bm=h(50,0,e=>{Une(e,[e._.d0||[],`name`]),ym(e)}),Gne=p(7,`<li>Searching the mise registry…</li>`,` `,Nl),xm=j(13,e=>Gne(e,e._.d9&&!e._.d1?0:1)),Sm=h(50,0,xm),Kne=p(2,`<span></span>`,` `,Fl,Ae,(e=>`/${e}&`)(Ke),Pl),Cm=h(50,0,e=>{Kne(e,+!e._.d9),xm(e),ym(e)}),wm=h(50,0,e=>{S(e.a,[`_dY`,{_dZ:!e._.dv}]),O(e.e,`hidden`,!e._.dv),_m(e)}),Tm=h(50,0,gm),Em=h(48,0,e=>O(e.a,`disabled`,e._.co>0)),qne=s(`y67`,e=>_(e.a,`click`,function(){e._.fh(e._.fv.map(e=>e.id),`install`)})),Jne=e=>{Em._(e),S(e.a,M),qne(e)},Dm=h(47,0,e=>O(e.a,`disabled`,e._.co>0)),Yne=s(`y66`,e=>_(e.a,`click`,function(){e._.fh(e._.fy,`update`)})),Xne=e=>{Dm._(e),S(e.a,M),Yne(e)},Om=j(9,e=>Iee(e.a,e._._.cn.has(e.i)?e._._.cn.get(e.i)||``:null)),km=A(280,Om,e=>e._._),Zne=e=>{km(e),jm(e),Nm(e),Pee(e.a),Kee(e.a,!0),zee(e.a)},Am=j(12,e=>{let t;e._._.dd&&e.l<(e._._.dd?.agents).length&&(t=dn({content:zl(e)})),Jee(e.a,t)}),jm=A(301,Am,e=>e._._),Mm=j(6,e=>{let t;e._._.dg&&e.f&&(t=dn({content:cf(e)})),Xee(e.a,t)}),Nm=A(304,e=>{let t;e._._.dg&&(t=dn({content:Wf(e)})),Qee(e.a,t),Mm(e)},e=>e._._),Qne=w(11,Am),$ne=w(5,e=>{Gee(e.a,e.f),Mm(e)}),ere=k(Hf),tre=w(3,e=>{Lee(e.a,e.d),ere(e)}),nre=(e,t)=>Vee(e.a,t),rre=(e,t)=>Uee(e.a,t),Pm=k(Uf),Fm=w(8,e=>{Om(e),Pm(e)}),Im=(e,t)=>{tre(e,t[0]?.name),nre(e,t[0]?.description),$ne(e,t[0]?.source),rre(e,t[0]?.sourceUrl),Fm(e,t[0]?.id),Rm(e,t[0]?.agents)},Lm=k(Rl),Rm=w(10,e=>{Qne(e,e.k?.length),Lm(e)}),zm=A(280,e=>{O(e.b,`disabled`,e._._.cn.has(`skills`)),b(e.c,e._._.cn.has(`skills`)?`Installing…`:`Install it`)},e=>e._._),Bm=s(`y60`,e=>_(e.b,`click`,function(){e._._.ef(`skills`,`install`)})),Vm=p(1,`<p>No agent CLIs are installed, so a skill would have nowhere to go. Install one from Agents above.</p>`,` `,Bl,`<p>The skills CLI is not installed, so skills can be listed but not added or removed. <button> </button></p>`,` Db D `,e=>{zm(e),S(e.a,`_cq`),S(e.b,M),Bm(e)}),Hm=p(3,`<p>No skills installed. Search below, or paste an owner/repo.</p>`,` `,Il),Um=h(37,0,e=>{Vm(e,e._.dd&&!(e._.dd?.agents).length?0:e._.dd&&!e._.dd?.available?1:2),Hm(e,e._.dd&&!(e._.dd?.global).length&&e._.dd?.available&&(e._.dd?.agents).length?0:1)}),Wm=e=>{Um._(e),Km._(e),S(e.a,`_cJ`),S(e.c,`_cu`)},Gm=m(2,Za,(e=>`/${e}&`)(` b`),Zne,Im),Km=h(37,0,e=>Gm(e,[e._.de||[],`id`])),qm=j(3,e=>b(e.c,e._._._.cn.get(e._.j)||`Starting…`)),Jm=A(280,qm,e=>e._._._),Ym=e=>{Jm(e),Xm._(e),S(e.a,`_cQ`),S(e.b,`_G`)},Xm=h(4,0,qm),Zm=p(4,`<span><span></span> </span>`,` D b `,Ym,`<span> </span>`,` D `,Gl),Qm=p(5,`<!><!><!><!>`,`b%b%`,pf),$m=j(10,e=>{Zm(e,+!e._._.cn.has(e.j)),Qm(e,+!!e._._.cn.has(e.j))}),eh=A(280,$m,e=>e._._),th=e=>{eh(e),S(e.a,or),S(e.b,`_cl`),S(e.c,[`_c3`,`_y`])},nh=(e,t)=>b(e.d,t),rh=w(9,e=>{$m(e),Xm(e)}),ih=(e,t)=>{nh(e,t[0]?.name),rh(e,t[0]?.skillId),ah(e,t[0]?.source),sh(e,t[0]?.installs),ch(e,t[0]?.installed)},ah=w(11,Wl),oh=k(Hl),sh=w(12,e=>{ff(e),oh(e)}),ch=w(13,hf),lh=j(3,e=>b(e.c,e._._._.cn.get(e._._._.dj.trim())||`Starting…`)),uh=A(280,lh,e=>e._._._),dh=e=>{uh(e),fh(e),S(e.a,`_cQ`),S(e.b,`_G`)},fh=A(305,lh,e=>e._._._),ph=p(4,`<span><span></span> </span>`,` D b `,dh,`<span>Add straight from this source</span>`,` `,Kl),mh=p(5,`<button>Add</button>`,` `,Jf),hh=j(6,e=>{ph(e,+!e._._.cn.has(e._._.dj.trim())),mh(e,+!!e._._.cn.has(e._._.dj.trim()))}),gh=A(280,hh,e=>e._._),_h=e=>{gh(e),vh(e),S(e.a,or),S(e.b,`_cl`),S(e.c,[`_c3`,`_y`])},vh=A(305,e=>{b(e.d,e._._.dj.trim()),hh(e)},e=>e._._),yh=t(3,`Aaa`),bh=p(8,`<li><div><span> </span><!></div><!></li>`,` D D D l%l%`,_h),xh=j(12,e=>de(e,`d`,e._.dj,e._.ff)),Sh=j(11,e=>O(e.g,`hidden`,!e._.dt||!e._.dj.trim())),Ch=p(7,`<li>Searching skills.sh…</li>`,` `,ql),wh=j(14,e=>Ch(e,e._.dm&&!e._.dl&&!Gs(e._.dj)?0:1),2),Th=p(10,`<li>No skills match "<!>".</li>`,` Db%`,Kf),Eh=j(13,e=>Th(e,e._.dk&&!e._.dk?.length&&!e._.dm&&!Gs(e._.dj)?0:1),2),Dh=h(36,0,e=>{bh(e,+!Gs(e._.dj)),xh(e),Sh(e),wh(e),Eh(e)}),Oh=s(`y59`,e=>{Se(e,`d`),_(e.d,`keydown`,function(t){t.key===`Escape`&&(t.preventDefault(),e._.ff(``),Ay(e._,!1),e.d?.blur())}),_(e.e,`click`,function(){e._.ff(``),Ay(e._,!1),e.d?.blur()})}),kh=e=>{Dh._(e),jh._(e),Mh._(e),Ph._(e),Fh._(e),Ih._(e),S(e.b,[`_1`,`_d1`]),S(e.d,[`_Z`,`_3`,`_d2`]),S(e.e,[Ne,`_d3`]),Pt(e.f),_t(e.f,14),Jt(e.f),S(e.g,[dr,`_d5`]),Oh(e)},Ah=m(9,`<li><div><span> </span><!></div><!></li>`,` D D D l%l%`,th,ih),jh=h(36,0,e=>{Ah(e,[e._.dk||[],`skillId`]),Eh(e)}),Mh=h(36,0,wh),Nh=p(2,`<span></span>`,` `,Yl,Ae,(e=>`/${e}&`)(Ke),Jl),Ph=h(36,0,e=>{Nh(e,+!e._.dm),wh(e),Eh(e)}),Fh=h(36,0,e=>{S(e.a,[`_dY`,{_dZ:!e._.dt}]),O(e.e,`hidden`,!e._.dt),Sh(e)}),Ih=h(36,0,xh),Lh=j(3,e=>b(e.c,e._._.cp.has(e._.q)?`Waiting for the browser…`:e._._.cn.get(e._.q)||`Starting…`),2),Rh=A(280,Lh,e=>e._._),zh=e=>{Rh(e),Bh(e),Vh._(e),S(e.a,[`_co`,`_db`]),S(e.b,`_G`)},Bh=A(282,Lh,e=>e._._),Vh=h(8,0,Lh),Hh=j(3,e=>b(e.c,e._._.cn.get(e._.s)||`Starting…`)),Uh=A(280,Hh,e=>e._._),Wh=e=>{Uh(e),Gh._(e),S(e.a,`_cQ`),S(e.b,`_G`)},Gh=h(8,0,Hh),Kh=A(279,e=>{O(e.a,`disabled`,e._.cm),on(e.b,e._.cm&&`_F`)}),qh=s(`y43`,e=>_(e.a,`click`,function(){e._.eb()})),Jh=we(`y45`,(e=>`<button title="Refresh: re-check this machine and agent usage" aria-label="Re-check this machine">${e}</button>`)(Re),(e=>` D/${e}&l`)(nt),e=>{Kh(e),S(e.a,Ne),rt(e.b),Oe(e.b,14),qh(e)}),Yh=A(278,e=>b(e.a,e._._.cl),e=>e._._),Xh=we(`y46`,` `,` `,Yh),Zh=e=>{Gt(e.a),lt(e.a,Xh(e)),Zt(e.a,`inline`),Rt(e.a,lS(e)),ot(e.a),Te(e.a),St(e.a),mt(e.a),Xe(e.a,{})},Qh=h(17,1,e=>b(e.b,e._.ck)),$h=e=>{Qh._(e),S(e.a,`_cq`)},eg=A(312,e=>Ga(e.a,uS(e)),e=>e._._),tg=e=>{eg(e),rg(e),ig._(e),ag._(e),og._(e),sg._(e),Ha(e.a),Ka(e.a,[`_cC`,`_dj`]),Ya(e.a,dS(e))},ng=j(1,e=>Wa(e.a,fS(e))),rg=A(313,ng,e=>e._._),ig=h(11,0,ng),ag=h(11,0,e=>Ja(e.a,e._.w)),og=h(11,0,e=>ka(e.a,e._.y)),sg=h(11,0,e=>Ua(e.a,e._.a1)),cg=w(22,e=>{wg(e,e.w?.length),ag(e)}),lg=w(24,e=>{Eg(e,e.y?.length),og(e)}),ug=j(15,e=>{cg(e,(e.o||[]).filter(t=>!e._.cg.has(t.org))),lg(e,(e.o||[]).filter(t=>e._.cg.has(t.org)))}),dg=i(23,ug),fg=e=>{dg._(e),bg._(e),xg._(e),S(e.a,[`_cC`,`_c9`]),S(e.b,`_c_`),ea(e.c,18),ta(e.c,`_da`),S(e.d,`_cl`),S(e.e,`_cn`),S(e.f,`_cm`)},pg=p(9,`<!><!><!><!>`,`b%b%`,sne),mg=p(8,`<span><span></span> </span>`,` D b `,zh,(e=>`<span>${e} Signed in as <strong> </strong></span>`)(na),(e=>` D/${e}&b D m`)(ra),ru,(e=>`<span>${e} </span>`)(ti),(e=>` D/${e}& l`)(ni),tu,`<span>Not signed in</span>`,` `,Ql),hg=j(29,e=>mg(e,e.a1?0:e.t?1:e.v?2:3),2),gg=p(10,`<div><span>Enter this code at <a target=_blank rel=noopener><!>/login/device</a></span><code> </code></div>`,` D Db D%m D `,lne),_g=j(28,e=>gg(e,e.a1&&e._.cp.has(e.q)?0:1),2),vg=w(27,e=>{pg(e,+!!e.a1),hg(e),_g(e),sg(e)}),yg=j(17,e=>vg(e,e._.cn.has(e.q))),bg=i(23,yg),xg=i(23,_g),Sg=p(11,sa,(e=>`/${e}&`)(ca),tg),Cg=j(26,e=>Sg(e,e.x||e.z?0:1)),wg=w(23,Cg),Tg=w(14,ug),Eg=w(25,Cg),Dg=k(Zp,Jp),Og=w(16,e=>{b(e.g,e.q),yg(e),_g(e),ig(e),Vh(e),nm(e),Dg(e)}),kg=p(7,`<span>Enterprise</span>`,` `,$l),Ag=w(18,e=>{kg(e,+!e.s),Qp(e)}),jg=w(19,e=>{hg(e),$p(e)}),Mg=w(21,e=>{hg(e),eu(e)}),Ng=(e,t)=>{Tg(e,t[0]?.sso),Og(e,t[0]?.host),Ag(e,t[0]?.isEnterprise),jg(e,t[0]?.authed),Pg(e,t[0]?.user),Mg(e,t[0]?.error)},Pg=w(20,nu),Fg=p(1,`<p>mise is not installed. It provides every tool below. <button> </button></p>`,` Db D `,jne),Ig=h(51,0,e=>Fg(e,e._.cb&&!(e._.cb?.mise).installed?0:1)),Lg=e=>{Ig._(e),zg._(e),Vg._(e),S(e.a,`_cJ`),S(e.c,ar)},Rg=p(3,`<li><span>work</span><!><span></span><!></li>`,` D b%b b%`,wte),zg=h(51,0,e=>Rg(e,+!e._.d2)),Bg=m(4,`<li><span> </span><!><span></span><!></li>`,` D D l%b b%`,pne,bne),Vg=h(51,0,e=>Bg(e,[e._.ft,`id`])),Hg=A(275,e=>b(e.b,e._.ce.map(e=>Bs[e]||e).join(`, `))),Ug=v(`y44`,`<span>Not ready</span>. Missing <!>.`,` c%`,e=>{Hg(e),S(e.a,`_cR`)}),Wg=p(5,`<span>default</span>`,` `,_u),Gg=j(12,e=>Wg(e,e._._._.c1===e.l?0:1)),Kg=A(273,Gg,e=>e._._._),qg=s(`y50`,e=>_(e.h,`click`,function(){e._._._.fp(e.l,!e.o)})),Jg=e=>{Kg(e),Qg(e),S(e.b,`_cV`),Qr(e.c),ei(e.c),S(e.d,[`_cY`,`_y`]),S(e.g,`_z`),S(e.h,`_H`),qg(e)},Yg=m(8,oi,(e=>`/${e}&`)(si),mu,gu),Xg=(e,t)=>Yg(e,[t,e=>`${e.agent}-${e.account||``}`]),Zg=j(13,e=>Xg(e,e._._._.g6(e.l))),Qg=A(332,Zg,e=>e._._._),$g=w(11,e=>{$r(e.c,e.l),Zg(e),Gg(e)}),e_=w(14,e=>{S(e.a,[`_cW`,{_cX:!e.o}]),O(e.h,`aria-checked`,e.o?`true`:`false`),O(e.h,`title`,e.o?`Shown in session pickers. Hide it`:`Hidden from session pickers. Show it`)}),t_=(e,t)=>b(e.e,t),n_=(e,t)=>{$g(e,t[0]?.id),e_(e,t[0]?.enabled),t_(e,t[0]?.command)},r_=h(11,0,e=>S(e.a,[`_cZ`,{_cX:e._.x&&!e._.x?.enabled}])),i_=e=>{r_._(e),o_._(e),c_._(e),u_._(e)},a_=m(1,(e=>`<li><div>${e}<span> </span><!><span></span><button role=switch></button></div><!></li>`)(Vr),(e=>` D D/${e}& D l%b b l%l`)(`b%c`),Jg,n_),o_=h(11,0,e=>a_(e,[e._.a3,`id`])),s_=m(2,(e=>`<li>${e}</li>`)(oi),(e=>`D/${e}&l`)(si),du,pu),c_=h(11,0,e=>s_(e,[e._.a5,e=>`${e.agent}-${e.account||``}`])),l_=m(3,(e=>`<li>${e}</li>`)(oi),(e=>`D/${e}&l`)(si),cu,uu),u_=h(11,0,e=>l_(e,[e._.a7,e=>`${e.agent}-${e.account||``}`])),d_=p(7,`<span>default</span>`,` `,yu),f_=j(24,e=>d_(e,e.x&&e._.c1===e.x?.id?0:1)),p_=i(15,f_),m_=e=>{p_._(e),v_._(e),x_._(e),w_._(e),S(e.a,ir),Qr(e.c,18),ei(e.c),S(e.d,`_cl`),S(e.e,`_cn`),S(e.f,`_cm`)},h_=p(8,`<span><span></span> </span>`,` D b `,Wh,`<span>Not installed</span>`,` `,vu),g_=p(9,`<button>Install</button>`,` `,jf),__=j(21,e=>{h_(e,e._.cn.has(e.s)?0:e.u?2:1),g_(e,!e.u&&!e._.cn.has(e.s)?0:1)},2),v_=i(15,__),y_=w(31,e=>{z_(e,e.a5?.length),c_(e)}),b_=j(25,e=>y_(e,e.x?e._.g6(e.x?.id):[])),x_=i(15,b_),S_=w(33,e=>{B_(e,e.a7?.length),u_(e)}),C_=j(14,e=>S_(e,e.n?.installed?e._.g7(e.n):[])),w_=i(15,C_),T_=p(10,`<button role=switch></button>`,` `,Eu),E_=w(29,e=>{L_(e,e.a3?.length),o_(e)}),D_=j(26,e=>E_(e,e.x?[]:e.p)),O_=w(23,e=>{S(e.b,[`_cV`,{_cX:e.x&&!e.x?.enabled}]),k_(e,e.x?.id),A_(e,e.x?.enabled),T_(e,+!e.x),D_(e),b_(e),f_(e),r_(e)}),k_=w(27,Tu),A_=w(28,Du),j_=j(19,e=>O_(e,e.q===1&&e.r.id===e.s?e.r:null),2),M_=w(16,j_),N_=w(17,j_),P_=w(18,e=>{$r(e.c,e.s),j_(e),__(e),Gh(e)}),F_=p(11,`<ul><!><!><!></ul>`,` D%b%b%`,i_),I_=j(35,e=>F_(e,e.a4||e.a6||e.a8?0:1),2),L_=w(30,I_),R_=w(15,e=>{M_(e,e.p?.length),N_(e,e.p?.[0]),D_(e)}),z_=w(32,I_),B_=w(34,I_),V_=w(13,e=>{R_(e,e.n?.instances),P_(e,e.n?.id),U_(e,e.n?.installed),H_(e,e.n?.label),C_(e)}),H_=(e,t)=>b(e.g,t),U_=w(20,__),W_=(e,t)=>V_(e,t[0]),G_=t(182),K_=t(192),q_=p(22,((e,t)=>`<form><label>${e}<input type=text placeholder=github.example.com aria-label="GitHub Enterprise host" autocomplete=off spellcheck=false></label><button type=submit> </button><button type=button title=Cancel aria-label=Cancel>${t}</button></form>`)(Qi,$t),((e,t)=>` D D/${e}& l D l D/${t}&m`)(` b`,bt),Ite),J_=p(24,`<p>Install the GitHub CLI below to sign in.</p>`,` `,Xl),Y_=p(50,(e=>`<div><label><!><input type=text placeholder="Search the mise registry…" aria-label="Search the mise registry" autocomplete=off></label><button type=button title="Close search" aria-label="Close search">${e}</button><ul><!><!><!></ul></div>`)($t),(e=>` D D%b l D/${e}&l D%b%b%m`)(bt),Hne),X_=w(231),Z_=j(172,e=>X_(e,pS(e)),4),Q_=p(21,(e=>`<button title="Add Enterprise host" aria-label="Add Enterprise host">${e}</button>`)(qi),(e=>` D/${e}&l`)(Ji),Nte),$_=j(131,e=>Q_(e,e.cb&&!e.cw?0:1)),ev=p(49,(e=>`<button title="Add tool" aria-label="Add tool">${e}</button>`)(qi),(e=>` D/${e}&l`)(Ji),Nf),tv=j(166,e=>ev(e,e.cb&&(e.cb?.mise).installed&&!e.dv?0:1)),nv=a(109,e=>{let t;e.cb&&!e.cb?.ready&&(t=dn({content:Ug(e)})),Lr(e.d,t),hv(e,e.cb?.agents),xv(e,e.cb?.tools),Sv(e,e.cb?.missing),wv(e,e.cb?.github),q_(e,+!e.cb),J_(e,e.cb&&!(e.cb?.github).length?0:1),Y_(e,e.cb&&(e.cb?.mise).installed?0:1),Z_(e),$_(e),tv(e),Ig(e)}),rv=w(249,w_),iv=j(247,e=>rv(e,mS(e)),2),av=w(246,iv),ov=m(15,(e=>`<li><div>${e}<div><span><span> </span><!></span><!></div><!><!></div><!></li>`)(Vr),(e=>` D D/${e}& D D D l%l%l%b%l%l`)(`b%c`),m_,W_),sv=m(16,(e=>`<li>${e}</li>`)(oi),(e=>` D/${e}&l`)(si),au,su),cv=(e,t)=>sv(e,[t,e=>`${e.agent}-${e.account||``}`]),lv=j(243,e=>cv(e,(e.cj||[]).filter(t=>Vs(t.agent,e.g0)===null))),uv=w(242,e=>{Jx(e,e.g0.length),av(e,new Set(e.g0.flatMap(e=>e.instances.map(e=>e.id)))),ov(e,[e.g0,`id`]),iv(e),lv(e)}),dv=w(223),fv=k(rg),pv=w(185,e=>{dv(e,hS(e)),fv(e),Fp(e)}),mv=j(184,e=>pv(e,gS(e)),6),hv=w(110,e=>{uv(e,e.cc||[]),mv(e)}),gv=w(237,e=>Gx(e,e.fv?.length)),_v=(e,t)=>b(e.aj,t?`${x(` · `)}${x(t)} missing`:``),vv=w(240,e=>qx(e,e.fy?.length)),yv=j(236,e=>vv(e,e.ft.filter(e.fr).map(e=>e.id))),bv=w(235,e=>{b(e.ai,e.ft.filter(e=>e.installed).length),gv(e,e.ft.filter(e=>e.recommended&&!e.installed&&e.installable)),_v(e,e.ft.filter(e=>e.recommended&&!e.installed).length),yv(e),Vg(e)}),xv=w(111,e=>bv(e,e.cd||[])),Sv=w(112,k(Hg)),Cv=m(23,(e=>`<div><div>${e}<div><span><span> </span><!></span><!></div><!></div><!></div><!><!>`)(Qi),(e=>` D D/${e}& D D D l%l%l%l%l%c`)(` b`),fg,Ng),wv=w(113,e=>Cv(e,[e.cf||[],`host`])),Tv=(e,t)=>nv(e,t||Hs),Ev=a(114,dg),Dv=s(`y87`,e=>d(e,{onMount:function(){Lt().then(e.ch),e.e5(!1),e.e9(!1),e.e6(!1),K_(e)();let t=new AbortController;return zn(t=>{Mv(e,t)},t.signal),Bt().addEventListener(`app.reachable`,t=>{t.data.reachable&&e.e4&&(Ny(e,!1),e.e5(!1),e.e6(!1))},{signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}})),Ov=j(180,Dv,4),kv=w(115,Ov),Av=p(17,`<p><span></span> Loading usage…</p>`,` D `,iu,`<p> </p>`,` D `,$h),jv=j(245,e=>Av(e,!e.ci&&e.g2?0:e.ci?.error?1:2)),Mv=a(116,e=>{Ob(e,e.ci?.agents),kb(e,e.ci?.error),jv(e)}),Nv=p(4,Ot,(e=>`/${e}&`)(Vt),Zh),Pv=k(Yh),z=a(119,e=>{Nv(e,+!e.cl),Pv(e)}),Fv=a(120,k(Kh)),Iv=w(193),Lv=j(191,e=>Iv(e,vS(e)),4),Rv=w(183,e=>{mv(e),Lv(e)}),zv=k(Uh,Rh,gh,uh,eh,Jm,zm,km,hm,dm,lm,cm,im),Bv=a(121,e=>{Ab(e,e.cn?.size),Rv(e,yS(e)),mv(e),Lv(e),v_(e),bg(e),zv(e)}),Vv=k(Bh,tm),Hv=a(123,e=>{mv(e),xg(e),Vv(e)}),Uv=a(124,k(Xp,qp,Rp)),Wv=p(93,ns,(e=>`/${e}&`)(rs),Jte),Gv=a(125,e=>{jb(e,e.cr?.label),Mb(e,e.cr?.newest),Nb(e,e.cr?.current),Wv(e,+!e.cr),Ap(e)}),Kv=a(129,yp),qv=a(130,e=>{$_(e),bp(e)}),Jv=a(132,xp),Yv=w(232,Tm),Xv=j(146,e=>Yv(e,bS(e))),Zv=k(_p),Qv=a(133,e=>{Xv(e),vm(e),Zv(e)}),$v=a(134,e=>{Pb(e,e.d0?.length),mv(e),bm(e)}),ey=p(5,`<div role=status><div></div><!></div>`,` D b%`,Ate),ty=j(170,e=>ey(e,e.dz||e.d6?0:1)),ny=w(169,ty),ry=w(178),iy=j(141,e=>{ny(e,!!(e.d2&&!e.d6&&e.d2?.install!==`source`&&e.d2?.latest&&e.d2?.latest!==e.d2?.version)),ry(e,xS(e))}),ay=a(136,e=>{Fb(e,e.d2?.install),Ib(e,e.d2?.latest),Lb(e,e.d2?.version),iy(e),zg(e)}),oy=k(fp),sy=a(140,e=>{iy(e),ty(e),gp(e),oy(e)}),cy=j(168,e=>oe(e,`b8`,e.d8,SS(e))),ly=a(142,e=>{cy(e),Zf(e)}),uy=a(143,Cm),dy=(e,t)=>Rb(e,t.id),fy=p(36,(e=>`<div><label><!><input type=text placeholder="Search skills, or paste owner/repo…" aria-label="Search for a skill" autocomplete=off spellcheck=false></label><button type=button title="Close search" aria-label="Close search">${e}</button><ul><!><!><!><!></ul></div>`)($t),(e=>` D D%b l D/${e}&l D%b%b%b%m`)(bt),kh),py=e=>{fy(e,e.dg&&e.di?0:1)},my=k(jm),hy=a(147,e=>{zb(e,e.dd?.global),Ub(e,e.dd?.available),Wb(e,e.dd?.agents),py(e),Um(e),my(e)}),gy=w(221,Ih),_y=j(160,e=>gy(e,CS(e))),vy=k(vh,fh,Gf),yy=a(153,e=>{_y(e),Dh(e),vy(e)}),by=a(154,e=>{Kb(e,e.dk?.length),Lv(e),jh(e)}),xy=a(156,Ph),Sy=a(157,k(zf)),Cy=(e,t)=>qb(e,t.id),wy=p(51,`<div><!><ul><!><!></ul></div>`,` D%b D%b%`,Lg),Ty=a(161,e=>{S(e.ad,[`_cE`,{_cF:e.dr}]),O(e.ae,`aria-expanded`,e.dr?`true`:`false`),jt(e.af,[`_cK`,{_cL:e.dr}]),wy(e,+!e.dr)}),Ey=p(37,`<div><!><ul></ul><!></div>`,` D%b b%`,Wm),Dy=a(162,e=>{S(e.a4,[`_cE`,{_cF:e.ds}]),O(e.a5,`aria-expanded`,e.ds?`true`:`false`),jt(e.a6,[`_cK`,{_cL:e.ds}]),Ey(e,+!e.ds)}),Oy=p(35,(e=>`<button title="Add skill" aria-label="Add skill">${e}</button>`)(qi),(e=>` D/${e}&l`)(Ji),Ff),ky=j(164,e=>Oy(e,e.dg&&e.di&&!e.dt?0:1),2),Ay=a(163,e=>{ky(e),Fh(e)}),jy=a(165,e=>{tv(e),wm(e)}),My=w(167,cy),Ny=a(174,Ov),Py=w(181,k(eg)),Fy=j(177,e=>Py(e,TS(e))),Iy=w(176,e=>{Ov(e),Fy(e)}),Ly=w(182),Ry=w(179,e=>{Ly(e,DS(e)),Ov(e)}),zy=(e,t)=>{lx(e,t.applied),ux(e,t.issued)},By=w(218),Vy=p(85,`<span><span></span> </span>`,` D b `,of,`<span>Save workspaces, settings, skills and tool pins to a file. Code stays on GitHub.</span>`,` `,sl),Hy=w(217),Uy=j(216,e=>Hy(e,AS(e))),Wy=w(220),Gy=j(212,e=>Wy(e,jS(e)),6),Ky=p(86,`<button>Export…</button>`,` `,Ru),qy=p(87,`<div><p>In the file: <!> workspace<!><!> , <!> tool pin<!>, <!> skill<!>, <!> agent<!>.</p><p>Not in the file: <!><!> .</p><ul></ul><div><button> </button><button>Cancel</button></div></div>`,` D Db%c%b%c%c%c%c%c%c%l Db%b%l b D D l `,Kd),Jy=j(197,e=>{Ky(e,!e.eo&&!e.eq?0:1),qy(e,e.eq&&!e.eo?0:1)}),Yy=p(90,`<span><span></span> </span>`,` D b `,rf,`<span> </span>`,` D `,Bu,`<span>Load a backup file. Repos clone in the background.</span>`,` `,lc),Xy=j(214,e=>Yy(e,e.eo===`restore`?0:e.f7?1:2)),Zy=p(91,`<label title="Pick a work backup file">Restore… <input type=file accept=application/json,.json aria-label="Backup file"></label>`,` Db `,Iu),Qy=p(92,`<div><p>From <!> on <!><!>.</p><!><ul><!></ul><div><button>Restore</button><button>Cancel</button></div></div>`,` D Db%c%b%l%b D%l D b `,Td),$y=j(208,e=>{Zy(e,!e.f1&&e.eo!==`restore`?0:1),Qy(e,e.f1&&e.eo!==`restore`?0:1)}),eb=a(194,e=>{By(e,kS(e)),Vy(e,e.eo===`preflight`?0:1),Uy(e),Gy(e),Jy(e),Xy(e),$y(e)}),tb=a(195,e=>{af(e),nf(e)}),nb=a(196,e=>{dx(e,e.eq?.contents),vx(e,e.eq?.unpushed),bx(e,e.eq?.files),xx(e,e.eq?.workspaces),Jy(e)}),rb=a(207,e=>{Sx(e,e.f1?.preview),Gy(e),$y(e)}),ib=w(219),ab=k(sd),ob=a(209,e=>{Ix(e,e.f3?.size),ib(e,MS(e)),Gy(e),ab(e)}),sb=k(Hu),cb=a(211,e=>{Gy(e),Ed(e),sb(e)}),lb=a(213,e=>{Xy(e),zu(e)}),ub=w(215,Uy),db=(e,t)=>Vx(e,t.id),fb=w(233,yv),pb=w(234),mb=(e,t)=>{O(e.a,`aria-labelledby`,t),Pr(e.d,t)},hb=(e,t)=>{O(e.g,`aria-labelledby`,t),O(e.i,`id`,t)},gb=(e,t)=>{O(e.aq,`aria-labelledby`,t),O(e.as,`id`,t)},_b=(e,t)=>{O(e.s,`aria-labelledby`,t),O(e.u,`id`,t)},vb=(e,t)=>{O(e.bh,`aria-labelledby`,t),O(e.bj,`id`,t)},yb=(e,t)=>{O(e.z,`aria-labelledby`,t),O(e.a1,`id`,t)},bb=m(68,`<button type=button role=radio><!><!></button>`,` D%b%`,$f,rp),xb=m(70,`<option> </option>`,` D `,0,ml),Sb=(e,t)=>{bb(e,[t,`id`]),xb(e,[t,`id`])},Cb=m(75,`<button type=button role=radio></button>`,` `,ju,Pu),wb=s(`y86`,e=>{T(e,`n`),_(e.a5,`click`,function(){Dy(e,!e.ds)}),_(e.ae,`click`,function(){Ty(e,!e.dr)}),Se(e,`b2`),T(e,`b8`),_(e.bc,`click`,function(){e.fn({accent:``})}),Se(e,`bf`)});function Tb(e){S(e.a,`_d8`),S(e.b,`_d9`),S(e.c,`_d_`),kr(e.d),zr(e.d,dn({content:Jh(e)})),Fr(e.d,`Settings`),Br(e.d),S(e.g,`_cf`),S(e.h,`_cg`),S(e.i,`_ct`),S(e.j,`_z`),S(e.k,`_cT`),S(e.l,`_X`),S(e.m,`_o`),S(e.n,[`_p`,`_cU`]),S(e.o,rr),S(e.s,`_cf`),S(e.t,`_cg`),S(e.u,`_ct`),S(e.x,[`_ck`,`_cB`]),S(e.z,`_cf`),S(e.a0,`_cg`),S(e.a1,`_ct`),S(e.a2,[`_ck`,`_cB`]),S(e.a3,[`_cC`,`_cD`]),S(e.a5,`_cG`),kt(e.a6),Ee(e.a6,12),S(e.a7,`_cH`),S(e.ac,[`_cC`,`_cD`]),S(e.ae,`_cG`),kt(e.af),Ee(e.af,12),S(e.ag,`_cH`),S(e.ah,`_cI`),S(e.aq,`_cf`),S(e.ar,`_cg`),S(e.as,`_ct`),S(e.at,[`_ck`,`_dk`]),S(e.au,`_dw`),S(e.av,`_dx`),S(e.aw,`_dy`),S(e.ax,`_dz`),S(e.az,`_dA`),S(e.b0,`_dl`),S(e.b1,`_dm`),S(e.b2,[`_Z`,`_dn`]),S(e.b3,`_dl`),S(e.b4,`_dm`),S(e.b5,`_dp`),S(e.b6,sr),S(e.b7,[`_o`,`_dq`]),S(e.b8,[`_p`,`_dr`]),S(e.b9,`_dl`),S(e.ba,`_dm`),S(e.bb,`_dC`),S(e.bf,`_dI`),S(e.bh,`_cf`),S(e.bi,`_cg`),S(e.bj,`_ct`),S(e.bk,[`_ck`,`_cB`]),S(e.bl,`_cC`),S(e.bm,`_dJ`),S(e.bn,`_cl`),S(e.bq,`_cC`),S(e.br,`_dJ`),S(e.bs,`_cl`),Ev(e,new Set),kv(e,_S(e)),Mv(e,Bn()),z(e,null),Fv(e,!1),Bv(e,new Map),Hv(e,new Map),Uv(e,null),Gv(e,null),Kv(e,``),qv(e,!1),Jv(e,!1),Qv(e,``),$v(e,null),ay(e,null),sy(e,!1),ly(e,Wt()),uy(e,!1),dy(e,{id:0}),hy(e,Us),yy(e,``),by(e,null),xy(e,!1),Sy(e,null),Cy(e,{id:0}),Ty(e,!1),Dy(e,!0),Ay(e,!1),jy(e,!1),My(e,wS(e)),Ny(e,!1),Iy(e,ES(e)),Ry(e,OS(e)),zy(e,{issued:0,applied:0}),eb(e,null),tb(e,``),nb(e,null),rb(e,null),ob(e,new Set),cb(e,{tools:!0,skills:!0,agents:!0,settings:!0}),lb(e,null),ub(e,NS(e)),db(e,{id:0}),fb(e,PS),pb(e,FS),mb(e,f(e)),hb(e,f(e)),gb(e,f(e)),_b(e,f(e)),vb(e,f(e)),yb(e,f(e)),Sb(e,[{id:`system`,label:`System`},{id:`light`,label:`Light`},{id:`dark`,label:`Dark`}]),Cb(e,[tr,`value`]),wb(e)}var Eb=k(Qg),Db=w(248,e=>{x_(e),Eb(e)}),Ob=w(117,e=>{Db(e,IS(e)),iv(e),lv(e)}),kb=w(118,Qh),Ab=w(122,e=>{Dm(e),Em(e)}),jb=w(126,Mp),Mb=w(127,Np),Nb=w(128,Pp),Pb=w(135,Sm),Fb=w(137,k(cp)),Ib=w(138,k(mp,pp,up,ip)),Lb=w(139,k(hp,dp)),Rb=w(145,Xv),zb=w(148,e=>{Vb(e,e.de?.length),Km(e)}),Bb=p(34,`<span><!> installed</span>`,` D%`,Xf),Vb=w(149,e=>{Bb(e,+!e.df),Yf(e)}),Hb=k(Nm),Ub=w(150,e=>{ky(e),Hb(e)}),Wb=w(151,e=>Gb(e,e.dh?.length)),Gb=w(152,ky),Kb=w(155,Mh),qb=w(159,_y),Jb=w(175,e=>{Ov(e),Fy(e),Gy(e)}),Yb=w(222),Xb=w(171,e=>{Jb(e,LS(e)),Yb(e,RS(e)),mv(e),Z_(e)}),Zb=w(97,e=>Xb(e,zS(e))),Qb=w(173,e=>{mv(e),Gy(e)}),$b=j(101,e=>Qb(e,BS(e)),2),ex=w(98,e=>{$b(e),Z_(e)}),tx=j(225,e=>oe(e,`n`,e.c1,VS(e))),nx=k(Kg),rx=w(99,e=>{$b(e),Z_(e),tx(e),p_(e),nx(e)}),ix=w(224,tx),ax=w(100,e=>{ix(e,HS(e)),$b(e),Z_(e)}),ox=w(192,Gy),sx=j(190,e=>ox(e,US(e))),cx=w(189,e=>{sx(e),Lv(e)}),lx=w(187,e=>cx(e,WS(e))),ux=w(188,e=>{sx(e),Lv(e)}),dx=w(198,e=>{fx(e,e.es?.workspaces),px(e,e.es?.archived),mx(e,e.es?.tools),hx(e,e.es?.skills),gx(e,e.es?.agents)}),fx=w(199,Wd),px=w(200,qd),mx=w(201,Jd),hx=w(202,Yd),gx=w(203,Xd),_x=k(Bd),vx=w(204,e=>{Qd(e),_x(e)}),yx=k(Ud),bx=w(205,e=>{$d(e),yx(e)}),xx=w(206,tf),Sx=w(261,e=>{Cx(e,e.gj?.from),Ox(e,e.gj?.workspaces),Ax(e,e.gj?.tools),jx(e,e.gj?.skills),Mx(e,e.gj?.agents),Nx(e,e.gj?.hosts),Fx(e,e.gj?.settings)}),Cx=w(262,e=>{wx(e,e.gk?.host),Tx(e,e.gk?.exportedAt),Ex(e,e.gk?.version)}),wx=w(263,Dd),Tx=w(264,Od),Ex=w(265,kd),Dx=k(bd),Ox=w(266,e=>{kx(e,e.go?.length),Dx(e)}),kx=w(267,jd),Ax=w(268,Fd),jx=w(269,Id),Mx=w(270,Ld),Nx=w(271,Rd),Px=k(ac),Fx=w(272,e=>{zd(e),Px(e)}),Ix=w(210,Cd),Lx=j(230,e=>de(e,`b2`,e.ca,GS(e))),Rx=j(258,e=>de(e,`bf`,e.gf||`#3556d8`,KS(e))),zx=w(229,e=>{Lx(e),Rx(e)}),Bx=j(228,e=>zx(e,qS(e)),2),Vx=w(227,Bx),Hx=w(102,e=>{iS(e,e.c4?.accent),aS(e,e.c4?.name),Bx(e)}),Ux=w(103,Bx),Wx=p(48,`<button>Install missing</button>`,` `,Jne),Gx=(e,t)=>Wx(e,t>1?0:1),Kx=p(47,`<button>Update all</button>`,` `,Xne),qx=(e,t)=>{b(e.ak,t?`${x(` · `)}${x(t)} outdated`:``),Kx(e,t>1?0:1)},Jx=w(244,jv),Yx=(e,t)=>Mr(e.d,t),Xx=w(105,e=>Nr(e.d,e.c7&&JS(e))),Zx=m(13,`<option> </option>`,` D `,0,xu),Qx=(e,t)=>Zx(e,[t.filter(e=>e!==`shell`),e=>e]),$x=p(74,na,(e=>`/${e}&`)(ra),dl),eS=p(78,na,(e=>`/${e}&`)(ra),ll,qi,(e=>`/${e}&`)(Ji),cl),tS=w(260,e=>{S(e.be,[`_dD`,`_dH`,{_dE:e.gi}]),eS(e,+!e.gi)}),nS=w(257,e=>{O(e.av,`src`,`/api/instance/icon${e.gf?`?v=${e.gf.slice(1)}`:``}`),S(e.bc,[`_dD`,`_dG`,{_dE:!e.gf}]),O(e.bc,`aria-checked`,e.gf?`false`:`true`),$x(e,+!!e.gf),tS(e,!!e.gf&&!tr.some(t=>t.value===e.gf)),Rx(e),ku(e)}),rS=e=>{ge(e.be,e.gi?`--swatch:${e.gf}`:void 0),O(e.be,`title`,e.gi?`Custom ${e.gf}`:`Custom colour`)},iS=w(107,e=>{nS(e,e.c9),rS(e)}),aS=w(108,e=>{b(e.ay,e.ca||`work`),Lx(e)}),oS=e=>t=>{Kv(e._,t)},sS=e=>function(t){let n=e._.cr;Gv(e._,null),e._.ef(n.id,`install`,t)},cS=e=>function(t){t||Gv(e._,null)},lS=e=>function(){z(e._,null)},uS=e=>function(){e._._.eb()},dS=e=>function(){e._._.ch()},fS=e=>function(){e._._.ef(e._.q,`auth-refresh`)},pS=e=>async(t,n)=>{if(!e.cb)return;let r=new Set((e.cb?.agents).flatMap(e=>e.instances.filter(e=>!e.enabled).map(e=>e.id)));n?r.delete(t):r.add(t);try{let i=await N(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({disabledAgents:[...r]})});e.c0?.(i.agents),i.preferredAgent!==e.c1&&e.c2?.(i.preferredAgent),e.e1({...e.cb,agents:(e.cb?.agents).map(e=>({...e,instances:e.instances.map(e=>e.id===t?{...e,enabled:n}:e)}))})}catch(t){z(e,String(t.message||t))}},mS=e=>t=>(e.cj||[]).filter(n=>!e.g4.has(n.agent)&&Vs(n.agent,e.g0)===t.id),hS=e=>async(t,n)=>{for(let r of t)await e.ef(r,n)},gS=e=>async(t,n,r)=>{if(e.cn.has(t))return;z(e,null),e.ed(t,``);let i=er(`setup:${t}`,n=>{let r=/one-time code:\s*([A-Z0-9]{4}-[A-Z0-9]{4})/i.exec(n)?.[1];r&&Hv(e,new Map(e.cp).set(t,r)),e.ed(t,n)});await i.ready;try{e.e1(await N(`/api/setup/${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:n,version:r})})),e.d0&&$v(e,e.d0.map(e=>e.name===t?{...e,installed:n!==`remove`}:e)),(e.cc||[]).some(e=>e.id===t)&&await e.e3(),t===`skills`&&await K_(e)()}catch(t){z(e,String(t.message||t))}finally{i.stop(),e.ed(t,null)}},_S=e=>()=>{Ev(e,new Set(Le()))},vS=e=>async(t,n)=>{if(e.cn.has(t))return;z(e,null),e.ed(t,``);let r=er(`skills:${t}`,n=>e.ed(t,n));await r.ready;let i=++e.ei;try{e.ej(await N(`/api/skills`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n)}),i),e.dk&&by(e,e.dk.map(e=>e.skillId===t?{...e,installed:n.action!==`remove`}:e))}catch(t){z(e,String(t.message||t))}finally{r.stop(),e.ed(t,null)}},yS=e=>(t,n)=>{let r=new Map(e.cn);n===null?r.delete(t):r.set(t,n),Bv(e,r)},bS=e=>t=>{if(Qv(e,t),clearTimeout(e.db),!t.trim()){$v(e,null),uy(e,!1);return}uy(e,!0),e.db=setTimeout(async()=>{try{let n=await N(`/api/setup/search?q=${encodeURIComponent(t.trim())}`);e.cz===t&&$v(e,n)}catch(t){z(e,String(t.message||t))}finally{e.cz===t&&uy(e,!1)}},250)},xS=e=>async()=>{if(!e.d2||e.d6)return;sy(e,!0);let t=e.d2?.version;try{await N(`/api/setup/self`,{method:`POST`})}catch(t){sy(e,!1),z(e,String(t.message||t));return}let n=Date.now(),r=async()=>{try{if((await N(`/api/setup/self`)).version!==t){location.reload();return}}catch{}Date.now()-n<3e5?setTimeout(r,2e3):sy(e,!1)};setTimeout(r,4e3)},SS=e=>function(t){e.dx(t)},CS=e=>t=>{if(yy(e,t),clearTimeout(e.dp),!t.trim()){by(e,null),xy(e,!1);return}xy(e,!0),e.dp=setTimeout(async()=>{try{let n=await N(`/api/skills/search?q=${encodeURIComponent(t.trim())}`);e.dj===t&&by(e,n)}catch(t){z(e,String(t.message||t))}finally{e.dj===t&&xy(e,!1)}},250)},wS=e=>t=>{ly(e,t),tee(t),Ve(t)},TS=e=>async()=>{Fv(e,!0),await Promise.all([e.e5(!0),e.e6(!0),G_(e)()]),Fv(e,!1)},ES=e=>async t=>{try{let n=await N(`/api/setup/self${t?`?refresh`:``}`);ay(e,n),n.updating&&sy(e,!0)}catch{}},DS=e=>async()=>{await e.e9(!0)},OS=e=>t=>Vn(t).then(t=>{Mv(e,t)}),kS=e=>async t=>{let n=t.files?.[0];if(t.value=``,!n||e.eo)return;z(e,null),lb(e,null);let r;try{r=JSON.parse(await n.text())}catch{z(e,`${n.name} is not a work backup file.`);return}try{let t=await N(`/api/backup/preview`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(r)});ob(e,new Set(t.workspaces.filter(e=>!e.exists&&!e.unknownHost).map(e=>e.id))),cb(e,{tools:t.tools.some(e=>!e.installed),skills:t.skills.some(e=>!e.installed),agents:t.agents.some(e=>!e.installed),settings:t.settings>0||t.hosts.some(e=>!e.known)}),rb(e,{manifest:r,preview:t})}catch(t){z(e,String(t.message||t))}},AS=e=>async()=>{if(!e.eo){z(e,null),eb(e,`preflight`),tb(e,``);try{let t=await N(`/api/backup/preflight`,{method:`POST`});t.workspaces.length?nb(e,t):e.f9()}catch(t){z(e,String(t.message||t))}finally{eb(e,null)}}},jS=e=>async()=>{if(!e.f1||e.eo)return;z(e,null),eb(e,`restore`),tb(e,``);let t=er(`restore`,t=>{tb(e,t)});await t.ready;try{let t=(await N(`/api/backup/restore`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({manifest:e.f1?.manifest,selection:{workspaces:[...e.f3],...e.f5}})})).restored.length;lb(e,t?`Restored ${t} workspace${t===1?``:`s`} — repos are cloning in the background.`:`Nothing to restore.`),rb(e,null),await Promise.all([e.e5(!0),e.em(),e.e3()])}catch(t){z(e,String(t.message||t))}finally{t.stop(),eb(e,null)}},MS=e=>(t,n)=>{let r=new Set(e.f3);n?r.add(t):r.delete(t),ob(e,r)},NS=e=>()=>{let t=document.createElement(`a`);t.href=`/api/backup/export`,t.download=``,document.body.append(t),t.click(),t.remove(),nb(e,null)};function PS(e){return!!(e.installed&&e.latest&&e.latest!==e.version)}function FS(e){return!!e.pin&&e.pin!==`latest`&&!/^\d/.test(e.pin)}var IS=e=>t=>(e.cj||[]).filter(e=>e.agent===t),LS=e=>async t=>{try{e.e1(await N(`/api/setup${t?`?refresh`:``}`)),Ny(e,!1)}catch(t){Nt(t)?Ny(e,!0):z(e,String(t.message||t))}},RS=e=>async(t,n)=>{Jv(e,!0),z(e,null);try{e.e1(await N(`/api/github/hosts`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({host:t,remove:n})})),n||(Kv(e,``),qv(e,!1))}catch(t){z(e,String(t.message||t))}finally{Jv(e,!1)}},zS=e=>t=>{nv(e,t),Hs=t,t.ready||Ty(e,!0),nn(t.github),e.bz?.(t)},BS=e=>async()=>{try{let t=await N(`/api/settings`);e.c0?.(t.agents),t.preferredAgent!==e.c1&&e.c2?.(t.preferredAgent)}catch{}},VS=e=>function(t){e.fi(t)},HS=e=>async t=>{e.c2?.(t);try{await N(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({preferredAgent:t})})}catch(t){z(e,String(t.message||t))}},US=e=>async()=>{let t=++e.ei;try{e.ej(await N(`/api/skills`),t)}catch{}},WS=e=>(t,n)=>{n<=e.eh||(e.eh=n,hy(e,t),Us=t)},GS=e=>function(t){e.fn({name:t})},KS=e=>function(t){e.fn({accent:t})},qS=e=>t=>{let n={...e.c4,...t};e.c5?.(n),nr(n),clearTimeout(e.fl),e.fl=setTimeout(async()=>{try{let t=await N(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({instance:n})});(t.instance.name!==n.name||t.instance.accent!==n.accent)&&(e.c5?.(t.instance),nr(t.instance))}catch(t){z(e,String(t.message||t))}},300)},JS=e=>()=>e.c7?.();n(`y3`,oS),n(`y42`,sS),n(`y41`,cS),n(`y37`,lS),n(`y40`,uS),n(`y38`,dS),n(`y39`,fS),n(`y31`,pS),n(`y35`,mS),n(`y28`,hS),n(`y18`,gS),n(`y7`,_S),n(`y21`,vS),n(`y17`,yS),n(`y1`,bS),n(`y13`,xS),n(`y5`,SS),n(`y0`,CS),n(`y8`,wS),n(`y15`,TS),n(`y12`,ES),n(`y16`,DS),n(`y14`,OS),n(`y24`,kS),n(`y23`,AS),n(`y26`,jS),n(`y25`,MS),n(`y22`,NS),n(`y32`,PS),n(`y33`,FS),n(`y34`,IS),n(`y11`,LS),n(`y27`,RS),n(`y9`,zS),n(`y10`,BS),n(`y2`,VS),n(`y29`,HS),n(`y20`,US),n(`y19`,WS),n(`y4`,GS),n(`y6`,KS),n(`y30`,qS),n(`y36`,JS);var YS=`_bN _l`,XS=`_bO _bc`,ZS=`_bS _l`,QS=`_bT _l`,$S=I,eC=(e=>`/${e}&`)(F);function tC(e){R(e.a,`M18 8.4C18 6.70261 17.3679 5.07475 16.2426 3.87452C15.1174 2.67428 13.5913 2 12 2C10.4087 2 8.88258 2.67428 7.75736 3.87452C6.63214 5.07475 6 6.70261 6 8.4C6 15.8667 3 18 3 18H21C21 18 18 15.8667 18 8.4Z M13.73 21C13.5542 21.3031 13.3019 21.5547 12.9982 21.7295C12.6946 21.9044 12.3504 21.9965 12 21.9965C11.6496 21.9965 11.3054 21.9044 11.0018 21.7295C10.6982 21.5547 10.4458 21.3031 10.27 21`)}var nC=(e,t)=>L(e.a,t),rC=(e,t)=>P(e.a,t),iC=I,aC=(e=>`/${e}&`)(F);function oC(e){R(e.a,`M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z M19.6224 10.3954L18.5247 7.7448L20 6L18 4L16.2647 5.48295L13.5578 4.36974L12.9353 2H10.981L10.3491 4.40113L7.70441 5.51596L6 4L4 6L5.45337 7.78885L4.3725 10.4463L2 11V13L4.40111 13.6555L5.51575 16.2997L4 18L6 20L7.79116 18.5403L10.397 19.6123L11 22H13L13.6045 19.6132L16.2551 18.5155C16.6969 18.8313 18 20 18 20L20 18L18.5159 16.2494L19.6139 13.598L21.9999 12.9772L22 11L19.6224 10.3954Z`)}var sC=(e,t)=>L(e.a,t),cC=(e,t)=>P(e.a,t);function lC(e){return e?.working?`working`:e?.waiting?`waiting`:e?.agents?`idle`:`off`}function uC(e){return e?.phase===`working`?`working`:e?.phase===`waiting`?`waiting`:e?.alive?`idle`:`off`}function dC(e){if(e.agent!==`shell`)return e.agent;let t=e.state?.command?.trim();return t&&Mn(t)||e.agent}var fC=`_eV _N`;function pC(e,t=location){if(hC(t))return`http://${t.hostname}:${e}`;let n=document.querySelector(`meta[name="work-port-hosts"]`)?.getAttribute(`content`);return`${t.protocol}//${e}${n===`dash`?`-`:`.`}${t.host}`}var mC=e=>e.hostname===`localhost`||e.hostname===`127.0.0.1`||e.hostname===`[::1]`,hC=e=>e.port!==``||mC(e)||/^\d+\.\d+\.\d+\.\d+$/.test(e.hostname)||e.hostname.endsWith(`.local`);function gC(e,t,n=location){return!t||mC(n)||!hC(n)?null:`Port ${e} listens only on localhost on the host, so it cannot be opened from this device`}var _C=`_hZ _u _hY`,vC=`_h0 _u _hY`,yC={open:`_h4`,merged:`_h5`,closed:`_h6`},bC=I,xC=(e=>`/${e}&`)(F);function SC(e){R(e.a,`M18 21C19.1046 21 20 20.1046 20 19C20 17.8954 19.1046 17 18 17C16.8954 17 16 17.8954 16 19C16 20.1046 16.8954 21 18 21Z M6 7C7.10457 7 8 6.10457 8 5C8 3.89543 7.10457 3 6 3C4.89543 3 4 3.89543 4 5C4 6.10457 4.89543 7 6 7Z M18 17V7C18 7 18 5 16 5H13 M6 7V17C6 17 6 19 8 19H11 M15.0005 7.50012L12.5005 5.00012L15.0005 2.50012 M8.5 16.5L11 19L8.5 21.5`)}var CC=(e,t)=>L(e.a,t),wC=(e,t)=>P(e.a,t),TC=`<!><!><!>`,EC=(e,t)=>{let n=[`${e.worktree}: ${t.title}`];return t.state===`MERGED`?n.push(`merged`):t.state===`CLOSED`?n.push(`closed`):t.isDraft?n.push(`draft`):n.push(`open`),n.join(` · `)},DC=e=>!e.state||e.state===`OPEN`,OC=h(1,1,e=>{O(e.a,`title`,`Open port ${e._.h}`),b(e.b,e._.h)}),kC=s(`z6`,e=>_(e.a,`click`,function(){window.open(pC(e._.h),`_blank`,`noopener`)})),AC=e=>{OC._(e),S(e.a,[`_h1`,`_h8`]),kC(e)},jC=j(2,e=>O(e.a,`title`,e._._._.x.get(e._.h))),MC=A(29,jC,e=>e._._._),NC=e=>{MC(e),PC._(e),S(e.a,[`_h1`,`_h7`])},PC=h(1,0,e=>{b(e.b,e._.h),jC(e)}),FC=h(4,1,e=>O(e.a,`title`,`Dismiss #${e._.m}`)),IC=s(`z5`,e=>_(e.a,`click`,function(){e._._._._.p(e._.o??e._._.f,e._.m)})),LC=e=>{FC._(e),S(e.a,[`_h1`,`_h2`,`_h3`]),Pt(e.b),_t(e.b,12),Jt(e.b),IC(e)},RC=j(10,e=>S(e.c,[`_h1`,`_h2`,`_h3`,{_s:e._._.h===e.j}])),zC=j(11,e=>O(e.c,`title`,e._._.h===e.j?`Kill?`:`Kill ${e.g} (pid ${e.j})`),2),BC=A(26,e=>{RC(e),zC(e)},e=>e._._),VC=s(`z7`,e=>_(e.c,`click`,function(){e._._.h===e.j?(Ow(e._._,null),e._._.s(e.j)):e._._.k(e.j)})),HC=e=>{BC(e),GC(e),S(e.a,[`_u`,vC]),Pt(e.d),_t(e.d,12),Jt(e.d),VC(e)},UC=p(1,`<span aria-disabled=true>:<!></span>`,` Db%`,NC,`<button type=button>:<!></button>`,` Db%`,AC),WC=j(8,e=>UC(e,+!e._._.x.has(e.h))),GC=A(29,WC,e=>e._._),KC=w(6,e=>{O(e.a,`title`,e.g),zC(e)}),qC=w(7,e=>{WC(e),PC(e),OC(e)}),JC=w(9,e=>{RC(e),zC(e)}),YC=(e,t)=>{KC(e,t[0]?.cmd),qC(e,t[0]?.port),JC(e,t[0]?.pid)},XC=j(2,e=>O(e.a,`href`,`/w/${e._._._._.d}/review?pr=${encodeURIComponent(`${e._._.e}/${e._.m}`)}`),2),ZC=A(25,XC,e=>e._._._._),QC=e=>{ZC(e),$C(e),ew._(e),S(e.a,[`_h1`,`_h2`]),SC(e.b),CC(e.b,12),wC(e.b)},$C=A(7,XC,e=>e._._),ew=h(4,0,e=>{O(e.a,`title`,`Review #${e._.m} changes`),XC(e)}),tw=j(5,e=>b(e.c,e._._.d(e._.c))),nw=A(4,tw,e=>e._._),rw=e=>{nw(e),aw._(e)},iw=j(8,e=>O(e.a,`title`,EC(e._.c,e.h))),aw=i(0,e=>{iw(e),tw(e)}),ow=p(4,(e=>`<a>${e}</a>`)(bC),(e=>` D/${e}&l`)(xC),QC,(e=>`<button type=button>${e}</button>`)($t),(e=>` D/${e}&l`)(bt),LC),sw=j(16,e=>S(e.a,[`_u`,_C,{_v:e.p&&!e.j,_w:e.p&&e.j,[yC.merged]:e.k===`MERGED`,[yC.closed]:e.k===`CLOSED`}]),2),cw=w(15,e=>{S(e.b,[`_h1`,{_h9:!e.p}]),ow(e,+!e.p),sw(e)}),lw=w(7,e=>{uw(e,e.h?.isDraft),dw(e,e.h?.state),fw(e,e.h?.url),pw(e,e.h?.number),hw(e,e.h?.repository?.nameWithOwner),cw(e,DC(e.h)),iw(e)}),uw=w(9,sw),dw=w(10,sw),fw=(e,t)=>O(e.b,`href`,t),pw=w(12,e=>{b(e.d,e.m),ew(e),FC(e)}),mw=(e,t)=>lw(e,t[0]),hw=w(14),gw=m(0,`<span><a target=_blank rel=noopener><!>#<!></a><!></span>`,` D D%c%l%`,rw,mw),_w=(e,t)=>gw(e,[t||[],`number`]),vw=(e,t)=>yw(e,t[0]),yw=w(2,e=>{_w(e,e.c?.prs),bw(e,e.c?.worktree),xw(e,e.c?.full_name),aw(e)}),bw=w(4,k($C)),xw=w(5),Sw=w(3,k(nw)),Cw=m(1,`<!><!><!>`,`b%`,0,vw),ww=h(0,0,e=>{Sw(e,tT(e)),Cw(e,[e._.t,`full_name`])}),Tw=e=>{ww._(e),Dw._(e),S(e.a,`_hX`)},Ew=m(2,(e=>`<span><!><button type=button>${e}</button></span>`)($t),(e=>` D%b D/${e}&m`)(bt),HC,YC),Dw=h(0,0,e=>Ew(e,[e._.u,`port`])),Ow=a(7,k(BC)),kw=(e,t)=>Jw(e,t.timer),Aw=w(15),jw=j(13,e=>Aw(e,nT(e)),2),Mw=p(0,`<div><!><!></div>`,` D%b%`,Tw),Nw=j(22,e=>Mw(e,e.t.some(e=>(e.prs||[]).length)||e.v?0:1)),Pw=w(19,e=>{Nw(e),ww(e)}),Fw=j(14,e=>Pw(e,(e.f||[]).map(t=>({...t,prs:(t.prs||[]).filter(n=>!e.l.has(e.m(t.full_name,n.number)))}))),2),Iw=a(11,e=>{jw(e),Fw(e)}),Lw=w(12,e=>{jw(e),Fw(e)}),Rw=w(18),zw=s(`z8`,e=>{{let t=new Map;for(let n of e.u){let e=gC(n.port,n.local);e&&t.set(n.port,e)}(t.size!==e.x?.size||[...t].some(([t,n])=>e.x.get(t)!==n))&&Gw(e,t)}}),Bw=j(24,zw),Vw=w(20,e=>{Qw(e,e.u?.length),Bw(e),Dw(e)}),Hw=j(17,e=>Vw(e,(e.g||[]).filter(t=>!e.q.has(t.pid)))),Uw=a(16,e=>{Rw(e,iT(e)),Hw(e)}),Ww=k(GC,MC),Gw=a(23,e=>{Bw(e),Ww(e)});function Kw(e){Ow(e,null),kw(e,{timer:0}),Iw(e,new Set),Lw(e,rT),Uw(e,new Set),Gw(e,new Map)}var qw=w(10),Jw=w(9,e=>qw(e,aT(e))),Yw=k(ZC),Xw=w(3,e=>{jw(e),Yw(e)}),Zw=w(5,Fw),Qw=w(21,Nw),$w=w(6,Hw),eT=(e,t)=>{Zw(e,t?.repos),$w(e,t?.ports)},tT=e=>t=>{if(e._.t?.length<2)return``;let n=t.full_name.split(`/`).at(-1);return e._.t.some(e=>e.full_name!==t.full_name&&e.full_name.split(`/`).at(-1)===n)?an(t.full_name):n},nT=e=>(t,n)=>{let r=e.m(t,n);Iw(e,new Set(e.l).add(r)),fetch(`/api/workspaces/${e.d}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,number:n})}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`)}).catch(()=>{let t=new Set(e.l);t.delete(r),Iw(e,t)})};function rT(e,t){return`${e}#${t}`}var iT=e=>t=>{Uw(e,new Set(e.q).add(t)),fetch(`/api/procs/${t}`,{method:`DELETE`}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`)}).catch(()=>{let n=new Set(e.q);n.delete(t),Uw(e,n)})},aT=e=>t=>{clearTimeout(e.j),Ow(e,t),e.j=$n(()=>{Ow(e,null)})};n(`z4`,tT),n(`z2`,nT),n(`z1`,rT),n(`z3`,iT),n(`z0`,aT);var oT=`_fv _l`,sT=`_fA _I`,cT=`_fD _4 _l`,lT=`_fE _7 _l _8`,uT=`_fP _J`,dT=`_fR _I`,fT=`_fr __`,pT=`_fs _I`,mT=I,hT=(e=>`/${e}&`)(F);function gT(e){R(e.a,`M2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H21.4C21.7314 7 22 7.26863 22 7.6V10.4C22 10.7314 21.7314 11 21.4 11H2.6C2.26863 11 2 10.7314 2 10.4V4.6C2 4.26863 2.26863 4 2.6 4Z M22 10L22 14 M2 10V19.4C2 19.7314 2.26863 20 2.6 20H13 M19 21C20.1046 21 21 20.1046 21 19C21 17.8954 20.1046 17 19 17C18.6357 17 18.2942 17.0974 18 17.2676C17.4022 17.6134 17 18.2597 17 19C17 19.7403 17.4022 20.3866 18 20.7324C18.2942 20.9026 18.6357 21 19 21Z M19 22C20.6569 22 22 20.6569 22 19C22 17.3431 20.6569 16 19 16C17.3431 16 16 17.3431 16 19C16 20.6569 17.3431 22 19 22Z`)}var _T=(e,t)=>L(e.a,t),vT=(e,t)=>P(e.a,t),yT=`<!><!><!>`,bT=e=>S(e.a,`_hq`),xT=e=>{S(e.a,`_hn`),S(e.c,`_ho`)},ST=p(1,`<span aria-hidden=true>·</span>`,` `,bT),CT=(e,t)=>ST(e,+!t),wT=(e,t)=>b(e.d,t),TT=(e,t)=>{S(e.e,[`_hp`,t>=90?`_hh`:t>=70?`_hg`:t>=40?`_hf`:`_he`]),b(e.f,Nn(t))},ET=(e,t)=>{wT(e,t[0]?.window),TT(e,t[0]?.used_percent),CT(e,t[1])},DT=j(1,e=>S(e.a,[`_hl`,e._.e,{_hm:e._.h!=null}])),OT=h(0,0,DT),kT=e=>{OT._(e),jT._(e),MT._(e),PT._(e)},AT=j(2,e=>O(e.a,`title`,e._.h==null?`Plan usage`:`${e._.i||`provider unreachable`}; last cached numbers`)),jT=h(0,0,e=>{DT(e),AT(e)}),MT=h(0,0,AT),NT=m(0,`<span><!><span> </span><span> </span></span>`,` D%b D l D `,xT,ET),PT=h(0,0,e=>NT(e,[e._.j,`window`])),FT=(e,t)=>{LT(e,t?.windows),RT(e,t?.stale_seconds),zT(e,t?.note)},IT=w(9,e=>{HT(e,e.j.length),PT(e)}),LT=(e,t)=>IT(e,t||[]),RT=w(7,jT),zT=w(8,MT),BT=FT,VT=p(0,`<span></span>`,` `,kT),HT=(e,t)=>VT(e,+!t),UT=w(4,OT),WT=I,GT=(e=>`/${e}&`)(F);function KT(e){R(e.a,`M14.3632 5.65156L15.8431 4.17157C16.6242 3.39052 17.8905 3.39052 18.6716 4.17157L20.0858 5.58579C20.8668 6.36683 20.8668 7.63316 20.0858 8.41421L18.6058 9.8942M14.3632 5.65156L4.74749 15.2672C4.41542 15.5993 4.21079 16.0376 4.16947 16.5054L3.92738 19.2459C3.87261 19.8659 4.39148 20.3848 5.0115 20.33L7.75191 20.0879C8.21972 20.0466 8.65806 19.8419 8.99013 19.5099L18.6058 9.8942M14.3632 5.65156L18.6058 9.8942`)}var qT=(e,t)=>L(e.a,t),JT=(e,t)=>P(e.a,t),YT=`<!><!><!>`,XT=h(8,0,e=>b(e.b,e._.v)),ZT=e=>{XT._(e),S(e.a,`_fK`)},QT=h(4,0,e=>$r(e.a,dC(e._.s))),$T=e=>{QT._(e),Qr(e.a,12),ei(e.a,`_fF`)},eE=e=>S(e.a,[`_G`,`_fU`]),tE=e=>{ri(e.a),ii(e.a,12),ai(e.a,`_fV`)},nE=A(67,e=>{S(e.c,[`_q`,M,{_s:e._._._.af}]),O(e.c,`title`,e._._._.af?`Delete this workspace?`:`Delete workspace`),b(e.d,e._._._.af?`Delete?`:`Delete`)},e=>e._._._),rE=s(`A4`,e=>{_(e.b,`click`,function(){e._._._.ah(`retry`)}),_(e.c,`click`,function(){e._._._.af?e._._._.ah(`delete`):(gO(e._._._,!0),$n(()=>{gO(e._._._,!1)}))})}),iE=e=>{nE(e),S(e.a,`_fW`),S(e.b,[`_q`,M]),rE(e)},aE=A(63,e=>O(e.a,`href`,`/w/${e._._._._.ab}/review`),e=>e._._._._),oE=e=>{aE(e),S(e.a,cT),SC(e.b),CC(e.b,12),wC(e.b)},sE=A(61,e=>BT(e.a,e._._._._._.a7),e=>e._._._._._),cE=e=>{sE(e),UT(e.a,`_fJ`)},lE=A(61,e=>BT(e.a,e._._._.a7),e=>e._._._),uE=e=>{lE(e),UT(e.a,`_fI`)},dE=A(59,e=>de(e,`c`,e._._._._.a0,RO(e)),e=>e._._._._),fE=s(`A7`,e=>{Se(e,`c`),_(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._._._._.a2(e._.c)):t.key===`Escape`&&(t.preventDefault(),lO(e._._._._,null))}),_(e.c,`blur`,function(){e._._._._.a2(e._.c)}),d(e,{onMount:function(){queueMicrotask(()=>{let t=e.c;t?.focus(),t?.select()})}})}),pE=e=>{dE(e),mE._(e),hE._(e),Qr(e.b,12),ei(e.b,`_fS`),S(e.c,[`_Z`,uT]),fE(e)},mE=h(0,0,e=>$r(e.b,dC(e._.c))),hE=h(0,0,e=>S(e.a,[`_A`,De[uC(e._.g)],`_fO`])),gE=j(11,e=>{S(e.i,[lT,{_s:e._._._._.v===e._.d}]),O(e.i,`title`,e._._._._.v===e._.d?`Close?`:`Close session`)}),_E=A(57,gE,e=>e._._._._),vE=s(`A8`,e=>{_(e.g,`click`,function(){lO(e._._._._,e._.d),dO(e._._._._,e._.h||e._.i)}),_(e.i,`click`,function(){e._._._._.v===e._.d?(iO(e._._._._,null),e._._._._.u?.(e._.d)):e._._._._.y(e._.d)})}),yE=e=>{_E(e),SE(e),CE(e),TE(e),EE._(e),DE._(e),OE._(e),S(e.a,dT),Qr(e.c,12),ei(e.c,`_fS`),S(e.d,`_fM`),S(e.f,`_fN`),S(e.g,cT),KT(e.h),qT(e.h,12),JT(e.h),Pt(e.j),_t(e.j,12),Jt(e.j),vE(e)},bE=p(10,(e=>`<!>${e}<!>`)(yT),(e=>`b/${e}&b`)(`b%c`),cE),xE=j(13,e=>bE(e,e._._._._.a7&&e._.d===e._._._._.a6?0:1),2),SE=A(60,xE,e=>e._._._._),CE=A(61,xE,e=>e._._._._),wE=j(12,e=>O(e.a,`href`,`/w/${e._._._._.ab}?s=${e._.d}`)),TE=A(63,wE,e=>e._._._._),EE=h(0,1,e=>{$r(e.c,dC(e._.c)),b(e.e,e._.c?.title||dC(e._.c))}),DE=h(0,1,e=>{wE(e),gE(e),xE(e)}),OE=h(0,1,e=>S(e.b,[`_A`,De[uC(e._.g)]])),kE=j(4,e=>S(e.a,[`_fC`,{_ft:e.d===e._._._.i}])),AE=A(48,kE,e=>e._._._),jE=e=>{AE(e),PE(e)},ME=p(0,(e=>`<span></span>${e}<input aria-label="Session name">`)(Vr),(e=>` b/${e}& b`)(`b%c`),pE,((e,t,n)=>`<a><span></span>${e}<span> </span></a><div><button title="Rename session">${t}</button><button>${n}</button></div><!><!>`)(Vr,WT,$t),((e,t,n)=>` D b/${e}& D m D D/${t}&l D/${n}&m%c`)(`b%c`,GT,bt),yE),NE=j(5,e=>ME(e,e._._._.z===e.d?0:1)),PE=A(58,NE,e=>e._._._),FE=w(3,e=>{kE(e),NE(e),DE(e)}),IE=(e,t)=>LE(e,t[0]),LE=w(2,e=>{FE(e,e.c?.id),RE(e,e.c?.state),zE(e,e.c?.title),BE(e,e.c?.agent),EE(e),mE(e)}),RE=w(6,e=>{OE(e),hE(e)}),zE=w(7),BE=w(8),VE=s(`A5`,e=>_(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._._.q?.(e.e)})),HE=e=>{S(e.a,pT),Qr(e.b,14),ei(e.b),VE(e)},UE=w(4,e=>{$r(e.b,e.e),b(e.c,e.e)}),WE=m(2,(e=>`<button>${e}<!></button>`)(Vr),(e=>` D/${e}&%l`)(`b%c`),HE,(e,t)=>UE(e,t[0])),GE=j(5,e=>WE(e,[e.e?[`shell`,...e._._._._.r||[]]:[],e=>e])),KE=A(54,GE,e=>e._._._._),qE=(e,t)=>{O(e.a,`popovertarget`,t),O(e.c,`id`,t)},JE=a(4,GE),YE=s(`A6`,e=>{_(e.a,`pointerdown`,function(){JE(e,!0)}),_(e.a,`focus`,function(){JE(e,!0)}),_(e.c,`toggle`,function(t,n){if(t.newState===`open`){JE(e,!0);let t=e.a.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-n.offsetWidth-8))}px`}})}),XE=p(1,(e=>`<button title="New session">${e}</button><div popover=auto></div>`)(Vr),(e=>` D/${e}&l b`)(`b%c`),e=>{KE(e),S(e.a,cT),$r(e.b,`shell`),Qr(e.b,12),ei(e.b),S(e.c,fT),qE(e,f(e)),JE(e,!1),YE(e)}),ZE=A(53,e=>XE(e,+!e._._._.q),e=>e._._._),QE=e=>{ZE(e),eD(e),nD(e),rD(e),S(e.a,`_fB`),gT(e.e),_T(e.e,12),vT(e.e)},$E=p(2,(e=>`<a title="Review changes">${e}</a>`)(bC),(e=>` D/${e}&l`)(xC),oE),eD=A(55,e=>$E(e,+!e._._._.s),e=>e._._._),tD=j(5,e=>O(e.d,`href`,e._._._.t?`/w/${e._._._.ab}`:`/w/${e._._._.ab}/manage`)),nD=A(56,e=>{S(e.d,[cT,{_fu:e._._._.t}]),O(e.d,`title`,e._._._.t?`Back to terminal`:`Manage workspace`),O(e.d,`aria-current`,e._._._.t?`page`:void 0),tD(e)},e=>e._._._),rD=A(63,tD,e=>e._._._),iD=j(14,e=>S(e.a,[`_fx`,{_ft:e._._.e,_bd:e._._.e,_fy:e._._.o,_fw:e._._.f}]),2),aD=A(44,iD,e=>e._._),oD=s(`A9`,e=>_(e.a,`click`,function(t){t.target?.closest(`button, input, a, [popover]`)||e._._.p()})),sD=e=>{aD(e),dD(e),mD(e),hD(e),gD(e),yD(e),bD(e),xD(e),SD._(e),ED._(e),S(e.b,`_fz`),S(e.c,sT),S(e.f,`_fG`),S(e.g,`_fH`),S(e.k,`_fQ`),Kw(e.n),oD(e)},cD=p(9,(e=>`<div><!><!><a>${e}</a></div>`)(mT),(e=>` D%b%b D/${e}&m`)(hT),QE),lD=p(8,`<span> </span>`,` D `,ZT),uD=j(22,e=>lD(e,e._._.f&&e.v?0:1)),dD=A(45,e=>{cD(e,+!!e._._.f),iD(e),uD(e)},e=>e._._),fD=m(12,`<div></div>`,` `,jE,IE),pD=(e,t)=>{OD(e,t.length),kD(e,t[0]),fD(e,[t.length>1?t:[],`id`])},mD=A(47,e=>pD(e,e._._.h||[]),e=>e._._),hD=A(49,e=>Xw(e.n,e._._.l),e=>e._._),gD=A(52,iD,e=>e._._),_D=p(11,(e=>`<!>${e}<!>`)(yT),(e=>`b/${e}&b`)(`b%c`),uE),vD=j(17,e=>_D(e,e.q===1&&e._._.a7?0:1)),yD=A(61,vD,e=>e._._),bD=A(63,e=>O(e.c,`href`,`/w/${e._._.ab}`),e=>e._._),xD=A(64,e=>b(e.h,e._._.ac),e=>e._._),SD=h(0,2,e=>eT(e.n,e._.c)),CD=w(21,e=>{uD(e),XT(e)}),wD=j(20,e=>CD(e,e.q===0?e.t:e.q>1?`${e.q} sessions`:``)),TD=w(19,e=>{O(e.d,`title`,e.t),wD(e)}),ED=h(0,2,e=>{S(e.d,[`_A`,De[e._.d],`_fL`]),TD(e,e._.d===`working`?`Working`:e._.d===`waiting`?`Needs input`:e._.d===`idle`?`Idle`:`Not running`)}),DD=p(4,(e=>`<!>${e}<!>`)(Vr),(e=>`b/${e}&b`)(`b%c`),$T),OD=w(16,e=>{DD(e,e.q===1?0:1),wD(e),vD(e)}),kD=w(18,QT),AD=j(10,e=>S(e.a,[`_fx`,`_fT`,{_fy:e._._.o,_fw:e._._.f}])),jD=A(45,AD,e=>e._._),MD=e=>{jD(e),ND(e),PD(e),zD(e),BD(e),VD(e),S(e.b,`_fz`),S(e.c,sT),S(e.e,`_fG`),S(e.f,`_fH`),S(e.h,`_fX`)},ND=A(52,AD,e=>e._._),PD=A(64,e=>b(e.g,e._._.ac),e=>e._._),FD=p(3,ti,(e=>`/${e}&`)(ni),tE,`<span></span>`,` `,eE),ID=j(11,e=>{O(e.h,`title`,e._._.ad||e._._.ae),b(e.i,e._._.ad?`Restore failed: ${e._._.ad}`:e._._.ae||`Restoring…`)}),LD=p(9,`<div><button type=button title="Run the restore again">Retry</button><button type=button> </button></div>`,` D b D `,iE),RD=j(12,e=>LD(e,e._._.ad&&!e._._.ag?0:1)),zD=A(65,e=>{O(e.a,`aria-busy`,e._._.ad?`false`:`true`),FD(e,+!e._._.ad),ID(e),RD(e)},e=>e._._),BD=A(66,ID,e=>e._._),VD=A(68,RD,e=>e._._),HD=A(44,e=>S(e.a,[oT,{_ft:e._._.e}]),e=>e._._),UD=e=>{HD(e),WD(e),KD(e),qD(e),JD(e),YD._(e)},WD=A(51,e=>b(e.b,e._._.n===void 0?`·`:e._._.n+1),e=>e._._),GD=j(3,e=>O(e.a,`title`,e._._.a9?`${e._._.ac} — restoring`:e._._.ac)),KD=A(62,GD,e=>e._._),qD=A(63,e=>O(e.a,`href`,`/w/${e._._.ab}`),e=>e._._),JD=A(64,GD,e=>e._._),YD=h(0,0,e=>S(e.c,[`_A`,De[e._.d],`_bc`])),XD=p(0,`<a> <span></span></a>`,` D b `,UD,`<section><div><div><!><span><span> </span><span> </span></span></div></div><!></section>`,` D D D%b D D l D o%`,MD,(e=>`<section><div><a><span></span><!><span><span> </span><!></span></a><!></div><div><!><!>${e}</div></section>`)(TC),(e=>` D D D b%b D D l%m%l D%b%b/${e}&m`)(`b%c`),sD),ZD=j(1,e=>XD(e,e._.g?0:e._.a9?1:2)),QD=h(0,0,ZD),$D=e=>{QD._(e),nO._(e),rO._(e)},eO=w(3,e=>{YD(e),ED(e)}),tO=w(2,e=>{eO(e,lC(e.c)),SD(e)}),nO=h(0,0,e=>tO(e,e._.m)),rO=h(0,0,ZD),iO=a(21,k(_E)),aO=(e,t)=>ore(e,t.timer),oO=w(28),sO=j(27,e=>oO(e,zO(e)),2),cO=k(PE),lO=a(25,e=>{sO(e),cO(e)}),uO=k(dE),dO=a(26,e=>{sO(e),uO(e)}),fO=w(33,k(yD,CE,lE,sE)),pO=j(31,e=>fO(e,e.a4?Hn(e.a4?.agent,e.a3):null)),mO=a(29,pO),hO=a(40,k(BD)),gO=a(41,k(nE)),_O=a(42,k(VD)),ire=s(`A12`,e=>d(e,{onMount:function(){let t=new AbortController;return zn(t=>{mO(e,t)},t.signal),{abort:t}},onDestroy:function(){this.abort.abort()}}));function vO(e){iO(e,null),aO(e,{timer:0}),lO(e,null),dO(e,``),mO(e,Bn()),hO(e,``),gO(e,!1),_O(e,!1),ire(e)}var are=w(24),ore=w(23,e=>are(e,BO(e))),yO=w(3,sO),sre=w(30,e=>{ure(e,e.a4?.id),pO(e)}),cre=k(SE),lre=s(`A11`,e=>{if(e.a6){let t=Bn();t&&mO(e,t),Vn().then(t=>{mO(e,t)})}}),ure=w(32,e=>{cre(e),lre(e)}),bO=j(9,e=>sre(e,(()=>{if(!e.e||e.f||e.g)return null;let t=e.h||[],n=t.find(t=>t.id===e.i)??(t.length===1?t[0]:null);return n&&n.agent!==`shell`?n:null})()),4),dre=k(HD,aD),xO=w(4,e=>{bO(e),dre(e)}),fre=k(jD,dD),SO=w(5,e=>{bO(e),fre(e)}),CO=w(6,e=>{bO(e),QD(e)}),pre=k(mD),wO=w(7,e=>{bO(e),pre(e)}),mre=k(AE),TO=w(8,e=>{bO(e),mre(e)}),hre=p(0,`<!><!><!>`,`b%`,$D),gre=(e,t)=>{yre(e,t?.pending),bre(e,t?.id),xre(e,t?.name),Sre(e,t?.pending_error),hre(e,+!t)},_re=s(`A10`,e=>d(e,{pending:!!e.a9,workspaceId:e.l,onMount:function(){let t=new AbortController;return Bt().addEventListener(`workspace.progress`,t=>{let n=t.data;this.pending&&n?.op===`restore:${this.workspaceId}`&&hO(e,n.message||``)},{signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}},1)),EO=j(36,_re),vre=k(KD),yre=w(35,e=>{EO(e),rO(e),vre(e)}),bre=w(37,k(qD,bD,rD,TE,aE)),xre=w(38,k(JD,PD,xD)),Sre=w(39,k(zD)),DO=gre,Cre=w(43),wre=k(hD),OO=w(11,e=>{Cre(e,VO(e)),EO(e),wre(e)}),kO=w(12,nO),AO=w(13,k(WD)),jO=w(14,k(ND,gD)),MO=w(15),NO=w(16,k(ZE)),PO=w(17,k(KE)),FO=w(18,k(eD)),IO=w(19,k(nD)),LO=w(20),RO=e=>t=>{dO(e._._._._,t)},zO=e=>t=>{e.z===t.id&&(lO(e,null),e.d?.(t,e.a0.trim()))},BO=e=>t=>{clearTimeout(e.x),iO(e,t),e.x=$n(()=>{iO(e,null)})},VO=e=>async t=>{_O(e,t===`retry`),gO(e,!1);try{await N(`/api/workspaces/${e.l}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t})})}catch(n){hO(e,`${t===`retry`?`Retry`:`Delete`} failed: ${String(n.message||n)}`)}finally{_O(e,!1)}};n(`A0`,RO),n(`A2`,zO),n(`A1`,BO),n(`A3`,VO);var Tre=`<div><!><!></div>`,Ere=` D%b%l`,HO=h(6,0,e=>b(e.b,e._.o)),Dre=e=>{HO._(e),S(e.a,fC)},UO=h(3,0,e=>$r(e.a,dC(e._.p))),Ore=e=>{UO._(e),Qr(e.a,16),ei(e.a,`_eU`)},WO=A(36,e=>$r(e.a,dC(e._._.w)),e=>e._._),kre=e=>{WO(e),Qr(e.a,16),ei(e.a,`_eL`)},Are=(e,t)=>S(e.c,[`_A`,De[t]]),jre=(e,t)=>{eT(e.i,t),Pre(e,t?.sessions),Are(e,lC(t))},GO=j(9,e=>jre(e,e._._._.g[e._.c])),KO=A(26,GO,e=>e._._._),Mre=e=>{KO(e),qO._(e),JO._(e),S(e.a,`_eR`),S(e.b,`_eS`),S(e.e,`_eT`),kt(e.h),Ee(e.h,14),jt(e.h,`_eW`),Kw(e.i)},qO=h(0,1,e=>{O(e.b,`href`,`/w/${e._.c}`),Xw(e.i,e._.c),GO(e)}),JO=h(0,1,e=>b(e.f,e._.f)),Nre=(e,t)=>{Rre(e,t.length),zre(e,t[0])},Pre=(e,t)=>Nre(e,t||[]),Fre=p(6,`<span><!> sessions</span>`,` D%`,Dre),Ire=(e,t)=>Fre(e,+!t),Lre=p(3,(e=>`<!>${e}<!>`)(Vr),(e=>`b/${e}&b`)(`b%c`),Ore),Rre=w(14,e=>{Ire(e,e.o>1),Lre(e,e.o===1?0:1),HO(e)}),zre=w(15,UO),YO=j(1,e=>kO(e.a,e._._._.g[e._.c])),XO=A(26,YO,e=>e._._._),Bre=e=>{XO(e),ZO._(e),QO._(e),vO(e.a),SO(e.a,!0),xO(e.a,!1),MO(e.a,_k),yO(e.a),CO(e.a),wO(e.a),TO(e.a),AO(e.a),jO(e.a),NO(e.a),PO(e.a),FO(e.a),IO(e.a),LO(e.a)},ZO=h(0,0,e=>{OO(e.a,e._.c),YO(e)}),QO=h(0,0,e=>DO(e.a,e._.e)),Vre=p(0,(e=>`<!>${e}<!>`)(YT),(e=>`b/${e}&b`)(`b%c`),Bre,((e,t)=>`<div><a><span></span><!><span> </span><!>${e}</a>${t}</div>`)(Ue,TC),((e,t)=>` D D b%b D l%b/${e}&l/${t}&l`)(Ge,`b%c`),Mre),Hre=w(4,e=>{Wre(e,e.e?.name),Vre(e,e.e?.pending?0:e.e?1:2),QO(e)}),$O=j(3,e=>Hre(e,e._._.l.get(e.c))),ek=A(29,$O,e=>e._._),Ure=ek,Wre=w(5,JO),Gre=w(2,e=>{$O(e),ZO(e),qO(e)}),Kre=m(0,`<!><!><!>`,`b%`,Ure,(e,t)=>Gre(e,t[0])),tk=h(2,0,e=>Kre(e,[e._.j,e=>e])),qre=e=>{tk._(e),S(e.a,`_eQ`)},nk=j(8,e=>S(e.a,[`_eO`,{_eN:e.h===e._._._.i}])),rk=A(27,nk,e=>e._._._),Jre=e=>{rk(e),ak(e),Qr(e.c,14),ei(e.c),S(e.d,`_eP`)},ik=j(9,e=>O(e.a,`href`,`/w/${e._._._.o}?s=${e.h}`)),ak=A(30,ik,e=>e._._._),Yre=w(7,e=>{ik(e),nk(e)}),Xre=(e,t)=>S(e.b,[`_A`,De[uC(t)]]),Zre=(e,t)=>{$r(e.c,dC(t)),b(e.e,t.title||dC(t)),Yre(e,t?.id),Xre(e,t?.state)},Qre=m(0,(e=>`<a><span></span>${e}<span> </span></a>`)(Vr),(e=>` D b/${e}& D m`)(`b%c`),Jre,(e,t)=>Zre(e,t[0])),ok=A(34,e=>Qre(e,[e._._.u,`id`]),e=>e._._),$re=e=>{ok(e),S(e.a,`_eM`)},sk=h(1,0,e=>{O(e.b,`href`,`/w/${e._.o}`),Xw(e.j,e._.o)}),eie=s(`K1`,e=>_(e.a,`click`,function(e,t){e.target?.closest(`button, a, input, [popover]`)||t.querySelector(`a[data-open]`)?.click()})),tie=e=>{sk._(e),ck._(e),lk._(e),uk._(e),dk._(e),fk._(e),pk._(e),S(e.a,`_eH`),S(e.b,`_eI`),S(e.e,`_eJ`),S(e.g,`_eK`),Kw(e.j),eie(e)},ck=h(1,0,e=>b(e.f,e._.p)),lk=h(1,0,e=>eT(e.j,e._.q)),uk=h(1,0,e=>S(e.c,[`_A`,De[e._.t]])),nie=p(3,(e=>`<!>${e}<!>`)(Vr),(e=>`b/${e}&b`)(`b%c`),kre),dk=h(1,0,e=>nie(e,e._.v===1?0:1)),rie=p(8,`<div></div>`,` `,$re),fk=h(1,0,e=>rie(e,+!e._.x)),pk=h(1,0,e=>b(e.h,e._.z)),iie=p(1,(e=>`<section aria-current=page><a data-open><span></span><!><span> </span><span> </span></a><!>${e}</section>`)(TC),(e=>` D D b%b D l D m%b/${e}&l`)(`b%c`),tie),aie=w(19,uk),oie=w(16,e=>{mie(e,e.q?.sessions),aie(e,lC(e.q)),lk(e)}),mk=j(13,e=>oie(e,e.m?e.g[e.m?.id]:void 0)),sie=w(12,e=>{lie(e,e.m?.id),uie(e,e.m?.name),iie(e,+!e.m),mk(e)}),cie=k(ak),lie=w(14,e=>{sk(e),cie(e)}),uie=w(15,ck),die=sie,fie=k(ok),pie=w(20,e=>{yie(e,e.u.length),bie(e,e.u[0]),fie(e)}),hk=j(18,e=>pie(e,e.h||e.r||[])),mie=w(17,hk),hie=k(XO,KO),gie=w(6,e=>{mk(e),hie(e)}),_ie=w(25,pk),gk=j(24,e=>_ie(e,e.v===0?`No sessions`:e.x?`${e.v} sessions`:``)),vie=w(23,e=>{gk(e),fk(e)}),yie=w(21,e=>{vie(e,e.v>1),gk(e),dk(e)}),bie=w(22,k(WO)),xie=w(7,hk);function Sie(e){S(e.a,`_eG`)}var Cie=p(2,`<div></div>`,` `,qre),wie=(e,t)=>Cie(e,+!t),Tie=w(8,k(rk)),Eie=w(9,e=>{wie(e,e.j?.length),tk(e)}),Die=w(11,k(ek));function _k(){}n(`K0`,_k);var vk=I,yk=(e=>`/${e}&`)(F);function bk(e){R(e.a,`M18 6H20M22 6H20M20 6V4M20 6V8 M21.4 20H2.6C2.26863 20 2 19.7314 2 19.4V11H21.4C21.7314 11 22 11.2686 22 11.6V19.4C22 19.7314 21.7314 20 21.4 20Z M2 11V4.6C2 4.26863 2.26863 4 2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H14`)}var xk=(e,t)=>L(e.a,t),Sk=(e,t)=>P(e.a,t),Oie=I,kie=(e=>`/${e}&`)(F);function Aie(e){R(e.a,`M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z M7.25 10L5.5 12L7.25 14 M9.5 21V3`)}var jie=(e,t)=>L(e.a,t),Mie=(e,t)=>P(e.a,t);function Nie(e,t){return e.filter(e=>t.has(e)).sort((e,n)=>t.get(e).name.localeCompare(t.get(n).name))}var Pie=e=>S(e.a,[`_A`,XS]),Fie=e=>{Tt(e.a),Et(e.a),Ft(e.a)},Iie=e=>{Aie(e.a),jie(e.a),Mie(e.a)},Lie=e=>S(e.a,[`_A`,XS]),Ck=A(71,e=>{S(e.a,[QS,{_bM:e._._.ac}]),O(e.a,`title`,e._._.ac?`Notifying when an agent needs input. Turn off`:`Notify when an agent needs input`)},e=>e._._),Rie=s(`B14`,e=>_(e.a,`click`,function(){e._._.ag()})),zie=e=>{Ck(e),tC(e.b),nC(e.b),rC(e.b),Rie(e)},wk=A(71,e=>{S(e.a,[QS,`_bX`,{_bM:e._._.ac}]),O(e.a,`title`,e._._.ac?`Notifying when an agent needs input. Turn off`:`Notify when an agent needs input`)},e=>e._._),Bie=s(`B11`,e=>_(e.a,`click`,function(){e._._.ag()})),Vie=e=>{wk(e),tC(e.b),nC(e.b,16),rC(e.b),Bie(e)},Tk=j(2,e=>O(e.a,`href`,e._.a9===`new`?e._.as:`/new`)),Ek=h(5,0,e=>{O(e.a,`title`,e._.a9===`new`?`Back to workspace`:`New workspace`),O(e.a,`aria-current`,e._.a9===`new`?`page`:void 0),Tk(e)}),Hie=e=>{Ek._(e),Dk._(e),S(e.a,[`_q`,`_r`,et,`_bY`]),bk(e.b),xk(e.b,16),Sk(e.b)},Dk=h(5,0,Tk),Uie=p(5,`<span title="Machine setup incomplete"></span>`,` `,Pie),Ok=h(5,1,e=>Uie(e,e._.v===!1?0:1)),Wie=s(`B15`,e=>_(e.a,`click`,function(){ij(e._,!e._.ab),Ze(e._.ab)})),Gie=e=>{Ok._(e),Ak._(e),jk._(e),Mk._(e),Nk._(e),S(e.a,ZS),S(e.b,[`_z`,`_b6`]),oC(e.e),sC(e.e),cC(e.e),bk(e.h),xk(e.h,16),Sk(e.h),Wie(e)},kk=j(8,e=>{O(e.d,`href`,e._.a9===`settings`?e._.as:`/settings`),O(e.g,`href`,e._.a9===`new`?e._.as:`/new`)}),Ak=h(5,1,e=>{S(e.d,[YS,{_bM:e._.a9===`settings`}]),O(e.d,`title`,e._.a9===`settings`?`Back to workspace`:`Settings`),O(e.d,`aria-current`,e._.a9===`settings`?`page`:void 0),S(e.g,[YS,{_bM:e._.a9===`new`}]),O(e.g,`title`,e._.a9===`new`?`Back to workspace`:`New workspace`),O(e.g,`aria-current`,e._.a9===`new`?`page`:void 0),kk(e)}),Kie=p(0,Oie,(e=>`/${e}&`)(kie),Iie,dt,(e=>`/${e}&`)(see),Fie),jk=h(5,1,e=>{O(e.a,`title`,e._.ab?`Collapse sidebar`:`Expand sidebar`),Kie(e,+!e._.ab)}),qie=p(2,(e=>`<button>${e}</button>`)($S),(e=>` D/${e}&l`)(eC),zie),Mk=h(5,1,e=>qie(e,+!e._.ae)),Nk=h(5,1,kk),Pk=j(9,e=>wO(e.b,e.d===e._._.a6&&e._._.w?e._._.w:e._._.al[e.d]?.sessions||[]),3),Fk=A(59,Pk,e=>e._._),Jie=s(`B13`,e=>{_(e.a,`mouseenter`,function(){e._.i()}),_(e.a,`mouseleave`,function(){e._.j()})}),Yie=e=>{Fk(e),Ik(e),Rk(e),Bk(e),Vk(e),Hk(e),Xie(e),Kk(e),qk(e),Jk(e),Xk(e),Qk(e),$k._(e),tA._(e),nA._(e),S(e.a,[`__`,`_b7`]),vO(e.b),jO(e.b,!0),SO(e.b),CO(e.b),AO(e.b),Jie(e)},Ik=A(60,e=>PO(e.b,e._._.y),e=>e._._),Lk=j(4,e=>NO(e.b,oj(e))),Rk=A(61,Lk,e=>e._._),zk=j(11,e=>FO(e.b,sj(e)),4),Bk=A(62,zk,e=>e._._),Vk=A(63,zk,e=>e._._),Hk=A(64,e=>yO(e.b,e._._.a2),e=>e._._),Xie=A(65,e=>LO(e.b,e._._.a3),e=>e._._),Uk=j(5,e=>xO(e.b,e.d===e._._.a6)),Wk=j(8,e=>IO(e.b,e._._.a9===`manage`&&e.d===e._._.a6),2),Gk=j(10,e=>TO(e.b,e.d===e._._.a6&&e._._.a9===`term`?e._._.a7:null),3),Kk=A(67,e=>{MO(e.b,cj(e)),Uk(e),Wk(e),zk(e),Pk(e),Gk(e)},e=>e._._),qk=A(68,Gk,e=>e._._),Jk=A(69,e=>{Wk(e),zk(e),Gk(e)},e=>e._._),Yk=j(6,e=>DO(e.b,e._._.aj.get(e.d))),Xk=A(74,Yk,e=>e._._),Zk=j(7,e=>kO(e.b,e._._.al[e.d])),Qk=A(75,e=>{Zk(e),Pk(e)},e=>e._._),Zie=w(3,e=>{OO(e.b,e.d),Yk(e),Zk(e),Uk(e),Wk(e),Lk(e),zk(e),Pk(e),Gk(e)}),$k=h(1,0,e=>Zie(e,e._.d)),eA=j(2,e=>ge(e.a,`top:${e._.e}px;left:${e._.f}px`)),tA=h(1,0,eA),nA=h(1,0,eA),rA=j(4,e=>xO(e.b,e.d===e._._.a6)),iA=A(67,e=>{MO(e.b,lj(e)),rA(e)},e=>e._._),Qie=s(`B12`,e=>{_(e.a,`mouseenter`,function(t,n){e._.i();let r=n.getBoundingClientRect();fA(e._,{id:e.d,top:r.top,left:r.right+8})}),_(e.a,`mouseleave`,function(){e._.j()})}),$ie=e=>{iA(e),oA(e),cA(e),uA(e),vO(e.b),CO(e.b,!0),yO(e.b),SO(e.b),wO(e.b),TO(e.b),jO(e.b),NO(e.b),PO(e.b),FO(e.b),IO(e.b),LO(e.b),Qie(e)},aA=j(5,e=>DO(e.b,e._._.aj.get(e.d))),oA=A(74,aA,e=>e._._),sA=j(6,e=>kO(e.b,e._._.al[e.d])),cA=A(75,sA,e=>e._._),lA=j(7,e=>AO(e.b,e._._.ao.get(e.d))),uA=A(77,lA,e=>e._._),eae=w(3,e=>{OO(e.b,e.d),lA(e),aA(e),sA(e),rA(e)}),tae=m(0,(e=>`<span>${e}</span>`)(YT),(e=>` D/${e}&l`)(`b%c`),$ie,(e,t)=>eae(e,t[0])),dA=h(4,0,e=>tae(e,[e._.am,e=>e])),nae=p(1,(e=>`<div>${e}</div>`)(YT),(e=>` D/${e}&l`)(`b%c`),Yie),fA=a(2,e=>{aae(e,e.c?.id),oae(e,e.c?.top),sae(e,e.c?.left),nae(e,+!e.c)}),rae=(e,t)=>uae(e,t.timer),iae=e=>{dA._(e),S(e.a,`_b4`),fA(e,null),rae(e,{timer:0})},aae=w(3,$k),oae=w(4,tA),sae=w(5,nA),cae=w(8),lae=w(9),uae=w(7,e=>{cae(e,uj(e)),lae(e,dj(e))}),pA=j(8,e=>wO(e.a,e.c===e._._.a6&&e._._.w?e._._.w:e._._.al[e.c]?.sessions||[]),3),mA=A(59,pA,e=>e._._),dae=e=>{mA(e),hA(e),_A(e),yA(e),bA(e),xA(e),fae(e),TA(e),EA(e),DA(e),OA(e),AA(e),MA(e),vO(e.a),SO(e.a,!1),CO(e.a),AO(e.a),jO(e.a)},hA=A(60,e=>PO(e.a,e._._.y),e=>e._._),gA=j(6,e=>NO(e.a,fj(e)),2),_A=A(61,gA,e=>e._._),vA=j(10,e=>FO(e.a,pj(e)),4),yA=A(62,vA,e=>e._._),bA=A(63,vA,e=>e._._),xA=A(64,e=>yO(e.a,e._._.a2),e=>e._._),fae=A(65,e=>LO(e.a,e._._.a3),e=>e._._),SA=j(3,e=>xO(e.a,e.c===e._._.a6)),CA=j(7,e=>IO(e.a,e._._.a9===`manage`&&e.c===e._._.a6),2),wA=j(9,e=>TO(e.a,e.c===e._._.a6&&e._._.a9===`term`?e._._.a7:null),3),TA=A(67,e=>{MO(e.a,mj(e)),SA(e),CA(e),vA(e),pA(e),wA(e)},e=>e._._),EA=A(68,wA,e=>e._._),DA=A(69,e=>{CA(e),vA(e),wA(e)},e=>e._._),OA=A(73,gA,e=>e._._),kA=j(4,e=>DO(e.a,e._._.aj.get(e.c))),AA=A(74,kA,e=>e._._),jA=j(5,e=>kO(e.a,e._._.al[e.c])),MA=A(75,e=>{jA(e),pA(e)},e=>e._._),pae=w(2,e=>{OO(e.a,e.c),kA(e),jA(e),SA(e),CA(e),gA(e),vA(e),pA(e),wA(e)}),mae=m(0,(e=>`<!>${e}<!>`)(YT),(e=>`b/${e}&b`)(`b%c`),dae,(e,t)=>pae(e,t[0])),NA=h(3,1,e=>mae(e,[e._.am,e=>e])),hae=e=>{NA._(e),S(e.a,`_b3`)},PA=h(3,0,e=>xie(e.a,e._.w)),gae=e=>{PA._(e),FA._(e),IA._(e),LA._(e),RA._(e),zA._(e),Sie(e.a)},FA=h(3,0,e=>die(e.a,e._.a4)),IA=h(3,0,e=>Tie(e.a,e._.a7)),LA=h(3,0,e=>Die(e.a,e._.aj)),RA=h(3,0,e=>gie(e.a,e._.al)),zA=h(3,0,e=>Eie(e.a,e._.au)),BA=h(2,0,e=>b(e.d,e._.u)),_ae=e=>{BA._(e),VA._(e),S(e.a,`_bZ`),S(e.b,`_b0`),S(e.c,`_b1`)},VA=h(2,0,e=>O(e.b,`src`,e._.at)),HA=A(57,e=>b(e.d,e._._.u),e=>e._._),vae=e=>{HA(e),UA(e),S(e.a,`_bZ`),S(e.b,`_b0`),S(e.c,`_b1`)},UA=A(79,e=>O(e.b,`src`,e._._.at),e=>e._._),yae=p(2,`<div title="This work server (Settings → Appearance)"><img alt aria-hidden=true><span> </span></div>`,` D b D `,vae),WA=h(1,0,e=>yae(e,+!e._.u)),bae=e=>{WA._(e),GA._(e),qA._(e),JA._(e),YA._(e),S(e.a,`_bU`),S(e.b,`_b2`),S(e.d,`_bV`),S(e.e,`_bW`),oC(e.h),sC(e.h,16),cC(e.h)},xae=p(8,`<span title="Machine setup incomplete"></span>`,` `,Lie),GA=h(1,0,e=>xae(e,e._.v===!1?0:1)),KA=j(9,e=>O(e.g,`href`,e._.a9===`settings`?e._.as:`/settings`)),qA=h(1,0,e=>{S(e.g,[YS,`_bX`,{_bM:e._.a9===`settings`}]),O(e.g,`title`,e._.a9===`settings`?`Back to workspace`:`Settings`),O(e.g,`aria-current`,e._.a9===`settings`?`page`:void 0),KA(e)}),Sae=p(5,(e=>`<button>${e}</button>`)($S),(e=>` D/${e}&l`)(eC),Vie),JA=h(1,0,e=>Sae(e,+!e._.ae)),YA=h(1,0,KA),Cae=w(54,e=>{YA(e),Nk(e),Dk(e)}),wae=w(56,zA),XA=j(49,e=>wae(e,e.am.filter(t=>t!==e.a6))),Tae=w(48,e=>{XA(e),NA(e),dA(e)}),ZA=j(46,e=>Tae(e,Nie(e.ah,e.aj))),Eae=w(43,ZA),Dae=k(AA,oA,Xk),Oae=w(45,e=>{ZA(e),LA(e),Dae(e)}),kae=w(50,k(uA)),Aae=(e,t)=>{Oae(e,new Map(t.map(e=>[e.id,e]))),kae(e,new Map(Jn(t).map((e,t)=>[e.id,t])))},QA=j(31,e=>{Eae(e,e.r?.length?e.r.filter(e=>e.status===`active`).map(e=>e.id):e.a4?[e.a4?.id]:[]),Aae(e,e.r||(e.a4?[e.a4]:[]))}),jae=w(30,e=>{Nae(e,e.a4?.id),Cae(e,e.a4?`/w/${e.a4?.id}`:`/new`),QA(e),FA(e)}),Mae=k(TA,iA,Kk),Nae=w(32,e=>{XA(e),Mae(e)}),Pae=(e,t)=>jae(e,t||null),Fae=k(EA,qk),Iae=c(33,e=>{IA(e),Fae(e)}),$A=j(11,e=>Iae(e,e.j,e.k)),Lae=w(9,$A),Rae=w(10,$A),zae=w(41,k(OA)),Bae=p(1,(e=>`<header><div><!><h1>Workspaces</h1></div><div><!><a>${e}<!></a></div></header>`)(iC),(e=>` D D%b l D%b D/${e}&%n`)(aC),bae),Vae=p(5,(e=>`<a>${e} New workspace</a>`)(vk),(e=>` D/${e}&l`)(yk),Hie,((e,t)=>`<button></button><div></div><!><a>${e}<!></a><a>${t}</a>`)(iC,vk),((e,t)=>` b b%b D/${e}&%l D/${t}&l`)(aC,yk),Gie),Hae=p(3,Tre,(e=>`/${e}&`)(Ere),gae,`<div></div>`,` `,hae),ej=j(53,e=>{S(e.a,[`_bR`,{_bP:!e.ab,_bQ:e.ap}]),Hae(e,e.ap?0:e.ab?1:2)}),Uae=p(2,`<div title="This work server (Settings → Appearance)"><img alt aria-hidden=true><span> </span></div>`,` D b D `,_ae),tj=j(52,e=>Uae(e,!e.ap&&e.u?0:1)),Wae=w(51,e=>{Bae(e,+!e.ap),Vae(e,+!e.ap),ej(e),tj(e)}),Gae=k(DA,Jk),nj=c(35,e=>{O(e.a,`hidden`,e.a9===`diff`),zae(e,hj(e)),Wae(e,e.a9===`nav`),qA(e),Gae(e),Ak(e),Ek(e)}),rj=j(14,e=>nj(e,e.m,e.n)),Kae=w(12,rj),qae=w(13,rj),Jae=p(4,`<div></div><!><!>`,` b%`,iae),ij=a(37,e=>{Jae(e,+!!e.ab),ej(e),jk(e)}),Yae=w(42),Xae=j(39,e=>Yae(e,gj(e))),Zae=k(wk,Ck),aj=a(38,e=>{Xae(e),Zae(e)}),Qae=s(`B17`,e=>d(e,{onMount:function(){$ae(e,Wn()),e.ae&&Gn().then(t=>{aj(e,!!t)})}})),$ae=a(40,e=>{JA(e),Mk(e),Qae(e)});s(`B16`,e=>{e.q&&ij(e,Xt())});var eoe=w(17,QA),toe=k(MA,cA,Qk),noe=w(47,e=>{RA(e),toe(e)}),roe=(e,t)=>noe(e,t||{}),ioe=k(UA),aoe=w(55,e=>{ioe(e),VA(e)}),ooe=(e,t)=>aoe(e,`/api/instance/icon${t?`?v=${t.slice(1)}`:``}`),soe=k(HA),coe=w(20,e=>{tj(e),WA(e),soe(e),BA(e)}),loe=w(21,e=>{GA(e),Ok(e)}),uoe=k(mA,Fk),doe=w(22,e=>{PA(e),uoe(e)}),foe=w(24,k(hA,Ik)),poe=w(25,k(_A,Rk)),moe=w(26,k(yA,Bk)),hoe=w(27,k(bA,Vk)),goe=w(28,k(xA,Hk)),oj=e=>function(t){fA(e._,null),e._._.z(e.d,t)},sj=e=>function(){fA(e._,null),e.d===e._._.a6?e._._.a9===`diff`?nj(e._._,`term`):e._._.a0?.():e._._.a1?.(e.d)},cj=e=>function(){fA(e._,null),e.d===e._._.a6?(e._._.a9===`nav`||e._._.a9===`manage`||e._._.a9===`settings`||e._._.a9===`new`)&&nj(e._._,`term`):e._._.x?.(e.d)},lj=e=>function(){e.d===e._._.a6?(e._._.a9===`nav`||e._._.a9===`manage`||e._._.a9===`settings`||e._._.a9===`new`)&&nj(e._._,`term`):e._._.x?.(e.d)},uj=e=>()=>clearTimeout(e.h),dj=e=>()=>{clearTimeout(e.h),e.h=setTimeout(()=>{fA(e,null)},150)},fj=e=>function(t){e._._.af(),e._._.z(e.c,t)},pj=e=>function(){e.c===e._._.a6?e._._.a9===`diff`?nj(e._._,`term`):e._._.a0?.():e._._.a1?.(e.c)},mj=e=>function(){e.c===e._._.a6?(e._._.a9===`nav`||e._._.a9===`manage`||e._._.a9===`settings`||e._._.a9===`new`)&&nj(e._._,`term`):(e._._.af(),e._._.x?.(e.c))},hj=e=>()=>{e.a9===`nav`&&nj(e,`term`)},gj=e=>async()=>{try{e.ac?(await fee(),aj(e,!1)):(aj(e,await dee()),e.ac||e.p?.(`Notifications blocked. Allow them for this site in browser or system settings.`))}catch(t){aj(e,!1),e.p?.(`Notifications failed: ${String(t.message||t)}`)}};n(`B9`,oj),n(`B10`,sj),n(`B8`,cj),n(`B7`,lj),n(`B5`,uj),n(`B6`,dj),n(`B3`,fj),n(`B4`,pj),n(`B2`,mj),n(`B0`,hj),n(`B1`,gj);var _oe=(e,t,n)=>{for(;n;){if(n.O?.i)return(n.J||=[]).push(e,t);n=n.N}};e(e=>(t,n=se.has(t))=>{if(n||l.has(t)){let e=0,r,i,a;for(;e<t.length;)r=t[e++],i=t[e++],(a=i.F)?.H!==0&&!(n&&_oe(r,i,a))&&r(i)}else e(t)},e=>t=>{try{let n=t.b.F;for(;n;){if(n.W)return t.f=1,n.W.push(t);n=n.N}t.f=0,e(t)}catch(e){ce(t.b,e)}});var _j=/^[\w./+@-]+$/,voe=/^(?:[\w-]+(?:\.[\w-]+)+\/)?[\w.-]+\/[\w.-]+$/,yoe=/^(?!\.{1,2}$)[\w.-]+$/;function boe(e){let t=``,n,r;if(typeof e==`string`){let n=e.lastIndexOf(`@`);t=n>0?e.slice(0,n):e,r=n>0?e.slice(n+1):void 0}else if(e&&typeof e==`object`){let i=e;t=String(i.repo??i.full_name??i.fullName??``),n=typeof i.dir==`string`?i.dir:void 0,typeof i.worktree==`string`&&(n=i.worktree),r=typeof i.base==`string`?i.base:void 0,typeof i.base_branch==`string`&&(r=i.base_branch)}else return null;if(t=t.trim(),!voe.test(t))return null;let i=t.split(`/`);return i.length===3&&(t=[i[0].toLowerCase(),i[1],i[2]].join(`/`)),r!==void 0&&!_j.test(r)||n!==void 0&&!yoe.test(n)?null:{full_name:t,worktree:n||t.split(`/`).at(-1),base_branch:r||``,default_branch:e&&typeof e==`object`&&typeof e.default_branch==`string`?e.default_branch:r||``}}function xoe(e){return JSON.stringify({name:e.name,branch:e.branch,repos:e.repos},null,1)+`
3
+ `}function vj(e){let t=String(e??``).trim();if(!t)throw Error(`paste a workspace invite`);let n;try{n=JSON.parse(t)}catch{throw Error(`not an invite (expected JSON)`)}if(!n||typeof n!=`object`)throw Error(`not an invite`);if(Array.isArray(n.workspaces)){if(n.workspaces.length!==1)throw Error(n.workspaces.length?`this is a whole backup — restore it from Settings, or paste one workspace entry`:`this backup holds no workspaces`);if(n=n.workspaces[0],!n||typeof n!=`object`)throw Error(`not an invite`)}let r=String(n.branch??``).trim();if(!r)throw Error(`the invite has no branch`);if(!_j.test(r))throw Error(`not a branch name: ${r}`);let i=Array.isArray(n.repos)?n.repos:[],a=[];for(let e of i){let t=boe(e);if(!t)throw Error(`not a repo: ${JSON.stringify(e)}`);a.includes(t.full_name)||a.push(t.full_name)}if(!a.length)throw Error(`the invite lists no repos`);return{name:String(n.name??``).trim()||r,branch:r,repos:a}}var Soe=`_gn _ed`,Coe=`_gq _y`,woe=`_gw _gr`,Toe=`_gy _gs`,Eoe=`_gB _gt`,Doe=`_gC _gu`,yj=I,bj=(e=>`/${e}&`)(F);function xj(e){R(e.a,`M8.5 4H6C4.89543 4 4 4.89543 4 6V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V6C20 4.89543 19.1046 4 18 4H15.5 M8 6.4V4.5C8 4.22386 8.22386 4 8.5 4C8.77614 4 9.00422 3.77604 9.05152 3.50398C9.19968 2.65171 9.77399 1 12 1C14.226 1 14.8003 2.65171 14.9485 3.50398C14.9958 3.77604 15.2239 4 15.5 4C15.7761 4 16 4.22386 16 4.5V6.4C16 6.73137 15.7314 7 15.4 7H8.6C8.26863 7 8 6.73137 8 6.4Z`)}var Sj=(e,t)=>L(e.a,t),Cj=(e,t)=>P(e.a,t),wj=`_hz _I`,Tj=`_hB _4 _l`,Ej=`_hJ _0 _Z`,Dj=I,Oj=(e=>`/${e}&`)(F);function kj(e){R(e.a,`M18 8C19.1046 8 20 7.10457 20 6C20 4.89543 19.1046 4 18 4C16.8954 4 16 4.89543 16 6C16 7.10457 16.8954 8 18 8Z M6 20C7.10457 20 8 19.1046 8 18C8 16.8954 7.10457 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20Z M6 16V3 M8 18H9C12.5 18 18 15.9 18 9.5V8`)}var Aj=(e,t)=>L(e.a,t),jj=(e,t)=>P(e.a,t),Mj=`<div></div>`,Nj=e=>S(e.a,`_cq`),Pj=e=>S(e.a,`_N`),Fj=j(2,e=>b(e.b,e._.m-e._.o)),Ij=h(6,1,Fj),Lj=e=>{Ij._(e),Rj._(e),S(e.a,`_cq`)},Rj=h(6,1,Fj),zj=e=>{S(e.a,`_cq`),S(e.b,`_G`)},Bj=A(18,e=>de(e,`a`,e._._.k,PM(e)),e=>e._._),Vj=s(`d1`,e=>Se(e,`a`)),Hj=e=>{Bj(e),S(e.a,Ej),Vj(e)},Uj=p(3,`<span>default</span>`,` `,Pj),Wj=j(6,e=>Uj(e,e.f===e._._.j?0:1)),Gj=A(17,Wj,e=>e._._),Kj=s(`d2`,e=>_(e.a,`click`,function(){e._._.g(e.f,e.f===e._._.j)})),qj=e=>{Gj(e),Jj._(e),S(e.a,[wj,`_hK`]),Kj(e)},Jj=ue(5,16,5,e=>S(e.b,[`_hG`,`_y`,{_hH:e.f===e._.q}])),Yj=w(5,e=>{b(e.c,e.f),Wj(e)}),Xj=(e,t)=>Yj(e,t[0]),Zj=w(16,Jj),Qj=j(7,e=>Zj(e,e._.f??e._.j)),$j=h(0,1,Qj),eM=s(`d3`,e=>_(e.c,`click`,function(){OM(e._,!0),DM(e._,+e._.l+1)})),tM=e=>{$j._(e),cM._(e),uM._(e),dM._(e),fM._(e),pM._(e),S(e.a,`_hI`),S(e.c,Ne),rt(e.d),Oe(e.d,14),S(e.e,`_hE`),eM(e)},nM=m(5,`<li><button><span> </span><!></button></li>`,`D D D l%`,qj,Xj),rM=(e,t)=>{_M(e,t?.length),nM(e,[t,e=>e])},iM=(e,t)=>{gM(e,t?.length),rM(e,t.slice(0,12))},aM=j(10,e=>iM(e,vt(e._.k,e.j))),oM=w(9,aM),sM=j(8,e=>oM(e,e._.j&&e._.h.includes(e._.j)?[e._.j,...e._.h.filter(t=>t!==e._.j)]:e._.h)),cM=h(0,1,sM),lM=p(1,`<input placeholder="Filter branches…" aria-label="Filter branches" autofocus>`,` `,Hj),uM=h(0,1,e=>lM(e,e._.i>8?0:1)),dM=h(0,1,e=>{sM(e),Qj(e)}),fM=h(0,1,aM),pM=h(0,1,e=>{O(e.c,`disabled`,e._.n),on(e.d,e._.n&&`_F`)}),mM=p(6,`<li><p>No branches match.</p></li>`,`D `,Nj,`<li><p><!> more — keep typing to narrow.</p></li>`,`D D%`,Lj),hM=j(15,e=>mM(e,e.o?e.m>e.o?1:2:0)),gM=w(12,e=>{hM(e),Ij(e)}),_M=w(14,e=>{hM(e),Rj(e)}),vM=p(0,`<p><span></span> Loading branches…</p>`,` D `,zj,(e=>`<div><!><button title="Refresh branches" aria-label="Refresh branches">${e}</button></div><ul><!><!></ul>`)(Re),(e=>` D%b D/${e}&m D%b%l`)(nt),tM),yM=a(7,e=>{bM(e,e.h?.length),vM(e,+!!e.h),cM(e)}),bM=w(8,uM),xM=k(Gj),SM=a(9,e=>{dM(e),xM(e)}),CM=k(Bj),wM=a(10,e=>{fM(e),CM(e)}),TM=s(`d4`,e=>{{let t=e.l>0;N(`/api/repos/branches?repo=${encodeURIComponent(e.d)}${t?`&refresh`:``}`,{signal:pe(e,0)}).then(t=>{yM(e,t.branches),SM(e,t.defaultBranch),OM(e,!1)},t=>{pe(e,0).aborted||(OM(e,!1),e.e?.(String(t.message||t)))})}}),EM=j(12,e=>{ve(e,0),TM(e)},2),DM=a(11,EM),OM=a(13,pM);function kM(e){S(e.a,`_hD`),yM(e,null),SM(e,null),wM(e,``),DM(e,0),OM(e,!1)}var AM=w(3,EM),jM=w(4,EM),MM=w(5,$j),NM=w(6),PM=e=>t=>{wM(e._._,t)};n(`d0`,PM);var FM=(e=>`/${e}&`)(ca),IM=sa,LM=(e=>`<div><!><div><label>${e}<input placeholder="Add a repo…" aria-label="Add a repo"></label><!></div><!><div><!><!><!></div></div>`)(Ae),RM=(e=>` D%b D D/${e}& l%l%b D%b%b%m`)(Ke),zM=null,BM=e=>{ia(e.a),aa(e.a,12),oa(e.a)},VM=e=>S(e.a,`_cq`),HM=e=>{S(e.a,`_hu`),ZM._(e.b,e._)},UM=e=>{S(e.a,`_hu`),ZM._(e.b,e._)},WM=j(1,e=>O(e.a,`title`,e._._.al?`Will fork to your account; click to clone as-is instead`:`Fork ${e._._.ae} to your account and clone the fork`)),GM=A(70,WM,e=>e._._),KM=s(`w15`,e=>_(e.a,`click`,function(){e._._.aj===e._._.ae?hP(e._._,!e._._.al):e._._.am(e._._.ae,void 0,!0)})),qM=e=>{GM(e),YM(e),KM(e)},JM=p(0,(e=>`${e} fork`)(na),(e=>`/${e}&b`)(ra),BM,`Fork`),YM=A(73,e=>{S(e.a,[`_hC`,{_hA:e._._.al}]),O(e.a,`aria-pressed`,e._._.al?`true`:`false`),JM(e,+!e._._.al),WM(e)},e=>e._._),XM=A(68,e=>Ga(e.a,WP(e))),ZM=re(e=>{XM(e),QM(e),Ha(e.a),Ya(e.a,GP(e)),ka(e.a),Ua(e.a),Wa(e.a),Ka(e.a)}),QM=A(74,e=>Ja(e.a,e._.au)),$M=h(11,1,e=>b(e.b,e._.a6)),eN=e=>{$M._(e),S(e.a,`_cq`)},tN=A(63,e=>jM(e.a,KP(e)),e=>e._._._),nN=e=>{tN(e),rN._(e),kM(e.a),NM(e.a,qP(e)),MM(e.a)},rN=h(7,0,e=>AM(e.a,e._.k)),iN=j(13,e=>S(e.a,[`_hy`,{_hx:e.m===e._._.a7}])),aN=A(67,iN,e=>e._._),oN=s(`w17`,e=>{_(e.a,`mouseenter`,function(){dP(e._._,e.m)}),_(e.b,`click`,function(){e._._.am(e.k)}),_(e.f,`click`,function(){e._._.ao(e.k)})}),sN=e=>{aN(e),uN(e),S(e.b,wj),Yi(e.c),Xi(e.c,12),Zi(e.c,`_hF`),S(e.d,`_hG`),kj(e.g),Aj(e.g,12),jj(e.g),oN(e)},cN=p(7,Mj,(e=>`/${e}&`)(` b`),nN),lN=j(11,e=>{S(e.f,[Tj,{_hA:e._._.aj===e.k}]),cN(e,e._._.aj===e.k?0:1)}),uN=A(72,lN,e=>e._._),dN=w(12,iN),fN=w(10,e=>{b(e.e,an(e.k)),O(e.f,`title`,`Pick a base branch for ${e.k}`),O(e.f,`aria-label`,`Pick a base branch for ${e.k}`),lN(e),rN(e)}),pN=m(0,((e,t)=>`<li><div><button>${e}<span> </span></button><button>${t}</button></div><!></li>`)(qi,Dj),((e,t)=>`D D D/${e}& D m D/${t}&m%l`)(Ji,Oj),sN,(e,t)=>{fN(e,t[0]?.nameWithOwner),dN(e,t[1])}),mN=h(11,0,e=>pN(e,[e._.ac,`nameWithOwner`])),hN=e=>{mN._(e),S(e.a,`_hw`)},gN=A(63,e=>jM(e.a,JP(e)),e=>e._._),_N=e=>{gN(e),vN(e),kM(e.a),NM(e.a,YP(e)),MM(e.a)},vN=A(70,e=>AM(e.a,e._._.ae),e=>e._._),yN=j(11,e=>O(e.c,`title`,e._.al?`Fork ${e._.ae} to your account and add the fork`:`Add ${e._.ae} as-is (pushes go to that repo)`)),bN=p(9,Mj,(e=>`/${e}&`)(` b`),_N),xN=j(10,e=>{S(e.h,[Tj,{_hA:e._.aj===e._.ae}]),bN(e,e._.aj===e._.ae?0:1)}),SN=h(10,0,e=>{b(e.f,an(e._.ae)),O(e.h,`title`,`Pick a base branch for ${e._.ae}`),O(e.h,`aria-label`,`Pick a base branch for ${e._.ae}`),yN(e),xN(e)}),CN=s(`w16`,e=>{_(e.c,`click`,function(){e._.am(e._.ae,void 0,e._.an(e._.al))}),_(e.h,`click`,function(){e._.ao(e._.ae)})}),wN=e=>{SN._(e),EN._(e),DN._(e),ON._(e),S(e.a,`_hw`),S(e.b,[`_hy`,`_hx`]),S(e.c,wj),Yi(e.d),Xi(e.d,12),Zi(e.d,`_hF`),S(e.e,`_hG`),kj(e.i),Aj(e.i,12),jj(e.i),CN(e)},TN=p(6,`<button></button>`,` `,qM),EN=h(10,0,e=>TN(e,+!e._.ai)),DN=h(10,0,xN),ON=h(10,0,yN),kN=h(7,0,e=>O(e.a,`hidden`,!e._.v)),AN=s(`w14`,e=>_(e.a,`click`,function(){uP(e._,``),e._.z?.(),e._.f.blur()})),jN=e=>{kN._(e),S(e.a,[Ne,`_d3`]),Pt(e.b),_t(e.b,14),Jt(e.b),AN(e)},MN=Ce(0),NN=h(6,0,e=>MN(e,e._.x)),PN=NN,FN=c(26),IN=j(16,e=>FN(e,e.o,e.p)),LN=w(14,IN),RN=w(15,IN),zN=w(38,e=>{EP(e,e.ac?.length),mN(e)}),BN=j(37,e=>zN(e,e.a2&&e.a6?Ct(e.a6,e.a2?.repos,t=>e.a9(t)):[]),2),VN=j(61,e=>O(e.i,`hidden`,!e.ay||e.ap&&!e.v&&!e.w),3),HN=w(60,VN),UN=j(59,e=>HN(e,!!(e.ae||e.ad||e.a6&&(!e.a2||!e.ae)||e.ap&&e.av)),5),WN=p(10,((e,t)=>`<ul><li><div><button>${e}<span> </span></button><!><button>${t}</button></div><!></li></ul>`)(qi,Dj),((e,t)=>` E D D/${e}& D m%b D/${t}&m%m`)(Ji,Oj),wN,`<p>Loading repos…</p>`,` `,VM),GN=j(42,e=>WN(e,e.ae?0:e.a6&&!e.a2?1:2),2),KN=p(11,`<ul></ul>`,` `,hN,`<p>No repos match "<!>". Paste a clone URL to add any repo.</p>`,` Db%`,eN),qN=j(43,e=>KN(e,e.ad?0:e.a6&&e.a2&&!e.ae?1:2),3),JN=a(28,e=>{aP(e,e.a2?.repos),lP(e,e.a2?.sso),BN(e),UN(e),GN(e),qN(e)}),YN=w(49),XN=w(44,e=>{YN(e,XP(e)),EN(e)}),ZN=j(41,e=>XN(e,!!e.ae&&!e.a3.some(t=>t.nameWithOwner===e.ae))),QN=w(50),$N=j(46,e=>QN(e,ZP(e))),eP=k(vN,GM),tP=w(40,e=>{ZN(e),$N(e),UN(e),GN(e),qN(e),SN(e),eP(e)}),nP=j(36,e=>tP(e,(()=>{let t=cee(e.a6);return t&&!e.a9(t)?t:null})())),rP=w(35,e=>{BN(e),nP(e)}),iP=j(30,e=>rP(e,QP(e))),aP=w(29,e=>{iP(e),ZN(e)}),oP=k(QM),sP=w(56,e=>{RP(e,e.au?.length),oP(e)}),cP=j(55,e=>sP(e,(()=>{e.as;let t=new Set(Le?.()??[]);return(e.a5||[]).filter(e=>!t.has(e.org))})())),lP=w(31,cP),uP=a(32,e=>{de(e,`f`,e.a6,$P(e)),BN(e),nP(e),UN(e),GN(e),qN(e),$M(e)}),dP=a(33,k(aN)),fP=k(uN),pP=a(45,e=>{$N(e),DN(e),fP(e)}),mP=k(YM),hP=a(47,e=>{ON(e),mP(e)}),gP=a(54,cP),_P=s(`w18`,e=>{Se(e,`f`),_(e.f,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),dP(e,Math.min(e.a7+1,e.ac?.length-1))):t.key===`ArrowUp`?(t.preventDefault(),dP(e,Math.max(e.a7-1,0))):t.key===`Enter`?(t.preventDefault(),e.ae?e.am(e.ae,void 0,e.an(e.al)):e.ac[e.a7]&&e.am(e.ac[e.a7].nameWithOwner)):t.key===`Escape`&&e.a6?(t.preventDefault(),uP(e,``)):t.key===`Escape`&&e.ap&&(t.preventDefault(),e.z?.(),e.f.blur())})});function vP(e){Me(e.e),tt(e.e,14),en(e.e,`_2`),JN(e,null),uP(e,``),dP(e,0),pP(e,null),hP(e,!1),gP(e,0),_P(e)}var yP=w(62,e=>ee(e,e.b0)),bP=k(XM),xP=s(`w19`,e=>d(e,{onMount:function(){zM&&JN(e,zM),e.a8(!1)}})),SP=w(34,e=>{yP(e,eF(e)),bP(e),xP(e)}),CP=k(gN,tN),wP=w(17,e=>{SP(e,tF(e)),CP(e)}),TP=w(18,iP),EP=w(39,e=>{UN(e),qN(e)}),DP=w(48),OP=w(19,e=>DP(e,nF(e))),kP=p(7,(e=>`<button type=button title="Close search" aria-label="Close search">${e}</button>`)($t),(e=>` D/${e}&l`)(bt),jN),AP=j(53,e=>S(e.a,[e.ap?`_dY`:`_hr`,{_dZ:e.ap&&!e.v,_d0:e.w}]),2),jP=p(1,(e=>`<div>${e}</div>`)(IM),(e=>` D/${e}&l`)(FM),UM),MP=p(9,(e=>`<div>${e}</div>`)(IM),(e=>` D/${e}&l`)(FM),HM),NP=j(58,e=>{jP(e,!e.ap&&e.av?0:1),MP(e,e.ap&&e.av?0:1)}),PP=p(6,`<!><!><!>`,`b%`,PN),FP=j(52,e=>{S(e.c,!e.ap&&e.x?`_hs`:`_ht`),PP(e,!e.ap&&e.x?0:1)}),IP=w(51,e=>{S(e.d,[`_1`,e.ap&&`_d1`]),S(e.f,[e.ap?`_Z`:qe,`_3`,e.ap&&`_d2`]),S(e.i,[e.ap?dr:`_hv`]),kP(e,+!e.ap),UN(e),AP(e),NP(e),FP(e),VN(e)}),LP=(e,t)=>IP(e,!!t),RP=w(57,e=>{UN(e),NP(e)}),zP=w(21,e=>{AP(e),VN(e),kN(e)}),BP=w(22,e=>{AP(e),VN(e)}),VP=w(23,e=>{FP(e),NN(e)}),HP=(e,t)=>O(e.f,`disabled`,t),UP=w(25),WP=e=>function(){e._.a8(!0)},GP=e=>function(){gP(e._,+e._.as+1)},KP=e=>function(t){pP(e._._._,null),e._._._.r?.(t)},qP=e=>function(t,n){e._._._.am(e._.k,n?void 0:t)},JP=e=>function(t){pP(e._._,null),e._._.r?.(t)},YP=e=>function(t,n){e._._.am(e._._.ae,n?void 0:t,e._._.an(e._._.al))},XP=e=>t=>e.ai?t:void 0,ZP=e=>t=>{pP(e,e.aj===t?null:t),t!==e.ae&&hP(e,!1)},QP=e=>t=>{if(e.s.has(t))return!0;let n=e.a3||[];if(n.some(n=>e.s.has(n.nameWithOwner)&&n.parent===t))return!0;let r=n.find(e=>e.nameWithOwner===t);return!!(r?.parent&&e.s.has(r.parent))},$P=e=>function(t){uP(e,t),dP(e,0),hP(e,!1)},eF=e=>t=>{t===`focus`?e.f?.focus({preventScroll:!0}):e.a8(!0)},tF=e=>async t=>{t&&FN(e,!0);try{let n=await N(`/api/repos${t?`?refresh`:``}`);zM=n,JN(e,n)}catch(t){e.r?.(String(t.message||t))}t&&FN(e,!1)},nF=e=>(t,n,r)=>{uP(e,``),pP(e,null),hP(e,!1),e.t(t,n,r)};n(`w8`,WP),n(`w7`,GP),n(`w12`,KP),n(`w11`,qP),n(`w10`,JP),n(`w9`,YP),n(`w5`,XP),n(`w6`,ZP),n(`w3`,QP),n(`w0`,$P),n(`w1`,eF),n(`w2`,tF),n(`w4`,nF);var rF=((e,t,n,r)=>`<div role=region><div><div>${e}<!><!><section><div><h2>Repos</h2><span> </span><div></div><button title="Add repo" aria-label="Add repo">${t}</button>${n}<button title="Refresh repo list" aria-label="Refresh repo list">${r}</button></div><ul><!><!><!></ul></section><!><!></div></div></div>`)(hr,qi,LM,Re),iF=((e,t,n,r)=>` D D D/${e}&%b%b D D b D l b D/${t}&l0${n}& D/${r}&m D%b%b%m%b%n`)(gr,Ji,RM,nt),aF=new Map,oF=s(`r27`,e=>_(e.a,`click`,function(){window.open(pC(e.d),`_blank`,`noopener`)})),sF=e=>{S(e.a,[`_u`,`_K`]),oF(e)},cF=w(3,e=>{O(e.a,`title`,`Open port ${e.d}`),b(e.b,e.d)}),lF=(e,t)=>cF(e,t[0]),uF=e=>{Pt(e.a),_t(e.a,14),Jt(e.a)},dF=e=>S(e.a,`_N`),fF=h(11,0,e=>{O(e.a,`title`,`Only for ${e._.a0.map(jn).join(`, `)}`),b(e.b,e._.a0.map(jn).join(`, `))}),pF=e=>{fF._(e),S(e.a,`_N`)},mF=h(10,0,e=>O(e.a,`title`,`A ${e._.z} skill of the same name already exists`)),hF=e=>{mF._(e),S(e.a,`_N`)},gF=h(8,1,e=>O(e.a,`href`,e._.x)),_F=e=>{gF._(e),vF._(e),S(e.a,[`_N`,`_K`])},vF=h(8,1,e=>{O(e.a,`title`,`Installed from ${e._.y}`),b(e.b,e._.y)}),yF=h(8,0,e=>O(e.a,`title`,`Points into ${e._.t||`a repo`} that is no longer here`)),bF=e=>{yF._(e),S(e.a,[`_N`,`_P`,At.danger])},xF=j(2,e=>O(e.a,`title`,e._.a3?`Linked from ${e._.t}/ in this workspace`:`Ships in ${e._.t}/ — not linked into this workspace yet`)),SF=h(4,0,e=>{b(e.b,e._.t),xF(e)}),CF=e=>{SF._(e),wF._(e),S(e.a,[`_N`,`_y`,`_gA`])},wF=h(4,0,xF),TF=e=>{S(e.a,ur),S(e.b,`_co`)},EF=e=>{S(e.a,[ur,`_cj`]),S(e.b,`_G`),S(e.c,`_cl`),S(e.d,`_co`)},DF=(e,t)=>b(e.e,t),OF=(e,t)=>DF(e,t[0]),kF=e=>{Pt(e.a),_t(e.a,14),Jt(e.a)},AF=e=>S(e.a,`_G`),jF=h(7,0,e=>b(e.c,e._.o)),MF=e=>{jF._(e),S(e.a,[`_N`,`_y`]),kj(e.b),Aj(e.b,12),jj(e.b)},NF=e=>{xj(e.a),Sj(e.a,14),Cj(e.a)},PF=e=>{ia(e.a),aa(e.a,14),oa(e.a)},FF=e=>S(e.a,[`_N`,`_P`]),IF=s(`r28`,e=>_(e.j,`click`,function(){e._._.bg(e.r)})),LF=e=>{S(e.a,`_gr`),S(e.b,[`_y`,`_gs`]),S(e.d,[`_y`,`_gt`]),S(e.f,`_gu`),S(e.h,[`_y`,`_gv`]),S(e.j,[`_cp`,`_8`,`_gE`]),Pt(e.k),_t(e.k,14),Jt(e.k),IF(e)},RF=j(15,e=>O(e.a,`title`,`${e.n} ${e.o}`.trim())),zF=w(13,e=>{b(e.c,e.n),RF(e)}),BF=w(14,e=>{b(e.e,e.o),RF(e)}),VF=m(6,`<button>:<!></button>`,` Db%`,sF,lF),HF=(e,t)=>VF(e,[t,e=>String(e)]),UF=w(17,e=>{b(e.i,e.r),O(e.j,`title`,`Kill process ${e.r}`),O(e.j,`aria-label`,`Kill process ${e.r}`)}),WF=m(5,(e=>`<li><span> </span><span> </span><span><!><span> </span><button type=button>${e}</button></span></li>`)($t),(e=>` D D l D l D%b D l D/${e}&n`)(bt),LF,(e,t)=>{zF(e,t[0]?.cmd),BF(e,t[0]?.args),HF(e,t[0]?.ports),UF(e,t[0]?.pid)}),GF=h(23,0,e=>WF(e,[e._.bo,`pid`])),KF=e=>{GF._(e),qF._(e),S(e.a,`_cf`),S(e.b,`_cg`),S(e.c,`_ct`),S(e.d,Ie),S(e.f,lr)},qF=h(23,0,e=>b(e.e,e._.bp)),JF=h(12,1,e=>O(e.a,`title`,`Link ${e._.s} into this workspace so every agent here sees it`)),YF=s(`r26`,e=>_(e.a,`click`,function(){e._._._.bc(e._.q,{action:`elevate`,id:e._.q,worktree:e._.t||``})})),XF=e=>{JF._(e),ZF._(e),S(e.a,M),YF(e)},ZF=h(12,1,e=>{O(e.a,`disabled`,e._.a7),O(e.a,`aria-busy`,e._.a7?`true`:void 0)}),QF=A(108,e=>b(e.c,e._.as)),$F=e=>{QF(e),tI(e),nI(e),iI(e),S(e.a,Soe),S(e.b,`_go`),S(e.e,`_gp`),S(e.f,Coe)},eI=j(7,e=>{O(e.a,`title`,e._.ax||e._.ay),b(e.g,e._.ax||e._.ay)}),tI=A(111,eI),nI=A(112,eI),rI=p(3,`<span>Archived</span>`,` `,FF),iI=A(113,e=>rI(e,+(e._.az===`active`))),aI=we(`r20`,`<span><span> </span><!><span aria-hidden=true>·</span><span> </span></span>`,` D D l%b b D `,$F),oI=p(0,na,(e=>`/${e}&`)(ra),PF,yj,(e=>`/${e}&`)(bj),NF),sI=j(1,e=>O(e.a,`title`,e._._.an?`Invite copied`:`Copy invite — anyone with it can join from New: the same repos on their own lane of ${e._._.at||e._._.au}`),2),cI=A(107,e=>{oI(e,+!e._._.an),sI(e)},e=>e._._),lI=s(`r16`,e=>_(e.a,`click`,function(){e._._.b2()})),uI=e=>{cI(e),dI(e),fI(e),S(e.a,Ne),lI(e)},dI=A(109,sI,e=>e._._),fI=A(110,sI,e=>e._._),pI=p(0,`Remove?`,0,0,$t,(e=>`/${e}&`)(bt),uF),mI=j(1,e=>{S(e.a,[`_cp`,`_8`,`_9`,`_gD`,{_s:e._._._.am===e._.q}]),pI(e,e._._._.am===e._.q?0:1)}),hI=j(2,e=>O(e.a,`title`,e._._._.am===e._.q?`Remove ${e._.s} from this workspace?`:e._.a2?`Stop using ${e._.s} here`:`Remove ${e._.s}`),3),gI=A(106,e=>{mI(e),hI(e)},e=>e._._._),_I=s(`r25`,e=>_(e.a,`click`,function(){e._._._.am===e._.q?(_R(e._._._,null),e._._._.bc(e._.q,e._.a2?{action:`unelevate`,id:e._.q}:{action:`remove`,id:e._.q})):(_R(e._._._,e._.q),$n(()=>{_R(e._._._,null)}))})),vI=e=>{gI(e),yI._(e),bI._(e),xI._(e),SI._(e),_I(e)},yI=h(12,0,e=>{mI(e),hI(e)}),bI=h(12,0,hI),xI=h(12,0,hI),SI=h(12,0,e=>{O(e.a,`disabled`,e._.a7),O(e.a,`aria-busy`,e._.a7?`true`:void 0)}),CI=h(5,0,e=>b(e.c,e._.ah)),wI=e=>{CI._(e),S(e.a,`_ce`),S(e.b,`_G`)},TI=p(0,`Remove?`,0,0,$t,(e=>`/${e}&`)(bt),kF),EI=j(1,e=>{S(e.a,[`_cp`,`_8`,`_9`,{_s:e._._.ag===e._.m}]),TI(e,e._._.ag===e._.m?0:1)}),DI=j(2,e=>O(e.a,`title`,e._._.ag===e._.m?`Remove ${e._.l}/? Uncommitted changes are lost.`:`Remove ${e._.l}/`),2),OI=A(103,e=>{EI(e),DI(e)},e=>e._._),kI=s(`r24`,e=>_(e.a,`click`,function(){e._._.ag===e._.k?.full_name?(hR(e._._,null),e._._.be(e._.k)):(hR(e._._,e._.k?.full_name),$n(()=>{hR(e._._,null)}))})),AI=e=>{OI(e),jI._(e),MI._(e),kI(e)},jI=h(8,1,DI),MI=h(8,1,e=>{EI(e),DI(e)}),NI=A(101,e=>{O(e.a,`disabled`,!!e._._.ad),b(e.b,e._._.ad===`restore`?`Restoring…`:`Restore`)},e=>e._._),PI=s(`r18`,e=>_(e.a,`click`,function(){e._._.bf(`restore`)})),FI=e=>{NI(e),S(e.a,[M,`_r`]),PI(e)},II=A(101,e=>{O(e.a,`disabled`,!!e._._.ad),b(e.b,e._._.ad===`archive`?`Archiving…`:`Archive`)},e=>e._._),LI=s(`r17`,e=>_(e.a,`click`,function(){e._._.bf(`archive`)})),RI=e=>{II(e),S(e.a,M),LI(e)},zI=j(4,e=>b(e.d,e._.ad===`delete`?`Deleting…`:e._.ae?`Delete?`:`Delete`)),BI=A(101,e=>{O(e.c,`disabled`,!!e._.ad),zI(e)}),VI=s(`r19`,e=>_(e.c,`click`,function(){e._.ae?(pR(e._,!1),e._.bf(`delete`)):(pR(e._,!0),$n(()=>{pR(e._,!1)}))})),HI=e=>{BI(e),UI(e),GI(e),qI(e),VI(e)},UI=A(102,e=>{S(e.c,[M,`_t`,{_s:e._.ae}]),zI(e)}),WI=p(1,`<button type=button title="Hide from the list. Worktrees stay on disk."> </button>`,` D `,RI,`<button type=button title="Archived and hidden from the list. Bring it back."> </button>`,` D `,FI),GI=A(113,e=>WI(e,e._.az===`active`?0:1)),KI=p(0,`<button type=button aria-label="Copy invite"></button>`,` `,uI),qI=A(114,e=>KI(e,+!e._.b0)),JI=we(`r21`,`<!><!><!><button type=button title="Remove the workspace and its worktrees. Branches on origin stay."> </button>`,`b%b%b D `,HI),YI=A(100,e=>b(e.a,e._._.ac),e=>e._._),XI=we(`r22`,` `,` `,YI),ZI=e=>{Gt(e.a),lt(e.a,XI(e)),Zt(e.a,`inline`),Rt(e.a,Ez(e)),ot(e.a),Te(e.a),St(e.a),mt(e.a),Xe(e.a,{})},QI=w(33,e=>{SI(e),ZF(e)}),$I=j(17,e=>QI(e,e._._.aa.has(e.q))),eL=A(99,$I,e=>e._._),tL=e=>{eL(e),iL(e),S(e.b,`_gz`),S(e.c,[`_y`,Toe]),S(e.f,Eoe),S(e.h,Doe)},nL=p(11,`<span><!> only</span>`,` D%`,pF),rL=j(31,e=>nL(e,e.a3&&e._._.aj&&e.a1<(e._._.aj?.agents).length?0:1),2),iL=A(105,rL,e=>e._._),aL=w(16,e=>{$I(e),yI(e)}),oL=p(8,`<span>broken link</span>`,` `,bF,`<a target=_blank rel=noopener> </a>`,` D `,_F),sL=j(32,e=>oL(e,e.u?0:e.a3&&e.x?1:2),2),cL=p(9,`<span title="Used instead of the system skill of the same name">overrides system</span>`,` `,dF),lL=p(10,`<span>name taken</span>`,` `,hF),uL=p(12,`<button type=button></button>`,` `,vI,`<button>Link</button>`,` `,XF),dL=j(30,e=>{cL(e,e.a3&&e.z===`global`?0:1),lL(e,!e.a3&&e.z?0:1),uL(e,e.a3?0:e.z?2:1)}),fL=w(29,e=>{S(e.a,[woe,{_gx:!e.a3}]),sL(e),dL(e),rL(e),wF(e)}),pL=w(18,e=>{b(e.d,e.s),bI(e),JF(e)}),mL=p(4,`<span><!>/</span>`,` D%`,CF),hL=j(21,e=>mL(e,e.t&&!e.u?0:1)),gL=w(19,e=>{hL(e),SF(e),yF(e)}),_L=w(20,e=>{hL(e),sL(e)}),vL=(e,t)=>{O(e.f,`title`,t||void 0),b(e.g,t||``)},yL=w(23,e=>{sL(e),gF(e)}),bL=w(25,e=>{dL(e),mF(e)}),xL=w(27,rL),SL=(e,t)=>{aL(e,(t?.[0]).s?.id),pL(e,(t?.[0]).s?.name),gL(e,(t?.[0]).s?.worktree),_L(e,(t?.[0]).s?.broken),vL(e,(t?.[0]).s?.description),yL(e,(t?.[0]).s?.sourceUrl),CL(e,(t?.[0]).s?.source),bL(e,(t?.[0]).s?.shadows),wL(e,(t?.[0]).s?.agents),TL(e,(t?.[0]).s?.linked),fL(e,(t?.[0]).linked)},CL=w(24,vF),wL=w(26,e=>{xL(e,e.a0?.length),fF(e)}),TL=w(28,xI),EL=h(22,0,e=>b(e.e,e._.bk)),DL=e=>{EL._(e),kL._(e),AL._(e),S(e.a,`_cf`),S(e.b,`_cg`),S(e.c,`_ct`),S(e.d,Ie),S(e.g,lr)},OL=m(6,`<li><span><span> </span><!></span><span> </span><span><!><!><!><!><!></span></li>`,` D D D l%l D l D%b%b%b%b%`,tL,SL),kL=h(22,0,e=>OL(e,[e._.bm,e=>e.s.id])),AL=h(22,0,e=>b(e.f,e._.bn)),jL=p(8,`<span></span>`,` `,AF,`<button></button>`,` `,AI),ML=j(13,e=>jL(e,+!e._.a8.has(e.m))),NL=i(19,ML),PL=e=>{NL._(e),S(e.a,ur),S(e.b,`_cl`),S(e.c,[`_cm`,`_y`]),S(e.e,`_cn`),S(e.f,[`_co`,`_K`])},FL=w(11,e=>{b(e.d,e.l),jI(e)}),IL=w(12,e=>{O(e.f,`href`,gt(e.m)),O(e.f,`title`,`Open ${e.m} on GitHub`),b(e.g,an(e.m)),ML(e),MI(e)}),LL=p(7,(e=>`<span title="Base branch">${e} <!></span>`)(Dj),(e=>` D/${e}&b%l`)(Oj),MF),RL=j(16,e=>LL(e,+(e.o===e.p))),zL=w(14,e=>{RL(e),jF(e)}),BL=w(15,RL),VL=(e,t)=>HL(e,t[0]),HL=w(10,e=>{FL(e,e.k?.worktree),IL(e,e.k?.full_name),zL(e,e.k?.base_branch),BL(e,e.k?.default_branch)}),UL=t(80),WL=a(32,e=>{O(e.q,`disabled`,e.a6),on(e.r,e.a6&&`_F`)}),GL=w(75,e=>OP(e.o,Dz(e))),KL=j(96,e=>GL(e,Oz(e)),2),qL=w(76),JL=j(95,e=>qL(e,kz(e)),2),YL=w(72,e=>{KL(e),JL(e)}),XL=m(20,`<li><span></span><div><span>Adding <!>…</span></div></li>`,` D b D Db%`,EF,OF),ZL=j(94,e=>XL(e,[[...e.a8].filter(t=>!e.b9.has(t)),e=>e])),QL=a(34,e=>{FR(e,e.a8?.size),YL(e,Az(e)),KL(e),JL(e),ZL(e),NL(e)}),$L=w(74),eR=j(97,e=>$L(e,jz(e)),4),tR=w(73,eR),nR=k(eL),rR=a(36,e=>{IR(e,e.aa?.size),tR(e,Mz(e)),eR(e),nR(e)}),iR=p(4,Ot,(e=>`/${e}&`)(Vt),ZI),aR=k(YI),oR=a(38,e=>{iR(e,+!e.ac),aR(e)}),sR=s(`r30`,e=>d(e,{busyCount:e.a9+e.ab,pendingAction:e.ad,onMount:function(){let t=new AbortController,n=t.signal;return Bt().addEventListener(`workspace.progress`,t=>{(this.pendingAction||this.busyCount)&&t.data?.message&&(t.data.op===e.aw||String(t.data.op||``).startsWith(`skills:${e.aw}:`))&&gR(e,t.data.message)},{signal:n}),e.b8(n),e.b7(n),{abort:t}},onDestroy:function(){this.abort.abort(),clearTimeout(e.ap)}})),cR=j(93,sR,6),lR=p(5,`<p><span></span> </p>`,` D b `,wI),uR=j(44,e=>lR(e,e.ad&&e.ah?0:1)),dR=k(BI,II,NI),fR=a(39,e=>{cR(e),uR(e),dR(e)}),pR=a(40,k(UI)),mR=a(41,e=>{O(e.m,`hidden`,e.af),zP(e.o,e.af)}),hR=a(42,k(OI)),gR=a(43,e=>{uR(e),CI(e)}),_R=a(48,k(gI)),vR=a(49,k(cI)),yR=(e,t)=>HR(e,t.id),bR=(e,t)=>{gz(e,t.applied),_z(e,t.issued)},xR=(e,t)=>{O(e.a,`aria-labelledby`,t),Pr(e.d,t)},SR=s(`r29`,e=>{_(e.m,`click`,function(){UL(e)(`focus`),mR(e,!0)}),_(e.q,`click`,function(){e.bi()})});function CR(e){o(e,14,bz),S(e.a,`_d8`),S(e.b,`_d9`),S(e.c,`_d_`),kr(e.d),Lr(e.d,dn({content:aI(e)})),zr(e.d,dn({content:JI(e)})),Fr(e.d,`Manage`),Br(e.d),S(e.g,`_cf`),S(e.h,`_cg`),S(e.i,`_ct`),S(e.j,Ie),S(e.l,`_z`),S(e.m,[Ne,`_gF`]),Yi(e.n),Xi(e.n,16),Zi(e.n),vP(e.o),LP(e.o,!0),BP(e.o,!0),UP(e.o,Pz(e)),wP(e.o,Nz(e)),RN(e.o,function(t){WL(e,t)}),LN(e.o),VP(e.o),HP(e.o),S(e.q,it),rt(e.r),Oe(e.r,14),S(e.s,lr),WL(e,!1),QL(e,new Set),rR(e,new Set),oR(e,null),fR(e,null),pR(e,!1),mR(e,!1),hR(e,null),gR(e,null),_R(e,null),vR(e,!1),yR(e,{id:0}),bR(e,{issued:0,applied:0}),xR(e,f(e)),SR(e)}var wR=w(86,e=>{Tz(e,e.bo.length),GF(e)}),TR=a(33,e=>wR(e,e.a7||[])),ER=w(83),DR=e=>{ER(e,(e.al||[]).filter(t=>!e.bj.some(e=>e.id===t.id)))},OR=w(84,e=>{Cz(e,e.bm?.length),kL(e)}),kR=e=>{OR(e,[...e.bj.map(e=>({s:e,linked:!0})),...e.bl.map(e=>({s:e,linked:!1}))].sort((e,t)=>e.s.name.localeCompare(t.s.name)))},AR=k(iL),jR=a(45,e=>{RR(e,e.aj?.workspace),zR(e,e.aj?.repo),DR(e),kR(e),AR(e)}),MR=(e,t)=>{TR(e,aF.get(`procs:${t}`)||null),jR(e,aF.get(`skills:${t}`)||null)},NR=p(21,`<li><span>No repos yet. Add one to start.</span></li>`,` D `,TF),PR=j(89,e=>NR(e,!e.b0&&!e.a9?0:1)),FR=w(35,e=>{cR(e),PR(e)}),IR=w(37,cR),LR=w(81,e=>xz(e,e.bj.length)),RR=w(46,e=>LR(e,e.ak||[])),zR=w(47),BR=w(64),VR=j(90,e=>BR(e,Fz(e))),HR=w(51,e=>{VR(e),cR(e)}),UR=w(63,VR),WR=e=>{UR(e,xoe({name:e.as,branch:e.at||e.au,repos:e.av.map(e=>e.full_name)}))},GR=w(77),KR=j(88,e=>GR(e,Iz(e))),qR=c(52,e=>{JR(e,e.aq),WR(e),JL(e),KR(e)}),JR=e=>{YR(e,e.aq?.name),XR(e,e.aq?.origin_branch),ZR(e,e.aq?.branch),ez(e,e.aq?.repos),lz(e,e.aq?.id),uz(e,e.aq?.display_path),dz(e,e.aq?.path),fz(e,e.aq?.status)},YR=w(54,k(QF)),XR=w(55,k(dI)),ZR=w(56,k(fI)),QR=w(71,e=>{TP(e.o,e.b9),ZL(e)}),$R=m(19,`<li><div><span><!>/</span><span><a target=_blank rel=noopener> </a><!></span></div><!></li>`,` D D D%l D D l%m%`,PL,VL),ez=w(57,e=>{nz(e,e.av?.length),QR(e,new Set(e.av.map(e=>e.full_name))),$R(e,[e.av,`full_name`])}),tz=k(qI),nz=w(62,e=>{b(e.k,e.b0),PR(e),tz(e)}),rz=w(78),iz=w(70,e=>{rz(e,Lz(e)),cR(e)}),az=w(69,cR),oz=j(92,e=>az(e,zz(e)),2),sz=w(68,e=>{oz(e),eR(e)}),cz=j(91,e=>sz(e,Bz(e))),lz=w(58,e=>{Mr(e.d,`/w/${e.aw}`),iz(e,Rz(e)),cz(e),oz(e),cR(e),eR(e),KL(e)}),uz=w(59,k(tI)),dz=w(60,k(nI)),fz=w(61,k(GI,iI)),pz=j(29,e=>qR(e,e.a0,e.a2)),mz=w(26,e=>{MR(e,e.a0?.id),pz(e)}),hz=w(28,pz),gz=w(66,cz),_z=w(67,e=>{oz(e),eR(e)}),vz=w(30,KR),yz=w(31,e=>Nr(e.d,Vz(e))),bz=u(`r23`,w(80)),xz=w(82,EL),Sz=p(22,`<section><div><h2>Skills</h2><span><!>/<!></span></div><ul></ul></section>`,` D D b D%c%m `,DL),Cz=w(85,e=>{Sz(e,+!e.bn),AL(e)}),wz=p(23,`<section><div><h2>Running</h2><span> </span></div><ul></ul></section>`,` D D b D m `,KF),Tz=w(87,e=>{wz(e,+!e.bp),qF(e)}),Ez=e=>function(){oR(e._,null)},Dz=e=>function(t,n,r){e.bd(t,n,r)},Oz=e=>async(t,n,r)=>{if(!(!t||e.a8.has(t))){oR(e,null),e.ba(t,!0);try{qR(e,await N(`/api/workspaces/${e.aw}/repos`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,baseBranch:n,fork:r})}))}catch(t){oR(e,String(t.message||t))}e.ba(t,!1)}},kz=e=>async t=>{if(!e.a8.has(t.full_name)){oR(e,null),e.ba(t.full_name,!0);try{await N(`/api/workspaces/${e.aq?.id}/repos/${encodeURIComponent(t.worktree)}`,{method:`DELETE`}),qR(e,{...e.aq,repos:(e.aq?.repos).filter(e=>e.full_name!==t.full_name)})}catch(t){oR(e,String(t.message||t))}e.ba(t.full_name,!1)}},Az=e=>(t,n)=>{let r=new Set(e.a8);n?r.add(t):r.delete(t),QL(e,r)},jz=e=>async(t,n)=>{if(e.aa.has(t))return;oR(e,null),e.bb(t,!0);let r=++e.b5;try{e.b6(await N(`/api/workspaces/${e.aw}/skills`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n)}),r)}catch(t){oR(e,String(t.message||t))}finally{e.bb(t,!1)}},Mz=e=>(t,n)=>{let r=new Set(e.aa);n?r.add(t):r.delete(t),rR(e,r)},Nz=e=>function(t){oR(e,t)},Pz=e=>function(){mR(e,!1)},Fz=e=>async()=>{vR(e,await Ht(e.b1)),clearTimeout(e.ap),e.ap=setTimeout(()=>{vR(e,!1)},1500)},Iz=e=>async t=>{oR(e,null),fR(e,t),gR(e,null);try{await N(`/api/workspaces/${e.aq?.id}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t})}),t===`archive`?qR(e,{...e.aq,status:`archived`}):t===`delete`&&e.a4?.()}catch(t){oR(e,String(t.message||t))}finally{fR(e,null),gR(e,null)}},Lz=e=>async t=>{await fetch(`/api/procs/${t}`,{method:`DELETE`}),setTimeout(()=>e.b8(void 0),500)},Rz=e=>async t=>{try{let n=await N(`/api/workspaces/${e.aw}/procs`,{signal:t});TR(e,n),aF.set(`procs:${e.aw}`,n)}catch{}},zz=e=>async t=>{let n=++e.b5;try{e.b6(await N(`/api/workspaces/${e.aw}/skills`,{signal:t}),n)}catch{}},Bz=e=>(t,n)=>{n<=e.b4||(e.b4=n,jR(e,t),aF.set(`skills:${e.aw}`,t))},Vz=e=>function(){e.a5?.()};n(`r12`,Ez),n(`r14`,Dz),n(`r7`,Oz),n(`r8`,kz),n(`r4`,Az),n(`r6`,jz),n(`r5`,Mz),n(`r15`,Nz),n(`r13`,Pz),n(`r0`,Fz),n(`r9`,Iz),n(`r10`,Lz),n(`r3`,Rz),n(`r2`,zz),n(`r1`,Bz),n(`r11`,Vz);var Hz=`_cO _ck _cB _cM`,Uz=`_fd _cP _cN`,Wz=`_ff _cq`,Gz=`_fi _Y _X`,Kz=`_fn _cf`,qz=`_fo _X`,Jz=`_cO _ck _cB _cM`,Yz=`_fp _cP _cN`,Xz=I,Zz=(e=>`/${e}&`)(F);function Qz(e){R(e.a,`M1 20V19C1 15.134 4.13401 12 8 12C11.866 12 15 15.134 15 19V20 M13 14C13 11.2386 15.2386 9 18 9C20.7614 9 23 11.2386 23 14V14.5 M8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12Z M18 9C19.6569 9 21 7.65685 21 6C21 4.34315 19.6569 3 18 3C16.3431 3 15 4.34315 15 6C15 7.65685 16.3431 9 18 9Z`)}var $z=(e,t)=>L(e.a,t),eB=(e,t)=>P(e.a,t),tB=`_hL _gI`,nB=`_hM _X`,rB=Po,iB=(e=>`/${e}&`)(Fo),aB=e=>{S(e.a,`_hW`),ia(e.b),aa(e.b,14),oa(e.b)},oB=e=>S(e.a,`_G`),sB=e=>{S(e.a,`_hQ`),S(e.b,`_hR`)},cB=(e,t)=>b(e.c,an(t)),lB=(e,t)=>cB(e,t[0]),uB=A(42,e=>b(e.b,e._._.x),e=>e._._),dB=e=>{uB(e),S(e.a,[nB,`_hN`])},fB=p(1,`<span></span>`,` `,oB,(e=>`<span>${e}</span>`)(na),(e=>` D/${e}&l`)(ra),aB),pB=A(38,e=>{S(e.a,[`_hV`,{_hU:e.M===e._._._.p-1}]),fB(e,e.M===e._._._.p-1?0:1)},e=>e._._._),mB=pB,hB=(e,t)=>b(e.c,t),gB=m(0,`<li><!><!></li>`,` D%b%`,mB,(e,t)=>hB(e,t[0])),_B=A(37,e=>gB(e,[e._._.o]),e=>e._._),vB=e=>{_B(e),S(e.a,`_hT`)},yB=A(36,e=>b(e.a,e._._._.n),e=>e._._._),bB=we(`o9`,` `,` `,yB),xB=e=>{Gt(e.a),lt(e.a,bB(e)),Zt(e.a,`inline`),Rt(e.a,FV(e)),ot(e.a),Te(e.a),St(e.a),mt(e.a),Xe(e.a,{})},SB=A(34,e=>de(e,`g`,e._._.i,IV(e)),e=>e._._),CB=s(`o8`,e=>Se(e,`g`)),wB=e=>{SB(e),TB(e),DB(e),OB(e),kB(e),S(e.a,`_hP`),S(e.b,nB),S(e.c,`_y`),S(e.e,`_hS`),S(e.f,`_ct`),S(e.g,`_Z`),CB(e)},TB=A(35,e=>O(e.g,`disabled`,e._._.m),e=>e._._),EB=m(0,`<li><span> </span></li>`,` D D `,sB,lB),DB=A(40,e=>EB(e,[e._._.v,e=>e]),e=>e._._),OB=A(41,e=>b(e.d,e._._.w),e=>e._._),kB=A(43,e=>O(e.g,`placeholder`,e._._.y),e=>e._._),AB=j(4,e=>O(e.c,`disabled`,e._.m||!e._.u||!e._.i.trim()),2),jB=A(34,AB),MB=s(`o7`,e=>{_(e.b,`click`,function(){e._.a3()}),_(e.c,`click`,function(){e._.a5()})}),NB=e=>{jB(e),PB(e),FB(e),S(e.a,`_z`),S(e.b,`_q`),S(e.c,[`_q`,`_r`]),MB(e)},PB=A(35,e=>{b(e.d,e._.m?`Joining…`:`Join workspace`),AB(e)}),FB=A(39,AB),IB=we(`o11`,`<div></div><button type=button>Cancel</button><button type=button> </button>`,` b b D `,NB),LB=j(6,e=>de(e,`c`,e._.h,e._.z)),RB=A(33,LB),zB=s(`o10`,e=>Se(e,`c`)),BB=e=>{RB(e),UB(e),GB(e),KB(e),YB(e),XB(e),ZB(e),QB(e),S(e.a,`_gJ`),S(e.b,nB),S(e.c,[`_Z`,`_y`,`_hO`]),zB(e)},VB=p(5,`<ul></ul>`,` `,vB),HB=j(7,e=>VB(e,e._.m&&e._.p?0:1)),UB=A(35,e=>{O(e.c,`disabled`,e._.m),HB(e)}),WB=p(4,Ot,(e=>`/${e}&`)(Vt),xB),GB=A(36,e=>WB(e,+!e._.n)),KB=A(38,HB),qB=p(3,`<p> </p>`,` D `,dB,`<ul></ul><p>Your own lane of <span> </span> in each; PRs target theirs.</p><label><span>Name</span><input></label>`,` b Db D m D b `,wB),JB=j(8,e=>qB(e,e._.x?0:e._.u?1:2)),YB=A(39,JB),XB=A(42,JB),ZB=A(44,LB),QB=A(45,e=>O(e.a,`id`,e._.a6)),$B=we(`o12`,`<h2>Join a workspace</h2><p>Paste an invite: the same repos, on your own lane of their branch.</p><textarea placeholder="{ &#34;name&#34;: …, &#34;branch&#34;: …, &#34;repos&#34;: [&#34;owner/name&#34;, …] }" aria-label="Workspace invite" rows=6 autocomplete=off spellcheck=false autofocus></textarea><!><!><!><!>`,` b b b%b%b%`,BB),eV=(e,t)=>{TV(e,t?.ok),kV(e,t?.error)},tV=k(RB),nV=a(7,e=>{eV(e,(()=>{if(!e.h.trim())return{ok:null,error:``};try{return{ok:vj(e.h),error:``}}catch(e){return{ok:null,error:e.message}}})()),tV(e)}),rV=w(25,k(ZB)),iV=j(11,e=>rV(e,LV(e))),aV=w(31),oV=j(30,e=>aV(e,RV(e)),6),sV=k(jB,SB),cV=a(8,e=>{iV(e),oV(e),sV(e)}),lV=(e,t)=>xV(e,t.v),uV=k(UB,PB,TB),dV=a(12,e=>{Ro(e.a,!e.m),oV(e),uV(e)}),fV=a(13,k(GB,yB)),pV=k(_B),mV=a(14,e=>{SV(e,e.o?.length),oV(e),pV(e)}),hV=(e,t)=>CV(e,t.n),gV=w(32,e=>qo(e.a,e.a6));function _V(e){Zo(e.a),es(e.a,dn({content:IB(e)})),Io(e.a,$B(e)),Jo(e.a,`Join a workspace`),Go(e.a,tB),Yo(e.a),$o(e.a,{}),nV(e,``),cV(e,``),lV(e,{v:``}),dV(e,!1),fV(e,null),mV(e,[]),hV(e,{n:0}),gV(e,f(e))}var vV=w(29,oV),yV=w(26,e=>{Wo(e.a,BV(e)),vV(e,zV(e))}),bV=j(18,e=>yV(e,VV(e))),xV=w(10,e=>{iV(e),bV(e)}),SV=w(15,k(KB,pB)),CV=w(17,e=>{bV(e),oV(e)}),wV=k(YB,FB),TV=w(20,e=>{EV(e,e.u?.repos),DV(e,e.u?.branch),OV(e,e.u?.name),oV(e),wV(e)}),EV=w(21,k(DB)),DV=w(22,k(OB)),OV=w(24,k(kB)),kV=w(23,k(XB,uB)),AV=c(27,e=>Vo(e.a,e.a1)),jV=j(5,e=>AV(e,e.d,e.e)),MV=w(3,jV),NV=w(4,jV),PV=w(6,oV),FV=e=>function(){fV(e._._,null)},IV=e=>t=>{cV(e._._,t)},LV=e=>t=>{nV(e,t);try{let n=vj(t);(!e.i.trim()||e.i===e.k)&&(cV(e,n.name),e.k=n.name)}catch{}},RV=e=>async()=>{if(e.m||!e.u||!e.i.trim())return;let t=++e.r;dV(e,!0),fV(e,null),mV(e,[]);let n=Math.random().toString(36).slice(2,10),r=er(n,n=>{t===e.r&&mV(e,e.o.concat(n))});await r.ready;try{let r=await N(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e.i,repos:e.u.repos.map(e=>({fullName:e})),opId:n,join:e.u.branch})});if(t!==e.r)return;e.a3(),e.g?.(r)}catch(n){if(t!==e.r)return;dV(e,!1),fV(e,String(n.message||n))}finally{r.stop()}},zV=e=>()=>{e.a0(),AV(e,!1)},BV=e=>function(t){t||e.a0(),AV(e,t)},VV=e=>()=>{e.r++,nV(e,``),cV(e,``),e.k=``,dV(e,!1),fV(e,null),mV(e,[])};n(`o6`,FV),n(`o1`,IV),n(`o0`,LV),n(`o4`,RV),n(`o3`,zV),n(`o5`,BV),n(`o2`,VV);var HV=((e,t)=>`<div role=region><div><div>${e}<!><label><span>Name</span><input placeholder=my-feature autofocus></label><section><div><h2>Repos</h2></div><ul><!><!></ul>${t}</section><!><div><button type=button> </button></div><!></div></div><!></div>`)(hr,LM),UV=((e,t)=>` D D D/${e}&%b D b l D D l D%b%l0${t}&l%b D D m%m%l`)(gr,RM),WV=e=>S(e.a,`_G`),GV=e=>{S(e.a,`_fm`),ia(e.b),aa(e.b,14),oa(e.b)},KV=e=>S(e.a,`_G`),qV=e=>S(e.a,Wz),JV=e=>{ia(e.a),aa(e.a,12),oa(e.a)},YV=we(`t15`,`Name the workspace and pick repos, or restore an archived one below.`),XV=p(1,`<span></span>`,` `,KV,(e=>`<span>${e}</span>`)(na),(e=>` D/${e}&l`)(ra),GV),ZV=A(64,e=>{S(e.a,[`_fq`,{_fl:e.M===e._._.ae-1}]),XV(e,e.M===e._._.ae-1?0:1)},e=>e._._),QV=ZV,$V=(e,t)=>b(e.c,t),eH=m(0,`<li><!><!></li>`,` D%b%`,QV,(e,t)=>$V(e,t[0])),tH=h(16,0,e=>eH(e,[e._.ad])),nH=e=>{tH._(e),S(e.a,`_fk`)},rH=h(10,0,e=>AM(e.b,e._.n)),iH=e=>{rH._(e),aH._(e),S(e.a,`_fe`),kM(e.b),NM(e.b,GU(e)),jM(e.b,WU(e))},aH=h(10,0,e=>MM(e.b,e._.q)),oH=A(62,e=>b(e.a,e._._.ac),e=>e._._),sH=we(`t17`,` `,` `,oH),cH=e=>{Gt(e.a),lt(e.a,sH(e)),Zt(e.a,`inline`),Rt(e.a,KU(e)),ot(e.a),Te(e.a),St(e.a),mt(e.a),Xe(e.a,{})},lH=j(7,e=>O(e.g,`disabled`,e._._.a8||!!e._._.a9)),uH=A(60,lH,e=>e._._),dH=s(`t23`,e=>_(e.g,`click`,function(){e._._.ao(e.j)})),fH=e=>{uH(e),hH(e),S(e.a,Yz),S(e.b,`_cl`),S(e.c,`_cm`),S(e.e,[Mt,`_y`]),S(e.g,M),dH(e)},pH=p(6,`<span></span> Restoring…`,` `,WV,`Restore`),mH=j(15,e=>pH(e,e._._.a9===e.o?0:1)),hH=A(61,e=>{lH(e),mH(e)},e=>e._._),gH=(e,t)=>b(e.d,t),_H=j(13,e=>{O(e.e,`title`,e.l||e.m),b(e.f,e.l||e.m)}),vH=w(11,_H),yH=w(12,_H),bH=w(14,mH),xH=(e,t)=>SH(e,t[0]),SH=w(9,e=>{gH(e,e.j?.name),vH(e,e.j?.display_path),yH(e,e.j?.path),bH(e,e.j?.id)}),CH=m(6,`<li><div><span> </span><span> </span></div><button type=button></button></li>`,` D D D l D m `,fH,xH),wH=h(20,0,e=>CH(e,[e._.ag,`id`])),TH=e=>{wH._(e),EH._(e),S(e.a,Kz),S(e.b,`_fb`),S(e.c,`_ct`),S(e.d,Ie),S(e.f,qz),S(e.g,Jz)},EH=h(20,0,e=>b(e.e,e._.ah)),DH=A(60,e=>O(e.a,`disabled`,e._._.a8),e=>e._._),OH=s(`t18`,e=>_(e.a,`click`,function(){e._._.am(e._.n)})),kH=e=>{DH(e),jH._(e),NH._(e),OH(e)},AH=j(1,e=>O(e.a,`title`,e._.p?`${e._.n} will be forked to your account; click to clone as-is instead`:`Fork ${e._.n} to your account and clone the fork`)),jH=h(4,0,AH),MH=p(0,(e=>`${e} fork`)(na),(e=>`/${e}&b`)(ra),JV,`fork`),NH=h(4,0,e=>{S(e.a,[`_fj`,{_fh:e._.p}]),O(e.a,`aria-pressed`,e._.p?`true`:`false`),MH(e,+!e._.p),AH(e)}),PH=i(12,e=>{O(e.f,`disabled`,e._.a8),O(e.i,`disabled`,e._.a8)}),FH=s(`t19`,e=>{_(e.f,`click`,function(){TU(e._,e._.aj===e.n?null:e.n)}),_(e.i,`click`,function(){e._.al(e.n)})}),IH=e=>{PH._(e),RH._(e),S(e.a,`_fc`),S(e.b,Uz),S(e.c,`_fg`),kj(e.g),Aj(e.g,12),jj(e.g),S(e.i,[je,`_8`]),Pt(e.j),_t(e.j,12),Jt(e.j),FH(e)},LH=p(10,(e=>`<div>${e}</div>`)(Mj),(e=>` D/${e}&l`)(` b`),iH),RH=ue(12,45,13,e=>{S(e.f,[Gz,`_y`,{_fh:e._.aj===e.n}]),LH(e,e._.aj===e.n?0:1)}),zH=w(13,e=>{b(e.d,an(e.n)),O(e.f,`title`,`Change base branch for ${e.n}`),O(e.f,`aria-label`,`Change base branch for ${e.n}`),O(e.i,`title`,`Remove ${e.n}`),jH(e),rH(e)}),BH=p(4,`<button></button>`,` `,kH),VH=w(15,e=>{BH(e,+(e.p===void 0)),NH(e)}),HH=w(16,e=>{b(e.h,e.q?`${x(` `)}${x(e.q)}`:``),aH(e)}),UH=(e,t)=>{zH(e,t[0]?.fullName),VH(e,t[0]?.fork),HH(e,t[0]?.baseBranch)},WH=A(60,e=>O(e.a,`disabled`,e._.a8)),GH=s(`t14`,e=>_(e.a,`click`,function(){aU(e._,!0)})),KH=we(`t16`,(e=>`<button type=button aria-label="Join a workspace" title="Join a workspace from an invite">${e}</button>`)(Xz),(e=>` D/${e}&l`)(Zz),e=>{WH(e),S(e.a,Ne),Qz(e.b),$z(e.b,14),eB(e.b),GH(e)}),qH=A(58,e=>{O(e.a,`disabled`,e._.a4),on(e.b,e._.a4&&`_F`)}),JH=s(`t20`,e=>_(e.a,`click`,function(){e._.au()})),YH=we(`t21`,(e=>`<button title="Refresh repo list" aria-label="Refresh repo list">${e}</button>`)(Re),(e=>` D/${e}&l`)(nt),e=>{qH(e),S(e.a,[Ne,`_fa`]),rt(e.b),Oe(e.b,14),JH(e)}),XH=h(21,0,e=>PV(e.a,e._.a0)),ZH=e=>{XH._(e),QH._(e),_V(e.a),NV(e.a,qU(e))},QH=h(21,0,e=>MV(e.a,e._.a5)),$H=w(54),eU=j(53,e=>$H(e,JU(e)),5),tU=j(37,e=>O(e.s,`disabled`,e.a8||!!e.a9||!e.a3.trim()),2),nU=a(29,e=>{de(e,`h`,e.a3,YU(e)),eU(e),tU(e)}),rU=a(30,k(qH)),iU=p(21,rB,(e=>`/${e}&`)(iB),ZH),aU=a(31,e=>{iU(e,+!e.a5),QH(e)}),oU=w(44,e=>OP(e.o,XU(e))),sU=w(48),cU=w(49),lU=m(12,((e,t)=>`<li><div><span> </span><!><button>${e} </button><button>${t}</button></div><!></li>`)(Dj,$t),((e,t)=>` D D D l%b D/${e}& l D/${t}&m%l`)(Oj,bt),IH,UH),uU=w(47),dU=j(46,e=>uU(e,eW(e))),fU=a(32,e=>{TP(e.o,new Set(e.a6.map(e=>e.fullName))),jU(e,e.a6?.length),oU(e,ZU(e)),sU(e,QU(e)),cU(e,$U(e)),lU(e,[e.a6,`fullName`]),dU(e),eU(e)}),pU=w(50),mU=j(36,e=>pU(e,tW(e)),2),hU=p(16,`<ul></ul>`,` `,nH),gU=j(41,e=>hU(e,e.a8&&e.ae?0:1)),_U=k(WH,DH,uH),vU=a(34,e=>{O(e.h,`disabled`,e.a8),HP(e.o,e.a8),b(e.t,e.a8?`Creating…`:`Create workspace`),mU(e),gU(e),tU(e),_U(e),PH(e)}),yU=k(hH),bU=a(35,e=>{mU(e),eU(e),tU(e),yU(e)}),xU=p(4,Ot,(e=>`/${e}&`)(Vt),cH),SU=k(oH),CU=a(38,e=>{xU(e,+!e.ac),SU(e)}),wU=a(39,e=>{NU(e,e.ad?.length),eU(e),tH(e)}),TU=a(45,e=>{dU(e),RH(e)}),EU=(e,t)=>zU(e,t.n),DU=(e,t)=>{O(e.a,`aria-labelledby`,t),Pr(e.d,t)},OU=s(`t24`,e=>{Se(e,`h`),_(e.s,`click`,function(){e.as()})});function kU(e){o(e,14,UU),S(e.a,`_d8`),S(e.b,`_d9`),S(e.c,`_d_`),kr(e.d),Lr(e.d,dn({content:YV(e)})),zr(e.d,dn({content:KH(e)})),Fr(e.d,`New workspace`),Br(e.d),S(e.f,`_e_`),S(e.g,`_ct`),S(e.h,qe),S(e.i,`_cf`),S(e.j,`_fb`),S(e.k,`_ct`),S(e.l,Hz),vP(e.o),VP(e.o,dn({content:YH(e)})),wP(e.o,nW(e)),RN(e.o,function(t){rU(e,t)}),LN(e.o),LP(e.o),zP(e.o),BP(e.o),UP(e.o),S(e.r,`_e8`),S(e.s,[et,`_r`,`_e9`]),nU(e,``),rU(e,!1),aU(e,!1),fU(e,[]),vU(e,!1),bU(e,null),CU(e,null),wU(e,[]),TU(e,null),EU(e,{n:0}),DU(e,f(e)),OU(e)}var AU=p(13,`<li>No repos yet. Search below to add one, or create it empty.</li>`,` `,qV),jU=w(33,e=>AU(e,+!!e.a7)),MU=k(ZV),NU=w(40,e=>{gU(e),MU(e)}),PU=w(42,e=>{IU(e,e.ag?.length),wH(e)}),FU=p(20,`<section><div><h2>Archived</h2><span> </span></div><p>Restore an archived workspace instead of creating a new one.</p><ul></ul></section>`,` D D b D m b `,TH),IU=w(43,e=>{FU(e,+!e.ah),EH(e)}),LU=(e,t)=>PU(e,(t||[]).filter(e=>e.status===`archived`).slice().sort((e,t)=>t.created_at.localeCompare(e.created_at))),RU=w(25,mU),zU=w(52,eU),BU=w(26,e=>{eU(e),XH(e)}),VU=(e,t)=>Mr(e.d,t),HU=w(28,e=>Nr(e.d,e.a2&&rW(e))),UU=u(`t22`,w(56)),WU=e=>function(t){TU(e._._,null),CU(e._._,t)},GU=e=>function(t,n){e._._.an(e._.n,n?void 0:t)},KU=e=>function(){CU(e._,null)},qU=e=>t=>{aU(e._,t)},JU=e=>async()=>{if(e.a9)return;let t=++e.aq;vU(e,!0),CU(e,null),wU(e,[]);let n=Math.random().toString(36).slice(2,10),r=er(n,t=>{wU(e,e.ad.concat(t))});await r.ready;try{let r=await N(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e.a3,repos:e.a6,opId:n})});if(t!==e.aq)return;vU(e,!1),e.a0?.(r)}catch(n){if(t!==e.aq)return;vU(e,!1),CU(e,String(n.message||n))}finally{r.stop()}},YU=e=>t=>{nU(e,t)},XU=e=>function(t,n,r){e.ai(t,n,r)},ZU=e=>(t,n,r)=>{!t||e.a6.some(e=>e.fullName===t)||fU(e,e.a6.concat({fullName:t,baseBranch:n,fork:r}))},QU=e=>t=>{fU(e,e.a6.map(e=>e.fullName===t?{...e,fork:!e.fork}:e))},$U=e=>(t,n)=>{fU(e,e.a6.map(e=>e.fullName===t?{...e,baseBranch:n}:e)),TU(e,null)},eW=e=>t=>{fU(e,e.a6.filter(e=>e.fullName!==t)),e.aj===t&&TU(e,null)},tW=e=>async t=>{if(!(e.a8||e.a9)){CU(e,null),bU(e,t.id);try{await N(`/api/workspaces/${t.id}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}),e.z?.({...t,status:`active`})}catch(t){CU(e,String(t.message||t))}finally{bU(e,null)}}},nW=e=>function(t){CU(e,t)},rW=e=>()=>e.a2?.();n(`t10`,WU),n(`t9`,GU),n(`t8`,KU),n(`t13`,qU),n(`t6`,JU),n(`t0`,YU),n(`t11`,XU),n(`t1`,ZU),n(`t3`,QU),n(`t4`,$U),n(`t2`,eW),n(`t5`,tW),n(`t12`,nW),n(`t7`,rW);var iW=Object.defineProperty,aW=Object.getOwnPropertyDescriptor,oW=(e,t)=>{for(var n in t)iW(e,n,{get:t[n],enumerable:!0})},B=(e,t,n,r)=>{for(var i=r>1?void 0:r?aW(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&iW(t,n,i),i},V=(e,t)=>(n,r)=>t(n,r,e),sW=`Terminal input`,cW={get:()=>sW,set:e=>sW=e},lW=`Too much output to announce, navigate to rows manually to read`,uW={get:()=>lW,set:e=>lW=e};function dW(e){return e.replace(/\r?\n/g,`\r`)}function fW(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function pW(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function mW(e,t,n,r){e.stopPropagation(),e.clipboardData&&hW(e.clipboardData.getData(`text/plain`),t,n,r)}function hW(e,t,n,r){e=dW(e),e=fW(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function gW(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function _W(e,t,n,r,i){gW(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function vW(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function yW(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var bW=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},xW=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},SW=``,CW=` `,wW=class e{constructor(){this.fg=0,this.bg=0,this.extended=new TW}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},TW=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},EW=class e extends wW{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new TW,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?vW(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},DW=`di$target`,OW=`di$dependencies`,kW=new Map;function AW(e){return e[OW]||[]}function jW(e){if(kW.has(e))return kW.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);MW(t,e,r)};return t._id=e,kW.set(e,t),t}function MW(e,t,n){t[DW]===t?t[OW].push({id:e,index:n}):(t[OW]=[{id:e,index:n}],t[DW]=t)}var NW=jW(`BufferService`),PW=jW(`CoreMouseService`),FW=jW(`CoreService`),IW=jW(`CharsetService`),LW=jW(`InstantiationService`),RW=jW(`LogService`),zW=jW(`OptionsService`),BW=jW(`OscLinkService`),VW=jW(`UnicodeService`),HW=jW(`DecorationService`),UW=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new EW,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):WW(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};UW=B([V(0,NW),V(1,zW),V(2,BW)],UW);function WW(e,t){if(confirm(`Do you want to navigate to ${t}?
4
4
 
5
5
  WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var GW=jW(`CharSizeService`),KW=jW(`CoreBrowserService`),qW=jW(`MouseService`),JW=jW(`RenderService`),YW=jW(`SelectionService`),XW=jW(`CharacterJoinerService`),ZW=jW(`ThemeService`),QW=jW(`LinkProviderService`),$W=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?aG.isErrorNoTelemetry(e)?new aG(e.message+`
6
6
 
@@ -79,5 +79,5 @@ out vec4 outColor;
79
79
  void main() {
80
80
  outColor = v_color;
81
81
  }`,x1=8,S1=x1*Float32Array.BYTES_PER_ELEMENT,C1=20*x1,w1=class{constructor(){this.attributes=new Float32Array(C1),this.count=0}},T1=0,E1=0,D1=0,O1=0,k1=0,A1=0,j1=0,M1=class extends sQ{constructor(e,t,n,r){super(),this._terminal=e,this._gl=t,this._dimensions=n,this._themeService=r,this._vertices=new w1,this._verticesCursor=new w1;let i=this._gl;this._program=kQ($$(i,y1,b1)),this._register(iQ(()=>i.deleteProgram(this._program))),this._projectionLocation=kQ(i.getUniformLocation(this._program,`u_projection`)),this._vertexArrayObject=i.createVertexArray(),i.bindVertexArray(this._vertexArrayObject);let a=new Float32Array([0,0,1,0,0,1,1,1]),o=i.createBuffer();this._register(iQ(()=>i.deleteBuffer(o))),i.bindBuffer(i.ARRAY_BUFFER,o),i.bufferData(i.ARRAY_BUFFER,a,i.STATIC_DRAW),i.enableVertexAttribArray(3),i.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let s=new Uint8Array([0,1,2,3]),c=i.createBuffer();this._register(iQ(()=>i.deleteBuffer(c))),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,c),i.bufferData(i.ELEMENT_ARRAY_BUFFER,s,i.STATIC_DRAW),this._attributesBuffer=kQ(i.createBuffer()),this._register(iQ(()=>i.deleteBuffer(this._attributesBuffer))),i.bindBuffer(i.ARRAY_BUFFER,this._attributesBuffer),i.enableVertexAttribArray(0),i.vertexAttribPointer(0,2,i.FLOAT,!1,S1,0),i.vertexAttribDivisor(0,1),i.enableVertexAttribArray(1),i.vertexAttribPointer(1,2,i.FLOAT,!1,S1,2*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(1,1),i.enableVertexAttribArray(2),i.vertexAttribPointer(2,4,i.FLOAT,!1,S1,4*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(2,1),this._updateCachedColors(r.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,Q$),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,n=this._vertices,r=1,i,a,o,s,c,l,u,d,f,p,m;for(i=0;i<t.rows;i++){for(o=-1,s=0,c=0,l=!1,a=0;a<t.cols;a++)u=(i*t.cols+a)*p1,d=e.cells[u+m1],f=e.cells[u+h1],p=!!(f&67108864),(d!==s||f!==c&&(l||p))&&((s!==0||l&&c!==0)&&(m=r++*x1,this._updateRectangle(n,m,c,s,o,a,i)),o=a,s=d,c=f,l=p);(s!==0||l&&c!==0)&&(m=r++*x1,this._updateRectangle(n,m,c,s,o,t.cols,i))}n.count=r}updateCursor(e){let t=this._verticesCursor,n=e.cursor;if(!n||n.style===`block`){t.count=0;return}let r,i=0;(n.style===`bar`||n.style===`outline`)&&(r=i++*x1,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.style===`bar`?n.dpr*n.cursorWidth:n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(n.style===`underline`||n.style===`outline`)&&(r=i++*x1,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,(n.y+1)*this._dimensions.device.cell.height-n.dpr,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat)),n.style===`outline`&&(r=i++*x1,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat),r=i++*x1,this._addRectangleFloat(t.attributes,r,(n.x+n.width)*this._dimensions.device.cell.width-n.dpr,n.y*this._dimensions.device.cell.height,n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=i}_updateRectangle(e,t,n,r,i,a,o){if(n&67108864)switch(n&50331648){case 16777216:case 33554432:T1=this._themeService.colors.ansi[n&255].rgba;break;case 50331648:T1=(n&16777215)<<8;break;default:T1=this._themeService.colors.foreground.rgba}else switch(r&50331648){case 16777216:case 33554432:T1=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:T1=(r&16777215)<<8;break;default:T1=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=t1(e.attributes,this._terminal.rows*this._terminal.cols*x1)),E1=i*this._dimensions.device.cell.width,D1=o*this._dimensions.device.cell.height,O1=(T1>>24&255)/255,k1=(T1>>16&255)/255,A1=(T1>>8&255)/255,j1=1,this._addRectangle(e.attributes,t,E1,D1,(a-i)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,O1,k1,A1,j1)}_addRectangle(e,t,n,r,i,a,o,s,c,l){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=s,e[t+6]=c,e[t+7]=l}_addRectangleFloat(e,t,n,r,i,a,o){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(e.rgba&255)/255])}},N1=class extends sQ{constructor(e,t,n,r,i,a,o,s){super(),this._container=t,this._alpha=i,this._coreBrowserService=a,this._optionsService=o,this._themeService=s,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-${n}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(iQ(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=kQ(this._canvas.getContext(`2d`,{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,n){}handleSelectionChanged(e,t,n,r=!1){}_setTransparency(e,t){if(t===this._alpha)return;let n=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,n),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=G$(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,n=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,n*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,n,r){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(e,t,n,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=YQ,this._clipCell(n,r,t.getWidth()),this._ctx.fillText(t.getChars(),n*this._deviceCellWidth+this._deviceCharLeft,r*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,n){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,n){let r=t?e.options.fontWeightBold:e.options.fontWeight;return`${n?`italic`:``} ${r} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},P1=class extends N1{constructor(e,t,n,r,i,a,o){super(n,e,`link`,t,!0,i,a,o),this._register(r.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(r.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&U$(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},F1=typeof window==`object`?window:globalThis,I1=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Q,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Q,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};I1.INSTANCE=new I1;var L1=I1;function R1(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}L1.INSTANCE.onDidChangeZoomLevel,L1.INSTANCE.onDidChangeFullscreen;var z1=typeof navigator==`object`?navigator.userAgent:``;z1.indexOf(`Firefox`);var B1=z1.indexOf(`AppleWebKit`)>=0;!(z1.indexOf(`Chrome`)>=0)&&z1.indexOf(`Safari`),z1.indexOf(`Electron/`),z1.indexOf(`Android`);var V1=!1;if(typeof F1.matchMedia==`function`){let e=F1.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=F1.matchMedia(`(display-mode: fullscreen)`);V1=e.matches,R1(F1,e,({matches:e})=>{V1&&t.matches||(V1=e)})}function H1(){return V1}var U1=`en`,W1=!1,G1=!1,K1=!1,q1=U1,J1,Y1=globalThis,X1;typeof Y1.vscode<`u`&&typeof Y1.vscode.process<`u`?X1=Y1.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(X1=process);var Z1=typeof X1?.versions?.electron==`string`&&X1?.type===`renderer`;if(typeof X1==`object`){X1.platform,X1.platform,W1=X1.platform===`linux`,W1&&X1.env.SNAP&&X1.env.SNAP_REVISION,X1.env.CI||X1.env.BUILD_ARTIFACTSTAGINGDIRECTORY,q1=U1;let e=X1.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,q1=t.resolvedLanguage||U1,t.languagePack?.translationsConfigFile}catch{}G1=!0}else typeof navigator==`object`&&!Z1?(J1=navigator.userAgent,J1.indexOf(`Windows`),J1.indexOf(`Macintosh`),(J1.indexOf(`Macintosh`)>=0||J1.indexOf(`iPad`)>=0||J1.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,W1=J1.indexOf(`Linux`)>=0,J1?.indexOf(`Mobi`),K1=!0,q1=globalThis._VSCODE_NLS_LANGUAGE||U1,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var Q1=G1;K1&&typeof Y1.importScripts==`function`&&Y1.origin;var $1=J1,e0=q1,t0;(e=>{function t(){return e0}e.value=t;function n(){return e0.length===2?e0===`en`:e0.length>=3&&e0[0]===`e`&&e0[1]===`n`&&e0[2]===`-`}e.isDefaultVariant=n;function r(){return e0===`en`}e.isDefault=r})(t0||={});var n0=typeof Y1.postMessage==`function`&&!Y1.importScripts;(()=>{if(n0){let e=[];Y1.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.id===t.data.vscodeScheduleAsyncWork){e.splice(n,1),r.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),Y1.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var r0=!!($1&&$1.indexOf(`Chrome`)>=0);$1&&$1.indexOf(`Firefox`),!r0&&$1&&$1.indexOf(`Safari`),$1&&$1.indexOf(`Edg/`),$1&&$1.indexOf(`Android`);var i0=typeof navigator==`object`?navigator:{};Q1||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||i0&&i0.clipboard&&i0.clipboard.writeText,Q1||i0&&i0.clipboard&&i0.clipboard.readText,Q1||H1()||i0.keyboard,`ontouchstart`in F1||i0.maxTouchPoints,F1.PointerEvent&&(`ontouchstart`in F1||navigator.maxTouchPoints);var a0=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},o0=new a0,s0=new a0,c0=new a0;Array(230);var l0;(e=>{function t(e){return o0.keyCodeToStr(e)}e.toString=t;function n(e){return o0.strToKeyCode(e)}e.fromString=n;function r(e){return s0.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return c0.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return s0.strToKeyCode(e)||c0.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`}return o0.keyCodeToStr(e)}e.toElectronAccelerator=o})(l0||={});var u0=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),d0;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof f0?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:b$.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:u0})})(d0||={});var f0=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?u0:(this._emitter||=new Q,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var p0;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(p0||={});var m0=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new Q,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await b$.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};m0.EMPTY=m0.fromArray([]);function h0(e){return g0(e,0)}function g0(e,t){switch(typeof e){case`object`:return e===null?_0(349,t):Array.isArray(e)?b0(e,t):x0(e,t);case`string`:return y0(e,t);case`boolean`:return v0(e,t);case`number`:return _0(e,t);case`undefined`:return _0(937,t);default:return _0(617,t)}}function _0(e,t){return(t<<5)-t+e|0}function v0(e,t){return _0(e?433:863,t)}function y0(e,t){t=_0(149417,t);for(let n=0,r=e.length;n<r;n++)t=_0(e.charCodeAt(n),t);return t}function b0(e,t){return t=_0(104579,t),e.reduce((e,t)=>g0(t,e),t)}function x0(e,t){return t=_0(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=y0(n,t),g0(e[n],t)),t)}var{registerWindow:Loe,getWindow:S0,getDocument:Roe,getWindows:zoe,getWindowsCount:Boe,getWindowId:Voe,getWindowById:Hoe,hasWindow:Uoe,onDidRegisterWindow:Woe,onWillUnregisterWindow:Goe,onDidUnregisterWindow:Koe}=function(){let e=new Map,t={window:F1,disposables:new oQ};e.set(F1.vscodeWindowId,t);let n=new Q,r=new Q,i=new Q;function a(n,r){return(typeof n==`number`?e.get(n):void 0)??(r?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(t){if(e.has(t.vscodeWindowId))return sQ.None;let a=new oQ,o={window:t,disposables:a.add(new oQ)};return e.set(t.vscodeWindowId,o),a.add(iQ(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(w0(t,E0.BEFORE_UNLOAD,()=>{i.fire(t)})),n.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:a,getWindow(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;let n=e;return n?.view?n.view.window:F1},getDocument(e){return S0(e).document}}}(),C0=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&=(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,null)}};function w0(e,t,n,r){return new C0(e,t,n,r)}var T0=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,n=this.height){return t!==this.width||n!==this.height?new e(t,n):this}static is(e){return typeof e==`object`&&typeof e.height==`number`&&typeof e.width==`number`}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};T0.None=new T0(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,t,n){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let i=h0(n),a=r.get(i);if(a)a.users+=1;else{let o=new Q,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(iQ(()=>{--c.users,c.users===0&&(o.dispose(),s.disconnect(),r?.delete(i),r?.size===0&&this.mutationObservers.delete(e))})),r.set(i,a)}return a.onDidMutate}};var E0={CLICK:`click`,AUXCLICK:`auxclick`,DBLCLICK:`dblclick`,MOUSE_UP:`mouseup`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_MOVE:`mousemove`,MOUSE_OUT:`mouseout`,MOUSE_ENTER:`mouseenter`,MOUSE_LEAVE:`mouseleave`,MOUSE_WHEEL:`wheel`,POINTER_UP:`pointerup`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_LEAVE:`pointerleave`,CONTEXT_MENU:`contextmenu`,WHEEL:`wheel`,KEY_DOWN:`keydown`,KEY_PRESS:`keypress`,KEY_UP:`keyup`,LOAD:`load`,BEFORE_UNLOAD:`beforeunload`,UNLOAD:`unload`,PAGE_SHOW:`pageshow`,PAGE_HIDE:`pagehide`,PASTE:`paste`,ABORT:`abort`,ERROR:`error`,RESIZE:`resize`,SCROLL:`scroll`,FULLSCREEN_CHANGE:`fullscreenchange`,WK_FULLSCREEN_CHANGE:`webkitfullscreenchange`,SELECT:`select`,CHANGE:`change`,SUBMIT:`submit`,RESET:`reset`,FOCUS:`focus`,FOCUS_IN:`focusin`,FOCUS_OUT:`focusout`,BLUR:`blur`,INPUT:`input`,STORAGE:`storage`,DRAG_START:`dragstart`,DRAG:`drag`,DRAG_ENTER:`dragenter`,DRAG_LEAVE:`dragleave`,DRAG_OVER:`dragover`,DROP:`drop`,DRAG_END:`dragend`,ANIMATION_START:B1?`webkitAnimationStart`:`animationstart`,ANIMATION_END:B1?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:B1?`webkitAnimationIteration`:`animationiteration`},D0=class extends sQ{constructor(e,t,n,r,i,a,o,s,c){super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._optionsService=o,this._themeService=s,this._cursorBlinkStateManager=new cQ,this._charAtlasDisposable=this._register(new cQ),this._observerDisposable=this._register(new cQ),this._model=new v1,this._workCell=new Z$,this._workCell2=new Z$,this._rectangleRenderer=this._register(new cQ),this._glyphRenderer=this._register(new cQ),this._onChangeTextureAtlas=this._register(new Q),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new Q),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new Q),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new Q),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new Q),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`);let l={antialias:!1,depth:!1,preserveDrawingBuffer:c};if(this._gl=this._canvas.getContext(`webgl2`,l),!this._gl)throw Error(`WebGL2 not supported `+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new qQ(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new P1(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions=LQ(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(w0(this._canvas,`webglcontextlost`,e=>{console.log(`webglcontextlost event received`),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn(`webgl context not restored; firing onContextLoss`),this._onContextLoss.fire(e)},3e3)})),this._register(w0(this._canvas,`webglcontextrestored`,e=>{console.warn(`webglcontextrestored event received`),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,K$(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=Y$(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=Y$(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(iQ(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),K$(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let e of this._renderLayers)e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,n){for(let r of this._renderLayers)r.handleSelectionChanged(this._terminal,e,t,n);this._model.selection.update(this._core,e,t,n),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new M1(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new u1(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=G$(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=rQ(b$.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),b$.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let e of this._renderLayers)e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached){if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return}for(let n of this._renderLayers)n.handleGridChanged(this._terminal,e,t);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new J$(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let n=this._core,r=this._workCell,i,a,o,s,c,l,u=0,d=!0,f,p,m,h,g,_,v,y,b;e=k0(e,n.rows-1,0),t=k0(t,n.rows-1,0);let ee=this._coreService.decPrivateModes.cursorStyle??n.options.cursorStyle??`block`,x=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,te=x-n.buffer.ydisp,ne=Math.min(this._terminal.buffer.active.cursorX,n.cols-1),re=-1,S=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let C=!1;for(a=e;a<=t;a++)for(o=a+n.buffer.ydisp,s=n.buffer.lines.get(o),this._model.lineLengths[a]=0,m=x===o,u=0,c=this._characterJoinerService.getJoinedCharacters(o),y=0;y<n.cols;y++){if(i=this._cellColorResolver.result.bg,s.loadCell(y,r),y===0&&(i=this._cellColorResolver.result.bg),l=!1,d=y>=u,f=y,c.length>0&&y===c[0][0]&&d){p=c.shift();let e=this._model.selection.isCellSelected(this._terminal,p[0],o);for(v=p[0]+1;v<p[1];v++)d&&=e===this._model.selection.isCellSelected(this._terminal,v,o);d&&=!m||ne<p[0]||ne>=p[1],d?(l=!0,r=new O0(r,s.translateToString(!0,p[0],p[1]),p[1]-p[0]),f=p[1]-1):u=p[1]}if(h=r.getChars(),g=r.getCode(),v=(a*n.cols+y)*p1,this._cellColorResolver.resolve(r,y,o,this.dimensions.device.cell.width),S&&o===x&&(y===ne&&(this._model.cursor={x:ne,y:te,width:r.getWidth(),style:this._coreBrowserService.isFocused?ee:n.options.cursorInactiveStyle,cursorWidth:n.options.cursorWidth,dpr:this._devicePixelRatio},re=ne+r.getWidth()-1),y>=ne&&y<=re&&(this._coreBrowserService.isFocused&&ee===`block`||this._coreBrowserService.isFocused===!1&&n.options.cursorInactiveStyle===`block`)&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),g!==0&&(this._model.lineLengths[a]=y+1),(this._model.cells[v]!==g||this._model.cells[v+m1]!==this._cellColorResolver.result.bg||this._model.cells[v+h1]!==this._cellColorResolver.result.fg||this._model.cells[v+g1]!==this._cellColorResolver.result.ext)&&(C=!0,h.length>1&&(g|=_1),this._model.cells[v]=g,this._model.cells[v+m1]=this._cellColorResolver.result.bg,this._model.cells[v+h1]=this._cellColorResolver.result.fg,this._model.cells[v+g1]=this._cellColorResolver.result.ext,_=r.getWidth(),this._glyphRenderer.value.updateCell(y,a,g,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,h,_,i),l)){for(r=this._workCell,y++;y<=f;y++)b=(a*n.cols+y)*p1,this._glyphRenderer.value.updateCell(y,a,0,0,0,0,gQ,0,0),this._model.cells[b]=0,this._model.cells[b+m1]=this._cellColorResolver.result.bg,this._model.cells[b+h1]=this._cellColorResolver.result.fg,this._model.cells[b+g1]=this._cellColorResolver.result.ext;y--}}C&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},O0=class extends h${constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function k0(e,t,n=0){return Math.max(Math.min(e,t),n)}var A0=`di$target`,j0=`di$dependencies`,M0=new Map;function N0(e){if(M0.has(e))return M0.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);P0(t,e,r)};return t._id=e,M0.set(e,t),t}function P0(e,t,n){t[A0]===t?t[j0].push({id:e,index:n}):(t[j0]=[{id:e,index:n}],t[A0]=t)}N0(`BufferService`),N0(`CoreMouseService`),N0(`CoreService`),N0(`CharsetService`),N0(`InstantiationService`),N0(`LogService`);var F0=N0(`OptionsService`);N0(`OscLinkService`),N0(`UnicodeService`),N0(`DecorationService`);var I0={trace:0,debug:1,info:2,warn:3,error:4,off:5},L0=`xterm.js: `,R0=class extends sQ{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),z0=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=I0[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]==`function`&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?``:L0)+t,...n)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};R0=BZ([VZ(0,F0)],R0);var z0,B0=class extends sQ{constructor(e){if(mQ&&hQ()<16&&!document.createElement(`canvas`).getContext(`webgl2`,{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error(`Webgl2 is only supported on Safari 16 and above`);super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new Q),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new Q),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new Q),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new Q),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element){this._register(t.onWillOpen(()=>this.activate(e)));return}this._terminal=e;let n=t.coreService,r=t.optionsService,i=t,a=i._renderService,o=i._characterJoinerService,s=i._charSizeService,c=i._coreBrowserService,l=i._decorationService;i._logService;let u=i._themeService;this._renderer=this._register(new D0(e,o,s,c,n,l,r,u,this._preserveDrawingBuffer)),this._register(b$.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(b$.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(b$.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(b$.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(iQ(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},V0=2,H0=1,U0=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(V0,Math.floor(u/e.css.cell.width)),rows:Math.max(H0,Math.floor(l/e.css.cell.height))}}},W0=`3.7.8`,G0=W0,K0=typeof Buffer==`function`,q0=typeof TextDecoder==`function`?new TextDecoder:void 0,J0=typeof TextEncoder==`function`?new TextEncoder:void 0,Y0=Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`),X0=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(Y0),Z0=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Q0=String.fromCharCode.bind(String),$0=typeof Uint8Array.from==`function`?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),e2=e=>e.replace(/=/g,``).replace(/[+\/]/g,e=>e==`+`?`-`:`_`),t2=e=>e.replace(/[^A-Za-z0-9\+\/]/g,``),n2=e=>{let t,n,r,i,a=``,o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw TypeError(`invalid character found`);t=n<<16|r<<8|i,a+=Y0[t>>18&63]+Y0[t>>12&63]+Y0[t>>6&63]+Y0[t&63]}return o?a.slice(0,o-3)+`===`.substring(o):a},r2=typeof btoa==`function`?e=>btoa(e):K0?e=>Buffer.from(e,`binary`).toString(`base64`):n2,i2=K0?e=>Buffer.from(e).toString(`base64`):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(Q0.apply(null,e.subarray(n,n+4096)));return r2(t.join(``))},a2=(e,t=!1)=>t?e2(i2(e)):i2(e),o2=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Q0(192|t>>>6)+Q0(128|t&63):Q0(224|t>>>12&15)+Q0(128|t>>>6&63)+Q0(128|t&63)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return Q0(240|t>>>18&7)+Q0(128|t>>>12&63)+Q0(128|t>>>6&63)+Q0(128|t&63)},s2=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,c2=e=>e.replace(s2,o2),l2=K0?e=>Buffer.from(e,`utf8`).toString(`base64`):J0?e=>i2(J0.encode(e)):e=>r2(c2(e)),u2=(e,t=!1)=>t?e2(l2(e)):l2(e),d2=e=>u2(e,!0),f2=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,p2=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return Q0((t>>>10)+55296)+Q0((t&1023)+56320);case 3:return Q0((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Q0((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},m2=e=>e.replace(f2,p2),h2=e=>{if(e=e.replace(/\s+/g,``),!Z0.test(e))throw TypeError(`malformed base64.`);e+=`==`.slice(2-(e.length&3));let t,n,r,i=[];for(let a=0;a<e.length;)t=X0[e.charAt(a++)]<<18|X0[e.charAt(a++)]<<12|(n=X0[e.charAt(a++)])<<6|(r=X0[e.charAt(a++)]),n===64?i.push(Q0(t>>16&255)):r===64?i.push(Q0(t>>16&255,t>>8&255)):i.push(Q0(t>>16&255,t>>8&255,t&255));return i.join(``)},g2=typeof atob==`function`?e=>atob(t2(e)):K0?e=>Buffer.from(e,`base64`).toString(`binary`):h2,_2=K0?e=>$0(Buffer.from(e,`base64`)):e=>$0(g2(e).split(``).map(e=>e.charCodeAt(0))),v2=e=>_2(b2(e)),y2=K0?e=>Buffer.from(e,`base64`).toString(`utf8`):q0?e=>q0.decode(_2(e)):e=>m2(g2(e)),b2=e=>t2(e.replace(/[-_]/g,e=>e==`-`?`+`:`/`)),x2=e=>y2(b2(e)),S2=e=>{if(typeof e!=`string`)return!1;let t=e.replace(/\s+/g,``).replace(/={0,2}$/,``);return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},C2=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),w2=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,C2(t));e(`fromBase64`,function(){return x2(this)}),e(`toBase64`,function(e){return u2(this,e)}),e(`toBase64URI`,function(){return u2(this,!0)}),e(`toBase64URL`,function(){return u2(this,!0)}),e(`toUint8Array`,function(){return v2(this)})},T2=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,C2(t));e(`toBase64`,function(e){return a2(this,e)}),e(`toBase64URI`,function(){return a2(this,!0)}),e(`toBase64URL`,function(){return a2(this,!0)})},E2={version:W0,VERSION:G0,atob:g2,atobPolyfill:h2,btoa:r2,btoaPolyfill:n2,fromBase64:x2,toBase64:u2,encode:u2,encodeURI:d2,encodeURL:d2,utob:c2,btou:m2,decode:x2,isValid:S2,fromUint8Array:a2,toUint8Array:v2,extendString:w2,extendUint8Array:T2,extendBuiltins:()=>{w2(),T2()}},D2=class{constructor(e=new k2,t=new O2){this._base64=e,this._provider=t}activate(e){this._terminal=e,this._disposable=e.parser.registerOscHandler(52,e=>this._setOrReportClipboard(e))}dispose(){return this._disposable?.dispose()}_readText(e,t){let n=this._base64.encodeText(t);this._terminal?.input(`\x1B]52;${e};${n}\x07`,!1)}_setOrReportClipboard(e){let t=e.split(`;`);if(t.length<2)return!0;let n=t[0],r=t[1];if(r===`?`){let e=this._provider.readText(n);return e instanceof Promise?e.then(e=>(this._readText(n,e),!0)):(this._readText(n,e),!0)}let i=``;try{i=this._base64.decodeText(r)}catch{}let a=this._provider.writeText(n,i);return a instanceof Promise?a.then(()=>!0):!0}},O2=class{async readText(e){return e===`c`?navigator.clipboard.readText():Promise.resolve(``)}async writeText(e,t){return e===`c`?navigator.clipboard.writeText(t):Promise.resolve()}},k2=class{encodeText(e){return E2.encode(e)}decodeText(e){let t=E2.decode(e);return!E2.isValid(e)||E2.encode(t)!==e?``:t}},A2=class{constructor(e,t,n,r={}){this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){let n=M2.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(n))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(t,n)=>{if(this._options.hover){let{range:r}=e;this._options.hover(t,n,r)}},e))}};function j2(e){try{let t=new URL(e),n=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch{return!1}}var M2=class e{static computeLink(t,n,r,i){let a=new RegExp(n.source,(n.flags||``)+`g`),[o,s]=e._getWindowedLineStrings(t-1,r),c=o.join(``),l,u=[];for(;l=a.exec(c);){let t=l[0];if(!j2(t))continue;let[n,a]=e._mapStrIdx(r,s,0,l.index),[o,c]=e._mapStrIdx(r,n,a,t.length);if(n===-1||a===-1||o===-1||c===-1)continue;let d={start:{x:a+1,y:n+1},end:{x:c,y:o+1}};u.push({range:d,text:t,activate:i})}return u}static _getWindowedLineStrings(e,t){let n,r=e,i=e,a=0,o=``,s=[];if(n=t.buffer.active.getLine(e)){let e=n.translateToString(!0);if(n.isWrapped&&e[0]!==` `){for(a=0;(n=t.buffer.active.getLine(--r))&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),!(!n.isWrapped||o.indexOf(` `)!==-1)););s.reverse()}for(s.push(e),a=0;(n=t.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),o.indexOf(` `)===-1););}return[s,r]}static _mapStrIdx(e,t,n,r){let i=e.buffer.active,a=i.getNullCell(),o=n;for(;r;){let e=i.getLine(t);if(!e)return[-1,-1];for(let n=o;n<e.length;++n){e.getCell(n,a);let o=a.getChars();if(a.getWidth()&&(r-=o.length||1,n===e.length-1&&o===``)){let e=i.getLine(t+1);e&&e.isWrapped&&(e.getCell(0,a),a.getWidth()===2&&(r+=1))}if(r<0)return[t,n]}t++,o=0}return[t,o]}},N2=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function P2(e,t){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}var F2=class{constructor(e=P2,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,n=t.urlRegex||N2;this._linkProvider=this._terminal.registerLinkProvider(new A2(this._terminal,n,this._handler,t))}dispose(){this._linkProvider?.dispose()}},I2=10,L2=4e3,R2=45e3;function z2(e,t){let{term:n,write:r}=e,i=new TextEncoder,a=null,o=0,s=!1,c=null,l=!1,u=()=>{if(s)return;let i=location.protocol===`https:`?`wss`:`ws`,p=l;l=!1;let m=a=new WebSocket(`${i}://${location.host}/term/${e.sessionId}?cols=${n.cols}&rows=${n.rows}&visible=${+!!d()}`+(p?`&respawn=1`:``));m.onmessage=e=>r(e.data),m.onopen=()=>{o=0,f(m),c&&=(m.send(JSON.stringify({resize:c})),null),_()},m.onclose=n=>{if(!(t.aborted||s||a!==m)){if(n.code===L2){e.onDead(`exited`);return}if(document.visibilityState!==`visible`){let e=()=>{document.visibilityState===`visible`&&(document.removeEventListener(`visibilitychange`,e),!t.aborted&&a===m&&u())};document.addEventListener(`visibilitychange`,e,{signal:t})}else if(++o<=I2){let e=()=>setTimeout(()=>{!t.aborted&&a===m&&u()},Math.min(400*o,2e3));if(o===1){Qt().then(()=>{!t.aborted&&a===m&&e()});return}e()}else Qt().finally(()=>e.onDead(`lost`))}}},d=()=>document.visibilityState===`visible`&&e.isVisible(),f=e=>{e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({visible:d()}))},p=0,m;document.addEventListener(`visibilitychange`,()=>{if(document.visibilityState!==`visible`){p=Date.now(),a&&f(a),clearTimeout(m),m=setTimeout(()=>{document.visibilityState!==`visible`&&a?.close()},R2);return}clearTimeout(m),m=void 0;let e=p&&Date.now()-p>R2;if(p=0,e&&!s){if(a&&a.readyState===WebSocket.OPEN){let e=a;a=null,e.close()}u();return}a&&f(a)},{signal:t}),t.addEventListener(`abort`,()=>{clearTimeout(m),a?.close()});let h=[],g=0,_=()=>{for(;h.length&&a?.readyState===WebSocket.OPEN;)a.send(i.encode(h.shift()));g=0};return{send(e){a?.readyState===WebSocket.OPEN?a.send(i.encode(e)):g<1024&&(h.push(e),g+=e.length)},resize(e,t){a?.readyState===WebSocket.OPEN?a.send(JSON.stringify({resize:[e,t]})):c=[e,t]},syncVisibility(){a&&f(a)},claim(){d()&&a?.readyState===WebSocket.OPEN&&a.send(JSON.stringify({claim:!0}))},get readyState(){return a?.readyState},connect(){a&&a.readyState<=WebSocket.OPEN||u()},reconnect(e){s=!1,e?.respawn&&(l=!0),o=0,u()},disconnect(){s=!0,a?.close()},resume(){s=!1}}}function B2(e){return e().querySelector(`.xterm-screen`)||e()}function V2(e,t){return(n,r)=>{let i=B2(t).getBoundingClientRect();return{col:Math.max(0,Math.min(e.cols-1,Math.floor((n-i.left)/i.width*e.cols))),row:Math.max(0,Math.min(e.rows-1,Math.floor((r-i.top)/i.height*e.rows)))+e.buffer.active.viewportY}}}function H2(e,t,n){let r=e.getBoundingClientRect();for(let i=0;i<n;i++)e.dispatchEvent(new WheelEvent(`wheel`,{deltaY:t,deltaMode:WheelEvent.DOM_DELTA_LINE,bubbles:!0,cancelable:!0,clientX:r.left+r.width/2,clientY:r.top+r.height/2}))}function U2(e,t,n,r){let i=null,a=0,o=0,s=0,c=0,l=n=>{let r=B2(t),i=r.clientHeight/e.rows||17;c+=n/i;let a=Math.trunc(c);a&&(c-=a,H2(r,a>0?1:-1,Math.abs(a)))},u=()=>{cancelAnimationFrame(s),s=0},d=()=>{o*=.97,!(Math.abs(o)<.25)&&(l(o*16),s=requestAnimationFrame(d))};n.addEventListener(`abort`,u),t().addEventListener(`touchstart`,e=>{u(),o=0,i=e.touches[0]?.clientY??null,a=e.timeStamp},{passive:!0,signal:n}),t().addEventListener(`touchmove`,e=>{if(r?.())return;let t=e.touches[0]?.clientY;if(t==null||i==null)return;let n=i-t;Math.abs(n)>=2&&(o=n/Math.max(1,e.timeStamp-a),i=t,a=e.timeStamp,l(n)),e.preventDefault()},{passive:!1,signal:n}),t().addEventListener(`touchend`,()=>{i=null,Math.abs(o)>.5&&(u(),s=requestAnimationFrame(d))},{signal:n})}function W2(e){let t=!1,n=[],r=0;return{write(i){if(!t){e.write(i);return}for(n.push(i),r+=i.length;r>1048576&&n.length>1;)r-=n.shift().length},setFrozen(i){if(t!==i&&(t=i,!i)){let t=n.join(``);n=[],r=0,t&&e.write(t)}}}}function G2(e,t,n){let r=e.textarea;if(!r)return;let i=`\xA0`.repeat(4),a={deleteContentBackward:``,deleteWordBackward:``,deleteSoftLineBackward:``,deleteHardLineBackward:``},o=!1,s=()=>{o||(r.value!==i&&(r.value=i),r.setSelectionRange(i.length,i.length))};r.addEventListener(`beforeinput`,e=>{let n=a[e.inputType];n&&(e.preventDefault(),e.stopImmediatePropagation(),t(n))},{capture:!0,signal:n}),r.addEventListener(`compositionstart`,()=>{o=!0},{signal:n}),r.addEventListener(`compositionend`,()=>{o=!1,setTimeout(s,0)},{signal:n}),r.addEventListener(`input`,()=>setTimeout(s,0),{signal:n}),r.addEventListener(`focus`,()=>setTimeout(s,0),{signal:n}),s()}var K2=450,q2=12,J2=` ·│┃()[]{}<>'"\`,;│|`;function Y2(e,t,n,r){let i=!1,a,o=0,s=0,c=null,l=null,u=V2(e,t),d=t=>{let n=e.buffer.active.getLine(t.row)?.translateToString()??``,r=e=>!e||e===` `||J2.includes(e);if(r(n[t.col]))return{start:t,end:t};let i=t.col,a=t.col;for(;i>0&&!r(n[i-1]);)i--;for(;a<n.length-1&&!r(n[a+1]);)a++;return{start:{col:i,row:t.row},end:{col:a,row:t.row}}},f=(e,t)=>e.row<t.row||e.row===t.row&&e.col<=t.col,p=()=>{if(!c||!l)return;let[t,n]=f(c,l)?[c,l]:[l,c],r=(n.row-t.row)*e.cols+(n.col-t.col)+1;e.select(t.col,t.row,Math.max(1,r))},m=()=>{clearTimeout(a),a=void 0};t().addEventListener(`touchstart`,t=>{if(t.touches.length!==1){m();return}!i&&e.hasSelection()&&e.clearSelection(),o=t.touches[0].clientX,s=t.touches[0].clientY,a=setTimeout(()=>{a=void 0,i=!0,n.onStart();let e=d(u(o,s));c=e.start,l=e.end,p(),navigator.vibrate?.(10)},K2)},{passive:!0,signal:r}),t().addEventListener(`touchmove`,e=>{let t=e.touches[0];if(t){if(i){l=u(t.clientX,t.clientY),p(),e.preventDefault();return}a&&Math.hypot(t.clientX-o,t.clientY-s)>q2&&m()}},{passive:!1,signal:r});let h=()=>{if(m(),!i)return;i=!1,n.onEnd();let t=e.getSelection();t&&Ht(t).then(e=>{e&&n.onCopy(t)})};return t().addEventListener(`touchend`,h,{signal:r}),t().addEventListener(`touchcancel`,h,{signal:r}),{selecting:()=>i}}var X2=5;function Z2(e,t,n,r){let i=null,a=!1,o=0,s=0,c=V2(e,t);t().addEventListener(`mousedown`,t=>{if(a||t.button!==0||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)return;t.preventDefault(),t.stopImmediatePropagation();let n=t.timeStamp;s=n-o<400?s+1:1,o=n;let r=c(t.clientX,t.clientY);i={startX:t.clientX,startY:t.clientY,startCol:r.col,startRow:r.row,selecting:!1,detail:s},e.focus()},{capture:!0,signal:r}),window.addEventListener(`mousemove`,t=>{if(!i)return;if(!i.selecting){if(Math.hypot(t.clientX-i.startX,t.clientY-i.startY)<X2)return;i.selecting=!0}let n=c(t.clientX,t.clientY),r=(n.row-i.startRow)*e.cols+(n.col-i.startCol)+1,[a,o,s]=r>=0?[i.startCol,i.startRow,Math.max(1,r)]:[n.col,n.row,Math.max(1,-r+1)];e.select(a,o,s),t.preventDefault()},{signal:r}),window.addEventListener(`mouseup`,async t=>{if(!i)return;let r=i.selecting,o=i;if(i=null,r){let t=e.getSelection();t&&await Ht(t)&&n(t);return}a=!0;let s={bubbles:!0,cancelable:!0,clientX:o.startX,clientY:o.startY,button:0,buttons:1,detail:o.detail,view:window},c=document.elementFromPoint(o.startX,o.startY);c?.dispatchEvent(new MouseEvent(`mousedown`,s)),c?.dispatchEvent(new MouseEvent(`mouseup`,{...s,buttons:0,button:0})),c?.dispatchEvent(new MouseEvent(`click`,{...s,buttons:0})),a=!1,t.preventDefault()},{signal:r})}function Q2(e,t){let n=t.trim().toLowerCase();if(!n)return[];let r=e.buffer.active,i=n.length,a=[];for(let e=0;e<r.length;e++){let t=r.getLine(e);if(!t)continue;let o=t.translateToString(!1).toLowerCase(),s=0;for(;s<=o.length-i;){let t=o.indexOf(n,s);if(t<0)break;a.push({row:e,col:t,len:i}),s=t+i}}return a}var $2=24,e4=500,t4=700,n4=4,r4=16;function i4(e,t){let n=document.createElement(`div`);n.className=`_ji`,n.setAttribute(`aria-hidden`,`true`),t.appendChild(n);let r=``,i=null,a=null,o=null,s=!1,c=null,l=()=>e.element?.querySelector(`.xterm-screen`)||e.element?.querySelector(`.xterm-rows`)||t,u=()=>{let n=l();if(!e.cols||!e.rows)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return i.width<1||i.height<1?null:{w:i.width/e.cols,h:i.height/e.rows,left:i.left-r.left,top:i.top-r.top}},d=()=>{let t=c;if(c=null,!t)return;let n=e.getSelectionPosition();n&&n.start.y===t.row&&n.start.x===t.col&&n.end.y===t.row&&n.end.x===t.col+t.len&&e.clearSelection()},f=()=>{n.replaceChildren();let t=r.trim().toLowerCase(),a=u();if(!a||!t){n.style.display=`none`;return}n.style.display=`block`,n.style.left=`${a.left}px`,n.style.top=`${a.top}px`,n.style.width=`${a.w*e.cols}px`,n.style.height=`${a.h*e.rows}px`;let s=e.buffer.active,c=s.viewportY,l=t.length,f=!1;for(let r=0;r<e.rows;r++){let u=c+r,d=s.getLine(u);if(!d)continue;let p=d.translateToString(!1).toLowerCase(),m=null,h=0;for(;h<=p.length-l;){let s=p.indexOf(t,h);if(s<0)break;if(s<e.cols){let t=Math.min(l,e.cols-s),c=document.createElement(`div`);m===null&&i&&i.row===u&&(m=d.translateToString(!0));let p=!!(i&&i.row===u&&i.col===s&&i.len===l&&(!o||m===o.text));p&&(f=!0),c.className=p?`_jj _jk`:`_jj`,c.style.left=`${s*a.w}px`,c.style.top=`${r*a.h}px`,c.style.width=`${t*a.w}px`,c.style.height=`${a.h}px`,n.appendChild(c)}h=s+l}}i&&!f&&d()},p=t=>{let n=e.buffer.active.getLine(t);return n?n.translateToString(!0):``},m=()=>{let t=e.buffer.active.viewportY,n=[];for(let r=1;r<e.rows-2;r++)n.push(p(t+r));return n.join(`
82
- `)},h=e=>{i=e;let t=p(e.row);o=t.trim()?{text:t,col:e.col,row:e.row}:null,g(e)},g=t=>{let n=e.buffer.active.viewportY;(t.row<n||t.row>=n+e.rows)&&e.scrollToLine(Math.max(0,t.row-Math.floor(e.rows/2))),e.select(t.col,t.row,t.len),c=t},_=t=>{let n=Q2(e,r);if(!n.length)return i=null,d(),t<0?`up`:t>0?`down`:null;let a=i,s=a?n.findIndex(e=>e.row===a.row&&e.col===a.col&&(!o||p(e.row)===o.text)):-1;if(t===0)s=n.length-1;else if(s<0)s=t>0?0:n.length-1;else if(t>0){if(s>=n.length-1)return`down`;s+=1}else{if(s<=0)return`up`;--s}return h(n[s]),null},v=(e,t)=>H2(l(),e,t),y=()=>{if(!o)return-1;let t=e.buffer.active.viewportY,n=-1;for(let r=0;r<e.rows;r++){let e=t+r;p(e)===o.text&&(n<0||Math.abs(e-o.row)<Math.abs(n-o.row))&&(n=e)}return n},b=()=>{if(!o)return!1;let t=y();if(t<0)return!1;let n=Q2(e,r).find(e=>e.row===t&&e.col===o?.col);return n?(i=n,g(n),!0):!1},ee=t=>{let n=Q2(e,r);if(!n.length)return!1;let i=y(),a=i<0?n:n.filter(e=>t<0?e.row<i||e.row===i&&e.col<o.col:e.row>i||e.row===i&&e.col>o.col);return a.length?(h(t<0?a[a.length-1]:a[0]),!0):!1},x=()=>{a?.cancel(),a=null},te=(t,n)=>{let r=0,i=0,o=()=>{x(),n()},s=e.onWriteParsed(()=>{m()!==t&&(i||=setTimeout(o,t4),r&&clearTimeout(r),r=setTimeout(o,$2))}),c=setTimeout(o,e4);a={cancel(){s.dispose(),r&&clearTimeout(r),i&&clearTimeout(i),clearTimeout(c)}}},ne=(e,t,n,i)=>{if(r!==i){s=!1;return}if(t<=0){s=!1,b(),f();return}let a=m(),o=Math.min(n,t);v(e===1?-1:1,o),te(a,()=>{if(r!==i){s=!1;return}if(m()===a){s=!1,b(),f();return}ne(e,t-o,n,i)})},re=(t,n,i,a)=>{if(n){ne(t,n,i,a);return}if(!b()){let n=Q2(e,r);n.length&&h(t<0?n[0]:n[n.length-1])}s=!1,f()},S=(t,n,i,a=0)=>{if(r!==i){s=!1;return}let o=Math.max(1,Math.floor(e.rows/n4));if(n<=0){re(t,a,o,i);return}s=!0;let c=m();v(t,o),te(c,()=>{try{if(r!==i){s=!1;return}if(m()===c){re(t,a,o,i);return}if(ee(t)){s=!1,f();return}f(),S(t,n-1,i,a+o)}catch(e){throw s=!1,e}})};return{search(e,t){if(s&&t!==0&&e===r)return;s=!1,x(),e!==r&&(i=null,o=null),r=e;let n=_(t);n&&t!==0&&(i=null,d()),f(),!(!n||t===0)&&S(n===`up`?-1:1,r4,e)},refresh(){f()},clear(){x(),r=``,i=null,o=null,s=!1,d(),f()},dispose(){x(),d(),n.remove()}}}var a4=2,o4=[`#2e3436`,`#cc0000`,`#4e9a06`,`#c4a000`,`#3465a4`,`#75507b`,`#06989a`,`#d3d7cf`,`#555753`,`#ef2929`,`#8ae234`,`#fce94f`,`#729fcf`,`#ad7fa8`,`#34e2e2`,`#eeeeec`];function s4(e){return e?.background||`#000000`}function c4(e,t){if(t<0||t>255)return s4(e);let n=[e?.black,e?.red,e?.green,e?.yellow,e?.blue,e?.magenta,e?.cyan,e?.white,e?.brightBlack,e?.brightRed,e?.brightGreen,e?.brightYellow,e?.brightBlue,e?.brightMagenta,e?.brightCyan,e?.brightWhite][t];if(n)return n;if(t<16)return o4[t];if(t<232){let e=t-16,n=Math.floor(e/36),r=Math.floor(e%36/6),i=e%6,a=e=>e===0?0:55+e*40;return`rgb(${a(n)},${a(r)},${a(i)})`}let r=8+(t-232)*10;return`rgb(${r},${r},${r})`}function l4(e,t){let n=e.options.theme;if(t.isBgDefault())return s4(n);if(t.isBgRGB()){let e=t.getBgColor();return`rgb(${e>>16&255},${e>>8&255},${e&255})`}return t.isBgPalette()?c4(n,t.getBgColor()):s4(n)}function u4(e){let t=e.buffer.active,n=t.getNullCell(),r=t.viewportY,i=Math.min(t.length-1,r+Math.max(0,e.rows-1)),a=Math.max(0,e.cols-1),o=[[0,r],[a,r],[0,i],[a,i],[Math.floor(a/2),r+Math.floor((i-r)/2)]],s=new Map;for(let[r,i]of o){if(!t.getLine(i)?.getCell(r,n))continue;let a=l4(e,n);s.set(a,(s.get(a)||0)+1)}let c=s4(e.options.theme),l=0;for(let[e,t]of s)t>l&&(c=e,l=t);return c}function d4(e){let t=e._core?._renderService?.dimensions?.css?.cell;return!t?.width||!t?.height?null:{w:t.width,h:t.height}}function f4(e){try{let t=e._core;if(!t)return;let n=t._viewport||t.viewport;return n?n._scrollableElement||n.scrollableElement:void 0}catch{return}}function p4(e){try{let t=e.options.overviewRuler;(!t||t.width!==0)&&(e.options.overviewRuler={...t||{},width:0}),f4(e)?.updateOptions?.({vertical:a4,verticalScrollbarSize:0})}catch{}}function m4(e){return p4(e),{dispose(){}}}function h4(e,t){p4(e);let n=t.proposeDimensions();if(!(!n||!(n.cols>=2)||!(n.rows>=1))&&(e.cols!==n.cols||e.rows!==n.rows)){try{e._core?._renderService?.clear?.()}catch{}e.resize(n.cols,n.rows)}}function g4(e,t){let n=d4(e);if(!n)return 0;let r=Math.max(0,e.rows*n.h-t),i=e.buffer.active,a=i.cursorY;for(let t=e.rows-1;t>a;t--)if(i.getLine(t)?.translateToString(!0).trim()){a=t;break}let o=(a+1)*n.h-t,s=Math.ceil(Math.max(0,o)/n.h)*n.h;return Math.round(Math.min(r,s))}function _4(e,t){let n=e.element;if(!n)return;let r=t?`${t}`:``;n.dataset.shift!==r&&(n.dataset.shift=r,n.style.transform=t?`translateY(${-t}px)`:``)}function v4(e,t){let n=e.element;if(!n)return;let r=u4(e);if(n.dataset.shellBg===r&&(!t||t.dataset.shellBg===r))return;n.dataset.shellBg=r,n.style.backgroundColor=r,t&&(t.dataset.shellBg=r,t.style.backgroundColor=r);let i=n.querySelector(`.xterm-viewport`);i&&(i.style.backgroundColor=r);let a=n.querySelector(`.xterm-scrollable-element`);a&&(a.style.backgroundColor=r)}function y4(e,t){let n=0,r=()=>{n||=requestAnimationFrame(()=>{n=0,v4(e,t())})};v4(e,t());let i=e.onWriteParsed(r);return{dispose(){cancelAnimationFrame(n),i.dispose()}}}var b4=((e,t,n)=>`<div><div><input type=search enterkeyhint=search autocomplete=off placeholder="Find in terminal" aria-label="Find in terminal"><button type=button title="Previous match">${e}</button><button type=button title="Next match">${t}</button><button type=button title="Close find">${n}</button></div></div>`)($e,Dt,$t),x4=((e,t,n)=>` D D b D/${e}&l D/${t}&l D/${n}&n`)(ke,ft,bt),S4=(e,t)=>{O(e.d,`disabled`,!t),O(e.f,`disabled`,!t)},C4=j(36,e=>S4(e,e.a9&&e.s)),w4=s(`E6`,e=>{e.w=!!e.s,e.y=e.u}),T4=j(26,w4,3),qoe=s(`E5`,e=>d(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(!e.w)return;if(t.key===`Escape`){if(document.querySelector(`dialog[open]`))return;t.preventDefault(),t.stopPropagation(),e.a6();return}let n=t.metaKey||t.ctrlKey;if(t.key===`F3`||n&&t.key.toLowerCase()===`g`){t.preventDefault(),t.stopPropagation(),e.a4(t.shiftKey?-1:1);return}if(!(n||t.altKey)){if(t.key===`Enter`){if(document.activeElement!==e.c)return;t.preventDefault(),t.stopPropagation(),e.a4(t.shiftKey?-1:1);return}if(t.key===`ArrowDown`){if(!e.y.trim())return;t.preventDefault(),t.stopPropagation(),e.a4(1);return}if(t.key===`ArrowUp`){if(!e.y.trim())return;t.preventDefault(),t.stopPropagation(),e.a4(-1)}}},{capture:!0,signal:t.signal}),e.a2=e.q,e.a3=!!e.s,e.s&&e.a7(),{abort:t}},onUpdate:function(){e.q!==e.a2&&(e.a2=e.q,e.s&&(e.a7(),e.c?.select())),e.s&&!e.a3?(e.a3=!0,e.a7()):e.s||(e.a3=!1)},onDestroy:function(){if(this.abort.abort(),e.w){let t=e.p;t&&t()}}})),E4=j(34,qoe,9),D4=j(39,e=>S(e.a,[`_cA`,e.ac?`_cC`:`_cB`,!e.s&&`_cE`])),O4=j(31,e=>de(e,`c`,e.u,V4(e)),3),k4=c(18,e=>{O(e.a,`aria-hidden`,e.s?`false`:`true`),O(e.c,`tabindex`,e.s?0:-1),O(e.d,`tabindex`,e.s?0:-1),O(e.f,`tabindex`,e.s?0:-1),O(e.h,`tabindex`,e.s?0:-1),C4(e),T4(e),E4(e),D4(e),O4(e)}),A4=j(13,e=>k4(e,e.l,e.m)),j4=w(11,A4),M4=w(12,A4),Joe=w(35,C4),N4=a(20,e=>{Joe(e,!!e.u.trim()),T4(e),O4(e)}),Yoe=(e,t)=>{tse(e,t.open),nse(e,t.query)},Xoe=(e,t)=>{rse(e,t.tick),ise(e,t.wasOpen)},Zoe=w(33,e=>{ee(e,e.a7),E4(e)}),Qoe=s(`E4`,e=>{Se(e,`c`),_(e.c,`keydown`,function(t){if(e.s){if(t.key===`Escape`){t.preventDefault(),t.stopPropagation(),e.a6();return}t.stopPropagation()}}),_(e.d,`mousedown`,function(e){e.preventDefault()}),_(e.d,`click`,function(){e.a4(-1)}),_(e.f,`mousedown`,function(e){e.preventDefault()}),_(e.f,`click`,function(){e.a4(1)}),_(e.h,`mousedown`,function(e){e.preventDefault()}),_(e.h,`click`,function(){e.a6()})});function P4(e){tn(e.e),ht(e.e,14),rn(e.e),Ut(e.g),It(e.g,14),Yt(e.g),Pt(e.i),_t(e.i,14),Jt(e.i),N4(e,``),Yoe(e,{open:!1,query:``}),Xoe(e,{tick:0,wasOpen:!1}),Zoe(e,H4(e)),Qoe(e)}var $oe=w(30,e=>{E4(e),O4(e)}),F4=j(25,e=>$oe(e,U4(e)),2),ese=w(32,E4),I4=j(23,e=>ese(e,W4(e))),tse=w(22,e=>{F4(e),I4(e),T4(e),E4(e)}),nse=w(24,e=>{F4(e),T4(e),E4(e),O4(e)}),rse=w(28,E4),ise=w(29,E4),L4=w(14,F4),R4=w(15,e=>{I4(e),E4(e)}),z4=w(16,E4),ase=w(38,e=>{S(e.b,[`_cv`,e.ac?`_cD`:`_cx`]),S(e.c,[Kt,e.ac&&`_cF`]),S(e.d,[zt,e.ac&&`_cG`]),S(e.f,[zt,e.ac&&`_cG`]),S(e.h,[zt,e.ac&&`_cG`]),D4(e)}),B4=(e,t)=>ase(e,t===`keybar`),V4=e=>function(t){e.s&&(N4(e,t),e.y=t,e.a4(0))},H4=e=>()=>{let t=e.c;t&&(t.focus(),document.activeElement!==t&&setTimeout(()=>t.focus(),0))},U4=e=>t=>{if(!e.w)return;let n=e.o;n&&n(e.y,t)},W4=e=>()=>{k4(e,!1),e.w=!1;let t=e.p;t&&t()};n(`E1`,V4),n(`E0`,H4),n(`E2`,U4),n(`E3`,W4);var ose=`<div><div></div><!><!><!><!><!></div>`,sse=` D b%b%b%b%b%l`,G4=3e4,cse=e=>S(e.a,`_dh`),lse=e=>S(e.a,`_di`),K4=h(2,0,e=>j4(e.a,e._.z)),use=e=>{K4._(e),q4._(e),dse._(e),J4._(e),P4(e.a),M4(e.a,b3(e)),B4(e.a,`overlay`)},q4=h(2,0,e=>z4(e.a,e._.a1)),dse=h(2,0,e=>L4(e.a,x3(e))),J4=h(2,0,e=>R4(e.a,S3(e))),fse=s(`F16`,e=>{e._.y&&setTimeout(()=>e.d?.focus(),50)}),Y4=h(6,0,fse),pse=s(`F17`,e=>{_(e.a,`click`,function(){d3(e._,!1)}),_(e.b,`click`,function(e){e.stopPropagation()}),_(e.d,`paste`,function(t){t.preventDefault(),e._.aq(t.clipboardData)}),_(e.e,`click`,function(){d3(e._,!1)})}),mse=e=>{Y4._(e),S(e.a,`_dj`),S(e.b,`_dk`),S(e.c,`_dl`),S(e.e,`_q`),pse(e)},hse=s(`F14`,e=>_(e.a,`click`,function(){e._._.p?.(e._._.q)})),gse=p(6,`<button>Close session</button>`,` `,e=>{S(e.a,`_q`),hse(e)}),X4=j(7,e=>gse(e,e._.t===`exited`&&e._.p?0:1)),Z4=h(5,0,X4),_se=e=>{Z4._(e),Q4._(e),yse._(e),S(e.a,`_dd`),S(e.b,`_de`),S(e.d,`_df`),S(e.e,[`_q`,`_r`])},Q4=h(5,0,e=>{b(e.c,e._.t===`exited`?`This session ended.`:`Connection lost.`),b(e.f,e._.t===`exited`?`Restart`:`Reconnect`),X4(e)}),vse=s(`F15`,e=>_(e.e,`click`,function(){t3(e._,!1),e._.t===`exited`?e._.a3?.respawn():e._.a3?.reconnect()})),yse=h(5,0,vse),$4=le(`F13`,1),bse=p(5,`<div><p> </p><div><button> </button><!></div></div>`,` D D l D D l%`,_se),xse=s(`F18`,e=>d(e,{onMount:function(){let t=new AbortController,n=t.signal,r=new LZ({fontSize:13,fontFamily:`ui-monospace, monospace`,scrollback:0,overviewRuler:{width:0},allowProposedApi:!0,rightClickSelectsWord:!0,macOptionClickForcesSelection:!0,theme:{selectionBackground:`#ffb000`,selectionInactiveBackground:`#ffb000`,selectionForeground:`#000000`},linkHandler:{activate(e,t){Fe(t)}}}),i=new U0;r.loadAddon(i),r.open(e.b);let a=Ye();try{let e=new B0;e.onContextLoss(()=>e.dispose()),r.loadAddon(e)}catch{}try{r.loadAddon(new D2(void 0,{readText:()=>navigator.clipboard.readText().catch(()=>``),writeText:(e,t)=>Ht(t).then(()=>{})}))}catch{}r.loadAddon(new F2((e,t)=>Fe(t)));let o=i4(r,e.b);e.a8=o;let s=r.onScroll(()=>e.ab()),c=r.onWriteParsed(()=>e.ab());e.b.addEventListener(`wheel`,()=>e.ab(),{passive:!0,signal:n}),h4(r,i);let l=m4(r),u=y4(r,$4(e));n.addEventListener(`abort`,()=>{s.dispose(),c.dispose(),l.dispose(),u.dispose(),e.ad(),o.dispose(),e.a8=null});let d=a?W2(r):null,f=d?d.write:e=>r.write(e),p=z2({sessionId:e.q,term:r,write:f,onDead:t=>{n3(e,t),t3(e,!0)},isVisible:()=>!!e.o},n),m={on:!1},h=e=>e.startsWith(`\x1B[<`)||e.startsWith(`\x1B[M`)||e.startsWith(`\x1B[>`);r.onData(e=>{m.on&&!h(e)||p.send(e)}),r.attachCustomKeyEventHandler(t=>m.on?!1:t.key===`Enter`&&t.shiftKey?(t.type===`keydown`&&p.send(`\x1B\r`),!1):(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&r.hasSelection()?(t.type===`keydown`&&Ht(r.getSelection()).then(t=>{t&&(r.clearSelection(),e.am())}),!1):t.metaKey&&!t.ctrlKey&&!t.altKey&&(t.key===`ArrowLeft`||t.key===`ArrowRight`)?(t.preventDefault(),t.type===`keydown`&&e.a3?.send(t.key===`ArrowLeft`?``:``),!1):t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&t.key===`Backspace`?(t.preventDefault(),t.type===`keydown`&&e.a3?.send(``),!1):!((t.ctrlKey||t.metaKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===`f`||a&&t.type===`keydown`&&t.key===`Backspace`));let g=0,_=!1,v=()=>{if(!e.b.clientWidth)return;let t=e.b.clientHeight;if(a&&t>0){if(xn()){g=t,_4(r,g4(r,t));return}g=0,_4(r,0)}let n=r.cols,o=r.rows;h4(r,i),_=!0,e.o&&p.connect(),(r.cols!==n||r.rows!==o)&&p.resize(r.cols,r.rows),oee(r.cols,r.rows),v4(r,e.b),e.ab()},y=new ResizeObserver(()=>v());y.observe(e.b),n.addEventListener(`abort`,()=>y.disconnect());let b=r.onCursorMove(()=>{g&&_4(r,g4(r,g))});n.addEventListener(`abort`,()=>b.dispose());let ee=()=>{e.r||(p.resize(r.cols,r.rows),requestAnimationFrame(v))};if(Cn(ee,n),window.addEventListener(`focus`,()=>{e.o&&p.claim()},{signal:n}),window.addEventListener(`keydown`,t=>{e.o&&(e.j==null||e.j===`term`)&&(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===`f`&&(t.preventDefault(),t.stopPropagation(),e.af())},{capture:!0,signal:n}),e.b.addEventListener(`paste`,t=>{let n=[...t.clipboardData?.files||[]];if(n.length){t.preventDefault(),t.stopImmediatePropagation();for(let t of n)e.an(t)}},{capture:!0,signal:n}),e.a3={send(e){m.on||p.send(e)},setKeyboard(e){if(m.on&&e)return;let t=r.textarea;t&&(t.inputMode=e?`text`:`none`,e?(t.focus(),setTimeout(()=>{document.activeElement!==t&&t.focus()},50)):t.blur())},respawn(){r.reset(),p.reconnect({respawn:!0})},reconnect(){p.reconnect()},setFindMode(e){m.on=e;let t=r.textarea;t&&(e?(t.inputMode=`none`,t.readOnly=!0,t.blur()):(t.readOnly=!1,a||(t.inputMode=`text`)))}},a){r.textarea&&(r.textarea.inputMode=`none`),Cn(()=>{!e.u||xn()||(o3(e,!1),r.textarea&&(r.textarea.inputMode=`none`))},n);let t=Y2(r,$4(e),{onStart(){d?.setFrozen(!0)},onEnd(){d?.setFrozen(!1)},onCopy(){e.am()}},n);U2(r,$4(e),n,t.selecting),G2(r,e=>{m.on||p.send(e)},n)}else Z2(r,$4(e),()=>e.am(),n);e.o&&!a&&r.focus(),v();let x={term:r,socket:p,abort:t,refit:ee,fitted:()=>_,wasParked:!!e.r,suspend:void 0};return e.o||(x.suspend=setTimeout(()=>p.disconnect(),G4)),x},onUpdate:function(){clearTimeout(this.suspend),this.wasParked&&!e.r&&this.refit(),this.wasParked=!!e.r,this.socket.syncVisibility(),e.o?(this.socket.resume(),this.socket.claim(),this.fitted()&&this.socket.connect(),e.s&&e.t===`lost`&&(t3(e,!1),this.socket.reconnect()),!e.s&&this.socket.readyState>=WebSocket.CLOSING&&(this.term.reset(),this.socket.reconnect()),!e.s&&!e.v&&this.term.focus()):this.suspend=setTimeout(()=>this.socket.disconnect(),G4)},onDestroy:function(){clearTimeout(this.suspend),this.abort.abort(),this.term.dispose()}})),e3=j(51,xse,14),t3=a(18,e=>{bse(e,+!e.s),e3(e)}),n3=a(19,e=>{e3(e),Q4(e)}),Sse=s(`F19`,e=>{e.o&&v3(e,{send:t=>e.a3?.send(t),paste:e.ar,keyboard:e.u,setKeyboard:e.ah,findOpen:e.z,findTick:e.a1,openFind:e.af,closeFind:e.ag,runFind:e.ac})}),r3=j(54,Sse,9),Cse=w(41,e=>{r3(e),e3(e)}),i3=j(31,e=>Cse(e,C3(e)),2),wse=s(`F20`,e=>{e.ai||(e.ag(),e.u&&e.ah(!1))}),a3=j(45,wse,3),o3=a(20,e=>{i3(e),a3(e),r3(e),e3(e)}),Tse=p(2,b4,(e=>`/${e}&`)(x4),use),s3=j(26,e=>Tse(e,!e.v&&e.z?0:1)),c3=a(21,e=>{s3(e),e3(e)}),Ese=p(3,`<div>uploading…</div>`,` `,lse),l3=a(22,e=>Ese(e,+!e.w)),Dse=p(4,`<div>Copied</div>`,` `,cse),u3=a(23,e=>Dse(e,+!e.x)),Ose=p(6,`<div><div><p>Long-press the field below and choose Paste</p><input placeholder="Paste here…"><button>Cancel</button></div></div>`,` D D b b `,mse),d3=a(24,e=>{Ose(e,+!e.y),Y4(e)}),kse=w(42,e=>{a3(e),r3(e),J4(e)}),f3=j(40,e=>kse(e,w3(e)),2),p3=a(25,e=>{f3(e),r3(e),s3(e),K4(e)}),m3=a(27,e=>{i3(e),r3(e),q4(e)}),Ase=(e,t)=>zse(e,t.current),jse=(e,t)=>{Use(e,t.query),Wse(e,t.overlay),Gse(e,t.refreshTimer)},Mse=(e,t)=>Yse(e,t.timer),Nse=s(`F21`,e=>{c3(e,Ye()),_(e.a,`dragover`,function(e){e.preventDefault()}),_(e.a,`drop`,function(t){t.preventDefault();for(let n of t.dataTransfer?.files||[])e.an(n)})});function Pse(e){S(e.a,`_db`),S(e.b,`_dc`),t3(e,!1),n3(e,`exited`),o3(e,!1),c3(e,!1),l3(e,!1),u3(e,!1),d3(e,!1),p3(e,!1),m3(e,0),Ase(e,{current:null}),jse(e,{overlay:null,query:``,refreshTimer:0}),Mse(e,{timer:0}),Nse(e)}var Fse=w(43,e=>{a3(e),r3(e)}),Ise=w(52),Lse=w(53,r3),h3=j(50,e=>{Ise(e,E3(e)),Lse(e,D3(e))}),Rse=w(49,e=>{h3(e),e3(e)}),g3=j(30,e=>Rse(e,O3(e))),zse=w(29,e=>{Fse(e,T3(e)),i3(e),f3(e),g3(e),h3(e),r3(e),e3(e)}),Bse=w(37,e3),Vse=w(38,r3),Hse=w(39,e=>{f3(e),e3(e)}),_3=j(36,e=>{Bse(e,k3(e)),Vse(e,A3(e)),Hse(e,j3(e))},2),Use=w(33,_3),Wse=w(34,e=>{_3(e),e3(e)}),Gse=w(35,_3),Kse=w(44,e=>{O(e.a,`hidden`,!e.ai),a3(e)}),qse=w(9,e=>{Kse(e,e.j==null||e.j===`term`),e3(e)}),Jse=w(48,e3),Yse=w(47,e=>Jse(e,M3(e))),Xse=w(10,g3),v3=c(55),y3=j(13,e=>v3(e,e.l,e.m)),Zse=w(11,y3),Qse=w(12,y3),$se=w(14,e=>{r3(e),e3(e)}),ece=w(16,e3),tce=w(17,e3),nce=w(15,Z4),b3=e=>t=>{p3(e._,t)},x3=e=>function(t,n){e._.ac(t,n)},S3=e=>function(){e._.ag()},C3=e=>()=>{e.u&&(o3(e,!1),e.a3?.setKeyboard(!1)),e.a3?.setFindMode(!0),p3(e,!0),m3(e,+e.a1+1)},w3=e=>()=>{e.z&&(p3(e,!1),e.ad(),e.a3?.setFindMode(!1))},T3=e=>t=>{o3(e,t),e.a3?.setKeyboard(t)},E3=e=>async t=>{let n=[...t?.files||[]];for(let t of n)await e.an(t);if(!n.length){let n=t?.getData(`text/plain`);n&&e.a3?.send(n)}d3(e,!1)},D3=e=>async()=>{if(!navigator.clipboard?.read){d3(e,!0);return}try{for(let t of await navigator.clipboard.read()){let n=t.types.find(e=>e.startsWith(`image/`));if(n){let r=await t.getType(n);await e.an(new File([r],`pasted.${n.split(`/`)[1]||`png`}`,{type:n}))}else if(t.types.includes(`text/plain`)){let n=await(await t.getType(`text/plain`)).text();n&&e.a3?.send(n)}}}catch{d3(e,!0)}},O3=e=>async t=>{if(t){l3(e,!0);try{let n=await(await fetch(`/api/workspaces/${e.k}/assets?name=${encodeURIComponent(t.name||`pasted.png`)}`,{method:`POST`,body:t})).json();n.path&&e.a3?.send(`${n.path} `)}finally{l3(e,!1)}}},k3=e=>()=>{!e.a7.trim()||!e.a8||(e.a9&&clearTimeout(e.a9),e.a9=setTimeout(()=>{e.a9=0,e.a8?.refresh()},32))},A3=e=>(t,n)=>{let r=e.a8;if(r){if(e.a7=t,e.a9&&=(clearTimeout(e.a9),0),!t.trim()){r.clear();return}r.search(t,n)}},j3=e=>()=>{e.a9&&=(clearTimeout(e.a9),0),e.a7=``,e.a8?.clear()},M3=e=>()=>{clearTimeout(e.al),u3(e,!0),e.al=setTimeout(()=>{u3(e,!1)},1200)};n(`F10`,b3),n(`F11`,x3),n(`F12`,S3),n(`F3`,C3),n(`F4`,w3),n(`F5`,T3),n(`F8`,E3),n(`F9`,D3),n(`F7`,O3),n(`F0`,k3),n(`F1`,A3),n(`F2`,j3),n(`F6`,M3);var rce=`<div><div><!><!><!><!><!><div></div></div></div>`,ice=` D D%b%b%b%b%b m`,ace=ln(1,2,()=>be(()=>import(`./_DliuBq2F.js`),__vite__mapDeps([0,1,2,3,4,5,6]))),oce=un(()=>be(()=>import(`./_BEMlWJ3i.js`),__vite__mapDeps([7,1,2,3,4,5,6]))),sce=un(()=>be(()=>import(`./_Dt9shJET.js`),__vite__mapDeps([8,1,2,3,4,5,6]))),cce=un(()=>be(()=>import(`./_C9t1K6t0.js`),__vite__mapDeps([9,1,2,3,4,5,6]))),lce=un(()=>be(()=>import(`./_CV1AUMfT.js`),__vite__mapDeps([10,1,2,3,4,5,6]))),uce=un(()=>be(()=>import(`./_DRrf0ps3.js`),__vite__mapDeps([11,1,2,3,4,5,6]))),dce=un(()=>be(()=>import(`./_BN2MNMec.js`),__vite__mapDeps([12,1,2,3,4,5,6]))),fce=un(()=>be(()=>import(`./_BX85X6vL.js`),__vite__mapDeps([13,1,2,3,4,5,6]))),pce=un(()=>be(()=>import(`./_kP4m5eyY.js`),__vite__mapDeps([14,1,2,3,4,5,6]))),mce=un(()=>be(()=>import(`./_wGg-Flxh.js`),__vite__mapDeps([15,1,2,3,4,5,6]))),hce=un(()=>be(()=>import(`./_DQxAgIZ5.js`),__vite__mapDeps([16,1,2,3,4,5,6]))),gce=un(()=>be(()=>import(`./_kRAx7xJD.js`),__vite__mapDeps([17,1,2,3,4,5,6]))),_ce=un(()=>be(()=>import(`./_BF3jdOKL.js`),__vite__mapDeps([18,1,2,3,4,5,6]))),vce=un(()=>be(()=>import(`./_BgTyVBoz.js`),__vite__mapDeps([19,1,2,3,4,5,6]))),yce=un(()=>be(()=>import(`./_DONc62ot.js`),__vite__mapDeps([20,1,2,3,4,5,6]))),bce=un(()=>be(()=>import(`./_DUwNzfo2.js`),__vite__mapDeps([21,1,2,3,4,5,6]))),xce=un(()=>be(()=>import(`./_C62EU_76.js`),__vite__mapDeps([22,1,2,3,4,5,6]))),Sce=un(()=>be(()=>import(`./_BtPnCFTI.js`),__vite__mapDeps([23,1,2,3,4,5,6]))),Cce=un(()=>be(()=>import(`./_KbIm5gXb.js`),__vite__mapDeps([24,1,2,3,4,5,6]))),wce=e=>S(e.a,`_cr`),N3=A(145,e=>b(e.a,e._._.az),e=>e._._),Tce=we(`J36`,` `,` `,N3),Ece=e=>{Gt(e.a),lt(e.a,Tce(e)),Rt(e.a,L8(e)),ot(e.a),Te(e.a),St(e.a),Zt(e.a),mt(e.a),Xe(e.a,{})},P3=j(3,e=>b(e.c,e._._.b0?`Starting…`:`Start ${e._._.a2||`shell`}`)),F3=A(124,P3,e=>e._._),Dce=s(`J38`,e=>_(e.b,`click`,function(){e._._.c7(e._._.a2||`shell`,!0)})),Oce=e=>{F3(e),I3(e),S(e.a,`_cr`),S(e.b,[`_q`,`_r`]),Dce(e)},I3=A(146,e=>{O(e.b,`disabled`,e._._.b0),P3(e)},e=>e._._),L3=j(6,e=>$se(e.b,e._._.s&&e._._.ai===`term`&&e.e===e._._.br),3),R3=A(123,e=>{tce(e.b,!e._._.s),L3(e)},e=>e._._),kce=e=>{R3(e),z3(e),B3(e),H3(e),U3(e),W3(e),S(e.a,`_cd`),Pse(e.b),Qse(e.b,R8(e))},z3=A(137,e=>{qse(e.b,e._._.ai),L3(e)},e=>e._._),B3=A(148,e=>Xse(e.b,e._._.b8),e=>e._._),V3=j(5,e=>{O(e.a,`data-live`,e.e===e._._.br||null),O(e.a,`inert`,e.e!==e._._.br)}),H3=A(154,e=>{V3(e),L3(e)},e=>e._._),U3=A(156,e=>Zse(e.b,e._._.c2),e=>e._._),W3=A(157,e=>nce(e.b,z8(e)),e=>e._._),Ace=w(4,e=>{ece(e.b,e.e),V3(e),L3(e)}),jce=m(0,(e=>`<div>${e}</div>`)(ose),(e=>` D/${e}&l`)(sse),kce,(e,t)=>Ace(e,t[0]?.id)),G3=j(3,e=>jce(e,[e._.s?e._.bn:e._.bn.filter(t=>t.id===e._.br),`id`]),2),K3=h(7,0,G3),Mce=e=>{K3._(e),J3._(e),Y3._(e),X3._(e),Z3._(e)},Nce=p(1,`<div><span>No sessions in this workspace.</span><button> </button></div>`,` Db D `,Oce),q3=j(2,e=>Nce(e,!e._.bq&&e._.ai===`term`?0:1)),J3=h(7,0,q3),Y3=h(7,0,G3),X3=h(7,0,q3),Z3=h(7,0,G3),Q3=j(3,e=>RU(e.b,B8(e)),2),$3=h(6,0,Q3),Pce=e=>{$3._(e),e6._(e),t6._(e),n6._(e),r6._(e),a6._(e),o6._(e),S(e.a,`_cb`),kU(e.b)},e6=h(6,0,Q3),t6=h(6,0,e=>LU(e.b,e._.ae||[])),n6=h(6,0,e=>BU(e.b,V8(e))),r6=h(6,0,e=>{O(e.a,`data-live`,e._.ai===`new`||null),O(e.a,`inert`,e._.ai!==`new`)}),i6=j(2,e=>HU(e.b,e._.b1?e._.bx:void 0)),a6=h(6,0,e=>{VU(e.b,e._.b1?`/w/${e._.b1?.id}`:void 0),i6(e)}),o6=h(6,0,e=>{i6(e),Q3(e)}),s6=h(5,0,e=>rx(e.b,e._.a2)),Fce=e=>{s6._(e),c6._(e),l6._(e),u6._(e),d6._(e),f6._(e),p6._(e),m6._(e),h6._(e),g6._(e),_6._(e),S(e.a,`_cb`),Tb(e.b)},c6=h(5,0,e=>Qx(e.b,e._.a7)),l6=h(5,0,e=>Hx(e.b,e._.a8)),u6=h(5,0,e=>Ux(e.b,H8(e))),d6=h(5,0,e=>Tv(e.b,e._.aa)),f6=h(5,0,e=>Zb(e.b,U8(e))),p6=h(5,0,e=>ax(e.b,W8(e))),m6=h(5,0,e=>ex(e.b,G8(e))),h6=h(5,0,e=>{O(e.a,`data-live`,e._.ai===`settings`||null),O(e.a,`inert`,e._.ai!==`settings`)}),g6=h(5,0,e=>Yx(e.b,e._.b1?`/w/${e._.b1?.id}`:`/new`)),_6=h(5,0,e=>Xx(e.b,K8(e))),v6=h(4,0,e=>hz(e.b,q8(e))),Ice=e=>{v6._(e),b6._(e),x6._(e),S6._(e),C6._(e),w6._(e),S(e.a,`_cb`),CR(e.b)},y6=j(2,e=>vz(e.b,J8(e))),b6=h(4,0,y6),x6=h(4,0,e=>{O(e.a,`data-live`,e._.ai===`manage`||null),O(e.a,`inert`,e._.ai!==`manage`)}),S6=h(4,0,e=>mz(e.b,e._.b1)),C6=h(4,0,y6),w6=h(4,0,e=>yz(e.b,Y8(e))),Lce=t(5,`Ad`),T6=j(4,e=>uce(e.c,e._.s&&e._.ai===`diff`)),E6=h(3,0,T6),Rce=e=>{o(e,2,zce),E6._(e),D6._(e),O6._(e),k6._(e),A6._(e),j6._(e),M6._(e),N6._(e),P6._(e),F6._(e),I6._(e),L6._(e),R6._(e),z6._(e),S(e.a,`_cb`),ace(e),gce(e.c,$8(e)),_ce(e.c,Q8(e)),yce(e.c,Z8(e)),xce(e.c,X8(e))},D6=h(3,0,e=>{O(e.a,`data-live`,e._.ai===`diff`||null),O(e.a,`inert`,e._.ai!==`diff`),T6(e)}),O6=h(3,0,e=>vce(e.c,e._.ap)),k6=h(3,0,e=>bce(e.c,e._.ar)),A6=h(3,0,e=>dce(e.c,e._.at)),j6=h(3,0,e=>fce(e.c,e._.au)),M6=h(3,0,e=>hce(e.c,e._.av)),N6=h(3,0,e=>pce(e.c,e._.ax)),P6=h(3,0,e=>mce(e.c,e._.ay)),F6=h(3,0,e=>oce(e.c,e._.b8)),I6=h(3,0,e=>sce(e.c,e._.b9)),L6=h(3,0,e=>cce(e.c,e._.ba)),R6=h(3,0,e=>{Sce(e.c,e5(e)),Cce(e.c,function(){T8(e._,e._.bb)})}),z6=h(3,0,e=>lce(e.c,e._.bn||[])),zce=u(`J37`,w(5)),Bce=le(`J33`,116),Vce=le(`J34`,117),Hce=le(`J35`,118),Uce=w(117),Wce=s(`J44`,e=>{e.s&&e.ai!==`nav`&&e.w?.({view:e.ai,sessionId:e.ai===`term`?e.br:null,pr:e.ai===`diff`&&e.at||null,scope:e.ai===`diff`?e.av:null,file:e.ai===`diff`?e.aw:null})}),B6=j(90,Wce,6),Gce=s(`J43`,e=>{e.s&&F8(e,{view:e.ai,tab:e.br,sessions:e.bn,newSession:Hce(e),closeSession:Bce(e),renameSession:Vce(e),toggleNav:e.bl,keys:e.ai===`term`?e.c2:null,reviewFindOpen:e.ap,toggleReviewFind:e.bw})}),V6=j(101,Gce,7),Kce=k(H3),qce=w(89,e=>{B6(e),V6(e),Z3(e),Kce(e)}),H6=j(87,e=>qce(e,(()=>{if(e.ah&&e.bn?.some(t=>t.id===e.ah))return e.ah;let t=e.b1&&pt(e.b1?.id);return t&&e.bn?.some(e=>e.id===t)?t:e.bn?.[0]?.id??null})()),2),Jce=p(7,`<!><!><!><!>`,`b%b%`,Mce,`<p>Loading sessions…</p>`,` `,wce),U6=j(86,e=>Jce(e,e.b1&&e.bn?0:e.b1?1:2)),Yce=w(85,e=>{Ule(e,e.bn?.length),H6(e),V6(e),U6(e),z6(e),Y3(e)}),W6=j(68,e=>Yce(e,e.b1?e.ag??e.r?.[e.b1?.id]?.sessions??null:[]),2),Xce=w(116,k(W3)),G6=j(114,e=>Xce(e,n5(e)),2),Zce=s(`J40`,e=>d(e,{active:e.s,load:e.cf,onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,started:!1,stale:!1,timer:void 0,refresh:()=>{if(document.hidden){r.stale=!0;return}r.stale=!1,this.load(!1)},applySessions:t=>{if(!e.b1)return;Z6(e,t);let n=pt(e.b1?.id);n&&t.some(e=>e.id===n)&&y8(e,n),t.some(t=>t.id===e.ah)||y8(e,t[0]?.id||null),r.stale=!1},mergeStatus:t=>{let n=e.b1&&t?.[e.b1?.id]?.sessions;if(!n||!e.ag)return;let r=new Map(n.map(e=>[e.id,e.state]));Z6(e,e.ag.map(e=>{let t=r.get(e.id);return t?{...e,state:t}:e}))},syncPoll:()=>{if(!this.active||qt()){r.stop();return}r.timer??=setInterval(r.refresh,15e3)},sync:()=>{this.active?(r.started||(r.started=!0,this.load(!0)),r.syncPoll()):r.stop()},stop:()=>{clearInterval(r.timer),r.timer=void 0}};return Bt().addEventListener(`sessions.changed`,t=>{if(!r.started)return;let n=t.data;if(!(!e.b1||n?.workspaceId&&n.workspaceId!==e.b1?.id)){if(Array.isArray(n?.sessions)){r.applySessions(n.sessions);return}r.refresh()}},{signal:n}),Bt().addEventListener(`status.changed`,e=>{r.started&&r.mergeStatus(e.data)},{signal:n}),Bt().addEventListener(`sse.health`,()=>{r.syncPoll()},{signal:n}),document.addEventListener(`visibilitychange`,()=>{!document.hidden&&r.stale&&r.refresh()},{signal:n}),r.sync(),r},onUpdate:function(){this.sync()},onDestroy:function(){this.abort.abort(),this.stop()}})),K6=j(115,Zce,4),Qce=w(113,e=>{G6(e),K6(e)}),q6=j(112,e=>Qce(e,r5(e)),2),$ce=w(111,q6),J6=j(109,e=>$ce(e,i5(e)),5),ele=w(118),Y6=j(106,e=>ele(e,a5(e)),2),tle=w(105,e=>{J6(e),Y6(e)}),X6=j(64,e=>tle(e,o5(e))),Z6=a(42,e=>{Uce(e,t5(e)),W6(e),X6(e),J6(e),G6(e),K6(e)}),nle=s(`J48`,e=>{e.s||(e.ai!==e.bb&&T8(e,e.bb),e.ak&&t8(e,!1),e.am&&k8(e,!1),e.an&&A8(e,!1),e.ao&&e.b1&&E8(e,!1))}),Q6=j(75,nle,7),rle=s(`J45`,e=>{e.l===`diff`&&!e.ak&&t8(e,!0)}),$6=j(47,rle),ile=p(3,`<div><!></div>`,` D%0&`,Rce),e8=j(66,e=>ile(e,e.ak&&e.b1?0:1)),t8=a(46,e=>{Q6(e),$6(e),e8(e)}),ale=s(`J47`,e=>{e.ai!==`diff`&&e.ap&&i8(e,!1)}),n8=j(52,ale),ole=w(94,V6),r8=j(54,e=>ole(e,s5(e))),i8=a(51,e=>{n8(e),r8(e),V6(e),O6(e)}),a8=a(53,e=>{r8(e),k6(e)}),sle=s(`J39`,e=>{d(e,{active:e.s,onMount:function(){let t=t=>{this.active&&t.target===document.body&&e.cl(t)};return document.addEventListener(`keydown`,t),{onDoc:t}},onDestroy:function(){document.removeEventListener(`keydown`,this.onDoc)}},1),_(e.a,`keydown`,e.s&&e.cl)}),o8=j(120,sle),cle=w(119,o8),s8=j(96,e=>cle(e,c5(e)),3),lle=w(84,s8),c8=j(77,e=>lle(e,l5(e)),2),ule=s(`J42`,e=>{e.s&&e.a0&&(e.a0.workspaceId??null)===(e.b8??null)&&e.a1!=null&&e.a1!==e.c5&&(e.c5=e.a1,e.bz(e.a0))}),l8=j(104,ule,5),dle=w(97,l8),u8=j(82,e=>dle(e,u5(e)),6),fle=w(76,e=>{c8(e),u8(e)}),d8=j(69,e=>fle(e,d5(e)),2),f8=a(56,e=>{d8(e),j6(e)}),p8=a(60,e=>{d8(e),P6(e)}),ple=p(2,Ot,(e=>`/${e}&`)(Vt),Ece),mle=k(N3),m8=a(61,e=>{ple(e,+!e.az),mle(e)}),h8=a(62,k(I3)),g8=j(81,e=>()=>{e.ai===`settings`?T8(e,e.bb):e.bi()},2),hle=w(80,e=>{g8(e),u8(e)}),gle=(e,t)=>Gle(e,t.open),_le=k(U3),_8=a(100,e=>{V6(e),_le(e)}),vle=(e,t)=>eue(e,t.seen),yle=(e,t)=>{rue(e,t.wanted),iue(e,t.run)};function ble(e){S(e.b,`_ca`),S(e.h,`_cc`),Z6(e,null),t8(e,!1),i8(e,!1),a8(e,0),f8(e,0),p8(e,0),m8(e,null),h8(e,!1),hle(e,f5(e)),gle(e,{open:!1}),_8(e,null),vle(e,{seen:-1}),yle(e,{wanted:!1,run:void 0})}var xle=s(`J41`,e=>{e.ah&&e.b1&&xt(e.b1?.id,e.ah)}),v8=j(65,xle),y8=a(43,e=>{H6(e),J6(e),G6(e),v8(e),K6(e)}),Sle=(e,t)=>y8(e,t??null),Cle=w(83,V6),wle=w(95,e=>{s8(e),o6(e)}),b8=j(74,e=>{Cle(e,p5(e)),wle(e,m5(e))}),x8=j(79,e=>()=>{e.ai===`manage`?T8(e,e.bb):e.bg()},2),Tle=s(`J46`,e=>{e.s&&e.t&&!e.bu&&(e.bu=!0,E8(e,!0),T8(e,`new`)),e.t?e.bu&&e.ai!==`new`&&(e.bu=!1,e.u?.()):(e.bu=!1,e.ai===`new`&&T8(e,e.bb))}),S8=j(93,Tle,5),C8=j(122,e=>S(e.a,[`_b_`,{_b8:e.cn,_b9:!e.s}])),Ele=w(121,C8),w8=j(45,e=>Ele(e,e.ai===`nav`&&e.a4===`nav`)),Dle=k(z3),T8=a(44,e=>{O(e.h,`inert`,e.ai!==`term`),g8(e),b8(e),x8(e),c8(e),Q6(e),n8(e),S8(e),B6(e),V6(e),s8(e),w8(e),D6(e),x6(e),h6(e),r6(e),J3(e),Dle(e)}),Ole=p(6,(e=>`<div>${e}</div>`)(HV),(e=>` D/${e}&l`)(UV),Pce),E8=a(50,e=>{Ole(e,+!e.ao),Q6(e)}),D8=j(13,e=>{T8(e,e.l??(e.m?`term`:`new`)),E8(e,e.l===`new`||!e.m)}),kle=p(4,(e=>`<div>${e}</div>`)(rF),(e=>` D/${e}&l`)(iF),Ice),O8=j(67,e=>kle(e,e.am&&e.b1?0:1)),k8=a(48,e=>{Q6(e),O8(e)}),Ale=p(5,(e=>`<div>${e}</div>`)(Rs),(e=>` D/${e}&l`)(zs),Fce),A8=a(49,e=>{Ale(e,+!e.an),Q6(e)}),jle=w(11,e=>{k8(e,e.l===`manage`),A8(e,e.l===`settings`),D8(e),$6(e)}),Mle=w(73,e=>{g8(e),b8(e),x8(e),c8(e),Q6(e),S8(e),u8(e),s8(e),R6(e),w6(e),_6(e)}),Nle=w(78,e=>{x8(e),u8(e)}),Ple=w(63,e=>{Ble(e,e.b1?.id),Vle(e,e.b1?.branch),Hle(e,e.b1?.name),Mle(e,e.b1?`term`:`new`),Nle(e,h5(e)),d8(e),W6(e),H6(e),Q6(e),u8(e),X6(e),J6(e),v8(e),K6(e),e8(e),O8(e),U6(e),S6(e),g6(e),a6(e)}),Fle=w(12,e=>{Ple(e,e.m),D8(e)}),j8=a(55,e=>{B6(e),A6(e)}),Ile=(e,t)=>j8(e,t??``),M8=a(57,e=>{B6(e),M6(e)}),Lle=(e,t)=>M8(e,t??null),N8=a(58,B6),P8=a(59,N6),Rle=(e,t)=>{N8(e,t??null),P8(e,t??``)},zle=k(B3),Ble=w(70,e=>{l8(e),Y6(e),F6(e),C6(e),zle(e)}),Vle=w(71,I6),Hle=w(72,L6),Ule=w(88,X3),Wle=w(17,W6),Gle=w(92,S8),Kle=k(R3),qle=w(18,e=>{Q6(e),S8(e),B6(e),V6(e),l8(e),K6(e),o8(e),C8(e),E6(e),K3(e),Kle(e)}),Jle=w(19,e=>{S8(e),u8(e)}),Yle=w(20,S8),Xle=w(21,u8),Zle=w(22,B6),F8=c(98),I8=j(25,e=>F8(e,e.x,e.y)),Qle=w(23,e=>{cue(e,e.x?.view),I8(e)}),$le=w(24,I8),eue=w(103,l8),tue=w(26,l8),nue=w(27,l8),rue=w(108,e=>{J6(e),q6(e)}),iue=w(110,q6),aue=k(F3),oue=w(28,e=>{J6(e),s6(e),aue(e)}),sue=w(29,e=>{Y6(e),$3(e)}),cue=w(30,w8),lue=w(31,e=>{v6(e),e6(e)}),uue=w(32,b6),due=w(33,c6),fue=w(34,l6),pue=w(35,u6),mue=w(36,d6),hue=w(37,f6),gue=w(38,p6),_ue=w(39,m6),vue=w(40,t6),yue=w(41,n6),L8=e=>function(){m8(e._,null)},R8=e=>t=>{_8(e._._,t)},z8=e=>function(t){e._._.ci(t)},B8=e=>function(t){e._.a5?.(t),e._.a3?.(t.id),e._.bx()},V8=e=>function(t){e._.af?.(t)},H8=e=>function(t){e._.a9?.(t)},U8=e=>function(t){e._.ab?.(t)},W8=e=>function(t){e._.ac?.(t)},G8=e=>function(t){e._.ad?.(t)},K8=e=>function(){T8(e._,e._.bb)},q8=e=>function(t){e._.a5?.(t)},J8=e=>function(){e._.a6?.(e._.b8)},Y8=e=>function(){T8(e._,e._.bb)},X8=e=>t=>{a8(e._,t)},Z8=e=>t=>{i8(e._,t)},Q8=e=>function(t){N8(e._,t)},$8=e=>function(t){M8(e._,t===`committed`?null:t)},e5=e=>function(t){y8(e._,t),T8(e._,e._.bb)},t5=e=>async(t,n)=>{n=n.trim();let r=(e.ag||[]).find(e=>e.id===t);r&&n===r.agent&&(n=``),!(r&&(r.title||``)===n)&&(Z6(e,(e.ag||[]).map(e=>e.id===t?{...e,title:n||null}:e)),await fetch(`/api/sessions/${t}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({title:n})}))},n5=e=>async t=>{try{Z6(e,(e.ag||[]).filter(e=>e.id!==t)),e.ah===t&&y8(e,e.ag?.[0]?.id||null),await N(`/api/sessions/${t}`,{method:`DELETE`})}catch(t){m8(e,`Close session failed: ${String(t.message||t)}`),e.cf(!1)}},r5=e=>t=>(t&&(e.ca=!0),(e.cc??=Un(e.cd))()),i5=e=>async()=>{let t=e.ca;if(e.ca=!1,e.b1)try{let n=`/api/workspaces/${e.b1?.id}/sessions`,r=await N(n);!r.length&&t&&e.ag==null&&e.b1?.status===`active`&&(r=await N(n)),!r.length&&t&&e.ag==null&&e.b1?.status===`active`&&(await e.c7(e.a2||`shell`,!1),r=await N(n).catch(()=>e.ag||[])),e.ag!=null&&e.ag?.length===0&&r.length&&(r=await N(n).catch(()=>[])),Z6(e,r);let i=pt(e.b1?.id);i&&r.some(e=>e.id===i)&&y8(e,i),e.ag.some(t=>t.id===e.ah)||y8(e,e.ag?.[0]?.id||null)}catch(t){if(Z6(e,e.ag||[]),Nt(t))return;m8(e,String(t.message||t))}},a5=e=>async(t,n)=>{if(t===e.b8){let r=await e.c7(n,!0);r&&xt(t,r.id);return}try{let r=await N(`/api/workspaces/${t}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})});xt(t,r.id),e.a3?.(t)}catch(t){m8(e,String(t.message||t))}},o5=e=>async(t,n)=>{if(!e.b1)return null;h8(e,!0);try{let r=await N(`/api/workspaces/${e.b1?.id}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:t})});if(n){let t=e.ag||[];Z6(e,t.some(e=>e.id===r.id)?t:t.concat(r)),y8(e,r.id)}return r}catch(t){return m8(e,String(t.message||t)),null}finally{h8(e,!1)}},s5=e=>()=>{if(e.ap){i8(e,!1);return}i8(e,!0),a8(e,+e.ar+1),Lce(e)()},c5=e=>t=>{let n=t.target,r=!!n&&!n.closest(`.xterm`)&&(n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.tagName===`SELECT`||n.isContentEditable);if(t.key===`Escape`&&e.ai!==`term`&&e.ai!==`diff`&&!t.defaultPrevented&&!document.querySelector(`dialog[open]`)&&!(r&&n.tagName!==`SELECT`&&n.value)){t.preventDefault(),e.ai===`new`?e.bx():T8(e,e.bb);return}(t.metaKey||t.ctrlKey)&&t.shiftKey&&t.key.toLowerCase()===`d`&&(t.preventDefault(),e.bm())},l5=e=>()=>{e.ai===`diff`?T8(e,e.bb):e.be()},u5=e=>t=>{t.view===`diff`?(t.scope!==void 0&&M8(e,t.scope??null),e.be(t.pr??void 0,t.file??void 0)):t.view===`manage`?e.bg():t.view===`settings`?e.bi():t.view===`new`?e.t||e.v?.():(t.sessionId&&e.b1&&(y8(e,t.sessionId),xt(e.b1?.id,t.sessionId)),T8(e,e.bb))},d5=e=>(t,n)=>{e.b1&&(j8(e,t||``),t&&f8(e,+e.au+1),P8(e,n||``),n&&p8(e,+e.ay+1),t8(e,!0),T8(e,`diff`))},f5=e=>()=>{A8(e,!0),T8(e,`settings`)},p5=e=>()=>{T8(e,e.ai===`nav`?e.bb:`nav`)},m5=e=>()=>{e.ai===`new`&&T8(e,e.bb)},h5=e=>()=>{e.b1&&(k8(e,!0),T8(e,`manage`))};n(`J15`,L8),n(`J32`,R8),n(`J31`,z8),n(`J30`,B8),n(`J29`,V8),n(`J24`,H8),n(`J26`,U8),n(`J27`,W8),n(`J28`,G8),n(`J25`,K8),n(`J21`,q8),n(`J23`,J8),n(`J22`,Y8),n(`J19`,X8),n(`J18`,Z8),n(`J17`,Q8),n(`J16`,$8),n(`J20`,e5),n(`J12`,t5),n(`J11`,n5),n(`J10`,r5),n(`J9`,i5),n(`J13`,a5),n(`J8`,o5),n(`J5`,s5),n(`J14`,c5),n(`J4`,l5),n(`J7`,u5),n(`J0`,d5),n(`J2`,f5),n(`J3`,p5),n(`J6`,m5),n(`J1`,h5);var g5=`_bF _6 _l`,bue=`_bI _bH`,xue=`_bJ _bH`,Sue=`_bL _bH`,Cue=I,wue=(e=>`/${e}&`)(F);function Tue(e){R(e.a,`M8 6L20 6 M4 6.01L4.01 5.99889 M4 12.01L4.01 11.9989 M4 18.01L4.01 17.9989 M8 12L20 12 M8 18L20 18`)}var Eue=(e,t)=>L(e.a,t),Due=(e,t)=>P(e.a,t),Oue=`_cL _I`,kue=`_cP _J`,Aue=(e=>`<button>${e}<span></span></button><div popover=auto><!><div><span>New session</span><div></div></div></div>`)(Vr),jue=(e=>` D/${e}& l D%b D b m`)(`b%c`),_5=h(0,0,e=>BT(e.a,e._.c)),Mue=p(0,(e=>`<!>${e}<!>`)(yT),(e=>`b/${e}&b`)(`b%c`),e=>{_5._(e),UT(e.a,`_cN`)}),Nue=w(2,e=>{Mue(e,+!e.c),_5(e)}),v5=j(1,e=>Nue(e,Hn(e._._.i,e._._._.a5))),y5=A(40,v5,e=>e._._._),Pue=e=>{y5(e),b5(e)},b5=A(12,v5,e=>e._._),Fue=s(`p4`,e=>_(e.a,`click`,function(){z5(e._._._,e._._.d),B5(e._._._,e._._.h||e._._.i)})),Iue=e=>{S(e.a,[`_cQ`,`_cR`]),KT(e.b),qT(e.b,12),JT(e.b),Fue(e)},x5=A(39,e=>de(e,`c`,e._._.a0,U5(e)),e=>e._._),Lue=s(`p3`,e=>{Se(e,`c`),_(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._._.a2(e._.d)):t.key===`Escape`&&(t.preventDefault(),z5(e._._,null))}),_(e.c,`blur`,function(){e._._.a2(e._.d)}),d(e,{onMount:function(){queueMicrotask(()=>{let t=e.c;t?.focus(),t?.select()})}})}),Rue=e=>{x5(e),S5._(e),C5._(e),Qr(e.b,14),ei(e.b),S(e.c,[`_Z`,kue]),Lue(e)},S5=h(0,0,e=>$r(e.b,dC(e._.c))),C5=h(0,0,e=>S(e.a,[`_A`,De[uC(e._.g)]])),zue=s(`p7`,e=>_(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._.s?.(e.d)})),Bue=e=>{S(e.a,Ne),Qr(e.b),ei(e.b),zue(e)},Vue=w(3,e=>{O(e.a,`title`,`New ${e.d} session`),$r(e.b,e.d)}),Hue=(e,t)=>Vue(e,t[0]),w5=j(2,e=>{S(e.a,[`_cQ`,`_8`,{_s:e._._._.w===e._._.d}]),O(e.a,`title`,e._._._.w===e._._.d?`Close?`:`Close session`)}),T5=A(36,w5,e=>e._._._),Uue=e=>{T5(e),Gue(e),E5(e),Pt(e.b),_t(e.b,14),Jt(e.b)},Wue=s(`p5`,e=>_(e.a,`click`,function(t,n){e._._._.w===e._._.d?(L5(e._._._,null),n.closest(`[popover]`)?.hidePopover(),e._._._.q?.(e._._.d)):(clearTimeout(e._._._.y),L5(e._._._,e._._.d),e._._._.y=$n(()=>{L5(e._._._,null)}))})),Gue=A(37,Wue,e=>e._._._),E5=A(10,w5,e=>e._._),Kue=p(6,`<!><!><!>`,`b%`,Pue),D5=j(9,e=>Kue(e,e._.d===e._._.l?0:1)),O5=A(33,D5,e=>e._._),que=s(`p6`,e=>_(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._.d!==e._._.l&&e._._.p?.(e._.d)})),Jue=e=>{O5(e),k5(e),A5(e),j5._(e),M5._(e),N5._(e),S(e.a,Oue),Qr(e.c,14),ei(e.c),S(e.d,`_cM`),S(e.e,`_cO`),que(e)},Yue=p(7,(e=>`<button title="Rename session">${e}</button>`)(WT),(e=>` D/${e}&l`)(GT),Iue),k5=A(34,e=>Yue(e,+!e._._.n),e=>e._._),Xue=p(8,(e=>`<button>${e}</button>`)($t),(e=>` D/${e}&l`)(bt),Uue),A5=A(35,e=>Xue(e,+!e._._.q),e=>e._._),j5=h(0,1,e=>{$r(e.c,dC(e._.c)),b(e.f,e._.c?.title||dC(e._.c))}),M5=h(0,1,D5),N5=h(0,1,e=>S(e.b,[`_A`,De[uC(e._.g)]])),P5=ue(4,11,3,e=>S(e.a,[`_cK`,{_cJ:e.d===e._.l}])),Zue=e=>{P5._(e),F5._(e)},Que=p(0,(e=>`<span></span>${e}<input aria-label="Session name">`)(Vr),(e=>` b/${e}& b`)(`b%c`),Rue,(e=>`<button><span></span>${e}<span><span> </span><!></span></button><!><!><!>`)(Vr),(e=>` D b/${e}& D D l%m%b%c`)(`b%c`),Jue),F5=ue(4,25,3,e=>Que(e,e._.z===e.d?0:1)),$ue=(e,t)=>ede(e,t[0]),ede=w(2,e=>{nde(e,e.c?.id),rde(e,e.c?.state),ide(e,e.c?.title),ade(e,e.c?.agent),j5(e),S5(e)}),tde=k(E5),nde=w(3,e=>{M5(e),tde(e)}),rde=w(6,e=>{N5(e),C5(e)}),ide=w(7),ade=w(8,k(b5)),ode=(e,t)=>$r(e.b,t),sde=(e,t)=>{cde(e,t?.state),ode(e,t?dC(t):`shell`)},cde=(e,t)=>S(e.c,[`_A`,`_bc`,De[uC(t)]]),I5=j(12,e=>sde(e,e.k.find(t=>t.id===e.l)??null)),lde=m(4,`<div></div>`,` `,Zue,$ue),ude=w(10,e=>{lde(e,[e.k,`id`]),I5(e)}),dde=k(O5),fde=w(11,e=>{I5(e),P5(e),dde(e)}),L5=a(22,k(T5)),pde=(e,t)=>bde(e,t.timer),mde=w(28),R5=j(27,e=>mde(e,W5(e)),2),z5=a(25,e=>{R5(e),F5(e)}),hde=k(x5),B5=a(26,e=>{R5(e),hde(e)}),V5=j(30,e=>O(e.a,`popovertarget`,e.o?e.a3:void 0)),gde=w(29,e=>{O(e.d,`id`,e.a3),V5(e)}),H5=a(31,k(y5)),_de=w(32),vde=s(`p9`,e=>{d(e,{onMount:function(){let t=new AbortController;return zn(t=>{H5(e,t)},t.signal),{abort:t}},onDestroy:function(){this.abort.abort()}}),_(e.d,`toggle`,function(t,n){L5(e,null),t.newState===`open`&&(H5(e,Bn()),e.a6(n),Vn().then(t=>{H5(e,t),requestAnimationFrame(()=>{n.matches(`:popover-open`)&&e.a6(n)})}))})});function yde(e){S(e.a,[g5,`_cH`]),Qr(e.b,16),ei(e.b),S(e.d,[`__`,`_cI`]),S(e.f,`_cS`),S(e.g,`_cT`),S(e.h,`_cU`),L5(e,null),pde(e,{timer:0}),z5(e,null),B5(e,``),gde(e,f(e)),H5(e,null),_de(e,G5(e)),vde(e)}var bde=w(24),xde=k(k5),Sde=w(13,e=>{R5(e),xde(e)}),Cde=s(`p8`,e=>_(e.a,`click`,!e.o&&(t=>{t.preventDefault(),e.l&&e.p?.(e.l)}))),wde=w(14,e=>{O(e.a,`title`,e.o?`Sessions`:`Back to session`),V5(e),Cde(e)}),Tde=m(7,(e=>`<button>${e}</button>`)(Vr),(e=>` D/${e}&l`)(`b%c`),Bue,Hue),Ede=(e,t)=>Tde(e,[[`shell`,...t],e=>e]),Dde=w(15),Ode=w(16,k(A5)),kde=w(18),U5=e=>t=>{B5(e._._,t)},W5=e=>t=>{e.z===t&&(z5(e,null),e.n?.(t,e.a0.trim()))},G5=e=>t=>{let n=e.a.getBoundingClientRect();t.style.top=`${Math.max(8,n.top-t.offsetHeight-8)}px`,t.style.left=`${Math.max(8,Math.min(n.left+n.width/2-t.offsetWidth/2,window.innerWidth-t.offsetWidth-8))}px`};n(`p0`,U5),n(`p1`,W5),n(`p2`,G5);var Ade=I,jde=(e=>`/${e}&`)(F);function Mde(e){R(e.a,`M15 4L8 20`)}var Nde=(e,t)=>L(e.a,t),Pde=(e,t)=>P(e.a,t),Fde=I,Ide=(e=>`/${e}&`)(F);function Lde(e){R(e.a,`M7 12L17 12 M7 8L13 8 M3 20.2895V5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V15C21 16.1046 20.1046 17 19 17H7.96125C7.35368 17 6.77906 17.2762 6.39951 17.7506L4.06852 20.6643C3.71421 21.1072 3 20.8567 3 20.2895Z`)}var Rde=(e,t)=>L(e.a,t),zde=(e,t)=>P(e.a,t),Bde=I,Vde=(e=>`/${e}&`)(F);function Hde(e){R(e.a,`M21 12L3 12M3 12L11.5 3.5M3 12L11.5 20.5`)}var Ude=(e,t)=>L(e.a,t),Wde=(e,t)=>P(e.a,t),Gde=I,Kde=(e=>`/${e}&`)(F);function qde(e){R(e.a,`M3 12L21 12M21 12L12.5 3.5M21 12L12.5 20.5`)}var Jde=(e,t)=>L(e.a,t),Yde=(e,t)=>P(e.a,t),Xde=I,Zde=(e=>`/${e}&`)(F);function Qde(e){R(e.a,`M19 6V11C19 12.1046 18.1046 13 17 13H5 M9 9L5 13L9 17`)}var $de=(e,t)=>L(e.a,t),efe=(e,t)=>P(e.a,t),tfe=I,nfe=(e=>`/${e}&`)(F);function rfe(e){R(e.a,`M4 12H16 M12 8L16 12L12 16 M20 7V17`)}var ife=(e,t)=>L(e.a,t),afe=(e,t)=>P(e.a,t),K5=400,ofe=55,sfe=[[{kind:`paste`},{kind:`key`,label:`Up`,icon:`arrow-up`,seq:`\x1B[A`},{kind:`key`,label:`Tab`,icon:`tab`,seq:` `}],[{kind:`key`,label:`Left`,icon:`arrow-left`,seq:`\x1B[D`},{kind:`key`,label:`Enter`,icon:`enter`,seq:`\r`},{kind:`key`,label:`Right`,icon:`arrow-right`,seq:`\x1B[C`}],[{kind:`esc`},{kind:`key`,label:`Down`,icon:`arrow-down`,seq:`\x1B[B`},{kind:`key`,label:`^C`,icon:``,seq:``}]],cfe=p(0,$e,(e=>`/${e}&`)(ke),e=>{tn(e.a),ht(e.a,18),rn(e.a)},Dt,(e=>`/${e}&`)(ft),e=>{Ut(e.a),It(e.a,18),Yt(e.a)},Bde,(e=>`/${e}&`)(Vde),e=>{Hde(e.a),Ude(e.a,18),Wde(e.a)},Gde,(e=>`/${e}&`)(Kde),e=>{qde(e.a),Jde(e.a,18),Yde(e.a)},Xde,(e=>`/${e}&`)(Zde),e=>{Qde(e.a),$de(e.a,18),efe(e.a)},tfe,(e=>`/${e}&`)(nfe),e=>{rfe(e.a),ife(e.a,18),afe(e.a)},` `,` `,A(8,e=>b(e.a,e._._.f),e=>e._._)),lfe=h(0,2,e=>{S(e.a,[xue,{_bK:e._.e===`enter`}]),cfe(e,e._.e===`arrow-up`?0:e._.e===`arrow-down`?1:e._.e===`arrow-left`?2:e._.e===`arrow-right`?3:e._.e===`enter`?4:e._.e===`tab`?5:6)}),ufe=s(`q8`,e=>{_(e.a,`pointerdown`,function(t){t.preventDefault(),e._._._._.a7(e._.g)}),_(e.a,`pointerup`,function(){e._._._._.a5()}),_(e.a,`pointercancel`,function(){e._._._._.a5()}),_(e.a,`pointerleave`,function(){e._._._._.a5()}),_(e.a,`contextmenu`,function(e){e.preventDefault()})}),dfe=e=>{lfe._(e),ffe._(e),ufe(e)},ffe=h(0,2,e=>{O(e.a,`title`,e._.f),O(e.a,`aria-label`,e._.f)}),pfe=s(`q7`,e=>{_(e.a,`pointerdown`,function(e){e.preventDefault()}),_(e.a,`click`,function(){e._._._._.v?.send(`\x1B`)})}),mfe=e=>{S(e.a,Sue),pfe(e)},hfe=s(`q6`,e=>{_(e.a,`pointerdown`,function(e){e.preventDefault()}),_(e.a,`click`,function(){e._._._._.v?.paste()})}),gfe=p(0,(e=>`<button title=Paste>${e}</button>`)(yj),(e=>` D/${e}&l`)(bj),e=>{S(e.a,bue),xj(e.b),Sj(e.b,16),Cj(e.b),hfe(e)},`<button title=Escape>esc</button>`,` `,mfe,`<button></button>`,` `,dfe),_fe=(e,t)=>gfe(e,t===`paste`?0:t===`esc`?1:2),vfe=(e,t)=>{_fe(e,t[0]?.kind),yfe(e,t[0]?.icon),bfe(e,t[0]?.label),xfe(e,t[0]?.seq)},yfe=w(4),bfe=w(5),xfe=w(6),Sfe=m(0,`<!><!><!>`,`b%`,0,vfe),Cfe=(e,t)=>Sfe(e,[t,(e,t)=>String(t)]),wfe=(e,t)=>Cfe(e,t[0]),Tfe=t(2,`Ac`),q5=A(49,e=>{M4(e.a,x7(e)),L4(e.a,b7(e)),R4(e.a,y7(e))},e=>e._._),Efe=e=>{o(e,0,Dfe),q5(e),J5(e),Y5(e),P4(e.a),B4(e.a,`keybar`)},J5=A(50,e=>j4(e.a,e._._.y),e=>e._._),Y5=A(51,e=>z4(e.a,e._._.z),e=>e._._),Dfe=u(`q5`,w(2)),X5=A(47,e=>b(e.c,e._._.q),e=>e._._),Ofe=e=>{X5(e),S(e.a,`_bC`),S(e.b,`_bD`)},Z5=A(39,e=>ude(e.a,e._._.i),e=>e._._),kfe=e=>{Z5(e),Q5(e),$5(e),Afe(e),jfe(e),e7(e),t7(e),n7(e),yde(e.a)},Q5=A(41,e=>fde(e.a,e._._.k??null),e=>e._._),$5=A(42,e=>Ede(e.a,e._._.l??[]),e=>e._._),Afe=A(43,e=>kde(e.a,e._._.m),e=>e._._),jfe=A(44,e=>Dde(e.a,e._._.n),e=>e._._),e7=A(45,e=>Ode(e.a,e._._.o),e=>e._._),t7=A(46,e=>Sde(e.a,e._._.p),e=>e._._),n7=A(48,e=>wde(e.a,e._._.t),e=>e._._),r7=j(4,e=>{O(e.a,`href`,e._._.d===`manage`?`/w/${e._._.h}`:`/w/${e._._.h}/manage`),O(e.c,`href`,e._._.d===`diff`?`/w/${e._._.h}`:`/w/${e._._.h}/review`)}),i7=A(37,e=>{S(e.a,[g5,{_bE:e._._.d===`manage`}]),O(e.a,`title`,e._._.d===`manage`?`Back to terminal`:`Manage workspace`),O(e.a,`aria-current`,e._._.d===`manage`?`page`:void 0),S(e.c,[g5,{_bE:e._._.d===`diff`}]),O(e.c,`title`,e._._.d===`diff`?`Back to terminal`:`Review changes`),O(e.c,`aria-current`,e._._.d===`diff`?`page`:void 0),r7(e)},e=>e._._),Mfe=e=>{i7(e),a7(e),gT(e.b),_T(e.b,16),vT(e.b),SC(e.d),CC(e.d,16),wC(e.d)},a7=A(38,r7,e=>e._._),o7=j(17,e=>O(e.l,`title`,e._.a2?`Close find`:e._.a1?e._.d===`diff`?`Find in review`:`Find in terminal`:`Find unavailable on this page`),2),s7=h(0,0,e=>{S(e.e,[g5,{_bE:e._.d===`nav`}]),O(e.e,`aria-pressed`,e._.d===`nav`?`true`:`false`),o7(e)}),Nfe=m(15,`<!><!><!>`,`b%`,0,wfe),Pfe=s(`q10`,e=>{_(e.e,`click`,function(){e._.g?.()}),_(e.l,`click`,function(){e._.v?e._.v?.findOpen?e._.v.closeFind():(e._.v.openFind(),Tfe(e)()):e._.d===`diff`&&e._.r?.()}),_(e.n,`pointerdown`,function(e){e.preventDefault()}),_(e.n,`click`,function(){e._.v?.setKeyboard(!e._.v?.keyboard)}),_(e.p,`pointerdown`,function(e){e.preventDefault()}),_(e.p,`toggle`,function(t,n){t.newState===`open`&&requestAnimationFrame(()=>{let t=e.j?.getBoundingClientRect();t&&(n.style.bottom=`auto`,n.style.right=`0.5rem`,n.style.left=`auto`,n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`)})})}),Ffe=e=>{s7._(e),l7._(e),u7._(e),d7._(e),f7._(e),p7._(e),m7._(e),h7._(e),Bfe._(e),Hfe._(e),S(e.a,`_bx`),S(e.b,`_by`),Tue(e.f),Eue(e.f,16),Due(e.f),S(e.h,`_bB`),S(e.j,g5),Mde(e.k),Nde(e.k,16),Pde(e.k),Me(e.m),tt(e.m,16),en(e.m),Lde(e.o),Rde(e.o,16),zde(e.o),S(e.p,`_bG`),Nfe(e,[sfe,(e,t)=>String(t)]),Pfe(e)},Ife=p(6,((e,t)=>`<a>${e}</a><a>${t}</a>`)(mT,bC),((e,t)=>` D/${e}&l D/${t}&l`)(hT,xC),Mfe),Lfe=p(7,Aue,(e=>`/${e}&`)(jue),kfe),c7=j(16,e=>Lfe(e,e._.h&&e._.j?0:1)),l7=h(0,0,e=>{Ife(e,+!e._.h),c7(e)}),u7=h(0,0,c7),Rfe=p(8,`<span aria-hidden=true><span> </span></span>`,` D D `,Ofe),d7=h(0,0,e=>Rfe(e,+!e._.q)),zfe=p(2,b4,(e=>`0${e}&`)(x4),Efe),f7=h(0,0,e=>{O(e.j,`title`,e._.v?`More keys`:`Keys unavailable on this page`),O(e.j,`disabled`,!e._.v),O(e.n,`title`,e._.v?e._.v?.keyboard?`Hide keyboard`:`Show keyboard`:`Keyboard unavailable on this page`),O(e.n,`disabled`,!e._.v),zfe(e,+!e._.v)}),p7=h(0,0,e=>S(e.n,[g5,{_bE:!!e._.a0}])),m7=h(0,0,e=>{O(e.l,`disabled`,!e._.a1),o7(e)}),h7=h(0,0,e=>{S(e.d,[`_bz`,{_bA:e._.a2}]),S(e.l,[g5,{_bE:e._.a2}]),O(e.l,`aria-pressed`,e._.a2?`true`:`false`),o7(e)}),Bfe=h(0,0,e=>{O(e.j,`aria-controls`,e._.a8),O(e.p,`id`,e._.a8)}),Vfe=s(`q9`,e=>{_(e.j,`pointerdown`,function(t){t.preventDefault(),e._.aa=!!e.p?.matches(`:popover-open`)}),_(e.j,`click`,function(){let t=e.p;t&&(e._.aa?t.hidePopover():t.showPopover())})}),Hfe=h(0,0,Vfe),Ufe=p(0,((e,t,n,r)=>`<div><div><!><div><button title=Workspaces>${e}</button><!><div></div><!><button aria-haspopup=dialog>${t}</button><button>${n}</button><button>${r}</button></div><div popover=auto></div></div></div>`)(Cue,Ade,Ae,Fde),((e,t,n,r)=>` D D%b D D/${e}&l%b b%b D/${t}&l D/${n}&l D/${r}&m m`)(wue,jde,Ke,Ide),Ffe),Wfe=a(18,e=>Ufe(e,+!e.s));s(`q11`,e=>Wfe(e,Ye()));var Gfe=w(27,m7),g7=j(22,e=>Gfe(e,!!e.v||e.d===`diff`)),Kfe=w(28,h7),_7=j(23,e=>Kfe(e,e.v?e.v?.findOpen:e.d===`diff`&&!!e.f),2),qfe=w(33),Jfe=j(32,e=>qfe(e,S7(e)),2),Yfe=k(q5),Xfe=w(21,e=>{tpe(e,e.v?.findOpen),npe(e,e.v?.findTick),rpe(e,e.v?.keyboard),g7(e),_7(e),Jfe(e),f7(e),Yfe(e)}),v7=j(20,e=>Xfe(e,e.t?e.e??null:null)),Zfe=k(n7),Qfe=w(19,e=>{v7(e),Zfe(e)}),$fe=k(i7),epe=w(3,e=>{Qfe(e,e.d==null||e.d===`term`),g7(e),_7(e),s7(e),$fe(e)}),tpe=w(24,k(J5)),npe=w(25,k(Y5)),rpe=w(26,p7),ipe=w(4,v7),ape=w(5,_7),ope=k(a7),spe=w(7,e=>{l7(e),ope(e)}),cpe=k(Z5),lpe=w(8,e=>{upe(e,e.i?.length),cpe(e)}),upe=w(9,u7),dpe=w(10,k(Q5)),fpe=w(11,k($5)),ppe=w(14,k(e7)),mpe=w(15,k(t7)),hpe=k(X5),gpe=w(16,e=>{d7(e),hpe(e)}),y7=e=>function(){e._._.v.closeFind()},b7=e=>function(t,n){e._._.v.runFind(t,n)},x7=e=>function(t){t||e._._.v.closeFind()},S7=e=>t=>{e.a5(),e.v?.send(t);let n={};n.delay=setTimeout(()=>{n.repeat=setInterval(()=>e.v?.send(t),ofe)},K5),e.a4=n};n(`q4`,y7),n(`q3`,b7),n(`q2`,x7),n(`q1`,S7),n(`q0`,e=>()=>{let t=e.a4;t&&(clearTimeout(t.delay),clearInterval(t.repeat),e.a4=null)});var C7={name:``,accent:``},_pe=6,w7=A(101,e=>b(e.a,e._._.at),e=>e._._),vpe=we(`c39`,` `,` `,w7),ype=e=>{Gt(e.a),lt(e.a,vpe(e)),Rt(e.a,C9(e)),ot(e.a),Te(e.a),St(e.a),Zt(e.a),mt(e.a),Xe(e.a,{})},T7=h(3,0,e=>{rx(e.b,e._.a5?e._.a5?.preferredAgent:`shell`),Qx(e.b,e._.a5?e._.a5?.agents:[]),Hx(e.b,e._.a5?e._.a5?.instance:C7),Ux(e.b,E9(e)),ax(e.b,T9(e)),ex(e.b,w9(e))}),bpe=s(`c40`,e=>_(e.d,`click`,function(){ut(!0),v9(e._,!1)})),xpe=e=>{T7._(e),E7._(e),S(e.a,`_j`),Tb(e.b),Zb(e.b,D9(e)),Yx(e.b),Xx(e.b),S(e.c,`_k`),S(e.d,`_q`),bpe(e)},E7=h(3,0,e=>Tv(e.b,e._.ap)),D7=j(7,e=>jle(e.b,e._.h===e._._.x||!e._._.x?e._._.y:void 0),2),O7=j(8,e=>Sle(e.b,e._.h===e._._.x?e._._.z??null:null),2),k7=j(9,e=>Ile(e.b,e._.h===e._._.x?e._._.a0??null:null),2),A7=j(10,e=>Lle(e.b,e._.h===e._._.x?e._._.a1??null:null),2),j7=j(11,e=>Rle(e.b,e._.h===e._._.x?e._._.a2??null:null),2),Spe=A(87,e=>{D7(e),O7(e),k7(e),A7(e),j7(e)},e=>e._._),Cpe=e=>{Spe(e),wpe(e),Tpe(e),Epe(e),Dpe(e),Ope(e),P7(e),F7(e),I7(e),R7(e),B7(e),V7(e),H7(e),U7(e),W7(e),G7(e),K7._(e),J7._(e),Y7._(e),S(e.a,`_i`),ble(e.b),$le(e.b,j9(e)),hue(e.b,A9(e)),Xle(e.b,k9(e)),Yle(e.b,O9(e))},wpe=A(88,D7,e=>e._._),Tpe=A(89,O7,e=>e._._),Epe=A(90,k7,e=>e._._),Dpe=A(91,A7,e=>e._._),Ope=A(92,j7,e=>e._._),M7=j(2,e=>{lue(e.b,N9(e)),uue(e.b,M9(e))}),N7=j(3,e=>yue(e.b,P9(e))),P7=A(93,e=>{vue(e.b,e._._.a3),M7(e),N7(e)},e=>e._._),F7=A(94,e=>Wle(e.b,e._._.a4),e=>e._._),I7=A(95,e=>{oue(e.b,e._._.a5?e._._.a5?.preferredAgent:`shell`),due(e.b,e._._.a5?e._._.a5?.agents:[]),fue(e.b,e._._.a5?e._._.a5?.instance:C7),pue(e.b,L9(e)),gue(e.b,I9(e)),_ue(e.b,F9(e))},e=>e._._),L7=j(4,e=>Jle(e.b,e._._.ag&&e._.i)),R7=A(97,L7,e=>e._._),z7=j(5,e=>tue(e.b,e._.i?e._._.ak:null)),B7=A(98,z7,e=>e._._),V7=A(99,e=>nue(e.b,e._._.al),e=>e._._),H7=A(100,e=>mue(e.b,e._._.ap),e=>e._._),U7=A(102,e=>Qle(e.b,e._._.au),e=>e._._),W7=A(103,M7,e=>e._._),G7=A(104,e=>{sue(e.b,R9(e)),N7(e)},e=>e._._),K7=h(0,0,e=>Fle(e.b,e._.e)),q7=j(6,e=>Zle(e.b,z9(e))),J7=h(0,0,e=>{D7(e),O7(e),k7(e),A7(e),j7(e),q7(e)}),Y7=h(0,0,e=>{O(e.a,`inert`,!e._.i),qle(e.b,e._.i),L7(e),q7(e),z7(e)}),kpe=w(8,Y7),X7=j(5,e=>kpe(e,!e.e||e.e?.id===e._.ab)),Ape=p(0,(e=>`<div>${e}</div>`)(rce),(e=>` D/${e}&l`)(ice),Cpe),Z7=j(6,e=>Ape(e,e.e||!e.c?0:1)),jpe=w(4,e=>{Npe(e,e.e?.id),X7(e),Z7(e),K7(e)}),Q7=j(3,e=>jpe(e,e.c?e._.a3.find(t=>t.id===e.c)??null:null)),$7=i(6,Q7),Mpe=e=>{$7._(e),e9._(e)},e9=i(6,X7),Npe=w(7,J7),Ppe=w(2,e=>{Q7(e),Z7(e)}),Fpe=(e,t)=>Ppe(e,t[0]),Ipe=s(`c41`,e=>d(e,{onMount:function(){let t=new AbortController,n=t.signal,r=e=>{let t=e instanceof Error?e:Error(String(e)),n=(t.stack||``).split(`
82
+ `)},h=e=>{i=e;let t=p(e.row);o=t.trim()?{text:t,col:e.col,row:e.row}:null,g(e)},g=t=>{let n=e.buffer.active.viewportY;(t.row<n||t.row>=n+e.rows)&&e.scrollToLine(Math.max(0,t.row-Math.floor(e.rows/2))),e.select(t.col,t.row,t.len),c=t},_=t=>{let n=Q2(e,r);if(!n.length)return i=null,d(),t<0?`up`:t>0?`down`:null;let a=i,s=a?n.findIndex(e=>e.row===a.row&&e.col===a.col&&(!o||p(e.row)===o.text)):-1;if(t===0)s=n.length-1;else if(s<0)s=t>0?0:n.length-1;else if(t>0){if(s>=n.length-1)return`down`;s+=1}else{if(s<=0)return`up`;--s}return h(n[s]),null},v=(e,t)=>H2(l(),e,t),y=()=>{if(!o)return-1;let t=e.buffer.active.viewportY,n=-1;for(let r=0;r<e.rows;r++){let e=t+r;p(e)===o.text&&(n<0||Math.abs(e-o.row)<Math.abs(n-o.row))&&(n=e)}return n},b=()=>{if(!o)return!1;let t=y();if(t<0)return!1;let n=Q2(e,r).find(e=>e.row===t&&e.col===o?.col);return n?(i=n,g(n),!0):!1},ee=t=>{let n=Q2(e,r);if(!n.length)return!1;let i=y(),a=i<0?n:n.filter(e=>t<0?e.row<i||e.row===i&&e.col<o.col:e.row>i||e.row===i&&e.col>o.col);return a.length?(h(t<0?a[a.length-1]:a[0]),!0):!1},x=()=>{a?.cancel(),a=null},te=(t,n)=>{let r=0,i=0,o=()=>{x(),n()},s=e.onWriteParsed(()=>{m()!==t&&(i||=setTimeout(o,t4),r&&clearTimeout(r),r=setTimeout(o,$2))}),c=setTimeout(o,e4);a={cancel(){s.dispose(),r&&clearTimeout(r),i&&clearTimeout(i),clearTimeout(c)}}},ne=(e,t,n,i)=>{if(r!==i){s=!1;return}if(t<=0){s=!1,b(),f();return}let a=m(),o=Math.min(n,t);v(e===1?-1:1,o),te(a,()=>{if(r!==i){s=!1;return}if(m()===a){s=!1,b(),f();return}ne(e,t-o,n,i)})},re=(t,n,i,a)=>{if(n){ne(t,n,i,a);return}if(!b()){let n=Q2(e,r);n.length&&h(t<0?n[0]:n[n.length-1])}s=!1,f()},S=(t,n,i,a=0)=>{if(r!==i){s=!1;return}let o=Math.max(1,Math.floor(e.rows/n4));if(n<=0){re(t,a,o,i);return}s=!0;let c=m();v(t,o),te(c,()=>{try{if(r!==i){s=!1;return}if(m()===c){re(t,a,o,i);return}if(ee(t)){s=!1,f();return}f(),S(t,n-1,i,a+o)}catch(e){throw s=!1,e}})};return{search(e,t){if(s&&t!==0&&e===r)return;s=!1,x(),e!==r&&(i=null,o=null),r=e;let n=_(t);n&&t!==0&&(i=null,d()),f(),!(!n||t===0)&&S(n===`up`?-1:1,r4,e)},refresh(){f()},clear(){x(),r=``,i=null,o=null,s=!1,d(),f()},dispose(){x(),d(),n.remove()}}}var a4=2,o4=[`#2e3436`,`#cc0000`,`#4e9a06`,`#c4a000`,`#3465a4`,`#75507b`,`#06989a`,`#d3d7cf`,`#555753`,`#ef2929`,`#8ae234`,`#fce94f`,`#729fcf`,`#ad7fa8`,`#34e2e2`,`#eeeeec`];function s4(e){return e?.background||`#000000`}function c4(e,t){if(t<0||t>255)return s4(e);let n=[e?.black,e?.red,e?.green,e?.yellow,e?.blue,e?.magenta,e?.cyan,e?.white,e?.brightBlack,e?.brightRed,e?.brightGreen,e?.brightYellow,e?.brightBlue,e?.brightMagenta,e?.brightCyan,e?.brightWhite][t];if(n)return n;if(t<16)return o4[t];if(t<232){let e=t-16,n=Math.floor(e/36),r=Math.floor(e%36/6),i=e%6,a=e=>e===0?0:55+e*40;return`rgb(${a(n)},${a(r)},${a(i)})`}let r=8+(t-232)*10;return`rgb(${r},${r},${r})`}function l4(e,t){let n=e.options.theme;if(t.isBgDefault())return s4(n);if(t.isBgRGB()){let e=t.getBgColor();return`rgb(${e>>16&255},${e>>8&255},${e&255})`}return t.isBgPalette()?c4(n,t.getBgColor()):s4(n)}function u4(e){let t=e.buffer.active,n=t.getNullCell(),r=t.viewportY,i=Math.min(t.length-1,r+Math.max(0,e.rows-1)),a=Math.max(0,e.cols-1),o=[[0,r],[a,r],[0,i],[a,i],[Math.floor(a/2),r+Math.floor((i-r)/2)]],s=new Map;for(let[r,i]of o){if(!t.getLine(i)?.getCell(r,n))continue;let a=l4(e,n);s.set(a,(s.get(a)||0)+1)}let c=s4(e.options.theme),l=0;for(let[e,t]of s)t>l&&(c=e,l=t);return c}function d4(e){let t=e._core?._renderService?.dimensions?.css?.cell;return!t?.width||!t?.height?null:{w:t.width,h:t.height}}function f4(e){try{let t=e._core;if(!t)return;let n=t._viewport||t.viewport;return n?n._scrollableElement||n.scrollableElement:void 0}catch{return}}function p4(e){try{let t=e.options.overviewRuler;(!t||t.width!==0)&&(e.options.overviewRuler={...t||{},width:0}),f4(e)?.updateOptions?.({vertical:a4,verticalScrollbarSize:0})}catch{}}function m4(e){return p4(e),{dispose(){}}}function h4(e,t){p4(e);let n=t.proposeDimensions();if(!(!n||!(n.cols>=2)||!(n.rows>=1))&&(e.cols!==n.cols||e.rows!==n.rows)){try{e._core?._renderService?.clear?.()}catch{}e.resize(n.cols,n.rows)}}function g4(e,t){let n=d4(e);if(!n)return 0;let r=Math.max(0,e.rows*n.h-t),i=e.buffer.active,a=i.cursorY;for(let t=e.rows-1;t>a;t--)if(i.getLine(t)?.translateToString(!0).trim()){a=t;break}let o=(a+1)*n.h-t,s=Math.ceil(Math.max(0,o)/n.h)*n.h;return Math.round(Math.min(r,s))}function _4(e,t){let n=e.element;if(!n)return;let r=t?`${t}`:``;n.dataset.shift!==r&&(n.dataset.shift=r,n.style.transform=t?`translateY(${-t}px)`:``)}function v4(e,t){let n=e.element;if(!n)return;let r=u4(e);if(n.dataset.shellBg===r&&(!t||t.dataset.shellBg===r))return;n.dataset.shellBg=r,n.style.backgroundColor=r,t&&(t.dataset.shellBg=r,t.style.backgroundColor=r);let i=n.querySelector(`.xterm-viewport`);i&&(i.style.backgroundColor=r);let a=n.querySelector(`.xterm-scrollable-element`);a&&(a.style.backgroundColor=r)}function y4(e,t){let n=0,r=()=>{n||=requestAnimationFrame(()=>{n=0,v4(e,t())})};v4(e,t());let i=e.onWriteParsed(r);return{dispose(){cancelAnimationFrame(n),i.dispose()}}}var b4=((e,t,n)=>`<div><div><input type=search enterkeyhint=search autocomplete=off placeholder="Find in terminal" aria-label="Find in terminal"><button type=button title="Previous match">${e}</button><button type=button title="Next match">${t}</button><button type=button title="Close find">${n}</button></div></div>`)($e,Dt,$t),x4=((e,t,n)=>` D D b D/${e}&l D/${t}&l D/${n}&n`)(ke,ft,bt),S4=(e,t)=>{O(e.d,`disabled`,!t),O(e.f,`disabled`,!t)},C4=j(36,e=>S4(e,e.a9&&e.s)),w4=s(`E6`,e=>{e.w=!!e.s,e.y=e.u}),T4=j(26,w4,3),qoe=s(`E5`,e=>d(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(!e.w)return;if(t.key===`Escape`){if(document.querySelector(`dialog[open]`))return;t.preventDefault(),t.stopPropagation(),e.a6();return}let n=t.metaKey||t.ctrlKey;if(t.key===`F3`||n&&t.key.toLowerCase()===`g`){t.preventDefault(),t.stopPropagation(),e.a4(t.shiftKey?-1:1);return}if(!(n||t.altKey)){if(t.key===`Enter`){if(document.activeElement!==e.c)return;t.preventDefault(),t.stopPropagation(),e.a4(t.shiftKey?-1:1);return}if(t.key===`ArrowDown`){if(!e.y.trim())return;t.preventDefault(),t.stopPropagation(),e.a4(1);return}if(t.key===`ArrowUp`){if(!e.y.trim())return;t.preventDefault(),t.stopPropagation(),e.a4(-1)}}},{capture:!0,signal:t.signal}),e.a2=e.q,e.a3=!!e.s,e.s&&e.a7(),{abort:t}},onUpdate:function(){e.q!==e.a2&&(e.a2=e.q,e.s&&(e.a7(),e.c?.select())),e.s&&!e.a3?(e.a3=!0,e.a7()):e.s||(e.a3=!1)},onDestroy:function(){if(this.abort.abort(),e.w){let t=e.p;t&&t()}}})),E4=j(34,qoe,9),D4=j(39,e=>S(e.a,[`_el`,e.ac?`_en`:`_em`,!e.s&&`_ep`])),O4=j(31,e=>de(e,`c`,e.u,V4(e)),3),k4=c(18,e=>{O(e.a,`aria-hidden`,e.s?`false`:`true`),O(e.c,`tabindex`,e.s?0:-1),O(e.d,`tabindex`,e.s?0:-1),O(e.f,`tabindex`,e.s?0:-1),O(e.h,`tabindex`,e.s?0:-1),C4(e),T4(e),E4(e),D4(e),O4(e)}),A4=j(13,e=>k4(e,e.l,e.m)),j4=w(11,A4),M4=w(12,A4),Joe=w(35,C4),N4=a(20,e=>{Joe(e,!!e.u.trim()),T4(e),O4(e)}),Yoe=(e,t)=>{tse(e,t.open),nse(e,t.query)},Xoe=(e,t)=>{rse(e,t.tick),ise(e,t.wasOpen)},Zoe=w(33,e=>{ee(e,e.a7),E4(e)}),Qoe=s(`E4`,e=>{Se(e,`c`),_(e.c,`keydown`,function(t){if(e.s){if(t.key===`Escape`){t.preventDefault(),t.stopPropagation(),e.a6();return}t.stopPropagation()}}),_(e.d,`mousedown`,function(e){e.preventDefault()}),_(e.d,`click`,function(){e.a4(-1)}),_(e.f,`mousedown`,function(e){e.preventDefault()}),_(e.f,`click`,function(){e.a4(1)}),_(e.h,`mousedown`,function(e){e.preventDefault()}),_(e.h,`click`,function(){e.a6()})});function P4(e){tn(e.e),ht(e.e,14),rn(e.e),Ut(e.g),It(e.g,14),Yt(e.g),Pt(e.i),_t(e.i,14),Jt(e.i),N4(e,``),Yoe(e,{open:!1,query:``}),Xoe(e,{tick:0,wasOpen:!1}),Zoe(e,H4(e)),Qoe(e)}var $oe=w(30,e=>{E4(e),O4(e)}),F4=j(25,e=>$oe(e,U4(e)),2),ese=w(32,E4),I4=j(23,e=>ese(e,W4(e))),tse=w(22,e=>{F4(e),I4(e),T4(e),E4(e)}),nse=w(24,e=>{F4(e),T4(e),E4(e),O4(e)}),rse=w(28,E4),ise=w(29,E4),L4=w(14,F4),R4=w(15,e=>{I4(e),E4(e)}),z4=w(16,E4),ase=w(38,e=>{S(e.b,[`_eg`,e.ac?`_eo`:`_ei`]),S(e.c,[Kt,e.ac&&`_eq`]),S(e.d,[zt,e.ac&&`_er`]),S(e.f,[zt,e.ac&&`_er`]),S(e.h,[zt,e.ac&&`_er`]),D4(e)}),B4=(e,t)=>ase(e,t===`keybar`),V4=e=>function(t){e.s&&(N4(e,t),e.y=t,e.a4(0))},H4=e=>()=>{let t=e.c;t&&(t.focus(),document.activeElement!==t&&setTimeout(()=>t.focus(),0))},U4=e=>t=>{if(!e.w)return;let n=e.o;n&&n(e.y,t)},W4=e=>()=>{k4(e,!1),e.w=!1;let t=e.p;t&&t()};n(`E1`,V4),n(`E0`,H4),n(`E2`,U4),n(`E3`,W4);var ose=`<div><div></div><!><!><!><!><!></div>`,sse=` D b%b%b%b%b%l`,G4=3e4,cse=e=>S(e.a,`_e3`),lse=e=>S(e.a,`_e4`),K4=h(2,0,e=>j4(e.a,e._.z)),use=e=>{K4._(e),q4._(e),dse._(e),J4._(e),P4(e.a),M4(e.a,b3(e)),B4(e.a,`overlay`)},q4=h(2,0,e=>z4(e.a,e._.a1)),dse=h(2,0,e=>L4(e.a,x3(e))),J4=h(2,0,e=>R4(e.a,S3(e))),fse=s(`F16`,e=>{e._.y&&setTimeout(()=>e.d?.focus(),50)}),Y4=h(6,0,fse),pse=s(`F17`,e=>{_(e.a,`click`,function(){d3(e._,!1)}),_(e.b,`click`,function(e){e.stopPropagation()}),_(e.d,`paste`,function(t){t.preventDefault(),e._.aq(t.clipboardData)}),_(e.e,`click`,function(){d3(e._,!1)})}),mse=e=>{Y4._(e),S(e.a,`_e5`),S(e.b,`_e6`),S(e.c,`_e7`),S(e.e,`_q`),pse(e)},hse=s(`F14`,e=>_(e.a,`click`,function(){e._._.p?.(e._._.q)})),gse=p(6,`<button>Close session</button>`,` `,e=>{S(e.a,`_q`),hse(e)}),X4=j(7,e=>gse(e,e._.t===`exited`&&e._.p?0:1)),Z4=h(5,0,X4),_se=e=>{Z4._(e),Q4._(e),yse._(e),S(e.a,`_eZ`),S(e.b,`_e0`),S(e.d,`_e1`),S(e.e,[`_q`,`_r`])},Q4=h(5,0,e=>{b(e.c,e._.t===`exited`?`This session ended.`:`Connection lost.`),b(e.f,e._.t===`exited`?`Restart`:`Reconnect`),X4(e)}),vse=s(`F15`,e=>_(e.e,`click`,function(){t3(e._,!1),e._.t===`exited`?e._.a3?.respawn():e._.a3?.reconnect()})),yse=h(5,0,vse),$4=le(`F13`,1),bse=p(5,`<div><p> </p><div><button> </button><!></div></div>`,` D D l D D l%`,_se),xse=s(`F18`,e=>d(e,{onMount:function(){let t=new AbortController,n=t.signal,r=new LZ({fontSize:13,fontFamily:`ui-monospace, monospace`,scrollback:0,overviewRuler:{width:0},allowProposedApi:!0,rightClickSelectsWord:!0,macOptionClickForcesSelection:!0,theme:{selectionBackground:`#ffb000`,selectionInactiveBackground:`#ffb000`,selectionForeground:`#000000`},linkHandler:{activate(e,t){Fe(t)}}}),i=new U0;r.loadAddon(i),r.open(e.b);let a=Ye();try{let e=new B0;e.onContextLoss(()=>e.dispose()),r.loadAddon(e)}catch{}try{r.loadAddon(new D2(void 0,{readText:()=>navigator.clipboard.readText().catch(()=>``),writeText:(e,t)=>Ht(t).then(()=>{})}))}catch{}r.loadAddon(new F2((e,t)=>Fe(t)));let o=i4(r,e.b);e.a8=o;let s=r.onScroll(()=>e.ab()),c=r.onWriteParsed(()=>e.ab());e.b.addEventListener(`wheel`,()=>e.ab(),{passive:!0,signal:n}),h4(r,i);let l=m4(r),u=y4(r,$4(e));n.addEventListener(`abort`,()=>{s.dispose(),c.dispose(),l.dispose(),u.dispose(),e.ad(),o.dispose(),e.a8=null});let d=a?W2(r):null,f=d?d.write:e=>r.write(e),p=z2({sessionId:e.q,term:r,write:f,onDead:t=>{n3(e,t),t3(e,!0)},isVisible:()=>!!e.o},n),m={on:!1},h=e=>e.startsWith(`\x1B[<`)||e.startsWith(`\x1B[M`)||e.startsWith(`\x1B[>`);r.onData(e=>{m.on&&!h(e)||p.send(e)}),r.attachCustomKeyEventHandler(t=>m.on?!1:t.key===`Enter`&&t.shiftKey?(t.type===`keydown`&&p.send(`\x1B\r`),!1):(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&r.hasSelection()?(t.type===`keydown`&&Ht(r.getSelection()).then(t=>{t&&(r.clearSelection(),e.am())}),!1):t.metaKey&&!t.ctrlKey&&!t.altKey&&(t.key===`ArrowLeft`||t.key===`ArrowRight`)?(t.preventDefault(),t.type===`keydown`&&e.a3?.send(t.key===`ArrowLeft`?``:``),!1):t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey&&t.key===`Backspace`?(t.preventDefault(),t.type===`keydown`&&e.a3?.send(``),!1):!((t.ctrlKey||t.metaKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===`f`||a&&t.type===`keydown`&&t.key===`Backspace`));let g=0,_=!1,v=()=>{if(!e.b.clientWidth)return;let t=e.b.clientHeight;if(a&&t>0){if(xn()){g=t,_4(r,g4(r,t));return}g=0,_4(r,0)}let n=r.cols,o=r.rows;h4(r,i),_=!0,e.o&&p.connect(),(r.cols!==n||r.rows!==o)&&p.resize(r.cols,r.rows),oee(r.cols,r.rows),v4(r,e.b),e.ab()},y=new ResizeObserver(()=>v());y.observe(e.b),n.addEventListener(`abort`,()=>y.disconnect());let b=r.onCursorMove(()=>{g&&_4(r,g4(r,g))});n.addEventListener(`abort`,()=>b.dispose());let ee=()=>{e.r||(p.resize(r.cols,r.rows),requestAnimationFrame(v))};if(Cn(ee,n),window.addEventListener(`focus`,()=>{e.o&&p.claim()},{signal:n}),window.addEventListener(`keydown`,t=>{e.o&&(e.j==null||e.j===`term`)&&(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===`f`&&(t.preventDefault(),t.stopPropagation(),e.af())},{capture:!0,signal:n}),e.b.addEventListener(`paste`,t=>{let n=[...t.clipboardData?.files||[]];if(n.length){t.preventDefault(),t.stopImmediatePropagation();for(let t of n)e.an(t)}},{capture:!0,signal:n}),e.a3={send(e){m.on||p.send(e)},setKeyboard(e){if(m.on&&e)return;let t=r.textarea;t&&(t.inputMode=e?`text`:`none`,e?(t.focus(),setTimeout(()=>{document.activeElement!==t&&t.focus()},50)):t.blur())},respawn(){r.reset(),p.reconnect({respawn:!0})},reconnect(){p.reconnect()},setFindMode(e){m.on=e;let t=r.textarea;t&&(e?(t.inputMode=`none`,t.readOnly=!0,t.blur()):(t.readOnly=!1,a||(t.inputMode=`text`)))}},a){r.textarea&&(r.textarea.inputMode=`none`),Cn(()=>{!e.u||xn()||(o3(e,!1),r.textarea&&(r.textarea.inputMode=`none`))},n);let t=Y2(r,$4(e),{onStart(){d?.setFrozen(!0)},onEnd(){d?.setFrozen(!1)},onCopy(){e.am()}},n);U2(r,$4(e),n,t.selecting),G2(r,e=>{m.on||p.send(e)},n)}else Z2(r,$4(e),()=>e.am(),n);e.o&&!a&&r.focus(),v();let x={term:r,socket:p,abort:t,refit:ee,fitted:()=>_,wasParked:!!e.r,suspend:void 0};return e.o||(x.suspend=setTimeout(()=>p.disconnect(),G4)),x},onUpdate:function(){clearTimeout(this.suspend),this.wasParked&&!e.r&&this.refit(),this.wasParked=!!e.r,this.socket.syncVisibility(),e.o?(this.socket.resume(),this.socket.claim(),this.fitted()&&this.socket.connect(),e.s&&e.t===`lost`&&(t3(e,!1),this.socket.reconnect()),!e.s&&this.socket.readyState>=WebSocket.CLOSING&&(this.term.reset(),this.socket.reconnect()),!e.s&&!e.v&&this.term.focus()):this.suspend=setTimeout(()=>this.socket.disconnect(),G4)},onDestroy:function(){clearTimeout(this.suspend),this.abort.abort(),this.term.dispose()}})),e3=j(51,xse,14),t3=a(18,e=>{bse(e,+!e.s),e3(e)}),n3=a(19,e=>{e3(e),Q4(e)}),Sse=s(`F19`,e=>{e.o&&v3(e,{send:t=>e.a3?.send(t),paste:e.ar,keyboard:e.u,setKeyboard:e.ah,findOpen:e.z,findTick:e.a1,openFind:e.af,closeFind:e.ag,runFind:e.ac})}),r3=j(54,Sse,9),Cse=w(41,e=>{r3(e),e3(e)}),i3=j(31,e=>Cse(e,C3(e)),2),wse=s(`F20`,e=>{e.ai||(e.ag(),e.u&&e.ah(!1))}),a3=j(45,wse,3),o3=a(20,e=>{i3(e),a3(e),r3(e),e3(e)}),Tse=p(2,b4,(e=>`/${e}&`)(x4),use),s3=j(26,e=>Tse(e,!e.v&&e.z?0:1)),c3=a(21,e=>{s3(e),e3(e)}),Ese=p(3,`<div>uploading…</div>`,` `,lse),l3=a(22,e=>Ese(e,+!e.w)),Dse=p(4,`<div>Copied</div>`,` `,cse),u3=a(23,e=>Dse(e,+!e.x)),Ose=p(6,`<div><div><p>Long-press the field below and choose Paste</p><input placeholder="Paste here…"><button>Cancel</button></div></div>`,` D D b b `,mse),d3=a(24,e=>{Ose(e,+!e.y),Y4(e)}),kse=w(42,e=>{a3(e),r3(e),J4(e)}),f3=j(40,e=>kse(e,w3(e)),2),p3=a(25,e=>{f3(e),r3(e),s3(e),K4(e)}),m3=a(27,e=>{i3(e),r3(e),q4(e)}),Ase=(e,t)=>zse(e,t.current),jse=(e,t)=>{Use(e,t.query),Wse(e,t.overlay),Gse(e,t.refreshTimer)},Mse=(e,t)=>Yse(e,t.timer),Nse=s(`F21`,e=>{c3(e,Ye()),_(e.a,`dragover`,function(e){e.preventDefault()}),_(e.a,`drop`,function(t){t.preventDefault();for(let n of t.dataTransfer?.files||[])e.an(n)})});function Pse(e){S(e.a,`_eX`),S(e.b,`_eY`),t3(e,!1),n3(e,`exited`),o3(e,!1),c3(e,!1),l3(e,!1),u3(e,!1),d3(e,!1),p3(e,!1),m3(e,0),Ase(e,{current:null}),jse(e,{overlay:null,query:``,refreshTimer:0}),Mse(e,{timer:0}),Nse(e)}var Fse=w(43,e=>{a3(e),r3(e)}),Ise=w(52),Lse=w(53,r3),h3=j(50,e=>{Ise(e,E3(e)),Lse(e,D3(e))}),Rse=w(49,e=>{h3(e),e3(e)}),g3=j(30,e=>Rse(e,O3(e))),zse=w(29,e=>{Fse(e,T3(e)),i3(e),f3(e),g3(e),h3(e),r3(e),e3(e)}),Bse=w(37,e3),Vse=w(38,r3),Hse=w(39,e=>{f3(e),e3(e)}),_3=j(36,e=>{Bse(e,k3(e)),Vse(e,A3(e)),Hse(e,j3(e))},2),Use=w(33,_3),Wse=w(34,e=>{_3(e),e3(e)}),Gse=w(35,_3),Kse=w(44,e=>{O(e.a,`hidden`,!e.ai),a3(e)}),qse=w(9,e=>{Kse(e,e.j==null||e.j===`term`),e3(e)}),Jse=w(48,e3),Yse=w(47,e=>Jse(e,M3(e))),Xse=w(10,g3),v3=c(55),y3=j(13,e=>v3(e,e.l,e.m)),Zse=w(11,y3),Qse=w(12,y3),$se=w(14,e=>{r3(e),e3(e)}),ece=w(16,e3),tce=w(17,e3),nce=w(15,Z4),b3=e=>t=>{p3(e._,t)},x3=e=>function(t,n){e._.ac(t,n)},S3=e=>function(){e._.ag()},C3=e=>()=>{e.u&&(o3(e,!1),e.a3?.setKeyboard(!1)),e.a3?.setFindMode(!0),p3(e,!0),m3(e,+e.a1+1)},w3=e=>()=>{e.z&&(p3(e,!1),e.ad(),e.a3?.setFindMode(!1))},T3=e=>t=>{o3(e,t),e.a3?.setKeyboard(t)},E3=e=>async t=>{let n=[...t?.files||[]];for(let t of n)await e.an(t);if(!n.length){let n=t?.getData(`text/plain`);n&&e.a3?.send(n)}d3(e,!1)},D3=e=>async()=>{if(!navigator.clipboard?.read){d3(e,!0);return}try{for(let t of await navigator.clipboard.read()){let n=t.types.find(e=>e.startsWith(`image/`));if(n){let r=await t.getType(n);await e.an(new File([r],`pasted.${n.split(`/`)[1]||`png`}`,{type:n}))}else if(t.types.includes(`text/plain`)){let n=await(await t.getType(`text/plain`)).text();n&&e.a3?.send(n)}}}catch{d3(e,!0)}},O3=e=>async t=>{if(t){l3(e,!0);try{let n=await(await fetch(`/api/workspaces/${e.k}/assets?name=${encodeURIComponent(t.name||`pasted.png`)}`,{method:`POST`,body:t})).json();n.path&&e.a3?.send(`${n.path} `)}finally{l3(e,!1)}}},k3=e=>()=>{!e.a7.trim()||!e.a8||(e.a9&&clearTimeout(e.a9),e.a9=setTimeout(()=>{e.a9=0,e.a8?.refresh()},32))},A3=e=>(t,n)=>{let r=e.a8;if(r){if(e.a7=t,e.a9&&=(clearTimeout(e.a9),0),!t.trim()){r.clear();return}r.search(t,n)}},j3=e=>()=>{e.a9&&=(clearTimeout(e.a9),0),e.a7=``,e.a8?.clear()},M3=e=>()=>{clearTimeout(e.al),u3(e,!0),e.al=setTimeout(()=>{u3(e,!1)},1200)};n(`F10`,b3),n(`F11`,x3),n(`F12`,S3),n(`F3`,C3),n(`F4`,w3),n(`F5`,T3),n(`F8`,E3),n(`F9`,D3),n(`F7`,O3),n(`F0`,k3),n(`F1`,A3),n(`F2`,j3),n(`F6`,M3);var rce=`<div><div><!><!><!><!><!><div></div></div></div>`,ice=` D D%b%b%b%b%b m`,ace=ln(1,2,()=>be(()=>import(`./_ClG30-Cs.js`),__vite__mapDeps([0,1,2,3,4,5,6]))),oce=un(()=>be(()=>import(`./_dvB7DobJ.js`),__vite__mapDeps([7,1,2,3,4,5,6]))),sce=un(()=>be(()=>import(`./_BvcYfwFl.js`),__vite__mapDeps([8,1,2,3,4,5,6]))),cce=un(()=>be(()=>import(`./_BnZSGKpL.js`),__vite__mapDeps([9,1,2,3,4,5,6]))),lce=un(()=>be(()=>import(`./_o7CRZZeJ.js`),__vite__mapDeps([10,1,2,3,4,5,6]))),uce=un(()=>be(()=>import(`./_C9oWRx13.js`),__vite__mapDeps([11,1,2,3,4,5,6]))),dce=un(()=>be(()=>import(`./_D_opOE0v.js`),__vite__mapDeps([12,1,2,3,4,5,6]))),fce=un(()=>be(()=>import(`./_C0zwP2qH.js`),__vite__mapDeps([13,1,2,3,4,5,6]))),pce=un(()=>be(()=>import(`./_Bjs6hRWD.js`),__vite__mapDeps([14,1,2,3,4,5,6]))),mce=un(()=>be(()=>import(`./_CxFNOCPZ.js`),__vite__mapDeps([15,1,2,3,4,5,6]))),hce=un(()=>be(()=>import(`./_L9P-Lxf4.js`),__vite__mapDeps([16,1,2,3,4,5,6]))),gce=un(()=>be(()=>import(`./_D9-BvOKl.js`),__vite__mapDeps([17,1,2,3,4,5,6]))),_ce=un(()=>be(()=>import(`./_BbqN_0Hf.js`),__vite__mapDeps([18,1,2,3,4,5,6]))),vce=un(()=>be(()=>import(`./_CC3Ffsld.js`),__vite__mapDeps([19,1,2,3,4,5,6]))),yce=un(()=>be(()=>import(`./_DdJpsshP.js`),__vite__mapDeps([20,1,2,3,4,5,6]))),bce=un(()=>be(()=>import(`./_BfEhpnxc.js`),__vite__mapDeps([21,1,2,3,4,5,6]))),xce=un(()=>be(()=>import(`./_BjtlvkCt.js`),__vite__mapDeps([22,1,2,3,4,5,6]))),Sce=un(()=>be(()=>import(`./_BU6w6X4q.js`),__vite__mapDeps([23,1,2,3,4,5,6]))),Cce=un(()=>be(()=>import(`./_BnepJiz-.js`),__vite__mapDeps([24,1,2,3,4,5,6]))),wce=e=>S(e.a,`_cr`),N3=A(145,e=>b(e.a,e._._.az),e=>e._._),Tce=we(`J36`,` `,` `,N3),Ece=e=>{Gt(e.a),lt(e.a,Tce(e)),Rt(e.a,L8(e)),ot(e.a),Te(e.a),St(e.a),Zt(e.a),mt(e.a),Xe(e.a,{})},P3=j(3,e=>b(e.c,e._._.b0?`Starting…`:`Start ${e._._.a2||`shell`}`)),F3=A(124,P3,e=>e._._),Dce=s(`J38`,e=>_(e.b,`click`,function(){e._._.c7(e._._.a2||`shell`,!0)})),Oce=e=>{F3(e),I3(e),S(e.a,`_cr`),S(e.b,[`_q`,`_r`]),Dce(e)},I3=A(146,e=>{O(e.b,`disabled`,e._._.b0),P3(e)},e=>e._._),L3=j(6,e=>$se(e.b,e._._.s&&e._._.ai===`term`&&e.e===e._._.br),3),R3=A(123,e=>{tce(e.b,!e._._.s),L3(e)},e=>e._._),kce=e=>{R3(e),z3(e),B3(e),H3(e),U3(e),W3(e),S(e.a,`_cd`),Pse(e.b),Qse(e.b,R8(e))},z3=A(137,e=>{qse(e.b,e._._.ai),L3(e)},e=>e._._),B3=A(148,e=>Xse(e.b,e._._.b8),e=>e._._),V3=j(5,e=>{O(e.a,`data-live`,e.e===e._._.br||null),O(e.a,`inert`,e.e!==e._._.br)}),H3=A(154,e=>{V3(e),L3(e)},e=>e._._),U3=A(156,e=>Zse(e.b,e._._.c2),e=>e._._),W3=A(157,e=>nce(e.b,z8(e)),e=>e._._),Ace=w(4,e=>{ece(e.b,e.e),V3(e),L3(e)}),jce=m(0,(e=>`<div>${e}</div>`)(ose),(e=>` D/${e}&l`)(sse),kce,(e,t)=>Ace(e,t[0]?.id)),G3=j(3,e=>jce(e,[e._.s?e._.bn:e._.bn.filter(t=>t.id===e._.br),`id`]),2),K3=h(7,0,G3),Mce=e=>{K3._(e),J3._(e),Y3._(e),X3._(e),Z3._(e)},Nce=p(1,`<div><span>No sessions in this workspace.</span><button> </button></div>`,` Db D `,Oce),q3=j(2,e=>Nce(e,!e._.bq&&e._.ai===`term`?0:1)),J3=h(7,0,q3),Y3=h(7,0,G3),X3=h(7,0,q3),Z3=h(7,0,G3),Q3=j(3,e=>RU(e.b,B8(e)),2),$3=h(6,0,Q3),Pce=e=>{$3._(e),e6._(e),t6._(e),n6._(e),r6._(e),a6._(e),o6._(e),S(e.a,`_cb`),kU(e.b)},e6=h(6,0,Q3),t6=h(6,0,e=>LU(e.b,e._.ae||[])),n6=h(6,0,e=>BU(e.b,V8(e))),r6=h(6,0,e=>{O(e.a,`data-live`,e._.ai===`new`||null),O(e.a,`inert`,e._.ai!==`new`)}),i6=j(2,e=>HU(e.b,e._.b1?e._.bx:void 0)),a6=h(6,0,e=>{VU(e.b,e._.b1?`/w/${e._.b1?.id}`:void 0),i6(e)}),o6=h(6,0,e=>{i6(e),Q3(e)}),s6=h(5,0,e=>rx(e.b,e._.a2)),Fce=e=>{s6._(e),c6._(e),l6._(e),u6._(e),d6._(e),f6._(e),p6._(e),m6._(e),h6._(e),g6._(e),_6._(e),S(e.a,`_cb`),Tb(e.b)},c6=h(5,0,e=>Qx(e.b,e._.a7)),l6=h(5,0,e=>Hx(e.b,e._.a8)),u6=h(5,0,e=>Ux(e.b,H8(e))),d6=h(5,0,e=>Tv(e.b,e._.aa)),f6=h(5,0,e=>Zb(e.b,U8(e))),p6=h(5,0,e=>ax(e.b,W8(e))),m6=h(5,0,e=>ex(e.b,G8(e))),h6=h(5,0,e=>{O(e.a,`data-live`,e._.ai===`settings`||null),O(e.a,`inert`,e._.ai!==`settings`)}),g6=h(5,0,e=>Yx(e.b,e._.b1?`/w/${e._.b1?.id}`:`/new`)),_6=h(5,0,e=>Xx(e.b,K8(e))),v6=h(4,0,e=>hz(e.b,q8(e))),Ice=e=>{v6._(e),b6._(e),x6._(e),S6._(e),C6._(e),w6._(e),S(e.a,`_cb`),CR(e.b)},y6=j(2,e=>vz(e.b,J8(e))),b6=h(4,0,y6),x6=h(4,0,e=>{O(e.a,`data-live`,e._.ai===`manage`||null),O(e.a,`inert`,e._.ai!==`manage`)}),S6=h(4,0,e=>mz(e.b,e._.b1)),C6=h(4,0,y6),w6=h(4,0,e=>yz(e.b,Y8(e))),Lce=t(5,`Ad`),T6=j(4,e=>uce(e.c,e._.s&&e._.ai===`diff`)),E6=h(3,0,T6),Rce=e=>{o(e,2,zce),E6._(e),D6._(e),O6._(e),k6._(e),A6._(e),j6._(e),M6._(e),N6._(e),P6._(e),F6._(e),I6._(e),L6._(e),R6._(e),z6._(e),S(e.a,`_cb`),ace(e),gce(e.c,$8(e)),_ce(e.c,Q8(e)),yce(e.c,Z8(e)),xce(e.c,X8(e))},D6=h(3,0,e=>{O(e.a,`data-live`,e._.ai===`diff`||null),O(e.a,`inert`,e._.ai!==`diff`),T6(e)}),O6=h(3,0,e=>vce(e.c,e._.ap)),k6=h(3,0,e=>bce(e.c,e._.ar)),A6=h(3,0,e=>dce(e.c,e._.at)),j6=h(3,0,e=>fce(e.c,e._.au)),M6=h(3,0,e=>hce(e.c,e._.av)),N6=h(3,0,e=>pce(e.c,e._.ax)),P6=h(3,0,e=>mce(e.c,e._.ay)),F6=h(3,0,e=>oce(e.c,e._.b8)),I6=h(3,0,e=>sce(e.c,e._.b9)),L6=h(3,0,e=>cce(e.c,e._.ba)),R6=h(3,0,e=>{Sce(e.c,e5(e)),Cce(e.c,function(){T8(e._,e._.bb)})}),z6=h(3,0,e=>lce(e.c,e._.bn||[])),zce=u(`J37`,w(5)),Bce=le(`J33`,116),Vce=le(`J34`,117),Hce=le(`J35`,118),Uce=w(117),Wce=s(`J44`,e=>{e.s&&e.ai!==`nav`&&e.w?.({view:e.ai,sessionId:e.ai===`term`?e.br:null,pr:e.ai===`diff`&&e.at||null,scope:e.ai===`diff`?e.av:null,file:e.ai===`diff`?e.aw:null})}),B6=j(90,Wce,6),Gce=s(`J43`,e=>{e.s&&F8(e,{view:e.ai,tab:e.br,sessions:e.bn,newSession:Hce(e),closeSession:Bce(e),renameSession:Vce(e),toggleNav:e.bl,keys:e.ai===`term`?e.c2:null,reviewFindOpen:e.ap,toggleReviewFind:e.bw})}),V6=j(101,Gce,7),Kce=k(H3),qce=w(89,e=>{B6(e),V6(e),Z3(e),Kce(e)}),H6=j(87,e=>qce(e,(()=>{if(e.ah&&e.bn?.some(t=>t.id===e.ah))return e.ah;let t=e.b1&&pt(e.b1?.id);return t&&e.bn?.some(e=>e.id===t)?t:e.bn?.[0]?.id??null})()),2),Jce=p(7,`<!><!><!><!>`,`b%b%`,Mce,`<p>Loading sessions…</p>`,` `,wce),U6=j(86,e=>Jce(e,e.b1&&e.bn?0:e.b1?1:2)),Yce=w(85,e=>{Ule(e,e.bn?.length),H6(e),V6(e),U6(e),z6(e),Y3(e)}),W6=j(68,e=>Yce(e,e.b1?e.ag??e.r?.[e.b1?.id]?.sessions??null:[]),2),Xce=w(116,k(W3)),G6=j(114,e=>Xce(e,n5(e)),2),Zce=s(`J40`,e=>d(e,{active:e.s,load:e.cf,onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,started:!1,stale:!1,timer:void 0,refresh:()=>{if(document.hidden){r.stale=!0;return}r.stale=!1,this.load(!1)},applySessions:t=>{if(!e.b1)return;Z6(e,t);let n=pt(e.b1?.id);n&&t.some(e=>e.id===n)&&y8(e,n),t.some(t=>t.id===e.ah)||y8(e,t[0]?.id||null),r.stale=!1},mergeStatus:t=>{let n=e.b1&&t?.[e.b1?.id]?.sessions;if(!n||!e.ag)return;let r=new Map(n.map(e=>[e.id,e.state]));Z6(e,e.ag.map(e=>{let t=r.get(e.id);return t?{...e,state:t}:e}))},syncPoll:()=>{if(!this.active||qt()){r.stop();return}r.timer??=setInterval(r.refresh,15e3)},sync:()=>{this.active?(r.started||(r.started=!0,this.load(!0)),r.syncPoll()):r.stop()},stop:()=>{clearInterval(r.timer),r.timer=void 0}};return Bt().addEventListener(`sessions.changed`,t=>{if(!r.started)return;let n=t.data;if(!(!e.b1||n?.workspaceId&&n.workspaceId!==e.b1?.id)){if(Array.isArray(n?.sessions)){r.applySessions(n.sessions);return}r.refresh()}},{signal:n}),Bt().addEventListener(`status.changed`,e=>{r.started&&r.mergeStatus(e.data)},{signal:n}),Bt().addEventListener(`sse.health`,()=>{r.syncPoll()},{signal:n}),document.addEventListener(`visibilitychange`,()=>{!document.hidden&&r.stale&&r.refresh()},{signal:n}),r.sync(),r},onUpdate:function(){this.sync()},onDestroy:function(){this.abort.abort(),this.stop()}})),K6=j(115,Zce,4),Qce=w(113,e=>{G6(e),K6(e)}),q6=j(112,e=>Qce(e,r5(e)),2),$ce=w(111,q6),J6=j(109,e=>$ce(e,i5(e)),5),ele=w(118),Y6=j(106,e=>ele(e,a5(e)),2),tle=w(105,e=>{J6(e),Y6(e)}),X6=j(64,e=>tle(e,o5(e))),Z6=a(42,e=>{Uce(e,t5(e)),W6(e),X6(e),J6(e),G6(e),K6(e)}),nle=s(`J48`,e=>{e.s||(e.ai!==e.bb&&T8(e,e.bb),e.ak&&t8(e,!1),e.am&&k8(e,!1),e.an&&A8(e,!1),e.ao&&e.b1&&E8(e,!1))}),Q6=j(75,nle,7),rle=s(`J45`,e=>{e.l===`diff`&&!e.ak&&t8(e,!0)}),$6=j(47,rle),ile=p(3,`<div><!></div>`,` D%0&`,Rce),e8=j(66,e=>ile(e,e.ak&&e.b1?0:1)),t8=a(46,e=>{Q6(e),$6(e),e8(e)}),ale=s(`J47`,e=>{e.ai!==`diff`&&e.ap&&i8(e,!1)}),n8=j(52,ale),ole=w(94,V6),r8=j(54,e=>ole(e,s5(e))),i8=a(51,e=>{n8(e),r8(e),V6(e),O6(e)}),a8=a(53,e=>{r8(e),k6(e)}),sle=s(`J39`,e=>{d(e,{active:e.s,onMount:function(){let t=t=>{this.active&&t.target===document.body&&e.cl(t)};return document.addEventListener(`keydown`,t),{onDoc:t}},onDestroy:function(){document.removeEventListener(`keydown`,this.onDoc)}},1),_(e.a,`keydown`,e.s&&e.cl)}),o8=j(120,sle),cle=w(119,o8),s8=j(96,e=>cle(e,c5(e)),3),lle=w(84,s8),c8=j(77,e=>lle(e,l5(e)),2),ule=s(`J42`,e=>{e.s&&e.a0&&(e.a0.workspaceId??null)===(e.b8??null)&&e.a1!=null&&e.a1!==e.c5&&(e.c5=e.a1,e.bz(e.a0))}),l8=j(104,ule,5),dle=w(97,l8),u8=j(82,e=>dle(e,u5(e)),6),fle=w(76,e=>{c8(e),u8(e)}),d8=j(69,e=>fle(e,d5(e)),2),f8=a(56,e=>{d8(e),j6(e)}),p8=a(60,e=>{d8(e),P6(e)}),ple=p(2,Ot,(e=>`/${e}&`)(Vt),Ece),mle=k(N3),m8=a(61,e=>{ple(e,+!e.az),mle(e)}),h8=a(62,k(I3)),g8=j(81,e=>()=>{e.ai===`settings`?T8(e,e.bb):e.bi()},2),hle=w(80,e=>{g8(e),u8(e)}),gle=(e,t)=>Gle(e,t.open),_le=k(U3),_8=a(100,e=>{V6(e),_le(e)}),vle=(e,t)=>eue(e,t.seen),yle=(e,t)=>{rue(e,t.wanted),iue(e,t.run)};function ble(e){S(e.b,`_ca`),S(e.h,`_cc`),Z6(e,null),t8(e,!1),i8(e,!1),a8(e,0),f8(e,0),p8(e,0),m8(e,null),h8(e,!1),hle(e,f5(e)),gle(e,{open:!1}),_8(e,null),vle(e,{seen:-1}),yle(e,{wanted:!1,run:void 0})}var xle=s(`J41`,e=>{e.ah&&e.b1&&xt(e.b1?.id,e.ah)}),v8=j(65,xle),y8=a(43,e=>{H6(e),J6(e),G6(e),v8(e),K6(e)}),Sle=(e,t)=>y8(e,t??null),Cle=w(83,V6),wle=w(95,e=>{s8(e),o6(e)}),b8=j(74,e=>{Cle(e,p5(e)),wle(e,m5(e))}),x8=j(79,e=>()=>{e.ai===`manage`?T8(e,e.bb):e.bg()},2),Tle=s(`J46`,e=>{e.s&&e.t&&!e.bu&&(e.bu=!0,E8(e,!0),T8(e,`new`)),e.t?e.bu&&e.ai!==`new`&&(e.bu=!1,e.u?.()):(e.bu=!1,e.ai===`new`&&T8(e,e.bb))}),S8=j(93,Tle,5),C8=j(122,e=>S(e.a,[`_b_`,{_b8:e.cn,_b9:!e.s}])),Ele=w(121,C8),w8=j(45,e=>Ele(e,e.ai===`nav`&&e.a4===`nav`)),Dle=k(z3),T8=a(44,e=>{O(e.h,`inert`,e.ai!==`term`),g8(e),b8(e),x8(e),c8(e),Q6(e),n8(e),S8(e),B6(e),V6(e),s8(e),w8(e),D6(e),x6(e),h6(e),r6(e),J3(e),Dle(e)}),Ole=p(6,(e=>`<div>${e}</div>`)(HV),(e=>` D/${e}&l`)(UV),Pce),E8=a(50,e=>{Ole(e,+!e.ao),Q6(e)}),D8=j(13,e=>{T8(e,e.l??(e.m?`term`:`new`)),E8(e,e.l===`new`||!e.m)}),kle=p(4,(e=>`<div>${e}</div>`)(rF),(e=>` D/${e}&l`)(iF),Ice),O8=j(67,e=>kle(e,e.am&&e.b1?0:1)),k8=a(48,e=>{Q6(e),O8(e)}),Ale=p(5,(e=>`<div>${e}</div>`)(Rs),(e=>` D/${e}&l`)(zs),Fce),A8=a(49,e=>{Ale(e,+!e.an),Q6(e)}),jle=w(11,e=>{k8(e,e.l===`manage`),A8(e,e.l===`settings`),D8(e),$6(e)}),Mle=w(73,e=>{g8(e),b8(e),x8(e),c8(e),Q6(e),S8(e),u8(e),s8(e),R6(e),w6(e),_6(e)}),Nle=w(78,e=>{x8(e),u8(e)}),Ple=w(63,e=>{Ble(e,e.b1?.id),Vle(e,e.b1?.branch),Hle(e,e.b1?.name),Mle(e,e.b1?`term`:`new`),Nle(e,h5(e)),d8(e),W6(e),H6(e),Q6(e),u8(e),X6(e),J6(e),v8(e),K6(e),e8(e),O8(e),U6(e),S6(e),g6(e),a6(e)}),Fle=w(12,e=>{Ple(e,e.m),D8(e)}),j8=a(55,e=>{B6(e),A6(e)}),Ile=(e,t)=>j8(e,t??``),M8=a(57,e=>{B6(e),M6(e)}),Lle=(e,t)=>M8(e,t??null),N8=a(58,B6),P8=a(59,N6),Rle=(e,t)=>{N8(e,t??null),P8(e,t??``)},zle=k(B3),Ble=w(70,e=>{l8(e),Y6(e),F6(e),C6(e),zle(e)}),Vle=w(71,I6),Hle=w(72,L6),Ule=w(88,X3),Wle=w(17,W6),Gle=w(92,S8),Kle=k(R3),qle=w(18,e=>{Q6(e),S8(e),B6(e),V6(e),l8(e),K6(e),o8(e),C8(e),E6(e),K3(e),Kle(e)}),Jle=w(19,e=>{S8(e),u8(e)}),Yle=w(20,S8),Xle=w(21,u8),Zle=w(22,B6),F8=c(98),I8=j(25,e=>F8(e,e.x,e.y)),Qle=w(23,e=>{cue(e,e.x?.view),I8(e)}),$le=w(24,I8),eue=w(103,l8),tue=w(26,l8),nue=w(27,l8),rue=w(108,e=>{J6(e),q6(e)}),iue=w(110,q6),aue=k(F3),oue=w(28,e=>{J6(e),s6(e),aue(e)}),sue=w(29,e=>{Y6(e),$3(e)}),cue=w(30,w8),lue=w(31,e=>{v6(e),e6(e)}),uue=w(32,b6),due=w(33,c6),fue=w(34,l6),pue=w(35,u6),mue=w(36,d6),hue=w(37,f6),gue=w(38,p6),_ue=w(39,m6),vue=w(40,t6),yue=w(41,n6),L8=e=>function(){m8(e._,null)},R8=e=>t=>{_8(e._._,t)},z8=e=>function(t){e._._.ci(t)},B8=e=>function(t){e._.a5?.(t),e._.a3?.(t.id),e._.bx()},V8=e=>function(t){e._.af?.(t)},H8=e=>function(t){e._.a9?.(t)},U8=e=>function(t){e._.ab?.(t)},W8=e=>function(t){e._.ac?.(t)},G8=e=>function(t){e._.ad?.(t)},K8=e=>function(){T8(e._,e._.bb)},q8=e=>function(t){e._.a5?.(t)},J8=e=>function(){e._.a6?.(e._.b8)},Y8=e=>function(){T8(e._,e._.bb)},X8=e=>t=>{a8(e._,t)},Z8=e=>t=>{i8(e._,t)},Q8=e=>function(t){N8(e._,t)},$8=e=>function(t){M8(e._,t===`committed`?null:t)},e5=e=>function(t){y8(e._,t),T8(e._,e._.bb)},t5=e=>async(t,n)=>{n=n.trim();let r=(e.ag||[]).find(e=>e.id===t);r&&n===r.agent&&(n=``),!(r&&(r.title||``)===n)&&(Z6(e,(e.ag||[]).map(e=>e.id===t?{...e,title:n||null}:e)),await fetch(`/api/sessions/${t}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({title:n})}))},n5=e=>async t=>{try{Z6(e,(e.ag||[]).filter(e=>e.id!==t)),e.ah===t&&y8(e,e.ag?.[0]?.id||null),await N(`/api/sessions/${t}`,{method:`DELETE`})}catch(t){m8(e,`Close session failed: ${String(t.message||t)}`),e.cf(!1)}},r5=e=>t=>(t&&(e.ca=!0),(e.cc??=Un(e.cd))()),i5=e=>async()=>{let t=e.ca;if(e.ca=!1,e.b1)try{let n=`/api/workspaces/${e.b1?.id}/sessions`,r=await N(n);!r.length&&t&&e.ag==null&&e.b1?.status===`active`&&(r=await N(n)),!r.length&&t&&e.ag==null&&e.b1?.status===`active`&&(await e.c7(e.a2||`shell`,!1),r=await N(n).catch(()=>e.ag||[])),e.ag!=null&&e.ag?.length===0&&r.length&&(r=await N(n).catch(()=>[])),Z6(e,r);let i=pt(e.b1?.id);i&&r.some(e=>e.id===i)&&y8(e,i),e.ag.some(t=>t.id===e.ah)||y8(e,e.ag?.[0]?.id||null)}catch(t){if(Z6(e,e.ag||[]),Nt(t))return;m8(e,String(t.message||t))}},a5=e=>async(t,n)=>{if(t===e.b8){let r=await e.c7(n,!0);r&&xt(t,r.id);return}try{let r=await N(`/api/workspaces/${t}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})});xt(t,r.id),e.a3?.(t)}catch(t){m8(e,String(t.message||t))}},o5=e=>async(t,n)=>{if(!e.b1)return null;h8(e,!0);try{let r=await N(`/api/workspaces/${e.b1?.id}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:t})});if(n){let t=e.ag||[];Z6(e,t.some(e=>e.id===r.id)?t:t.concat(r)),y8(e,r.id)}return r}catch(t){return m8(e,String(t.message||t)),null}finally{h8(e,!1)}},s5=e=>()=>{if(e.ap){i8(e,!1);return}i8(e,!0),a8(e,+e.ar+1),Lce(e)()},c5=e=>t=>{let n=t.target,r=!!n&&!n.closest(`.xterm`)&&(n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.tagName===`SELECT`||n.isContentEditable);if(t.key===`Escape`&&e.ai!==`term`&&e.ai!==`diff`&&!t.defaultPrevented&&!document.querySelector(`dialog[open]`)&&!(r&&n.tagName!==`SELECT`&&n.value)){t.preventDefault(),e.ai===`new`?e.bx():T8(e,e.bb);return}(t.metaKey||t.ctrlKey)&&t.shiftKey&&t.key.toLowerCase()===`d`&&(t.preventDefault(),e.bm())},l5=e=>()=>{e.ai===`diff`?T8(e,e.bb):e.be()},u5=e=>t=>{t.view===`diff`?(t.scope!==void 0&&M8(e,t.scope??null),e.be(t.pr??void 0,t.file??void 0)):t.view===`manage`?e.bg():t.view===`settings`?e.bi():t.view===`new`?e.t||e.v?.():(t.sessionId&&e.b1&&(y8(e,t.sessionId),xt(e.b1?.id,t.sessionId)),T8(e,e.bb))},d5=e=>(t,n)=>{e.b1&&(j8(e,t||``),t&&f8(e,+e.au+1),P8(e,n||``),n&&p8(e,+e.ay+1),t8(e,!0),T8(e,`diff`))},f5=e=>()=>{A8(e,!0),T8(e,`settings`)},p5=e=>()=>{T8(e,e.ai===`nav`?e.bb:`nav`)},m5=e=>()=>{e.ai===`new`&&T8(e,e.bb)},h5=e=>()=>{e.b1&&(k8(e,!0),T8(e,`manage`))};n(`J15`,L8),n(`J32`,R8),n(`J31`,z8),n(`J30`,B8),n(`J29`,V8),n(`J24`,H8),n(`J26`,U8),n(`J27`,W8),n(`J28`,G8),n(`J25`,K8),n(`J21`,q8),n(`J23`,J8),n(`J22`,Y8),n(`J19`,X8),n(`J18`,Z8),n(`J17`,Q8),n(`J16`,$8),n(`J20`,e5),n(`J12`,t5),n(`J11`,n5),n(`J10`,r5),n(`J9`,i5),n(`J13`,a5),n(`J8`,o5),n(`J5`,s5),n(`J14`,c5),n(`J4`,l5),n(`J7`,u5),n(`J0`,d5),n(`J2`,f5),n(`J3`,p5),n(`J6`,m5),n(`J1`,h5);var g5=`_bF _6 _l`,bue=`_bI _bH`,xue=`_bJ _bH`,Sue=`_bL _bH`,Cue=I,wue=(e=>`/${e}&`)(F);function Tue(e){R(e.a,`M8 6L20 6 M4 6.01L4.01 5.99889 M4 12.01L4.01 11.9989 M4 18.01L4.01 17.9989 M8 12L20 12 M8 18L20 18`)}var Eue=(e,t)=>L(e.a,t),Due=(e,t)=>P(e.a,t),Oue=`_ew _I`,kue=`_eA _J`,Aue=(e=>`<button>${e}<span></span></button><div popover=auto><!><div><span>New session</span><div></div></div></div>`)(Vr),jue=(e=>` D/${e}& l D%b D b m`)(`b%c`),_5=h(0,0,e=>BT(e.a,e._.c)),Mue=p(0,(e=>`<!>${e}<!>`)(yT),(e=>`b/${e}&b`)(`b%c`),e=>{_5._(e),UT(e.a,`_ey`)}),Nue=w(2,e=>{Mue(e,+!e.c),_5(e)}),v5=j(1,e=>Nue(e,Hn(e._._.i,e._._._.a5))),y5=A(40,v5,e=>e._._._),Pue=e=>{y5(e),b5(e)},b5=A(12,v5,e=>e._._),Fue=s(`p4`,e=>_(e.a,`click`,function(){z5(e._._._,e._._.d),B5(e._._._,e._._.h||e._._.i)})),Iue=e=>{S(e.a,[`_eB`,`_eC`]),KT(e.b),qT(e.b,12),JT(e.b),Fue(e)},x5=A(39,e=>de(e,`c`,e._._.a0,U5(e)),e=>e._._),Lue=s(`p3`,e=>{Se(e,`c`),_(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._._.a2(e._.d)):t.key===`Escape`&&(t.preventDefault(),z5(e._._,null))}),_(e.c,`blur`,function(){e._._.a2(e._.d)}),d(e,{onMount:function(){queueMicrotask(()=>{let t=e.c;t?.focus(),t?.select()})}})}),Rue=e=>{x5(e),S5._(e),C5._(e),Qr(e.b,14),ei(e.b),S(e.c,[`_Z`,kue]),Lue(e)},S5=h(0,0,e=>$r(e.b,dC(e._.c))),C5=h(0,0,e=>S(e.a,[`_A`,De[uC(e._.g)]])),zue=s(`p7`,e=>_(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._.s?.(e.d)})),Bue=e=>{S(e.a,Ne),Qr(e.b),ei(e.b),zue(e)},Vue=w(3,e=>{O(e.a,`title`,`New ${e.d} session`),$r(e.b,e.d)}),Hue=(e,t)=>Vue(e,t[0]),w5=j(2,e=>{S(e.a,[`_eB`,`_8`,{_s:e._._._.w===e._._.d}]),O(e.a,`title`,e._._._.w===e._._.d?`Close?`:`Close session`)}),T5=A(36,w5,e=>e._._._),Uue=e=>{T5(e),Gue(e),E5(e),Pt(e.b),_t(e.b,14),Jt(e.b)},Wue=s(`p5`,e=>_(e.a,`click`,function(t,n){e._._._.w===e._._.d?(L5(e._._._,null),n.closest(`[popover]`)?.hidePopover(),e._._._.q?.(e._._.d)):(clearTimeout(e._._._.y),L5(e._._._,e._._.d),e._._._.y=$n(()=>{L5(e._._._,null)}))})),Gue=A(37,Wue,e=>e._._._),E5=A(10,w5,e=>e._._),Kue=p(6,`<!><!><!>`,`b%`,Pue),D5=j(9,e=>Kue(e,e._.d===e._._.l?0:1)),O5=A(33,D5,e=>e._._),que=s(`p6`,e=>_(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._.d!==e._._.l&&e._._.p?.(e._.d)})),Jue=e=>{O5(e),k5(e),A5(e),j5._(e),M5._(e),N5._(e),S(e.a,Oue),Qr(e.c,14),ei(e.c),S(e.d,`_ex`),S(e.e,`_ez`),que(e)},Yue=p(7,(e=>`<button title="Rename session">${e}</button>`)(WT),(e=>` D/${e}&l`)(GT),Iue),k5=A(34,e=>Yue(e,+!e._._.n),e=>e._._),Xue=p(8,(e=>`<button>${e}</button>`)($t),(e=>` D/${e}&l`)(bt),Uue),A5=A(35,e=>Xue(e,+!e._._.q),e=>e._._),j5=h(0,1,e=>{$r(e.c,dC(e._.c)),b(e.f,e._.c?.title||dC(e._.c))}),M5=h(0,1,D5),N5=h(0,1,e=>S(e.b,[`_A`,De[uC(e._.g)]])),P5=ue(4,11,3,e=>S(e.a,[`_ev`,{_eu:e.d===e._.l}])),Zue=e=>{P5._(e),F5._(e)},Que=p(0,(e=>`<span></span>${e}<input aria-label="Session name">`)(Vr),(e=>` b/${e}& b`)(`b%c`),Rue,(e=>`<button><span></span>${e}<span><span> </span><!></span></button><!><!><!>`)(Vr),(e=>` D b/${e}& D D l%m%b%c`)(`b%c`),Jue),F5=ue(4,25,3,e=>Que(e,e._.z===e.d?0:1)),$ue=(e,t)=>ede(e,t[0]),ede=w(2,e=>{nde(e,e.c?.id),rde(e,e.c?.state),ide(e,e.c?.title),ade(e,e.c?.agent),j5(e),S5(e)}),tde=k(E5),nde=w(3,e=>{M5(e),tde(e)}),rde=w(6,e=>{N5(e),C5(e)}),ide=w(7),ade=w(8,k(b5)),ode=(e,t)=>$r(e.b,t),sde=(e,t)=>{cde(e,t?.state),ode(e,t?dC(t):`shell`)},cde=(e,t)=>S(e.c,[`_A`,`_bc`,De[uC(t)]]),I5=j(12,e=>sde(e,e.k.find(t=>t.id===e.l)??null)),lde=m(4,`<div></div>`,` `,Zue,$ue),ude=w(10,e=>{lde(e,[e.k,`id`]),I5(e)}),dde=k(O5),fde=w(11,e=>{I5(e),P5(e),dde(e)}),L5=a(22,k(T5)),pde=(e,t)=>bde(e,t.timer),mde=w(28),R5=j(27,e=>mde(e,W5(e)),2),z5=a(25,e=>{R5(e),F5(e)}),hde=k(x5),B5=a(26,e=>{R5(e),hde(e)}),V5=j(30,e=>O(e.a,`popovertarget`,e.o?e.a3:void 0)),gde=w(29,e=>{O(e.d,`id`,e.a3),V5(e)}),H5=a(31,k(y5)),_de=w(32),vde=s(`p9`,e=>{d(e,{onMount:function(){let t=new AbortController;return zn(t=>{H5(e,t)},t.signal),{abort:t}},onDestroy:function(){this.abort.abort()}}),_(e.d,`toggle`,function(t,n){L5(e,null),t.newState===`open`&&(H5(e,Bn()),e.a6(n),Vn().then(t=>{H5(e,t),requestAnimationFrame(()=>{n.matches(`:popover-open`)&&e.a6(n)})}))})});function yde(e){S(e.a,[g5,`_es`]),Qr(e.b,16),ei(e.b),S(e.d,[`__`,`_et`]),S(e.f,`_eD`),S(e.g,`_eE`),S(e.h,`_eF`),L5(e,null),pde(e,{timer:0}),z5(e,null),B5(e,``),gde(e,f(e)),H5(e,null),_de(e,G5(e)),vde(e)}var bde=w(24),xde=k(k5),Sde=w(13,e=>{R5(e),xde(e)}),Cde=s(`p8`,e=>_(e.a,`click`,!e.o&&(t=>{t.preventDefault(),e.l&&e.p?.(e.l)}))),wde=w(14,e=>{O(e.a,`title`,e.o?`Sessions`:`Back to session`),V5(e),Cde(e)}),Tde=m(7,(e=>`<button>${e}</button>`)(Vr),(e=>` D/${e}&l`)(`b%c`),Bue,Hue),Ede=(e,t)=>Tde(e,[[`shell`,...t],e=>e]),Dde=w(15),Ode=w(16,k(A5)),kde=w(18),U5=e=>t=>{B5(e._._,t)},W5=e=>t=>{e.z===t&&(z5(e,null),e.n?.(t,e.a0.trim()))},G5=e=>t=>{let n=e.a.getBoundingClientRect();t.style.top=`${Math.max(8,n.top-t.offsetHeight-8)}px`,t.style.left=`${Math.max(8,Math.min(n.left+n.width/2-t.offsetWidth/2,window.innerWidth-t.offsetWidth-8))}px`};n(`p0`,U5),n(`p1`,W5),n(`p2`,G5);var Ade=I,jde=(e=>`/${e}&`)(F);function Mde(e){R(e.a,`M15 4L8 20`)}var Nde=(e,t)=>L(e.a,t),Pde=(e,t)=>P(e.a,t),Fde=I,Ide=(e=>`/${e}&`)(F);function Lde(e){R(e.a,`M7 12L17 12 M7 8L13 8 M3 20.2895V5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V15C21 16.1046 20.1046 17 19 17H7.96125C7.35368 17 6.77906 17.2762 6.39951 17.7506L4.06852 20.6643C3.71421 21.1072 3 20.8567 3 20.2895Z`)}var Rde=(e,t)=>L(e.a,t),zde=(e,t)=>P(e.a,t),Bde=I,Vde=(e=>`/${e}&`)(F);function Hde(e){R(e.a,`M21 12L3 12M3 12L11.5 3.5M3 12L11.5 20.5`)}var Ude=(e,t)=>L(e.a,t),Wde=(e,t)=>P(e.a,t),Gde=I,Kde=(e=>`/${e}&`)(F);function qde(e){R(e.a,`M3 12L21 12M21 12L12.5 3.5M21 12L12.5 20.5`)}var Jde=(e,t)=>L(e.a,t),Yde=(e,t)=>P(e.a,t),Xde=I,Zde=(e=>`/${e}&`)(F);function Qde(e){R(e.a,`M19 6V11C19 12.1046 18.1046 13 17 13H5 M9 9L5 13L9 17`)}var $de=(e,t)=>L(e.a,t),efe=(e,t)=>P(e.a,t),tfe=I,nfe=(e=>`/${e}&`)(F);function rfe(e){R(e.a,`M4 12H16 M12 8L16 12L12 16 M20 7V17`)}var ife=(e,t)=>L(e.a,t),afe=(e,t)=>P(e.a,t),K5=400,ofe=55,sfe=[[{kind:`paste`},{kind:`key`,label:`Up`,icon:`arrow-up`,seq:`\x1B[A`},{kind:`key`,label:`Tab`,icon:`tab`,seq:` `}],[{kind:`key`,label:`Left`,icon:`arrow-left`,seq:`\x1B[D`},{kind:`key`,label:`Enter`,icon:`enter`,seq:`\r`},{kind:`key`,label:`Right`,icon:`arrow-right`,seq:`\x1B[C`}],[{kind:`esc`},{kind:`key`,label:`Down`,icon:`arrow-down`,seq:`\x1B[B`},{kind:`key`,label:`^C`,icon:``,seq:``}]],cfe=p(0,$e,(e=>`/${e}&`)(ke),e=>{tn(e.a),ht(e.a,18),rn(e.a)},Dt,(e=>`/${e}&`)(ft),e=>{Ut(e.a),It(e.a,18),Yt(e.a)},Bde,(e=>`/${e}&`)(Vde),e=>{Hde(e.a),Ude(e.a,18),Wde(e.a)},Gde,(e=>`/${e}&`)(Kde),e=>{qde(e.a),Jde(e.a,18),Yde(e.a)},Xde,(e=>`/${e}&`)(Zde),e=>{Qde(e.a),$de(e.a,18),efe(e.a)},tfe,(e=>`/${e}&`)(nfe),e=>{rfe(e.a),ife(e.a,18),afe(e.a)},` `,` `,A(8,e=>b(e.a,e._._.f),e=>e._._)),lfe=h(0,2,e=>{S(e.a,[xue,{_bK:e._.e===`enter`}]),cfe(e,e._.e===`arrow-up`?0:e._.e===`arrow-down`?1:e._.e===`arrow-left`?2:e._.e===`arrow-right`?3:e._.e===`enter`?4:e._.e===`tab`?5:6)}),ufe=s(`q8`,e=>{_(e.a,`pointerdown`,function(t){t.preventDefault(),e._._._._.a7(e._.g)}),_(e.a,`pointerup`,function(){e._._._._.a5()}),_(e.a,`pointercancel`,function(){e._._._._.a5()}),_(e.a,`pointerleave`,function(){e._._._._.a5()}),_(e.a,`contextmenu`,function(e){e.preventDefault()})}),dfe=e=>{lfe._(e),ffe._(e),ufe(e)},ffe=h(0,2,e=>{O(e.a,`title`,e._.f),O(e.a,`aria-label`,e._.f)}),pfe=s(`q7`,e=>{_(e.a,`pointerdown`,function(e){e.preventDefault()}),_(e.a,`click`,function(){e._._._._.v?.send(`\x1B`)})}),mfe=e=>{S(e.a,Sue),pfe(e)},hfe=s(`q6`,e=>{_(e.a,`pointerdown`,function(e){e.preventDefault()}),_(e.a,`click`,function(){e._._._._.v?.paste()})}),gfe=p(0,(e=>`<button title=Paste>${e}</button>`)(yj),(e=>` D/${e}&l`)(bj),e=>{S(e.a,bue),xj(e.b),Sj(e.b,16),Cj(e.b),hfe(e)},`<button title=Escape>esc</button>`,` `,mfe,`<button></button>`,` `,dfe),_fe=(e,t)=>gfe(e,t===`paste`?0:t===`esc`?1:2),vfe=(e,t)=>{_fe(e,t[0]?.kind),yfe(e,t[0]?.icon),bfe(e,t[0]?.label),xfe(e,t[0]?.seq)},yfe=w(4),bfe=w(5),xfe=w(6),Sfe=m(0,`<!><!><!>`,`b%`,0,vfe),Cfe=(e,t)=>Sfe(e,[t,(e,t)=>String(t)]),wfe=(e,t)=>Cfe(e,t[0]),Tfe=t(2,`Ac`),q5=A(49,e=>{M4(e.a,x7(e)),L4(e.a,b7(e)),R4(e.a,y7(e))},e=>e._._),Efe=e=>{o(e,0,Dfe),q5(e),J5(e),Y5(e),P4(e.a),B4(e.a,`keybar`)},J5=A(50,e=>j4(e.a,e._._.y),e=>e._._),Y5=A(51,e=>z4(e.a,e._._.z),e=>e._._),Dfe=u(`q5`,w(2)),X5=A(47,e=>b(e.c,e._._.q),e=>e._._),Ofe=e=>{X5(e),S(e.a,`_bC`),S(e.b,`_bD`)},Z5=A(39,e=>ude(e.a,e._._.i),e=>e._._),kfe=e=>{Z5(e),Q5(e),$5(e),Afe(e),jfe(e),e7(e),t7(e),n7(e),yde(e.a)},Q5=A(41,e=>fde(e.a,e._._.k??null),e=>e._._),$5=A(42,e=>Ede(e.a,e._._.l??[]),e=>e._._),Afe=A(43,e=>kde(e.a,e._._.m),e=>e._._),jfe=A(44,e=>Dde(e.a,e._._.n),e=>e._._),e7=A(45,e=>Ode(e.a,e._._.o),e=>e._._),t7=A(46,e=>Sde(e.a,e._._.p),e=>e._._),n7=A(48,e=>wde(e.a,e._._.t),e=>e._._),r7=j(4,e=>{O(e.a,`href`,e._._.d===`manage`?`/w/${e._._.h}`:`/w/${e._._.h}/manage`),O(e.c,`href`,e._._.d===`diff`?`/w/${e._._.h}`:`/w/${e._._.h}/review`)}),i7=A(37,e=>{S(e.a,[g5,{_bE:e._._.d===`manage`}]),O(e.a,`title`,e._._.d===`manage`?`Back to terminal`:`Manage workspace`),O(e.a,`aria-current`,e._._.d===`manage`?`page`:void 0),S(e.c,[g5,{_bE:e._._.d===`diff`}]),O(e.c,`title`,e._._.d===`diff`?`Back to terminal`:`Review changes`),O(e.c,`aria-current`,e._._.d===`diff`?`page`:void 0),r7(e)},e=>e._._),Mfe=e=>{i7(e),a7(e),gT(e.b),_T(e.b,16),vT(e.b),SC(e.d),CC(e.d,16),wC(e.d)},a7=A(38,r7,e=>e._._),o7=j(17,e=>O(e.l,`title`,e._.a2?`Close find`:e._.a1?e._.d===`diff`?`Find in review`:`Find in terminal`:`Find unavailable on this page`),2),s7=h(0,0,e=>{S(e.e,[g5,{_bE:e._.d===`nav`}]),O(e.e,`aria-pressed`,e._.d===`nav`?`true`:`false`),o7(e)}),Nfe=m(15,`<!><!><!>`,`b%`,0,wfe),Pfe=s(`q10`,e=>{_(e.e,`click`,function(){e._.g?.()}),_(e.l,`click`,function(){e._.v?e._.v?.findOpen?e._.v.closeFind():(e._.v.openFind(),Tfe(e)()):e._.d===`diff`&&e._.r?.()}),_(e.n,`pointerdown`,function(e){e.preventDefault()}),_(e.n,`click`,function(){e._.v?.setKeyboard(!e._.v?.keyboard)}),_(e.p,`pointerdown`,function(e){e.preventDefault()}),_(e.p,`toggle`,function(t,n){t.newState===`open`&&requestAnimationFrame(()=>{let t=e.j?.getBoundingClientRect();t&&(n.style.bottom=`auto`,n.style.right=`0.5rem`,n.style.left=`auto`,n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`)})})}),Ffe=e=>{s7._(e),l7._(e),u7._(e),d7._(e),f7._(e),p7._(e),m7._(e),h7._(e),Bfe._(e),Hfe._(e),S(e.a,`_bx`),S(e.b,`_by`),Tue(e.f),Eue(e.f,16),Due(e.f),S(e.h,`_bB`),S(e.j,g5),Mde(e.k),Nde(e.k,16),Pde(e.k),Me(e.m),tt(e.m,16),en(e.m),Lde(e.o),Rde(e.o,16),zde(e.o),S(e.p,`_bG`),Nfe(e,[sfe,(e,t)=>String(t)]),Pfe(e)},Ife=p(6,((e,t)=>`<a>${e}</a><a>${t}</a>`)(mT,bC),((e,t)=>` D/${e}&l D/${t}&l`)(hT,xC),Mfe),Lfe=p(7,Aue,(e=>`/${e}&`)(jue),kfe),c7=j(16,e=>Lfe(e,e._.h&&e._.j?0:1)),l7=h(0,0,e=>{Ife(e,+!e._.h),c7(e)}),u7=h(0,0,c7),Rfe=p(8,`<span aria-hidden=true><span> </span></span>`,` D D `,Ofe),d7=h(0,0,e=>Rfe(e,+!e._.q)),zfe=p(2,b4,(e=>`0${e}&`)(x4),Efe),f7=h(0,0,e=>{O(e.j,`title`,e._.v?`More keys`:`Keys unavailable on this page`),O(e.j,`disabled`,!e._.v),O(e.n,`title`,e._.v?e._.v?.keyboard?`Hide keyboard`:`Show keyboard`:`Keyboard unavailable on this page`),O(e.n,`disabled`,!e._.v),zfe(e,+!e._.v)}),p7=h(0,0,e=>S(e.n,[g5,{_bE:!!e._.a0}])),m7=h(0,0,e=>{O(e.l,`disabled`,!e._.a1),o7(e)}),h7=h(0,0,e=>{S(e.d,[`_bz`,{_bA:e._.a2}]),S(e.l,[g5,{_bE:e._.a2}]),O(e.l,`aria-pressed`,e._.a2?`true`:`false`),o7(e)}),Bfe=h(0,0,e=>{O(e.j,`aria-controls`,e._.a8),O(e.p,`id`,e._.a8)}),Vfe=s(`q9`,e=>{_(e.j,`pointerdown`,function(t){t.preventDefault(),e._.aa=!!e.p?.matches(`:popover-open`)}),_(e.j,`click`,function(){let t=e.p;t&&(e._.aa?t.hidePopover():t.showPopover())})}),Hfe=h(0,0,Vfe),Ufe=p(0,((e,t,n,r)=>`<div><div><!><div><button title=Workspaces>${e}</button><!><div></div><!><button aria-haspopup=dialog>${t}</button><button>${n}</button><button>${r}</button></div><div popover=auto></div></div></div>`)(Cue,Ade,Ae,Fde),((e,t,n,r)=>` D D%b D D/${e}&l%b b%b D/${t}&l D/${n}&l D/${r}&m m`)(wue,jde,Ke,Ide),Ffe),Wfe=a(18,e=>Ufe(e,+!e.s));s(`q11`,e=>Wfe(e,Ye()));var Gfe=w(27,m7),g7=j(22,e=>Gfe(e,!!e.v||e.d===`diff`)),Kfe=w(28,h7),_7=j(23,e=>Kfe(e,e.v?e.v?.findOpen:e.d===`diff`&&!!e.f),2),qfe=w(33),Jfe=j(32,e=>qfe(e,S7(e)),2),Yfe=k(q5),Xfe=w(21,e=>{tpe(e,e.v?.findOpen),npe(e,e.v?.findTick),rpe(e,e.v?.keyboard),g7(e),_7(e),Jfe(e),f7(e),Yfe(e)}),v7=j(20,e=>Xfe(e,e.t?e.e??null:null)),Zfe=k(n7),Qfe=w(19,e=>{v7(e),Zfe(e)}),$fe=k(i7),epe=w(3,e=>{Qfe(e,e.d==null||e.d===`term`),g7(e),_7(e),s7(e),$fe(e)}),tpe=w(24,k(J5)),npe=w(25,k(Y5)),rpe=w(26,p7),ipe=w(4,v7),ape=w(5,_7),ope=k(a7),spe=w(7,e=>{l7(e),ope(e)}),cpe=k(Z5),lpe=w(8,e=>{upe(e,e.i?.length),cpe(e)}),upe=w(9,u7),dpe=w(10,k(Q5)),fpe=w(11,k($5)),ppe=w(14,k(e7)),mpe=w(15,k(t7)),hpe=k(X5),gpe=w(16,e=>{d7(e),hpe(e)}),y7=e=>function(){e._._.v.closeFind()},b7=e=>function(t,n){e._._.v.runFind(t,n)},x7=e=>function(t){t||e._._.v.closeFind()},S7=e=>t=>{e.a5(),e.v?.send(t);let n={};n.delay=setTimeout(()=>{n.repeat=setInterval(()=>e.v?.send(t),ofe)},K5),e.a4=n};n(`q4`,y7),n(`q3`,b7),n(`q2`,x7),n(`q1`,S7),n(`q0`,e=>()=>{let t=e.a4;t&&(clearTimeout(t.delay),clearInterval(t.repeat),e.a4=null)});var C7={name:``,accent:``},_pe=6,w7=A(101,e=>b(e.a,e._._.at),e=>e._._),vpe=we(`c39`,` `,` `,w7),ype=e=>{Gt(e.a),lt(e.a,vpe(e)),Rt(e.a,C9(e)),ot(e.a),Te(e.a),St(e.a),Zt(e.a),mt(e.a),Xe(e.a,{})},T7=h(3,0,e=>{rx(e.b,e._.a5?e._.a5?.preferredAgent:`shell`),Qx(e.b,e._.a5?e._.a5?.agents:[]),Hx(e.b,e._.a5?e._.a5?.instance:C7),Ux(e.b,E9(e)),ax(e.b,T9(e)),ex(e.b,w9(e))}),bpe=s(`c40`,e=>_(e.d,`click`,function(){ut(!0),v9(e._,!1)})),xpe=e=>{T7._(e),E7._(e),S(e.a,`_j`),Tb(e.b),Zb(e.b,D9(e)),Yx(e.b),Xx(e.b),S(e.c,`_k`),S(e.d,`_q`),bpe(e)},E7=h(3,0,e=>Tv(e.b,e._.ap)),D7=j(7,e=>jle(e.b,e._.h===e._._.x||!e._._.x?e._._.y:void 0),2),O7=j(8,e=>Sle(e.b,e._.h===e._._.x?e._._.z??null:null),2),k7=j(9,e=>Ile(e.b,e._.h===e._._.x?e._._.a0??null:null),2),A7=j(10,e=>Lle(e.b,e._.h===e._._.x?e._._.a1??null:null),2),j7=j(11,e=>Rle(e.b,e._.h===e._._.x?e._._.a2??null:null),2),Spe=A(87,e=>{D7(e),O7(e),k7(e),A7(e),j7(e)},e=>e._._),Cpe=e=>{Spe(e),wpe(e),Tpe(e),Epe(e),Dpe(e),Ope(e),P7(e),F7(e),I7(e),R7(e),B7(e),V7(e),H7(e),U7(e),W7(e),G7(e),K7._(e),J7._(e),Y7._(e),S(e.a,`_i`),ble(e.b),$le(e.b,j9(e)),hue(e.b,A9(e)),Xle(e.b,k9(e)),Yle(e.b,O9(e))},wpe=A(88,D7,e=>e._._),Tpe=A(89,O7,e=>e._._),Epe=A(90,k7,e=>e._._),Dpe=A(91,A7,e=>e._._),Ope=A(92,j7,e=>e._._),M7=j(2,e=>{lue(e.b,N9(e)),uue(e.b,M9(e))}),N7=j(3,e=>yue(e.b,P9(e))),P7=A(93,e=>{vue(e.b,e._._.a3),M7(e),N7(e)},e=>e._._),F7=A(94,e=>Wle(e.b,e._._.a4),e=>e._._),I7=A(95,e=>{oue(e.b,e._._.a5?e._._.a5?.preferredAgent:`shell`),due(e.b,e._._.a5?e._._.a5?.agents:[]),fue(e.b,e._._.a5?e._._.a5?.instance:C7),pue(e.b,L9(e)),gue(e.b,I9(e)),_ue(e.b,F9(e))},e=>e._._),L7=j(4,e=>Jle(e.b,e._._.ag&&e._.i)),R7=A(97,L7,e=>e._._),z7=j(5,e=>tue(e.b,e._.i?e._._.ak:null)),B7=A(98,z7,e=>e._._),V7=A(99,e=>nue(e.b,e._._.al),e=>e._._),H7=A(100,e=>mue(e.b,e._._.ap),e=>e._._),U7=A(102,e=>Qle(e.b,e._._.au),e=>e._._),W7=A(103,M7,e=>e._._),G7=A(104,e=>{sue(e.b,R9(e)),N7(e)},e=>e._._),K7=h(0,0,e=>Fle(e.b,e._.e)),q7=j(6,e=>Zle(e.b,z9(e))),J7=h(0,0,e=>{D7(e),O7(e),k7(e),A7(e),j7(e),q7(e)}),Y7=h(0,0,e=>{O(e.a,`inert`,!e._.i),qle(e.b,e._.i),L7(e),q7(e),z7(e)}),kpe=w(8,Y7),X7=j(5,e=>kpe(e,!e.e||e.e?.id===e._.ab)),Ape=p(0,(e=>`<div>${e}</div>`)(rce),(e=>` D/${e}&l`)(ice),Cpe),Z7=j(6,e=>Ape(e,e.e||!e.c?0:1)),jpe=w(4,e=>{Npe(e,e.e?.id),X7(e),Z7(e),K7(e)}),Q7=j(3,e=>jpe(e,e.c?e._.a3.find(t=>t.id===e.c)??null:null)),$7=i(6,Q7),Mpe=e=>{$7._(e),e9._(e)},e9=i(6,X7),Npe=w(7,J7),Ppe=w(2,e=>{Q7(e),Z7(e)}),Fpe=(e,t)=>Ppe(e,t[0]),Ipe=s(`c41`,e=>d(e,{onMount:function(){let t=new AbortController,n=t.signal,r=e=>{let t=e instanceof Error?e:Error(String(e)),n=(t.stack||``).split(`
83
83
  `).slice(1,3).join(` `).trim();gn(`Something broke in the page: ${t.message}${n?` (${n})`:``}`)};window.addEventListener(`vite:preloadError`,t=>{t.preventDefault(),yt(n),S9(e,`This page is out of date — reloading as soon as the server is back.`)},{signal:n}),window.addEventListener(`error`,e=>{!e.error&&!e.filename||r(e.error??e.message)},{signal:n}),window.addEventListener(`unhandledrejection`,e=>r(e.reason),{signal:n}),document.addEventListener(`click`,t=>{if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let n=t.target?.closest?.(`a[href]`);if(!n||n.target&&n.target!==`_self`||n.hasAttribute(`download`))return;let r=new URL(n.href,location.href);if(r.origin!==location.origin)return;let i=Be(r);i&&(t.preventDefault(),e.b9(i))},{capture:!0,signal:n}),window.addEventListener(`popstate`,()=>{let t=Be(location);t&&(e.an=t,e.b9(t))},{signal:n}),e.aq&&N(`/api/setup`,{signal:n}).then(t=>{_9(e,t),nn(t.github)}).catch(()=>{});let i={abort:t,statusStale:!1,statusDebounce:void 0};ree(e.r),pee(n);let a=(t,n)=>{n&&xt(t,n),e.b9({workspaceId:t,view:`term`,sessionId:n??null})},o=new URLSearchParams(location.search);o.get(`ws`)&&(a(o.get(`ws`),o.get(`session`)),history.replaceState(null,``,`/`)),We()&&document.addEventListener(`click`,e=>{let t=e.target?.closest?.(`a[target="_blank"][href^="http"]`);t&&(e.preventDefault(),Fe(t.href))},{capture:!0,signal:n}),navigator.serviceWorker?.addEventListener(`message`,e=>{e.data?.type===`open-session`&&a(e.data.workspaceId,e.data.sessionId)},{signal:n});let s=()=>{if(document.hidden){i.statusStale=!0;return}i.statusStale=!1,e.b6()};return document.addEventListener(`visibilitychange`,()=>{document.hidden||(i.statusStale=!1,e.b6(!0))},{signal:n}),Bt().addEventListener(`workspaces.changed`,t=>{let n=t.data;Array.isArray(n)?e.az(n):e.b0(),s()},{signal:n}),Bt().addEventListener(`sessions.changed`,t=>{let n=t.data;if(n?.workspaceId&&Array.isArray(n.sessions)){e.b1(n.workspaceId,n.sessions),i.statusStale=!1;return}clearTimeout(i.statusDebounce),i.statusDebounce=setTimeout(s,300)},{signal:n}),Bt().addEventListener(`status.changed`,t=>{let n=t.data;n&&(h9(e,{...e.a4,...n}),i.statusStale=!1)},{signal:n}),Object.keys(e.a4).length||N(`/api/status`,{signal:n}).then(t=>{h9(e,{...e.a4,...t})}).catch(()=>{}),window.addEventListener(`keydown`,t=>{if(!(t.metaKey||t.ctrlKey)||t.shiftKey||t.altKey||t.key.length!==1||t.key<`1`||t.key>`9`)return;t.preventDefault(),t.stopPropagation();let n=Jn(e.a3)[Number(t.key)-1];n&&e.b7(n.id)},{capture:!0,signal:n}),wn(n),i},onDestroy:function(){this.abort.abort(),clearTimeout(this.statusDebounce)}})),t9=j(72,Ipe,10),Lpe=w(86,e=>qae(e.f,B9(e))),n9=j(74,e=>{Rae(e.f,U9(e)),moe(e.f,H9(e)),Lpe(e,V9(e))}),Rpe=w(71,e=>{hoe(e.f,W9(e)),t9(e),n9(e)}),r9=j(70,e=>Rpe(e,G9(e)),3),zpe=k(G7),Bpe=w(69,e=>{r9(e),t9(e),zpe(e)}),i9=j(40,e=>Bpe(e,K9(e))),a9=j(80,e=>S(e.e,[`_f`,{_g:!e.ab&&e.ar,_e:e.bh===`nav`}]),2),Vpe=w(79,e=>{Kae(e.f,e.bh),epe(e.h,e.bh),a9(e)}),o9=j(76,e=>Vpe(e,e.av??e.ai??(e.bb||e.y!==`term`?e.y:`new`)),3),Hpe=(e,t)=>{doe(e.f,t),lpe(e.h,t),_me(e,t?.[0]?.id)},s9=j(75,e=>Hpe(e,e.aw??(e.bb?e.a4[e.bb?.id]?.sessions??null:[])),2),Upe=(e,t)=>{Lae(e.f,t),dpe(e.h,t)},c9=j(84,e=>Upe(e,e.au?e.au?.tab:e.aj??e.z??(e.bb&&e.r[`tab:${e.bb?.id}`])??e.bl??null),5),Wpe=w(73,e=>{Pae(e.f,e.bb),hme(e,e.bb?.id),gme(e,e.bb?.name),o9(e),s9(e),c9(e),n9(e)}),l9=j(38,e=>Wpe(e,e.ab?e.a3.find(t=>t.id===e.ab)??null:null)),Gpe=k(P7),u9=a(29,e=>{eoe(e.f,e.a3),i9(e),r9(e),t9(e),l9(e),$7(e),Gpe(e)}),Kpe=w(62,t9),qpe=k(W7),Jpe=w(61,e=>{Kpe(e,q9(e)),t9(e),qpe(e)}),Ype=m(6,`<!><!><!>`,`b%`,Mpe,Fpe),d9=j(41,e=>{Jpe(e,J9(e)),Ype(e,[e.ab?e.ad:[null],e=>e??``])}),f9=a(39,e=>{d9(e),i9(e)}),Xpe=p(3,(e=>`<div>${e}<div><button type=button>Later, go to workspaces</button></div></div>`)(Rs),(e=>` D/${e}& D m`)(zs),xpe),p9=j(54,e=>Xpe(e,!e.ab&&e.ar?0:1)),m9=a(37,e=>{f9(e,e.ab?[e.ab]:[]),d9(e),r9(e),p9(e),l9(e),a9(e),e9(e)}),Zpe=w(63,t9),Qpe=k(F7),h9=a(30,e=>{roe(e.f,e.a4),Zpe(e,Y9(e)),t9(e),s9(e),Qpe(e)}),$pe=k(I7),g9=a(31,e=>{coe(e.f,e.a5?(e.a5?.instance).name:``),ooe(e.f,e.a5?(e.a5?.instance).accent:``),foe(e.f,e.a5?e.a5?.agents:[]),fpe(e.h,e.a5?e.a5?.agents:[]),$pe(e),T7(e)}),eme=k(H7),_9=a(51,e=>{loe(e.f,!e.ap||e.ap?.ready),eme(e),E7(e)}),v9=a(53,e=>{p9(e),a9(e)}),y9=a(42,k(R7)),tme=s(`c42`,e=>{e.ah&&typeof history<`u`&&(nee(e.ah,e.an),e.an=e.ah)}),nme=j(50,tme),rme=a(43,e=>{ime(e,e.ah?.view),ame(e,e.ah?.sessionId),nme(e)}),ime=w(44,o9),ame=w(45,c9),b9=a(46,k(B7)),ome=k(V7),x9=a(47,e=>{r9(e),ome(e)}),sme=p(1,Ot,(e=>`/${e}&`)(Vt),ype),cme=k(w7),S9=a(55,e=>{sme(e,+!e.at),cme(e)}),lme=k(U7),ume=a(56,e=>{poe(e.f,$9(e)),goe(e.f,Q9(e)),ppe(e.h,Z9(e)),mpe(e.h,X9(e)),dme(e,e.au?.view),fme(e,e.au?.sessions),pme(e,e.au?.keys),mme(e,e.au?.reviewFindOpen),c9(e),lme(e)}),dme=w(57,o9),fme=w(58,s9),pme=w(59,e=>ipe(e.h,e.ax??null)),mme=w(60,e=>ape(e.h,!!e.ay)),hme=(e,t)=>spe(e.h,t??null),gme=(e,t)=>gpe(e.h,t),_me=w(83,c9),C9=e=>function(){S9(e._,null)},w9=e=>function(t){e._.a5&&g9(e._,{...e._.a5,agents:t})},T9=e=>function(t){e._.a5&&g9(e._,{...e._.a5,preferredAgent:t})},E9=e=>function(t){e._.a5&&g9(e._,{...e._.a5,instance:t})},D9=e=>function(t){_9(e._,t),t.ready&&v9(e._,!1)},O9=e=>function(){y9(e._._,!1)},k9=e=>function(){y9(e._._,!0)},A9=e=>function(t){_9(e._._,t)},j9=e=>t=>{ume(e._._,t)},M9=e=>function(t){e._._.az(e._._.a3.filter(e=>e.id!==t))},N9=e=>function(t){e._._.az(e._._.a3.map(e=>e.id===t.id?t:e))},P9=e=>function(t){e._._.a3.some(e=>e.id===t.id)||u9(e._._,[t,...e._._.a3]),y9(e._._,!1),e._._.b7(t.id)},F9=e=>function(t){e._._.a5&&g9(e._._,{...e._._.a5,agents:t})},I9=e=>function(t){e._._.a5&&g9(e._._,{...e._._.a5,preferredAgent:t})},L9=e=>function(t){e._._.a5&&g9(e._._,{...e._._.a5,instance:t})},R9=e=>function(t){e._._.b7(t)},z9=e=>function(t){e._.i&&rme(e._._,{workspaceId:e._.h??null,view:t.view,sessionId:t.sessionId,pr:t.pr,scope:t.scope,file:t.file})},B9=e=>function(t){t===`term`&&e.bo()},V9=e=>()=>{e.bb?e.b9({workspaceId:e.bb?.id,view:`term`}):e.b9({workspaceId:null,view:`new`})},H9=e=>function(t){e.bb&&e.b9({workspaceId:e.bb?.id,view:`diff`,pr:t??null})},U9=e=>function(t){e.bb&&e.b9({workspaceId:e.bb?.id,view:`term`,sessionId:t})},W9=e=>function(t){e.b9({workspaceId:t,view:`diff`})},G9=e=>t=>{let n=t.workspaceId||e.ab;if(n&&!e.a3.some(e=>e.id===n&&!e.pending)&&(n=e.ab&&e.a3.some(t=>t.id===e.ab&&!t.pending)?e.ab:null),!n){t.view===`new`&&v9(e,!1),b9(e,{...t,workspaceId:null}),x9(e,+e.al+1);return}e.b7(n),b9(e,{...t,workspaceId:n}),x9(e,+e.al+1)},K9=e=>async t=>{let n=e.a3.find(e=>e.id===t);n?.pending&&n.status===`active`||(n?.status===`archived`&&(await N(`/api/workspaces/${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}).catch(()=>{}),u9(e,e.a3.map(e=>e.id===t?{...e,status:`active`}:e))),m9(e,t),y9(e,!1),b9(e,null),f9(e,e.ad.filter(e=>e!==t).concat(t)),e.ad?.length>_pe&&f9(e,e.ad.slice(-6)),st(t))},q9=e=>async()=>{try{e.az(await N(`/api/workspaces`))}catch(t){if(Nt(t))return;S9(e,`Loading workspaces failed: ${t.message||String(t)}`)}},J9=e=>t=>{u9(e,t);let n=new Set(t.filter(qn).map(e=>e.id));if(f9(e,e.ad.filter(e=>n.has(e))),e.ab&&!n.has(e.ab)){let n=e.ad[e.ad?.length-1]||null;if(!n){for(let e of t)if(qn(e)){n=e.id;break}}m9(e,n),n&&!e.ad.includes(n)&&f9(e,e.ad.concat(n)),st(e.ab)}},Y9=e=>(t,n)=>{let r=e.a4[t];if(!r)return;let i=n.map(e=>e.state).filter(e=>!!e?.alive);h9(e,{...e.a4,[t]:{...r,sessions:n.map(e=>({id:e.id,agent:e.agent,title:e.title,state:e.state||{alive:!1}})),agents:i.length,working:i.filter(e=>e.phase===`working`).length,waiting:i.filter(e=>e.phase===`waiting`).length}})},X9=e=>function(t,n){e.au?.renameSession(t,n)},Z9=e=>function(t){e.au?.closeSession(t)},Q9=e=>function(t,n){e.au?.renameSession(t.id,n)},$9=e=>function(t,n){e.au?.newSession(t,n)};n(`c6`,C9),n(`c10`,w9),n(`c9`,T9),n(`c7`,E9),n(`c8`,D9),n(`c31`,O9),n(`c30`,k9),n(`c23`,A9),n(`c21`,j9),n(`c29`,M9),n(`c28`,N9),n(`c32`,P9),n(`c26`,F9),n(`c25`,I9),n(`c22`,L9),n(`c27`,R9),n(`c24`,z9),n(`c13`,B9),n(`c11`,V9),n(`c19`,H9),n(`c12`,U9),n(`c20`,W9),n(`c5`,G9),n(`c4`,K9),n(`c1`,q9),n(`c0`,J9),n(`c2`,Y9),n(`c37`,X9),n(`c36`,Z9),n(`c18`,Q9),n(`c16`,$9),n(`c38`,e=>function(){e.au?.toggleReviewFind()}),n(`c35`,e=>function(t){e.bb&&e.b9({workspaceId:e.bb?.id,view:`term`,sessionId:t})}),n(`c34`,e=>function(t){e.bb&&e.au?.newSession(e.bb?.id,t)}),n(`c33`,e=>function(){e.au?.toggleNav()}),n(`c17`,e=>function(t){e.au?.closeSession(t)}),n(`c15`,e=>function(t){e.b7(t)}),n(`c14`,e=>function(t){S9(e,t)}),n(`c3`,e=>(t=!1)=>(e.b3||=t,(e.b4??=Un(async()=>{let t=e.b3;e.b3=!1;try{h9(e,await N(`/api/status${t?`?fresh`:``}`))}catch(e){if(!Nt(e))throw e}}))()));