sliccy 6.10.0 → 6.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/ui/assets/{account-store-C6v39c42.js → account-store-BncVBNRQ.js} +1 -1
- package/dist/ui/assets/{account-store-BYvAqRQy.js → account-store-DAmEV03Z.js} +1 -1
- package/dist/ui/assets/{adobe-DePZcVoX.js → adobe-B0CbKgWt.js} +1 -1
- package/dist/ui/assets/{adobe-BBhaClSq.js → adobe-BP5K-Ykd.js} +1 -1
- package/dist/ui/assets/{apps-Qd5FsFC6.js → apps-PuzPcv72.js} +1 -1
- package/dist/ui/assets/{azure-openai-cnNn0E0u.js → azure-openai-DnTbQ6_y.js} +1 -1
- package/dist/ui/assets/{azure-openai-CPMQElB8.js → azure-openai-tduzSf1f.js} +1 -1
- package/dist/ui/assets/{cerebras-32y-4Q9D.js → cerebras-CGM0w7_y.js} +1 -1
- package/dist/ui/assets/{cerebras-J3KiEEUj.js → cerebras-OF1-6NAP.js} +1 -1
- package/dist/ui/assets/{connect-surface-BKBmx5kl.js → connect-surface-HogepNfN.js} +1 -1
- package/dist/ui/assets/{fs-jA_4pgPJ.js → fs-BrKZdUV5.js} +1 -1
- package/dist/ui/assets/{fs-CONsxzT2.js → fs-DUUSpnEx.js} +2 -2
- package/dist/ui/assets/{github-Bhdx85U7.js → github-CoeAc-Mo.js} +1 -1
- package/dist/ui/assets/{github-copilot-CmxDAgO_.js → github-copilot-CQersb9Q.js} +1 -1
- package/dist/ui/assets/{github-copilot-DdciuNby.js → github-copilot-CzqlST5R.js} +1 -1
- package/dist/ui/assets/{github-DRws5KfH.js → github-rXYoeEwX.js} +2 -2
- package/dist/ui/assets/{js-realm-worker-Ce3l53oh.js → js-realm-worker-dP0mvoSB.js} +2 -2
- package/dist/ui/assets/{kernel-worker-BpoL3y50.js → kernel-worker-DPwNFHCC.js} +558 -551
- package/dist/ui/assets/leader-session-events-DlAsC04B.js +1 -0
- package/dist/ui/assets/{lick-ws-bridge-CVxpKAnP.js → lick-ws-bridge-CCkYp7oZ.js} +1 -1
- package/dist/ui/assets/{local-llm-DGIV-vl7.js → local-llm-Da6nFbWO.js} +1 -1
- package/dist/ui/assets/{local-llm-DXKbECGc.js → local-llm-Rh60VtvK.js} +1 -1
- package/dist/ui/assets/{main-R-M3Dobz.js → main-eCjfMVfi.js} +3 -3
- package/dist/ui/assets/{mount-CTVlMPAo.js → mount-BcRzuwBB.js} +1 -1
- package/dist/ui/assets/{mount-Cd56jHK6.js → mount-CMU9Zsue.js} +2 -2
- package/dist/ui/assets/{mount-recovery-B0paU8Sm.js → mount-recovery-C27Qqzos.js} +1 -1
- package/dist/ui/assets/{new-session-uLpi4AXT.js → new-session-DmrB3x5H.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-BK8QctAw.js → oauth-bootstrap-C48QA1B0.js} +2 -2
- package/dist/ui/assets/{openai-codex-uZ9pQEbL.js → openai-codex-C27t72me.js} +1 -1
- package/dist/ui/assets/{openai-codex-C-OR6XaX.js → openai-codex-D0YOiDuW.js} +1 -1
- package/dist/ui/assets/{openrouter-Cfnma-BP.js → openrouter-B-GX9aMR.js} +1 -1
- package/dist/ui/assets/{openrouter-Mxj8T0OE.js → openrouter-ndi9sPpR.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-DtzlKYjB.js → openrouter-oauth-5Fg45jeL.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-CWvJgqVY.js → openrouter-oauth-BxJGeQwL.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-D67hCWRw.js → panel-rpc-handlers-DWxZvydU.js} +2 -2
- package/dist/ui/assets/preview-mint-client-CF-bFBqv.js +1 -0
- package/dist/ui/assets/{provider-BSDUmo5h.js → provider-COSNs2tM.js} +2 -2
- package/dist/ui/assets/{provider-DSORdIr3.js → provider-dOjywfEE.js} +1 -1
- package/dist/ui/assets/{provider-settings-HyC6Okdk.js → provider-settings-CwVb9Qr1.js} +1 -1
- package/dist/ui/assets/{provider-settings-oMMfGTtp.js → provider-settings-DHlSR1G_.js} +1 -1
- package/dist/ui/assets/provider-store-access-BLWxABSe.js +1 -0
- package/dist/ui/assets/{provider-store-access-C3MTb-9P.js → provider-store-access-xPfIIBO6.js} +2 -2
- package/dist/ui/assets/{providers-CHvI9w5K.js → providers-B_EFwk_z.js} +1 -1
- package/dist/ui/assets/{providers-BOtjjtHN.js → providers-D3DzGmD2.js} +2 -2
- package/dist/ui/assets/{quick-llm-RXCsSofO.js → quick-llm-1aex0_iq.js} +1 -1
- package/dist/ui/assets/{redirect-uri-BjqWvXrI.js → redirect-uri-CUOAQw-F.js} +1 -1
- package/dist/ui/assets/{runtime-mode-BP9WrRNO.js → runtime-mode-B91km6KC.js} +1 -1
- package/dist/ui/assets/{session-freezer-_6wKmVp-.js → session-freezer-Dpq554zM.js} +2 -2
- package/dist/ui/assets/{setup-feature-flags-remote-C73t5SK1.js → setup-feature-flags-remote-9k2PXGpw.js} +1 -1
- package/dist/ui/assets/setup-standalone-prelude-DNbRO8qC.js +2 -0
- package/dist/ui/assets/{setup-sudo-eRzAqK5R.js → setup-sudo-Ca3WjtVw.js} +2 -2
- package/dist/ui/assets/{skills-DVO_R2ce.js → skills-Dz55jCv1.js} +1 -1
- package/dist/ui/assets/{src-D7DXox0A.js → src-DIMcRNMe.js} +381 -90
- package/dist/ui/assets/{store-BlaEIzVS.js → store-CrEBll1u.js} +1 -1
- package/dist/ui/assets/{sudo-Dg10rMrf.js → sudo-9nBafSdt.js} +1 -1
- package/dist/ui/assets/{tray-leader-CftlXLF8.js → tray-leader-Btq_ccHy.js} +1 -1
- package/dist/ui/assets/{tray-leave-runtime-DaD_0DSt.js → tray-leave-runtime-DyiGVnUI.js} +1 -1
- package/dist/ui/assets/{tray-runtime-config-DRqOLcXQ.js → tray-runtime-config-BxjVzwAJ.js} +1 -1
- package/dist/ui/assets/{upgrade-detection-0V6JNjYX.js → upgrade-detection-C0YMplir.js} +1 -1
- package/dist/ui/assets/{wc-attach-Ct0uTuNZ.js → wc-attach-B5t31l5I.js} +2 -2
- package/dist/ui/assets/{wc-extension-B6hhYZBy.js → wc-extension-C8BFnacQ.js} +2 -2
- package/dist/ui/assets/wc-follower-Cbnlg0kv.js +17 -0
- package/dist/ui/assets/wc-live-CyjMpixD.js +8 -0
- package/dist/ui/assets/{wc-nav-BZESQa3W.js → wc-nav-CxW1a30b.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-a0z2pvEj.js → wc-onboarding-BX5v6kt9.js} +2 -2
- package/dist/ui/assets/{wc-placeholder--mincvzo.js → wc-placeholder-Bzg4kNzh.js} +2 -2
- package/dist/ui/assets/{wc-settings-CdIjp6he.js → wc-settings-GNJP2pfe.js} +2 -2
- package/dist/ui/assets/{wc-shell-CTHW_Gn5.js → wc-shell-BM5xalFr.js} +3 -3
- package/dist/ui/assets/{wc-sprinkles-Deufqh15.js → wc-sprinkles-Fu9-H3ac.js} +2 -2
- package/dist/ui/assets/wc-tray-C8OBamNP.js +2 -0
- package/dist/ui/assets/{wc-tray-scoops-DIT9CbNq.js → wc-tray-scoops-BPhWy9cl.js} +1 -1
- package/dist/ui/assets/{xai-grok-SvDsRAeu.js → xai-grok-BlpliYSv.js} +1 -1
- package/dist/ui/assets/{xai-grok-gX08rejO.js → xai-grok-k6i2NqNR.js} +1 -1
- package/dist/ui/index.html +8 -8
- package/dist/ui/packages/webapp/index.html +8 -8
- package/package.json +3 -3
- package/dist/ui/assets/leader-session-events-m7I5BMZy.js +0 -1
- package/dist/ui/assets/preview-mint-client-Dbqjxupb.js +0 -1
- package/dist/ui/assets/provider-store-access-53AHYMew.js +0 -1
- package/dist/ui/assets/setup-standalone-prelude-Dda07Fwi.js +0 -2
- package/dist/ui/assets/wc-follower-Cv-pRB7x.js +0 -17
- package/dist/ui/assets/wc-live-T2U8QxNF.js +0 -8
- package/dist/ui/assets/wc-tray-C4TF83Pw.js +0 -2
|
@@ -3174,7 +3174,7 @@ slicc-palette-grid .palgrid {
|
|
|
3174
3174
|
.item.destructive {
|
|
3175
3175
|
color: var(--red, #e53e3e);
|
|
3176
3176
|
}
|
|
3177
|
-
`),
|
|
3177
|
+
`),Ci=null,F=null,I=null,wi=class e extends HTMLElement{#e;#t=void 0;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Si]}connectedCallback(){this.#e.addEventListener(`click`,this.#i)}disconnectedCallback(){this.#e.removeEventListener(`click`,this.#i)}#i=t=>{let n=t.target.closest(`[data-action]`);if(!n)return;let r=n.dataset.action;(this.#r??this.#n??this).dispatchEvent(new CustomEvent(`overflow-action`,{bubbles:!0,composed:!0,detail:{action:r,context:this.#t}})),e.hide()};static show(t){e.hide();let r=document.createElement(`slicc-overflow-menu`);r.#t=t.context,r.#n=t.anchor,r.#r=t.dispatchTarget??null;let i=t.items.filter(e=>e.visible!==!1),a=S(`div`,{class:`menu`});for(let e of i){let t=e.destructive?`item destructive`:`item`,r=[];e.icon&&r.push(n(e.icon,{size:14})),r.push(e.label);let i=S(`button`,{class:t,"data-action":e.id},...r);a.appendChild(i)}r.#e.appendChild(a),document.body.appendChild(r),Ci=r;let o=t.anchor.getBoundingClientRect(),s=r.getBoundingClientRect(),c=o.bottom+4;c+s.height>window.innerHeight&&(c=o.top-s.height-4);let l=o.right-s.width;l<4&&(l=o.left),r.style.top=`${c}px`,r.style.left=`${l}px`,F=t=>{t.key===`Escape`&&e.hide()},I=n=>{let i=n.composedPath();!i.includes(r)&&!i.includes(t.anchor)&&e.hide()},document.addEventListener(`keydown`,F),document.addEventListener(`pointerdown`,I,{capture:!0})}static hide(){Ci&&=(Ci.remove(),null),F&&=(document.removeEventListener(`keydown`,F),null),I&&=(document.removeEventListener(`pointerdown`,I,{capture:!0}),null)}};b(`slicc-overflow-menu`,wi);var Ti=C(`
|
|
3178
3178
|
:host { display: none; }
|
|
3179
3179
|
:host([open]) { display: block; }
|
|
3180
3180
|
.overlay {
|
|
@@ -3219,7 +3219,7 @@ slicc-palette-grid .palgrid {
|
|
|
3219
3219
|
@media (prefers-reduced-motion: reduce) {
|
|
3220
3220
|
.overlay, .dialog { transition: none; }
|
|
3221
3221
|
}
|
|
3222
|
-
`);b(`slicc-dialog`,class extends HTMLElement{static observedAttributes=[`open`,`heading`,`description`,`no-close-button`];#e;#t;#n;#r;#i;#a;#o=null;#s=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#c(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3222
|
+
`);b(`slicc-dialog`,class extends HTMLElement{static observedAttributes=[`open`,`heading`,`description`,`no-close-button`];#e;#t;#n;#r;#i;#a;#o=null;#s=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#c(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ti],this.#r=S(`div`,{class:`title`,part:`title`,id:`slicc-dialog-title`}),this.#i=S(`div`,{class:`desc`,part:`description`}),this.#a=S(`button`,{class:`x`,part:`close`,type:`button`,"aria-label":`Close`},n(`x`,{size:18}));let e=S(`div`,{class:`body`},S(`slot`)),t=S(`div`,{class:`footer`},S(`slot`,{name:`footer`}));this.#n=S(`div`,{class:`dialog`,part:`dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`slicc-dialog-title`,tabindex:`-1`},this.#a,this.#r,this.#i,e,t),this.#t=S(`div`,{class:`overlay`,part:`overlay`},this.#n),this.#e.replaceChildren(this.#t),this.#a.addEventListener(`click`,()=>this.#c(`close-button`)),this.#t.addEventListener(`mousedown`,e=>{e.target===this.#t&&!this.persistent&&this.#c(`backdrop`)})}connectedCallback(){this.#u()}disconnectedCallback(){document.removeEventListener(`keydown`,this.#s,!0)}attributeChangedCallback(e){e===`open`?this.#u():this.#l()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get heading(){return this.getAttribute(`heading`)}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get description(){return this.getAttribute(`description`)}set description(e){e==null?this.removeAttribute(`description`):this.setAttribute(`description`,e)}get persistent(){return this.hasAttribute(`persistent`)}set persistent(e){this.toggleAttribute(`persistent`,e)}show(){this.open||=!0}hide(){this.open&&this.#c(`api`)}#c(e){this.open=!1,this.dispatchEvent(new CustomEvent(`slicc-dialog-close`,{detail:{reason:e},bubbles:!0,composed:!0}))}#l(){this.#r.textContent=this.heading??``,this.#r.style.display=this.heading?``:`none`,this.#i.textContent=this.description??``,this.#i.style.display=this.description?``:`none`,this.#a.style.display=this.hasAttribute(`no-close-button`)?`none`:``}#u(){this.#l(),this.open?(this.#o=this.getRootNode().activeElement,document.addEventListener(`keydown`,this.#s,!0),requestAnimationFrame(()=>this.#n.focus())):(document.removeEventListener(`keydown`,this.#s,!0),this.#o?.focus?.(),this.#o=null)}});var Ei=`
|
|
3223
3223
|
slicc-camera-dialog slicc-dialog::part(dialog) {
|
|
3224
3224
|
width: min(560px, 92vw);
|
|
3225
3225
|
}
|
|
@@ -3286,7 +3286,7 @@ slicc-camera-dialog .slicc-camera__btn--snap {
|
|
|
3286
3286
|
slicc-camera-dialog .slicc-camera__btn--snap:hover {
|
|
3287
3287
|
background: color-mix(in srgb, var(--ink) 85%, var(--canvas));
|
|
3288
3288
|
}
|
|
3289
|
-
`,
|
|
3289
|
+
`,Di=`slicc-camera-dialog-style`;function Oi(e){if(e.getElementById(Di))return;let t=e.createElement(`style`);t.id=Di,t.textContent=Ei,(e.head??e.documentElement).appendChild(t)}var ki=`Take a photo`;b(`slicc-camera-dialog`,class extends HTMLElement{static observedAttributes=[`heading`,`preferred-device`];media=null;#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){Oi(this.ownerDocument),this.#h()}disconnectedCallback(){this.#m()}attributeChangedCallback(e){e===`heading`&&this.#i&&this.#e.setAttribute(`heading`,this.heading)}get heading(){return this.getAttribute(`heading`)??ki}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}#s(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}async open(){this.#h();let e=this.#s();if(!e)return null;try{this.#a=await this.#c(e,this.preferredDevice)}catch{return null}return this.#l(this.#a),await this.#u(e),this.#e.setAttribute(`heading`,this.heading),this.#e.show?.(),new Promise(e=>{this.#o=e})}async#c(e,t){if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}}})}catch{}return e.getUserMedia({video:!0})}#l(e){this.#t.srcObject=e,this.#t.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#t.toggleAttribute(`data-mirrored`,t!==`environment`)}async#u(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}this.#n.replaceChildren(...t.map((e,t)=>S(`option`,{value:e.deviceId},e.label||`Camera ${t+1}`)));let n=this.#a?.getVideoTracks()[0]?.getSettings?.().deviceId;n&&(this.#n.value=n),this.#n.toggleAttribute(`hidden`,t.length<2)}async#d(e){let t=this.#s();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#m(),this.#a=n,this.#l(n),this.dispatchEvent(new CustomEvent(`slicc-camera-device-change`,{detail:{deviceId:e},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}#f(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#t.videoWidth,e.height=this.#t.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#t,0,0);let t=e.toDataURL(`image/png`);this.dispatchEvent(new CustomEvent(`slicc-camera-capture`,{detail:{dataUrl:t},bubbles:!0,composed:!0})),this.#p(t)}#p(e){this.#m();let t=this.#o;this.#o=null,this.#e.hide?.(),t?.(e)}#m(){for(let e of this.#a?.getTracks()??[])e.stop();this.#a=null,this.#t&&(this.#t.srcObject=null)}#h(){if(this.#i)return;this.#i=!0,this.#t=S(`video`,{class:`slicc-camera__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#n=S(`select`,{class:`slicc-camera__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#d(this.#n.value)}),this.#r=S(`div`,{class:`slicc-camera__status`});let e=S(`button`,{type:`button`,class:`slicc-camera__btn`,part:`cancel`,slot:`footer`},`Cancel`);e.addEventListener(`click`,()=>this.#p(null));let t=S(`button`,{type:`button`,class:`slicc-camera__btn slicc-camera__btn--snap`,part:`snap`,slot:`footer`},n(`camera`,{size:14}),` Snap`);t.addEventListener(`click`,()=>this.#f());let r=S(`div`,{class:`slicc-camera__body`},this.#t,this.#n,this.#r);this.#e=this.ownerDocument.createElement(`slicc-dialog`),this.#e.setAttribute(`heading`,this.heading),this.#e.append(r,e,t),this.#e.addEventListener(`slicc-dialog-close`,()=>{this.#o&&this.#p(null)}),this.append(this.#e)}});var L={debug(e,t){t===void 0?console.debug(`[slicc-permissions] ${e}`):console.debug(`[slicc-permissions] ${e}`,t)},error(e,t){t===void 0?console.error(`[slicc-permissions] ${e}`):console.error(`[slicc-permissions] ${e}`,t)}},Ai=new Set([`microphone`,`camera`]);function ji(e){return typeof navigator>`u`||!navigator.permissions?.query?Promise.resolve(`prompt`):navigator.permissions.query({name:e}).then(e=>e.state)}var Mi=`
|
|
3290
3290
|
slicc-permissions {
|
|
3291
3291
|
/* Invisible host by default — only the drop overlay paints, and only
|
|
3292
3292
|
while a folder drag is in flight. Hosts can give the element a fixed
|
|
@@ -3457,7 +3457,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3457
3457
|
transform: translateX(-50%) translateY(0);
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
|
-
`,
|
|
3460
|
+
`,Ni=`slicc-permissions-style`;function Pi(e){if(e.getElementById(Ni))return;let t=e.createElement(`style`);t.id=Ni,t.textContent=Mi,(e.head??e.documentElement).appendChild(t)}function R(e){let t=e.dataTransfer?.types;if(!t)return!1;for(let e=0;e<t.length;e++)if(t[e]===`Files`)return!0;return!1}var Fi=class extends HTMLElement{providers={};permissionQuery=null;#e;#t=!1;#n=0;#r=null;connectedCallback(){Pi(this.ownerDocument),this.#C();let e=this.ownerDocument;e.addEventListener(`dragenter`,this.#v),e.addEventListener(`dragover`,this.#y),e.addEventListener(`dragleave`,this.#b),e.addEventListener(`drop`,this.#x)}disconnectedCallback(){let e=this.ownerDocument;e.removeEventListener(`dragenter`,this.#v),e.removeEventListener(`dragover`,this.#y),e.removeEventListener(`dragleave`,this.#b),e.removeEventListener(`drop`,this.#x),this.#n=0,this.removeAttribute(`data-dropping`),this.#r&&this.#r.cancel()}async request(e,t){switch(e){case`camera`:return this.#o(t);case`microphone`:return this.#s(t);case`screenshare`:return this.#l(t);case`usb`:return this.#u(t);case`hid`:return this.#d(t);case`serial`:return this.#f(t);case`filesystem`:return this.#p();case`popup`:return this.#m(t);default:return null}}async prompt(e){if(!e.kinds.length)return{status:`granted`,grants:[]};if(e.skipIfGranted){let t=await this.#i(e);if(t)return t}return this.#r&&this.#r.cancel(),new Promise(t=>{this.#w(e,t)})}async#i(e){if(!e.kinds.every(e=>Ai.has(e)))return L.debug(`prompt: showing dialog (a gesture-bound kind was requested)`,{kinds:e.kinds}),null;let t=this.permissionQuery??ji,n;try{n=await Promise.all(e.kinds.map(e=>t(e)))}catch(e){return L.error(`prompt: permission query threw; showing dialog`,e),null}if(L.debug(`prompt: queried permission state`,{kinds:e.kinds,states:n}),!n.every(e=>e===`granted`))return L.debug(`prompt: not all kinds granted; showing dialog`),null;let r=[];for(let t of e.kinds){let n=await this.request(t,e.requestOptions?.[t]);if(!n)return L.error(`prompt: acquisition failed after granted state`,{kind:t}),{status:`error`,grants:r,reason:`error`};r.push(n)}return L.debug(`prompt: short-circuited dialog (already granted)`,{kinds:e.kinds}),{status:`granted`,grants:r}}#a(){return this.providers.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}async#o(e){let t=this.#a();if(!t)return this.#g(`camera`,`unavailable`,`mediaDevices unavailable`);try{let n=await t.getUserMedia(e?.constraints??{video:!0});return this.#h({kind:`camera`,stream:n})}catch(e){return this.#_(`camera`,e)}}async#s(e){let t=this.#a();if(!t)return this.#g(`microphone`,`unavailable`,`mediaDevices unavailable`);try{let n=await t.getUserMedia(e?.constraints??{audio:!0});return this.#h({kind:`microphone`,stream:n})}catch(e){return this.#_(`microphone`,e)}}#c(){if(this.providers.screenshare)return this.providers.screenshare;let e=typeof navigator<`u`?navigator.mediaDevices:void 0;return e&&typeof e.getDisplayMedia==`function`?{getDisplayMedia:t=>e.getDisplayMedia(t)}:null}async#l(e){let t=this.#c();if(!t)return this.#g(`screenshare`,`unavailable`,`getDisplayMedia unavailable`);try{let n=await t.getDisplayMedia(e?.constraints??{video:!0});return this.#h({kind:`screenshare`,stream:n})}catch(e){return this.#_(`screenshare`,e)}}async#u(e){let t=this.providers.usb??globalThis.navigator?.usb??null;if(!t?.requestDevice)return this.#g(`usb`,`unavailable`,`WebUSB unavailable`);try{let n=await t.requestDevice({filters:e?.filters??[]});return n?this.#h({kind:`usb`,device:n}):this.#g(`usb`,`cancelled`)}catch(e){return this.#_(`usb`,e)}}async#d(e){let t=this.providers.hid??globalThis.navigator?.hid??null;if(!t?.requestDevice)return this.#g(`hid`,`unavailable`,`WebHID unavailable`);try{let n=await t.requestDevice({filters:e?.filters??[]}),r=Array.isArray(n)?n:n?[n]:[];return r.length===0?this.#g(`hid`,`cancelled`):this.#h({kind:`hid`,device:r[0],devices:r})}catch(e){return this.#_(`hid`,e)}}async#f(e){let t=this.providers.serial??globalThis.navigator?.serial??null;if(!t?.requestPort)return this.#g(`serial`,`unavailable`,`Web Serial unavailable`);try{let n=await t.requestPort(e?.filters?.length?{filters:e.filters}:{});return n?this.#h({kind:`serial`,port:n}):this.#g(`serial`,`cancelled`)}catch(e){return this.#_(`serial`,e)}}async#p(){let e=this.providers.filesystem??(typeof window<`u`&&`showDirectoryPicker`in window&&window||null);if(!e?.showDirectoryPicker)return this.#g(`filesystem`,`unavailable`,`showDirectoryPicker unavailable`);try{let t=await e.showDirectoryPicker({mode:`readwrite`});return this.#h({kind:`filesystem`,handle:t,source:`picker`,permission:`granted`})}catch(e){return this.#_(`filesystem`,e)}}#m(e){let t=e?.url;if(!t)return this.#g(`popup`,`error`,`popup request missing url`);let n=e?.features??`width=500,height=700,popup=yes`,r=this.providers.popup??(typeof window<`u`?{open:(e,t)=>window.open(e,`_blank`,t)}:null);if(!r)return this.#g(`popup`,`unavailable`,`window.open unavailable`);let i;try{i=r.open(t,n)}catch(e){return this.#_(`popup`,e)}return i?this.#h({kind:`popup`,window:i}):this.#g(`popup`,`error`,`window.open returned null (popup blocked?)`)}#h(e){return this.dispatchEvent(new CustomEvent(`slicc-permission-grant`,{detail:e,bubbles:!0,composed:!0})),e}#g(e,t,n){return this.dispatchEvent(new CustomEvent(`slicc-permission-deny`,{detail:{kind:e,reason:t,message:n},bubbles:!0,composed:!0})),null}#_(e,t){return t instanceof Error&&(t.name===`AbortError`||t.name===`NotFoundError`)?this.#g(e,`cancelled`):this.#g(e,`error`,t instanceof Error?t.message:String(t))}#v=e=>{R(e)&&(e.preventDefault(),this.#n++,this.setAttribute(`data-dropping`,``))};#y=e=>{R(e)&&e.preventDefault()};#b=e=>{R(e)&&(this.#n=Math.max(0,this.#n-1),this.#n===0&&this.removeAttribute(`data-dropping`))};#x=e=>{if(!R(e))return;e.preventDefault(),this.#n=0,this.removeAttribute(`data-dropping`);let t=e.dataTransfer?.items;if(!t?.length)return;let n=[];for(let e=0;e<t.length;e++){let r=t[e];r.kind!==`file`||typeof r.getAsFileSystemHandle!=`function`||n.push(r.getAsFileSystemHandle())}n.length!==0&&this.#S(n)};async#S(e){let t;try{t=await Promise.all(e)}catch(e){this.#g(`filesystem`,`error`,e instanceof Error?e.message:String(e));return}let n=t.find(e=>e?.kind===`directory`);if(!n){this.#g(`filesystem`,`cancelled`,`no directory in drop`);return}let r=n,i;if(r.requestPermission)try{i=await r.requestPermission({mode:`readwrite`})}catch(e){this.#g(`filesystem`,`error`,e instanceof Error?e.message:String(e));return}else i=`granted`;if(i!==`granted`){this.#g(`filesystem`,`cancelled`,`permission ${i}`);return}this.#h({kind:`filesystem`,handle:n,source:`drop`,permission:i})}#C(){if(this.#t)return;this.#t=!0;let e=S(`div`,{class:`slicc-permissions__drop-inner`},n(`folder-up`,{size:32}),S(`div`,null,`Drop a folder to mount it (read-write)`));this.#e=S(`div`,{class:`slicc-permissions__drop`,part:`drop`,"aria-hidden":`true`},e),this.append(this.#e)}#w(e,t){let r=e.heading??Ri(e.kinds),i=e.grantLabel??`Allow`,a=e.cancelLabel??`Cancel`,o=`slicc-permissions__heading-${Math.random().toString(36).slice(2,8)}`,s=`slicc-permissions__desc-${Math.random().toString(36).slice(2,8)}`,c=S(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`ghost`,part:`prompt-cancel`},a),l=S(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`primary`,part:`prompt-grant`},i),u=S(`div`,{class:`slicc-permissions__prompt-icons`,"aria-hidden":`true`},...e.kinds.map(e=>S(`span`,{class:`slicc-permissions__prompt-icon`},n(Ii(e),{size:22})))),d=S(`div`,{class:`slicc-permissions__prompt`,part:`prompt`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":o,"aria-describedby":s,tabindex:`-1`,popover:`manual`},u,S(`h2`,{class:`slicc-permissions__prompt-heading`,id:o},r),S(`p`,{class:`slicc-permissions__prompt-desc`,id:s},e.description),S(`div`,{class:`slicc-permissions__prompt-actions`},c,l));this.append(d);let f=d;if(typeof f.showPopover==`function`)try{f.showPopover()}catch{}let p=!1,m=this.ownerDocument.activeElement??null,h=()=>{if(d.removeEventListener(`keydown`,_),d.remove(),m&&typeof m.focus==`function`)try{m.focus()}catch{}this.#r=null},g=(n,r)=>{if(!p){p=!0;for(let t of e.kinds)this.#g(t,n,r);h(),t({status:`cancelled`,grants:[],reason:n,message:r})}},_=e=>{if(e.key===`Escape`){e.preventDefault(),g(`cancelled`);return}if(e.key===`Tab`){let t=[c,l],n=this.ownerDocument.activeElement,r=t.indexOf(n);if(r===-1){t[0].focus(),e.preventDefault();return}(e.shiftKey?t[(r-1+t.length)%t.length]:t[(r+1)%t.length]).focus(),e.preventDefault()}};c.addEventListener(`click`,()=>g(`cancelled`)),l.addEventListener(`click`,async()=>{if(p)return;p=!0,l.disabled=!0,c.disabled=!0;let n=[],r=null;for(let t of e.kinds){let i=await this.request(t,e.requestOptions?.[t]);if(i)n.push(i);else{r={kind:t,reason:`cancelled`};break}}let i=r?e.kinds.indexOf(r.kind):-1;if(r&&i>=0)for(let t=i+1;t<e.kinds.length;t++)this.#g(e.kinds[t],`cancelled`);h(),t(r?{status:`cancelled`,grants:n,reason:`cancelled`}:{status:`granted`,grants:n})}),d.addEventListener(`keydown`,_),this.#r={cancel:()=>g(`cancelled`)},requestAnimationFrame(()=>{d.setAttribute(`data-open`,``),l.focus()})}};function Ii(e){switch(e){case`camera`:return`camera`;case`microphone`:return`mic`;case`screenshare`:return`monitor-up`;case`usb`:return`usb`;case`hid`:return`keyboard`;case`serial`:return`cable`;case`filesystem`:return`folder`;case`popup`:return`external-link`}}function Li(e){switch(e){case`camera`:return`camera`;case`microphone`:return`microphone`;case`screenshare`:return`screen`;case`usb`:return`USB device`;case`hid`:return`HID device`;case`serial`:return`serial port`;case`filesystem`:return`folder`;case`popup`:return`sign-in window`}}function Ri(e){if(e.length===1)return`Allow access to your ${Li(e[0])}?`;let t=e.map(Li),n=t.pop();return`Allow access to your ${t.join(`, `)} and ${n}?`}b(`slicc-permissions`,Fi);var zi=new Set([`top`,`bottom`,`left`,`right`]),Bi=C(`
|
|
3461
3461
|
:host { position: relative; display: inline-flex; }
|
|
3462
3462
|
:host([hidden]) { display: none; }
|
|
3463
3463
|
.tip {
|
|
@@ -3482,7 +3482,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3482
3482
|
:host(:hover) .tip[data-p="right"], :host(:focus-within) .tip[data-p="right"], :host([open]) .tip[data-p="right"] { transform: translate(0, -50%); }
|
|
3483
3483
|
.tip:empty { display: none; }
|
|
3484
3484
|
@media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
|
|
3485
|
-
`);b(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3485
|
+
`);b(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Bi],this.#t=S(`span`,{class:`tip`,part:`tip`,role:`tooltip`,"aria-hidden":`true`}),this.#e.replaceChildren(S(`slot`),this.#t)}connectedCallback(){this.#n()}attributeChangedCallback(){this.#n()}get label(){return this.getAttribute(`label`)??``}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get placement(){let e=this.getAttribute(`placement`);return e&&zi.has(e)?e:`top`}set placement(e){this.setAttribute(`placement`,e)}#n(){this.#t.textContent=this.label,this.#t.setAttribute(`data-p`,this.placement)}});var Vi=C(`
|
|
3486
3486
|
:host {
|
|
3487
3487
|
display: inline-grid;
|
|
3488
3488
|
place-items: center;
|
|
@@ -3529,7 +3529,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3529
3529
|
object-fit: cover;
|
|
3530
3530
|
display: block;
|
|
3531
3531
|
}
|
|
3532
|
-
`),
|
|
3532
|
+
`),Hi=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=[Vi],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():Wi(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await Ui(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=[S(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=S(`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=S(`div`,{class:`me`,part:`avatar`},S(`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 Ui(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 Wi(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()}b(`slicc-avatar`,Hi);var Gi=C(`
|
|
3533
3533
|
:host { display: inline-flex; flex: 0 0 auto; }
|
|
3534
3534
|
:host([hidden]) { display: none; }
|
|
3535
3535
|
.col {
|
|
@@ -3550,7 +3550,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3550
3550
|
.col:hover { background: var(--ghost); color: var(--ink); }
|
|
3551
3551
|
.icon { display: inline-flex; place-items: center; pointer-events: none; }
|
|
3552
3552
|
.icon svg { display: block; }
|
|
3553
|
-
`),
|
|
3553
|
+
`),Ki=`panel-right-close`,qi=`Collapse`,Ji=16;b(`slicc-collapse-btn`,class extends HTMLElement{static observedAttributes=[`label`,`icon`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Gi]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get label(){return this.getAttribute(`label`)??qi}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??Ki}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}#n(){let e=this.label,t=n(this.icon,{size:Ji,part:`icon`}),r=S(`button`,{class:`col`,part:`button`,type:`button`,"aria-label":e,title:e},S(`slot`,null,S(`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 Yi=5,Xi=1;function Zi(e){return e.replace(`claude-`,``)}function Qi(e){return e==null||e===0?``:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}function $i(e){if(e.length<=Yi)return{individuals:e,buckets:[]};let t=[...e].sort((e,t)=>t.cost-e.cost),n=t.slice(0,Yi),r=[],i={count:0,cost:0};for(let e of t.slice(Yi))i.count+=1,i.cost+=e.cost,i.cost>=Xi&&(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 ea=C(`
|
|
3554
3554
|
:host {
|
|
3555
3555
|
position: absolute;
|
|
3556
3556
|
top: calc(100% + 8px);
|
|
@@ -3674,7 +3674,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3674
3674
|
font-variant-numeric: tabular-nums;
|
|
3675
3675
|
color: var(--ink);
|
|
3676
3676
|
}
|
|
3677
|
-
`);b(`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=[
|
|
3677
|
+
`);b(`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=[ea]}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=Qi(e.tokens);return S(`div`,{class:`model-row`},S(`span`,{class:`model-name`},Zi(e.model)),t?S(`span`,{class:`model-tokens`},t):!1,S(`span`,{class:`model-cost`},`$${e.cost.toFixed(2)}`))});e.push(S(`div`,{class:`section section--models`},S(`div`,{class:`section-title`},`BY MODEL`),...t))}if(this.#n.length>0){let t=$i(this.#n),n=t.individuals.map(e=>S(`div`,{class:`scoop-row`},S(`span`,{class:`scoop-name`},e.name),S(`span`,{class:`scoop-cost`},`$${e.cost.toFixed(2)}`))),r=t.buckets.map(e=>S(`div`,{class:`bucket-row`,part:`bucket`},`${e.count} ${e.count===1?`agent`:`agents`} · $${e.cost.toFixed(2)}`));e.push(S(`div`,{class:`section section--scoops`},S(`div`,{class:`section-title`},`BY AGENT`),...n,...r))}let t=this.#r??this.#t.reduce((e,t)=>e+t.cost,0);e.push(S(`div`,{class:`total-row`},S(`span`,{class:`total-label`},`Total`),S(`span`,{class:`total-cost`},`$${t.toFixed(2)}`)));let n=S(`div`,{class:`card`},...e);this.#e.replaceChildren(n)}});var ta=C(`
|
|
3678
3678
|
:host {
|
|
3679
3679
|
display: flex;
|
|
3680
3680
|
align-items: center;
|
|
@@ -3703,7 +3703,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3703
3703
|
min-width: 0;
|
|
3704
3704
|
background: var(--line, #e5e5e5);
|
|
3705
3705
|
}
|
|
3706
|
-
`);b(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3706
|
+
`);b(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ta]}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??S(`slot`);this.#e.replaceChildren(S(`span`,{class:`label`,part:`label`},e))}});var na=`CLI float`;function ra(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 ia(e){let t=ra(e);return t==null?null:`$${t.toFixed(2)}`}function aa(e){return`${ia(e)??`$0.00`}/h`}var oa=720,sa=C(`
|
|
3707
3707
|
:host {
|
|
3708
3708
|
position: relative;
|
|
3709
3709
|
display: inline-flex;
|
|
@@ -3820,7 +3820,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3820
3820
|
@media (prefers-reduced-motion: reduce) {
|
|
3821
3821
|
.tip { transition: none; }
|
|
3822
3822
|
}
|
|
3823
|
-
`);b(`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=[
|
|
3823
|
+
`);b(`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=[sa]}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`)??na}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(aa(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)<=oa?this.setAttribute(`title`,this.#o()):this.removeAttribute(`title`)}#c(){let e=[];this.online&&e.push(S(`span`,{class:`fdot`,part:`dot`}));let[t,...r]=this.label.split(` · `),i=[S(`span`,{class:`runtime`},t)];r.length>0&&i.push(S(`span`,{class:`detail`},` · ${r.join(` · `)}`)),e.push(S(`span`,{class:`label`,part:`label`},S(`slot`,null,...i))),e.push(S(`span`,{class:`sep`,part:`sep`}));let a=S(`span`,{class:`spent`,part:`spent rate`},n(`circle-dollar-sign`,{size:12}),S(`span`,{class:`amount`},aa(this.rate)));a.addEventListener(`mouseenter`,()=>this.#l()),a.addEventListener(`mouseleave`,()=>this.#u()),e.push(a),e.push(S(`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=ra(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 ca=C(`
|
|
3824
3824
|
:host { display: inline-grid; }
|
|
3825
3825
|
:host([hidden]) { display: none; }
|
|
3826
3826
|
.iconbtn {
|
|
@@ -3849,7 +3849,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3849
3849
|
.iconbtn:disabled:hover { background: var(--canvas); color: var(--txt-2); }
|
|
3850
3850
|
.icon { display: grid; place-items: center; pointer-events: none; }
|
|
3851
3851
|
.icon svg { display: block; }
|
|
3852
|
-
`),
|
|
3852
|
+
`),la=`plus`,ua=16;b(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ca]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??la}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=S(`slot`,null,S(`span`,{class:`icon`},n(this.icon,{size:ua,part:`icon`}))),r=S(`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 da=`
|
|
3853
3853
|
slicc-pane {
|
|
3854
3854
|
display: flex;
|
|
3855
3855
|
flex-direction: column;
|
|
@@ -3888,7 +3888,7 @@ slicc-pane .slicc-pane__body {
|
|
|
3888
3888
|
min-height: 0;
|
|
3889
3889
|
overflow: auto;
|
|
3890
3890
|
}
|
|
3891
|
-
`,
|
|
3891
|
+
`,fa=`slicc-pane-style`;function pa(e){if(e.getElementById(fa))return;let t=e.createElement(`style`);t.id=fa,t.textContent=da,(e.head??e.documentElement).appendChild(t)}b(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){pa(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 ma(e){return e===`tool`||e===`sprinkle`}var ha=C(`
|
|
3892
3892
|
:host { display: none; flex: 0 0 auto; }
|
|
3893
3893
|
:host([kind="tool"]), :host([kind="sprinkle"]) { display: inline-block; }
|
|
3894
3894
|
.ptag {
|
|
@@ -3907,7 +3907,7 @@ slicc-pane .slicc-pane__body {
|
|
|
3907
3907
|
background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
|
|
3908
3908
|
border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
|
|
3909
3909
|
}
|
|
3910
|
-
`);b(`slicc-pane-tag`,class extends HTMLElement{static observedAttributes=[`kind`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3910
|
+
`);b(`slicc-pane-tag`,class extends HTMLElement{static observedAttributes=[`kind`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ha]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){let e=this.getAttribute(`kind`);return ma(e)?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}#t(){let e=S(`span`,{class:`ptag`,part:`tag`},S(`slot`,null,this.kind??``));this.#e.replaceChildren(e)}});var ga=`
|
|
3911
3911
|
slicc-press-button {
|
|
3912
3912
|
display: inline-flex;
|
|
3913
3913
|
}
|
|
@@ -3999,7 +3999,7 @@ slicc-press-button {
|
|
|
3999
3999
|
animation: none;
|
|
4000
4000
|
}
|
|
4001
4001
|
}
|
|
4002
|
-
`,
|
|
4002
|
+
`,_a=`slicc-press-button-style`;function va(e){if(e.getElementById(_a))return;let t=e.createElement(`style`);t.id=_a,t.textContent=ga,(e.head??e.documentElement).appendChild(t)}var ya=`slicc-press-btn`,ba=`is-squish`,xa=`is-wobble`;b(`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(){va(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=S(`span`,{class:`${ya}__press-layer`,part:`press-layer`}),t=S(`button`,{type:`button`,class:`${ya}__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 Un;let t=Number(e);return Number.isFinite(t)&&t>0?t:Un}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(ba):e===`double-click`&&this.playAnimation(xa);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(ba,xa))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=Wn(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=`${ya}__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 Sa=C(`
|
|
4003
4003
|
:host { display: inline-flex; }
|
|
4004
4004
|
:host([hidden]) { display: none; }
|
|
4005
4005
|
|
|
@@ -4029,7 +4029,7 @@ slicc-press-button {
|
|
|
4029
4029
|
outline: 2px solid var(--violet);
|
|
4030
4030
|
outline-offset: 2px;
|
|
4031
4031
|
}
|
|
4032
|
-
`);b(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4032
|
+
`);b(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Sa]}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=S(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},S(`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 Ca=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),wa=C(`
|
|
4033
4033
|
:host {
|
|
4034
4034
|
display: inline-flex;
|
|
4035
4035
|
vertical-align: middle;
|
|
@@ -4089,7 +4089,7 @@ slicc-press-button {
|
|
|
4089
4089
|
: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)); }
|
|
4090
4090
|
: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)); }
|
|
4091
4091
|
: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)); }
|
|
4092
|
-
`);b(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4092
|
+
`);b(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[wa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&Ca.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??S(`slot`),t=S(`span`,{class:`tag`,part:`tag`},this.dot?S(`span`,{class:`dot`,part:`dot`}):null,S(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var Ta=C(`
|
|
4093
4093
|
:host {
|
|
4094
4094
|
position: fixed;
|
|
4095
4095
|
inset: 0;
|
|
@@ -4184,7 +4184,7 @@ video {
|
|
|
4184
4184
|
color: var(--txt-3, #717171);
|
|
4185
4185
|
font-size: 13px;
|
|
4186
4186
|
}
|
|
4187
|
-
`),
|
|
4187
|
+
`),z=null,B=null,Ea=class e extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ta]}disconnectedCallback(){for(let e of this.#t)URL.revokeObjectURL(e);this.#t.length=0,z===this&&(z=null)}static open(t){e.close();let r=document.createElement(`slicc-quick-look`),i=t.path.split(`/`).pop()||t.path,a=S(`div`,{class:`backdrop`}),o=S(`button`,{class:`x`});o.appendChild(n(`x`,{size:14}));let s=S(`div`,{class:`header`},i,o),c=S(`div`,{class:`content`});c.appendChild(r.#r(t));let l=S(`div`,{class:`panel`},s,c);l.tabIndex=-1,r.#e.append(a,l),document.body.appendChild(r),z=r,l.focus(),a.addEventListener(`click`,()=>r.#n(`backdrop`)),o.addEventListener(`click`,()=>r.#n(`close-button`)),B&&document.removeEventListener(`keydown`,B),B=e=>{e.key===`Escape`&&r.#n(`escape`)},document.addEventListener(`keydown`,B)}static close(){if(z){for(let e of z.#t)URL.revokeObjectURL(e);z.remove(),z=null}B&&=(document.removeEventListener(`keydown`,B),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 S(`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 S(`div`,{class:`fallback`},`Preview not available for this file type (${Da(typeof e.content==`string`?e.content.length:e.content.byteLength)})`)}};function Da(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}b(`slicc-quick-look`,Ea);var Oa=`
|
|
4188
4188
|
.slicc-chatpane {
|
|
4189
4189
|
flex: 0 0 auto;
|
|
4190
4190
|
width: calc(100% - 48px);
|
|
@@ -4229,7 +4229,7 @@ video {
|
|
|
4229
4229
|
-webkit-mask-image: none;
|
|
4230
4230
|
mask-image: none;
|
|
4231
4231
|
}
|
|
4232
|
-
`,
|
|
4232
|
+
`,ka=`slicc-chatpane-style`;function Aa(e){if(e.getElementById(ka))return;let t=e.createElement(`style`);t.id=ka,t.textContent=Oa,(e.head??e.documentElement).appendChild(t)}var ja=[`slicc-chat-thread`,`slicc-composer`];b(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){Aa(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 ja)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 Ma=`
|
|
4233
4233
|
.slicc-shell { display: flex; flex: 1; min-height: 0; }
|
|
4234
4234
|
.slicc-shell > slicc-chatpane,
|
|
4235
4235
|
.slicc-shell > .chatpane {
|
|
@@ -4324,7 +4324,7 @@ video {
|
|
|
4324
4324
|
/* Hide the resize divider on narrow viewports (overlay mode). */
|
|
4325
4325
|
.slicc-shell > .slicc-shell__divider { display: none !important; }
|
|
4326
4326
|
}
|
|
4327
|
-
`,
|
|
4327
|
+
`,Na=`slicc-shell-style`;function Pa(e){if(e.getElementById(Na))return;let t=e.createElement(`style`);t.id=Na,t.textContent=Ma,(e.head??e.documentElement).appendChild(t)}b(`slicc-shell`,class e extends HTMLElement{static observedAttributes=[`open`,`url-state`];#e=null;#t=null;#n=!1;#r=null;#i=e=>{if(!this.urlState)return;let t=e.detail?.id;typeof t==`string`&&T(`ws`,t)};#a=()=>{this.urlState&&T(`ws`,null)};#o=()=>{if(!this.urlState)return;let e=w(`ws`);e?this.#s(e):this.open&&this.collapse()};connectedCallback(){if(Pa(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.#n=!0,this.#p(),this.#m(),this.#c(),this.#e=e=>{let t=e.detail?.id;typeof t==`string`&&this.select(t)},this.#t=()=>this.collapse(),this.addEventListener(`dock-select`,this.#e),this.addEventListener(`dock-collapse`,this.#t),this.addEventListener(`slicc-dock-select`,this.#i),this.addEventListener(`slicc-dock-collapse`,this.#a),this.urlState){window.addEventListener(`popstate`,this.#o);let e=w(`ws`);e&&queueMicrotask(()=>this.#s(e))}}disconnectedCallback(){this.#e&&this.removeEventListener(`dock-select`,this.#e),this.#t&&this.removeEventListener(`dock-collapse`,this.#t),this.#e=null,this.#t=null,this.removeEventListener(`slicc-dock-select`,this.#i),this.removeEventListener(`slicc-dock-collapse`,this.#a),window.removeEventListener(`popstate`,this.#o),this.#r?.remove(),this.#r=null}get urlState(){return this.hasAttribute(`url-state`)}set urlState(e){this.toggleAttribute(`url-state`,e)}#s(e){this.dock?.selectItem?.(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.#c()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get chatpane(){return this.querySelector(`:scope > slicc-chatpane, :scope > .chatpane`)}get workbench(){return this.querySelector(`:scope > slicc-workbench-pane, :scope > .workbench`)}get dock(){return this.querySelector(`:scope > slicc-dock, :scope > .dock`)}select(e){this.open=!0,this.#l(e),this.dispatchEvent(new CustomEvent(`slicc-shell-select`,{detail:{id:e},bubbles:!0,composed:!0}))}collapse(){this.open=!1,this.dock?.clearActive?.(),this.dispatchEvent(new CustomEvent(`slicc-shell-collapse`,{bubbles:!0,composed:!0}))}#c(){if(!this.#n)return;let e=this.open;this.chatpane?.toggleAttribute(`narrow`,e),this.workbench?.toggleAttribute(`open`,e)}#l(e){this.dock?.selectItem?.(e);let t=this.workbench;t?.selectSurface&&t.selectSurface(e),this.#c()}static#u=`slicc-shell-chat-w`;static#d=.2;static#f=.8;#p(){if(this.#r)return;let e=this.workbench;if(!e)return;let t=this.ownerDocument.createElement(`div`);t.className=`slicc-shell__divider`,t.setAttribute(`role`,`separator`),t.setAttribute(`aria-orientation`,`vertical`),this.insertBefore(t,e),this.#r=t,this.#h(t)}#m(){try{let t=localStorage.getItem(e.#u);t&&this.style.setProperty(`--slicc-chat-w`,t)}catch{}}#h(t){t.addEventListener(`pointerdown`,n=>{if(n.button!==0)return;n.preventDefault(),t.setPointerCapture(n.pointerId),this.toggleAttribute(`dragging`,!0);let r=t=>{let n=this.getBoundingClientRect();if(n.width<=0)return;let r=t.clientX-n.left,i=Math.max(e.#d,Math.min(e.#f,r/n.width));this.style.setProperty(`--slicc-chat-w`,`${(i*100).toFixed(1)}%`)},i=()=>{this.removeAttribute(`dragging`),t.removeEventListener(`pointermove`,r),t.removeEventListener(`pointerup`,i),t.removeEventListener(`pointercancel`,i);try{let t=this.style.getPropertyValue(`--slicc-chat-w`);t&&localStorage.setItem(e.#u,t)}catch{}};t.addEventListener(`pointermove`,r),t.addEventListener(`pointerup`,i),t.addEventListener(`pointercancel`,i)}),t.addEventListener(`dblclick`,()=>{this.style.removeProperty(`--slicc-chat-w`);try{localStorage.removeItem(e.#u)}catch{}})}});var Fa=`http://www.w3.org/2000/svg`,Ia=18,La=16,V={cx:55,cy:50,r:38},Ra={cx:145,cy:50,r:38},za={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}},Ba={cone:`#D2691E`,scoop:`#FFB6C1`},Va=C(`
|
|
4328
4328
|
:host{display:block;width:26px;height:26px;pointer-events:none;}
|
|
4329
4329
|
.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);}
|
|
4330
4330
|
.icon-inner{position:absolute;inset:0;transform-origin:0 0;transform:translate(var(--tx),var(--ty)) scale(var(--zoom));}
|
|
@@ -4335,7 +4335,7 @@ video {
|
|
|
4335
4335
|
:host([blink]) .eye-blink{transform-box:fill-box;transform-origin:center;animation:slicc-agent-avatar-blink 3.4s ease-in-out infinite;}
|
|
4336
4336
|
:host([blink]) .eye-r{animation-duration:4.6s;}
|
|
4337
4337
|
@media (prefers-reduced-motion:reduce){:host([blink]) .eye-blink{animation:none;}}
|
|
4338
|
-
`);function
|
|
4338
|
+
`);function H(e,t,...n){let r=document.createElementNS(Fa,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function Ha(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 Ua(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])=>H(e,t));return a.push(...i.map(([e,t,r,i,a,o])=>H(`rect`,{x:e,y:t,width:r,height:i,rx:a,ry:a,transform:o,fill:n})),H(`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 Wa(e,t){return[H(`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 Ga(e){return e<=50?1:e>=85?2.2:1+(e-50)/35*1.2}function Ka(e,t,n){return H(`g`,{class:`eye-blink eye-${t}`},H(`circle`,{cx:e,cy:50,r:38,fill:`#fff`,stroke:`#000`,"stroke-width":4}),H(`g`,{class:`pupil pupil-${t}`},H(`circle`,{cx:e,cy:50,r:n,fill:`#000`}),H(`circle`,{cx:e-n*.3,cy:50-n*.35,r:n*.4,fill:`#fff`})))}function qa(e){return[H(`circle`,{cx:e,cy:50,r:38,fill:`#fff`,stroke:`#000`,"stroke-width":4}),H(`line`,{x1:e-15,y1:35,x2:e+15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),H(`line`,{x1:e+15,y1:35,x2:e-15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function Ja(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})`)}b(`slicc-agent-avatar`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`fill`];#e;#t=e=>this.#p(e);#n=()=>this.#u();#r=null;#i=null;#a=null;#o=null;#s=La;#c=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Va]}connectedCallback(){this.#r=window.matchMedia(`(prefers-reduced-motion: reduce)`),this.#r.addEventListener(`change`,this.#n),this.#l(),this.#u()}disconnectedCallback(){this.#d(),this.#r?.removeEventListener(`change`,this.#n),this.#r=null}attributeChangedCallback(){this.isConnected&&(this.#l(),this.#u())}#l(){let e=this.getAttribute(`type`)===`cone`?`cone`:`scoop`,t=za[e],n=this.getAttribute(`color`)??Ba[e],r=this.getAttribute(`eyes`),i=Ia*Ga(Math.max(0,Math.min(100,Number.parseFloat(this.getAttribute(`fill`)??`0`)||0)));this.#s=Math.max(2,Math.min(La,V.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`?Ua(n,Ha(n,-.38),Ha(n,.3)):Wa(n,Ha(n,-.32)),c=H(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...s),l=r===`dead`?[...qa(V.cx),...qa(Ra.cx)]:r===`none`?[]:[Ka(V.cx,`l`,i),Ka(Ra.cx,`r`,i)];this.#o=H(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...l);let u=S(`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=S(`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(S(`span`,{class:`avatar`,"aria-hidden":`true`},d)),this.#i=this.#e.querySelector(`.pupil-l`),this.#a=this.#e.querySelector(`.pupil-r`)}#u(){let e=this.getAttribute(`eyes`)===`open`&&!this.#r?.matches;e&&!this.#c?(this.ownerDocument.addEventListener(`pointermove`,this.#t),this.#c=!0):e||(this.#d(),this.#f())}#d(){this.#c&&=(this.ownerDocument.removeEventListener(`pointermove`,this.#t),!1)}#f(){this.#i?.setAttribute(`transform`,`translate(0,0)`),this.#a?.setAttribute(`transform`,`translate(0,0)`)}#p(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);Ja(this.#i,V.cx,n,r,this.#s),Ja(this.#a,Ra.cx,n,r,this.#s)}});var Ya=C(`
|
|
4339
4339
|
:host{display:inline-block;}
|
|
4340
4340
|
.switcher-more{position:relative;}
|
|
4341
4341
|
.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;}
|
|
@@ -4367,14 +4367,14 @@ video {
|
|
|
4367
4367
|
@keyframes scoopReveal{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
|
|
4368
4368
|
@keyframes scoopArc{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}
|
|
4369
4369
|
@media (prefers-reduced-motion:reduce){.popup-row{animation:none;}.popup-row[data-state="working"] .glyph-arc{animation:none;transform:rotate(-90deg);}}
|
|
4370
|
-
`),
|
|
4371
|
-
.slicc-agent-tabs{display:flex;align-items:center;gap:${
|
|
4370
|
+
`),Xa=[4,5,3,7,1,6,2,0,8],Za=`http://www.w3.org/2000/svg`,U=5,Qa=2*Math.PI*U;function W(e,t,...n){let r=document.createElementNS(Za,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function $a(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function eo(e){return e.state??`idle`}function to(e){return(90+$a(e)*2.7)/360*Qa}function no(e,t){let n=[];return e===`initializing`?n.push(W(`circle`,{class:`initializing-ring`,cx:7,cy:7,r:U,"stroke-width":1.7})):n.push(W(`circle`,{class:`glyph-base`,cx:7,cy:7,r:U,"stroke-width":1.5})),(e===`working`||e===`idle`)&&n.push(W(`circle`,{class:`glyph-arc`,cx:7,cy:7,r:U,"stroke-width":2,"stroke-dasharray":`${to(t).toFixed(3)} ${Qa.toFixed(3)}`,"stroke-dashoffset":0})),e===`working`&&n.push(W(`circle`,{class:`glyph-pin`,cx:7,cy:7,r:1.25})),e===`broken`&&n.push(W(`line`,{class:`broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),W(`line`,{class:`broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8})),W(`svg`,{class:`status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...n)}function ro(e){return e.state===`broken`?`broken`:(e.fill??0)>=75?`near-limit`:e.state===`working`?`working`:`idle`}function G(e){return e===`broken`?3:e===`near-limit`?2:+(e===`working`)}function io(e){let t=e.reduce((e,t)=>{let n=ro(t);return G(n)>G(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 ao(e,t=!1){if(t)return S(`span`,{class:`overflow-grid-cell overflow-grid-cell--plus`,"aria-hidden":`true`},S(`span`,{class:`overflow-plus-bar overflow-plus-bar--horizontal`}),S(`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),S(`span`,n)}function oo(e){let t=e.map((e,t)=>({order:t,state:ro(e)})).sort((e,t)=>G(t.state)-G(e.state)||e.order-t.order).slice(0,e.length>9?8:9),n=Array.from({length:Xa.length},()=>ao());return t.forEach((e,t)=>{n[Xa[t]]=ao(e.state)}),e.length>9&&(n[Xa.at(-1)]=ao(void 0,!0)),S(`span`,{class:`overflow-grid`,role:`img`,"aria-label":io(e),"data-hidden-count":String(e.length)},...n)}b(`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=[Ya]}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=S(`slot`,{name:`more`},oo(this.#t)),this.#r=S(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},this.#i),this.#a=S(`div`,{class:`pop`,part:`pop`,role:`menu`}),this.#n=S(`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=io(this.#t);if(this.#r.setAttribute(`aria-label`,`${t}. Show hidden scoops`),this.#i.replaceChildren(oo(this.#t)),e===0){this.#a.replaceChildren(S(`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=eo(e),o=$a(e.fill),s=S(`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}`},no(a,o),S(`span`,{class:`popup-label`},i),S(`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 K=`slicc-agent-tabs`,so=`${K}-style`,co=`http://www.w3.org/2000/svg`,q=5,lo=2*Math.PI*q,J=26,uo=8,fo=6,po=39,mo=`sliccy`,ho=14,go=5,_o=16,vo=4,yo=65,bo={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},xo=`
|
|
4371
|
+
.slicc-agent-tabs{display:flex;align-items:center;gap:${uo}px;min-width:0;overflow:visible;color:var(--ink);font-family:var(--ui);}
|
|
4372
4372
|
.slicc-agent-tabs *{box-sizing:border-box;}
|
|
4373
|
-
.slicc-agent-tabs__focus-avatar{display:block;flex:0 0 ${
|
|
4373
|
+
.slicc-agent-tabs__focus-avatar{display:block;flex:0 0 ${J}px;width:${J}px;height:${J}px;pointer-events:none;}
|
|
4374
4374
|
.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);}
|
|
4375
4375
|
.slicc-agent-tabs__track{display:flex;align-items:center;min-width:0;height:100%;padding:2px;overflow:hidden;}
|
|
4376
4376
|
.slicc-agent-tabs.has-overflow .slicc-agent-tabs__track{padding-right:41px;}
|
|
4377
|
-
.slicc-agent-tabs__segment{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;gap:${
|
|
4377
|
+
.slicc-agent-tabs__segment{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;gap:${go}px;width:max-content;min-width:var(--slicc-agent-tabs-segment-floor,${yo}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;}
|
|
4378
4378
|
.slicc-agent-tabs__segment:hover{color:var(--ink);}
|
|
4379
4379
|
.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);}
|
|
4380
4380
|
.slicc-agent-tabs__segment.hide{display:none;}
|
|
@@ -4402,7 +4402,7 @@ video {
|
|
|
4402
4402
|
.slicc-agent-tabs slicc-scoop-overflow::part(pop){right:0;left:auto;}
|
|
4403
4403
|
@keyframes slicc-agent-tabs-arc{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}
|
|
4404
4404
|
@media (prefers-reduced-motion:reduce){.slicc-agent-tabs__glyph-arc{animation:none;transform:rotate(-90deg);}.slicc-agent-tabs__glyph-glow{transition:none;}}
|
|
4405
|
-
`;function
|
|
4405
|
+
`;function So(e){if(e.getElementById(so))return;let t=e.createElement(`style`);t.id=so,t.textContent=xo,(e.head??e.documentElement).append(t)}function Y(e,t,...n){let r=document.createElementNS(co,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 Co(e){let t=e.ownerDocument.createElement(`canvas`).getContext(`2d`),n=e.ownerDocument.defaultView?.getComputedStyle(e);return!t||!n?yo:(t.font=n.font,Math.ceil(t.measureText(mo).width+ho+go+_o)+vo)}function wo(e){return(90+X(e)*2.7)/360*lo}function To(e,t){return e.state?e.state:e.eyes===`dead`?`broken`:t===e.key?`working`:`idle`}function Eo(e){return e.type===`cone`||e.key===`cone`?`cone`:`scoop`}function Do(e){return e.eyes??`open`}function Oo(e){return bo[e.key]??e.color??`var(--rose)`}function ko(e){let t=[Y(`circle`,{class:`${K}__glyph-glow`,cx:7,cy:7,r:q,"stroke-width":1.5}),Y(`circle`,{class:`${K}__glyph-base`,cx:7,cy:7,r:q,"stroke-width":1.5}),Y(`circle`,{class:`${K}__glyph-arc`,cx:7,cy:7,r:q,"stroke-width":2,"stroke-dasharray":`${wo(X(e.fill)).toFixed(3)} ${lo.toFixed(3)}`,"stroke-dashoffset":0}),Y(`circle`,{class:`${K}__glyph-pin`,cx:7,cy:7,r:1.25}),Y(`line`,{class:`${K}__broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),Y(`line`,{class:`${K}__broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8}),Y(`circle`,{class:`${K}__initializing-ring`,cx:7,cy:7,r:q,"stroke-width":1.7})];return Y(`svg`,{class:`${K}__status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...t)}b(`slicc-agent-tabs`,class extends HTMLElement{static observedAttributes=[`active`,`attention`];#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(){So(this.ownerDocument),this.classList.add(K),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)}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(`.${K}__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=Co(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-J-uo-fo),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?po: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=S(`div`,{class:`${K}__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=S(`div`,{class:`${K}__track-frame`,part:`track-frame`},this.#n,e),this.replaceChildren(this.#r)}#h(e){let t=S(`slicc-agent-avatar`,{class:`${K}__focus-avatar`,part:`avatar`,role:`img`});return this.#g(t,e),t}#g(e,t){let n=To(t,this.attention);this.#x(e,`type`,Eo(t)),this.#x(e,`color`,t.color??null),this.#x(e,`eyes`,Do(t)),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`,Oo(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=S(`button`,{part:`segment`,type:`button`,role:`tab`},ko(e),S(`span`,{class:`${K}__label`},e.label??e.key));return this.#y(n,e,t),n}#y(e,t,n){let r=To(t,this.attention),i=X(t.fill),a=this.attention===t.key;e.className=`${K}__segment${t.ephemeral?` ephemeral`:``}`,e.setAttribute(`aria-selected`,String(t.key===n)),e.tabIndex=t.key===n?0:-1,e.setAttribute(`aria-label`,`${t.label??t.key}: ${r}, ${Math.round(i)}% context fill${a?`, spoke most recently`:``}`),e.dataset.k=t.key,e.dataset.state=r,this.#x(e,`data-attention`,a?`true`:null),e.style.setProperty(`--slicc-agent-tabs-hue`,Oo(t));let o=e.querySelector(`.${K}__label`);o&&(o.textContent=t.label??t.key),e.querySelector(`.${K}__glyph-arc`)?.setAttribute(`stroke-dasharray`,`${wo(i).toFixed(3)} ${lo.toFixed(3)}`)}#b(e){if(!this.#n)return;let t=new Map;for(let e of this.#n.querySelectorAll(`:scope > .${K}__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:Eo(n),color:n.color,eyes:Do(n),state:To(n,this.attention),fill:X(n.fill)}});this.#i.items=t}#C(e){let t=e.target?.closest(`.${K}__segment`);t&&this.contains(t)&&t.dataset.k&&this.select(t.dataset.k)}#w(e){let t=e.target?.closest(`.${K}__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(`.${K}__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(`.${K}__segment`)?.dataset.k??null}#E(e){return e==null?null:[...this.querySelectorAll(`.${K}__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 Ao=`/**
|
|
4406
4406
|
* SLICC design tokens — lifted verbatim from the prototype
|
|
4407
4407
|
* (proto/StellarRubySwift.html :root + body.dark). Light is the default; dark is
|
|
4408
4408
|
* opt-in. Per project decision the prototype's token vocabulary and light-default
|
|
@@ -4466,7 +4466,7 @@ video {
|
|
|
4466
4466
|
--shaderbg: #171410;
|
|
4467
4467
|
--shadow-pane: rgba(0, 0, 0, 0.35) 0 8px 26px -10px;
|
|
4468
4468
|
}
|
|
4469
|
-
`,
|
|
4469
|
+
`,jo=`slicc-tokens`;function Mo(e=document){if(e.getElementById(jo))return;let t=e.createElement(`style`);t.id=jo,t.textContent=Ao,(e.head??e.documentElement).appendChild(t)}function Z(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function No(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>Z(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var Po=C(`
|
|
4470
4470
|
:host { display: inline-flex; flex: 0 0 auto; }
|
|
4471
4471
|
.themetgl {
|
|
4472
4472
|
font: inherit; font-family: var(--ui); font-size: 14px; line-height: 1;
|
|
@@ -4478,7 +4478,7 @@ video {
|
|
|
4478
4478
|
}
|
|
4479
4479
|
.themetgl:hover { background: color-mix(in srgb, var(--ink) 8%, var(--ghost)); }
|
|
4480
4480
|
.themetgl svg { display: block; }
|
|
4481
|
-
`),
|
|
4481
|
+
`),Fo=16,Io={light:`moon`,dark:`sun`},Lo={light:`Switch to dark mode`,dark:`Switch to light mode`};b(`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=[Po];let e=S(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},S(`slot`,{name:`glyph-light`},n(Io.light,{size:Fo})),S(`slot`,{name:`glyph-dark`,hidden:!0},n(Io.dark,{size:Fo})));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(Z(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=Lo[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}))}}),b(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){Mo(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;Z(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});function Ro(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 zo(e){return e<1024?e+` B`:e<1024*1024?(e/1024).toFixed(1)+`K`:e<1024*1024*1024?(e/(1024*1024)).toFixed(1)+`M`:(e/(1024*1024*1024)).toFixed(1)+`G`}var Bo=`
|
|
4482
4482
|
slicc-file-tree {
|
|
4483
4483
|
width: 190px;
|
|
4484
4484
|
flex: 0 0 auto;
|
|
@@ -4626,7 +4626,7 @@ slicc-file-tree .actions button:active {
|
|
|
4626
4626
|
[data-theme="dark"] slicc-file-tree .dir.on {
|
|
4627
4627
|
background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
|
|
4628
4628
|
}
|
|
4629
|
-
`,
|
|
4629
|
+
`,Vo=`slicc-file-tree-style`;function Ho(e){if(e.getElementById(Vo))return;let t=e.createElement(`style`);t.id=Vo,t.textContent=Bo,(e.head??e.documentElement).appendChild(t)}function Uo(e,t){let r=[];for(let i of e)if(i.kind===`group`)r.push(S(`div`,{class:`grp`},i.label));else if(i.kind===`dir`){let e=t.has(i.id);r.push(S(`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=S(`div`,{class:`children`,hidden:!e||void 0});x(a,Uo(i.children??[],t)),r.push(a)}else{let e=S(`div`,{class:`actions`},S(`button`,{"data-action":`preview`,type:`button`},n(`eye`,{size:14})),S(`button`,{"data-action":`reference`,type:`button`},n(`at-sign`,{size:14})),S(`button`,{"data-action":`download`,type:`button`},n(`arrow-down-to-line`,{size:14})),S(`button`,{"data-action":`overflow`,type:`button`},n(`ellipsis`,{size:14}))),t=S(`div`,{class:`f`,"data-id":i.id,tabindex:`0`},n(Ro(i.label),{size:12,class:`ficon`}),i.label,e);i.size!=null&&t.appendChild(S(`span`,{class:`sz`},zo(i.size))),r.push(t)}return r}var Wo=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(){Ho(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(...Uo(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,`\\"`)}b(`slicc-file-tree`,Wo);var Go=`
|
|
4630
4630
|
slicc-surface {
|
|
4631
4631
|
position: absolute;
|
|
4632
4632
|
inset: 0;
|
|
@@ -4658,7 +4658,7 @@ slicc-surface:fullscreen {
|
|
|
4658
4658
|
background: var(--canvas, #fff);
|
|
4659
4659
|
position: fixed;
|
|
4660
4660
|
}
|
|
4661
|
-
`,
|
|
4661
|
+
`,Ko=`slicc-surface-style`;function qo(e){if(e.getElementById(Ko))return;let t=e.createElement(`style`);t.id=Ko,t.textContent=Go,(e.head??e.documentElement).appendChild(t)}function Jo(e){return e===`block`||e===`column`?e:`flex`}b(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){qo(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 Jo(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,Jo(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var Yo=C(`
|
|
4662
4662
|
:host{display:inline-flex;white-space:nowrap;}
|
|
4663
4663
|
.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;}
|
|
4664
4664
|
.tab:hover{background:var(--ghost);color:var(--ink);}
|
|
@@ -4674,7 +4674,7 @@ slicc-surface:fullscreen {
|
|
|
4674
4674
|
.x{margin-left:3px;width:15px;height:15px;border-radius:4px;display:grid;place-items:center;color:var(--txt-3);}
|
|
4675
4675
|
.x:hover{background:var(--line);color:var(--ink);}
|
|
4676
4676
|
.sg svg,.x svg{display:block;}
|
|
4677
|
-
`),
|
|
4677
|
+
`),Xo=13;b(`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=[Yo]}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=S(`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(S(`span`,{class:`sg`,part:`badge`,"aria-hidden":`true`},n(e,{size:Xo})))}else this.glyph!=null&&t.append(S(`span`,{class:`gl`,part:`glyph`,"aria-hidden":`true`},this.glyph));let r=this.label;t.append(r==null?S(`slot`):document.createTextNode(r)),this.closable&&t.append(S(`span`,{class:`x`,part:`close`,"data-close":``,role:`button`,"aria-label":`Close tab`},n(`x`,{size:Xo}))),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 Zo=`
|
|
4678
4678
|
slicc-tab-bar {
|
|
4679
4679
|
display: flex;
|
|
4680
4680
|
align-items: center;
|
|
@@ -4686,7 +4686,7 @@ slicc-tab-bar {
|
|
|
4686
4686
|
slicc-tab-bar[hidden] {
|
|
4687
4687
|
display: none;
|
|
4688
4688
|
}
|
|
4689
|
-
`,
|
|
4689
|
+
`,Qo=`slicc-tab-bar-style`;function $o(e){if(e.getElementById(Qo))return;let t=e.createElement(`style`);t.id=Qo,t.textContent=Zo,(e.head??e.documentElement).appendChild(t)}function es(e){return e===`sprinkle`?`sprinkle`:`tool`}b(`slicc-tab-bar`,class extends HTMLElement{static observedAttributes=[`active`];#e=[];#t=!1;#n=null;#r=null;#i=null;connectedCallback(){$o(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:es(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=es(n.kind);r!==`tool`&&t.push(S(`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 ts=`/**
|
|
4690
4690
|
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
4691
4691
|
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4692
4692
|
* https://github.com/chjj/term.js
|
|
@@ -4971,7 +4971,7 @@ slicc-tab-bar[hidden] {
|
|
|
4971
4971
|
.xterm .xterm-scrollable-element > .shadow.top.left {
|
|
4972
4972
|
box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
|
|
4973
4973
|
}
|
|
4974
|
-
`,
|
|
4974
|
+
`,ns={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`},rs=`
|
|
4975
4975
|
:host {
|
|
4976
4976
|
display: flex;
|
|
4977
4977
|
flex-direction: column;
|
|
@@ -5012,7 +5012,7 @@ slicc-tab-bar[hidden] {
|
|
|
5012
5012
|
/* xterm.js wants its container to size the canvas; let it fill. */
|
|
5013
5013
|
.host .xterm { height: 100%; }
|
|
5014
5014
|
.host .xterm-viewport { overflow-y: auto; }
|
|
5015
|
-
`,
|
|
5015
|
+
`,is=null;function as(){return is||=[C(ts),C(rs)],is}var os=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=as();let e=S(`div`,{class:`hd`,part:`header`},n(`terminal`,{size:14}),S(`span`,{class:`title`},this.label),S(`span`,{class:`spacer`})),t=S(`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-U4TA8lIC.js`),[]),t(()=>import(`./addon-fit-DIOBYJe3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!ss(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:ns,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 ss(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}b(`slicc-terminal`,os);var cs=`
|
|
5016
5016
|
slicc-workbench-body {
|
|
5017
5017
|
flex: 1;
|
|
5018
5018
|
min-height: 0;
|
|
@@ -5033,7 +5033,7 @@ slicc-workbench-body > * {
|
|
|
5033
5033
|
slicc-workbench-body > .slicc-wbbody__active {
|
|
5034
5034
|
display: flex;
|
|
5035
5035
|
}
|
|
5036
|
-
`,
|
|
5036
|
+
`,ls=`slicc-workbench-body-style`,us=`slicc-wbbody__active`,ds=`slicc-surface`;function fs(e){if(e.getElementById(ls))return;let t=e.createElement(`style`);t.id=ls,t.textContent=cs,(e.head??e.documentElement).appendChild(t)}b(`slicc-workbench-body`,class extends HTMLElement{static observedAttributes=[`active`];#e=!1;#t=new MutationObserver(()=>this.#i());connectedCallback(){fs(this.ownerDocument),this.#e=!0,this.#i(),this.#t.observe(this,{childList:!0})}disconnectedCallback(){this.#e=!1,this.#t.disconnect()}attributeChangedCallback(e,t,n){t!==n&&e===`active`&&this.#e&&this.#i()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get activeSurface(){let e=this.active;return e==null?null:this.#n().find(t=>this.#r(t)===e)??null}get surfaces(){return this.#n()}selectSurface(e){let t=this.active;e!==t&&(this.setAttribute(`active`,e),this.#e||this.#i(),this.dispatchEvent(new CustomEvent(`slicc-surface-change`,{bubbles:!0,composed:!0,detail:{id:e,previous:t}})))}#n(){let e=[];for(let t of Array.from(this.children))t instanceof HTMLElement&&t.localName===ds&&e.push(t);return e}#r(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id}#i(){let e=this.active;for(let t of this.#n()){let n=e!=null&&this.#r(t)===e;t.classList.toggle(us,n),t.toggleAttribute(`active`,n)}}});var ps=`
|
|
5037
5037
|
slicc-workbench-header {
|
|
5038
5038
|
flex: 0 0 auto;
|
|
5039
5039
|
display: flex;
|
|
@@ -5060,7 +5060,7 @@ slicc-workbench-header > slicc-collapse-btn {
|
|
|
5060
5060
|
slicc-workbench-header > slicc-tab-bar {
|
|
5061
5061
|
min-width: 0;
|
|
5062
5062
|
}
|
|
5063
|
-
`,
|
|
5063
|
+
`,ms=`slicc-workbench-header-style`;function hs(e){if(e.getElementById(ms))return;let t=e.createElement(`style`);t.id=ms,t.textContent=ps,(e.head??e.documentElement).appendChild(t)}b(`slicc-workbench-header`,class extends HTMLElement{static observedAttributes=[`kind`];#e;#t=!1;connectedCallback(){hs(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 gs=`
|
|
5064
5064
|
slicc-workbench-pane {
|
|
5065
5065
|
display: flex;
|
|
5066
5066
|
flex-direction: column;
|
|
@@ -5099,129 +5099,420 @@ slicc-workbench-pane slicc-pane .slicc-pane__body {
|
|
|
5099
5099
|
flex-direction: column;
|
|
5100
5100
|
min-height: 0;
|
|
5101
5101
|
}
|
|
5102
|
-
`,
|
|
5102
|
+
`,_s=`slicc-workbench-pane-style`;function vs(e){if(e.getElementById(_s))return;let t=e.createElement(`style`);t.id=_s,t.textContent=gs,(e.head??e.documentElement).appendChild(t)}b(`slicc-workbench-pane`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;connectedCallback(){vs(this.ownerDocument),this.#n()}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-workbench-pane-toggle`,{bubbles:!0,composed:!0,detail:{open:n!==null}}))}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get pane(){return this.#n(),this.#e}#n(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > slicc-pane`);if(e instanceof HTMLElement){this.#e=e;return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`slicc-pane`),this.#e.setAttribute(`elevated`,``),this.#e.setAttribute(`part`,`pane`);for(let e of t)this.#e.appendChild(e);this.appendChild(this.#e)}});var ys=`slicc_monitor_collapsed`;function bs(){try{let e=localStorage.getItem(ys);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function xs(e){try{localStorage.setItem(ys,JSON.stringify([...e]))}catch{}}var Ss=`
|
|
5103
5103
|
slicc-monitor {
|
|
5104
5104
|
display: block;
|
|
5105
|
+
box-sizing: border-box;
|
|
5105
5106
|
font-family: var(--ui);
|
|
5106
5107
|
font-size: 13px;
|
|
5107
5108
|
color: var(--ink);
|
|
5109
|
+
background: var(--bg);
|
|
5108
5110
|
overflow: auto;
|
|
5109
|
-
padding:
|
|
5111
|
+
padding: 16px;
|
|
5112
|
+
container: monitor / inline-size;
|
|
5113
|
+
--monitor-border: color-mix(in srgb, var(--line) 55%, var(--ink));
|
|
5110
5114
|
}
|
|
5111
|
-
.monitor-
|
|
5112
|
-
display:
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5115
|
+
.monitor-summary {
|
|
5116
|
+
display: grid;
|
|
5117
|
+
gap: 16px;
|
|
5118
|
+
padding: 16px;
|
|
5119
|
+
margin: -16px -16px 16px;
|
|
5116
5120
|
border-bottom: 1px solid var(--line);
|
|
5117
|
-
|
|
5118
|
-
|
|
5121
|
+
background: color-mix(in srgb, var(--canvas) 94%, var(--ctx));
|
|
5122
|
+
box-shadow: var(--shadow-pane);
|
|
5119
5123
|
position: sticky;
|
|
5120
|
-
top: -
|
|
5121
|
-
z-index:
|
|
5124
|
+
top: -16px;
|
|
5125
|
+
z-index: 2;
|
|
5126
|
+
}
|
|
5127
|
+
.monitor-summary__topline {
|
|
5128
|
+
display: flex;
|
|
5129
|
+
align-items: center;
|
|
5130
|
+
gap: 12px;
|
|
5122
5131
|
}
|
|
5123
|
-
.monitor-
|
|
5132
|
+
.monitor-summary__mark {
|
|
5133
|
+
display: inline-flex;
|
|
5134
|
+
align-items: center;
|
|
5135
|
+
justify-content: center;
|
|
5136
|
+
width: 40px;
|
|
5137
|
+
height: 40px;
|
|
5138
|
+
flex: 0 0 auto;
|
|
5139
|
+
border-radius: 12px;
|
|
5140
|
+
color: color-mix(in srgb, var(--ctx) 35%, var(--ink));
|
|
5141
|
+
background: color-mix(in srgb, var(--ctx) 14%, var(--canvas));
|
|
5142
|
+
border: 1px solid color-mix(in srgb, var(--ctx) 28%, var(--monitor-border));
|
|
5143
|
+
}
|
|
5144
|
+
.monitor-summary__copy {
|
|
5145
|
+
min-width: 0;
|
|
5146
|
+
}
|
|
5147
|
+
.monitor-summary__title {
|
|
5148
|
+
margin: 0;
|
|
5149
|
+
color: var(--ink);
|
|
5150
|
+
font-size: 16px;
|
|
5151
|
+
line-height: 1.25;
|
|
5152
|
+
font-weight: 700;
|
|
5153
|
+
letter-spacing: -0.01em;
|
|
5154
|
+
}
|
|
5155
|
+
.monitor-summary__subtitle {
|
|
5156
|
+
margin: 2px 0 0;
|
|
5157
|
+
color: var(--txt-2);
|
|
5158
|
+
font-size: 12px;
|
|
5159
|
+
line-height: 1.4;
|
|
5160
|
+
}
|
|
5161
|
+
.monitor-summary__refresh {
|
|
5162
|
+
display: inline-flex;
|
|
5163
|
+
align-items: center;
|
|
5164
|
+
justify-content: center;
|
|
5165
|
+
gap: 8px;
|
|
5166
|
+
min-height: 40px;
|
|
5167
|
+
margin-left: auto;
|
|
5124
5168
|
font-family: var(--ui);
|
|
5125
5169
|
font-size: 12px;
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
border
|
|
5170
|
+
font-weight: 600;
|
|
5171
|
+
padding: 0 12px;
|
|
5172
|
+
border: 1px solid var(--monitor-border);
|
|
5173
|
+
border-radius: 8px;
|
|
5129
5174
|
background: var(--canvas);
|
|
5130
5175
|
color: var(--ink);
|
|
5131
5176
|
cursor: pointer;
|
|
5132
|
-
transition: background
|
|
5177
|
+
transition: background-color 120ms ease, border-color 120ms ease;
|
|
5133
5178
|
}
|
|
5134
|
-
.monitor-
|
|
5179
|
+
.monitor-summary__refresh:hover {
|
|
5135
5180
|
background: var(--ghost);
|
|
5136
5181
|
}
|
|
5137
|
-
.monitor-
|
|
5138
|
-
|
|
5182
|
+
.monitor-summary__refresh:active {
|
|
5183
|
+
transform: translateY(1px);
|
|
5184
|
+
}
|
|
5185
|
+
.monitor-summary__refresh:focus-visible,
|
|
5186
|
+
.monitor-section__header:focus-visible {
|
|
5187
|
+
outline: 2px solid var(--ink);
|
|
5188
|
+
outline-offset: 2px;
|
|
5189
|
+
}
|
|
5190
|
+
.monitor-summary__refresh:disabled,
|
|
5191
|
+
.monitor-section__header:disabled {
|
|
5192
|
+
cursor: not-allowed;
|
|
5193
|
+
opacity: 0.55;
|
|
5194
|
+
}
|
|
5195
|
+
.monitor-summary__metrics {
|
|
5196
|
+
display: grid;
|
|
5197
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
5198
|
+
gap: 8px;
|
|
5199
|
+
margin: 0;
|
|
5200
|
+
}
|
|
5201
|
+
.monitor-summary__metric {
|
|
5202
|
+
min-width: 0;
|
|
5203
|
+
padding: 8px 12px;
|
|
5204
|
+
border-radius: 8px;
|
|
5205
|
+
background: color-mix(in srgb, var(--ink) 4%, var(--canvas));
|
|
5206
|
+
border: 1px solid var(--line);
|
|
5207
|
+
}
|
|
5208
|
+
.monitor-summary__metric dt {
|
|
5209
|
+
color: var(--txt-2);
|
|
5210
|
+
font-size: 10px;
|
|
5211
|
+
line-height: 1.4;
|
|
5212
|
+
font-weight: 700;
|
|
5213
|
+
letter-spacing: 0.06em;
|
|
5214
|
+
text-transform: uppercase;
|
|
5215
|
+
}
|
|
5216
|
+
.monitor-summary__metric dd {
|
|
5217
|
+
margin: 2px 0 0;
|
|
5218
|
+
overflow: hidden;
|
|
5219
|
+
color: var(--ink);
|
|
5220
|
+
font-size: 15px;
|
|
5221
|
+
line-height: 1.3;
|
|
5222
|
+
font-weight: 700;
|
|
5223
|
+
text-overflow: ellipsis;
|
|
5224
|
+
white-space: nowrap;
|
|
5225
|
+
}
|
|
5226
|
+
.monitor-sections {
|
|
5227
|
+
display: grid;
|
|
5228
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
|
|
5229
|
+
align-items: start;
|
|
5230
|
+
gap: 16px;
|
|
5139
5231
|
}
|
|
5140
5232
|
.monitor-section {
|
|
5141
|
-
|
|
5233
|
+
--monitor-accent: var(--ctx);
|
|
5234
|
+
overflow: hidden;
|
|
5235
|
+
border: 1px solid var(--monitor-border);
|
|
5236
|
+
border-radius: 12px;
|
|
5237
|
+
background: var(--canvas);
|
|
5238
|
+
box-shadow: var(--shadow-pane);
|
|
5142
5239
|
}
|
|
5143
|
-
.monitor-section--
|
|
5144
|
-
|
|
5240
|
+
.monitor-section[data-accent='rose'] { --monitor-accent: var(--rose); }
|
|
5241
|
+
.monitor-section[data-accent='cyan'] { --monitor-accent: var(--cyan); }
|
|
5242
|
+
.monitor-section[data-accent='violet'] { --monitor-accent: var(--violet); }
|
|
5243
|
+
.monitor-section[data-accent='amber'] { --monitor-accent: var(--amber); }
|
|
5244
|
+
.monitor-section[data-accent='waffle'] { --monitor-accent: var(--waffle); }
|
|
5245
|
+
.monitor-section[data-accent='green'] { --monitor-accent: var(--green); }
|
|
5246
|
+
.monitor-section--empty .monitor-section__count {
|
|
5247
|
+
background: var(--canvas);
|
|
5145
5248
|
}
|
|
5146
5249
|
.monitor-section__header {
|
|
5250
|
+
position: relative;
|
|
5147
5251
|
display: flex;
|
|
5148
5252
|
align-items: center;
|
|
5149
5253
|
gap: 8px;
|
|
5150
5254
|
width: 100%;
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
border
|
|
5154
|
-
|
|
5255
|
+
min-height: 48px;
|
|
5256
|
+
padding: 8px 12px 8px 16px;
|
|
5257
|
+
border: 0;
|
|
5258
|
+
border-bottom: 1px solid var(--line);
|
|
5259
|
+
border-radius: 0;
|
|
5260
|
+
background: color-mix(in srgb, var(--monitor-accent) 8%, var(--canvas));
|
|
5155
5261
|
cursor: pointer;
|
|
5156
5262
|
font-family: var(--ui);
|
|
5157
5263
|
font-size: 13px;
|
|
5158
5264
|
color: var(--ink);
|
|
5159
|
-
transition: background
|
|
5265
|
+
transition: background-color 120ms ease;
|
|
5160
5266
|
text-align: left;
|
|
5161
5267
|
}
|
|
5268
|
+
.monitor-section__header::before {
|
|
5269
|
+
content: '';
|
|
5270
|
+
position: absolute;
|
|
5271
|
+
inset: 8px auto 8px 0;
|
|
5272
|
+
width: 3px;
|
|
5273
|
+
border-radius: 0 3px 3px 0;
|
|
5274
|
+
background: var(--monitor-accent);
|
|
5275
|
+
}
|
|
5162
5276
|
.monitor-section__header:hover {
|
|
5163
|
-
background: var(--
|
|
5277
|
+
background: color-mix(in srgb, var(--monitor-accent) 13%, var(--canvas));
|
|
5164
5278
|
}
|
|
5165
5279
|
.monitor-section__toggle {
|
|
5280
|
+
display: inline-flex;
|
|
5281
|
+
align-items: center;
|
|
5282
|
+
justify-content: center;
|
|
5283
|
+
width: 24px;
|
|
5284
|
+
height: 24px;
|
|
5166
5285
|
color: var(--txt-3);
|
|
5167
|
-
font-size: 10px;
|
|
5168
5286
|
flex-shrink: 0;
|
|
5169
5287
|
}
|
|
5288
|
+
.monitor-section__heading {
|
|
5289
|
+
display: grid;
|
|
5290
|
+
min-width: 0;
|
|
5291
|
+
gap: 1px;
|
|
5292
|
+
}
|
|
5170
5293
|
.monitor-section__title {
|
|
5171
5294
|
font-weight: 600;
|
|
5172
5295
|
}
|
|
5173
5296
|
.monitor-section__meta {
|
|
5174
|
-
|
|
5175
|
-
color: var(--txt-3);
|
|
5297
|
+
color: var(--txt-2);
|
|
5176
5298
|
font-size: 11px;
|
|
5177
5299
|
}
|
|
5178
5300
|
.monitor-section__count {
|
|
5301
|
+
margin-left: auto;
|
|
5179
5302
|
flex-shrink: 0;
|
|
5180
|
-
|
|
5181
|
-
|
|
5303
|
+
min-width: 24px;
|
|
5304
|
+
background: color-mix(in srgb, var(--monitor-accent) 13%, var(--canvas));
|
|
5305
|
+
border: 1px solid color-mix(in srgb, var(--monitor-accent) 28%, var(--line));
|
|
5182
5306
|
border-radius: 12px;
|
|
5183
|
-
padding: 2px
|
|
5307
|
+
padding: 2px 7px;
|
|
5184
5308
|
font-size: 11px;
|
|
5185
5309
|
font-weight: 600;
|
|
5186
|
-
color: var(--
|
|
5310
|
+
color: color-mix(in srgb, var(--monitor-accent) 35%, var(--ink));
|
|
5311
|
+
text-align: center;
|
|
5187
5312
|
}
|
|
5188
5313
|
.monitor-section__body {
|
|
5189
|
-
padding: 8px
|
|
5314
|
+
padding: 8px;
|
|
5190
5315
|
}
|
|
5191
5316
|
.monitor-section__body[hidden] {
|
|
5192
5317
|
display: none;
|
|
5193
5318
|
}
|
|
5319
|
+
.monitor-section__list {
|
|
5320
|
+
display: grid;
|
|
5321
|
+
gap: 4px;
|
|
5322
|
+
margin: 0;
|
|
5323
|
+
padding: 0;
|
|
5324
|
+
list-style: none;
|
|
5325
|
+
}
|
|
5194
5326
|
.monitor-row {
|
|
5195
|
-
display:
|
|
5327
|
+
display: grid;
|
|
5328
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
5196
5329
|
align-items: center;
|
|
5197
|
-
gap:
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5330
|
+
gap: 12px;
|
|
5331
|
+
min-height: 56px;
|
|
5332
|
+
padding: 8px;
|
|
5333
|
+
border-radius: 8px;
|
|
5334
|
+
transition: background-color 120ms ease;
|
|
5201
5335
|
}
|
|
5202
5336
|
.monitor-row:hover {
|
|
5203
|
-
background: var(--ghost);
|
|
5337
|
+
background: color-mix(in srgb, var(--monitor-accent) 5%, var(--ghost));
|
|
5338
|
+
}
|
|
5339
|
+
.monitor-row__icon {
|
|
5340
|
+
display: inline-flex;
|
|
5341
|
+
align-items: center;
|
|
5342
|
+
justify-content: center;
|
|
5343
|
+
width: 32px;
|
|
5344
|
+
height: 32px;
|
|
5345
|
+
flex: 0 0 auto;
|
|
5346
|
+
border-radius: 8px;
|
|
5347
|
+
color: color-mix(in srgb, var(--monitor-accent) 35%, var(--ink));
|
|
5348
|
+
background: color-mix(in srgb, var(--monitor-accent) 10%, var(--canvas));
|
|
5349
|
+
border: 1px solid color-mix(in srgb, var(--monitor-accent) 20%, var(--line));
|
|
5350
|
+
}
|
|
5351
|
+
.monitor-row__content {
|
|
5352
|
+
display: grid;
|
|
5353
|
+
min-width: 0;
|
|
5354
|
+
gap: 3px;
|
|
5355
|
+
}
|
|
5356
|
+
.monitor-row__headline {
|
|
5357
|
+
display: flex;
|
|
5358
|
+
align-items: center;
|
|
5359
|
+
min-width: 0;
|
|
5360
|
+
gap: 6px;
|
|
5361
|
+
flex-wrap: wrap;
|
|
5362
|
+
}
|
|
5363
|
+
.monitor-row__name {
|
|
5364
|
+
min-width: 0;
|
|
5365
|
+
overflow: hidden;
|
|
5366
|
+
color: var(--ink);
|
|
5367
|
+
font-weight: 600;
|
|
5368
|
+
text-overflow: ellipsis;
|
|
5369
|
+
white-space: nowrap;
|
|
5370
|
+
}
|
|
5371
|
+
.monitor-row__sublabel {
|
|
5372
|
+
overflow: hidden;
|
|
5373
|
+
color: var(--txt-2);
|
|
5374
|
+
font-size: 11px;
|
|
5375
|
+
line-height: 1.4;
|
|
5376
|
+
text-overflow: ellipsis;
|
|
5377
|
+
white-space: nowrap;
|
|
5378
|
+
}
|
|
5379
|
+
.monitor-row__badges {
|
|
5380
|
+
display: inline-flex;
|
|
5381
|
+
align-items: center;
|
|
5382
|
+
gap: 4px;
|
|
5383
|
+
flex-wrap: wrap;
|
|
5384
|
+
}
|
|
5385
|
+
.monitor-row__badge {
|
|
5386
|
+
display: inline-flex;
|
|
5387
|
+
align-items: center;
|
|
5388
|
+
min-height: 18px;
|
|
5389
|
+
padding: 1px 6px;
|
|
5390
|
+
border: 1px solid color-mix(in srgb, var(--monitor-accent) 24%, var(--line));
|
|
5391
|
+
border-radius: 9px;
|
|
5392
|
+
color: color-mix(in srgb, var(--monitor-accent) 30%, var(--ink));
|
|
5393
|
+
background: color-mix(in srgb, var(--monitor-accent) 8%, var(--canvas));
|
|
5394
|
+
font-size: 10px;
|
|
5395
|
+
line-height: 1.3;
|
|
5396
|
+
font-weight: 600;
|
|
5397
|
+
}
|
|
5398
|
+
.monitor-row__aside {
|
|
5399
|
+
display: grid;
|
|
5400
|
+
justify-items: end;
|
|
5401
|
+
min-width: 88px;
|
|
5402
|
+
gap: 3px;
|
|
5403
|
+
text-align: right;
|
|
5404
|
+
}
|
|
5405
|
+
.monitor-row__meta {
|
|
5406
|
+
color: var(--txt-2);
|
|
5407
|
+
font-size: 11px;
|
|
5408
|
+
line-height: 1.4;
|
|
5409
|
+
white-space: nowrap;
|
|
5410
|
+
}
|
|
5411
|
+
.monitor-row__state {
|
|
5412
|
+
--monitor-status: var(--txt-2);
|
|
5413
|
+
display: inline-flex;
|
|
5414
|
+
align-items: center;
|
|
5415
|
+
gap: 5px;
|
|
5416
|
+
color: var(--monitor-status);
|
|
5417
|
+
font-size: 10px;
|
|
5418
|
+
line-height: 1.4;
|
|
5419
|
+
font-weight: 700;
|
|
5420
|
+
}
|
|
5421
|
+
.monitor-row__state--active {
|
|
5422
|
+
--monitor-status: color-mix(in srgb, var(--green) 35%, var(--ink));
|
|
5423
|
+
}
|
|
5424
|
+
.monitor-row__state--error {
|
|
5425
|
+
--monitor-status: color-mix(in srgb, var(--red) 35%, var(--ink));
|
|
5426
|
+
}
|
|
5427
|
+
.monitor-row__state--warn {
|
|
5428
|
+
--monitor-status: color-mix(in srgb, var(--amber) 35%, var(--ink));
|
|
5204
5429
|
}
|
|
5205
5430
|
.monitor-row__dot {
|
|
5206
|
-
|
|
5207
|
-
|
|
5431
|
+
position: relative;
|
|
5432
|
+
width: 7px;
|
|
5433
|
+
height: 7px;
|
|
5208
5434
|
border-radius: 50%;
|
|
5209
|
-
background:
|
|
5435
|
+
background: currentColor;
|
|
5210
5436
|
flex-shrink: 0;
|
|
5211
5437
|
}
|
|
5212
|
-
.monitor-
|
|
5213
|
-
|
|
5438
|
+
.monitor-row__state--active .monitor-row__dot::after {
|
|
5439
|
+
content: '';
|
|
5440
|
+
position: absolute;
|
|
5441
|
+
inset: -4px;
|
|
5442
|
+
border: 1px solid currentColor;
|
|
5443
|
+
border-radius: 50%;
|
|
5444
|
+
animation: monitor-pulse 2s ease-out infinite;
|
|
5445
|
+
}
|
|
5446
|
+
.monitor-row__state--error .monitor-row__dot {
|
|
5447
|
+
border-radius: 2px;
|
|
5448
|
+
transform: rotate(45deg);
|
|
5214
5449
|
}
|
|
5215
|
-
.monitor-
|
|
5216
|
-
|
|
5450
|
+
.monitor-row__state--warn .monitor-row__dot {
|
|
5451
|
+
width: 8px;
|
|
5452
|
+
height: 8px;
|
|
5453
|
+
border: 2px solid currentColor;
|
|
5454
|
+
background: transparent;
|
|
5217
5455
|
}
|
|
5218
|
-
.monitor-
|
|
5219
|
-
|
|
5456
|
+
.monitor-empty {
|
|
5457
|
+
display: grid;
|
|
5458
|
+
justify-items: center;
|
|
5459
|
+
gap: 4px;
|
|
5460
|
+
padding: 24px 16px;
|
|
5461
|
+
color: var(--txt-2);
|
|
5462
|
+
text-align: center;
|
|
5463
|
+
}
|
|
5464
|
+
.monitor-empty__icon {
|
|
5465
|
+
display: inline-flex;
|
|
5466
|
+
align-items: center;
|
|
5467
|
+
justify-content: center;
|
|
5468
|
+
width: 40px;
|
|
5469
|
+
height: 40px;
|
|
5470
|
+
margin-bottom: 4px;
|
|
5471
|
+
border-radius: 12px;
|
|
5472
|
+
color: color-mix(in srgb, var(--monitor-accent) 30%, var(--ink));
|
|
5473
|
+
background: color-mix(in srgb, var(--monitor-accent) 9%, var(--canvas));
|
|
5474
|
+
}
|
|
5475
|
+
.monitor-empty__title {
|
|
5220
5476
|
color: var(--ink);
|
|
5477
|
+
font-size: 12px;
|
|
5478
|
+
font-weight: 700;
|
|
5221
5479
|
}
|
|
5222
|
-
.monitor-
|
|
5223
|
-
|
|
5224
|
-
color: var(--txt-3);
|
|
5480
|
+
.monitor-empty__text {
|
|
5481
|
+
max-width: 32ch;
|
|
5225
5482
|
font-size: 11px;
|
|
5483
|
+
line-height: 1.5;
|
|
5484
|
+
}
|
|
5485
|
+
@keyframes monitor-pulse {
|
|
5486
|
+
from { opacity: 0.55; transform: scale(0.55); }
|
|
5487
|
+
to { opacity: 0; transform: scale(1.25); }
|
|
5488
|
+
}
|
|
5489
|
+
@container monitor (max-width: 560px) {
|
|
5490
|
+
.monitor-summary__metrics {
|
|
5491
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
5492
|
+
}
|
|
5493
|
+
.monitor-sections {
|
|
5494
|
+
grid-template-columns: 1fr;
|
|
5495
|
+
}
|
|
5496
|
+
.monitor-row {
|
|
5497
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
5498
|
+
}
|
|
5499
|
+
.monitor-row__aside {
|
|
5500
|
+
grid-column: 2;
|
|
5501
|
+
grid-template-columns: 1fr auto;
|
|
5502
|
+
justify-items: start;
|
|
5503
|
+
min-width: 0;
|
|
5504
|
+
width: 100%;
|
|
5505
|
+
text-align: left;
|
|
5506
|
+
}
|
|
5507
|
+
}
|
|
5508
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5509
|
+
.monitor-row__state--active .monitor-row__dot::after {
|
|
5510
|
+
animation: none;
|
|
5511
|
+
}
|
|
5512
|
+
.monitor-summary__refresh,
|
|
5513
|
+
.monitor-section__header,
|
|
5514
|
+
.monitor-row {
|
|
5515
|
+
transition-duration: 0.01ms;
|
|
5516
|
+
}
|
|
5226
5517
|
}
|
|
5227
|
-
`,
|
|
5518
|
+
`,Cs=`slicc-monitor-style`;function ws(e){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){return e.status?e.status:e.error?`error`:e.active?`active`:`idle`}function Es(e){return e===`active`?`Active`:e===`error`?`Error`:e===`warn`?`Warning`:`Idle`}function Ds(e){let t=Ts(e),r=S(`span`,{class:`monitor-row__badges`});for(let t of e.badges??[])r.appendChild(S(`span`,{class:`monitor-row__badge`},t));let i=S(`span`,{class:`monitor-row__headline`},S(`span`,{class:`monitor-row__name`},e.name));r.childElementCount>0&&i.appendChild(r);let a=S(`span`,{class:`monitor-row__content`},i);return e.sublabel&&a.appendChild(S(`span`,{class:`monitor-row__sublabel`},e.sublabel)),S(`li`,{class:`monitor-row`,"data-status":t},S(`span`,{class:`monitor-row__icon`},n(e.icon??`box`,{size:16})),a,S(`span`,{class:`monitor-row__aside`},S(`span`,{class:`monitor-row__meta`},e.meta),S(`span`,{class:`monitor-row__state monitor-row__state--${t}`},S(`span`,{class:`monitor-row__dot`,"aria-hidden":`true`}),Es(t))))}function Os(e){return S(`div`,{class:`monitor-empty`,role:`status`},S(`span`,{class:`monitor-empty__icon`},n(`inbox`,{size:18})),S(`span`,{class:`monitor-empty__title`},`No ${e.label.toLocaleLowerCase()} yet`),S(`span`,{class:`monitor-empty__text`},e.emptyText??`${e.label} will appear here when available.`))}function ks(e,t,r,i){let a=t.has(e.id),o=e.count===0?`monitor-section monitor-section--empty`:`monitor-section`,s=[S(`span`,{class:`monitor-section__toggle`,"aria-hidden":`true`},n(a?`chevron-right`:`chevron-down`,{size:15})),S(`span`,{class:`monitor-section__heading`},S(`span`,{class:`monitor-section__title`},e.label),e.meta?S(`span`,{class:`monitor-section__meta`},e.meta):null)];s.push(S(`span`,{class:`monitor-section__count`},String(e.count)));let c=S(`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=S(`div`,{class:`monitor-section__body`,id:i});if(a&&l.setAttribute(`hidden`,``),e.rows.length===0)l.appendChild(Os(e));else{let t=S(`ul`,{class:`monitor-section__list`});for(let n of e.rows)t.appendChild(Ds(n));l.appendChild(t)}return S(`section`,{class:o,"data-section":e.id,"data-accent":e.accent??`neutral`},c,l)}function $(e,t){return S(`div`,{class:`monitor-summary__metric`},S(`dt`,null,e),S(`dd`,null,t))}function As(e,t){let r=e.flatMap(e=>e.rows),i=r.filter(e=>Ts(e)===`active`).length,a=r.filter(e=>[`warn`,`error`].includes(Ts(e))).length,o=e.reduce((e,t)=>e+(t.id===`cost`?0:t.count),0),s=e.find(e=>e.id===`cost`)?.meta??`—`,c=S(`button`,{class:`monitor-summary__refresh`,type:`button`,"aria-label":`Refresh monitor data`},n(`refresh-cw`,{size:15}),S(`span`,null,`Refresh`));return c.addEventListener(`click`,t),S(`header`,{class:`monitor-summary`},S(`div`,{class:`monitor-summary__topline`},S(`span`,{class:`monitor-summary__mark`},n(`activity`,{size:19})),S(`div`,{class:`monitor-summary__copy`},S(`h2`,{class:`monitor-summary__title`},`Live monitor`),S(`p`,{class:`monitor-summary__subtitle`},`System activity and connections at a glance`)),c),S(`dl`,{class:`monitor-summary__metrics`},$(`Tracked`,String(o)),$(`Active`,String(i)),$(`Attention`,String(a)),$(`Session cost`,s)))}function js(e){return{...e,rows:e.rows.map(e=>({...e,badges:e.badges?.slice()}))}}var Ms=0;b(`slicc-monitor`,class extends HTMLElement{#e=[];#t=new Set;#n=!1;#r=++Ms;connectedCallback(){ws(this.ownerDocument),this.#n||=(this.#t=bs(),!0),this.#e.length>0&&this.#i()}get sections(){return this.#e.map(js)}set sections(e){this.#e=Array.isArray(e)?e.map(js):[],this.isConnected&&this.#i()}#i(){let e=As(this.#e,()=>{this.dispatchEvent(new CustomEvent(`slicc-monitor-refresh`,{bubbles:!0,composed:!0}))}),t=S(`div`,{class:`monitor-sections`});for(let e of this.#e){let n=e.id.replace(/[^a-z0-9_-]/gi,`-`);t.appendChild(ks(e,this.#t,e=>{this.#t.has(e)?this.#t.delete(e):this.#t.add(e),xs(this.#t),this.#i()},`monitor-${this.#r}-${n}`))}this.replaceChildren(),x(this,[e,t])}});var Ns=e({DEFAULT_LAUNCHER_CORNER:()=>u,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>p,HOLD_TO_ENABLE_MS:()=>Jt,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>m,MACHINE_WRITTEN_MEMORY_PATH:()=>MACHINE_WRITTEN_MEMORY_PATH,REDACTED_REAL_WORLD_MEMORY_PATH:()=>REDACTED_REAL_WORLD_MEMORY_PATH,SYNTHETIC_MEMORY_PATH:()=>SYNTHETIC_MEMORY_PATH,SliccImagePreview:()=>Vt,TOKENS_CSS:()=>Ao,ensureGlobalTokens:()=>Mo,followSystemTheme:()=>No,setTheme:()=>Z});export{wi as a,Ea as i,Mo as n,No as r,Ns as t};
|