sliccy 6.50.2 → 6.50.3

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/dist/ui/assets/{account-store-B2Q3qrsv.js → account-store-D7tSicSE.js} +1 -1
  2. package/dist/ui/assets/{account-store-DFJwW9Je.js → account-store-DKMtT2JC.js} +1 -1
  3. package/dist/ui/assets/{adobe-CPGM4MTQ.js → adobe-B-GjqH1h.js} +1 -1
  4. package/dist/ui/assets/{adobe-2kBEhX-M.js → adobe-CK5PYEYz.js} +1 -1
  5. package/dist/ui/assets/{apply-layout-CsfGPY_8.js → apply-layout-D2Zc7vmK.js} +1 -1
  6. package/dist/ui/assets/{apps-C76zVvib.js → apps-rFmEm_6K.js} +1 -1
  7. package/dist/ui/assets/{azure-openai-DEOsCdCW.js → azure-openai-Cwlp28IW.js} +1 -1
  8. package/dist/ui/assets/{azure-openai-bVKgcbkQ.js → azure-openai-DPCgmfC2.js} +1 -1
  9. package/dist/ui/assets/{cerebras-CeXWHgCr.js → cerebras-BGKaKn2b.js} +1 -1
  10. package/dist/ui/assets/{cerebras-RbzIATnO.js → cerebras-ByWUjox5.js} +1 -1
  11. package/dist/ui/assets/{connect-surface-DsPPyl32.js → connect-surface-CQNnaO-u.js} +1 -1
  12. package/dist/ui/assets/{fs-BsIAA9tI.js → fs-9LQPhbp0.js} +2 -2
  13. package/dist/ui/assets/{fs-Bkvc-yLM.js → fs-CPILA7Wm.js} +1 -1
  14. package/dist/ui/assets/{github-IKQH4ooG.js → github-BHNMThRm.js} +2 -2
  15. package/dist/ui/assets/{github-copilot-DNFGdRgj.js → github-copilot-BD7bzLkG.js} +1 -1
  16. package/dist/ui/assets/{github-copilot-soCNb0zP.js → github-copilot-DXMjggiV.js} +1 -1
  17. package/dist/ui/assets/{github-install-Q7vWaI2f.js → github-install-DX47Gdow.js} +1 -1
  18. package/dist/ui/assets/{github-D_6Vu6JA.js → github-vNGEl3hm.js} +1 -1
  19. package/dist/ui/assets/{github-zip-Dj6dpaji.js → github-zip-BgCgPsej.js} +1 -1
  20. package/dist/ui/assets/{kernel-worker-D0N4XaFG.js → kernel-worker-G0BzLclH.js} +25 -25
  21. package/dist/ui/assets/{local-llm-Dv5jqTx6.js → local-llm-BUTfOKOz.js} +1 -1
  22. package/dist/ui/assets/{local-llm-CH6-Q3m3.js → local-llm-BzqhmTUM.js} +1 -1
  23. package/dist/ui/assets/{main-BJTB99U1.js → main-c1LwCm2F.js} +3 -3
  24. package/dist/ui/assets/{mount-gKbhcxPV.js → mount-6X6LBksw.js} +1 -1
  25. package/dist/ui/assets/{mount-CBaTTaFk.js → mount-DqJIDAyg.js} +2 -2
  26. package/dist/ui/assets/{mount-recovery-BNwhr3zl.js → mount-recovery-DLuj5Hm3.js} +1 -1
  27. package/dist/ui/assets/{new-session-DTvBj-jQ.js → new-session-DZzCJxsB.js} +2 -2
  28. package/dist/ui/assets/{oauth-bootstrap-prB7kojQ.js → oauth-bootstrap-DyYP2MzE.js} +2 -2
  29. package/dist/ui/assets/{openai-codex-BrRxrMb9.js → openai-codex-B1i4nHPF.js} +1 -1
  30. package/dist/ui/assets/{openai-codex-D5rg9g_9.js → openai-codex-BgYgMXaN.js} +1 -1
  31. package/dist/ui/assets/{openrouter-DTDzacde.js → openrouter-Dzw7X-fI.js} +1 -1
  32. package/dist/ui/assets/{openrouter-oauth-Yz6qk0qe.js → openrouter-oauth-BB9dfFxL.js} +1 -1
  33. package/dist/ui/assets/{openrouter-oauth-cHhSgEWl.js → openrouter-oauth-DR6hEcn4.js} +1 -1
  34. package/dist/ui/assets/{openrouter-Dqs7BTj7.js → openrouter-uyQT3ECu.js} +1 -1
  35. package/dist/ui/assets/{panel-rpc-handlers-DAXZPiWc.js → panel-rpc-handlers-CWQEXVQe.js} +2 -2
  36. package/dist/ui/assets/{panelize-shell-BMdmcGbz.js → panelize-shell-Dcm_mMXL.js} +1 -1
  37. package/dist/ui/assets/{provider-DHgT1EeU.js → provider-COX3VR2V.js} +1 -1
  38. package/dist/ui/assets/{provider-CF2wc8lA.js → provider-DQmuUx08.js} +2 -2
  39. package/dist/ui/assets/{provider-settings-Dl3_9pCb.js → provider-settings-C5M8P2ou.js} +1 -1
  40. package/dist/ui/assets/{provider-settings-BPcF53D-.js → provider-settings-Dk7m60Jd.js} +1 -1
  41. package/dist/ui/assets/{provider-store-access-Du9C8DJu.js → provider-store-access-6ibkOW5c.js} +2 -2
  42. package/dist/ui/assets/provider-store-access-CVssDNTL.js +1 -0
  43. package/dist/ui/assets/{providers-B4wgM5IJ.js → providers-C5IIjFVy.js} +2 -2
  44. package/dist/ui/assets/{providers-O6GECS2q.js → providers-Vo5ACErz.js} +1 -1
  45. package/dist/ui/assets/{quick-llm-Z7gNdVcQ.js → quick-llm-D6molxF5.js} +1 -1
  46. package/dist/ui/assets/{recovery-screen-Bxi1Kao-.js → recovery-screen-AMqnz4wE.js} +1 -1
  47. package/dist/ui/assets/{redirect-uri-NpCN5SbS.js → redirect-uri-CgRN5J63.js} +1 -1
  48. package/dist/ui/assets/{session-freezer-BtAXCWtS.js → session-freezer-Hu9SsDAJ.js} +3 -3
  49. package/dist/ui/assets/{setup-feature-flags-remote-BUHJq5vm.js → setup-feature-flags-remote-DO_XYYoo.js} +1 -1
  50. package/dist/ui/assets/{setup-standalone-prelude-Dc33JPTm.js → setup-standalone-prelude-2wKrKoYu.js} +1 -1
  51. package/dist/ui/assets/{setup-sudo-D47GFcQf.js → setup-sudo-Y-osnngJ.js} +2 -2
  52. package/dist/ui/assets/{skills-BmUv2-lB.js → skills-kF1VixkA.js} +1 -1
  53. package/dist/ui/assets/{src-CgkZ61-B.js → src-DIOmISn-.js} +26 -121
  54. package/dist/ui/assets/{store-BwswTe7D.js → store-CKpwM8HR.js} +1 -1
  55. package/dist/ui/assets/{store-C3nOaY89.js → store-mjB04zKf.js} +1 -1
  56. package/dist/ui/assets/{sudo-CdXvGV01.js → sudo-C7YlzwOe.js} +1 -1
  57. package/dist/ui/assets/{upgrade-detection-ZZ1xwlc5.js → upgrade-detection-C3ma5NML.js} +1 -1
  58. package/dist/ui/assets/{wc-attach-Dvi0x3r3.js → wc-attach-BsvU_RxO.js} +2 -2
  59. package/dist/ui/assets/{wc-extension-SMzqlv_5.js → wc-extension-Brq1a5PM.js} +2 -2
  60. package/dist/ui/assets/{wc-follower-BbYsSo_f.js → wc-follower-BjJx9GoV.js} +3 -3
  61. package/dist/ui/assets/{wc-live-BTOkt4P9.js → wc-live-B3l3VVUs.js} +3 -3
  62. package/dist/ui/assets/{wc-nav-uOw8G-Wy.js → wc-nav-COissXNo.js} +2 -2
  63. package/dist/ui/assets/{wc-onboarding-BF3BSuPm.js → wc-onboarding-CVGbnSOS.js} +2 -2
  64. package/dist/ui/assets/{wc-placeholder-BzV2ccWV.js → wc-placeholder-BpZ4I3B9.js} +2 -2
  65. package/dist/ui/assets/{wc-settings-BsGxla31.js → wc-settings-BPtY6rgp.js} +2 -2
  66. package/dist/ui/assets/{wc-shell-DEMBDISv.js → wc-shell-B3mX733B.js} +3 -3
  67. package/dist/ui/assets/{wc-sprinkles-B1tPVDYI.js → wc-sprinkles-CZMwa4bD.js} +2 -2
  68. package/dist/ui/assets/{wc-tray-B6DPxULW.js → wc-tray-CidtnvNU.js} +2 -2
  69. package/dist/ui/assets/{xai-grok-6EysWGMb.js → xai-grok-CFkqwKsl.js} +1 -1
  70. package/dist/ui/assets/{xai-grok-C5Rqs_Ug.js → xai-grok-J0t7eyp9.js} +1 -1
  71. package/dist/ui/index.html +6 -6
  72. package/dist/ui/packages/webapp/index.html +6 -6
  73. package/package.json +1 -1
  74. package/dist/ui/assets/provider-store-access-DmtqNEXB.js +0 -1
@@ -3832,28 +3832,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
3832
3832
  object-fit: cover;
3833
3833
  display: block;
3834
3834
  }
3835
- `),Sa=class extends HTMLElement{static observedAttributes=[`initials`,`name`,`src`,`email`,`size`,`label`];#e;#t=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[xa],this.addEventListener(`click`,this.#i),this.addEventListener(`keydown`,this.#a)}connectedCallback(){this.hasAttribute(`role`)||this.setAttribute(`role`,`button`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`0`),this.#o()}disconnectedCallback(){this.#t++}attributeChangedCallback(e,t,n){e===`size`&&this.#r(n),this.isConnected&&this.#o()}get initials(){return this.getAttribute(`initials`)}set initials(e){e==null?this.removeAttribute(`initials`):this.setAttribute(`initials`,e)}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get size(){return this.getAttribute(`size`)}set size(e){e==null?this.removeAttribute(`size`):this.setAttribute(`size`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get resolvedInitials(){let e=this.initials;return e!=null&&e.trim()!==``?e.trim().slice(0,2).toUpperCase():wa(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await Ca(t)}?s=${this.#n()}&d=404`:null}#n(){let e=this.getBoundingClientRect().width;return Math.max(1,Math.round((e>0?e:30)*2))}#r(e){e==null||e.trim()===``?this.style.removeProperty(`--avatar-size`):this.style.setProperty(`--avatar-size`,e)}#i=()=>{this.dispatchEvent(new CustomEvent(`slicc-avatar-click`,{bubbles:!0,composed:!0}))};#a=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())};#o(){let e=++this.#t,t=this.src,n=this.email,r=this.resolvedInitials,i=this.label??this.name??(r===`?`?`Account`:r);this.setAttribute(`aria-label`,i);let a=[w(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=w(`img`,{class:`img`,part:`image`,src:t,alt:i});n.addEventListener(`load`,()=>{e===this.#t&&this.#e.querySelector(`.me`)?.classList.add(`has-img`)}),n.addEventListener(`error`,()=>{e===this.#t&&(n.remove(),this.#e.querySelector(`.me`)?.classList.remove(`has-img`))}),a.push(n)}let o=w(`div`,{class:`me`,part:`avatar`},w(`slot`,null,...a));this.#e.replaceChildren(o),!t&&n&&this.#s(n,e)}#s(e,t){this.gravatarUrl(e).then(e=>{if(!e||t!==this.#t)return;let n=new Image;n.onload=()=>{if(t!==this.#t||!this.isConnected)return;let n=this.#e.querySelector(`.me`);n&&(n.style.backgroundImage=`url("${e}")`,n.classList.add(`has-img`))},n.src=e}).catch(()=>{})}};async function Ca(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}function wa(e){if(!e)return``;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}S(`slicc-avatar`,Sa);var Ta=T(`
3836
- :host { display: inline-flex; flex: 0 0 auto; }
3837
- :host([hidden]) { display: none; }
3838
- .col {
3839
- flex: 0 0 auto;
3840
- border: 1px solid var(--line);
3841
- background: var(--canvas);
3842
- border-radius: 8px;
3843
- height: 28px;
3844
- padding: 0 9px;
3845
- cursor: pointer;
3846
- color: var(--txt-2);
3847
- font-family: var(--ui);
3848
- font-size: 12px;
3849
- display: inline-flex;
3850
- align-items: center;
3851
- line-height: 1;
3852
- }
3853
- .col:hover { background: var(--ghost); color: var(--ink); }
3854
- .icon { display: inline-flex; place-items: center; pointer-events: none; }
3855
- .icon svg { display: block; }
3856
- `),Ea=`panel-right-close`,Da=`Collapse`,Oa=16;S(`slicc-collapse-btn`,class extends HTMLElement{static observedAttributes=[`label`,`icon`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ta]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get label(){return this.getAttribute(`label`)??Da}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??Ea}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}#n(){let e=this.label,t=n(this.icon,{size:Oa,part:`icon`}),r=w(`button`,{class:`col`,part:`button`,type:`button`,"aria-label":e,title:e},w(`slot`,null,w(`span`,{class:`icon`},t)));r.addEventListener(`click`,this.#r),this.#t=r,this.#e.replaceChildren(r)}#r=()=>{this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0}))}});var ka=5,Aa=1;function ja(e){return e.replace(`claude-`,``)}function Ma(e){return e==null||e===0?``:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}function Na(e){if(e.length<=ka)return{individuals:e,buckets:[]};let t=[...e].sort((e,t)=>t.cost-e.cost),n=t.slice(0,ka),r=[],i={count:0,cost:0};for(let e of t.slice(ka))i.count+=1,i.cost+=e.cost,i.cost>=Aa&&(r.push(i),i={count:0,cost:0});if(i.count>0){let e=r.at(-1);e?(e.count+=i.count,e.cost+=i.cost):r.push(i)}return{individuals:n,buckets:r}}var Pa=T(`
3835
+ `),Sa=class extends HTMLElement{static observedAttributes=[`initials`,`name`,`src`,`email`,`size`,`label`];#e;#t=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[xa],this.addEventListener(`click`,this.#i),this.addEventListener(`keydown`,this.#a)}connectedCallback(){this.hasAttribute(`role`)||this.setAttribute(`role`,`button`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`0`),this.#o()}disconnectedCallback(){this.#t++}attributeChangedCallback(e,t,n){e===`size`&&this.#r(n),this.isConnected&&this.#o()}get initials(){return this.getAttribute(`initials`)}set initials(e){e==null?this.removeAttribute(`initials`):this.setAttribute(`initials`,e)}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get size(){return this.getAttribute(`size`)}set size(e){e==null?this.removeAttribute(`size`):this.setAttribute(`size`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get resolvedInitials(){let e=this.initials;return e!=null&&e.trim()!==``?e.trim().slice(0,2).toUpperCase():wa(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await Ca(t)}?s=${this.#n()}&d=404`:null}#n(){let e=this.getBoundingClientRect().width;return Math.max(1,Math.round((e>0?e:30)*2))}#r(e){e==null||e.trim()===``?this.style.removeProperty(`--avatar-size`):this.style.setProperty(`--avatar-size`,e)}#i=()=>{this.dispatchEvent(new CustomEvent(`slicc-avatar-click`,{bubbles:!0,composed:!0}))};#a=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())};#o(){let e=++this.#t,t=this.src,n=this.email,r=this.resolvedInitials,i=this.label??this.name??(r===`?`?`Account`:r);this.setAttribute(`aria-label`,i);let a=[w(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=w(`img`,{class:`img`,part:`image`,src:t,alt:i});n.addEventListener(`load`,()=>{e===this.#t&&this.#e.querySelector(`.me`)?.classList.add(`has-img`)}),n.addEventListener(`error`,()=>{e===this.#t&&(n.remove(),this.#e.querySelector(`.me`)?.classList.remove(`has-img`))}),a.push(n)}let o=w(`div`,{class:`me`,part:`avatar`},w(`slot`,null,...a));this.#e.replaceChildren(o),!t&&n&&this.#s(n,e)}#s(e,t){this.gravatarUrl(e).then(e=>{if(!e||t!==this.#t)return;let n=new Image;n.onload=()=>{if(t!==this.#t||!this.isConnected)return;let n=this.#e.querySelector(`.me`);n&&(n.style.backgroundImage=`url("${e}")`,n.classList.add(`has-img`))},n.src=e}).catch(()=>{})}};async function Ca(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}function wa(e){if(!e)return``;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}S(`slicc-avatar`,Sa);var Ta=5,Ea=1;function Da(e){return e.replace(`claude-`,``)}function Oa(e){return e==null||e===0?``:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}function ka(e){if(e.length<=Ta)return{individuals:e,buckets:[]};let t=[...e].sort((e,t)=>t.cost-e.cost),n=t.slice(0,Ta),r=[],i={count:0,cost:0};for(let e of t.slice(Ta))i.count+=1,i.cost+=e.cost,i.cost>=Ea&&(r.push(i),i={count:0,cost:0});if(i.count>0){let e=r.at(-1);e?(e.count+=i.count,e.cost+=i.cost):r.push(i)}return{individuals:n,buckets:r}}var Aa=T(`
3857
3836
  :host {
3858
3837
  position: absolute;
3859
3838
  top: calc(100% + 8px);
@@ -3977,7 +3956,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
3977
3956
  font-variant-numeric: tabular-nums;
3978
3957
  color: var(--ink);
3979
3958
  }
3980
- `);S(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Pa]}connectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#i()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get models(){return this.#t}set models(e){this.#t=e,this.isConnected&&this.#i()}get scoops(){return this.#n}set scoops(e){this.#n=e,this.isConnected&&this.#i()}get total(){return this.#r}set total(e){this.#r=e!=null&&Number.isFinite(e)?e:null,this.isConnected&&this.#i()}#i(){let e=[];if(this.#t.length>0){let t=this.#t.map(e=>{let t=Ma(e.tokens);return w(`div`,{class:`model-row`},w(`span`,{class:`model-name`},ja(e.model)),t?w(`span`,{class:`model-tokens`},t):!1,w(`span`,{class:`model-cost`},`$${e.cost.toFixed(2)}`))});e.push(w(`div`,{class:`section section--models`},w(`div`,{class:`section-title`},`BY MODEL`),...t))}if(this.#n.length>0){let t=Na(this.#n),n=t.individuals.map(e=>w(`div`,{class:`scoop-row`},w(`span`,{class:`scoop-name`},e.name),w(`span`,{class:`scoop-cost`},`$${e.cost.toFixed(2)}`))),r=t.buckets.map(e=>w(`div`,{class:`bucket-row`,part:`bucket`},`${e.count} ${e.count===1?`agent`:`agents`} · $${e.cost.toFixed(2)}`));e.push(w(`div`,{class:`section section--scoops`},w(`div`,{class:`section-title`},`BY AGENT`),...n,...r))}let t=this.#r??this.#t.reduce((e,t)=>e+t.cost,0);e.push(w(`div`,{class:`total-row`},w(`span`,{class:`total-label`},`Total`),w(`span`,{class:`total-cost`},`$${t.toFixed(2)}`)));let n=w(`div`,{class:`card`},...e);this.#e.replaceChildren(n)}});var Fa=T(`
3959
+ `);S(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Aa]}connectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#i()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get models(){return this.#t}set models(e){this.#t=e,this.isConnected&&this.#i()}get scoops(){return this.#n}set scoops(e){this.#n=e,this.isConnected&&this.#i()}get total(){return this.#r}set total(e){this.#r=e!=null&&Number.isFinite(e)?e:null,this.isConnected&&this.#i()}#i(){let e=[];if(this.#t.length>0){let t=this.#t.map(e=>{let t=Oa(e.tokens);return w(`div`,{class:`model-row`},w(`span`,{class:`model-name`},Da(e.model)),t?w(`span`,{class:`model-tokens`},t):!1,w(`span`,{class:`model-cost`},`$${e.cost.toFixed(2)}`))});e.push(w(`div`,{class:`section section--models`},w(`div`,{class:`section-title`},`BY MODEL`),...t))}if(this.#n.length>0){let t=ka(this.#n),n=t.individuals.map(e=>w(`div`,{class:`scoop-row`},w(`span`,{class:`scoop-name`},e.name),w(`span`,{class:`scoop-cost`},`$${e.cost.toFixed(2)}`))),r=t.buckets.map(e=>w(`div`,{class:`bucket-row`,part:`bucket`},`${e.count} ${e.count===1?`agent`:`agents`} · $${e.cost.toFixed(2)}`));e.push(w(`div`,{class:`section section--scoops`},w(`div`,{class:`section-title`},`BY AGENT`),...n,...r))}let t=this.#r??this.#t.reduce((e,t)=>e+t.cost,0);e.push(w(`div`,{class:`total-row`},w(`span`,{class:`total-label`},`Total`),w(`span`,{class:`total-cost`},`$${t.toFixed(2)}`)));let n=w(`div`,{class:`card`},...e);this.#e.replaceChildren(n)}});var ja=T(`
3981
3960
  :host {
3982
3961
  display: flex;
3983
3962
  align-items: center;
@@ -4006,7 +3985,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
4006
3985
  min-width: 0;
4007
3986
  background: var(--line, #e5e5e5);
4008
3987
  }
4009
- `);S(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Fa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label??w(`slot`);this.#e.replaceChildren(w(`span`,{class:`label`,part:`label`},e))}});var Ia=`CLI float`;function La(e){if(e==null)return null;let t=e.trim();if(t===``)return null;let n=Number.parseFloat(t.replace(/^\$/,``));return Number.isFinite(n)?n:null}function Ra(e){let t=La(e);return t==null?null:`$${t.toFixed(2)}`}function za(e){return`${Ra(e)??`$0.00`}/h`}var Ba=720,Va=T(`
3988
+ `);S(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ja]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label??w(`slot`);this.#e.replaceChildren(w(`span`,{class:`label`,part:`label`},e))}});var Ma=`CLI float`;function Na(e){if(e==null)return null;let t=e.trim();if(t===``)return null;let n=Number.parseFloat(t.replace(/^\$/,``));return Number.isFinite(n)?n:null}function Pa(e){let t=Na(e);return t==null?null:`$${t.toFixed(2)}`}function Fa(e){return`${Pa(e)??`$0.00`}/h`}var Ia=720,La=T(`
4010
3989
  :host {
4011
3990
  position: relative;
4012
3991
  display: inline-flex;
@@ -4123,7 +4102,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
4123
4102
  @media (prefers-reduced-motion: reduce) {
4124
4103
  .tip { transition: none; }
4125
4104
  }
4126
- `);S(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`rate`,`spent`];#e;#t=null;#n=null;#r=[];#i=[];#a;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Va]}connectedCallback(){this.#c();let e=this.closest(`slicc-nav`);e&&typeof ResizeObserver<`u`&&(this.#t=new ResizeObserver(()=>this.#s()),this.#t.observe(e))}disconnectedCallback(){this.#t?.disconnect(),this.#t=null,clearTimeout(this.#a)}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.#c()}get label(){return this.getAttribute(`label`)??Ia}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get linked(){return this.hasAttribute(`linked`)}set linked(e){this.toggleAttribute(`linked`,!!e)}get online(){return this.hasAttribute(`online`)}set online(e){this.toggleAttribute(`online`,!!e)}get spent(){return this.getAttribute(`spent`)}set spent(e){e==null?this.removeAttribute(`spent`):this.setAttribute(`spent`,String(e))}get rate(){return this.getAttribute(`rate`)}set rate(e){e==null?this.removeAttribute(`rate`):this.setAttribute(`rate`,String(e))}get costModels(){return this.#r}set costModels(e){this.#r=e,this.#n&&(this.#n.models=e)}get costScoops(){return this.#i}set costScoops(e){this.#i=e,this.#n&&(this.#n.scoops=e)}#o(){let e=[this.label];return e.push(za(this.rate)),e.push(`recency-weighted session avg`),e.push(this.online?`online`:`offline`),e.join(` · `)}#s(){let e=this.closest(`slicc-nav`),t=e?getComputedStyle(e):null;(e?e.clientWidth-Number.parseFloat(t?.paddingLeft??`0`)-Number.parseFloat(t?.paddingRight??`0`):1/0)<=Ba?this.setAttribute(`title`,this.#o()):this.removeAttribute(`title`)}#c(){let e=[];this.online&&e.push(w(`span`,{class:`fdot`,part:`dot`}));let[t,...r]=this.label.split(` · `),i=[w(`span`,{class:`runtime`},t)];r.length>0&&i.push(w(`span`,{class:`detail`},` · ${r.join(` · `)}`)),e.push(w(`span`,{class:`label`,part:`label`},w(`slot`,null,...i))),e.push(w(`span`,{class:`sep`,part:`sep`}));let a=w(`span`,{class:`spent`,part:`spent rate`},n(`circle-dollar-sign`,{size:12}),w(`span`,{class:`amount`},za(this.rate)));a.addEventListener(`mouseenter`,()=>this.#l()),a.addEventListener(`mouseleave`,()=>this.#u()),e.push(a),e.push(w(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},this.#o())),this.#n=null,this.#e.replaceChildren(...e),this.#s()}#l(){if(clearTimeout(this.#a),!this.#n){let e=document.createElement(`slicc-cost-overlay`);e.models=this.#r,e.scoops=this.#i,e.total=La(this.spent),e.addEventListener(`mouseenter`,()=>this.#l()),e.addEventListener(`mouseleave`,()=>this.#u()),this.#e.appendChild(e),this.#n=e}this.#n.toggleAttribute(`open`,!0)}#u(){this.#a=setTimeout(()=>{this.#n&&this.#n.removeAttribute(`open`)},150)}});var Ha=T(`
4105
+ `);S(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`rate`,`spent`];#e;#t=null;#n=null;#r=[];#i=[];#a;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[La]}connectedCallback(){this.#c();let e=this.closest(`slicc-nav`);e&&typeof ResizeObserver<`u`&&(this.#t=new ResizeObserver(()=>this.#s()),this.#t.observe(e))}disconnectedCallback(){this.#t?.disconnect(),this.#t=null,clearTimeout(this.#a)}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.#c()}get label(){return this.getAttribute(`label`)??Ma}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get linked(){return this.hasAttribute(`linked`)}set linked(e){this.toggleAttribute(`linked`,!!e)}get online(){return this.hasAttribute(`online`)}set online(e){this.toggleAttribute(`online`,!!e)}get spent(){return this.getAttribute(`spent`)}set spent(e){e==null?this.removeAttribute(`spent`):this.setAttribute(`spent`,String(e))}get rate(){return this.getAttribute(`rate`)}set rate(e){e==null?this.removeAttribute(`rate`):this.setAttribute(`rate`,String(e))}get costModels(){return this.#r}set costModels(e){this.#r=e,this.#n&&(this.#n.models=e)}get costScoops(){return this.#i}set costScoops(e){this.#i=e,this.#n&&(this.#n.scoops=e)}#o(){let e=[this.label];return e.push(Fa(this.rate)),e.push(`recency-weighted session avg`),e.push(this.online?`online`:`offline`),e.join(` · `)}#s(){let e=this.closest(`slicc-nav`),t=e?getComputedStyle(e):null;(e?e.clientWidth-Number.parseFloat(t?.paddingLeft??`0`)-Number.parseFloat(t?.paddingRight??`0`):1/0)<=Ia?this.setAttribute(`title`,this.#o()):this.removeAttribute(`title`)}#c(){let e=[];this.online&&e.push(w(`span`,{class:`fdot`,part:`dot`}));let[t,...r]=this.label.split(` · `),i=[w(`span`,{class:`runtime`},t)];r.length>0&&i.push(w(`span`,{class:`detail`},` · ${r.join(` · `)}`)),e.push(w(`span`,{class:`label`,part:`label`},w(`slot`,null,...i))),e.push(w(`span`,{class:`sep`,part:`sep`}));let a=w(`span`,{class:`spent`,part:`spent rate`},n(`circle-dollar-sign`,{size:12}),w(`span`,{class:`amount`},Fa(this.rate)));a.addEventListener(`mouseenter`,()=>this.#l()),a.addEventListener(`mouseleave`,()=>this.#u()),e.push(a),e.push(w(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},this.#o())),this.#n=null,this.#e.replaceChildren(...e),this.#s()}#l(){if(clearTimeout(this.#a),!this.#n){let e=document.createElement(`slicc-cost-overlay`);e.models=this.#r,e.scoops=this.#i,e.total=Na(this.spent),e.addEventListener(`mouseenter`,()=>this.#l()),e.addEventListener(`mouseleave`,()=>this.#u()),this.#e.appendChild(e),this.#n=e}this.#n.toggleAttribute(`open`,!0)}#u(){this.#a=setTimeout(()=>{this.#n&&this.#n.removeAttribute(`open`)},150)}});var Ra=T(`
4127
4106
  :host { display: inline-grid; }
4128
4107
  :host([hidden]) { display: none; }
4129
4108
  .iconbtn {
@@ -4152,7 +4131,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
4152
4131
  .iconbtn:disabled:hover { background: var(--canvas); color: var(--txt-2); }
4153
4132
  .icon { display: grid; place-items: center; pointer-events: none; }
4154
4133
  .icon svg { display: block; }
4155
- `),Ua=`plus`,Wa=16;S(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ha]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??Ua}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){e?this.setAttribute(`disabled`,``):this.removeAttribute(`disabled`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label,t=w(`slot`,null,w(`span`,{class:`icon`},n(this.icon,{size:Wa,part:`icon`}))),r=w(`button`,{type:`button`,class:`iconbtn`,part:`button`,"aria-label":e??void 0,title:e??void 0,disabled:this.disabled},t);this.#e.replaceChildren(r)}});var Ga=`
4134
+ `),za=`plus`,Ba=16;S(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ra]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??za}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){e?this.setAttribute(`disabled`,``):this.removeAttribute(`disabled`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label,t=w(`slot`,null,w(`span`,{class:`icon`},n(this.icon,{size:Ba,part:`icon`}))),r=w(`button`,{type:`button`,class:`iconbtn`,part:`button`,"aria-label":e??void 0,title:e??void 0,disabled:this.disabled},t);this.#e.replaceChildren(r)}});var Va=`
4156
4135
  slicc-pane {
4157
4136
  display: flex;
4158
4137
  flex-direction: column;
@@ -4191,26 +4170,7 @@ slicc-pane .slicc-pane__body {
4191
4170
  min-height: 0;
4192
4171
  overflow: auto;
4193
4172
  }
4194
- `,Ka=`slicc-pane-style`;function qa(e){if(e.getElementById(Ka))return;let t=e.createElement(`style`);t.id=Ka,t.textContent=Ga,(e.head??e.documentElement).appendChild(t)}S(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){qa(this.ownerDocument),this.#r()}attributeChangedCallback(e,t,n){e===`elevated`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-pane-change`,{bubbles:!0,composed:!0,detail:{elevated:n!==null}}))}get elevated(){return this.hasAttribute(`elevated`)}set elevated(e){e?this.setAttribute(`elevated`,``):this.removeAttribute(`elevated`)}#r(){if(this.#n)return;this.#n=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-pane__surface`))),t=this.ownerDocument.createElement(`div`);t.className=`slicc-pane__surface`,t.setAttribute(`part`,`surface`),this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-pane__header`,this.#e.setAttribute(`part`,`header`),this.#t=this.ownerDocument.createElement(`div`),this.#t.className=`slicc-pane__body`,this.#t.setAttribute(`part`,`body`),t.append(this.#e,this.#t);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`header`?this.#e.appendChild(t):this.#t.appendChild(t);this.appendChild(t)}});function Ja(e){return e===`tool`||e===`sprinkle`}var Ya=T(`
4195
- :host { display: none; flex: 0 0 auto; }
4196
- :host([kind="tool"]), :host([kind="sprinkle"]) { display: inline-block; }
4197
- .ptag {
4198
- font-family: var(--ui);
4199
- font-size: 10px;
4200
- color: var(--violet);
4201
- background: color-mix(in srgb, var(--violet) 12%, #fff);
4202
- border: 1px solid color-mix(in srgb, var(--violet) 30%, var(--line));
4203
- border-radius: 26px;
4204
- padding: 2px 9px;
4205
- flex: 0 0 auto;
4206
- }
4207
- :host-context(body.dark) .ptag,
4208
- :host-context(.dark) .ptag,
4209
- :host-context([data-theme="dark"]) .ptag {
4210
- background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
4211
- border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
4212
- }
4213
- `);S(`slicc-pane-tag`,class extends HTMLElement{static observedAttributes=[`kind`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ya]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){let e=this.getAttribute(`kind`);return Ja(e)?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}#t(){let e=w(`span`,{class:`ptag`,part:`tag`},w(`slot`,null,this.kind??``));this.#e.replaceChildren(e)}});var Xa=`
4173
+ `,Ha=`slicc-pane-style`;function Ua(e){if(e.getElementById(Ha))return;let t=e.createElement(`style`);t.id=Ha,t.textContent=Va,(e.head??e.documentElement).appendChild(t)}S(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){Ua(this.ownerDocument),this.#r()}attributeChangedCallback(e,t,n){e===`elevated`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-pane-change`,{bubbles:!0,composed:!0,detail:{elevated:n!==null}}))}get elevated(){return this.hasAttribute(`elevated`)}set elevated(e){e?this.setAttribute(`elevated`,``):this.removeAttribute(`elevated`)}#r(){if(this.#n)return;this.#n=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-pane__surface`))),t=this.ownerDocument.createElement(`div`);t.className=`slicc-pane__surface`,t.setAttribute(`part`,`surface`),this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-pane__header`,this.#e.setAttribute(`part`,`header`),this.#t=this.ownerDocument.createElement(`div`),this.#t.className=`slicc-pane__body`,this.#t.setAttribute(`part`,`body`),t.append(this.#e,this.#t);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`header`?this.#e.appendChild(t):this.#t.appendChild(t);this.appendChild(t)}});var Wa=`
4214
4174
  slicc-press-button {
4215
4175
  display: inline-flex;
4216
4176
  }
@@ -4302,7 +4262,7 @@ slicc-press-button {
4302
4262
  animation: none;
4303
4263
  }
4304
4264
  }
4305
- `,Za=`slicc-press-button-style`;function Qa(e){if(e.getElementById(Za))return;let t=e.createElement(`style`);t.id=Za,t.textContent=Xa,(e.head??e.documentElement).appendChild(t)}var $a=`slicc-press-btn`,eo=`is-squish`,to=`is-wobble`;S(`slicc-press-button`,class extends HTMLElement{static get observedAttributes(){return[`label`,`tooltip`,`tooltip-pos`,`disabled`]}innerBtn=null;pressLayer=null;handle=null;initialized=!1;pendingShortTimer=null;pendingShortEvent=null;animEndListener=null;connectedCallback(){Qa(this.ownerDocument),this.initialized?this.handle===null&&this.attachGesture():this.initialize(),this.syncAttributes()}disconnectedCallback(){this.handle?.destroy(),this.handle=null,this.clearPendingShort(),this.clearRipple(),this.clearAnimation()}attributeChangedCallback(){this.initialized&&this.syncAttributes()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get tooltip(){return this.getAttribute(`tooltip`)}set tooltip(e){e==null?this.removeAttribute(`tooltip`):this.setAttribute(`tooltip`,e)}setIcon(e){this.initialized||this.initialize();let t=this.innerBtn,n=this.pressLayer;for(let e of Array.from(t.childNodes))e!==n&&e.remove();let r=new DOMParser().parseFromString(e,`text/html`).body;for(;r.firstChild;)t.appendChild(r.firstChild)}focus(e){this.initialized||this.initialize(),this.innerBtn?.focus(e)}initialize(){this.initialized=!0;let e=w(`span`,{class:`${$a}__press-layer`,part:`press-layer`}),t=w(`button`,{type:`button`,class:`${$a}__btn`,part:`button`},e);for(;this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t),this.innerBtn=t,this.pressLayer=e,this.attachGesture()}syncAttributes(){let e=this.innerBtn;if(!e)return;let t=this.getAttribute(`label`);t==null?e.removeAttribute(`aria-label`):e.setAttribute(`aria-label`,t);let n=this.getAttribute(`tooltip`);n==null?delete e.dataset.tooltip:e.dataset.tooltip=n;let r=this.getAttribute(`tooltip-pos`);r==null?delete e.dataset.tooltipPos:e.dataset.tooltipPos=r,this.hasAttribute(`disabled`)?e.setAttribute(`disabled`,``):e.removeAttribute(`disabled`)}longPressMs(){let e=this.getAttribute(`long-press-ms`);if(e==null)return or;let t=Number(e);return Number.isFinite(t)&&t>0?t:or}doubleClickMs(){let e=this.getAttribute(`double-click-ms`);if(e==null)return 350;let t=Number(e);return Number.isFinite(t)&&t>0?t:350}doubleClickDisabled(){return this.hasAttribute(`disable-double-click`)}emit(e,t){e===`short-click`?this.playAnimation(eo):e===`double-click`&&this.playAnimation(to);let n=t?{sourceEvent:t}:{};this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}))}playAnimation(e){let t=this.innerBtn;if(!t)return;this.clearAnimation(),t.offsetWidth,t.classList.add(e);let n=e=>{e.target===t&&this.clearAnimation()};this.animEndListener=n,t.addEventListener(`animationend`,n)}clearAnimation(){let e=this.innerBtn;e&&(this.animEndListener&&=(e.removeEventListener(`animationend`,this.animEndListener),null),e.classList.remove(eo,to))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=sr(this,{longPressMs:this.longPressMs(),onPressStart:e=>this.paintRipple(e),onPressEnd:()=>this.clearRipple(),onLongPress:()=>{if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`);return}this.emit(`long-press`)},onShortClick:e=>{if(this.doubleClickDisabled()){this.emit(`short-click`,e);return}if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`,e);return}this.pendingShortEvent=e,this.pendingShortTimer=setTimeout(()=>{this.pendingShortTimer=null;let e=this.pendingShortEvent;this.pendingShortEvent=null,this.emit(`short-click`,e??void 0)},this.doubleClickMs())}})}paintRipple(e){this.clearRipple();let t=this.pressLayer;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top,a=Math.max(r,n.width-r),o=Math.max(i,n.height-i),s=Math.ceil(Math.hypot(a,o))+2,c=this.ownerDocument.createElement(`span`);c.className=`${$a}__press`,c.style.left=`${r}px`,c.style.top=`${i}px`,c.style.width=`0px`,c.style.height=`0px`,c.style.transitionDuration=`${this.longPressMs()}ms`,t.appendChild(c),requestAnimationFrame(()=>{c.isConnected&&(c.style.width=`${s*2}px`,c.style.height=`${s*2}px`)})}clearRipple(){let e=this.pressLayer;if(e)for(;e.firstChild;)e.firstChild.remove()}});var no=T(`
4265
+ `,Ga=`slicc-press-button-style`;function Ka(e){if(e.getElementById(Ga))return;let t=e.createElement(`style`);t.id=Ga,t.textContent=Wa,(e.head??e.documentElement).appendChild(t)}var qa=`slicc-press-btn`,Ja=`is-squish`,Ya=`is-wobble`;S(`slicc-press-button`,class extends HTMLElement{static get observedAttributes(){return[`label`,`tooltip`,`tooltip-pos`,`disabled`]}innerBtn=null;pressLayer=null;handle=null;initialized=!1;pendingShortTimer=null;pendingShortEvent=null;animEndListener=null;connectedCallback(){Ka(this.ownerDocument),this.initialized?this.handle===null&&this.attachGesture():this.initialize(),this.syncAttributes()}disconnectedCallback(){this.handle?.destroy(),this.handle=null,this.clearPendingShort(),this.clearRipple(),this.clearAnimation()}attributeChangedCallback(){this.initialized&&this.syncAttributes()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get tooltip(){return this.getAttribute(`tooltip`)}set tooltip(e){e==null?this.removeAttribute(`tooltip`):this.setAttribute(`tooltip`,e)}setIcon(e){this.initialized||this.initialize();let t=this.innerBtn,n=this.pressLayer;for(let e of Array.from(t.childNodes))e!==n&&e.remove();let r=new DOMParser().parseFromString(e,`text/html`).body;for(;r.firstChild;)t.appendChild(r.firstChild)}focus(e){this.initialized||this.initialize(),this.innerBtn?.focus(e)}initialize(){this.initialized=!0;let e=w(`span`,{class:`${qa}__press-layer`,part:`press-layer`}),t=w(`button`,{type:`button`,class:`${qa}__btn`,part:`button`},e);for(;this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t),this.innerBtn=t,this.pressLayer=e,this.attachGesture()}syncAttributes(){let e=this.innerBtn;if(!e)return;let t=this.getAttribute(`label`);t==null?e.removeAttribute(`aria-label`):e.setAttribute(`aria-label`,t);let n=this.getAttribute(`tooltip`);n==null?delete e.dataset.tooltip:e.dataset.tooltip=n;let r=this.getAttribute(`tooltip-pos`);r==null?delete e.dataset.tooltipPos:e.dataset.tooltipPos=r,this.hasAttribute(`disabled`)?e.setAttribute(`disabled`,``):e.removeAttribute(`disabled`)}longPressMs(){let e=this.getAttribute(`long-press-ms`);if(e==null)return or;let t=Number(e);return Number.isFinite(t)&&t>0?t:or}doubleClickMs(){let e=this.getAttribute(`double-click-ms`);if(e==null)return 350;let t=Number(e);return Number.isFinite(t)&&t>0?t:350}doubleClickDisabled(){return this.hasAttribute(`disable-double-click`)}emit(e,t){e===`short-click`?this.playAnimation(Ja):e===`double-click`&&this.playAnimation(Ya);let n=t?{sourceEvent:t}:{};this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}))}playAnimation(e){let t=this.innerBtn;if(!t)return;this.clearAnimation(),t.offsetWidth,t.classList.add(e);let n=e=>{e.target===t&&this.clearAnimation()};this.animEndListener=n,t.addEventListener(`animationend`,n)}clearAnimation(){let e=this.innerBtn;e&&(this.animEndListener&&=(e.removeEventListener(`animationend`,this.animEndListener),null),e.classList.remove(Ja,Ya))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=sr(this,{longPressMs:this.longPressMs(),onPressStart:e=>this.paintRipple(e),onPressEnd:()=>this.clearRipple(),onLongPress:()=>{if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`);return}this.emit(`long-press`)},onShortClick:e=>{if(this.doubleClickDisabled()){this.emit(`short-click`,e);return}if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`,e);return}this.pendingShortEvent=e,this.pendingShortTimer=setTimeout(()=>{this.pendingShortTimer=null;let e=this.pendingShortEvent;this.pendingShortEvent=null,this.emit(`short-click`,e??void 0)},this.doubleClickMs())}})}paintRipple(e){this.clearRipple();let t=this.pressLayer;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top,a=Math.max(r,n.width-r),o=Math.max(i,n.height-i),s=Math.ceil(Math.hypot(a,o))+2,c=this.ownerDocument.createElement(`span`);c.className=`${qa}__press`,c.style.left=`${r}px`,c.style.top=`${i}px`,c.style.width=`0px`,c.style.height=`0px`,c.style.transitionDuration=`${this.longPressMs()}ms`,t.appendChild(c),requestAnimationFrame(()=>{c.isConnected&&(c.style.width=`${s*2}px`,c.style.height=`${s*2}px`)})}clearRipple(){let e=this.pressLayer;if(e)for(;e.firstChild;)e.firstChild.remove()}});var Xa=T(`
4306
4266
  :host { display: inline-flex; }
4307
4267
  :host([hidden]) { display: none; }
4308
4268
 
@@ -4332,7 +4292,7 @@ slicc-press-button {
4332
4292
  outline: 2px solid var(--violet);
4333
4293
  outline-offset: 2px;
4334
4294
  }
4335
- `);S(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[no]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get hue(){return this.hasAttribute(`hue`)}set hue(e){this.toggleAttribute(`hue`,!!e)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,!!e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.color,t=[`sw`];this.hue&&t.push(`hue`),this.selected&&t.push(`on`);let n=w(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},w(`slot`));e&&n.style.setProperty(`--swatch-color`,e),n.addEventListener(`click`,this.#n),this.#e.replaceChildren(n)}#n=()=>{this.selected=!0,this.dispatchEvent(new CustomEvent(`select`,{detail:{color:this.color},bubbles:!0,composed:!0}))}});var ro=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),io=T(`
4295
+ `);S(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Xa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get hue(){return this.hasAttribute(`hue`)}set hue(e){this.toggleAttribute(`hue`,!!e)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,!!e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.color,t=[`sw`];this.hue&&t.push(`hue`),this.selected&&t.push(`on`);let n=w(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},w(`slot`));e&&n.style.setProperty(`--swatch-color`,e),n.addEventListener(`click`,this.#n),this.#e.replaceChildren(n)}#n=()=>{this.selected=!0,this.dispatchEvent(new CustomEvent(`select`,{detail:{color:this.color},bubbles:!0,composed:!0}))}});var Za=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),Qa=T(`
4336
4296
  :host {
4337
4297
  display: inline-flex;
4338
4298
  vertical-align: middle;
@@ -4392,7 +4352,7 @@ slicc-press-button {
4392
4352
  :host-context(.dark)[hue="amber"] .tag, :host-context([data-theme="dark"])[hue="amber"] .tag { background: color-mix(in srgb, var(--amber) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--amber) 38%, var(--line)); }
4393
4353
  :host-context(.dark)[hue="waffle"] .tag, :host-context([data-theme="dark"])[hue="waffle"] .tag { background: color-mix(in srgb, var(--waffle) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--waffle) 38%, var(--line)); }
4394
4354
  :host-context(.dark)[hue="green"] .tag, :host-context([data-theme="dark"])[hue="green"] .tag { background: color-mix(in srgb, var(--green) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--green) 38%, var(--line)); }
4395
- `);S(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[io]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&ro.has(e)?e:null}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get dot(){return this.hasAttribute(`dot`)}set dot(e){e?this.setAttribute(`dot`,``):this.removeAttribute(`dot`)}#t(){let e=this.label??w(`slot`),t=w(`span`,{class:`tag`,part:`tag`},this.dot?w(`span`,{class:`dot`,part:`dot`}):null,w(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var ao=T(`
4355
+ `);S(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Qa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&Za.has(e)?e:null}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get dot(){return this.hasAttribute(`dot`)}set dot(e){e?this.setAttribute(`dot`,``):this.removeAttribute(`dot`)}#t(){let e=this.label??w(`slot`),t=w(`span`,{class:`tag`,part:`tag`},this.dot?w(`span`,{class:`dot`,part:`dot`}):null,w(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var $a=T(`
4396
4356
  :host {
4397
4357
  position: fixed;
4398
4358
  inset: 0;
@@ -4487,7 +4447,7 @@ video {
4487
4447
  color: var(--txt-3, #717171);
4488
4448
  font-size: 13px;
4489
4449
  }
4490
- `),V=null,H=null,oo=class e extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ao]}disconnectedCallback(){for(let e of this.#t)URL.revokeObjectURL(e);this.#t.length=0,V===this&&(V=null)}static open(t){e.close();let r=document.createElement(`slicc-quick-look`),i=t.path.split(`/`).pop()||t.path,a=w(`div`,{class:`backdrop`}),o=w(`button`,{class:`x`});o.appendChild(n(`x`,{size:14}));let s=w(`div`,{class:`header`},i,o),c=w(`div`,{class:`content`});c.appendChild(r.#r(t));let l=w(`div`,{class:`panel`},s,c);l.tabIndex=-1,r.#e.append(a,l),document.body.appendChild(r),V=r,l.focus(),a.addEventListener(`click`,()=>r.#n(`backdrop`)),o.addEventListener(`click`,()=>r.#n(`close-button`)),H&&document.removeEventListener(`keydown`,H),H=e=>{e.key===`Escape`&&r.#n(`escape`)},document.addEventListener(`keydown`,H)}static close(){if(V){for(let e of V.#t)URL.revokeObjectURL(e);V.remove(),V=null}H&&=(document.removeEventListener(`keydown`,H),null)}#n(t){this.dispatchEvent(new CustomEvent(`quick-look-close`,{bubbles:!0,composed:!0,detail:{reason:t}})),e.close()}#r(e){let t=e.mimeType;if(t.startsWith(`text/`)||t===`application/json`)return w(`pre`,null,typeof e.content==`string`?e.content:new TextDecoder().decode(e.content));if(t.startsWith(`image/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`img`),i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r.alt=e.path.split(`/`).pop()||``,r}if(t.startsWith(`audio/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`audio`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}if(t.startsWith(`video/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`video`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}return w(`div`,{class:`fallback`},`Preview not available for this file type (${so(typeof e.content==`string`?e.content.length:e.content.byteLength)})`)}};function so(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}S(`slicc-quick-look`,oo);var co=`
4450
+ `),V=null,H=null,eo=class e extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[$a]}disconnectedCallback(){for(let e of this.#t)URL.revokeObjectURL(e);this.#t.length=0,V===this&&(V=null)}static open(t){e.close();let r=document.createElement(`slicc-quick-look`),i=t.path.split(`/`).pop()||t.path,a=w(`div`,{class:`backdrop`}),o=w(`button`,{class:`x`});o.appendChild(n(`x`,{size:14}));let s=w(`div`,{class:`header`},i,o),c=w(`div`,{class:`content`});c.appendChild(r.#r(t));let l=w(`div`,{class:`panel`},s,c);l.tabIndex=-1,r.#e.append(a,l),document.body.appendChild(r),V=r,l.focus(),a.addEventListener(`click`,()=>r.#n(`backdrop`)),o.addEventListener(`click`,()=>r.#n(`close-button`)),H&&document.removeEventListener(`keydown`,H),H=e=>{e.key===`Escape`&&r.#n(`escape`)},document.addEventListener(`keydown`,H)}static close(){if(V){for(let e of V.#t)URL.revokeObjectURL(e);V.remove(),V=null}H&&=(document.removeEventListener(`keydown`,H),null)}#n(t){this.dispatchEvent(new CustomEvent(`quick-look-close`,{bubbles:!0,composed:!0,detail:{reason:t}})),e.close()}#r(e){let t=e.mimeType;if(t.startsWith(`text/`)||t===`application/json`)return w(`pre`,null,typeof e.content==`string`?e.content:new TextDecoder().decode(e.content));if(t.startsWith(`image/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`img`),i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r.alt=e.path.split(`/`).pop()||``,r}if(t.startsWith(`audio/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`audio`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}if(t.startsWith(`video/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`video`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}return w(`div`,{class:`fallback`},`Preview not available for this file type (${to(typeof e.content==`string`?e.content.length:e.content.byteLength)})`)}};function to(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}S(`slicc-quick-look`,eo);var no=`
4491
4451
  .slicc-chatpane {
4492
4452
  flex: 1 1 0;
4493
4453
  width: 100%;
@@ -4528,7 +4488,7 @@ video {
4528
4488
  -webkit-mask-image: none;
4529
4489
  mask-image: none;
4530
4490
  }
4531
- `,lo=`slicc-chatpane-style`;function uo(e){if(e.getElementById(lo))return;let t=e.createElement(`style`);t.id=lo,t.textContent=co,(e.head??e.documentElement).appendChild(t)}var fo=[`slicc-chat-thread`,`slicc-composer`];S(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){uo(this.ownerDocument),this.classList.add(`slicc-chatpane`),this.setAttribute(`part`,`pane`),this.#t=!0,this.#n(),this.#r()}disconnectedCallback(){this.#e?.disconnect(),this.#e=null}attributeChangedCallback(e,t,n){e===`narrow`&&t!==n&&this.isConnected&&(this.#n(),this.dispatchEvent(new CustomEvent(`slicc-chatpane-narrow-change`,{detail:{narrow:this.narrow},bubbles:!0,composed:!0})))}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){e?this.setAttribute(`narrow`,``):this.removeAttribute(`narrow`)}get nav(){return this.querySelector(`:scope > slicc-nav`)}get thread(){return this.querySelector(`:scope > slicc-chat-thread`)}get composer(){return this.querySelector(`:scope > slicc-composer`)}#n(){if(!this.#t)return;let e=this.narrow;for(let t of fo)for(let n of this.querySelectorAll(`:scope > ${t}`))e?n.setAttribute(`open`,``):n.removeAttribute(`open`)}#r(){this.#e||(this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this,{childList:!0}))}});var po=`
4491
+ `,ro=`slicc-chatpane-style`;function io(e){if(e.getElementById(ro))return;let t=e.createElement(`style`);t.id=ro,t.textContent=no,(e.head??e.documentElement).appendChild(t)}var ao=[`slicc-chat-thread`,`slicc-composer`];S(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){io(this.ownerDocument),this.classList.add(`slicc-chatpane`),this.setAttribute(`part`,`pane`),this.#t=!0,this.#n(),this.#r()}disconnectedCallback(){this.#e?.disconnect(),this.#e=null}attributeChangedCallback(e,t,n){e===`narrow`&&t!==n&&this.isConnected&&(this.#n(),this.dispatchEvent(new CustomEvent(`slicc-chatpane-narrow-change`,{detail:{narrow:this.narrow},bubbles:!0,composed:!0})))}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){e?this.setAttribute(`narrow`,``):this.removeAttribute(`narrow`)}get nav(){return this.querySelector(`:scope > slicc-nav`)}get thread(){return this.querySelector(`:scope > slicc-chat-thread`)}get composer(){return this.querySelector(`:scope > slicc-composer`)}#n(){if(!this.#t)return;let e=this.narrow;for(let t of ao)for(let n of this.querySelectorAll(`:scope > ${t}`))e?n.setAttribute(`open`,``):n.removeAttribute(`open`)}#r(){this.#e||(this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this,{childList:!0}))}});var oo=`
4532
4492
  .slicc-shell { display: flex; flex: 1; min-height: 0; }
4533
4493
  .slicc-shell > slicc-dock-tree,
4534
4494
  .slicc-shell > .dock-tree {
@@ -4544,7 +4504,7 @@ video {
4544
4504
  and blur the rail's own opaque strip. */
4545
4505
  .slicc-shell > slicc-dock,
4546
4506
  .slicc-shell > .dock { flex: 0 0 48px; position: relative; z-index: 3; }
4547
- `,mo=`slicc-shell-style`;function ho(e){if(e.getElementById(mo))return;let t=e.createElement(`style`);t.id=mo,t.textContent=po,(e.head??e.documentElement).appendChild(t)}var go=`chat`;S(`slicc-shell`,class extends HTMLElement{#e=e=>{let t=e.detail?.placed;if(!Array.isArray(t))return;let n=t.some(e=>e!==go);this.querySelector(`slicc-chatpane`)?.toggleAttribute(`narrow`,n)};connectedCallback(){ho(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.addEventListener(`dock-tree-render`,this.#e)}disconnectedCallback(){this.removeEventListener(`dock-tree-render`,this.#e)}get dockTree(){return this.querySelector(`:scope > slicc-dock-tree, :scope > .dock-tree`)}get dock(){return this.querySelector(`:scope > slicc-dock, :scope > .dock`)}});var _o=`http://www.w3.org/2000/svg`,vo=18,yo=16,U={cx:55,cy:50,r:38},W={cx:145,cy:50,r:38},bo=1,xo=12,So=.72,Co=[.08,.36,.68,.94],wo=1372365086,To=2654435769,Eo=2246822507,Do=Date.UTC(2001,0,1),Oo={cone:{vb:`70 330 440 570`,eyes:{top:-18.5,left:17,width:70,height:44},zoom:3,glyph:96},scoop:{vb:`0 0 580 470`,eyes:{top:30,left:15,width:70,height:45},zoom:2.65,glyph:96}},ko={cone:`#D2691E`,scoop:`#FFB6C1`},Ao=T(`
4507
+ `,so=`slicc-shell-style`;function co(e){if(e.getElementById(so))return;let t=e.createElement(`style`);t.id=so,t.textContent=oo,(e.head??e.documentElement).appendChild(t)}var lo=`chat`;S(`slicc-shell`,class extends HTMLElement{#e=e=>{let t=e.detail?.placed;if(!Array.isArray(t))return;let n=t.some(e=>e!==lo);this.querySelector(`slicc-chatpane`)?.toggleAttribute(`narrow`,n)};connectedCallback(){co(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.addEventListener(`dock-tree-render`,this.#e)}disconnectedCallback(){this.removeEventListener(`dock-tree-render`,this.#e)}get dockTree(){return this.querySelector(`:scope > slicc-dock-tree, :scope > .dock-tree`)}get dock(){return this.querySelector(`:scope > slicc-dock, :scope > .dock`)}});var uo=`http://www.w3.org/2000/svg`,fo=18,po=16,U={cx:55,cy:50,r:38},W={cx:145,cy:50,r:38},mo=1,ho=12,go=.72,_o=[.08,.36,.68,.94],vo=1372365086,yo=2654435769,bo=2246822507,xo=Date.UTC(2001,0,1),So={cone:{vb:`70 330 440 570`,eyes:{top:-18.5,left:17,width:70,height:44},zoom:3,glyph:96},scoop:{vb:`0 0 580 470`,eyes:{top:30,left:15,width:70,height:45},zoom:2.65,glyph:96}},Co={cone:`#D2691E`,scoop:`#FFB6C1`},wo=T(`
4548
4508
  :host{display:block;width:26px;height:26px;pointer-events:none;}
4549
4509
  .avatar{position:relative;display:block;width:100%;height:100%;overflow:hidden;border-radius:7px;background:color-mix(in srgb,var(--slicc-agent-tabs-hue) 18%,transparent);}
4550
4510
  .icon-inner{position:absolute;inset:0;transform-origin:0 0;transform:translate(var(--tx),var(--ty)) scale(var(--zoom));}
@@ -4555,7 +4515,7 @@ video {
4555
4515
  :host([blink]) .eye-blink{transform-box:fill-box;transform-origin:center;animation:slicc-agent-avatar-blink 3.4s ease-in-out infinite;}
4556
4516
  :host([blink]) .eye-r{animation-duration:4.6s;}
4557
4517
  @media (prefers-reduced-motion:reduce){:host([blink]) .eye-blink{animation:none;}}
4558
- `);function G(e,t,...n){let r=document.createElementNS(_o,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function jo(e,t){let n=e.replace(`#`,``),r=n.length===3?[...n].map(e=>`${e}${e}`).join(``):n,i=Number.parseInt(r,16);if(!Number.isFinite(i))return e;let a=t<0?0:255,o=e=>Math.round(e+(a-e)*Math.abs(t)).toString(16).padStart(2,`0`);return`#${o(i>>16&255)}${o(i>>8&255)}${o(i&255)}`}function Mo(e,t,n){let r=[[`path`,{d:`M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z`,fill:e,stroke:t,"stroke-linejoin":`round`,"stroke-width":20}],[`path`,{d:`M261.93,482.48h0c15.03-15.03,4.46-40.72-16.79-40.83h0c-21.37-.11-32.14,25.72-17.03,40.83h0c9.34,9.34,24.48,9.34,33.82,0Z`,fill:n}],[`path`,{d:`M384.85,527.49l-51.82,51.82c-2.24,2.24-2.24,5.86,0,8.1l55.71,55.71c2.24,2.24,5.86,2.24,8.1,0h0c.62-.62,1.08-1.36,1.37-2.19l26.52-77.11c.71-2.07.18-4.36-1.37-5.91l-30.41-30.41c-2.24-2.24-5.86-2.24-8.1,0Z`,fill:n}],[`path`,{d:`M371.7,684.58l-25.94,25.94c-2.24,2.24-2.24,5.86,0,8.1l12.67,12.67c2.99,2.99,8.09,1.82,9.46-2.19l13.28-38.61c1.97-5.74-5.17-10.2-9.46-5.91Z`,fill:n}],[`path`,{d:`M159.42,564.14l2.73,6.83c1.52,3.82,6.46,4.83,9.37,1.93l2.05-2.05c2.24-2.24,2.24-5.86,0-8.1l-4.78-4.78c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}],[`path`,{d:`M243.92,633.11l-48.65-48.65c-5.24-5.24-13.74-5.24-18.99,0h0c-3.8,3.8-4.97,9.49-2.98,14.47l27.77,69.54c3.58,8.95,15.14,11.33,21.96,4.51l20.89-20.89c5.24-5.24,5.24-13.74,0-18.99Z`,fill:n}],[`path`,{d:`M211.32,533.1h0c14.11-14.11,14.11-36.98,0-51.08l-34.94-34.94c-.72-.72-.72-1.89,0-2.62h0c1.16-1.16.34-3.15-1.3-3.16l-11.23-.06c-25.62-.13-43.23,25.72-33.73,49.51l5.37,13.45c1.82,4.55,4.54,8.68,8,12.15l16.74,16.74c14.11,14.11,36.98,14.11,51.08,0Z`,fill:n}],[`path`,{d:`M263.74,792.53h0c-5.69,5.69-7.45,14.23-4.46,21.71l22.5,56.36c6.92,17.34,31.68,16.74,37.75-.92l8.66-25.2c2.5-7.28.64-15.35-4.8-20.79l-31.17-31.17c-7.87-7.87-20.62-7.87-28.48,0Z`,fill:n}],[`path`,{d:`M392.94,503.07l40.81-40.81c2.24-2.24,5.86-2.24,8.1,0l.06.06c2.24,2.24,2.24,5.86,0,8.1l-40.81,40.81c-2.24,2.24-2.24,5.86,0,8.1l22.48,22.48c2.99,2.99,8.09,1.82,9.46-2.19l30.71-89.32c1.27-3.71-1.47-7.57-5.39-7.59l-120.63-.6c-5.11-.03-7.69,6.16-4.08,9.77l51.18,51.18c2.24,2.24,5.86,2.24,8.1,0Z`,fill:n}]],i=[[274.59,463.59,84.73,95.66,42.36,`translate(-268.79 373.91) rotate(-45)`],[291.06,603.84,72.24,90.24,36.12,`translate(-363.06 421.43) rotate(-45)`],[217.18,527.25,72.24,95.66,36.12,`translate(-332.45 347.55) rotate(-45)`],[236.26,661.25,67.04,90.24,33.52,`translate(-420.46 397.65) rotate(-45)`]],a=r.map(([e,t])=>G(e,t));return a.push(...i.map(([e,t,r,i,a,o])=>G(`rect`,{x:e,y:t,width:r,height:i,rx:a,ry:a,transform:o,fill:n})),G(`ellipse`,{cx:288.37,cy:404.38,rx:182.34,ry:67.01,fill:e,stroke:t,"stroke-miterlimit":10,"stroke-width":20})),a}function No(e,t){return[G(`path`,{d:`M566.75,340.67c0-29.85-12.97-56.87-33.96-76.47,4.8-9.98,7.44-20.71,7.44-31.9,0-38.29-30.62-71.33-74.92-86.77.33-3.07.51-6.17.51-9.3,0-69.72-84.29-126.24-188.26-126.24s-188.26,56.52-188.26,126.24c0,4,.29,7.95.83,11.86-34.94,15.4-58.48,44.25-58.48,77.34,0,18.21,7.15,34.25,19.39,49.26-25.1,19.88-41.05,49.47-41.05,82.54,0,59.85,52.15,108.37,116.49,108.37,10.83,0,21.3-1.4,31.26-3.98,31.42,41.91,83.55,69.34,142.55,69.34,64.73,0,121.2-33,151.11-81.94,63.8-.57,115.34-48.85,115.34-108.34Z`,fill:e,stroke:t,"stroke-width":20})]}function Po(e){return e<=50?1:e>=85?2.2:1+(e-50)/35*1.2}function Fo(e,t,n){return G(`g`,{class:`pupil pupil-${t}`},G(`circle`,{cx:e,cy:50,r:n,fill:`#000`}),G(`circle`,{cx:e-n*.3,cy:50-n*.35,r:n*.4,fill:`#fff`}))}function Io(e,t,n){return G(`g`,{class:`eye-blink eye-${t}`},G(`circle`,{cx:e,cy:50,r:38,fill:`#fff`,stroke:`#000`,"stroke-width":4}),Fo(e,t,n))}function Lo(e,t){let n=`slicc-agent-avatar-noise-${t}`;return G(`g`,{class:`eye-static eye-${t}`},G(`defs`,{},G(`clipPath`,{id:n},G(`circle`,{cx:e,cy:50,r:38}))),G(`circle`,{cx:e,cy:50,r:38,fill:`#fff`}),G(`g`,{class:`noise noise-${t}`,"clip-path":`url(#${n})`,"data-cell-size":bo}),G(`circle`,{class:`eye-outline`,cx:e,cy:50,r:38,fill:`none`,stroke:`#000`,"stroke-width":4}))}function Ro(e){return e^=e<<13,e^=e>>>17,e^=e<<5,e>>>0}function zo(e){return(wo^Math.imul(e,Eo))>>>0}function Bo(e,t){return(zo(e)^Math.imul(t,To))>>>0}function Vo(){return Math.floor((Date.now()-Do)/1e3*xo)>>>0}function Ho(e){return[G(`circle`,{cx:e,cy:50,r:38,fill:`#fff`,stroke:`#000`,"stroke-width":4}),G(`line`,{x1:e-15,y1:35,x2:e+15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),G(`line`,{x1:e+15,y1:35,x2:e-15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function Uo(e,t,n,r,i){let a=n-t,o=r-50,s=Math.hypot(a,o),c=Math.min(s,i),l=s>0?a/s*c:0,u=s>0?o/s*c:0;e.setAttribute(`transform`,`translate(${l},${u})`)}S(`slicc-agent-avatar`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`fill`,`connection`];#e;#t=e=>this.#b(e);#n=()=>{this.#f(),this.#m()===`static`&&this.#h()};#r=null;#i=null;#a=null;#o=null;#s=[];#c=null;#l=yo;#u=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ao]}connectedCallback(){this.#r=window.matchMedia(`(prefers-reduced-motion: reduce)`),this.#r.addEventListener(`change`,this.#n),this.#d(),this.#f()}disconnectedCallback(){this.#p(),this.#v(),this.#r?.removeEventListener(`change`,this.#n),this.#r=null}attributeChangedCallback(){this.isConnected&&(this.#d(),this.#f())}#d(){this.#v(),this.#s=[];let e=this.getAttribute(`type`)===`cone`?`cone`:`scoop`,t=Oo[e],n=this.getAttribute(`color`)??ko[e],r=this.#m(),i=vo*Po(Math.max(0,Math.min(100,Number.parseFloat(this.getAttribute(`fill`)??`0`)||0)));this.#l=Math.max(2,Math.min(yo,U.r-i-4));let a=(t.eyes.left+t.eyes.width/2)/100,o=(t.eyes.top+t.eyes.height/2)/100,s=e===`cone`?Mo(n,jo(n,-.38),jo(n,.3)):No(n,jo(n,-.32)),c=G(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...s),l=r===`dead`?[...Ho(U.cx),...Ho(W.cx)]:r===`none`?[]:r===`static`?[Lo(U.cx,`l`),Lo(W.cx,`r`)]:[Io(U.cx,`l`,i),Io(W.cx,`r`,i)];this.#o=G(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...l);let u=w(`span`,{class:`eyes`,style:`top:${t.eyes.top}%;left:${t.eyes.left}%;width:${t.eyes.width}%;height:${t.eyes.height}%`});u.append(this.#o);let d=w(`span`,{class:`icon-inner`,style:`--tx:${((.5-t.zoom*a)*100).toFixed(2)}%;--ty:${((.5-t.zoom*o)*100).toFixed(2)}%;--zoom:${t.zoom}`},c,u);this.#e.replaceChildren(w(`span`,{class:`avatar`,"aria-hidden":`true`},d)),this.#i=this.#e.querySelector(`.pupil-l`),this.#a=this.#e.querySelector(`.pupil-r`),r===`static`&&this.#h()}#f(){let e=this.#m()===`open`&&!this.#r?.matches;e&&!this.#u?(this.ownerDocument.addEventListener(`pointermove`,this.#t),this.#u=!0):e||(this.#p(),this.#y())}#p(){this.#u&&=(this.ownerDocument.removeEventListener(`pointermove`,this.#t),!1)}#m(){let e=this.getAttribute(`connection`);if(e!==null&&e!==`connected`)return`static`;let t=this.getAttribute(`eyes`);return t===`dead`||t===`none`||t===`static`?t:`open`}#h(){if(this.#v(),this.#s.length===0&&this.#g(),this.#r?.matches){this.#_(null);return}this.#_(Vo()),this.#c=window.setInterval(()=>{this.#_(Vo())},1e3/xo)}#g(){let e=this.#o?.getBoundingClientRect(),t=e?Math.min(e.width/200,e.height/100):0,n=bo/(t>0?t:.25);this.#s=[...this.#e.querySelectorAll(`.noise`)].map((e,t)=>{let r=t===0?U.cx:W.cx,i=[],a=r-U.r,o=r+U.r,s=50-U.r,c=50+U.r;for(let e=s;e<c;e+=n)for(let t=a;t<o;t+=n){let r=G(`rect`,{x:t,y:e,width:Math.min(n,o-t),height:Math.min(n,c-e),opacity:So});i.push(r)}return e.replaceChildren(...i),i})}#_(e){this.#s.forEach((t,n)=>{let r=e===null?zo(n):Bo(n,e),i=r===0?wo:r;(t[0]?.parentElement)?.setAttribute(`data-seed`,String(i));for(let e of t){i=Ro(i);let t=`${Co[i%Co.length]*100}%`;e.setAttribute(`fill`,`rgb(${t} ${t} ${t})`)}})}#v(){this.#c!==null&&(window.clearInterval(this.#c),this.#c=null)}#y(){this.#i?.setAttribute(`transform`,`translate(0,0)`),this.#a?.setAttribute(`transform`,`translate(0,0)`)}#b(e){if(!this.#o||!this.#i||!this.#a)return;let t=this.#o.getBoundingClientRect();if(!t.width||!t.height)return;let n=(e.clientX-t.left)*(200/t.width),r=(e.clientY-t.top)*(100/t.height);Uo(this.#i,U.cx,n,r,this.#l),Uo(this.#a,W.cx,n,r,this.#l)}});var Wo=T(`
4518
+ `);function G(e,t,...n){let r=document.createElementNS(uo,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function To(e,t){let n=e.replace(`#`,``),r=n.length===3?[...n].map(e=>`${e}${e}`).join(``):n,i=Number.parseInt(r,16);if(!Number.isFinite(i))return e;let a=t<0?0:255,o=e=>Math.round(e+(a-e)*Math.abs(t)).toString(16).padStart(2,`0`);return`#${o(i>>16&255)}${o(i>>8&255)}${o(i&255)}`}function Eo(e,t,n){let r=[[`path`,{d:`M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z`,fill:e,stroke:t,"stroke-linejoin":`round`,"stroke-width":20}],[`path`,{d:`M261.93,482.48h0c15.03-15.03,4.46-40.72-16.79-40.83h0c-21.37-.11-32.14,25.72-17.03,40.83h0c9.34,9.34,24.48,9.34,33.82,0Z`,fill:n}],[`path`,{d:`M384.85,527.49l-51.82,51.82c-2.24,2.24-2.24,5.86,0,8.1l55.71,55.71c2.24,2.24,5.86,2.24,8.1,0h0c.62-.62,1.08-1.36,1.37-2.19l26.52-77.11c.71-2.07.18-4.36-1.37-5.91l-30.41-30.41c-2.24-2.24-5.86-2.24-8.1,0Z`,fill:n}],[`path`,{d:`M371.7,684.58l-25.94,25.94c-2.24,2.24-2.24,5.86,0,8.1l12.67,12.67c2.99,2.99,8.09,1.82,9.46-2.19l13.28-38.61c1.97-5.74-5.17-10.2-9.46-5.91Z`,fill:n}],[`path`,{d:`M159.42,564.14l2.73,6.83c1.52,3.82,6.46,4.83,9.37,1.93l2.05-2.05c2.24-2.24,2.24-5.86,0-8.1l-4.78-4.78c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}],[`path`,{d:`M243.92,633.11l-48.65-48.65c-5.24-5.24-13.74-5.24-18.99,0h0c-3.8,3.8-4.97,9.49-2.98,14.47l27.77,69.54c3.58,8.95,15.14,11.33,21.96,4.51l20.89-20.89c5.24-5.24,5.24-13.74,0-18.99Z`,fill:n}],[`path`,{d:`M211.32,533.1h0c14.11-14.11,14.11-36.98,0-51.08l-34.94-34.94c-.72-.72-.72-1.89,0-2.62h0c1.16-1.16.34-3.15-1.3-3.16l-11.23-.06c-25.62-.13-43.23,25.72-33.73,49.51l5.37,13.45c1.82,4.55,4.54,8.68,8,12.15l16.74,16.74c14.11,14.11,36.98,14.11,51.08,0Z`,fill:n}],[`path`,{d:`M263.74,792.53h0c-5.69,5.69-7.45,14.23-4.46,21.71l22.5,56.36c6.92,17.34,31.68,16.74,37.75-.92l8.66-25.2c2.5-7.28.64-15.35-4.8-20.79l-31.17-31.17c-7.87-7.87-20.62-7.87-28.48,0Z`,fill:n}],[`path`,{d:`M392.94,503.07l40.81-40.81c2.24-2.24,5.86-2.24,8.1,0l.06.06c2.24,2.24,2.24,5.86,0,8.1l-40.81,40.81c-2.24,2.24-2.24,5.86,0,8.1l22.48,22.48c2.99,2.99,8.09,1.82,9.46-2.19l30.71-89.32c1.27-3.71-1.47-7.57-5.39-7.59l-120.63-.6c-5.11-.03-7.69,6.16-4.08,9.77l51.18,51.18c2.24,2.24,5.86,2.24,8.1,0Z`,fill:n}]],i=[[274.59,463.59,84.73,95.66,42.36,`translate(-268.79 373.91) rotate(-45)`],[291.06,603.84,72.24,90.24,36.12,`translate(-363.06 421.43) rotate(-45)`],[217.18,527.25,72.24,95.66,36.12,`translate(-332.45 347.55) rotate(-45)`],[236.26,661.25,67.04,90.24,33.52,`translate(-420.46 397.65) rotate(-45)`]],a=r.map(([e,t])=>G(e,t));return a.push(...i.map(([e,t,r,i,a,o])=>G(`rect`,{x:e,y:t,width:r,height:i,rx:a,ry:a,transform:o,fill:n})),G(`ellipse`,{cx:288.37,cy:404.38,rx:182.34,ry:67.01,fill:e,stroke:t,"stroke-miterlimit":10,"stroke-width":20})),a}function Do(e,t){return[G(`path`,{d:`M566.75,340.67c0-29.85-12.97-56.87-33.96-76.47,4.8-9.98,7.44-20.71,7.44-31.9,0-38.29-30.62-71.33-74.92-86.77.33-3.07.51-6.17.51-9.3,0-69.72-84.29-126.24-188.26-126.24s-188.26,56.52-188.26,126.24c0,4,.29,7.95.83,11.86-34.94,15.4-58.48,44.25-58.48,77.34,0,18.21,7.15,34.25,19.39,49.26-25.1,19.88-41.05,49.47-41.05,82.54,0,59.85,52.15,108.37,116.49,108.37,10.83,0,21.3-1.4,31.26-3.98,31.42,41.91,83.55,69.34,142.55,69.34,64.73,0,121.2-33,151.11-81.94,63.8-.57,115.34-48.85,115.34-108.34Z`,fill:e,stroke:t,"stroke-width":20})]}function Oo(e){return e<=50?1:e>=85?2.2:1+(e-50)/35*1.2}function ko(e,t,n){return G(`g`,{class:`pupil pupil-${t}`},G(`circle`,{cx:e,cy:50,r:n,fill:`#000`}),G(`circle`,{cx:e-n*.3,cy:50-n*.35,r:n*.4,fill:`#fff`}))}function Ao(e,t,n){return G(`g`,{class:`eye-blink eye-${t}`},G(`circle`,{cx:e,cy:50,r:38,fill:`#fff`,stroke:`#000`,"stroke-width":4}),ko(e,t,n))}function jo(e,t){let n=`slicc-agent-avatar-noise-${t}`;return G(`g`,{class:`eye-static eye-${t}`},G(`defs`,{},G(`clipPath`,{id:n},G(`circle`,{cx:e,cy:50,r:38}))),G(`circle`,{cx:e,cy:50,r:38,fill:`#fff`}),G(`g`,{class:`noise noise-${t}`,"clip-path":`url(#${n})`,"data-cell-size":mo}),G(`circle`,{class:`eye-outline`,cx:e,cy:50,r:38,fill:`none`,stroke:`#000`,"stroke-width":4}))}function Mo(e){return e^=e<<13,e^=e>>>17,e^=e<<5,e>>>0}function No(e){return(vo^Math.imul(e,bo))>>>0}function Po(e,t){return(No(e)^Math.imul(t,yo))>>>0}function Fo(){return Math.floor((Date.now()-xo)/1e3*ho)>>>0}function Io(e){return[G(`circle`,{cx:e,cy:50,r:38,fill:`#fff`,stroke:`#000`,"stroke-width":4}),G(`line`,{x1:e-15,y1:35,x2:e+15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),G(`line`,{x1:e+15,y1:35,x2:e-15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function Lo(e,t,n,r,i){let a=n-t,o=r-50,s=Math.hypot(a,o),c=Math.min(s,i),l=s>0?a/s*c:0,u=s>0?o/s*c:0;e.setAttribute(`transform`,`translate(${l},${u})`)}S(`slicc-agent-avatar`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`fill`,`connection`];#e;#t=e=>this.#b(e);#n=()=>{this.#f(),this.#m()===`static`&&this.#h()};#r=null;#i=null;#a=null;#o=null;#s=[];#c=null;#l=po;#u=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[wo]}connectedCallback(){this.#r=window.matchMedia(`(prefers-reduced-motion: reduce)`),this.#r.addEventListener(`change`,this.#n),this.#d(),this.#f()}disconnectedCallback(){this.#p(),this.#v(),this.#r?.removeEventListener(`change`,this.#n),this.#r=null}attributeChangedCallback(){this.isConnected&&(this.#d(),this.#f())}#d(){this.#v(),this.#s=[];let e=this.getAttribute(`type`)===`cone`?`cone`:`scoop`,t=So[e],n=this.getAttribute(`color`)??Co[e],r=this.#m(),i=fo*Oo(Math.max(0,Math.min(100,Number.parseFloat(this.getAttribute(`fill`)??`0`)||0)));this.#l=Math.max(2,Math.min(po,U.r-i-4));let a=(t.eyes.left+t.eyes.width/2)/100,o=(t.eyes.top+t.eyes.height/2)/100,s=e===`cone`?Eo(n,To(n,-.38),To(n,.3)):Do(n,To(n,-.32)),c=G(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...s),l=r===`dead`?[...Io(U.cx),...Io(W.cx)]:r===`none`?[]:r===`static`?[jo(U.cx,`l`),jo(W.cx,`r`)]:[Ao(U.cx,`l`,i),Ao(W.cx,`r`,i)];this.#o=G(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...l);let u=w(`span`,{class:`eyes`,style:`top:${t.eyes.top}%;left:${t.eyes.left}%;width:${t.eyes.width}%;height:${t.eyes.height}%`});u.append(this.#o);let d=w(`span`,{class:`icon-inner`,style:`--tx:${((.5-t.zoom*a)*100).toFixed(2)}%;--ty:${((.5-t.zoom*o)*100).toFixed(2)}%;--zoom:${t.zoom}`},c,u);this.#e.replaceChildren(w(`span`,{class:`avatar`,"aria-hidden":`true`},d)),this.#i=this.#e.querySelector(`.pupil-l`),this.#a=this.#e.querySelector(`.pupil-r`),r===`static`&&this.#h()}#f(){let e=this.#m()===`open`&&!this.#r?.matches;e&&!this.#u?(this.ownerDocument.addEventListener(`pointermove`,this.#t),this.#u=!0):e||(this.#p(),this.#y())}#p(){this.#u&&=(this.ownerDocument.removeEventListener(`pointermove`,this.#t),!1)}#m(){let e=this.getAttribute(`connection`);if(e!==null&&e!==`connected`)return`static`;let t=this.getAttribute(`eyes`);return t===`dead`||t===`none`||t===`static`?t:`open`}#h(){if(this.#v(),this.#s.length===0&&this.#g(),this.#r?.matches){this.#_(null);return}this.#_(Fo()),this.#c=window.setInterval(()=>{this.#_(Fo())},1e3/ho)}#g(){let e=this.#o?.getBoundingClientRect(),t=e?Math.min(e.width/200,e.height/100):0,n=mo/(t>0?t:.25);this.#s=[...this.#e.querySelectorAll(`.noise`)].map((e,t)=>{let r=t===0?U.cx:W.cx,i=[],a=r-U.r,o=r+U.r,s=50-U.r,c=50+U.r;for(let e=s;e<c;e+=n)for(let t=a;t<o;t+=n){let r=G(`rect`,{x:t,y:e,width:Math.min(n,o-t),height:Math.min(n,c-e),opacity:go});i.push(r)}return e.replaceChildren(...i),i})}#_(e){this.#s.forEach((t,n)=>{let r=e===null?No(n):Po(n,e),i=r===0?vo:r;(t[0]?.parentElement)?.setAttribute(`data-seed`,String(i));for(let e of t){i=Mo(i);let t=`${_o[i%_o.length]*100}%`;e.setAttribute(`fill`,`rgb(${t} ${t} ${t})`)}})}#v(){this.#c!==null&&(window.clearInterval(this.#c),this.#c=null)}#y(){this.#i?.setAttribute(`transform`,`translate(0,0)`),this.#a?.setAttribute(`transform`,`translate(0,0)`)}#b(e){if(!this.#o||!this.#i||!this.#a)return;let t=this.#o.getBoundingClientRect();if(!t.width||!t.height)return;let n=(e.clientX-t.left)*(200/t.width),r=(e.clientY-t.top)*(100/t.height);Lo(this.#i,U.cx,n,r,this.#l),Lo(this.#a,W.cx,n,r,this.#l)}});var Ro=T(`
4559
4519
  :host{display:inline-block;}
4560
4520
  .switcher-more{position:relative;}
4561
4521
  .morebtn{display:none;font:inherit;font-size:13px;font-weight:600;color:var(--txt-2);background:transparent;border:1px solid var(--line);border-radius:9999px;height:var(--ctl-h,30px);padding:0 11px;cursor:pointer;line-height:1;align-items:center;}
@@ -4587,14 +4547,14 @@ video {
4587
4547
  @keyframes scoopReveal{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
4588
4548
  @keyframes scoopArc{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}
4589
4549
  @media (prefers-reduced-motion:reduce){.popup-row{animation:none;}.popup-row[data-state="working"] .glyph-arc{animation:none;transform:rotate(-90deg);}}
4590
- `),Go=[4,5,3,7,1,6,2,0,8],Ko=`http://www.w3.org/2000/svg`,qo=5,Jo=2*Math.PI*qo;function K(e,t,...n){let r=document.createElementNS(Ko,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function Yo(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function Xo(e){return e.state??`idle`}function Zo(e){return(90+Yo(e)*2.7)/360*Jo}function Qo(e,t){let n=[];return e===`initializing`?n.push(K(`circle`,{class:`initializing-ring`,cx:7,cy:7,r:qo,"stroke-width":1.7})):n.push(K(`circle`,{class:`glyph-base`,cx:7,cy:7,r:qo,"stroke-width":1.5})),(e===`working`||e===`idle`)&&n.push(K(`circle`,{class:`glyph-arc`,cx:7,cy:7,r:qo,"stroke-width":2,"stroke-dasharray":`${Zo(t).toFixed(3)} ${Jo.toFixed(3)}`,"stroke-dashoffset":0})),e===`working`&&n.push(K(`circle`,{class:`glyph-pin`,cx:7,cy:7,r:1.25})),e===`broken`&&n.push(K(`line`,{class:`broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),K(`line`,{class:`broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8})),K(`svg`,{class:`status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...n)}function $o(e){return e.state===`broken`?`broken`:(e.fill??0)>=75?`near-limit`:e.state===`working`?`working`:`idle`}function es(e){return e===`broken`?3:e===`near-limit`?2:+(e===`working`)}function ts(e){let t=e.reduce((e,t)=>{let n=$o(t);return es(n)>es(e)?n:e},`idle`),n=t===`near-limit`?`near context limit`:t;return`${e.length} hidden scoop${e.length===1?``:`s`}; worst state ${n}`}function ns(e,t=!1){if(t)return w(`span`,{class:`overflow-grid-cell overflow-grid-cell--plus`,"aria-hidden":`true`},w(`span`,{class:`overflow-plus-bar overflow-plus-bar--horizontal`}),w(`span`,{class:`overflow-plus-bar overflow-plus-bar--vertical`}));let n={class:`overflow-grid-cell`,"aria-hidden":`true`};return e&&(n[`data-dot-state`]=e),w(`span`,n)}function rs(e){let t=e.map((e,t)=>({order:t,state:$o(e)})).sort((e,t)=>es(t.state)-es(e.state)||e.order-t.order).slice(0,e.length>9?8:9),n=Array.from({length:Go.length},()=>ns());return t.forEach((e,t)=>{n[Go[t]]=ns(e.state)}),e.length>9&&(n[Go.at(-1)]=ns(void 0,!0)),w(`span`,{class:`overflow-grid`,role:`img`,"aria-label":ts(e),"data-hidden-count":String(e.length)},...n)}S(`slicc-scoop-overflow`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n;#r;#i;#a;#o=e=>{this.open&&!this.contains(e.target)&&this.close()};#s=e=>{!this.open||e.key!==`Escape`||(e.preventDefault(),this.close(),this.#r.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Wo]}connectedCallback(){this.#c()}disconnectedCallback(){document.removeEventListener(`click`,this.#o),document.removeEventListener(`keydown`,this.#s)}attributeChangedCallback(e){e===`open`&&this.#n&&this.#u()}get items(){return this.#t}set items(e){this.#t=Array.isArray(e)?e:[],this.isConnected&&this.#l()}get count(){return this.#t.length}get hasOverflow(){return this.#t.length>0}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}show(){this.open||=!0}close(){this.open&&=!1}toggle(){this.open=!this.open}#c(){this.#i=w(`slot`,{name:`more`},rs(this.#t)),this.#r=w(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},this.#i),this.#a=w(`div`,{class:`pop`,part:`pop`,role:`menu`}),this.#n=w(`div`,{class:`switcher-more`,part:`wrap`},this.#r,this.#a),this.#r.addEventListener(`click`,e=>{e.stopPropagation(),this.toggle()}),this.#e.replaceChildren(this.#n),this.#l(),this.#u()}#l(){let e=this.#t.length;e>0?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`),this.#n.classList.toggle(`has-overflow`,e>0),this.#r.setAttribute(`aria-haspopup`,`true`);let t=ts(this.#t);if(this.#r.setAttribute(`aria-label`,`${t}. Show hidden scoops`),this.#i.replaceChildren(rs(this.#t)),e===0){this.#a.replaceChildren(w(`slot`,{name:`empty`})),this.open&&this.close();return}let n=[];this.#t.forEach((e,t)=>{let r=e.id,i=e.label??e.id,a=Xo(e),o=Yo(e.fill),s=w(`button`,{class:`popup-row`,part:`row`,type:`button`,role:`menuitem`,"aria-label":`${i}: ${a}, ${o}% context fill`,"data-state":a,"data-k":r,style:`--hue:${e.color??`var(--rose)`};--i:${t}`},Qo(a,o),w(`span`,{class:`popup-label`},i),w(`span`,{class:`popup-state`},`${a} · ${o}%`));s.addEventListener(`click`,()=>{let e=s.dataset.k??``,t=this.#t.find(t=>t.id===e);this.#d(e,t?.label??e)}),n.push(s)}),this.#a.replaceChildren(...n)}#u(){let e=this.open;this.#n.classList.toggle(`open`,e),this.#r.setAttribute(`aria-expanded`,e?`true`:`false`),document.removeEventListener(`click`,this.#o),document.removeEventListener(`keydown`,this.#s),e&&(document.addEventListener(`click`,this.#o),document.addEventListener(`keydown`,this.#s))}#d(e,t){this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0})),this.close()}});var q=`slicc-agent-tabs`,is=`${q}-style`,as=`http://www.w3.org/2000/svg`,J=5,os=2*Math.PI*J,ss=26,cs=8,ls=6,us=39,ds=`sliccy`,fs=14,ps=5,ms=16,hs=4,gs=65,_s={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},vs=`
4591
- .slicc-agent-tabs{display:flex;align-items:center;gap:${cs}px;min-width:0;overflow:visible;color:var(--ink);font-family:var(--ui);}
4550
+ `),zo=[4,5,3,7,1,6,2,0,8],Bo=`http://www.w3.org/2000/svg`,Vo=5,Ho=2*Math.PI*Vo;function K(e,t,...n){let r=document.createElementNS(Bo,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function Uo(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function Wo(e){return e.state??`idle`}function Go(e){return(90+Uo(e)*2.7)/360*Ho}function Ko(e,t){let n=[];return e===`initializing`?n.push(K(`circle`,{class:`initializing-ring`,cx:7,cy:7,r:Vo,"stroke-width":1.7})):n.push(K(`circle`,{class:`glyph-base`,cx:7,cy:7,r:Vo,"stroke-width":1.5})),(e===`working`||e===`idle`)&&n.push(K(`circle`,{class:`glyph-arc`,cx:7,cy:7,r:Vo,"stroke-width":2,"stroke-dasharray":`${Go(t).toFixed(3)} ${Ho.toFixed(3)}`,"stroke-dashoffset":0})),e===`working`&&n.push(K(`circle`,{class:`glyph-pin`,cx:7,cy:7,r:1.25})),e===`broken`&&n.push(K(`line`,{class:`broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),K(`line`,{class:`broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8})),K(`svg`,{class:`status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...n)}function qo(e){return e.state===`broken`?`broken`:(e.fill??0)>=75?`near-limit`:e.state===`working`?`working`:`idle`}function Jo(e){return e===`broken`?3:e===`near-limit`?2:+(e===`working`)}function Yo(e){let t=e.reduce((e,t)=>{let n=qo(t);return Jo(n)>Jo(e)?n:e},`idle`),n=t===`near-limit`?`near context limit`:t;return`${e.length} hidden scoop${e.length===1?``:`s`}; worst state ${n}`}function Xo(e,t=!1){if(t)return w(`span`,{class:`overflow-grid-cell overflow-grid-cell--plus`,"aria-hidden":`true`},w(`span`,{class:`overflow-plus-bar overflow-plus-bar--horizontal`}),w(`span`,{class:`overflow-plus-bar overflow-plus-bar--vertical`}));let n={class:`overflow-grid-cell`,"aria-hidden":`true`};return e&&(n[`data-dot-state`]=e),w(`span`,n)}function Zo(e){let t=e.map((e,t)=>({order:t,state:qo(e)})).sort((e,t)=>Jo(t.state)-Jo(e.state)||e.order-t.order).slice(0,e.length>9?8:9),n=Array.from({length:zo.length},()=>Xo());return t.forEach((e,t)=>{n[zo[t]]=Xo(e.state)}),e.length>9&&(n[zo.at(-1)]=Xo(void 0,!0)),w(`span`,{class:`overflow-grid`,role:`img`,"aria-label":Yo(e),"data-hidden-count":String(e.length)},...n)}S(`slicc-scoop-overflow`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n;#r;#i;#a;#o=e=>{this.open&&!this.contains(e.target)&&this.close()};#s=e=>{!this.open||e.key!==`Escape`||(e.preventDefault(),this.close(),this.#r.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ro]}connectedCallback(){this.#c()}disconnectedCallback(){document.removeEventListener(`click`,this.#o),document.removeEventListener(`keydown`,this.#s)}attributeChangedCallback(e){e===`open`&&this.#n&&this.#u()}get items(){return this.#t}set items(e){this.#t=Array.isArray(e)?e:[],this.isConnected&&this.#l()}get count(){return this.#t.length}get hasOverflow(){return this.#t.length>0}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}show(){this.open||=!0}close(){this.open&&=!1}toggle(){this.open=!this.open}#c(){this.#i=w(`slot`,{name:`more`},Zo(this.#t)),this.#r=w(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},this.#i),this.#a=w(`div`,{class:`pop`,part:`pop`,role:`menu`}),this.#n=w(`div`,{class:`switcher-more`,part:`wrap`},this.#r,this.#a),this.#r.addEventListener(`click`,e=>{e.stopPropagation(),this.toggle()}),this.#e.replaceChildren(this.#n),this.#l(),this.#u()}#l(){let e=this.#t.length;e>0?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`),this.#n.classList.toggle(`has-overflow`,e>0),this.#r.setAttribute(`aria-haspopup`,`true`);let t=Yo(this.#t);if(this.#r.setAttribute(`aria-label`,`${t}. Show hidden scoops`),this.#i.replaceChildren(Zo(this.#t)),e===0){this.#a.replaceChildren(w(`slot`,{name:`empty`})),this.open&&this.close();return}let n=[];this.#t.forEach((e,t)=>{let r=e.id,i=e.label??e.id,a=Wo(e),o=Uo(e.fill),s=w(`button`,{class:`popup-row`,part:`row`,type:`button`,role:`menuitem`,"aria-label":`${i}: ${a}, ${o}% context fill`,"data-state":a,"data-k":r,style:`--hue:${e.color??`var(--rose)`};--i:${t}`},Ko(a,o),w(`span`,{class:`popup-label`},i),w(`span`,{class:`popup-state`},`${a} · ${o}%`));s.addEventListener(`click`,()=>{let e=s.dataset.k??``,t=this.#t.find(t=>t.id===e);this.#d(e,t?.label??e)}),n.push(s)}),this.#a.replaceChildren(...n)}#u(){let e=this.open;this.#n.classList.toggle(`open`,e),this.#r.setAttribute(`aria-expanded`,e?`true`:`false`),document.removeEventListener(`click`,this.#o),document.removeEventListener(`keydown`,this.#s),e&&(document.addEventListener(`click`,this.#o),document.addEventListener(`keydown`,this.#s))}#d(e,t){this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0})),this.close()}});var q=`slicc-agent-tabs`,Qo=`${q}-style`,$o=`http://www.w3.org/2000/svg`,J=5,es=2*Math.PI*J,ts=26,ns=8,rs=6,is=39,as=`sliccy`,os=14,ss=5,cs=16,ls=4,us=65,ds={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},fs=`
4551
+ .slicc-agent-tabs{display:flex;align-items:center;gap:${ns}px;min-width:0;overflow:visible;color:var(--ink);font-family:var(--ui);}
4592
4552
  .slicc-agent-tabs *{box-sizing:border-box;}
4593
- .slicc-agent-tabs__focus-avatar{display:block;flex:0 0 ${ss}px;width:${ss}px;height:${ss}px;pointer-events:none;}
4553
+ .slicc-agent-tabs__focus-avatar{display:block;flex:0 0 ${ts}px;width:${ts}px;height:${ts}px;pointer-events:none;}
4594
4554
  .slicc-agent-tabs__track-frame{position:relative;flex:0 1 auto;min-width:0;height:var(--ctl-h,30px);overflow:visible;border:1px solid var(--line);border-radius:9px;background:var(--ghost);}
4595
4555
  .slicc-agent-tabs__track{display:flex;align-items:center;min-width:0;height:100%;padding:2px;overflow:hidden;}
4596
4556
  .slicc-agent-tabs.has-overflow .slicc-agent-tabs__track{padding-right:41px;}
4597
- .slicc-agent-tabs__segment{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;gap:${ps}px;width:max-content;min-width:var(--slicc-agent-tabs-segment-floor,${gs}px);max-width:160px;height:24px;padding:0 8px;overflow:hidden;color:var(--txt-2);font:500 11px/1 var(--ui);white-space:nowrap;border:0;border-radius:6px;background:transparent;cursor:pointer;}
4557
+ .slicc-agent-tabs__segment{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;gap:${ss}px;width:max-content;min-width:var(--slicc-agent-tabs-segment-floor,${us}px);max-width:160px;height:24px;padding:0 8px;overflow:hidden;color:var(--txt-2);font:500 11px/1 var(--ui);white-space:nowrap;border:0;border-radius:6px;background:transparent;cursor:pointer;}
4598
4558
  .slicc-agent-tabs__segment:hover{color:var(--ink);}
4599
4559
  .slicc-agent-tabs__segment[aria-selected='true']{color:var(--ink);background:var(--canvas);box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 12%,transparent);}
4600
4560
  .slicc-agent-tabs__segment.hide{display:none;}
@@ -4623,7 +4583,7 @@ video {
4623
4583
  .slicc-agent-tabs slicc-scoop-overflow::part(pop){right:0;left:auto;}
4624
4584
  @keyframes slicc-agent-tabs-arc{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}
4625
4585
  @media (prefers-reduced-motion:reduce){.slicc-agent-tabs__glyph-arc{animation:none;transform:rotate(-90deg);}.slicc-agent-tabs__glyph-glow{transition:none;}}
4626
- `;function ys(e){if(e.getElementById(is))return;let t=e.createElement(`style`);t.id=is,t.textContent=vs,(e.head??e.documentElement).append(t)}function Y(e,t,...n){let r=document.createElementNS(as,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function X(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function bs(e){let t=e.ownerDocument.createElement(`canvas`).getContext(`2d`),n=e.ownerDocument.defaultView?.getComputedStyle(e);return!t||!n?gs:(t.font=n.font,Math.ceil(t.measureText(ds).width+fs+ps+ms)+hs)}function xs(e){return(90+X(e)*2.7)/360*os}function Ss(e,t){return t===`working`?e.phase===`tool`?`tool`:`thinking`:null}function Cs(e,t){return e.state?e.state:e.eyes===`dead`?`broken`:t===e.key?`working`:`idle`}function ws(e){return e.type===`cone`||e.key===`cone`?`cone`:`scoop`}function Ts(e){return e.eyes??`open`}function Es(e){return _s[e.key]??e.color??`var(--rose)`}function Ds(e){let t=[Y(`circle`,{class:`${q}__glyph-glow`,cx:7,cy:7,r:J,"stroke-width":1.5}),Y(`circle`,{class:`${q}__glyph-base`,cx:7,cy:7,r:J,"stroke-width":1.5}),Y(`circle`,{class:`${q}__glyph-arc`,cx:7,cy:7,r:J,"stroke-width":2,"stroke-dasharray":`${xs(X(e.fill)).toFixed(3)} ${os.toFixed(3)}`,"stroke-dashoffset":0}),Y(`circle`,{class:`${q}__glyph-pin`,cx:7,cy:7,r:1.25}),Y(`rect`,{class:`${q}__glyph-pin-square`,x:5.5,y:5.5,width:3,height:3,rx:.15}),Y(`line`,{class:`${q}__broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),Y(`line`,{class:`${q}__broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8}),Y(`circle`,{class:`${q}__initializing-ring`,cx:7,cy:7,r:J,"stroke-width":1.7})];return Y(`svg`,{class:`${q}__status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...t)}S(`slicc-agent-tabs`,class extends HTMLElement{static observedAttributes=[`active`,`attention`,`connection`];#e=[];#t=null;#n=null;#r=null;#i=null;#a=null;#o=!1;#s=null;#c=!1;#l=null;#u=e=>this.#C(e);#d=e=>this.#w(e);connectedCallback(){ys(this.ownerDocument),this.classList.add(q),this.setAttribute(`part`,`row`),this.#c||=!0,this.addEventListener(`click`,this.#u),this.addEventListener(`keydown`,this.#d),this.#p(),this.#D(),requestAnimationFrame(()=>this.reflow())}disconnectedCallback(){this.#a?.disconnect(),this.#a=null,this.#s!==null&&cancelAnimationFrame(this.#s),this.#s=null,this.removeEventListener(`click`,this.#u),this.removeEventListener(`keydown`,this.#d)}attributeChangedCallback(){!this.#c||!this.isConnected||(this.#p(),this.reflow())}get scoops(){return this.#e.map(e=>({...e}))}set scoops(e){let t=new Map;if(Array.isArray(e))for(let n of e)t.has(n.key)||t.set(n.key,{...n});this.#e=[...t.values()],this.#c&&this.isConnected&&(this.#p(),this.reflow())}get attention(){return this.getAttribute(`attention`)}set attention(e){e==null?this.removeAttribute(`attention`):this.setAttribute(`attention`,e)}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get connection(){return this.getAttribute(`connection`)===`disconnected`?`disconnected`:`connected`}set connection(e){this.setAttribute(`connection`,e)}select(e){this.active=e;let t=this.#e.find(t=>t.key===e)?.label??e;this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0}))}reflow(){if(!(!this.isConnected||this.#o)){this.#o=!0;try{this.#f()}finally{this.#o=!1}}}#f(){let e=[...this.querySelectorAll(`.${q}__segment`)];for(let t of e)t.classList.remove(`hide`);if(this.classList.remove(`has-overflow`),e.length===0){this.#S([]);return}this.#l===null&&(this.#l=bs(e[0]),this.style.setProperty(`--slicc-agent-tabs-segment-floor`,`${this.#l}px`));let t=this.clientWidth;if(t<=0){this.#S([]),requestAnimationFrame(()=>{this.isConnected&&this.clientWidth>0&&this.reflow()});return}let n=Math.max(0,t-ss-cs-ls),r=e.map(e=>e.offsetWidth),i=r.reduce((e,t)=>e+t,0),a=e.length>1&&i>n+1;this.classList.toggle(`has-overflow`,a);let o=a?e.map(e=>e.offsetWidth):r,s=Math.max(0,n-(a?us:0));if(!a){this.#S([]);return}let c=[],l=0;e.forEach((e,t)=>{t===0||c.length===0&&l+o[t]<=s?l+=o[t]:(e.classList.add(`hide`),c.push(e))}),this.#S(c)}#p(){let e=this.#T(),t=this.#e.find(e=>e.key===this.active)??this.#e.at(0)??null;this.#m(),this.#_(t),this.#b(t?.key??null),e!=null&&!this.#e.some(t=>t.key===e)&&this.#E(t?.key??null)?.focus()}#m(){if(this.#n&&this.#r&&this.#i&&this.contains(this.#r))return;this.#n=w(`div`,{class:`${q}__track`,part:`track`,role:`tablist`,"aria-label":`Agents`});let e=this.ownerDocument.createElement(`slicc-scoop-overflow`);e.setAttribute(`part`,`overflow`),e.addEventListener(`slicc-scoop-select`,e=>{let t=e.detail?.id;typeof t==`string`&&(e.stopPropagation(),this.select(t))}),this.#i=e,this.#r=w(`div`,{class:`${q}__track-frame`,part:`track-frame`},this.#n,e),this.replaceChildren(this.#r)}#h(e){let t=w(`slicc-agent-avatar`,{class:`${q}__focus-avatar`,part:`avatar`,role:`img`});return this.#g(t,e),t}#g(e,t){let n=Cs(t,this.attention);this.#x(e,`type`,ws(t)),this.#x(e,`color`,t.color??null),this.#x(e,`eyes`,Ts(t)),this.#x(e,`connection`,this.getAttribute(`connection`)),this.#x(e,`fill`,String(Math.round(X(t.fill)))),this.#x(e,`blink`,n===`working`),this.#x(e,`aria-label`,`${t.label??t.key} focused agent`),e.style.setProperty(`--slicc-agent-tabs-hue`,Es(t))}#_(e){if(!e){this.#t?.remove(),this.#t=null;return}let t=this.#t??this.#h(e);this.#t=t,this.#g(t,e),(t.parentElement!==this||t.nextElementSibling!==this.#r)&&this.insertBefore(t,this.#r)}#v(e,t){let n=w(`button`,{part:`segment`,type:`button`,role:`tab`},Ds(e),w(`span`,{class:`${q}__label`},e.label??e.key));return this.#y(n,e,t),n}#y(e,t,n){let r=Cs(t,this.attention),i=Ss(t,r),a=X(t.fill),o=this.attention===t.key;e.className=`${q}__segment${t.ephemeral?` ephemeral`:``}`,e.setAttribute(`aria-selected`,String(t.key===n)),e.tabIndex=t.key===n?0:-1;let s=i===`tool`?` (running a tool)`:i?` (thinking)`:``;e.setAttribute(`aria-label`,`${t.label??t.key}: ${r}${s}, ${Math.round(a)}% context fill${o?`, spoke most recently`:``}`),e.dataset.k=t.key,e.dataset.state=r,this.#x(e,`data-phase`,i),this.#x(e,`data-attention`,o?`true`:null),e.style.setProperty(`--slicc-agent-tabs-hue`,Es(t));let c=e.querySelector(`.${q}__label`);c&&(c.textContent=t.label??t.key),e.querySelector(`.${q}__glyph-arc`)?.setAttribute(`stroke-dasharray`,`${xs(a).toFixed(3)} ${os.toFixed(3)}`)}#b(e){if(!this.#n)return;let t=new Map;for(let e of this.#n.querySelectorAll(`:scope > .${q}__segment`)){let n=e.dataset.k??``;t.has(n)?e.remove():t.set(n,e)}let n=this.#e.map(n=>{let r=t.get(n.key)??this.#v(n,e);return t.delete(n.key),this.#y(r,n,e),r});for(let e of t.values())e.remove();n.forEach((e,t)=>{let n=this.#n?.children.item(t)??null;n!==e&&this.#n?.insertBefore(e,n)})}#x(e,t,n){n===null||n===!1?e.hasAttribute(t)&&e.removeAttribute(t):n===!0?e.hasAttribute(t)||e.setAttribute(t,``):e.getAttribute(t)!==n&&e.setAttribute(t,n)}#S(e){if(!this.#i)return;let t=e.map(e=>{let t=e.dataset.k??``,n=this.#e.find(e=>e.key===t)??{key:t};return{id:t,label:n.label??t,type:ws(n),color:n.color,eyes:Ts(n),state:Cs(n,this.attention),fill:X(n.fill)}});this.#i.items=t}#C(e){let t=e.target?.closest(`.${q}__segment`);t&&this.contains(t)&&t.dataset.k&&this.select(t.dataset.k)}#w(e){let t=e.target?.closest(`.${q}__segment`);if(!t||!this.contains(t))return;if(e.key===`Enter`||e.key===` `){if(!t.dataset.k)return;e.preventDefault(),this.select(t.dataset.k);return}let n=[...this.querySelectorAll(`.${q}__segment:not(.hide)`)].filter(e=>!e.disabled),r=n.indexOf(t);if(r<0||n.length===0)return;let i;if(e.key===`ArrowLeft`)i=n[(r-1+n.length)%n.length];else if(e.key===`ArrowRight`)i=n[(r+1)%n.length];else if(e.key===`Home`)i=n[0];else if(e.key===`End`)i=n.at(-1);else return;e.preventDefault(),i?.focus()}#T(){let e=this.ownerDocument.activeElement;return!(e instanceof Element)||!this.contains(e)?null:e.closest(`.${q}__segment`)?.dataset.k??null}#E(e){return e==null?null:[...this.querySelectorAll(`.${q}__segment`)].find(t=>t.dataset.k===e)??null}#D(){this.#a||typeof ResizeObserver>`u`||(this.#a=new ResizeObserver(()=>{this.#s===null&&(this.#s=requestAnimationFrame(()=>{this.#s=null,this.reflow()}))}),this.#a.observe(this),this.parentElement&&this.#a.observe(this.parentElement))}});var Os=`/**
4586
+ `;function ps(e){if(e.getElementById(Qo))return;let t=e.createElement(`style`);t.id=Qo,t.textContent=fs,(e.head??e.documentElement).append(t)}function Y(e,t,...n){let r=document.createElementNS($o,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function X(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function ms(e){let t=e.ownerDocument.createElement(`canvas`).getContext(`2d`),n=e.ownerDocument.defaultView?.getComputedStyle(e);return!t||!n?us:(t.font=n.font,Math.ceil(t.measureText(as).width+os+ss+cs)+ls)}function hs(e){return(90+X(e)*2.7)/360*es}function gs(e,t){return t===`working`?e.phase===`tool`?`tool`:`thinking`:null}function _s(e,t){return e.state?e.state:e.eyes===`dead`?`broken`:t===e.key?`working`:`idle`}function vs(e){return e.type===`cone`||e.key===`cone`?`cone`:`scoop`}function ys(e){return e.eyes??`open`}function bs(e){return ds[e.key]??e.color??`var(--rose)`}function xs(e){let t=[Y(`circle`,{class:`${q}__glyph-glow`,cx:7,cy:7,r:J,"stroke-width":1.5}),Y(`circle`,{class:`${q}__glyph-base`,cx:7,cy:7,r:J,"stroke-width":1.5}),Y(`circle`,{class:`${q}__glyph-arc`,cx:7,cy:7,r:J,"stroke-width":2,"stroke-dasharray":`${hs(X(e.fill)).toFixed(3)} ${es.toFixed(3)}`,"stroke-dashoffset":0}),Y(`circle`,{class:`${q}__glyph-pin`,cx:7,cy:7,r:1.25}),Y(`rect`,{class:`${q}__glyph-pin-square`,x:5.5,y:5.5,width:3,height:3,rx:.15}),Y(`line`,{class:`${q}__broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),Y(`line`,{class:`${q}__broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8}),Y(`circle`,{class:`${q}__initializing-ring`,cx:7,cy:7,r:J,"stroke-width":1.7})];return Y(`svg`,{class:`${q}__status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...t)}S(`slicc-agent-tabs`,class extends HTMLElement{static observedAttributes=[`active`,`attention`,`connection`];#e=[];#t=null;#n=null;#r=null;#i=null;#a=null;#o=!1;#s=null;#c=!1;#l=null;#u=e=>this.#C(e);#d=e=>this.#w(e);connectedCallback(){ps(this.ownerDocument),this.classList.add(q),this.setAttribute(`part`,`row`),this.#c||=!0,this.addEventListener(`click`,this.#u),this.addEventListener(`keydown`,this.#d),this.#p(),this.#D(),requestAnimationFrame(()=>this.reflow())}disconnectedCallback(){this.#a?.disconnect(),this.#a=null,this.#s!==null&&cancelAnimationFrame(this.#s),this.#s=null,this.removeEventListener(`click`,this.#u),this.removeEventListener(`keydown`,this.#d)}attributeChangedCallback(){!this.#c||!this.isConnected||(this.#p(),this.reflow())}get scoops(){return this.#e.map(e=>({...e}))}set scoops(e){let t=new Map;if(Array.isArray(e))for(let n of e)t.has(n.key)||t.set(n.key,{...n});this.#e=[...t.values()],this.#c&&this.isConnected&&(this.#p(),this.reflow())}get attention(){return this.getAttribute(`attention`)}set attention(e){e==null?this.removeAttribute(`attention`):this.setAttribute(`attention`,e)}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get connection(){return this.getAttribute(`connection`)===`disconnected`?`disconnected`:`connected`}set connection(e){this.setAttribute(`connection`,e)}select(e){this.active=e;let t=this.#e.find(t=>t.key===e)?.label??e;this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0}))}reflow(){if(!(!this.isConnected||this.#o)){this.#o=!0;try{this.#f()}finally{this.#o=!1}}}#f(){let e=[...this.querySelectorAll(`.${q}__segment`)];for(let t of e)t.classList.remove(`hide`);if(this.classList.remove(`has-overflow`),e.length===0){this.#S([]);return}this.#l===null&&(this.#l=ms(e[0]),this.style.setProperty(`--slicc-agent-tabs-segment-floor`,`${this.#l}px`));let t=this.clientWidth;if(t<=0){this.#S([]),requestAnimationFrame(()=>{this.isConnected&&this.clientWidth>0&&this.reflow()});return}let n=Math.max(0,t-ts-ns-rs),r=e.map(e=>e.offsetWidth),i=r.reduce((e,t)=>e+t,0),a=e.length>1&&i>n+1;this.classList.toggle(`has-overflow`,a);let o=a?e.map(e=>e.offsetWidth):r,s=Math.max(0,n-(a?is:0));if(!a){this.#S([]);return}let c=[],l=0;e.forEach((e,t)=>{t===0||c.length===0&&l+o[t]<=s?l+=o[t]:(e.classList.add(`hide`),c.push(e))}),this.#S(c)}#p(){let e=this.#T(),t=this.#e.find(e=>e.key===this.active)??this.#e.at(0)??null;this.#m(),this.#_(t),this.#b(t?.key??null),e!=null&&!this.#e.some(t=>t.key===e)&&this.#E(t?.key??null)?.focus()}#m(){if(this.#n&&this.#r&&this.#i&&this.contains(this.#r))return;this.#n=w(`div`,{class:`${q}__track`,part:`track`,role:`tablist`,"aria-label":`Agents`});let e=this.ownerDocument.createElement(`slicc-scoop-overflow`);e.setAttribute(`part`,`overflow`),e.addEventListener(`slicc-scoop-select`,e=>{let t=e.detail?.id;typeof t==`string`&&(e.stopPropagation(),this.select(t))}),this.#i=e,this.#r=w(`div`,{class:`${q}__track-frame`,part:`track-frame`},this.#n,e),this.replaceChildren(this.#r)}#h(e){let t=w(`slicc-agent-avatar`,{class:`${q}__focus-avatar`,part:`avatar`,role:`img`});return this.#g(t,e),t}#g(e,t){let n=_s(t,this.attention);this.#x(e,`type`,vs(t)),this.#x(e,`color`,t.color??null),this.#x(e,`eyes`,ys(t)),this.#x(e,`connection`,this.getAttribute(`connection`)),this.#x(e,`fill`,String(Math.round(X(t.fill)))),this.#x(e,`blink`,n===`working`),this.#x(e,`aria-label`,`${t.label??t.key} focused agent`),e.style.setProperty(`--slicc-agent-tabs-hue`,bs(t))}#_(e){if(!e){this.#t?.remove(),this.#t=null;return}let t=this.#t??this.#h(e);this.#t=t,this.#g(t,e),(t.parentElement!==this||t.nextElementSibling!==this.#r)&&this.insertBefore(t,this.#r)}#v(e,t){let n=w(`button`,{part:`segment`,type:`button`,role:`tab`},xs(e),w(`span`,{class:`${q}__label`},e.label??e.key));return this.#y(n,e,t),n}#y(e,t,n){let r=_s(t,this.attention),i=gs(t,r),a=X(t.fill),o=this.attention===t.key;e.className=`${q}__segment${t.ephemeral?` ephemeral`:``}`,e.setAttribute(`aria-selected`,String(t.key===n)),e.tabIndex=t.key===n?0:-1;let s=i===`tool`?` (running a tool)`:i?` (thinking)`:``;e.setAttribute(`aria-label`,`${t.label??t.key}: ${r}${s}, ${Math.round(a)}% context fill${o?`, spoke most recently`:``}`),e.dataset.k=t.key,e.dataset.state=r,this.#x(e,`data-phase`,i),this.#x(e,`data-attention`,o?`true`:null),e.style.setProperty(`--slicc-agent-tabs-hue`,bs(t));let c=e.querySelector(`.${q}__label`);c&&(c.textContent=t.label??t.key),e.querySelector(`.${q}__glyph-arc`)?.setAttribute(`stroke-dasharray`,`${hs(a).toFixed(3)} ${es.toFixed(3)}`)}#b(e){if(!this.#n)return;let t=new Map;for(let e of this.#n.querySelectorAll(`:scope > .${q}__segment`)){let n=e.dataset.k??``;t.has(n)?e.remove():t.set(n,e)}let n=this.#e.map(n=>{let r=t.get(n.key)??this.#v(n,e);return t.delete(n.key),this.#y(r,n,e),r});for(let e of t.values())e.remove();n.forEach((e,t)=>{let n=this.#n?.children.item(t)??null;n!==e&&this.#n?.insertBefore(e,n)})}#x(e,t,n){n===null||n===!1?e.hasAttribute(t)&&e.removeAttribute(t):n===!0?e.hasAttribute(t)||e.setAttribute(t,``):e.getAttribute(t)!==n&&e.setAttribute(t,n)}#S(e){if(!this.#i)return;let t=e.map(e=>{let t=e.dataset.k??``,n=this.#e.find(e=>e.key===t)??{key:t};return{id:t,label:n.label??t,type:vs(n),color:n.color,eyes:ys(n),state:_s(n,this.attention),fill:X(n.fill)}});this.#i.items=t}#C(e){let t=e.target?.closest(`.${q}__segment`);t&&this.contains(t)&&t.dataset.k&&this.select(t.dataset.k)}#w(e){let t=e.target?.closest(`.${q}__segment`);if(!t||!this.contains(t))return;if(e.key===`Enter`||e.key===` `){if(!t.dataset.k)return;e.preventDefault(),this.select(t.dataset.k);return}let n=[...this.querySelectorAll(`.${q}__segment:not(.hide)`)].filter(e=>!e.disabled),r=n.indexOf(t);if(r<0||n.length===0)return;let i;if(e.key===`ArrowLeft`)i=n[(r-1+n.length)%n.length];else if(e.key===`ArrowRight`)i=n[(r+1)%n.length];else if(e.key===`Home`)i=n[0];else if(e.key===`End`)i=n.at(-1);else return;e.preventDefault(),i?.focus()}#T(){let e=this.ownerDocument.activeElement;return!(e instanceof Element)||!this.contains(e)?null:e.closest(`.${q}__segment`)?.dataset.k??null}#E(e){return e==null?null:[...this.querySelectorAll(`.${q}__segment`)].find(t=>t.dataset.k===e)??null}#D(){this.#a||typeof ResizeObserver>`u`||(this.#a=new ResizeObserver(()=>{this.#s===null&&(this.#s=requestAnimationFrame(()=>{this.#s=null,this.reflow()}))}),this.#a.observe(this),this.parentElement&&this.#a.observe(this.parentElement))}});var Ss=`/**
4627
4587
  * SLICC design tokens — lifted verbatim from the prototype
4628
4588
  * (proto/StellarRubySwift.html :root + body.dark). Light is the default; dark is
4629
4589
  * opt-in. Per project decision the prototype's token vocabulary and light-default
@@ -4687,7 +4647,7 @@ video {
4687
4647
  --shaderbg: #171410;
4688
4648
  --shadow-pane: rgba(0, 0, 0, 0.35) 0 8px 26px -10px;
4689
4649
  }
4690
- `,ks=`slicc-tokens`;function As(e=document){if(e.getElementById(ks))return;let t=e.createElement(`style`);t.id=ks,t.textContent=Os,(e.head??e.documentElement).appendChild(t)}function js(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function Ms(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>js(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var Ns=T(`
4650
+ `,Cs=`slicc-tokens`;function ws(e=document){if(e.getElementById(Cs))return;let t=e.createElement(`style`);t.id=Cs,t.textContent=Ss,(e.head??e.documentElement).appendChild(t)}function Ts(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function Es(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>Ts(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var Ds=T(`
4691
4651
  :host { display: inline-flex; flex: 0 0 auto; }
4692
4652
  .themetgl {
4693
4653
  font: inherit; font-family: var(--ui); font-size: 14px; line-height: 1;
@@ -4699,7 +4659,7 @@ video {
4699
4659
  }
4700
4660
  .themetgl:hover { background: color-mix(in srgb, var(--ink) 8%, var(--ghost)); }
4701
4661
  .themetgl svg { display: block; }
4702
- `),Ps=16,Fs={light:`moon`,dark:`sun`},Is={light:`Switch to dark mode`,dark:`Switch to light mode`};S(`slicc-theme-toggle`,class extends HTMLElement{static observedAttributes=[`theme`];#e;#t=null;#n=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ns];let e=w(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},w(`slot`,{name:`glyph-light`},n(Fs.light,{size:Ps})),w(`slot`,{name:`glyph-dark`,hidden:!0},n(Fs.dark,{size:Ps})));this.#e.replaceChildren(e),this.#t=e}connectedCallback(){this.#t?.addEventListener(`click`,this.#i),this.#a(this.theme??`light`,{silent:!0})}disconnectedCallback(){this.#t?.removeEventListener(`click`,this.#i)}attributeChangedCallback(e,t,n){e===`theme`&&t!==n&&(this.#n||this.isConnected&&this.#a(this.#r(n)??`light`,{silent:!0}))}get theme(){return this.#r(this.getAttribute(`theme`))}set theme(e){this.#a(e===`dark`?`dark`:`light`,{silent:!0})}get pressed(){return this.theme===`dark`}#r(e){return e===`dark`?`dark`:e===`light`?`light`:null}#i=()=>{this.#a(this.theme===`dark`?`light`:`dark`)};#a(e,t={}){this.#n=!0;try{if(js(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=Is[e];let t=this.#e.querySelector(`slot[name="glyph-light"]`),n=this.#e.querySelector(`slot[name="glyph-dark"]`);t?.toggleAttribute(`hidden`,e===`dark`),n?.toggleAttribute(`hidden`,e===`light`)}for(let t of document.querySelectorAll(`slicc-add-menu`))t.setAttribute(`theme`,e)}finally{this.#n=!1}t.silent||this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}}),S(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){As(this.ownerDocument),this.classList.add(`slicc-theme`),this.#e()}attributeChangedCallback(e,t,n){e===`theme`&&t!==n&&this.isConnected&&this.#e()}get theme(){return this.getAttribute(`theme`)===`dark`?`dark`:`light`}set theme(e){this.setAttribute(`theme`,e===`dark`?`dark`:`light`)}#e(){let e=this.theme;js(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});var Ls=`
4662
+ `),Os=16,ks={light:`moon`,dark:`sun`},As={light:`Switch to dark mode`,dark:`Switch to light mode`};S(`slicc-theme-toggle`,class extends HTMLElement{static observedAttributes=[`theme`];#e;#t=null;#n=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ds];let e=w(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},w(`slot`,{name:`glyph-light`},n(ks.light,{size:Os})),w(`slot`,{name:`glyph-dark`,hidden:!0},n(ks.dark,{size:Os})));this.#e.replaceChildren(e),this.#t=e}connectedCallback(){this.#t?.addEventListener(`click`,this.#i),this.#a(this.theme??`light`,{silent:!0})}disconnectedCallback(){this.#t?.removeEventListener(`click`,this.#i)}attributeChangedCallback(e,t,n){e===`theme`&&t!==n&&(this.#n||this.isConnected&&this.#a(this.#r(n)??`light`,{silent:!0}))}get theme(){return this.#r(this.getAttribute(`theme`))}set theme(e){this.#a(e===`dark`?`dark`:`light`,{silent:!0})}get pressed(){return this.theme===`dark`}#r(e){return e===`dark`?`dark`:e===`light`?`light`:null}#i=()=>{this.#a(this.theme===`dark`?`light`:`dark`)};#a(e,t={}){this.#n=!0;try{if(Ts(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=As[e];let t=this.#e.querySelector(`slot[name="glyph-light"]`),n=this.#e.querySelector(`slot[name="glyph-dark"]`);t?.toggleAttribute(`hidden`,e===`dark`),n?.toggleAttribute(`hidden`,e===`light`)}for(let t of document.querySelectorAll(`slicc-add-menu`))t.setAttribute(`theme`,e)}finally{this.#n=!1}t.silent||this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}}),S(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){ws(this.ownerDocument),this.classList.add(`slicc-theme`),this.#e()}attributeChangedCallback(e,t,n){e===`theme`&&t!==n&&this.isConnected&&this.#e()}get theme(){return this.getAttribute(`theme`)===`dark`?`dark`:`light`}set theme(e){this.setAttribute(`theme`,e===`dark`?`dark`:`light`)}#e(){let e=this.theme;Ts(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});var js=`
4703
4663
  slicc-dock-tree {
4704
4664
  display: block;
4705
4665
  /* Fill the parent shell's flex column. Without this the host collapses to
@@ -4922,7 +4882,7 @@ slicc-dock-tree .dock-tree__preview {
4922
4882
  slicc-dock-tree .dock-tree__preview--active {
4923
4883
  display: block;
4924
4884
  }
4925
- `,Rs=`slicc-dock-tree-style`;function zs(e){if(e.getElementById(Rs))return;let t=e.createElement(`style`);t.id=Rs,t.textContent=Ls,(e.head??e.documentElement).appendChild(t)}var Bs=`slicc-surface`,Vs=`chat`,Hs=`sprinkle:`;function Us(e){return typeof e==`string`&&e.trim().toLowerCase()===`false`}function Ws(e){return e===`chat`?`Chat`:e.startsWith(Hs)?e.slice(9):e}var Gs=[`top`,`left`,`middle`,`right`,`bottom`],Z=[`left`,`middle`,`right`],Ks=[`top`,`center`,`bottom`],qs=.02;function Js(){return{zones:{top:null,left:null,middle:null,right:null,bottom:null},rowFr:{top:1,center:1,bottom:1},colFr:{left:1,middle:1,right:1}}}function Ys(e){return JSON.parse(JSON.stringify(e))}function Xs(e,t){if(e.type===`leaf`){t.push(e.surfaceId);return}for(let n of e.children)Xs(n,t)}function Zs(e,t){if(e.type===`leaf`)return e.surfaceId===t?e:null;for(let n of e.children){let e=Zs(n,t);if(e)return e}return null}function Qs(e,t,n){if(n)return!0;function r(e,n){let i=n||e.locked===!0;if(e===t)return i;if(e.type!==`split`)return null;for(let t of e.children){let e=r(t,i);if(e!=null)return e}return null}return r(e,!1)??!1}function $s(e){return e.locked===!0||e.type===`split`&&e.children.some($s)}function ec(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id||null}function tc(e){e.style.position=`relative`,e.style.inset=`auto`,e.style.display=`flex`,e.style.flex=`1 1 auto`,e.style.minWidth=`0`,e.style.minHeight=`0`}function nc(e){e.style.removeProperty(`position`),e.style.removeProperty(`inset`),e.style.removeProperty(`flex`),e.style.removeProperty(`min-width`),e.style.removeProperty(`min-height`),e.style.display=`none`}function rc(e,t){return{type:`split`,dir:e,children:t,sizes:t.map(()=>1)}}function ic(e,t,n){e.type===`split`&&e.children.forEach((r,i)=>{r===t?n(e,i):ic(r,t,n)})}function ac(e,t){if(e.type!==`split`)return null;for(let n=0;n<e.children.length;n++){let r=e.children[n];if(r===t)return{parent:e,index:n};let i=ac(r,t);if(i)return i}return null}function oc(e){if(!e)return null;if(e.type!==`split`)return e;e.children=e.children.map(oc).filter(e=>e!=null);let t=[],n=[];return e.children.forEach((r,i)=>{r.type===`split`&&r.dir===e.dir?r.children.forEach((a,o)=>{t.push(a),n.push((e.sizes[i]||1)*(r.sizes[o]||1))}):(t.push(r),n.push(e.sizes[i]||1))}),e.children=t,e.sizes=n,e.children.length===0?null:e.children.length===1?e.children[0]:e}function sc(e,t,n){let r=e[t];if(r){if(r===n){e[t]=null;return}ic(r,n,(e,t)=>{e.children.splice(t,1),e.sizes.splice(t,1)}),e[t]=oc(r)}}function cc(e,t,n,r){if(e[t]===n){e[t]=r;return}let i=e[t];i&&ic(i,n,(e,t)=>{e.children[t]=r})}function lc(e,t,n){let r=t.reduce((e,t)=>e+t,0)-e;if(r<=0)return null;let i=Math.min(.98,Math.max(qs,n));return i*r/(1-i)}function uc(e,t,n){let r=(t-e.left)/e.width,i=(n-e.top)/e.height;if(r>.34&&r<.66&&i>.34&&i<.66)return`center`;let a={n:i,s:1-i,w:r,e:1-r},o=Object.entries(a);return o.sort((e,t)=>e[1]-t[1]),o[0][0]}function dc(e){let t=document.createElement(`div`);return t.className=`dock-tree__divider dock-tree__divider--${e}`,t}function fc(){let e=document.createElement(`div`);return e.className=`dock-tree__root`,e}function pc(){let e=document.createElement(`div`);return e.className=`dock-tree__parking`,e.hidden=!0,e}function mc(){let e=document.createElement(`div`);return e.className=`dock-tree__ghost`,e}function hc(){let e=document.createElement(`div`);return e.className=`dock-tree__preview`,e}S(`slicc-dock-tree`,class extends HTMLElement{static observedAttributes=[`tiles-movable`];#e=Js();#t=!1;#n=!1;#r=new Set;#i=null;#a=null;#o=new WeakMap;#s=new Set;#c=fc();#l=pc();#u=mc();#d=hc();#f=new MutationObserver(()=>this.#x());connectedCallback(){zs(this.ownerDocument),this.#n=!0,this.#c.parentElement!==this&&this.append(this.#c),this.#l.parentElement!==this&&this.append(this.#l),this.#u.parentElement!==this&&this.append(this.#u),this.#d.parentElement!==this&&this.append(this.#d),this.#x(),this.#f.observe(this,{childList:!0})}disconnectedCallback(){this.#n=!1,this.#f.disconnect(),this.#L()}attributeChangedCallback(e,t,n){e!==`tiles-movable`||t===n||!this.#n||(this.tilesMovable||this.#L(),this.#x())}get tilesMovable(){let e=this.getAttribute(`tiles-movable`);return e!==null&&!Us(e)}set tilesMovable(e){this.toggleAttribute(`tiles-movable`,!!e&&!Us(e))}setTree(e){this.#e=e?Ys(e):Js(),this.#n&&this.#x()}getTree(){return Ys(this.#e)}setPinned(e){this.#r=new Set(e)}getSurfaceIds(){let e=[];for(let t of Gs){let n=this.#e.zones[t];n&&Xs(n,e)}return e}#p(e){return this.#e.zones[e]!=null||this.#t}#m(e,t){let n=this.#e.zones[t];return n?Qs(n,e,this.#e.locked===!0):!1}#h(e){if(this.#e.locked===!0)return!0;let t=this.#e.zones[e];return t!=null&&$s(t)}#g(e){return this.#e.locked===!0?!0:e===`center`?Z.some(e=>this.#h(e)):this.#h(e)}placeSurface(e,t){if(this.getSurfaceIds().includes(e))return;let n={type:`leaf`,surfaceId:e},r=this.#e.zones[t];this.#e.zones[t]=r==null?n:oc(rc(`col`,[r,n])),this.#n&&this.#x(),this.#R()}removeSurface(e){if(!this.#r.has(e))for(let t of Gs){let n=this.#e.zones[t];if(!n)continue;let r=Zs(n,e);if(r){if(this.#m(r,t))return;sc(this.#e.zones,t,r),this.#n&&this.#x(),this.#R();return}}}moveSurfaceToZone(e,t){let n=!1;for(let r of Gs){let i=this.#e.zones[r];if(!i)continue;let a=Zs(i,e);if(a){if(n=!0,this.#m(a,r)||r===t&&i===a)return;sc(this.#e.zones,r,a);break}}if(!n){this.placeSurface(e,t);return}let r={type:`leaf`,surfaceId:e};this.#e.zones[t]=r,this.#n&&this.#x(),this.#R()}setSurfaceSize(e,t){let n=this.#_(e);if(!n)return!1;let r=this.#z().get(e)??null,i=r?.getBoundingClientRect()??null,a=r?.closest(`.dock-tree__leaf`)?.getBoundingClientRect()??i,o=!1;if(n.width&&(t.widthPx!=null||t.widthPercent!=null)){let e=a&&i?Math.max(0,a.width-i.width):0;o=this.#b(n.width,t.widthPx==null?void 0:t.widthPx+e,t.widthPercent,a?.width)||o}if(n.height&&(t.heightPx!=null||t.heightPercent!=null)){let e=a&&i?Math.max(0,a.height-i.height):0;o=this.#b(n.height,t.heightPx==null?void 0:t.heightPx+e,t.heightPercent,a?.height)||o}return o&&(this.#x(),this.#k()),o}#_(e){for(let t of Gs){let n=this.#e.zones[t];if(!n)continue;let r=Zs(n,e);if(!r)continue;if(this.#m(r,t))return{width:null,height:null};let i=ac(n,r);if(i){let{parent:e,index:t}=i,n={currentFr:e.sizes[t]??1,groupFr:e.sizes,apply:n=>{e.sizes[t]=n}};return{width:e.dir===`row`?n:null,height:e.dir===`col`?n:null}}let a=t===`left`||t===`middle`||t===`right`,o=null;if(a){let e=t,n=this.#y();o={currentFr:this.#e.colFr[e],groupFr:n.map(e=>this.#e.colFr[e]),apply:t=>{this.#e.colFr[e]=t}}}let s=a?`center`:t,c=this.#v(),l={currentFr:this.#e.rowFr[s],groupFr:c.map(e=>this.#e.rowFr[e]),apply:e=>{this.#e.rowFr[s]=e}};return{width:o,height:l}}return null}#v(){let e=[];return this.#p(`top`)&&e.push(`top`),Z.some(e=>this.#p(e))&&e.push(`center`),this.#p(`bottom`)&&e.push(`bottom`),e}#y(){return Z.filter(e=>this.#p(e))}#b(e,t,n,r){let i=null;if(n!=null)i=n/100;else if(t!=null&&r!=null&&r>0&&e.currentFr>0){let n=r*e.groupFr.reduce((e,t)=>e+t,0)/e.currentFr;n>0&&(i=t/n)}if(i==null)return!1;let a=lc(e.currentFr,e.groupFr,i);return a!=null&&(e.apply(a),!0)}#x(){let e=this.#e,t=this.#z(),n=new Set(this.getSurfaceIds()),r=this.#S(e,t),i=[];if(this.#p(`top`)){let n=this.#C(`top`,t);n.style.flex=`${e.rowFr.top} 1 0`,i.push({key:`top`,el:n})}if(r&&i.push({key:`center`,el:r}),this.#p(`bottom`)){let n=this.#C(`bottom`,t);n.style.flex=`${e.rowFr.bottom} 1 0`,i.push({key:`bottom`,el:n})}let a=[];i.forEach((t,n)=>{a.push(t.el),n<i.length-1&&!this.#g(t.key)&&!this.#g(i[n+1].key)&&a.push(this.#E(`v`,t.key,i[n+1].key,this.#c,e.rowFr,Ks))}),this.#c.replaceChildren(...a);for(let[e,r]of t)n.has(e)||(nc(r),r.parentElement!==this.#l&&this.#l.appendChild(r));this.#s=n,this.dispatchEvent(new CustomEvent(`dock-tree-render`,{detail:{placed:[...n]},bubbles:!0,composed:!0}))}#S(e,t){let n=Z.filter(e=>this.#p(e));if(n.length===0)return null;let r=document.createElement(`div`);return r.className=`dock-tree__row`,r.style.flex=`${e.rowFr.center} 1 0`,n.forEach((i,a)=>{let o=this.#C(i,t);o.style.flex=`${e.colFr[i]} 1 0`,r.appendChild(o),a<n.length-1&&!this.#h(i)&&!this.#h(n[a+1])&&r.appendChild(this.#E(`h`,i,n[a+1],r,e.colFr,Z))}),r}#C(e,t){let n=document.createElement(`div`);n.className=`dock-tree__zone`,this.#t&&n.classList.add(`dock-tree__zone--droppable`),n.dataset.zone=e;let r=this.#e.zones[e];if(r==null){let t=document.createElement(`div`);return t.className=`dock-tree__empty`,t.textContent=`${e} (drop here)`,n.appendChild(t),n}let i=this.#w(r,t,e);return i.style.flex=`1 1 0`,n.appendChild(i),n}#w(e,t,n){if(e.type===`leaf`){let r=document.createElement(`div`);r.className=`dock-tree__leaf`;let i=t.get(e.surfaceId);return i&&r.appendChild(this.#T(e,n,e.surfaceId,i)),r}let r=document.createElement(`div`);r.className=`dock-tree__split dock-tree__split--${e.dir}`;let i=this.#e.locked===!0||e.locked===!0;return e.children.forEach((a,o)=>{let s=this.#w(a,t,n);s.style.flex=`${e.sizes[o]??1} 1 0`,r.appendChild(s),o<e.children.length-1&&!i&&r.appendChild(this.#D(e,o,r))}),r}#T(e,t,r,i){let a=document.createElement(`div`);if(a.className=`dock-tree__tile`,r!==`chat`&&(a.classList.add(`dock-tree__tile--chrome`),this.#s.has(r)||a.classList.add(`dock-tree__tile--enter`)),this.tilesMovable&&!this.#m(e,t)){let i=Ws(r),o=document.createElement(`button`);o.type=`button`,o.className=`dock-tree__tile-move`,o.setAttribute(`aria-label`,`Move ${i}`),o.title=i,o.appendChild(n(`grip-vertical`,{size:13})),o.addEventListener(`pointerdown`,n=>this.#A(n,e,t)),a.appendChild(o)}let o=document.createElement(`div`);return o.className=`dock-tree__tile-body`,tc(i),o.appendChild(i),a.appendChild(o),this.#o.set(a,e),a}#E(e,t,n,r,i,a){let o=dc(e);return this.#O(o,e===`h`,r,()=>i[t]??1,()=>i[n]??1,(e,r)=>{i[t]=e,i[n]=r},()=>a.reduce((e,t)=>e+(i[t]??1),0)),o}#D(e,t,n){let r=e.dir===`row`,i=dc(r?`h`:`v`);return this.#O(i,r,n,()=>e.sizes[t]??1,()=>e.sizes[t+1]??1,(n,r)=>{e.sizes[t]=n,e.sizes[t+1]=r},()=>e.sizes.reduce((e,t)=>e+(t??1),0)),i}#O(e,t,n,r,i,a,o){e.addEventListener(`pointerdown`,e=>{e.preventDefault(),this.setPointerCapture(e.pointerId);let s=n.getBoundingClientRect(),c=r()+i(),l=c*qs,u=o(),d=t?s.width:s.height,f=t?e.clientX:e.clientY,p=r(),m=e=>{let n=t?e.clientX:e.clientY,r=d>0?(n-f)/d*u:0,i=Math.max(l,Math.min(c-l,p+r));a(i,c-i),this.#x()},h=()=>{window.removeEventListener(`pointermove`,m),window.removeEventListener(`pointerup`,h),window.removeEventListener(`pointercancel`,h),this.hasPointerCapture(e.pointerId)&&this.releasePointerCapture(e.pointerId),this.#k()};window.addEventListener(`pointermove`,m),window.addEventListener(`pointerup`,h),window.addEventListener(`pointercancel`,h)})}#k(){this.dispatchEvent(new CustomEvent(`dock-tree-resize`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#A(e,t,n){!this.tilesMovable||this.#m(t,n)||(e.preventDefault(),this.#j({kind:`internal`,node:t,fromZone:n},t.type===`leaf`?t.surfaceId:`panel`),this.#M(e))}beginExternalDrag(e,t){this.tilesMovable&&this.#j({kind:`external`,surfaceId:e},e)}#j(e,t){this.#i=e,this.#a=null,this.#t=!0,this.#x(),this.#u.textContent=t,this.#u.classList.add(`dock-tree__ghost--active`),window.addEventListener(`pointermove`,this.#N),window.addEventListener(`pointerup`,this.#I)}#M(e){this.#u.style.left=`${e.clientX}px`,this.#u.style.top=`${e.clientY}px`}#N=e=>{this.#M(e),this.#a=null,this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let t=this.#i;if(!t)return;let n=document.elementFromPoint(e.clientX,e.clientY);if(!n)return;let r=n.closest(`.dock-tree__zone`);if(!(r instanceof HTMLElement))return;let i=r.dataset.zone;if(!i)return;r.classList.add(`dock-tree__zone--hot`);let a=n.closest(`.dock-tree__tile`),o=a instanceof HTMLElement?this.#o.get(a):void 0,s=t.kind===`internal`&&o===t.node,c=!!o&&this.#m(o,i);if(a instanceof HTMLElement&&o&&!s&&!c){let t=a.getBoundingClientRect(),n=uc(t,e.clientX,e.clientY);this.#a={zone:i,leaf:o,region:n},this.#P(t,n)}else a||(this.#a={zone:i,empty:!0},this.#F(r.getBoundingClientRect()))};#P(e,t){let{left:n,top:r,width:i,height:a}=e;t===`n`?a=e.height/2:t===`s`?(r=e.top+e.height/2,a=e.height/2):t===`w`?i=e.width/2:t===`e`&&(n=e.left+e.width/2,i=e.width/2),this.#F(new DOMRect(n,r,i,a))}#F(e){this.#d.style.left=`${e.left}px`,this.#d.style.top=`${e.top}px`,this.#d.style.width=`${e.width}px`,this.#d.style.height=`${e.height}px`,this.#d.classList.add(`dock-tree__preview--active`)}#I=()=>{window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let e=this.#a,t=this.#i;this.#a=null,this.#i=null,this.#t=!1;let n=!!t&&t.kind===`internal`&&!!e&&!e.empty&&e.leaf===t.node,r=!!t&&t.kind===`external`&&this.getSurfaceIds().includes(t.surfaceId);if(!t||!e||n||r){this.#x();return}let i;if(t.kind===`internal`?(sc(this.#e.zones,t.fromZone,t.node),i=t.node):i={type:`leaf`,surfaceId:t.surfaceId},e.empty||this.#e.zones[e.zone]==null)this.#e.zones[e.zone]=i;else{let{region:t,leaf:n}=e,r=rc(t===`e`||t===`w`?`row`:`col`,t===`n`||t===`w`?[i,n]:[n,i]);cc(this.#e.zones,e.zone,n,r),this.#e.zones[e.zone]=oc(this.#e.zones[e.zone])}this.#x(),this.#R()};#L(){this.#i&&(window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#i=null,this.#a=null,this.#t=!1,this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`))}#R(){this.dispatchEvent(new CustomEvent(`dock-tree-change`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#z(){let e=new Map;for(let t of Array.from(this.querySelectorAll(Bs))){if(!(t instanceof HTMLElement)||t.parentElement?.closest(Bs))continue;let n=ec(t);n&&e.set(n,t)}return e}});function gc(e){switch(e.slice(e.lastIndexOf(`.`)).toLowerCase()){case`.png`:case`.jpg`:case`.jpeg`:case`.gif`:case`.webp`:case`.svg`:return`image`;case`.mp3`:case`.wav`:case`.ogg`:case`.m4a`:case`.flac`:return`music`;case`.mp4`:case`.webm`:case`.mov`:case`.avi`:return`film`;case`.json`:return`braces`;case`.md`:return`file-text`;case`.html`:case`.htm`:return`globe`;case`.css`:return`palette`;case`.ts`:case`.js`:case`.tsx`:case`.jsx`:case`.mjs`:case`.cjs`:return`file-code`;case`.zip`:case`.tar`:case`.gz`:case`.bz2`:return`file-archive`;case`.pdf`:return`file-text`;default:return`file`}}function _c(e){return e<1024?e+` B`:e<1048576?(e/1024).toFixed(1)+`K`:e<1073741824?(e/1048576).toFixed(1)+`M`:(e/1073741824).toFixed(1)+`G`}var vc=`
4885
+ `,Ms=`slicc-dock-tree-style`;function Ns(e){if(e.getElementById(Ms))return;let t=e.createElement(`style`);t.id=Ms,t.textContent=js,(e.head??e.documentElement).appendChild(t)}var Ps=`slicc-surface`,Fs=`chat`,Is=`sprinkle:`;function Ls(e){return typeof e==`string`&&e.trim().toLowerCase()===`false`}function Rs(e){return e===`chat`?`Chat`:e.startsWith(Is)?e.slice(9):e}var zs=[`top`,`left`,`middle`,`right`,`bottom`],Z=[`left`,`middle`,`right`],Bs=[`top`,`center`,`bottom`],Vs=.02;function Hs(){return{zones:{top:null,left:null,middle:null,right:null,bottom:null},rowFr:{top:1,center:1,bottom:1},colFr:{left:1,middle:1,right:1}}}function Us(e){return JSON.parse(JSON.stringify(e))}function Ws(e,t){if(e.type===`leaf`){t.push(e.surfaceId);return}for(let n of e.children)Ws(n,t)}function Gs(e,t){if(e.type===`leaf`)return e.surfaceId===t?e:null;for(let n of e.children){let e=Gs(n,t);if(e)return e}return null}function Ks(e,t,n){if(n)return!0;function r(e,n){let i=n||e.locked===!0;if(e===t)return i;if(e.type!==`split`)return null;for(let t of e.children){let e=r(t,i);if(e!=null)return e}return null}return r(e,!1)??!1}function qs(e){return e.locked===!0||e.type===`split`&&e.children.some(qs)}function Js(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id||null}function Ys(e){e.style.position=`relative`,e.style.inset=`auto`,e.style.display=`flex`,e.style.flex=`1 1 auto`,e.style.minWidth=`0`,e.style.minHeight=`0`}function Xs(e){e.style.removeProperty(`position`),e.style.removeProperty(`inset`),e.style.removeProperty(`flex`),e.style.removeProperty(`min-width`),e.style.removeProperty(`min-height`),e.style.display=`none`}function Zs(e,t){return{type:`split`,dir:e,children:t,sizes:t.map(()=>1)}}function Qs(e,t,n){e.type===`split`&&e.children.forEach((r,i)=>{r===t?n(e,i):Qs(r,t,n)})}function $s(e,t){if(e.type!==`split`)return null;for(let n=0;n<e.children.length;n++){let r=e.children[n];if(r===t)return{parent:e,index:n};let i=$s(r,t);if(i)return i}return null}function ec(e){if(!e)return null;if(e.type!==`split`)return e;e.children=e.children.map(ec).filter(e=>e!=null);let t=[],n=[];return e.children.forEach((r,i)=>{r.type===`split`&&r.dir===e.dir?r.children.forEach((a,o)=>{t.push(a),n.push((e.sizes[i]||1)*(r.sizes[o]||1))}):(t.push(r),n.push(e.sizes[i]||1))}),e.children=t,e.sizes=n,e.children.length===0?null:e.children.length===1?e.children[0]:e}function tc(e,t,n){let r=e[t];if(r){if(r===n){e[t]=null;return}Qs(r,n,(e,t)=>{e.children.splice(t,1),e.sizes.splice(t,1)}),e[t]=ec(r)}}function nc(e,t,n,r){if(e[t]===n){e[t]=r;return}let i=e[t];i&&Qs(i,n,(e,t)=>{e.children[t]=r})}function rc(e,t,n){let r=t.reduce((e,t)=>e+t,0)-e;if(r<=0)return null;let i=Math.min(.98,Math.max(Vs,n));return i*r/(1-i)}function ic(e,t,n){let r=(t-e.left)/e.width,i=(n-e.top)/e.height;if(r>.34&&r<.66&&i>.34&&i<.66)return`center`;let a={n:i,s:1-i,w:r,e:1-r},o=Object.entries(a);return o.sort((e,t)=>e[1]-t[1]),o[0][0]}function ac(e){let t=document.createElement(`div`);return t.className=`dock-tree__divider dock-tree__divider--${e}`,t}function oc(){let e=document.createElement(`div`);return e.className=`dock-tree__root`,e}function sc(){let e=document.createElement(`div`);return e.className=`dock-tree__parking`,e.hidden=!0,e}function cc(){let e=document.createElement(`div`);return e.className=`dock-tree__ghost`,e}function lc(){let e=document.createElement(`div`);return e.className=`dock-tree__preview`,e}S(`slicc-dock-tree`,class extends HTMLElement{static observedAttributes=[`tiles-movable`];#e=Hs();#t=!1;#n=!1;#r=new Set;#i=null;#a=null;#o=new WeakMap;#s=new Set;#c=oc();#l=sc();#u=cc();#d=lc();#f=new MutationObserver(()=>this.#x());connectedCallback(){Ns(this.ownerDocument),this.#n=!0,this.#c.parentElement!==this&&this.append(this.#c),this.#l.parentElement!==this&&this.append(this.#l),this.#u.parentElement!==this&&this.append(this.#u),this.#d.parentElement!==this&&this.append(this.#d),this.#x(),this.#f.observe(this,{childList:!0})}disconnectedCallback(){this.#n=!1,this.#f.disconnect(),this.#L()}attributeChangedCallback(e,t,n){e!==`tiles-movable`||t===n||!this.#n||(this.tilesMovable||this.#L(),this.#x())}get tilesMovable(){let e=this.getAttribute(`tiles-movable`);return e!==null&&!Ls(e)}set tilesMovable(e){this.toggleAttribute(`tiles-movable`,!!e&&!Ls(e))}setTree(e){this.#e=e?Us(e):Hs(),this.#n&&this.#x()}getTree(){return Us(this.#e)}setPinned(e){this.#r=new Set(e)}getSurfaceIds(){let e=[];for(let t of zs){let n=this.#e.zones[t];n&&Ws(n,e)}return e}#p(e){return this.#e.zones[e]!=null||this.#t}#m(e,t){let n=this.#e.zones[t];return n?Ks(n,e,this.#e.locked===!0):!1}#h(e){if(this.#e.locked===!0)return!0;let t=this.#e.zones[e];return t!=null&&qs(t)}#g(e){return this.#e.locked===!0?!0:e===`center`?Z.some(e=>this.#h(e)):this.#h(e)}placeSurface(e,t){if(this.getSurfaceIds().includes(e))return;let n={type:`leaf`,surfaceId:e},r=this.#e.zones[t];this.#e.zones[t]=r==null?n:ec(Zs(`col`,[r,n])),this.#n&&this.#x(),this.#R()}removeSurface(e){if(!this.#r.has(e))for(let t of zs){let n=this.#e.zones[t];if(!n)continue;let r=Gs(n,e);if(r){if(this.#m(r,t))return;tc(this.#e.zones,t,r),this.#n&&this.#x(),this.#R();return}}}moveSurfaceToZone(e,t){let n=!1;for(let r of zs){let i=this.#e.zones[r];if(!i)continue;let a=Gs(i,e);if(a){if(n=!0,this.#m(a,r)||r===t&&i===a)return;tc(this.#e.zones,r,a);break}}if(!n){this.placeSurface(e,t);return}let r={type:`leaf`,surfaceId:e};this.#e.zones[t]=r,this.#n&&this.#x(),this.#R()}setSurfaceSize(e,t){let n=this.#_(e);if(!n)return!1;let r=this.#z().get(e)??null,i=r?.getBoundingClientRect()??null,a=r?.closest(`.dock-tree__leaf`)?.getBoundingClientRect()??i,o=!1;if(n.width&&(t.widthPx!=null||t.widthPercent!=null)){let e=a&&i?Math.max(0,a.width-i.width):0;o=this.#b(n.width,t.widthPx==null?void 0:t.widthPx+e,t.widthPercent,a?.width)||o}if(n.height&&(t.heightPx!=null||t.heightPercent!=null)){let e=a&&i?Math.max(0,a.height-i.height):0;o=this.#b(n.height,t.heightPx==null?void 0:t.heightPx+e,t.heightPercent,a?.height)||o}return o&&(this.#x(),this.#k()),o}#_(e){for(let t of zs){let n=this.#e.zones[t];if(!n)continue;let r=Gs(n,e);if(!r)continue;if(this.#m(r,t))return{width:null,height:null};let i=$s(n,r);if(i){let{parent:e,index:t}=i,n={currentFr:e.sizes[t]??1,groupFr:e.sizes,apply:n=>{e.sizes[t]=n}};return{width:e.dir===`row`?n:null,height:e.dir===`col`?n:null}}let a=t===`left`||t===`middle`||t===`right`,o=null;if(a){let e=t,n=this.#y();o={currentFr:this.#e.colFr[e],groupFr:n.map(e=>this.#e.colFr[e]),apply:t=>{this.#e.colFr[e]=t}}}let s=a?`center`:t,c=this.#v(),l={currentFr:this.#e.rowFr[s],groupFr:c.map(e=>this.#e.rowFr[e]),apply:e=>{this.#e.rowFr[s]=e}};return{width:o,height:l}}return null}#v(){let e=[];return this.#p(`top`)&&e.push(`top`),Z.some(e=>this.#p(e))&&e.push(`center`),this.#p(`bottom`)&&e.push(`bottom`),e}#y(){return Z.filter(e=>this.#p(e))}#b(e,t,n,r){let i=null;if(n!=null)i=n/100;else if(t!=null&&r!=null&&r>0&&e.currentFr>0){let n=r*e.groupFr.reduce((e,t)=>e+t,0)/e.currentFr;n>0&&(i=t/n)}if(i==null)return!1;let a=rc(e.currentFr,e.groupFr,i);return a!=null&&(e.apply(a),!0)}#x(){let e=this.#e,t=this.#z(),n=new Set(this.getSurfaceIds()),r=this.#S(e,t),i=[];if(this.#p(`top`)){let n=this.#C(`top`,t);n.style.flex=`${e.rowFr.top} 1 0`,i.push({key:`top`,el:n})}if(r&&i.push({key:`center`,el:r}),this.#p(`bottom`)){let n=this.#C(`bottom`,t);n.style.flex=`${e.rowFr.bottom} 1 0`,i.push({key:`bottom`,el:n})}let a=[];i.forEach((t,n)=>{a.push(t.el),n<i.length-1&&!this.#g(t.key)&&!this.#g(i[n+1].key)&&a.push(this.#E(`v`,t.key,i[n+1].key,this.#c,e.rowFr,Bs))}),this.#c.replaceChildren(...a);for(let[e,r]of t)n.has(e)||(Xs(r),r.parentElement!==this.#l&&this.#l.appendChild(r));this.#s=n,this.dispatchEvent(new CustomEvent(`dock-tree-render`,{detail:{placed:[...n]},bubbles:!0,composed:!0}))}#S(e,t){let n=Z.filter(e=>this.#p(e));if(n.length===0)return null;let r=document.createElement(`div`);return r.className=`dock-tree__row`,r.style.flex=`${e.rowFr.center} 1 0`,n.forEach((i,a)=>{let o=this.#C(i,t);o.style.flex=`${e.colFr[i]} 1 0`,r.appendChild(o),a<n.length-1&&!this.#h(i)&&!this.#h(n[a+1])&&r.appendChild(this.#E(`h`,i,n[a+1],r,e.colFr,Z))}),r}#C(e,t){let n=document.createElement(`div`);n.className=`dock-tree__zone`,this.#t&&n.classList.add(`dock-tree__zone--droppable`),n.dataset.zone=e;let r=this.#e.zones[e];if(r==null){let t=document.createElement(`div`);return t.className=`dock-tree__empty`,t.textContent=`${e} (drop here)`,n.appendChild(t),n}let i=this.#w(r,t,e);return i.style.flex=`1 1 0`,n.appendChild(i),n}#w(e,t,n){if(e.type===`leaf`){let r=document.createElement(`div`);r.className=`dock-tree__leaf`;let i=t.get(e.surfaceId);return i&&r.appendChild(this.#T(e,n,e.surfaceId,i)),r}let r=document.createElement(`div`);r.className=`dock-tree__split dock-tree__split--${e.dir}`;let i=this.#e.locked===!0||e.locked===!0;return e.children.forEach((a,o)=>{let s=this.#w(a,t,n);s.style.flex=`${e.sizes[o]??1} 1 0`,r.appendChild(s),o<e.children.length-1&&!i&&r.appendChild(this.#D(e,o,r))}),r}#T(e,t,r,i){let a=document.createElement(`div`);if(a.className=`dock-tree__tile`,r!==`chat`&&(a.classList.add(`dock-tree__tile--chrome`),this.#s.has(r)||a.classList.add(`dock-tree__tile--enter`)),this.tilesMovable&&!this.#m(e,t)){let i=Rs(r),o=document.createElement(`button`);o.type=`button`,o.className=`dock-tree__tile-move`,o.setAttribute(`aria-label`,`Move ${i}`),o.title=i,o.appendChild(n(`grip-vertical`,{size:13})),o.addEventListener(`pointerdown`,n=>this.#A(n,e,t)),a.appendChild(o)}let o=document.createElement(`div`);return o.className=`dock-tree__tile-body`,Ys(i),o.appendChild(i),a.appendChild(o),this.#o.set(a,e),a}#E(e,t,n,r,i,a){let o=ac(e);return this.#O(o,e===`h`,r,()=>i[t]??1,()=>i[n]??1,(e,r)=>{i[t]=e,i[n]=r},()=>a.reduce((e,t)=>e+(i[t]??1),0)),o}#D(e,t,n){let r=e.dir===`row`,i=ac(r?`h`:`v`);return this.#O(i,r,n,()=>e.sizes[t]??1,()=>e.sizes[t+1]??1,(n,r)=>{e.sizes[t]=n,e.sizes[t+1]=r},()=>e.sizes.reduce((e,t)=>e+(t??1),0)),i}#O(e,t,n,r,i,a,o){e.addEventListener(`pointerdown`,e=>{e.preventDefault(),this.setPointerCapture(e.pointerId);let s=n.getBoundingClientRect(),c=r()+i(),l=c*Vs,u=o(),d=t?s.width:s.height,f=t?e.clientX:e.clientY,p=r(),m=e=>{let n=t?e.clientX:e.clientY,r=d>0?(n-f)/d*u:0,i=Math.max(l,Math.min(c-l,p+r));a(i,c-i),this.#x()},h=()=>{window.removeEventListener(`pointermove`,m),window.removeEventListener(`pointerup`,h),window.removeEventListener(`pointercancel`,h),this.hasPointerCapture(e.pointerId)&&this.releasePointerCapture(e.pointerId),this.#k()};window.addEventListener(`pointermove`,m),window.addEventListener(`pointerup`,h),window.addEventListener(`pointercancel`,h)})}#k(){this.dispatchEvent(new CustomEvent(`dock-tree-resize`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#A(e,t,n){!this.tilesMovable||this.#m(t,n)||(e.preventDefault(),this.#j({kind:`internal`,node:t,fromZone:n},t.type===`leaf`?t.surfaceId:`panel`),this.#M(e))}beginExternalDrag(e,t){this.tilesMovable&&this.#j({kind:`external`,surfaceId:e},e)}#j(e,t){this.#i=e,this.#a=null,this.#t=!0,this.#x(),this.#u.textContent=t,this.#u.classList.add(`dock-tree__ghost--active`),window.addEventListener(`pointermove`,this.#N),window.addEventListener(`pointerup`,this.#I)}#M(e){this.#u.style.left=`${e.clientX}px`,this.#u.style.top=`${e.clientY}px`}#N=e=>{this.#M(e),this.#a=null,this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let t=this.#i;if(!t)return;let n=document.elementFromPoint(e.clientX,e.clientY);if(!n)return;let r=n.closest(`.dock-tree__zone`);if(!(r instanceof HTMLElement))return;let i=r.dataset.zone;if(!i)return;r.classList.add(`dock-tree__zone--hot`);let a=n.closest(`.dock-tree__tile`),o=a instanceof HTMLElement?this.#o.get(a):void 0,s=t.kind===`internal`&&o===t.node,c=!!o&&this.#m(o,i);if(a instanceof HTMLElement&&o&&!s&&!c){let t=a.getBoundingClientRect(),n=ic(t,e.clientX,e.clientY);this.#a={zone:i,leaf:o,region:n},this.#P(t,n)}else a||(this.#a={zone:i,empty:!0},this.#F(r.getBoundingClientRect()))};#P(e,t){let{left:n,top:r,width:i,height:a}=e;t===`n`?a=e.height/2:t===`s`?(r=e.top+e.height/2,a=e.height/2):t===`w`?i=e.width/2:t===`e`&&(n=e.left+e.width/2,i=e.width/2),this.#F(new DOMRect(n,r,i,a))}#F(e){this.#d.style.left=`${e.left}px`,this.#d.style.top=`${e.top}px`,this.#d.style.width=`${e.width}px`,this.#d.style.height=`${e.height}px`,this.#d.classList.add(`dock-tree__preview--active`)}#I=()=>{window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let e=this.#a,t=this.#i;this.#a=null,this.#i=null,this.#t=!1;let n=!!t&&t.kind===`internal`&&!!e&&!e.empty&&e.leaf===t.node,r=!!t&&t.kind===`external`&&this.getSurfaceIds().includes(t.surfaceId);if(!t||!e||n||r){this.#x();return}let i;if(t.kind===`internal`?(tc(this.#e.zones,t.fromZone,t.node),i=t.node):i={type:`leaf`,surfaceId:t.surfaceId},e.empty||this.#e.zones[e.zone]==null)this.#e.zones[e.zone]=i;else{let{region:t,leaf:n}=e,r=Zs(t===`e`||t===`w`?`row`:`col`,t===`n`||t===`w`?[i,n]:[n,i]);nc(this.#e.zones,e.zone,n,r),this.#e.zones[e.zone]=ec(this.#e.zones[e.zone])}this.#x(),this.#R()};#L(){this.#i&&(window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#i=null,this.#a=null,this.#t=!1,this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`))}#R(){this.dispatchEvent(new CustomEvent(`dock-tree-change`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#z(){let e=new Map;for(let t of Array.from(this.querySelectorAll(Ps))){if(!(t instanceof HTMLElement)||t.parentElement?.closest(Ps))continue;let n=Js(t);n&&e.set(n,t)}return e}});function uc(e){switch(e.slice(e.lastIndexOf(`.`)).toLowerCase()){case`.png`:case`.jpg`:case`.jpeg`:case`.gif`:case`.webp`:case`.svg`:return`image`;case`.mp3`:case`.wav`:case`.ogg`:case`.m4a`:case`.flac`:return`music`;case`.mp4`:case`.webm`:case`.mov`:case`.avi`:return`film`;case`.json`:return`braces`;case`.md`:return`file-text`;case`.html`:case`.htm`:return`globe`;case`.css`:return`palette`;case`.ts`:case`.js`:case`.tsx`:case`.jsx`:case`.mjs`:case`.cjs`:return`file-code`;case`.zip`:case`.tar`:case`.gz`:case`.bz2`:return`file-archive`;case`.pdf`:return`file-text`;default:return`file`}}function dc(e){return e<1024?e+` B`:e<1048576?(e/1024).toFixed(1)+`K`:e<1073741824?(e/1048576).toFixed(1)+`M`:(e/1073741824).toFixed(1)+`G`}var fc=`
4926
4886
  slicc-file-tree {
4927
4887
  width: 190px;
4928
4888
  flex: 0 0 auto;
@@ -5070,7 +5030,7 @@ slicc-file-tree .actions button:active {
5070
5030
  [data-theme="dark"] slicc-file-tree .dir.on {
5071
5031
  background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
5072
5032
  }
5073
- `,yc=`slicc-file-tree-style`;function bc(e){if(e.getElementById(yc))return;let t=e.createElement(`style`);t.id=yc,t.textContent=vc,(e.head??e.documentElement).appendChild(t)}function xc(e,t){let r=[];for(let i of e)if(i.kind===`group`)r.push(w(`div`,{class:`grp`},i.label));else if(i.kind===`dir`){let e=t.has(i.id);r.push(w(`div`,{class:e?`dir open`:`dir`,"data-dir-id":i.id,"aria-expanded":e?`true`:`false`,tabindex:`0`},n(`chevron-right`,{size:14,class:`chev`}),i.label));let a=w(`div`,{class:`children`,hidden:!e||void 0});C(a,xc(i.children??[],t)),r.push(a)}else{let e=w(`div`,{class:`actions`},w(`button`,{"data-action":`preview`,type:`button`},n(`eye`,{size:14})),w(`button`,{"data-action":`reference`,type:`button`},n(`at-sign`,{size:14})),w(`button`,{"data-action":`download`,type:`button`},n(`arrow-down-to-line`,{size:14})),w(`button`,{"data-action":`overflow`,type:`button`},n(`ellipsis`,{size:14}))),t=w(`div`,{class:`f`,"data-id":i.id,tabindex:`0`},n(gc(i.label),{size:12,class:`ficon`}),i.label,e);i.size!=null&&t.appendChild(w(`span`,{class:`sz`},_c(i.size))),r.push(t)}return r}var Sc=class extends HTMLElement{static get observedAttributes(){return[`selected`]}#e=null;#t=new Map;#n=new Set;#r=!1;#i=null;#a=null;#o=null;connectedCallback(){bc(this.ownerDocument),this.#r||=(this.#e??(this.#e=this.#l(),this.#f()),!0),this.#u(),this.#h(),this.#g()}disconnectedCallback(){this.#i&&=(this.removeEventListener(`click`,this.#i),null),this.#a&&=(this.removeEventListener(`keydown`,this.#a),null),this.#o!=null&&(clearTimeout(this.#o),this.#o=null)}attributeChangedCallback(e){e===`selected`&&this.#r&&this.isConnected&&this.#c()}get items(){return this.#e?this.#e.slice():[]}set items(e){let t=!this.#r;this.#e=Array.isArray(e)?e.slice():[],this.#r=!0,t&&this.#f(),this.isConnected&&(this.#u(),this.#h())}toggleDir(e){if(!this.#p(e,this.#e??[]))return;let t=!this.#n.has(e);t?this.#n.add(e):this.#n.delete(e),this.#u(),this.dispatchEvent(new CustomEvent(`dir-toggle`,{bubbles:!0,composed:!0,detail:{id:e,open:t}}))}isDirOpen(e){return this.#n.has(e)}get selected(){return this.getAttribute(`selected`)}set selected(e){e==null?this.removeAttribute(`selected`):this.setAttribute(`selected`,e)}selectFile(e){let t=this.querySelector(`.f[data-id="${Q(e)}"]`);if(!t)return;this.#s(e,t);let n=this.#t.get(e)??e;this.dispatchEvent(new CustomEvent(`file-select`,{bubbles:!0,composed:!0,detail:{id:e,path:n}}))}#s(e,t){this.getAttribute(`selected`)!==e&&this.setAttribute(`selected`,e),this.#c(),t.focus()}#c(){let e=this.getAttribute(`selected`);for(let t of this.querySelectorAll(`.f, .dir`))t.classList.toggle(`on`,(t.dataset.id??t.dataset.dirId)===e)}#l(){let e=[];for(let t of Array.from(this.children)){if(!(t instanceof HTMLElement))continue;let n=(t.textContent??``).trim();if(n)if(t.classList.contains(`grp`)||t.hasAttribute(`data-group`)||t.dataset.group!=null)e.push({kind:`group`,label:n});else{let r=t.dataset.id??t.id??n;e.push({kind:`file`,id:r,label:n})}}return e}#u(){let e=this.contains(document.activeElement),t=this.#e??[];this.#t.clear(),this.#d(t),this.replaceChildren(...xc(t,this.#n)),this.#c();let n=this.getAttribute(`selected`);e&&n!=null&&this.querySelector(`.f[data-id="${Q(n)}"], .dir[data-dir-id="${Q(n)}"]`)?.focus()}#d(e){for(let t of e)t.kind===`file`?this.#t.set(t.id,t.path??t.label):t.kind===`dir`&&(this.#t.set(t.id,t.path??t.id),this.#d(t.children??[]))}#f(){this.#n.clear();let e=t=>{for(let n of t)n.kind===`dir`&&(n.open&&this.#n.add(n.id),e(n.children??[]))};e(this.#e??[])}#p(e,t){for(let n of t)if(n.kind===`dir`&&(n.id===e||this.#p(e,n.children??[])))return!0;return!1}#m(e){let t=e.dataset.action,n=e.closest(`.f`);if(!n)return!1;let r=n.dataset.id;if(r==null)return!1;let i=this.#t.get(r)??r;return t===`preview`?this.dispatchEvent(new CustomEvent(`file-preview`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`reference`?this.dispatchEvent(new CustomEvent(`file-reference`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`download`?this.dispatchEvent(new CustomEvent(`file-download`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`overflow`&&this.dispatchEvent(new CustomEvent(`file-overflow`,{bubbles:!0,composed:!0,detail:{id:r,path:i,anchor:e}})),!0}#h(){this.#i||(this.#i=e=>{let t=e.target,n=t?.closest(`[data-action]`);if(n&&this.contains(n)&&this.#m(n))return;let r=t?.closest(`.dir`);if(r&&this.contains(r)){let e=r.dataset.dirId;e!=null&&(this.#s(e,r),this.toggleDir(e));return}let i=t?.closest(`.f`);if(!i||!this.contains(i))return;let a=i.dataset.id;a!=null&&this.selectFile(a)},this.addEventListener(`click`,this.#i))}#g(){this.#a||(this.#a=e=>{if(e.key!==`c`||!(e.ctrlKey||e.metaKey))return;let t=this.getAttribute(`selected`);if(t==null)return;let n=this.querySelector(`.f[data-id="${Q(t)}"], .dir[data-dir-id="${Q(t)}"]`);if(!n)return;e.preventDefault();let r=this.#t.get(t)??t;navigator.clipboard?.writeText(r).then(()=>{this.#o!=null&&clearTimeout(this.#o),n.classList.add(`ft-copy-flash`),this.#o=setTimeout(()=>{n.classList.remove(`ft-copy-flash`),this.#o=null},300)}).catch(()=>void 0)},this.addEventListener(`keydown`,this.#a))}};function Q(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}S(`slicc-file-tree`,Sc);var Cc=`
5033
+ `,pc=`slicc-file-tree-style`;function mc(e){if(e.getElementById(pc))return;let t=e.createElement(`style`);t.id=pc,t.textContent=fc,(e.head??e.documentElement).appendChild(t)}function hc(e,t){let r=[];for(let i of e)if(i.kind===`group`)r.push(w(`div`,{class:`grp`},i.label));else if(i.kind===`dir`){let e=t.has(i.id);r.push(w(`div`,{class:e?`dir open`:`dir`,"data-dir-id":i.id,"aria-expanded":e?`true`:`false`,tabindex:`0`},n(`chevron-right`,{size:14,class:`chev`}),i.label));let a=w(`div`,{class:`children`,hidden:!e||void 0});C(a,hc(i.children??[],t)),r.push(a)}else{let e=w(`div`,{class:`actions`},w(`button`,{"data-action":`preview`,type:`button`},n(`eye`,{size:14})),w(`button`,{"data-action":`reference`,type:`button`},n(`at-sign`,{size:14})),w(`button`,{"data-action":`download`,type:`button`},n(`arrow-down-to-line`,{size:14})),w(`button`,{"data-action":`overflow`,type:`button`},n(`ellipsis`,{size:14}))),t=w(`div`,{class:`f`,"data-id":i.id,tabindex:`0`},n(uc(i.label),{size:12,class:`ficon`}),i.label,e);i.size!=null&&t.appendChild(w(`span`,{class:`sz`},dc(i.size))),r.push(t)}return r}var gc=class extends HTMLElement{static get observedAttributes(){return[`selected`]}#e=null;#t=new Map;#n=new Set;#r=!1;#i=null;#a=null;#o=null;connectedCallback(){mc(this.ownerDocument),this.#r||=(this.#e??(this.#e=this.#l(),this.#f()),!0),this.#u(),this.#h(),this.#g()}disconnectedCallback(){this.#i&&=(this.removeEventListener(`click`,this.#i),null),this.#a&&=(this.removeEventListener(`keydown`,this.#a),null),this.#o!=null&&(clearTimeout(this.#o),this.#o=null)}attributeChangedCallback(e){e===`selected`&&this.#r&&this.isConnected&&this.#c()}get items(){return this.#e?this.#e.slice():[]}set items(e){let t=!this.#r;this.#e=Array.isArray(e)?e.slice():[],this.#r=!0,t&&this.#f(),this.isConnected&&(this.#u(),this.#h())}toggleDir(e){if(!this.#p(e,this.#e??[]))return;let t=!this.#n.has(e);t?this.#n.add(e):this.#n.delete(e),this.#u(),this.dispatchEvent(new CustomEvent(`dir-toggle`,{bubbles:!0,composed:!0,detail:{id:e,open:t}}))}isDirOpen(e){return this.#n.has(e)}get selected(){return this.getAttribute(`selected`)}set selected(e){e==null?this.removeAttribute(`selected`):this.setAttribute(`selected`,e)}selectFile(e){let t=this.querySelector(`.f[data-id="${Q(e)}"]`);if(!t)return;this.#s(e,t);let n=this.#t.get(e)??e;this.dispatchEvent(new CustomEvent(`file-select`,{bubbles:!0,composed:!0,detail:{id:e,path:n}}))}#s(e,t){this.getAttribute(`selected`)!==e&&this.setAttribute(`selected`,e),this.#c(),t.focus()}#c(){let e=this.getAttribute(`selected`);for(let t of this.querySelectorAll(`.f, .dir`))t.classList.toggle(`on`,(t.dataset.id??t.dataset.dirId)===e)}#l(){let e=[];for(let t of Array.from(this.children)){if(!(t instanceof HTMLElement))continue;let n=(t.textContent??``).trim();if(n)if(t.classList.contains(`grp`)||t.hasAttribute(`data-group`)||t.dataset.group!=null)e.push({kind:`group`,label:n});else{let r=t.dataset.id??t.id??n;e.push({kind:`file`,id:r,label:n})}}return e}#u(){let e=this.contains(document.activeElement),t=this.#e??[];this.#t.clear(),this.#d(t),this.replaceChildren(...hc(t,this.#n)),this.#c();let n=this.getAttribute(`selected`);e&&n!=null&&this.querySelector(`.f[data-id="${Q(n)}"], .dir[data-dir-id="${Q(n)}"]`)?.focus()}#d(e){for(let t of e)t.kind===`file`?this.#t.set(t.id,t.path??t.label):t.kind===`dir`&&(this.#t.set(t.id,t.path??t.id),this.#d(t.children??[]))}#f(){this.#n.clear();let e=t=>{for(let n of t)n.kind===`dir`&&(n.open&&this.#n.add(n.id),e(n.children??[]))};e(this.#e??[])}#p(e,t){for(let n of t)if(n.kind===`dir`&&(n.id===e||this.#p(e,n.children??[])))return!0;return!1}#m(e){let t=e.dataset.action,n=e.closest(`.f`);if(!n)return!1;let r=n.dataset.id;if(r==null)return!1;let i=this.#t.get(r)??r;return t===`preview`?this.dispatchEvent(new CustomEvent(`file-preview`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`reference`?this.dispatchEvent(new CustomEvent(`file-reference`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`download`?this.dispatchEvent(new CustomEvent(`file-download`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`overflow`&&this.dispatchEvent(new CustomEvent(`file-overflow`,{bubbles:!0,composed:!0,detail:{id:r,path:i,anchor:e}})),!0}#h(){this.#i||(this.#i=e=>{let t=e.target,n=t?.closest(`[data-action]`);if(n&&this.contains(n)&&this.#m(n))return;let r=t?.closest(`.dir`);if(r&&this.contains(r)){let e=r.dataset.dirId;e!=null&&(this.#s(e,r),this.toggleDir(e));return}let i=t?.closest(`.f`);if(!i||!this.contains(i))return;let a=i.dataset.id;a!=null&&this.selectFile(a)},this.addEventListener(`click`,this.#i))}#g(){this.#a||(this.#a=e=>{if(e.key!==`c`||!(e.ctrlKey||e.metaKey))return;let t=this.getAttribute(`selected`);if(t==null)return;let n=this.querySelector(`.f[data-id="${Q(t)}"], .dir[data-dir-id="${Q(t)}"]`);if(!n)return;e.preventDefault();let r=this.#t.get(t)??t;navigator.clipboard?.writeText(r).then(()=>{this.#o!=null&&clearTimeout(this.#o),n.classList.add(`ft-copy-flash`),this.#o=setTimeout(()=>{n.classList.remove(`ft-copy-flash`),this.#o=null},300)}).catch(()=>void 0)},this.addEventListener(`keydown`,this.#a))}};function Q(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}S(`slicc-file-tree`,gc);var _c=`
5074
5034
  slicc-surface {
5075
5035
  position: absolute;
5076
5036
  inset: 0;
@@ -5102,35 +5062,7 @@ slicc-surface:fullscreen {
5102
5062
  background: var(--canvas, #fff);
5103
5063
  position: fixed;
5104
5064
  }
5105
- `,wc=`slicc-surface-style`;function Tc(e){if(e.getElementById(wc))return;let t=e.createElement(`style`);t.id=wc,t.textContent=Cc,(e.head??e.documentElement).appendChild(t)}function Ec(e){return e===`block`||e===`column`?e:`flex`}S(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){Tc(this.ownerDocument),this.#e()}attributeChangedCallback(e,t,n){this.isConnected&&(e===`surface-id`?this.#e():e===`active`&&t!==n&&this.dispatchEvent(new CustomEvent(`surface-toggle`,{bubbles:!0,composed:!0,detail:{surfaceId:this.surfaceId,active:this.active,layout:this.layout}})))}get surfaceId(){return this.getAttribute(`surface-id`)}set surfaceId(e){e==null?this.removeAttribute(`surface-id`):this.setAttribute(`surface-id`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get layout(){return Ec(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,Ec(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var Dc=T(`
5106
- :host{display:inline-flex;white-space:nowrap;}
5107
- .tab{display:inline-flex;align-items:center;gap:7px;font-family:var(--ui);font-size:12px;color:var(--txt-2);background:transparent;border:1px solid transparent;border-radius:8px;padding:6px 10px;cursor:pointer;white-space:nowrap;}
5108
- .tab:hover{background:var(--ghost);color:var(--ink);}
5109
- .tab.on{color:var(--ink);background:var(--ghost);}
5110
- .gl{font-size:11px;color:var(--txt-3);}
5111
- .tab.on .gl{color:var(--ink);}
5112
- /* sprinkle tabs read as defined chips (more visible), violet-tinted when active */
5113
- .tab.sp{color:var(--ink);background:var(--canvas);border-color:var(--line);}
5114
- .tab.sp:hover{border-color:color-mix(in srgb,var(--violet) 30%,var(--line));background:var(--canvas);}
5115
- .tab.sp.on{background:color-mix(in srgb,var(--violet) 9%,var(--canvas));border-color:color-mix(in srgb,var(--violet) 34%,var(--line));color:var(--ink);}
5116
- :host([theme="dark"]) .tab.sp.on{background:color-mix(in srgb,var(--violet) 18%,var(--canvas));border-color:color-mix(in srgb,var(--violet) 40%,var(--line));}
5117
- .sg{display:inline-grid;place-items:center;width:14px;height:14px;border-radius:4px;color:#fff;background:var(--rainbow);}
5118
- .x{margin-left:3px;width:15px;height:15px;border-radius:4px;display:grid;place-items:center;color:var(--txt-3);}
5119
- .x:hover{background:var(--line);color:var(--ink);}
5120
- .sg svg,.x svg{display:block;}
5121
- `),Oc=13;S(`slicc-tab`,class extends HTMLElement{static observedAttributes=[`tab-id`,`kind`,`active`,`closable`,`badge`,`glyph`,`label`,`theme`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Dc]}connectedCallback(){this.#n(),this.#r()}disconnectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#n()}get tabId(){return this.getAttribute(`tab-id`)}set tabId(e){e==null?this.removeAttribute(`tab-id`):this.setAttribute(`tab-id`,e)}get kind(){return this.getAttribute(`kind`)===`sprinkle`?`sprinkle`:`tool`}set kind(e){this.setAttribute(`kind`,e===`sprinkle`?`sprinkle`:`tool`)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get closable(){return this.hasAttribute(`closable`)}set closable(e){this.toggleAttribute(`closable`,e)}get badge(){return this.getAttribute(`badge`)}set badge(e){e==null?this.removeAttribute(`badge`):this.setAttribute(`badge`,e)}get glyph(){return this.getAttribute(`glyph`)}set glyph(e){e==null?this.removeAttribute(`glyph`):this.setAttribute(`glyph`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#n(){let e=this.kind===`sprinkle`,t=w(`button`,{class:`tab${e?` sp`:``}${this.active?` on`:``}`,part:`tab`,type:`button`});if(this.tabId!=null&&t.setAttribute(`data-t`,this.tabId),e){let e=this.badge??`sparkles`;t.append(w(`span`,{class:`sg`,part:`badge`,"aria-hidden":`true`},n(e,{size:Oc})))}else this.glyph!=null&&t.append(w(`span`,{class:`gl`,part:`glyph`,"aria-hidden":`true`},this.glyph));let r=this.label;t.append(r==null?w(`slot`):document.createTextNode(r)),this.closable&&t.append(w(`span`,{class:`x`,part:`close`,"data-close":``,role:`button`,"aria-label":`Close tab`},n(`x`,{size:Oc}))),this.#e.replaceChildren(t)}#r(){this.#t||(this.#t=e=>this.#a(e),this.#e.addEventListener(`click`,this.#t))}#i(){this.#t&&=(this.#e.removeEventListener(`click`,this.#t),null)}#a(e){let t=e.target,n={tabId:this.tabId};if(t?.closest(`[data-close]`)){e.stopPropagation(),this.dispatchEvent(new CustomEvent(`close`,{detail:n,bubbles:!0,composed:!0}));return}this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}});var kc=`
5122
- slicc-tab-bar {
5123
- display: flex;
5124
- align-items: center;
5125
- gap: 4px;
5126
- min-width: 0;
5127
- overflow-x: auto;
5128
- font-family: var(--ui);
5129
- }
5130
- slicc-tab-bar[hidden] {
5131
- display: none;
5132
- }
5133
- `,Ac=`slicc-tab-bar-style`;function jc(e){if(e.getElementById(Ac))return;let t=e.createElement(`style`);t.id=Ac,t.textContent=kc,(e.head??e.documentElement).appendChild(t)}function Mc(e){return e===`sprinkle`?`sprinkle`:`tool`}S(`slicc-tab-bar`,class extends HTMLElement{static observedAttributes=[`active`];#e=[];#t=!1;#n=null;#r=null;#i=null;connectedCallback(){jc(this.ownerDocument),this.#c(),this.#p()}disconnectedCallback(){this.#l(),this.#t=!1}attributeChangedCallback(e){e===`active`&&this.isConnected&&this.#o()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get tabs(){return this.#e.map(e=>({...e}))}set tabs(e){this.#e=(e??[]).map(e=>({...e})),this.active!=null&&!this.#e.some(e=>e.id===this.active)&&this.#a(this.#e[0]?.id??null),this.#t=!1,this.isConnected&&this.#p()}addTab(e){let t={...e,kind:Mc(e.kind)},n=this.#e.findIndex(e=>e.id===t.id);return n>=0?this.#e[n]=t:this.#e.push(t),this.#t=!1,this.isConnected&&this.#p(),this.selectTab(t.id),t}removeTab(e){let t=this.#e.findIndex(t=>t.id===e);if(t<0)return;let n=this.active===e;if(this.#e.splice(t,1),this.#t=!1,this.isConnected&&this.#p(),this.dispatchEvent(new CustomEvent(`tab-close`,{detail:{id:e},bubbles:!0,composed:!0})),n){let e=this.#e[0]?.id??null;e==null?this.#a(null):this.selectTab(e)}}selectTab(e){this.#e.some(t=>t.id===e)&&this.active!==e&&(this.#a(e),this.dispatchEvent(new CustomEvent(`tab-select`,{detail:{id:e},bubbles:!0,composed:!0})))}#a(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e),this.#o()}#o(){let e=this.active;for(let t of this.querySelectorAll(`:scope > slicc-tab`)){let n=t.getAttribute(`tab-id`);t.toggleAttribute(`active`,n!=null&&n===e)}}#s(e){if(!(e instanceof Element))return null;let t=e.closest(`slicc-tab`);return!t||t.parentElement!==this?null:t.getAttribute(`tab-id`)}#c(){this.#r||(this.#r=e=>this.#u(e),this.#i=e=>this.#d(e),this.addEventListener(`select`,this.#r),this.addEventListener(`close`,this.#i),this.#n=e=>this.#f(e),this.addEventListener(`click`,this.#n))}#l(){this.#r&&this.removeEventListener(`select`,this.#r),this.#i&&this.removeEventListener(`close`,this.#i),this.#n&&this.removeEventListener(`click`,this.#n),this.#r=null,this.#i=null,this.#n=null}#u(e){if(e.target===this)return;let t=this.#s(e.target);t!=null&&(e.stopPropagation(),this.selectTab(t))}#d(e){if(e.target===this)return;let t=this.#s(e.target);t!=null&&(e.stopPropagation(),this.removeTab(t))}#f(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`slicc-tab`);if(!n||n.parentElement!==this)return;let r=n.getAttribute(`tab-id`);if(r==null)return;let i=t.closest(`.x, [data-close]`);if(i&&n.contains(i)){e.stopPropagation(),this.removeTab(r);return}this.selectTab(r)}#p(){if(this.#t)return;this.#t=!0;let e=this.active,t=[];for(let n of this.#e){let r=Mc(n.kind);r!==`tool`&&t.push(w(`slicc-tab`,{"tab-id":n.id,kind:r,label:n.label,part:`tab`,closable:n.closable?!0:void 0,badge:n.badge||void 0,glyph:n.glyph||void 0,active:e!=null&&e===n.id||void 0}))}this.replaceChildren(...t)}});var Nc=`/**
5065
+ `,vc=`slicc-surface-style`;function yc(e){if(e.getElementById(vc))return;let t=e.createElement(`style`);t.id=vc,t.textContent=_c,(e.head??e.documentElement).appendChild(t)}function bc(e){return e===`block`||e===`column`?e:`flex`}S(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){yc(this.ownerDocument),this.#e()}attributeChangedCallback(e,t,n){this.isConnected&&(e===`surface-id`?this.#e():e===`active`&&t!==n&&this.dispatchEvent(new CustomEvent(`surface-toggle`,{bubbles:!0,composed:!0,detail:{surfaceId:this.surfaceId,active:this.active,layout:this.layout}})))}get surfaceId(){return this.getAttribute(`surface-id`)}set surfaceId(e){e==null?this.removeAttribute(`surface-id`):this.setAttribute(`surface-id`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get layout(){return bc(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,bc(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var xc=`/**
5134
5066
  * Copyright (c) 2014 The xterm.js authors. All rights reserved.
5135
5067
  * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
5136
5068
  * https://github.com/chjj/term.js
@@ -5415,7 +5347,7 @@ slicc-tab-bar[hidden] {
5415
5347
  .xterm .xterm-scrollable-element > .shadow.top.left {
5416
5348
  box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
5417
5349
  }
5418
- `,Pc={background:`#0c0c0e`,foreground:`#e7e7ea`,cursor:`#e7e7ea`,cursorAccent:`#0c0c0e`,selectionBackground:`#8b5cf64d`,selectionForeground:`#ffffff`,black:`#0c0c0e`,red:`#f43f5e`,green:`#5bd17b`,yellow:`#f59e0b`,blue:`#3b82f6`,magenta:`#8b5cf6`,cyan:`#06b6d4`,white:`#e7e7ea`,brightBlack:`#8a8a93`,brightRed:`#fb7185`,brightGreen:`#86efac`,brightYellow:`#fbbf24`,brightBlue:`#60a5fa`,brightMagenta:`#a78bfa`,brightCyan:`#22d3ee`,brightWhite:`#ffffff`},Fc=`
5350
+ `,Sc={background:`#0c0c0e`,foreground:`#e7e7ea`,cursor:`#e7e7ea`,cursorAccent:`#0c0c0e`,selectionBackground:`#8b5cf64d`,selectionForeground:`#ffffff`,black:`#0c0c0e`,red:`#f43f5e`,green:`#5bd17b`,yellow:`#f59e0b`,blue:`#3b82f6`,magenta:`#8b5cf6`,cyan:`#06b6d4`,white:`#e7e7ea`,brightBlack:`#8a8a93`,brightRed:`#fb7185`,brightGreen:`#86efac`,brightYellow:`#fbbf24`,brightBlue:`#60a5fa`,brightMagenta:`#a78bfa`,brightCyan:`#22d3ee`,brightWhite:`#ffffff`},Cc=`
5419
5351
  :host {
5420
5352
  display: flex;
5421
5353
  flex-direction: column;
@@ -5456,34 +5388,7 @@ slicc-tab-bar[hidden] {
5456
5388
  /* xterm.js wants its container to size the canvas; let it fill. */
5457
5389
  .host .xterm { height: 100%; }
5458
5390
  .host .xterm-viewport { overflow-y: auto; }
5459
- `,Ic=null;function Lc(){return Ic||=[T(Nc),T(Fc)],Ic}var Rc=class extends HTMLElement{static observedAttributes=[`label`,`hide-header`];#e;#t=null;#n=null;#r=null;#i=null;#a=[];#o=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`})}connectedCallback(){this.#o=!1,this.#s(),this.#c()}disconnectedCallback(){this.#l()}attributeChangedCallback(e){if(this.isConnected&&e===`label`){let e=this.#e.querySelector(`.title`);e&&(e.textContent=this.label)}}get label(){return this.getAttribute(`label`)??`Terminal`}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get hideHeader(){return this.hasAttribute(`hide-header`)}set hideHeader(e){this.toggleAttribute(`hide-header`,e)}get terminal(){return this.#n}write(e){this.#n?this.#n.write(e):this.#a.push(e)}writeln(e){this.#n?this.#n.writeln(e):this.#a.push(`${e}\r\n`)}clear(){this.#n?this.#n.clear():this.#a.length=0}focus(){this.#n?.focus()}fit(){this.#r?.fit()}#s(){if(this.#t)return;this.#e.adoptedStyleSheets=Lc();let e=w(`div`,{class:`hd`,part:`header`},n(`terminal`,{size:14}),w(`span`,{class:`title`},this.label),w(`span`,{class:`spacer`})),t=w(`div`,{class:`host`,part:`host`});this.#e.replaceChildren(e,t),this.#t=t}async#c(){if(this.#n||this.#o)return;let[{Terminal:e},{FitAddon:n}]=await Promise.all([t(()=>import(`./xterm-BSL5rRqA.js`),[]),t(()=>import(`./addon-fit-DIOBYJe3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!zc(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:Pc,convertEol:!0,scrollback:2e3}),i=new n;if(r.loadAddon(i),r.open(this.#t),r.onData(e=>{this.dispatchEvent(new CustomEvent(`terminal-data`,{detail:e,bubbles:!0,composed:!0}))}),this.#n=r,this.#r=i,i.fit(),this.#a.length){for(let e of this.#a)r.write(e);this.#a.length=0}typeof ResizeObserver==`function`&&(this.#i=new ResizeObserver(()=>this.#r?.fit()),this.#i.observe(this.#t))}#l(){this.#o=!0,this.#i?.disconnect(),this.#i=null,this.#n?.dispose(),this.#n=null,this.#r=null,this.#a.length=0}};function zc(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}S(`slicc-terminal`,Rc);var Bc=`
5460
- slicc-workbench-header {
5461
- flex: 0 0 auto;
5462
- display: flex;
5463
- align-items: center;
5464
- gap: 6px;
5465
- padding: 8px 12px;
5466
- border-bottom: 1px solid var(--line);
5467
- overflow: hidden;
5468
- box-sizing: border-box;
5469
- font-family: var(--ui);
5470
- }
5471
- slicc-workbench-header[hidden] {
5472
- display: none;
5473
- }
5474
- slicc-workbench-header > .slicc-wbhead__spacer {
5475
- flex: 1;
5476
- }
5477
- /* Composed right-rail items never shrink — they push left as the spacer grows. */
5478
- slicc-workbench-header > slicc-pane-tag,
5479
- slicc-workbench-header > slicc-collapse-btn {
5480
- flex: 0 0 auto;
5481
- }
5482
- /* The slotted tab bar may shrink and scroll inside the hidden-overflow strip. */
5483
- slicc-workbench-header > slicc-tab-bar {
5484
- min-width: 0;
5485
- }
5486
- `,Vc=`slicc-workbench-header-style`;function Hc(e){if(e.getElementById(Vc))return;let t=e.createElement(`style`);t.id=Vc,t.textContent=Bc,(e.head??e.documentElement).appendChild(t)}S(`slicc-workbench-header`,class extends HTMLElement{static observedAttributes=[`kind`];#e;#t=!1;connectedCallback(){Hc(this.ownerDocument),this.#n(),this.#r(),this.addEventListener(`collapse`,this.#i)}disconnectedCallback(){this.removeEventListener(`collapse`,this.#i)}attributeChangedCallback(e){e===`kind`&&this.isConnected&&this.#r()}get kind(){let e=this.getAttribute(`kind`);return e===`tool`||e===`sprinkle`?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}get spacer(){return this.#n(),this.#e}#n(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-wbhead__spacer`);if(e instanceof HTMLElement){this.#e=e;return}this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-wbhead__spacer`,this.#e.setAttribute(`part`,`spacer`);let t=this.querySelector(`:scope > slicc-pane-tag`),n=this.querySelector(`:scope > slicc-collapse-btn`);this.appendChild(this.#e),t&&this.appendChild(t),n&&this.appendChild(n)}#r(){let e=this.querySelector(`:scope > slicc-pane-tag`);if(!e)return;let t=this.kind;t==null?e.removeAttribute(`kind`):e.setAttribute(`kind`,t)}#i=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0})))}});var Uc=`slicc_monitor_collapsed`;function Wc(){try{let e=localStorage.getItem(Uc);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function Gc(e){try{localStorage.setItem(Uc,JSON.stringify([...e]))}catch{}}var Kc=`
5391
+ `,wc=null;function Tc(){return wc||=[T(xc),T(Cc)],wc}var Ec=class extends HTMLElement{static observedAttributes=[`label`,`hide-header`];#e;#t=null;#n=null;#r=null;#i=null;#a=[];#o=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`})}connectedCallback(){this.#o=!1,this.#s(),this.#c()}disconnectedCallback(){this.#l()}attributeChangedCallback(e){if(this.isConnected&&e===`label`){let e=this.#e.querySelector(`.title`);e&&(e.textContent=this.label)}}get label(){return this.getAttribute(`label`)??`Terminal`}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get hideHeader(){return this.hasAttribute(`hide-header`)}set hideHeader(e){this.toggleAttribute(`hide-header`,e)}get terminal(){return this.#n}write(e){this.#n?this.#n.write(e):this.#a.push(e)}writeln(e){this.#n?this.#n.writeln(e):this.#a.push(`${e}\r\n`)}clear(){this.#n?this.#n.clear():this.#a.length=0}focus(){this.#n?.focus()}fit(){this.#r?.fit()}#s(){if(this.#t)return;this.#e.adoptedStyleSheets=Tc();let e=w(`div`,{class:`hd`,part:`header`},n(`terminal`,{size:14}),w(`span`,{class:`title`},this.label),w(`span`,{class:`spacer`})),t=w(`div`,{class:`host`,part:`host`});this.#e.replaceChildren(e,t),this.#t=t}async#c(){if(this.#n||this.#o)return;let[{Terminal:e},{FitAddon:n}]=await Promise.all([t(()=>import(`./xterm-BSL5rRqA.js`),[]),t(()=>import(`./addon-fit-DIOBYJe3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!Dc(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:Sc,convertEol:!0,scrollback:2e3}),i=new n;if(r.loadAddon(i),r.open(this.#t),r.onData(e=>{this.dispatchEvent(new CustomEvent(`terminal-data`,{detail:e,bubbles:!0,composed:!0}))}),this.#n=r,this.#r=i,i.fit(),this.#a.length){for(let e of this.#a)r.write(e);this.#a.length=0}typeof ResizeObserver==`function`&&(this.#i=new ResizeObserver(()=>this.#r?.fit()),this.#i.observe(this.#t))}#l(){this.#o=!0,this.#i?.disconnect(),this.#i=null,this.#n?.dispose(),this.#n=null,this.#r=null,this.#a.length=0}};function Dc(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}S(`slicc-terminal`,Ec);var Oc=`slicc_monitor_collapsed`;function kc(){try{let e=localStorage.getItem(Oc);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function Ac(e){try{localStorage.setItem(Oc,JSON.stringify([...e]))}catch{}}var jc=`
5487
5392
  slicc-monitor {
5488
5393
  display: block;
5489
5394
  box-sizing: border-box;
@@ -5899,4 +5804,4 @@ slicc-monitor {
5899
5804
  transition-duration: 0.01ms;
5900
5805
  }
5901
5806
  }
5902
- `,qc=`slicc-monitor-style`;function Jc(e){if(e.getElementById(qc))return;let t=e.createElement(`style`);t.id=qc,t.textContent=Kc,(e.head??e.documentElement).appendChild(t)}function Yc(e){return e.status?e.status:e.error?`error`:e.active?`active`:`idle`}function Xc(e){return e===`active`?`Active`:e===`error`?`Error`:e===`warn`?`Warning`:`Idle`}function Zc(e){let t=Yc(e),r=w(`span`,{class:`monitor-row__badges`});for(let t of e.badges??[])r.appendChild(w(`span`,{class:`monitor-row__badge`},t));let i=w(`span`,{class:`monitor-row__headline`},w(`span`,{class:`monitor-row__name`},e.name));r.childElementCount>0&&i.appendChild(r);let a=w(`span`,{class:`monitor-row__content`},i);return e.sublabel&&a.appendChild(w(`span`,{class:`monitor-row__sublabel`},e.sublabel)),w(`li`,{class:`monitor-row`,"data-status":t},w(`span`,{class:`monitor-row__icon`},n(e.icon??`box`,{size:16})),a,w(`span`,{class:`monitor-row__aside`},w(`span`,{class:`monitor-row__meta`},e.meta),w(`span`,{class:`monitor-row__state monitor-row__state--${t}`},w(`span`,{class:`monitor-row__dot`,"aria-hidden":`true`}),Xc(t))))}function Qc(e){return w(`div`,{class:`monitor-empty`,role:`status`},w(`span`,{class:`monitor-empty__icon`},n(`inbox`,{size:18})),w(`span`,{class:`monitor-empty__title`},`No ${e.label.toLocaleLowerCase()} yet`),w(`span`,{class:`monitor-empty__text`},e.emptyText??`${e.label} will appear here when available.`))}function $c(e,t,r,i){let a=t.has(e.id),o=e.count===0?`monitor-section monitor-section--empty`:`monitor-section`,s=[w(`span`,{class:`monitor-section__toggle`,"aria-hidden":`true`},n(a?`chevron-right`:`chevron-down`,{size:15})),w(`span`,{class:`monitor-section__heading`},w(`span`,{class:`monitor-section__title`},e.label),e.meta?w(`span`,{class:`monitor-section__meta`},e.meta):null)];s.push(w(`span`,{class:`monitor-section__count`},String(e.count)));let c=w(`button`,{class:`monitor-section__header`,type:`button`},...s);c.setAttribute(`aria-expanded`,String(!a)),c.setAttribute(`aria-controls`,i),c.addEventListener(`click`,()=>r(e.id));let l=w(`div`,{class:`monitor-section__body`,id:i});if(a&&l.setAttribute(`hidden`,``),e.rows.length===0)l.appendChild(Qc(e));else{let t=w(`ul`,{class:`monitor-section__list`});for(let n of e.rows)t.appendChild(Zc(n));l.appendChild(t)}return w(`section`,{class:o,"data-section":e.id,"data-accent":e.accent??`neutral`},c,l)}function $(e,t){return w(`div`,{class:`monitor-summary__metric`},w(`dt`,null,e),w(`dd`,null,t))}function el(e,t){let r=e.flatMap(e=>e.rows),i=r.filter(e=>Yc(e)===`active`).length,a=r.filter(e=>[`warn`,`error`].includes(Yc(e))).length,o=e.reduce((e,t)=>e+(t.id===`cost`?0:t.count),0),s=e.find(e=>e.id===`cost`)?.meta??`—`,c=w(`button`,{class:`monitor-summary__refresh`,type:`button`,"aria-label":`Refresh monitor data`},n(`refresh-cw`,{size:15}),w(`span`,null,`Refresh`));return c.addEventListener(`click`,t),w(`header`,{class:`monitor-summary`},w(`div`,{class:`monitor-summary__topline`},w(`span`,{class:`monitor-summary__mark`},n(`activity`,{size:19})),w(`div`,{class:`monitor-summary__copy`},w(`h2`,{class:`monitor-summary__title`},`Live monitor`),w(`p`,{class:`monitor-summary__subtitle`},`System activity and connections at a glance`)),c),w(`dl`,{class:`monitor-summary__metrics`},$(`Tracked`,String(o)),$(`Active`,String(i)),$(`Attention`,String(a)),$(`Session cost`,s)))}function tl(e){return{...e,rows:e.rows.map(e=>({...e,badges:e.badges?.slice()}))}}var nl=0;S(`slicc-monitor`,class extends HTMLElement{#e=[];#t=new Set;#n=!1;#r=++nl;connectedCallback(){Jc(this.ownerDocument),this.#n||=(this.#t=Wc(),!0),this.#e.length>0&&this.#i()}get sections(){return this.#e.map(tl)}set sections(e){this.#e=Array.isArray(e)?e.map(tl):[],this.isConnected&&this.#i()}#i(){let e=el(this.#e,()=>{this.dispatchEvent(new CustomEvent(`slicc-monitor-refresh`,{bubbles:!0,composed:!0}))}),t=w(`div`,{class:`monitor-sections`});for(let e of this.#e){let n=e.id.replace(/[^a-z0-9_-]/gi,`-`);t.appendChild($c(e,this.#t,e=>{this.#t.has(e)?this.#t.delete(e):this.#t.add(e),Gc(this.#t),this.#i()},`monitor-${this.#r}-${n}`))}this.replaceChildren(),C(this,[e,t])}});var rl=e({CHAT_SURFACE_ID:()=>Vs,DEFAULT_LAUNCHER_CORNER:()=>ie,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>se,HOLD_TO_ENABLE_MS:()=>un,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>b,LAYOUT_SCHEMA_VERSION:()=>1,MACHINE_WRITTEN_MEMORY_PATH:()=>MACHINE_WRITTEN_MEMORY_PATH,PANEL_MARKER_ATTR:()=>ha,REDACTED_REAL_WORLD_MEMORY_PATH:()=>REDACTED_REAL_WORLD_MEMORY_PATH,SYNTHETIC_MEMORY_PATH:()=>SYNTHETIC_MEMORY_PATH,SliccImagePreview:()=>nn,TOKENS_CSS:()=>Os,ensureGlobalTokens:()=>As,followSystemTheme:()=>Ms,setTheme:()=>js});export{I as a,oo as i,As as n,Hi as o,Ms as r,rl as t};
5807
+ `,Mc=`slicc-monitor-style`;function Nc(e){if(e.getElementById(Mc))return;let t=e.createElement(`style`);t.id=Mc,t.textContent=jc,(e.head??e.documentElement).appendChild(t)}function Pc(e){return e.status?e.status:e.error?`error`:e.active?`active`:`idle`}function Fc(e){return e===`active`?`Active`:e===`error`?`Error`:e===`warn`?`Warning`:`Idle`}function Ic(e){let t=Pc(e),r=w(`span`,{class:`monitor-row__badges`});for(let t of e.badges??[])r.appendChild(w(`span`,{class:`monitor-row__badge`},t));let i=w(`span`,{class:`monitor-row__headline`},w(`span`,{class:`monitor-row__name`},e.name));r.childElementCount>0&&i.appendChild(r);let a=w(`span`,{class:`monitor-row__content`},i);return e.sublabel&&a.appendChild(w(`span`,{class:`monitor-row__sublabel`},e.sublabel)),w(`li`,{class:`monitor-row`,"data-status":t},w(`span`,{class:`monitor-row__icon`},n(e.icon??`box`,{size:16})),a,w(`span`,{class:`monitor-row__aside`},w(`span`,{class:`monitor-row__meta`},e.meta),w(`span`,{class:`monitor-row__state monitor-row__state--${t}`},w(`span`,{class:`monitor-row__dot`,"aria-hidden":`true`}),Fc(t))))}function Lc(e){return w(`div`,{class:`monitor-empty`,role:`status`},w(`span`,{class:`monitor-empty__icon`},n(`inbox`,{size:18})),w(`span`,{class:`monitor-empty__title`},`No ${e.label.toLocaleLowerCase()} yet`),w(`span`,{class:`monitor-empty__text`},e.emptyText??`${e.label} will appear here when available.`))}function Rc(e,t,r,i){let a=t.has(e.id),o=e.count===0?`monitor-section monitor-section--empty`:`monitor-section`,s=[w(`span`,{class:`monitor-section__toggle`,"aria-hidden":`true`},n(a?`chevron-right`:`chevron-down`,{size:15})),w(`span`,{class:`monitor-section__heading`},w(`span`,{class:`monitor-section__title`},e.label),e.meta?w(`span`,{class:`monitor-section__meta`},e.meta):null)];s.push(w(`span`,{class:`monitor-section__count`},String(e.count)));let c=w(`button`,{class:`monitor-section__header`,type:`button`},...s);c.setAttribute(`aria-expanded`,String(!a)),c.setAttribute(`aria-controls`,i),c.addEventListener(`click`,()=>r(e.id));let l=w(`div`,{class:`monitor-section__body`,id:i});if(a&&l.setAttribute(`hidden`,``),e.rows.length===0)l.appendChild(Lc(e));else{let t=w(`ul`,{class:`monitor-section__list`});for(let n of e.rows)t.appendChild(Ic(n));l.appendChild(t)}return w(`section`,{class:o,"data-section":e.id,"data-accent":e.accent??`neutral`},c,l)}function $(e,t){return w(`div`,{class:`monitor-summary__metric`},w(`dt`,null,e),w(`dd`,null,t))}function zc(e,t){let r=e.flatMap(e=>e.rows),i=r.filter(e=>Pc(e)===`active`).length,a=r.filter(e=>[`warn`,`error`].includes(Pc(e))).length,o=e.reduce((e,t)=>e+(t.id===`cost`?0:t.count),0),s=e.find(e=>e.id===`cost`)?.meta??`—`,c=w(`button`,{class:`monitor-summary__refresh`,type:`button`,"aria-label":`Refresh monitor data`},n(`refresh-cw`,{size:15}),w(`span`,null,`Refresh`));return c.addEventListener(`click`,t),w(`header`,{class:`monitor-summary`},w(`div`,{class:`monitor-summary__topline`},w(`span`,{class:`monitor-summary__mark`},n(`activity`,{size:19})),w(`div`,{class:`monitor-summary__copy`},w(`h2`,{class:`monitor-summary__title`},`Live monitor`),w(`p`,{class:`monitor-summary__subtitle`},`System activity and connections at a glance`)),c),w(`dl`,{class:`monitor-summary__metrics`},$(`Tracked`,String(o)),$(`Active`,String(i)),$(`Attention`,String(a)),$(`Session cost`,s)))}function Bc(e){return{...e,rows:e.rows.map(e=>({...e,badges:e.badges?.slice()}))}}var Vc=0;S(`slicc-monitor`,class extends HTMLElement{#e=[];#t=new Set;#n=!1;#r=++Vc;connectedCallback(){Nc(this.ownerDocument),this.#n||=(this.#t=kc(),!0),this.#e.length>0&&this.#i()}get sections(){return this.#e.map(Bc)}set sections(e){this.#e=Array.isArray(e)?e.map(Bc):[],this.isConnected&&this.#i()}#i(){let e=zc(this.#e,()=>{this.dispatchEvent(new CustomEvent(`slicc-monitor-refresh`,{bubbles:!0,composed:!0}))}),t=w(`div`,{class:`monitor-sections`});for(let e of this.#e){let n=e.id.replace(/[^a-z0-9_-]/gi,`-`);t.appendChild(Rc(e,this.#t,e=>{this.#t.has(e)?this.#t.delete(e):this.#t.add(e),Ac(this.#t),this.#i()},`monitor-${this.#r}-${n}`))}this.replaceChildren(),C(this,[e,t])}});var Hc=e({CHAT_SURFACE_ID:()=>Fs,DEFAULT_LAUNCHER_CORNER:()=>ie,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>se,HOLD_TO_ENABLE_MS:()=>un,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>b,LAYOUT_SCHEMA_VERSION:()=>1,MACHINE_WRITTEN_MEMORY_PATH:()=>MACHINE_WRITTEN_MEMORY_PATH,PANEL_MARKER_ATTR:()=>ha,REDACTED_REAL_WORLD_MEMORY_PATH:()=>REDACTED_REAL_WORLD_MEMORY_PATH,SYNTHETIC_MEMORY_PATH:()=>SYNTHETIC_MEMORY_PATH,SliccImagePreview:()=>nn,TOKENS_CSS:()=>Ss,ensureGlobalTokens:()=>ws,followSystemTheme:()=>Es,setTheme:()=>Ts});export{I as a,eo as i,ws as n,Hi as o,Es as r,Hc as t};