sliccy 6.52.0 → 6.53.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/dist/ui/assets/{account-store-B84EWSsm.js → account-store-B-mk8I7O.js} +1 -1
- package/dist/ui/assets/{account-store-CX4cKbqy.js → account-store-DB67UHUM.js} +1 -1
- package/dist/ui/assets/{adobe-DupHRIEP.js → adobe-C1qS1WPl.js} +1 -1
- package/dist/ui/assets/{adobe-Cuy0mdAu.js → adobe-Cf2k2GjP.js} +1 -1
- package/dist/ui/assets/{apply-layout-BKwR1vB7.js → apply-layout-BnC5ZvMh.js} +1 -1
- package/dist/ui/assets/{apps-CSceOHNd.js → apps-CVdYoXh4.js} +1 -1
- package/dist/ui/assets/{azure-openai-B6E_r_1Z.js → azure-openai-DSvGIruN.js} +1 -1
- package/dist/ui/assets/{azure-openai-I2OiPc7t.js → azure-openai-DlmfbG72.js} +1 -1
- package/dist/ui/assets/{cerebras-gN9qkuL5.js → cerebras-CLinOjdd.js} +1 -1
- package/dist/ui/assets/{cerebras-xuQ3l5XG.js → cerebras-fTI2pWfC.js} +1 -1
- package/dist/ui/assets/{connect-surface-BnxvBY2Y.js → connect-surface-gQ0EEwnD.js} +1 -1
- package/dist/ui/assets/{fs-2iODGfD8.js → fs-CHGx5G75.js} +1 -1
- package/dist/ui/assets/{fs-CxFp0g4o.js → fs-CdvLoTAe.js} +2 -2
- package/dist/ui/assets/{github-BcMsV0t_.js → github-CFa2nhyU.js} +2 -2
- package/dist/ui/assets/{github-copilot-Cn3j0Rv0.js → github-copilot-FQXSBcCx.js} +1 -1
- package/dist/ui/assets/{github-copilot-Dnoi6k4Z.js → github-copilot-ht15T0ar.js} +1 -1
- package/dist/ui/assets/{github-install-CO8_OdHR.js → github-install-LsbPcDG5.js} +1 -1
- package/dist/ui/assets/{github-CqqQlzFe.js → github-j-248n2f.js} +1 -1
- package/dist/ui/assets/{github-zip-BF4Dk5Uv.js → github-zip-K6QGGCHD.js} +1 -1
- package/dist/ui/assets/{kernel-worker-CCI3x4bx.js → kernel-worker-BsGb48Gf.js} +26 -26
- package/dist/ui/assets/{local-llm-DrVEzlVA.js → local-llm-5j2w2ou6.js} +1 -1
- package/dist/ui/assets/{local-llm-C27rJLGR.js → local-llm-DDQJ6ml7.js} +1 -1
- package/dist/ui/assets/{main-C528NiER.js → main-CBHjhJ-0.js} +3 -3
- package/dist/ui/assets/{mount-CcejNcUs.js → mount-C-KHbhuR.js} +1 -1
- package/dist/ui/assets/{mount-I_Tg3ZnY.js → mount-E3j3SmYs.js} +2 -2
- package/dist/ui/assets/{mount-recovery-C34taOvx.js → mount-recovery-CUSecwxP.js} +1 -1
- package/dist/ui/assets/{new-session-BSJMc_DX.js → new-session-CYS1WxvI.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-D5jK63IR.js → oauth-bootstrap-Cbz2j4Ic.js} +2 -2
- package/dist/ui/assets/{openai-codex-BgOE0IDG.js → openai-codex-BHuiNUj3.js} +1 -1
- package/dist/ui/assets/{openai-codex-B9uhNkC-.js → openai-codex-DMx6OtKw.js} +1 -1
- package/dist/ui/assets/{openrouter-DpIaeQYG.js → openrouter-Dgx3wKQH.js} +1 -1
- package/dist/ui/assets/{openrouter-ClLgZEuP.js → openrouter-P9KB7uSr.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-Q7NPW8Wm.js → openrouter-oauth-BleMCmHF.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-DyGJoMCN.js → openrouter-oauth-D-DgFnPU.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-DC2BHP6V.js → panel-rpc-handlers-CpPj9WHZ.js} +2 -2
- package/dist/ui/assets/{panelize-shell-Dcm_mMXL.js → panelize-shell-BeUFfvlg.js} +1 -1
- package/dist/ui/assets/{provider-Bv3ju6zy.js → provider-DO4blAyi.js} +1 -1
- package/dist/ui/assets/{provider-Bvhv2hkj.js → provider-RNVCyIq3.js} +2 -2
- package/dist/ui/assets/{provider-settings-CYdMOSf3.js → provider-settings-CeiKlSJv.js} +1 -1
- package/dist/ui/assets/{provider-settings-BM8n8ppl.js → provider-settings-r8stgNQq.js} +1 -1
- package/dist/ui/assets/{provider-store-access-SLtXvyy0.js → provider-store-access-C6SGh0JF.js} +2 -2
- package/dist/ui/assets/provider-store-access-CtqX0xvk.js +1 -0
- package/dist/ui/assets/{providers-C6hKMD69.js → providers-CBVtcfpQ.js} +1 -1
- package/dist/ui/assets/{providers-Bh7Kjmjo.js → providers-CS-sPIQC.js} +2 -2
- package/dist/ui/assets/{quick-llm-99LtiND8.js → quick-llm-CMF8TbUH.js} +1 -1
- package/dist/ui/assets/{recovery-screen-n15AdpV7.js → recovery-screen-BSBC17y3.js} +1 -1
- package/dist/ui/assets/{redirect-uri-bG2hDXVn.js → redirect-uri-BnZ9aStK.js} +1 -1
- package/dist/ui/assets/{session-freezer-bMKhzmap.js → session-freezer-CWkxguxI.js} +3 -3
- package/dist/ui/assets/{setup-feature-flags-remote-N9WiwTeh.js → setup-feature-flags-remote-DmFDhhxM.js} +1 -1
- package/dist/ui/assets/{setup-standalone-prelude-MRNfc_Ve.js → setup-standalone-prelude-CNbBvr6k.js} +1 -1
- package/dist/ui/assets/{setup-sudo-Dcgb9ZW9.js → setup-sudo-DesG9K2E.js} +2 -2
- package/dist/ui/assets/{skills-BuKmmov2.js → skills-BF5SsbbK.js} +1 -1
- package/dist/ui/assets/{src-DIOmISn-.js → src-SZZWiNhu.js} +72 -68
- package/dist/ui/assets/{store-CtEQMEXe.js → store-BEw2LC_l.js} +1 -1
- package/dist/ui/assets/{store-CbjB9mcp.js → store-BLHLmKok.js} +1 -1
- package/dist/ui/assets/{sudo-BSPYes8w.js → sudo-CvRvn49h.js} +1 -1
- package/dist/ui/assets/{upgrade-detection-E_zgR1hV.js → upgrade-detection-BeLpZOMx.js} +1 -1
- package/dist/ui/assets/{wc-attach-BsvU_RxO.js → wc-attach-3A9p5w25.js} +2 -2
- package/dist/ui/assets/{wc-extension-CCALI38d.js → wc-extension-Bbt0ArfU.js} +2 -2
- package/dist/ui/assets/{wc-follower-CzewgFsO.js → wc-follower-BgZTg3SI.js} +3 -3
- package/dist/ui/assets/{wc-live-C3a6Wkx3.js → wc-live-DLikPGdT.js} +3 -3
- package/dist/ui/assets/{wc-nav-JnhkRALp.js → wc-nav-DOz-jGmf.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-CU5d4qp5.js → wc-onboarding-5DkDgJ4h.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-zYvPkaRA.js → wc-placeholder-Bc4m1Jf5.js} +2 -2
- package/dist/ui/assets/{wc-settings-C55bi4Ce.js → wc-settings-DZGl-5dn.js} +2 -2
- package/dist/ui/assets/{wc-shell-Bk22uuMB.js → wc-shell-B0nXfcKj.js} +3 -3
- package/dist/ui/assets/{wc-sprinkles-d9Z4Sfs3.js → wc-sprinkles-Cxlcfpyh.js} +2 -2
- package/dist/ui/assets/{wc-tray-DtJDgteL.js → wc-tray-xpD-5SVp.js} +2 -2
- package/dist/ui/assets/{xai-grok-B0eJKWjc.js → xai-grok-C8XrxxOT.js} +1 -1
- package/dist/ui/assets/{xai-grok-BLL3GhAu.js → xai-grok-CrMPRSu7.js} +1 -1
- package/dist/ui/index.html +6 -6
- package/dist/ui/packages/webapp/index.html +6 -6
- package/package.json +2 -2
- package/dist/ui/assets/provider-store-access-DD89LqF5.js +0 -1
|
@@ -1874,7 +1874,7 @@ slicc-composer-capture .slicc-capture__timer {
|
|
|
1874
1874
|
slicc-composer-capture .slicc-capture__timer[hidden] {
|
|
1875
1875
|
display: none;
|
|
1876
1876
|
}
|
|
1877
|
-
`,xn=`slicc-composer-capture-style`;function Sn(e){if(e.getElementById(xn))return;let t=e.createElement(`style`);t.id=xn,t.textContent=bn,(e.head??e.documentElement).appendChild(t)}var Cn=`photo`,wn=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`];function Tn(){if(typeof MediaRecorder>`u`)return`video/webm`;for(let e of wn)if(MediaRecorder.isTypeSupported?.(e))return e;return`video/webm`}function En(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,`0`)}`}S(`slicc-composer-capture`,class extends HTMLElement{static observedAttributes=[`mode`,`preferred-device`,`preferred-audio-device`];media=null;recorderFactory=null;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=!1;#u=null;#d=null;#f=null;#p=[];#m=0;#h=null;#g=null;#_=e=>{e.key===`Escape`&&this.#g&&this.#L()};connectedCallback(){Sn(this.ownerDocument),this.#H(),this.ownerDocument.addEventListener(`keydown`,this.#_)}disconnectedCallback(){if(this.ownerDocument.removeEventListener(`keydown`,this.#_),this.#N(),this.#P(),this.#I(),this.#g){let e=this.#g;this.#g=null,e(null)}}attributeChangedCallback(e,t,n){e===`mode`&&this.#l&&this.#z(n??Cn)}get mode(){return this.getAttribute(`mode`)===`video`?`video`:`photo`}set mode(e){e==null?this.removeAttribute(`mode`):this.setAttribute(`mode`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}get preferredAudioDevice(){return this.getAttribute(`preferred-audio-device`)}set preferredAudioDevice(e){e==null?this.removeAttribute(`preferred-audio-device`):this.setAttribute(`preferred-audio-device`,e)}#v(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}#y(e,t){return this.recorderFactory?this.recorderFactory(e,t):new MediaRecorder(e,t)}async open(e){this.#H(),e&&(this.mode=e),this.#z(this.mode);let t=this.#v();if(!t)return null;try{this.#u=await this.#b(t,this.preferredDevice,this.preferredAudioDevice,this.mode)}catch{return null}return this.#S(),this.#C(this.#u),await this.#w(t),await this.#T(t),this.hidden=!1,new Promise(e=>{this.#g=e})}async#b(e,t,n,r){let i=await this.#x(e,n,r);if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}},audio:i})}catch{}try{return await e.getUserMedia({video:!0,audio:i})}catch(t){if(i===!1)throw t;return this.#r.textContent=`Microphone unavailable — recording video only.`,e.getUserMedia({video:!0,audio:!1})}}async#x(e,t,n){if(n!==`video`)return!1;if(t)return{deviceId:{exact:t}};let r=[];try{r=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{r=[]}let i=o(a(r,`microphone`));return!i||{deviceId:{exact:i}}}#S(){this.#d=this.#u?.getAudioTracks()[0]??null}#C(e){this.#e.srcObject=e,this.#e.muted=!0,this.#e.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#e.toggleAttribute(`data-mirrored`,t!==`environment`)}async#w(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}let n=a(t,`camera`);this.#t.replaceChildren(...n.map(e=>w(`option`,{value:e.deviceId},e.label)));let r=this.#u?.getVideoTracks()[0]?.getSettings?.().deviceId;r&&(this.#t.value=r),this.#t.toggleAttribute(`hidden`,!i(n))}async#T(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{t=[]}let n=a(t,`microphone`);this.#n.replaceChildren(...n.map(e=>w(`option`,{value:e.deviceId},e.label)));let r=this.#d?.getSettings?.().deviceId??this.preferredAudioDevice??o(n);r&&n.some(e=>e.deviceId===r)&&(this.#n.value=r),this.#E()}#E(){if(!this.#n)return;let e=this.#n.options.length>=2,t=this.mode===`video`&&e;this.#n.toggleAttribute(`hidden`,!t)}async#D(e){let t=this.#v();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#F();let r=n;if(this.mode===`video`&&this.#d&&this.#d.readyState===`live`)r.addTrack(this.#d);else if(this.mode===`video`)try{let e=await t.getUserMedia({audio:await this.#x(t,this.preferredAudioDevice,`video`)});for(let t of e.getAudioTracks())this.#d=t,r.addTrack(t)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}this.#u=r,this.#C(r),this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`camera`},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}async#O(e){let t=this.#v();if(!t||!this.#u)return;this.#r.textContent=``;let n;try{n=await t.getUserMedia({audio:{deviceId:{exact:e}}})}catch{this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}let r=n.getAudioTracks()[0];if(!r){this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}if(this.#d){try{this.#u.removeTrack(this.#d)}catch{}this.#d.stop()}this.#u.addTrack(r),this.#d=r,this.preferredAudioDevice=e,this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`microphone`},bubbles:!0,composed:!0}))}#k(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#e.videoWidth,e.height=this.#e.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#e,0,0);let t=`image/png`,n=e.toDataURL(t);this.#R({kind:`image`,dataUrl:n,mimeType:t,width:e.width,height:e.height})}#A(){if(!this.#u||this.#f)return;this.#p=[];let e=Tn(),t;try{t=this.#y(this.#u,{mimeType:e})}catch{this.#r.textContent=`Recording is not supported in this browser.`;return}t.ondataavailable=e=>{e.data&&e.data.size>0&&this.#p.push(e.data)},t.onstop=()=>this.#M(e);try{t.start()}catch{this.#r.textContent=`Could not start recording.`;return}this.#f=t,this.#m=Date.now(),this.#n.disabled=!0,this.#t.disabled=!0,this.#i.hidden=!1,this.#i.textContent=En(0),this.#h=setInterval(()=>{this.#i.textContent=En(Date.now()-this.#m)},250),this.#B()}#j(){let e=this.#f;if(e)try{e.state!==`inactive`&&e.stop()}catch{this.#M(e.mimeType||`video/webm`)}}#M(e){let t=this.#m?Date.now()-this.#m:0;this.#N();let n=this.#f?.mimeType||e||`video/webm`,r=new Blob(this.#p,{type:n});this.#p=[],this.#f=null,this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1);let i=typeof URL<`u`?URL.createObjectURL(r):void 0;this.#R({kind:`video`,blob:r,dataUrl:i,mimeType:n,width:this.#e.videoWidth,height:this.#e.videoHeight,durationMs:t})}#N(){this.#h!=null&&(clearInterval(this.#h),this.#h=null),this.#i.hidden=!0,this.#i.textContent=``,this.#m=0}#P(){let e=this.#f;if(this.#f=null,this.#p=[],this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1),e){e.ondataavailable=null,e.onstop=null;try{e.state!==`inactive`&&e.stop()}catch{}}}#F(){for(let e of this.#u?.getVideoTracks()??[])e.stop()}#I(){for(let e of this.#u?.getTracks()??[])e.stop();this.#u=null,this.#d=null,this.#e&&(this.#e.srcObject=null)}#L(){this.dispatchEvent(new CustomEvent(`slicc-capture-cancel`,{bubbles:!0,composed:!0})),this.#R(null)}#R(e){e&&this.dispatchEvent(new CustomEvent(`slicc-capture`,{detail:e,bubbles:!0,composed:!0})),this.#N(),this.#P(),this.#I();let t=this.#g;this.#g=null,this.hidden=!0,t?.(e)}#z(e){let t=e===`video`;this.#s.setAttribute(`aria-pressed`,String(!t)),this.#c.setAttribute(`aria-pressed`,String(t)),this.#r.textContent=t?`Mic on — video will record audio.`:``,this.#B(),this.#E()}#B(){let e=this.#a;if(e.replaceChildren(),this.mode===`photo`){e.className=`slicc-capture__btn slicc-capture__btn--primary`,e.setAttribute(`part`,`snap`),e.setAttribute(`aria-label`,`Snap photo`),e.append(n(`camera`,{size:14}),document.createTextNode(` Snap`));return}this.#f?(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`stop`),e.setAttribute(`aria-label`,`Stop recording`),e.append(w(`span`,{class:`slicc-capture__square`}),document.createTextNode(` Stop`))):(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`record`),e.setAttribute(`aria-label`,`Start recording`),e.append(w(`span`,{class:`slicc-capture__dot`}),document.createTextNode(` Record`)))}#V(){if(this.mode===`photo`){this.#k();return}this.#f?this.#j():this.#A()}#H(){if(this.#l)return;this.#l=!0,this.#e=w(`video`,{class:`slicc-capture__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#e.muted=!0,this.#r=w(`div`,{class:`slicc-capture__status`}),this.#t=w(`select`,{class:`slicc-capture__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#t.addEventListener(`change`,()=>{this.#D(this.#t.value)}),this.#n=w(`select`,{class:`slicc-capture__select`,part:`audio-picker`,"aria-label":`Microphone`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#O(this.#n.value)}),this.#s=w(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`true`,"aria-label":`Photo`},n(`image`,{size:14})),this.#s.addEventListener(`click`,()=>{this.mode=`photo`}),this.#c=w(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`false`,"aria-label":`Video`},n(`video`,{size:14})),this.#c.addEventListener(`click`,()=>{this.#U()});let e=w(`div`,{class:`slicc-capture__mode`,role:`group`,"aria-label":`Capture mode`},this.#s,this.#c);this.#i=w(`span`,{class:`slicc-capture__timer`,hidden:!0}),this.#o=w(`button`,{type:`button`,class:`slicc-capture__close`,part:`cancel`,"aria-label":`Cancel`},n(`x`,{size:14})),this.#o.addEventListener(`click`,()=>this.#L()),this.#a=w(`button`,{type:`button`,class:`slicc-capture__btn slicc-capture__btn--primary`,part:`snap`,"aria-label":`Snap photo`}),this.#a.addEventListener(`click`,()=>this.#V());let t=w(`div`,{class:`slicc-capture__bar`},this.#t,this.#n,w(`span`,{class:`slicc-capture__spacer`}),this.#i,this.#a,e);this.replaceChildren(this.#e,this.#r,t,this.#o),this.#z(this.mode)}async#U(){if(this.mode=`video`,!this.#u||this.#u.getAudioTracks().length>0)return;let e=this.#v();if(!e)return;let t=this.#u.getVideoTracks()[0]?.getSettings?.().deviceId??this.preferredDevice??null,n=await this.#x(e,this.preferredAudioDevice,`video`);try{let r=t?await e.getUserMedia({video:{deviceId:{exact:t}},audio:n}):await e.getUserMedia({video:!0,audio:n});this.#I(),this.#u=r,this.#S(),this.#C(r),await this.#T(e)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}}});var Dn=[`off`,`low`,`medium`,`high`,`xhigh`,`max`],On={off:{label:`Secco`,gloss:`bone dry — not a drop (ask any prosecco)`,tint:`var(--txt-3)`},low:{label:`Goccia`,gloss:`one drop — bar-speak: «macchiato, solo una goccia»`,tint:`color-mix(in srgb, var(--violet) 20%, var(--txt-3))`},medium:{label:`Bagnato`,gloss:`properly wet`,tint:`color-mix(in srgb, var(--violet) 40%, var(--txt-3))`},high:{label:`Affogato`,gloss:`drowned — the menu item itself`,tint:`color-mix(in srgb, var(--violet) 60%, var(--txt-3))`},xhigh:{label:`Inzuppato`,gloss:`soaked through, biscotto-style`,tint:`color-mix(in srgb, var(--violet) 80%, var(--txt-3))`},max:{label:`Sprofondato`,gloss:`sunk to the bottom`,tint:`var(--violet)`}},kn=`max`,An=`Opus 4.8`,jn=[{name:`Opus 4.8`,provider:`Anthropic`,id:`claude-opus-4-8`},{name:`Sonnet 4.6`,provider:`Anthropic`,id:`claude-sonnet-4-6`},{name:`Haiku 4.5`,provider:`Anthropic`,id:`claude-haiku-4-5`}],Mn=8;function Nn(e){let t=typeof e==`string`?{name:e}:e;return{...t,name:t.name,id:t.id??t.name}}var Pn=`max`,Fn=13;function In(){return n(`sparkles`,{size:Fn,class:`ic`,part:`model-icon`})}function Ln(){return n(`brain`,{size:Fn,class:`brain`,part:`brain`})}function Rn(){return n(`chevron-down`,{size:11,part:`caret`})}var zn=`http://www.w3.org/2000/svg`;function Bn(){let e=document.createElementNS(zn,`svg`);e.setAttribute(`width`,`0`),e.setAttribute(`height`,`0`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`style`,`position:absolute`);let t=document.createElementNS(zn,`defs`),n=document.createElementNS(zn,`linearGradient`);n.setAttribute(`id`,`meta-rainbow`),n.setAttribute(`x1`,`0`),n.setAttribute(`y1`,`0`),n.setAttribute(`x2`,`1`),n.setAttribute(`y2`,`0`);for(let[e,t]of[[`0%`,`#f43f5e`],[`28%`,`#f59e0b`],[`64%`,`#06b6d4`],[`100%`,`#8b5cf6`]]){let r=document.createElementNS(zn,`stop`);r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n.appendChild(r)}return t.appendChild(n),e.appendChild(t),e}var Vn=T(`
|
|
1877
|
+
`,xn=`slicc-composer-capture-style`;function Sn(e){if(e.getElementById(xn))return;let t=e.createElement(`style`);t.id=xn,t.textContent=bn,(e.head??e.documentElement).appendChild(t)}var Cn=`photo`,wn=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`];function Tn(){if(typeof MediaRecorder>`u`)return`video/webm`;for(let e of wn)if(MediaRecorder.isTypeSupported?.(e))return e;return`video/webm`}function En(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,`0`)}`}S(`slicc-composer-capture`,class extends HTMLElement{static observedAttributes=[`mode`,`preferred-device`,`preferred-audio-device`];media=null;recorderFactory=null;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=!1;#u=null;#d=null;#f=null;#p=[];#m=0;#h=null;#g=null;#_=e=>{e.key===`Escape`&&this.#g&&this.#L()};connectedCallback(){Sn(this.ownerDocument),this.#H(),this.ownerDocument.addEventListener(`keydown`,this.#_)}disconnectedCallback(){if(this.ownerDocument.removeEventListener(`keydown`,this.#_),this.#N(),this.#P(),this.#I(),this.#g){let e=this.#g;this.#g=null,e(null)}}attributeChangedCallback(e,t,n){e===`mode`&&this.#l&&this.#z(n??Cn)}get mode(){return this.getAttribute(`mode`)===`video`?`video`:`photo`}set mode(e){e==null?this.removeAttribute(`mode`):this.setAttribute(`mode`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}get preferredAudioDevice(){return this.getAttribute(`preferred-audio-device`)}set preferredAudioDevice(e){e==null?this.removeAttribute(`preferred-audio-device`):this.setAttribute(`preferred-audio-device`,e)}#v(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}#y(e,t){return this.recorderFactory?this.recorderFactory(e,t):new MediaRecorder(e,t)}async open(e){this.#H(),e&&(this.mode=e),this.#z(this.mode);let t=this.#v();if(!t)return null;try{this.#u=await this.#b(t,this.preferredDevice,this.preferredAudioDevice,this.mode)}catch{return null}return this.#S(),this.#C(this.#u),await this.#w(t),await this.#T(t),this.hidden=!1,new Promise(e=>{this.#g=e})}async#b(e,t,n,r){let i=await this.#x(e,n,r);if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}},audio:i})}catch{}try{return await e.getUserMedia({video:!0,audio:i})}catch(t){if(i===!1)throw t;return this.#r.textContent=`Microphone unavailable — recording video only.`,e.getUserMedia({video:!0,audio:!1})}}async#x(e,t,n){if(n!==`video`)return!1;if(t)return{deviceId:{exact:t}};let r=[];try{r=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{r=[]}let i=o(a(r,`microphone`));return!i||{deviceId:{exact:i}}}#S(){this.#d=this.#u?.getAudioTracks()[0]??null}#C(e){this.#e.srcObject=e,this.#e.muted=!0,this.#e.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#e.toggleAttribute(`data-mirrored`,t!==`environment`)}async#w(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}let n=a(t,`camera`);this.#t.replaceChildren(...n.map(e=>w(`option`,{value:e.deviceId},e.label)));let r=this.#u?.getVideoTracks()[0]?.getSettings?.().deviceId;r&&(this.#t.value=r),this.#t.toggleAttribute(`hidden`,!i(n))}async#T(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{t=[]}let n=a(t,`microphone`);this.#n.replaceChildren(...n.map(e=>w(`option`,{value:e.deviceId},e.label)));let r=this.#d?.getSettings?.().deviceId??this.preferredAudioDevice??o(n);r&&n.some(e=>e.deviceId===r)&&(this.#n.value=r),this.#E()}#E(){if(!this.#n)return;let e=this.#n.options.length>=2,t=this.mode===`video`&&e;this.#n.toggleAttribute(`hidden`,!t)}async#D(e){let t=this.#v();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#F();let r=n;if(this.mode===`video`&&this.#d&&this.#d.readyState===`live`)r.addTrack(this.#d);else if(this.mode===`video`)try{let e=await t.getUserMedia({audio:await this.#x(t,this.preferredAudioDevice,`video`)});for(let t of e.getAudioTracks())this.#d=t,r.addTrack(t)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}this.#u=r,this.#C(r),this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`camera`},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}async#O(e){let t=this.#v();if(!t||!this.#u)return;this.#r.textContent=``;let n;try{n=await t.getUserMedia({audio:{deviceId:{exact:e}}})}catch{this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}let r=n.getAudioTracks()[0];if(!r){this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}if(this.#d){try{this.#u.removeTrack(this.#d)}catch{}this.#d.stop()}this.#u.addTrack(r),this.#d=r,this.preferredAudioDevice=e,this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`microphone`},bubbles:!0,composed:!0}))}#k(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#e.videoWidth,e.height=this.#e.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#e,0,0);let t=`image/png`,n=e.toDataURL(t);this.#R({kind:`image`,dataUrl:n,mimeType:t,width:e.width,height:e.height})}#A(){if(!this.#u||this.#f)return;this.#p=[];let e=Tn(),t;try{t=this.#y(this.#u,{mimeType:e})}catch{this.#r.textContent=`Recording is not supported in this browser.`;return}t.ondataavailable=e=>{e.data&&e.data.size>0&&this.#p.push(e.data)},t.onstop=()=>this.#M(e);try{t.start()}catch{this.#r.textContent=`Could not start recording.`;return}this.#f=t,this.#m=Date.now(),this.#n.disabled=!0,this.#t.disabled=!0,this.#i.hidden=!1,this.#i.textContent=En(0),this.#h=setInterval(()=>{this.#i.textContent=En(Date.now()-this.#m)},250),this.#B()}#j(){let e=this.#f;if(e)try{e.state!==`inactive`&&e.stop()}catch{this.#M(e.mimeType||`video/webm`)}}#M(e){let t=this.#m?Date.now()-this.#m:0;this.#N();let n=this.#f?.mimeType||e||`video/webm`,r=new Blob(this.#p,{type:n});this.#p=[],this.#f=null,this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1);let i=typeof URL<`u`?URL.createObjectURL(r):void 0;this.#R({kind:`video`,blob:r,dataUrl:i,mimeType:n,width:this.#e.videoWidth,height:this.#e.videoHeight,durationMs:t})}#N(){this.#h!=null&&(clearInterval(this.#h),this.#h=null),this.#i.hidden=!0,this.#i.textContent=``,this.#m=0}#P(){let e=this.#f;if(this.#f=null,this.#p=[],this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1),e){e.ondataavailable=null,e.onstop=null;try{e.state!==`inactive`&&e.stop()}catch{}}}#F(){for(let e of this.#u?.getVideoTracks()??[])e.stop()}#I(){for(let e of this.#u?.getTracks()??[])e.stop();this.#u=null,this.#d=null,this.#e&&(this.#e.srcObject=null)}#L(){this.dispatchEvent(new CustomEvent(`slicc-capture-cancel`,{bubbles:!0,composed:!0})),this.#R(null)}#R(e){e&&this.dispatchEvent(new CustomEvent(`slicc-capture`,{detail:e,bubbles:!0,composed:!0})),this.#N(),this.#P(),this.#I();let t=this.#g;this.#g=null,this.hidden=!0,t?.(e)}#z(e){let t=e===`video`;this.#s.setAttribute(`aria-pressed`,String(!t)),this.#c.setAttribute(`aria-pressed`,String(t)),this.#r.textContent=t?`Mic on — video will record audio.`:``,this.#B(),this.#E()}#B(){let e=this.#a;if(e.replaceChildren(),this.mode===`photo`){e.className=`slicc-capture__btn slicc-capture__btn--primary`,e.setAttribute(`part`,`snap`),e.setAttribute(`aria-label`,`Snap photo`),e.append(n(`camera`,{size:14}),document.createTextNode(` Snap`));return}this.#f?(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`stop`),e.setAttribute(`aria-label`,`Stop recording`),e.append(w(`span`,{class:`slicc-capture__square`}),document.createTextNode(` Stop`))):(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`record`),e.setAttribute(`aria-label`,`Start recording`),e.append(w(`span`,{class:`slicc-capture__dot`}),document.createTextNode(` Record`)))}#V(){if(this.mode===`photo`){this.#k();return}this.#f?this.#j():this.#A()}#H(){if(this.#l)return;this.#l=!0,this.#e=w(`video`,{class:`slicc-capture__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#e.muted=!0,this.#r=w(`div`,{class:`slicc-capture__status`}),this.#t=w(`select`,{class:`slicc-capture__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#t.addEventListener(`change`,()=>{this.#D(this.#t.value)}),this.#n=w(`select`,{class:`slicc-capture__select`,part:`audio-picker`,"aria-label":`Microphone`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#O(this.#n.value)}),this.#s=w(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`true`,"aria-label":`Photo`},n(`image`,{size:14})),this.#s.addEventListener(`click`,()=>{this.mode=`photo`}),this.#c=w(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`false`,"aria-label":`Video`},n(`video`,{size:14})),this.#c.addEventListener(`click`,()=>{this.#U()});let e=w(`div`,{class:`slicc-capture__mode`,role:`group`,"aria-label":`Capture mode`},this.#s,this.#c);this.#i=w(`span`,{class:`slicc-capture__timer`,hidden:!0}),this.#o=w(`button`,{type:`button`,class:`slicc-capture__close`,part:`cancel`,"aria-label":`Cancel`},n(`x`,{size:14})),this.#o.addEventListener(`click`,()=>this.#L()),this.#a=w(`button`,{type:`button`,class:`slicc-capture__btn slicc-capture__btn--primary`,part:`snap`,"aria-label":`Snap photo`}),this.#a.addEventListener(`click`,()=>this.#V());let t=w(`div`,{class:`slicc-capture__bar`},this.#t,this.#n,w(`span`,{class:`slicc-capture__spacer`}),this.#i,this.#a,e);this.replaceChildren(this.#e,this.#r,t,this.#o),this.#z(this.mode)}async#U(){if(this.mode=`video`,!this.#u||this.#u.getAudioTracks().length>0)return;let e=this.#v();if(!e)return;let t=this.#u.getVideoTracks()[0]?.getSettings?.().deviceId??this.preferredDevice??null,n=await this.#x(e,this.preferredAudioDevice,`video`);try{let r=t?await e.getUserMedia({video:{deviceId:{exact:t}},audio:n}):await e.getUserMedia({video:!0,audio:n});this.#I(),this.#u=r,this.#S(),this.#C(r),await this.#T(e)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}}});var Dn=[`off`,`low`,`medium`,`high`,`xhigh`,`max`],On={off:{label:`Secco`,gloss:`bone dry — not a drop (ask any prosecco)`,tint:`var(--txt-3)`},low:{label:`Goccia`,gloss:`one drop — bar-speak: «macchiato, solo una goccia»`,tint:`color-mix(in srgb, var(--violet) 20%, var(--txt-3))`},medium:{label:`Bagnato`,gloss:`properly wet`,tint:`color-mix(in srgb, var(--violet) 40%, var(--txt-3))`},high:{label:`Affogato`,gloss:`drowned — the menu item itself`,tint:`color-mix(in srgb, var(--violet) 60%, var(--txt-3))`},xhigh:{label:`Inzuppato`,gloss:`soaked through, biscotto-style`,tint:`color-mix(in srgb, var(--violet) 80%, var(--txt-3))`},max:{label:`Sprofondato`,gloss:`sunk to the bottom`,tint:`var(--violet)`}},kn=`max`,An=`Opus 4.8`,jn=[{name:`Opus 4.8`,provider:`Anthropic`,id:`claude-opus-4-8`},{name:`Sonnet 4.6`,provider:`Anthropic`,id:`claude-sonnet-4-6`},{name:`Haiku 4.5`,provider:`Anthropic`,id:`claude-haiku-4-5`}],Mn=8;function Nn(e){let t=typeof e==`string`?{name:e}:e;return{...t,name:t.name,id:t.id??t.name}}var Pn=`max`,Fn=13;function In(){return n(`sparkles`,{size:Fn,class:`ic`,part:`model-icon`})}function Ln(){return n(`brain`,{size:Fn,class:`brain`,part:`brain`})}function Rn(){return n(`chevron-down`,{size:11,part:`caret`})}var k=`http://www.w3.org/2000/svg`;function zn(){let e=document.createElementNS(k,`svg`);e.setAttribute(`width`,`0`),e.setAttribute(`height`,`0`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`style`,`position:absolute`);let t=document.createElementNS(k,`defs`),n=document.createElementNS(k,`linearGradient`);n.setAttribute(`id`,`meta-rainbow`),n.setAttribute(`x1`,`0`),n.setAttribute(`y1`,`0`),n.setAttribute(`x2`,`1`),n.setAttribute(`y2`,`0`);for(let[e,t]of[[`0%`,`#f43f5e`],[`28%`,`#f59e0b`],[`64%`,`#06b6d4`],[`100%`,`#8b5cf6`]]){let r=document.createElementNS(k,`stop`);r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n.appendChild(r)}return t.appendChild(n),e.appendChild(t),e}var Bn=T(`
|
|
1878
1878
|
:host{display:block;}
|
|
1879
1879
|
*{box-sizing:border-box;}
|
|
1880
1880
|
.meta{display:flex;align-items:center;gap:8px;max-width:680px;margin:11px auto 0;font-family:var(--ui);}
|
|
@@ -1931,7 +1931,7 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
|
|
|
1931
1931
|
/* Narrow / extension-sidebar: the ⏎ / ⇧⏎ keyboard hints don't fit (and touch
|
|
1932
1932
|
users have no keyboard) — drop them regardless of the narrow-chat attribute. */
|
|
1933
1933
|
@media (max-width: 560px){ .hint{display:none;} }
|
|
1934
|
-
`);S(`slicc-composer-meta`,class extends HTMLElement{static observedAttributes=[`model`,`thinking`,`narrow`,`no-thinking`];#e;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=null;#l=!1;#u=!1;#d=``;#f=e=>{let t=e.composedPath();this.#l&&!t.includes(this)&&this.#S(),this.#u&&!t.includes(this)&&this.#D()};#p=e=>{e.key===`Escape`&&(this.#l&&(e.stopPropagation(),this.#S(),this.#r?.focus()),this.#u&&(e.stopPropagation(),this.#D(),this.#i?.focus()))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
1934
|
+
`);S(`slicc-composer-meta`,class extends HTMLElement{static observedAttributes=[`model`,`thinking`,`narrow`,`no-thinking`];#e;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=null;#l=!1;#u=!1;#d=``;#f=e=>{let t=e.composedPath();this.#l&&!t.includes(this)&&this.#S(),this.#u&&!t.includes(this)&&this.#D()};#p=e=>{e.key===`Escape`&&(this.#l&&(e.stopPropagation(),this.#S(),this.#r?.focus()),this.#u&&(e.stopPropagation(),this.#D(),this.#i?.focus()))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Bn]}connectedCallback(){this.#g()}disconnectedCallback(){this.#y(),document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)}attributeChangedCallback(){this.isConnected&&this.#g()}get model(){return this.getAttribute(`model`)??An}set model(e){e==null?this.removeAttribute(`model`):this.setAttribute(`model`,e)}get models(){return(this.#c??[...jn]).map(e=>typeof e==`string`?e:{...e})}set models(e){this.#c=Array.isArray(e)?e.slice():null,this.isConnected&&this.#g()}get#m(){return(this.#c??jn).map(Nn)}get#h(){return this.#c!==null&&this.#c.length===0}get thinking(){let e=this.getAttribute(`thinking`);return Dn.includes(e??``)?e:Pn}set thinking(e){this.setAttribute(`thinking`,e)}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){this.toggleAttribute(`narrow`,e)}get noThinking(){return this.hasAttribute(`no-thinking`)}set noThinking(e){this.toggleAttribute(`no-thinking`,e)}get accented(){return this.thinking===kn}#g(){this.#y();let e=this.model,t=this.thinking,r=On[t],i=t===kn,a=this.#h,o=a?w(`button`,{type:`button`,class:`ctl msel`,part:`model`},In(),` `,`Add AI`):w(`button`,{type:`button`,class:`ctl msel`,part:`model`,"aria-haspopup":`menu`,"aria-expanded":`false`},In(),` `,e,` `,w(`span`,{class:`cx`},Rn())),s=w(`div`,{class:`menu`,part:`model-menu`,role:`menu`});if(this.#m.length>Mn){let e=w(`input`,{class:`msearch`,part:`model-search`,type:`text`,placeholder:`Search models…`,"aria-label":`Search models`});e.value=this.#d,e.addEventListener(`input`,()=>{this.#d=e.value,this.#_()}),e.addEventListener(`click`,e=>e.stopPropagation()),s.append(e)}this.#s=w(`div`,{class:`mlist`,role:`none`}),s.append(this.#s);let c=w(`div`,{class:`mwrap`},o,s),l=!this.noThinking&&!a,u=null;if(l){let e=Ln();e.style.color=r.tint;let a=w(`button`,{type:`button`,class:`ctl tsel${i?` x`:``}`,part:`thinking`,title:r.gloss,"aria-haspopup":`menu`,"aria-expanded":`false`},e,` `,w(`span`,{class:`tlabel`},r.label),` `,w(`span`,{class:`cx`},Rn()));a.style.setProperty(`--tw`,r.tint);let o=w(`div`,{class:`menu tmenu`,part:`thinking-menu`,role:`menu`}),s=w(`div`,{class:`mlist`,role:`none`});for(let e of Dn){let r=On[e],i=w(`button`,{type:`button`,class:`mitem titem`,role:`menuitemradio`,"data-level":e,"aria-selected":e===t?`true`:`false`,title:r.gloss},w(`span`,{class:`mname`},r.label),w(`span`,{class:`tick`},n(`check`,{size:14})));i.addEventListener(`click`,()=>this.#k(e)),s.append(i)}o.append(s),u=w(`div`,{class:`twrap`},a,o)}let d=w(`slot`,{name:`hint`});C(d,[w(`span`,{class:`kbd`},`⏎`),` send `,w(`span`,{class:`sep`}),` `,w(`span`,{class:`kbd`},`⇧⏎`),` newline`]);let f=w(`div`,{class:`meta`,part:`meta`},c,u??!1,w(`div`,{class:`mspacer`}),w(`span`,{class:`hint`,part:`hint`},d));this.#e.replaceChildren(zn(),f),this.#a=c,this.#o=this.#e.querySelector(`.twrap`),this.#r=this.#e.querySelector(`.msel`),this.#i=this.#e.querySelector(`.tsel`),this.#_(),this.#C(),this.#O(),this.#v()}#_(){let e=this.#s;if(!e)return;let t=this.#d.trim().toLowerCase(),r=this.#m.filter(e=>!t||`${e.name} ${e.provider??``}`.toLowerCase().includes(t)),i=this.model,a=[];for(let e of r){let t=e.name===i,r=w(`button`,{type:`button`,class:`mitem`,role:`menuitemradio`,"data-id":e.id,"aria-selected":t?`true`:`false`},w(`span`,{class:`mname`},e.name),e.provider?w(`span`,{class:`mprov`},e.provider):!1,w(`span`,{class:`tick`},n(`check`,{size:14})));r.addEventListener(`click`,()=>this.#w(e.id)),a.push(r)}e.replaceChildren(...a.length?a:[w(`div`,{class:`mempty`},`No models match.`)])}#v(){this.#r&&(this.#t=e=>{if(e.stopPropagation(),this.#h){this.dispatchEvent(new CustomEvent(`add-ai`,{bubbles:!0,composed:!0}));return}this.#b()},this.#r.addEventListener(`click`,this.#t)),this.#i&&(this.#n=()=>this.#T(),this.#i.addEventListener(`click`,this.#n))}#y(){this.#r&&this.#t&&this.#r.removeEventListener(`click`,this.#t),this.#i&&this.#n&&this.#i.removeEventListener(`click`,this.#n),this.#t=null,this.#n=null,this.#r=null,this.#i=null,this.#a=null,this.#o=null,this.#s=null}get menuOpen(){return this.#l}openMenu(){this.#h||this.#x()}#b(){this.#l?this.#S():this.#x()}#x(){if(this.#l)return;this.#D(),this.#l=!0,this.#d=``,this.#_(),this.#C();let e=this.#e.querySelector(`.msearch`);e&&(e.value=``,requestAnimationFrame(()=>e.focus())),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0)}#S(){this.#l&&(this.#l=!1,this.#C(),this.#u||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#C(){this.#a?.classList.toggle(`open`,this.#l),this.#r?.setAttribute(`aria-expanded`,this.#l?`true`:`false`)}#w(e){let t=this.#m.find(t=>t.id===e)??{name:e,id:e,provider:void 0};this.#S(),t.name!==this.model&&(this.model=t.name),this.dispatchEvent(new CustomEvent(`model-change`,{detail:{model:t.name,provider:t.provider,id:t.id},bubbles:!0,composed:!0}))}#T(){this.#u?this.#D():this.#E()}#E(){this.#u||(this.#S(),this.#u=!0,this.#O(),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0))}#D(){this.#u&&(this.#u=!1,this.#O(),this.#l||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#O(){this.#o?.classList.toggle(`open`,this.#u),this.#i?.setAttribute(`aria-expanded`,this.#u?`true`:`false`)}#k(e){this.#D(),this.thinking=e,this.dispatchEvent(new CustomEvent(`thinking-change`,{detail:{thinking:e,label:On[e].label,accented:e===kn},bubbles:!0,composed:!0}))}});async function Vn(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(``)}async function Hn(e,t={}){let n=(e??``).trim().toLowerCase();if(n===``)return null;let r=await Vn(n),i=t.size??80,a=t.fallback??`mp`;return`https://www.gravatar.com/avatar/${r}?s=${i}&d=${encodeURIComponent(a)}`}var Un=T(`
|
|
1935
1935
|
:host { display: inline-flex; }
|
|
1936
1936
|
:host([hidden]) { display: none; }
|
|
1937
1937
|
|
|
@@ -2134,7 +2134,7 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
|
|
|
2134
2134
|
}
|
|
2135
2135
|
.glyph.is-press { transform: none; }
|
|
2136
2136
|
}
|
|
2137
|
-
`),
|
|
2137
|
+
`),A=18,Wn=72,Gn=`http://www.w3.org/2000/svg`,Kn=15,qn=.25;function Jn(e){let t=document.createElementNS(Gn,`svg`);t.setAttribute(`width`,`36`),t.setAttribute(`height`,`36`),t.setAttribute(`viewBox`,`0 0 36 36`),t.setAttribute(`fill`,`none`),t.setAttribute(`aria-hidden`,`true`);let n=2*Math.PI*Kn,r=e=>{let t=document.createElementNS(Gn,`circle`);return t.setAttribute(`cx`,`18`),t.setAttribute(`cy`,`18`),t.setAttribute(`r`,String(Kn)),t.setAttribute(`fill`,`none`),t.setAttribute(`stroke-width`,`2.5`),t.setAttribute(`stroke-linecap`,`round`),t.setAttribute(`class`,e),t};t.appendChild(r(`ring-track`));let i=r(`ring-arc`),a=e==null?qn:Math.max(0,Math.min(1,e));return i.setAttribute(`stroke-dasharray`,`${n*a} ${n}`),e!=null&&i.setAttribute(`transform`,`rotate(-90 18 18)`),t.appendChild(i),t}function Yn(e){return e===`tool`?`tool`:`thinking`}function Xn(e){if(e==null||e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(1,t)):null}S(`slicc-send-button`,class extends HTMLElement{static observedAttributes=[`disabled`,`busy`,`phase`,`progress`,`email`,`src`,`label`];#e;#t=null;#n=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Un]}connectedCallback(){this.#d()}attributeChangedCallback(){this.isConnected&&this.#d()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}get busy(){return this.hasAttribute(`busy`)}set busy(e){this.toggleAttribute(`busy`,!!e)}get phase(){return Yn(this.getAttribute(`phase`))}set phase(e){this.setAttribute(`phase`,Yn(e))}get progress(){return Xn(this.getAttribute(`progress`))}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,String(e))}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#r=()=>{if(!this.disabled){if(this.busy){this.dispatchEvent(new CustomEvent(`stop`,{bubbles:!0,composed:!0}));return}this.#l(),this.dispatchEvent(new CustomEvent(`send`,{bubbles:!0,composed:!0}))}};#i(){return this.#e.querySelector(`.glyph`)}#a=()=>{this.disabled||this.busy||this.#i()?.classList.add(`is-hover`)};#o=()=>{this.#i()?.classList.remove(`is-hover`,`is-press`)};#s=()=>{if(this.disabled||this.busy)return;let e=this.#i();e?.classList.add(`is-press`),e?.classList.remove(`is-hover`)};#c=()=>{this.#i()?.classList.remove(`is-press`)};#l(){let e=this.#e.querySelector(`.glyph`);e&&(e.classList.remove(`is-whoosh`),e.offsetWidth,e.classList.add(`is-whoosh`),e.addEventListener(`animationend`,()=>e.classList.remove(`is-whoosh`),{once:!0}))}#u(){let e=++this.#n;if(!this.#t)return;let t=t=>{if(e!==this.#n)return;let n=this.#t;if(n)if(n.querySelector(`.face`)?.remove(),t){let e=document.createElement(`img`);e.className=`face`,e.setAttribute(`part`,`face`),e.alt=``,e.src=t,n.prepend(e),n.classList.add(`has-face`)}else n.classList.remove(`has-face`)},n=this.src;if(n){t(n);return}let r=this.email;if(!r||r.trim()===``){t(null);return}t(null),Hn(r,{size:Wn}).then(t).catch(()=>t(null))}#d(){let e=this.busy,t=this.disabled,r=e&&this.phase===`tool`,i=this.label??(e?`Stop`:`Send`),a;if(r){let e=this.progress,t=e==null;a=w(`slot`,{name:`busy`},w(`span`,{class:`stop`,part:`stop`},n(`square`,{size:A})),w(`span`,{class:`spinner${t?` is-indeterminate`:``}`,part:`spinner`},Jn(e)))}else a=e?w(`slot`,{name:`busy`},w(`span`,{class:`stop`,part:`stop`},n(`square`,{size:A}),w(`span`,{class:`stop-fill`},n(`square`,{size:A})))):w(`slot`,null,w(`span`,{class:`glyph`,part:`glyph`},n(`arrow-up`,{size:A})));let o=w(`button`,{part:`button`,class:`send${e?` is-busy`:``}${r?` is-tool`:``}`,type:`button`,title:i,"aria-label":i,disabled:t||void 0},a);this.#e.replaceChildren(o),this.#t=o,this.#t.addEventListener(`click`,this.#r),this.#t.addEventListener(`pointerenter`,this.#a),this.#t.addEventListener(`pointerleave`,this.#o),this.#t.addEventListener(`pointerdown`,this.#s),this.#t.addEventListener(`pointerup`,this.#c),this.#u()}});var Zn=`
|
|
2138
2138
|
slicc-input-card {
|
|
2139
2139
|
display: block;
|
|
2140
2140
|
}
|
|
@@ -2188,7 +2188,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2188
2188
|
flex: 1;
|
|
2189
2189
|
min-width: 0;
|
|
2190
2190
|
}
|
|
2191
|
-
`,
|
|
2191
|
+
`,Qn=`slicc-input-card-style`;function $n(e){if(e.getElementById(Qn))return;let t=e.createElement(`style`);t.id=Qn,t.textContent=Zn,(e.head??e.documentElement).appendChild(t)}var er=`Ask sliccy, or describe a change…`;S(`slicc-input-card`,class extends HTMLElement{static observedAttributes=[`value`,`placeholder`,`suggestion`,`disabled`];#e;#t;#n;#r=!1;connectedCallback(){$n(this.ownerDocument),this.#i(),this.#a(),this.#u()}attributeChangedCallback(e,t,n){!this.#r||t===n||(this.#a(),e===`value`&&this.#u())}get value(){return this.#r?this.#t.value:this.getAttribute(`value`)??``}set value(e){let t=e??``;this.#r&&(this.#t.value=t,this.#u()),t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t)}get placeholder(){return this.getAttribute(`placeholder`)??er}set placeholder(e){e==null?this.removeAttribute(`placeholder`):this.setAttribute(`placeholder`,e)}get suggestion(){return this.getAttribute(`suggestion`)}set suggestion(e){e==null||e===``?this.removeAttribute(`suggestion`):this.setAttribute(`suggestion`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}focus(e){this.#i(),this.#t.focus(e)}clear(){this.value=``}#i(){if(this.#r)return;this.#r=!0;let e=this.ownerDocument,t=Array.from(this.children).filter(e=>e.getAttribute(`slot`)===`toolbar`);if(this.replaceChildren(),this.#e=e.createElement(`div`),this.#e.className=`slicc-input-card__card`,this.#e.setAttribute(`part`,`card`),this.#t=e.createElement(`textarea`),this.#t.className=`ta`,this.#t.setAttribute(`part`,`textarea`),this.#t.rows=1,this.#n=e.createElement(`div`),this.#n.className=`toolbar`,this.#n.setAttribute(`part`,`toolbar`),t.length>0)for(let e of t)this.#n.appendChild(e);else this.#n.append(w(`slicc-add-menu`),w(`slicc-send-button`));this.#e.append(this.#t,this.#n),this.appendChild(this.#e),this.#t.addEventListener(`input`,this.#o),this.#t.addEventListener(`keydown`,this.#s),this.#n.addEventListener(`send`,this.#c)}#a(){if(!this.#r)return;let e=this.#t;e.placeholder=this.suggestion??this.placeholder,e.disabled=this.disabled;let t=this.getAttribute(`value`)??``;e.value!==t&&(e.value=t)}#o=e=>{e.stopPropagation();let t=this.#t.value;t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t),this.#u(),this.dispatchEvent(new CustomEvent(`input`,{bubbles:!0,composed:!0,detail:{value:t}}))};#s=e=>{if(e.isComposing)return;if(e.key===`Enter`&&!e.shiftKey&&!e.altKey){e.preventDefault(),this.#l(void 0,e.ctrlKey||e.metaKey);return}if(e.key===`Tab`&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey){let t=this.suggestion;if(t&&this.#t.value===``){e.preventDefault(),this.removeAttribute(`suggestion`);let n=this.#t;n.value=t,n.setSelectionRange(t.length,t.length),n.dispatchEvent(new Event(`input`,{bubbles:!0}))}return}let t=this.#t,n=t.selectionStart===t.selectionEnd;e.key===`ArrowUp`&&n&&t.selectionStart===0?(e.preventDefault(),this.dispatchEvent(new CustomEvent(`history-up`,{bubbles:!0,composed:!0}))):e.key===`ArrowDown`&&n&&t.selectionStart===t.value.length&&this.dispatchEvent(new CustomEvent(`history-down`,{bubbles:!0,composed:!0}))};#c=e=>{e.stopPropagation(),this.#l()};submit(e){this.#i(),this.#l(e)}focusEnd(){if(!this.#r)return;let e=this.#t;e.focus();let t=e.value.length;e.setSelectionRange(t,t)}#l(e,t){if(this.disabled)return;let n=this.#t.value;n.trim()!==``&&(this.removeAttribute(`suggestion`),this.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:n,...e?{source:e}:{},...t?{steer:!0}:{}}})))}#u(){if(!this.#r)return;let e=this.#t;e.style.height=`auto`;let t=e.scrollHeight;e.style.height=`${Math.min(t,140)}px`,e.style.overflowY=t>140?`auto`:`hidden`}});var tr=T(`
|
|
2192
2192
|
:host{display:block;font-family:var(--ui);}
|
|
2193
2193
|
:host(:not([count])),:host([count="0"]),:host([count="-0"]){display:none;}
|
|
2194
2194
|
.wrap{display:flex;flex-direction:column;align-items:stretch;gap:6px;}
|
|
@@ -2209,7 +2209,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2209
2209
|
:host-context(body.dark) .dismiss:hover,:host-context(body.dark) .dismiss:focus-visible,
|
|
2210
2210
|
:host-context(.dark) .dismiss:hover,:host-context(.dark) .dismiss:focus-visible,
|
|
2211
2211
|
:host-context([data-theme="dark"]) .dismiss:hover,:host-context([data-theme="dark"]) .dismiss:focus-visible{background:color-mix(in srgb,#0a0a0a 14%,transparent);}
|
|
2212
|
-
`),
|
|
2212
|
+
`),nr=[{rot:0,x:0,y:0},{rot:-2,x:-3,y:-2},{rot:2,x:3,y:-4},{rot:-3,x:-5,y:-6},{rot:3,x:5,y:-8},{rot:-1,x:-2,y:-10},{rot:1,x:2,y:-12}];function rr(e){return nr[Math.min(e,nr.length-1)]??nr[0]}S(`slicc-queued-stack`,class extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[tr]}connectedCallback(){this.#i()}get count(){return this.#t.length}setMessages(e){this.#t=e.slice(),this.setAttribute(`count`,String(this.#t.length)),this.#i()}#n(e){this.dispatchEvent(new CustomEvent(`slicc-queued-remove`,{detail:{id:e},bubbles:!0,composed:!0}))}#r(e,t,r,i){let{rot:a,x:o,y:s}=rr(t),c=r?`none`:`translate(${o}px, ${s}px) rotate(${a}deg)`,l=`card${r?` is-front`:``}${t===0?``:t===1?` is-back`:` is-deep`}`,u=r?`card front`:`card`,d=`transform:${c};z-index:${i};`,f=[w(`span`,{class:`bubble`},e.text)];if(e.attachments&&e.attachments>0&&f.push(w(`span`,{class:`attach`},`+${e.attachments}`)),r){let t=w(`button`,{type:`button`,class:`dismiss`,part:`dismiss`,"aria-label":`Remove queued message`},n(`x`,{size:14}));t.addEventListener(`click`,t=>{t.stopPropagation(),this.#n(e.id)}),f.push(t)}return w(`div`,{class:l,part:u,style:d},...f)}#i(){if(this.#t.length===0){this.#e.replaceChildren();return}let e=this.#t.length,t=[];for(let n=e-1;n>=0;n--){let r=e-1-n,i=r===0,a=n+1,o=this.#t[n];o&&t.push(this.#r(o,r,i,a))}let r=w(`div`,{class:`stack`,part:`stack`},...t),i=w(`div`,{class:`wrap`},w(`span`,{class:`badge`,part:`badge`},n(`clock`,{size:11}),`${e} queued`),r);this.#e.replaceChildren(i)}});var ir=1e3;function ar(e,t){let n=t.longPressMs??1e3,r=t.modifierClickAsLongPress??!0,i=null,a=!1,o=()=>{t.onPressEnd?.()},s=()=>{i!==null&&(clearTimeout(i),i=null),o()},c=e=>{e.button===0&&(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(a=!1,s(),t.onPressStart?.(e),i=setTimeout(()=>{a=!0,o(),i=null,t.onLongPress()},n)))},l=()=>s(),u=()=>s(),d=()=>s(),f=()=>s(),p=e=>{if(a){a=!1,e.preventDefault();return}if((e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)&&r){e.preventDefault(),t.onLongPress();return}t.onShortClick(e)};return e.addEventListener(`mousedown`,c),e.addEventListener(`mouseup`,l),e.addEventListener(`mouseleave`,u),e.addEventListener(`blur`,d),e.addEventListener(`contextmenu`,f),e.addEventListener(`click`,p),{destroy:()=>{s(),e.removeEventListener(`mousedown`,c),e.removeEventListener(`mouseup`,l),e.removeEventListener(`mouseleave`,u),e.removeEventListener(`blur`,d),e.removeEventListener(`contextmenu`,f),e.removeEventListener(`click`,p)}}}var or=T(`
|
|
2213
2213
|
:host { display: inline-grid; }
|
|
2214
2214
|
:host([hidden]) { display: none; }
|
|
2215
2215
|
|
|
@@ -2291,7 +2291,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2291
2291
|
|
|
2292
2292
|
.glyph { display: grid; place-items: center; line-height: 1; }
|
|
2293
2293
|
.glyph svg { display: block; }
|
|
2294
|
-
`),
|
|
2294
|
+
`),sr=`square`,cr=18;S(`slicc-dock-item`,class extends HTMLElement{static observedAttributes=[`item-id`,`kind`,`hue`,`icon`,`tip`,`active`,`lit`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[or]}disconnectedCallback(){this.#t?.destroy(),this.#t=null}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get itemId(){return this.getAttribute(`item-id`)}set itemId(e){e==null?this.removeAttribute(`item-id`):this.setAttribute(`item-id`,e)}get kind(){return this.getAttribute(`kind`)===`sprinkle`?`sprinkle`:`tool`}set kind(e){this.setAttribute(`kind`,e===`sprinkle`?`sprinkle`:`tool`)}get hue(){return this.getAttribute(`hue`)}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get icon(){return this.getAttribute(`icon`)??sr}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get tip(){return this.getAttribute(`tip`)}set tip(e){e==null?this.removeAttribute(`tip`):this.setAttribute(`tip`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,!!e)}get lit(){return this.hasAttribute(`lit`)}set lit(e){this.toggleAttribute(`lit`,!!e)}#n(){let e=[`di`];this.kind===`sprinkle`&&e.push(`sp`),this.active&&e.push(`on`),this.lit&&e.push(`lit`);let t=this.tip,r=n(this.icon,{size:cr,part:`icon`}),i=t??this.itemId??`dock item`,a=w(`button`,{type:`button`,part:`button`,class:e.join(` `),"aria-label":i,"aria-pressed":this.active?`true`:`false`},w(`span`,{class:`glyph`,part:`glyph`},w(`slot`,null,r)),t?w(`span`,{class:`tip`,part:`tip`},t):null),o=this.hue;o&&a.style.setProperty(`--h`,o),this.#t?.destroy(),this.#t=ar(a,{onShortClick:this.#r,onLongPress:()=>this.#i(`longpress`)}),this.#e.replaceChildren(a)}#r=()=>{this.#i(this.active?`collapse`:`select`)};#i(e){this.dispatchEvent(new CustomEvent(e,{detail:{id:this.itemId},bubbles:!0,composed:!0}))}});var lr=[{id:`browser`,icon:`globe`,label:`Browser · CDP`,kind:`tool`},{id:`files`,icon:`folder`,label:`Files · VFS`,kind:`tool`},{id:`term`,icon:`square-terminal`,label:`Terminal`,kind:`tool`},{id:`memory`,icon:`brain`,label:`Memory`,kind:`tool`},{id:`monitor`,icon:`activity`,label:`Monitor`,kind:`tool`}],ur={id:`new`,icon:`plus`,label:`New sprinkle`,kind:`sprinkle`},dr=`
|
|
2295
2295
|
.slicc-dock {
|
|
2296
2296
|
flex: 0 0 48px;
|
|
2297
2297
|
box-sizing: border-box;
|
|
@@ -2312,7 +2312,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2312
2312
|
margin: 2px 0;
|
|
2313
2313
|
}
|
|
2314
2314
|
.slicc-dock .grow { flex: 1; }
|
|
2315
|
-
`,
|
|
2315
|
+
`,fr=`slicc-dock-style`;function pr(e){if(e.getElementById(fr))return;let t=e.createElement(`style`);t.id=fr,t.textContent=dr,(e.head??e.documentElement).appendChild(t)}function mr(e){return e===`sprinkle`?`sprinkle`:`tool`}S(`slicc-dock`,class extends HTMLElement{static get observedAttributes(){return[`active`,`system-tools`]}#e=[];#t=null;#n=null;#r=null;#i=!1;connectedCallback(){pr(this.ownerDocument),this.classList.add(`slicc-dock`),this.setAttribute(`part`,`rail`),this.setAttribute(`role`,`toolbar`),this.setAttribute(`aria-orientation`,`vertical`),this.#i||=(this.#a(),!0),this.#t||(this.#t=e=>this.#u(e),this.#n=e=>this.#d(e),this.#r=e=>this.#f(e),this.addEventListener(`select`,this.#t),this.addEventListener(`collapse`,this.#n),this.addEventListener(`longpress`,this.#r)),this.#c()}disconnectedCallback(){this.#t&&=(this.removeEventListener(`select`,this.#t),null),this.#n&&=(this.removeEventListener(`collapse`,this.#n),null),this.#r&&=(this.removeEventListener(`longpress`,this.#r),null)}attributeChangedCallback(e){this.#i&&(e===`active`?this.#l():e===`system-tools`&&this.#c())}get items(){return this.#e.map(e=>({...e}))}set items(e){this.#e=Array.isArray(e)?e.map(e=>({...e})):[],this.#i&&this.isConnected&&this.#c()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get systemTools(){return this.hasAttribute(`system-tools`)}set systemTools(e){this.toggleAttribute(`system-tools`,!!e)}selectItem(e){this.active=e,this.dispatchEvent(new CustomEvent(`slicc-dock-select`,{detail:{id:e,kind:this.#o(e)},bubbles:!0,composed:!0}))}clearActive(){this.active=null}collapse(){let e=this.active;this.active=null,e!=null&&this.dispatchEvent(new CustomEvent(`slicc-dock-collapse`,{detail:{id:e},bubbles:!0,composed:!0}))}#a(){let e=[...this.querySelectorAll(`slicc-dock-item`)];if(e.length===0)return;let t=[];for(let n of e){let e=mr(n.getAttribute(`kind`)),r=n.getAttribute(`item-id`)??n.dataset.t??n.getAttribute(`tip`)??``;e!==`tool`&&r!==`new`&&r!==``&&t.push({id:r,icon:n.getAttribute(`icon`)??void 0,label:n.getAttribute(`tip`)??void 0,kind:`sprinkle`,hue:n.getAttribute(`hue`)??void 0})}for(let t of e)t.remove();this.#e.length===0&&(this.#e=t)}#o(e){return lr.some(t=>t.id===e)?`tool`:e===ur.id?`sprinkle`:this.#e.find(t=>t.id===e)?.kind??`tool`}#s(e,t){let n=e.id,r=mr(e.kind),i=e.icon??``,a=e.label??n,o=t!=null&&t===n,s=e.hue;return w(`slicc-dock-item`,{"data-t":n,"item-id":n,kind:r,icon:i||!1,tip:a,hue:s||!1,active:o})}#c(){let e=this.active,t=[];for(let n of this.#e)mr(n.kind)===`sprinkle`&&t.push(this.#s(n,e));if(t.push(this.#s(ur,e)),t.push(w(`div`,{class:`grow`})),this.systemTools){t.push(w(`div`,{class:`div`}));for(let n of lr)t.push(this.#s(n,e))}this.replaceChildren(),C(this,t)}#l(){let e=this.active;for(let t of this.querySelectorAll(`slicc-dock-item`))t.toggleAttribute(`active`,t.dataset.t===e)}#u(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.selectItem(t))}#d(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.active!==t&&(this.active=t),this.collapse())}#f(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.active!==t&&this.selectItem(t),this.dispatchEvent(new CustomEvent(`slicc-dock-longpress`,{detail:{id:t,kind:this.#o(t)},bubbles:!0,composed:!0})))}#p(e){let t=e.detail;if(t&&typeof t.id==`string`)return t.id;let n=e.target?.closest(`slicc-dock-item`);return n&&this.contains(n)?n.dataset.t??null:null}});var hr=T(`
|
|
2316
2316
|
:host { display: none; }
|
|
2317
2317
|
:host([open]) { display: block; }
|
|
2318
2318
|
.overlay {
|
|
@@ -2399,7 +2399,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2399
2399
|
color: rgba(255,255,255,.7); font-family: var(--ui); font-size: 14px;
|
|
2400
2400
|
}
|
|
2401
2401
|
@media (prefers-reduced-motion: reduce) { .overlay, .card { transition: none; } }
|
|
2402
|
-
`),
|
|
2402
|
+
`),gr=`Open tabs`;S(`slicc-tab-overlay`,class extends HTMLElement{static observedAttributes=[`open`,`heading`];#e;#t=[];#n=null;#r=null;#i=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#u(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[hr]}connectedCallback(){this.#s(),this.#c()}disconnectedCallback(){document.removeEventListener(`keydown`,this.#i,!0)}attributeChangedCallback(e){this.isConnected&&(e===`open`?this.#c():this.#s())}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get heading(){return this.getAttribute(`heading`)??gr}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tabs(){return this.#t.map(e=>({...e}))}set tabs(e){this.#t=Array.isArray(e)?e.map(e=>({...e})):[],this.isConnected&&this.#s()}show(){this.open||=!0}hide(){this.open&&this.#u(`api`)}#a(){let e=w(`button`,{class:`close`,part:`close`,type:`button`,"aria-label":`Close tabs overlay`},n(`x`,{size:18}));return e.addEventListener(`click`,()=>this.#u(`close-button`)),e}#o(e){let t=e.title??e.id,r=e.screenshot?w(`img`,{class:`shot`,part:`shot`,src:e.screenshot,alt:t,loading:`lazy`}):w(`div`,{class:`shot ph`,part:`shot`},n(`globe`,{size:28})),i=w(`button`,{class:`x`,part:`card-close`,type:`button`,"aria-label":`Close ${t}`},n(`x`,{size:14}));i.addEventListener(`click`,t=>{t.stopPropagation(),this.#l(`tab-close`,e.id)});let a=w(`div`,{class:`label`},w(`span`,{class:`name`,part:`title`},t),e.url?w(`span`,{class:`url`},e.url):null),o=w(`div`,{class:e.active?`card on`:`card`,part:`card`,role:`button`,tabindex:`0`,"data-tab-id":e.id,"aria-label":t,"aria-current":e.active?`true`:!1},r,w(`div`,{class:`meta`},a,i));return o.addEventListener(`click`,()=>this.#l(`tab-activate`,e.id)),o.addEventListener(`keydown`,t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),this.#l(`tab-activate`,e.id))}),o}#s(){let e=w(`div`,{class:`bar`,part:`bar`},w(`span`,{class:`title`},this.heading),w(`span`,{class:`count`},String(this.#t.length)),w(`span`,{class:`grow`}),this.#a()),t;if(this.#t.length===0)t=w(`div`,{class:`empty`},`No open tabs.`);else{t=w(`div`,{class:`grid`,part:`grid`,role:`list`});for(let e of this.#t)t.appendChild(this.#o(e))}this.#n=w(`div`,{class:`overlay`,part:`overlay`},e,t),this.#n.addEventListener(`mousedown`,e=>{e.target===this.#n&&this.#u(`backdrop`)}),this.#e.replaceChildren(this.#n)}#c(){this.open?(this.#r=this.getRootNode().activeElement,document.addEventListener(`keydown`,this.#i,!0),requestAnimationFrame(()=>this.#n?.querySelector(`.close`)?.focus())):(document.removeEventListener(`keydown`,this.#i,!0),this.#r?.focus?.(),this.#r=null)}#l(e,t){this.dispatchEvent(new CustomEvent(e,{detail:{id:t},bubbles:!0,composed:!0}))}#u(e){this.open=!1,this.dispatchEvent(new CustomEvent(`overlay-close`,{detail:{reason:e},bubbles:!0,composed:!0}))}});var j=`#3b6cb2`,_r=`
|
|
2403
2403
|
.slicc-freezer {
|
|
2404
2404
|
position: fixed;
|
|
2405
2405
|
left: 0;
|
|
@@ -2501,12 +2501,12 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2501
2501
|
|
|
2502
2502
|
/* ice-blue accent while a freezer context is active (prototype _ctxAccent) —
|
|
2503
2503
|
tints the toggle + the new-chat icon; cards keep their snow palette. */
|
|
2504
|
-
.slicc-freezer[ctx] .fztgl { color: var(--fz-ctx, ${
|
|
2504
|
+
.slicc-freezer[ctx] .fztgl { color: var(--fz-ctx, ${j}); border-color: color-mix(in srgb, var(--fz-ctx, ${j}) 40%, var(--line)); }
|
|
2505
2505
|
.slicc-freezer[ctx] ::part(new-icon),
|
|
2506
2506
|
.slicc-freezer[ctx] slicc-freezer-new::part(new-icon) {
|
|
2507
|
-
background: color-mix(in srgb, var(--fz-ctx, ${
|
|
2508
|
-
border-color: color-mix(in srgb, var(--fz-ctx, ${
|
|
2509
|
-
color: var(--fz-ctx, ${
|
|
2507
|
+
background: color-mix(in srgb, var(--fz-ctx, ${j}) 14%, var(--canvas));
|
|
2508
|
+
border-color: color-mix(in srgb, var(--fz-ctx, ${j}) 40%, var(--line));
|
|
2509
|
+
color: var(--fz-ctx, ${j});
|
|
2510
2510
|
}
|
|
2511
2511
|
|
|
2512
2512
|
/* match-hidden: search filtered a session row out (only meaningful when open,
|
|
@@ -2514,7 +2514,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2514
2514
|
prototype .fzcard row. */
|
|
2515
2515
|
.slicc-freezer[open] slicc-freezer-card.match-hidden,
|
|
2516
2516
|
.slicc-freezer[open] .fzcard.match-hidden { display: none; }
|
|
2517
|
-
`,
|
|
2517
|
+
`,vr=`slicc-freezer-style`;function yr(e){if(e.getElementById(vr))return;let t=e.createElement(`style`);t.id=vr,t.textContent=_r,(e.head??e.documentElement).appendChild(t)}var br=`http://www.w3.org/2000/svg`;function xr(){let e=document.createElementNS(br,`svg`);for(let[t,n]of[[`width`,`14`],[`height`,`14`],[`viewBox`,`0 0 16 16`],[`fill`,`none`],[`stroke`,`currentColor`],[`stroke-width`,`1.6`],[`stroke-linecap`,`round`],[`stroke-linejoin`,`round`],[`aria-hidden`,`true`]])e.setAttribute(t,n);let t=document.createElementNS(br,`rect`);for(let[e,n]of[[`x`,`2.5`],[`y`,`3.5`],[`width`,`11`],[`height`,`9`],[`rx`,`1.5`]])t.setAttribute(e,n);let n=document.createElementNS(br,`line`);for(let[e,t]of[[`x1`,`6`],[`y1`,`3.5`],[`x2`,`6`],[`y2`,`12.5`]])n.setAttribute(e,t);let r=document.createElementNS(br,`polyline`);return r.setAttribute(`points`,`9,6.5 10.5,8 9,9.5`),e.append(t,n,r),e}S(`slicc-freezer`,class extends HTMLElement{static observedAttributes=[`open`,`ctx`,`search-placeholder`];#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){yr(this.ownerDocument),this.classList.add(`slicc-freezer`),this.setAttribute(`part`,`freezer`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Past sessions (freezer)`),this.#s(),this.#l(),this.#u()}disconnectedCallback(){this.#a&&this.#t&&(this.#t.removeEventListener(`click`,this.#a),this.#a=null),this.#o&&this.#n&&(this.#n.removeEventListener(`input`,this.#o),this.#o=null)}attributeChangedCallback(e,t,n){this.#i&&(e===`open`?(this.#l(),this.#u()):e===`search-placeholder`&&(this.#n.placeholder=n??`search past sessions`))}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get ctx(){return this.hasAttribute(`ctx`)}set ctx(e){this.toggleAttribute(`ctx`,e)}get searchPlaceholder(){return this.getAttribute(`search-placeholder`)??`search past sessions`}set searchPlaceholder(e){e==null?this.removeAttribute(`search-placeholder`):this.setAttribute(`search-placeholder`,e)}get query(){return this.#i?this.#n.value:``}set query(e){this.#s(),this.#n.value=e,this.#d()}get rail(){return this.#s(),this.#r}toggle(e){let t=e??!this.open;t===this.open&&this.#l(),this.open=t,this.#l(),this.#u(),this.dispatchEvent(new CustomEvent(`freezer-toggle`,{detail:{open:t},bubbles:!0,composed:!0}))}append(...e){this.#s(),this.#r.append(...e),this.#u()}#s(){if(this.#i)return;let e=this.querySelector(`:scope > .fzh`),t=this.querySelector(`:scope > .fzrail`);if(e instanceof HTMLElement&&t instanceof HTMLElement){this.#c(e,t);return}let n=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&(e.classList.contains(`fzh`)||e.classList.contains(`fzrail`)))),r=this.ownerDocument,i=r.createElement(`div`);i.className=`fzh`,i.setAttribute(`part`,`header`);let a=r.createElement(`button`);a.className=`fztgl`,a.type=`button`,a.setAttribute(`part`,`toggle`),a.setAttribute(`aria-label`,`Toggle freezer`),a.append(xr());let o=r.createElement(`input`);o.className=`fzsearch`,o.type=`text`,o.setAttribute(`part`,`search`),o.placeholder=this.searchPlaceholder,o.setAttribute(`aria-label`,`Search past sessions`),i.append(a,o);let s=r.createElement(`div`);s.className=`fzrail`,s.setAttribute(`part`,`rail`);for(let e of n)s.appendChild(e);this.replaceChildren(i,s),this.#c(i,s)}#c(e,t){this.#i=!0,this.#e=e,this.#r=t;let n=e.querySelector(`.fztgl`),r=e.querySelector(`.fzsearch`);n&&(this.#t=n),r&&(this.#n=r),this.#t&&!this.#a&&(this.#a=()=>this.toggle(),this.#t.addEventListener(`click`,this.#a)),this.#n&&!this.#o&&(this.#o=()=>this.#d(),this.#n.addEventListener(`input`,this.#o))}#l(){if(!this.#t)return;let e=this.open;this.#t.setAttribute(`aria-expanded`,e?`true`:`false`),this.#t.title=e?`Collapse freezer`:`Expand freezer`}#u(){if(!this.#i)return;let e=this.open,t=this.#r.querySelectorAll(`slicc-freezer-card, slicc-freezer-new`);for(let n of t)n.toggleAttribute(`expanded`,e)}#d(){let e=this.#n.value.trim().toLowerCase(),t=this.#r.querySelectorAll(`slicc-freezer-card, .fzcard`);for(let n of t){let t=(n.textContent??``).toLowerCase();n.classList.toggle(`match-hidden`,e.length>0&&!t.includes(e))}}});var Sr=14,Cr=T(`
|
|
2518
2518
|
:host {
|
|
2519
2519
|
display: inline-grid;
|
|
2520
2520
|
place-items: center;
|
|
@@ -2550,7 +2550,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2550
2550
|
nothing is slotted */
|
|
2551
2551
|
::slotted(*), .ic { line-height: 1; }
|
|
2552
2552
|
.ic { display: block; }
|
|
2553
|
-
`);S(`slicc-snowflake`,class extends HTMLElement{static observedAttributes=[`thawed`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
2553
|
+
`);S(`slicc-snowflake`,class extends HTMLElement{static observedAttributes=[`thawed`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Cr];let e=w(`span`,{class:`snow`,part:`badge`},w(`slot`,null,n(`snowflake`,{size:Sr,part:`glyph`,class:`ic`})));this.#e.replaceChildren(e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}});var wr=`
|
|
2554
2554
|
slicc-freezer-card {
|
|
2555
2555
|
position: relative;
|
|
2556
2556
|
display: flex;
|
|
@@ -2643,7 +2643,7 @@ slicc-freezer-card .slicc-fzcard__meta {
|
|
|
2643
2643
|
slicc-freezer-card[thawed] {
|
|
2644
2644
|
background: color-mix(in srgb, var(--rose) 12%, transparent);
|
|
2645
2645
|
}
|
|
2646
|
-
`,
|
|
2646
|
+
`,Tr=`slicc-freezer-card-style`;function Er(e){if(e.getElementById(Tr))return;let t=e.createElement(`style`);t.id=Tr,t.textContent=wr,(e.head??e.documentElement).appendChild(t)}var Dr=1400,Or=14;S(`slicc-freezer-card`,class extends HTMLElement{static observedAttributes=[`title`,`meta`,`slug`,`icon`,`thawed`];#e;#t;#n;#r;#i=null;#a=null;#o=!1;#s=null;#c=()=>this.#u();#l=()=>{if(!this.#i)return;let e=this.getBoundingClientRect();this.#i.style.setProperty(`--tip-x`,`${e.right+8}px`),this.#i.style.setProperty(`--tip-y`,`${e.top+e.height/2}px`)};connectedCallback(){Er(this.ownerDocument),this.#d(),this.#f()}disconnectedCallback(){this.removeEventListener(`click`,this.#c),this.removeEventListener(`pointerenter`,this.#l),this.removeEventListener(`focusin`,this.#l),this.#s!=null&&(clearTimeout(this.#s),this.#s=null)}attributeChangedCallback(e,t,n){t===n||!this.#o||(e===`thawed`?this.#e.toggleAttribute(`thawed`,n!==null):e===`icon`?this.#p():this.#f())}get title(){return this.getAttribute(`title`)??``}set title(e){e==null?this.removeAttribute(`title`):this.setAttribute(`title`,e)}get meta(){return this.getAttribute(`meta`)??``}set meta(e){e==null?this.removeAttribute(`meta`):this.setAttribute(`meta`,e)}get slug(){return this.getAttribute(`slug`)??``}set slug(e){e==null?this.removeAttribute(`slug`):this.setAttribute(`slug`,e)}get icon(){return this.getAttribute(`icon`)}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){this.toggleAttribute(`hidden`,e)}get badge(){return this.#d(),this.#e}#u(){this.dispatchEvent(new CustomEvent(`freezer-card-select`,{bubbles:!0,composed:!0,detail:{slug:this.slug}})),this.flashThaw()}flashThaw(e=Dr){this.#s!=null&&clearTimeout(this.#s),this.thawed=!0,this.#s=setTimeout(()=>{this.thawed=!1,this.#s=null},e)}#d(){if(this.#o)return;this.#o=!0;let e=this.querySelector(`:scope > .slicc-fzcard__text`);if(e instanceof HTMLElement){this.#t=e,this.#n=e.querySelector(`.slicc-fzcard__title`),this.#r=e.querySelector(`.slicc-fzcard__meta`),this.#e=this.querySelector(`:scope > slicc-snowflake`),this.#i=this.querySelector(`:scope > .slicc-fzcard__tip`),this.addEventListener(`click`,this.#c),this.addEventListener(`pointerenter`,this.#l),this.addEventListener(`focusin`,this.#l);return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`slicc-snowflake`),this.#e.setAttribute(`part`,`badge`),this.#n=w(`div`,{class:`slicc-fzcard__title`,part:`title`}),this.#r=w(`div`,{class:`slicc-fzcard__meta`,part:`meta`}),this.#t=w(`div`,{class:`slicc-fzcard__text`,part:`text`},this.#n,this.#r);for(let e of t)this.#n.appendChild(e);this.#i=w(`span`,{class:`slicc-fzcard__tip`,part:`tip`,"aria-hidden":`true`}),this.replaceChildren(this.#e,this.#t,this.#i),this.addEventListener(`click`,this.#c),this.addEventListener(`pointerenter`,this.#l),this.addEventListener(`focusin`,this.#l)}#f(){if(!this.#o)return;let e=this.getAttribute(`title`);e!=null&&(this.#n.textContent=e),this.#r.textContent=this.meta,this.#i&&(this.#i.textContent=e??(this.#n.textContent||``)),this.#e.toggleAttribute(`thawed`,this.thawed),this.#p()}#p(){if(!this.#o)return;let e=this.getAttribute(`icon`);if(e){let t=n(e,{size:Or,class:`ic`,part:`icon`});this.#a?this.#a.replaceWith(t):this.#e.appendChild(t),this.#a=t}else this.#a&&=(this.#a.remove(),null)}});var kr=`square-pen`,Ar=`loader-circle`,jr=16,Mr=`New chat`,Nr=350,Pr=[[`save`,`archive`,`Save & start new`],[`skip`,`fast-forward`,`New chat — skip memory`],[`erase`,`trash-2`,`Erase & start new`]],Fr=T(`
|
|
2647
2647
|
:host { display: block; }
|
|
2648
2648
|
:host([hidden]) { display: none; }
|
|
2649
2649
|
*{ box-sizing: border-box; }
|
|
@@ -2788,18 +2788,18 @@ slicc-freezer-card[thawed] {
|
|
|
2788
2788
|
.fznew, .nlbl { transition: none; }
|
|
2789
2789
|
.fznew-spinner svg { animation: none; }
|
|
2790
2790
|
}
|
|
2791
|
-
`);S(`slicc-freezer-new`,class extends HTMLElement{static observedAttributes=[`expanded`,`label`,`busy`,`progress`,`no-skip`];#e;#t=null;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
2791
|
+
`);S(`slicc-freezer-new`,class extends HTMLElement{static observedAttributes=[`expanded`,`label`,`busy`,`progress`,`no-skip`];#e;#t=null;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Fr]}connectedCallback(){this.#a()}disconnectedCallback(){this.#n?.destroy(),this.#n=null,this.#c()}attributeChangedCallback(e){e===`progress`&&this.#i()||this.isConnected&&this.#a()}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}get label(){return this.getAttribute(`label`)??Mr}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get noSkip(){return this.hasAttribute(`no-skip`)}set noSkip(e){this.toggleAttribute(`no-skip`,e)}get busy(){return this.hasAttribute(`busy`)}set busy(e){this.toggleAttribute(`busy`,e)}get progress(){let e=this.getAttribute(`progress`);if(e==null)return null;let t=Number.parseFloat(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):null}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,String(Math.min(1,Math.max(0,e))))}#i(){let e=this.#e.querySelector(`.fznew-ring`);return!e||!this.busy||!this.hasAttribute(`progress`)?!1:(e.style.setProperty(`--fznew-progress`,String(this.progress??0)),!0)}#a(){let e=this.label,t=this.busy,r=t&&this.hasAttribute(`progress`),i=w(`span`,{class:`nico`,part:`badge`},t?w(`span`,{class:`fznew-spinner`,part:`spinner`},r?w(`span`,{class:`fznew-ring`,part:`ring`,style:`--fznew-progress:${this.progress??0}`}):null,n(Ar,{size:jr,part:`icon`})):w(`slot`,{name:`icon`},n(kr,{size:jr,part:`icon`}))),a=w(`span`,{class:`nlbl`,part:`label`},w(`slot`,null,e)),o=w(`button`,{class:`fznew`,part:`button`,type:`button`,"aria-label":e,title:e,"aria-busy":t?`true`:void 0},i,a);this.#t=o,this.#s(o),this.#e.replaceChildren(o,this.#o())}#o(){let e=w(`div`,{class:`fznew-options`,part:`options`}),t=this.noSkip?Pr.filter(([e])=>e!==`skip`):Pr;for(let[r,i,a]of t){let t=w(`button`,{class:`fznew-opt fznew-opt--${r}`,part:`option-${r}`,type:`button`},n(i,{size:13}),w(`span`,{class:`fznew-opt__text`},a));t.addEventListener(`click`,()=>this.#l(r)),e.appendChild(t)}return e}#s(e){this.#n?.destroy(),this.#c(),this.#n=ar(e,{onLongPress:()=>{if(this.#r!==null){this.#c(),this.#l(`skip`);return}this.#l(`erase`)},onShortClick:()=>{if(this.noSkip){this.#l(`save`);return}if(this.#r!==null){this.#c(),this.#l(`skip`);return}this.#r=setTimeout(()=>{this.#r=null,this.#l(`save`)},Nr)}})}#c(){this.#r!==null&&(clearTimeout(this.#r),this.#r=null)}#l(e){e===`save`&&(this.busy=!0),this.dispatchEvent(new CustomEvent(`new-chat-${e}`,{bubbles:!0,composed:!0}))}});var Ir=`attribute vec2 a_pos; void main(){ gl_Position = vec4(a_pos,0.0,1.0); }`,Lr=`precision highp float;
|
|
2792
2792
|
uniform vec2 u_res; uniform float u_time; uniform float u_energy;
|
|
2793
2793
|
uniform vec2 u_center; uniform vec3 u_evt; uniform float u_freeze; uniform float u_dark;
|
|
2794
2794
|
uniform float u_falloff; uniform float u_life; uniform vec3 u_tint; uniform float u_scroll;
|
|
2795
2795
|
uniform float u_brightness; uniform float u_contrast; uniform float u_noise; uniform float u_blur;
|
|
2796
|
-
vec3 themeBg(){ return mix(vec3(0.97,0.95,0.89), vec3(0.09,0.08,0.06), u_dark); }`,
|
|
2796
|
+
vec3 themeBg(){ return mix(vec3(0.97,0.95,0.89), vec3(0.09,0.08,0.06), u_dark); }`,Rr=`
|
|
2797
2797
|
float hash21(vec2 p){ p=fract(p*vec2(123.34,456.21)); p+=dot(p,p+45.32); return fract(p.x*p.y); }
|
|
2798
2798
|
float vnoise(vec2 p){ vec2 i=floor(p),f=fract(p);
|
|
2799
2799
|
float a=hash21(i),b=hash21(i+vec2(1.,0.)),c=hash21(i+vec2(0.,1.)),d=hash21(i+vec2(1.,1.));
|
|
2800
2800
|
vec2 u=f*f*(3.-2.*f); return mix(mix(a,b,u.x),mix(c,d,u.x),u.y); }
|
|
2801
2801
|
float fbm(vec2 p){ float v=0.,a=0.5; for(int i=0;i<5;i++){ v+=a*vnoise(p); p=p*2.02+vec2(7.1,3.7); a*=0.5;} return v; }
|
|
2802
|
-
vec2 warp(vec2 p, float t){ float a=fbm(p+vec2(0.0,1.7)+t*0.10); float b=fbm(p+vec2(5.2,1.3)-t*0.08); return p+0.85*vec2(a,b); }`,
|
|
2802
|
+
vec2 warp(vec2 p, float t){ float a=fbm(p+vec2(0.0,1.7)+t*0.10); float b=fbm(p+vec2(5.2,1.3)-t*0.08); return p+0.85*vec2(a,b); }`,zr=`${Lr}${Rr}
|
|
2803
2803
|
vec3 pal(float t){ vec3 strawberry=vec3(1.0,0.45,0.62); vec3 vanilla=vec3(1.0,0.95,0.82);
|
|
2804
2804
|
vec3 pistachio=vec3(0.60,0.86,0.52);
|
|
2805
2805
|
vec3 col=mix(strawberry,vanilla,smoothstep(0.0,0.5,t)); col=mix(col,pistachio,smoothstep(0.5,1.0,t)); return col; }
|
|
@@ -2818,7 +2818,7 @@ void main(){
|
|
|
2818
2818
|
ice*=0.95+0.08*sin(u_time*0.4); float mask=smoothstep(0.62,0.0,r);
|
|
2819
2819
|
vec3 col=mix(bg,ice,clamp(mask,0.0,1.0)*0.80); col+=ice*mask*hl*0.12;
|
|
2820
2820
|
gl_FragColor=vec4(col,1.0);
|
|
2821
|
-
}`,
|
|
2821
|
+
}`,Br=`${Lr}${Rr}
|
|
2822
2822
|
/* Inside-of-a-freezer ground: icy WHITE in light mode (never the warm theme
|
|
2823
2823
|
canvas — blue-on-beige read as sand, not frost), cold blue-black in dark. */
|
|
2824
2824
|
vec3 freezerBg(){ return mix(vec3(0.965,0.98,1.0), vec3(0.05,0.08,0.13), u_dark); }
|
|
@@ -2845,7 +2845,7 @@ void main(){
|
|
|
2845
2845
|
deviation budget the cone glass uses. */
|
|
2846
2846
|
col=mix(freezerBg(),col,0.22);
|
|
2847
2847
|
gl_FragColor=vec4(col,1.0);
|
|
2848
|
-
}`,
|
|
2848
|
+
}`,Vr=`${Lr}${Rr}
|
|
2849
2849
|
uniform float u_speed;
|
|
2850
2850
|
vec2 sugarHash(vec2 p){ p=vec2(dot(p,vec2(127.1,311.7)),dot(p,vec2(269.5,183.3))); return fract(sin(p)*43758.5453123); }
|
|
2851
2851
|
vec3 sugarVoronoi(vec2 p,float t){
|
|
@@ -2924,20 +2924,20 @@ void main(){
|
|
|
2924
2924
|
col+=u_noise*grain; col=(col-0.5)*u_contrast+0.5; col*=u_brightness; col=clamp(col,0.0,1.0);
|
|
2925
2925
|
col=clamp(col,max(bg-vec3(0.20),vec3(0.0)),min(bg+vec3(0.20),vec3(1.0)));
|
|
2926
2926
|
gl_FragColor=vec4(col,1.0);
|
|
2927
|
-
}`,
|
|
2927
|
+
}`,M={caramel:{mode:`cone`,tint:`#d08a3c`,brightness:1.1,contrast:1.1,noise:.025,blur:.14,coverage:.28,speed:.0625},"caramel-soft":{mode:`cone`,tint:`#d08a3c`,brightness:1.2,contrast:.75,noise:.025,blur:.14,coverage:.28,speed:1},frosted:{mode:`cone`,tint:`#ead9bd`,brightness:1,contrast:.55,noise:.005,blur:.9,coverage:.08,speed:1},brittle:{mode:`cone`,tint:`#ffd089`,brightness:.96,contrast:1.2,noise:.055,blur:.02,coverage:.68,speed:1},"waffle-glass":{mode:`cone`,tint:`#d3a15f`,brightness:1,contrast:.9,noise:.02,blur:.08,coverage:.9,speed:1}},Hr={cone:Vr,scoop:zr,freezer:Br},Ur=new Set([`cone`,`scoop`,`freezer`]),Wr={cone:`radial-gradient(120% 120% at 35% 45%, color-mix(in srgb,#d08a3c 20%,var(--bg)) 0%, var(--bg) 70%)`,scoop:`radial-gradient(120% 120% at 40% 50%, color-mix(in srgb,#ff9bc0 40%,var(--bg)) 0%, var(--bg) 62%)`,freezer:`radial-gradient(120% 120% at 0% 100%, color-mix(in srgb,#7fb0e6 55%,var(--bg)) 0%, var(--bg) 70%)`},Gr=T(`
|
|
2928
2928
|
:host { position: relative; display: block; pointer-events: none; }
|
|
2929
2929
|
.canvas, .fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
|
|
2930
2930
|
.fallback { display: none; }
|
|
2931
2931
|
:host([no-webgl]) .canvas { display: none; }
|
|
2932
|
-
:host([no-webgl]) .fallback { display: block; }`),
|
|
2932
|
+
:host([no-webgl]) .fallback { display: block; }`),Kr=2,qr=.35,Jr=[`u_res`,`u_scroll`,`u_time`,`u_energy`,`u_center`,`u_evt`,`u_freeze`,`u_dark`,`u_falloff`,`u_life`,`u_tint`,`u_brightness`,`u_contrast`,`u_noise`,`u_blur`,`u_speed`];function N(e,t,n,r){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):r}function Yr(e,t){if(!e||typeof getComputedStyle!=`function`)return t;let n=document.createElement(`span`);n.style.color=e,n.style.display=`none`,document.body.appendChild(n);let r=getComputedStyle(n).color;n.remove();let i=r.match(/[\d.]+/g)?.map(Number);return!i||i.length<3?t:[i[0]/255,i[1]/255,i[2]/255]}var Xr=class extends HTMLElement{static observedAttributes=[`mode`,`tint`,`coverage`,`intensity`,`scroll`,`brightness`,`contrast`,`noise`,`blur`,`speed`];#e;#t=null;#n=null;#r=null;#i={};#a=null;#o={};#s=-1;#c=0;#l=0;#u=0;#d=null;#f=!1;#p=[.816,.541,.235];#m=[.957,.247,.369];#h=0;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Gr];let e=w(`canvas`,{class:`canvas`,part:`canvas`}),t=w(`div`,{class:`fallback`,part:`fallback`,"aria-hidden":`true`});this.#e.replaceChildren(e,t),this.#t=e}connectedCallback(){if(this.#f=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,this.#S(),!this.#k()){this.setAttribute(`no-webgl`,``);return}this.removeAttribute(`no-webgl`),typeof ResizeObserver<`u`&&(this.#d=new ResizeObserver(()=>this.#C()),this.#d.observe(this)),this.#w(),this.#T(),this.#l=performance.now()/1e3,this.#f?this.#F():this.#I()}disconnectedCallback(){this.#L(),this.#d?.disconnect(),this.#d=null,this.#g?.disconnect(),this.#g=null,this.#_&&this.#v&&this.#_.removeEventListener(`change`,this.#v),this.#_=null,this.#v=null,this.#R()}attributeChangedCallback(e){if(this.isConnected){if((e===`tint`||e===`mode`)&&this.#w(),e===`mode`&&this.#n&&this.mode!==this.#y&&this.#O()){this.#F(),this.#S();return}this.#S(),this.#C()}}get mode(){let e=this.getAttribute(`mode`);return e&&Ur.has(e)?e:`cone`}set mode(e){this.setAttribute(`mode`,e)}get coverage(){let e=this.mode===`cone`?M.caramel.coverage:.66;return N(Number.parseFloat(this.getAttribute(`coverage`)??``),0,1,e)}set coverage(e){this.setAttribute(`coverage`,String(e))}get intensity(){return N(Number.parseFloat(this.getAttribute(`intensity`)??``),0,4,1)}set intensity(e){this.setAttribute(`intensity`,String(e))}get scrollOffset(){let e=Number.parseFloat(this.getAttribute(`scroll`)??``);return Number.isFinite(e)?e:0}set scrollOffset(e){this.setAttribute(`scroll`,String(e))}get brightness(){return N(Number.parseFloat(this.getAttribute(`brightness`)??``),.5,1.5,M.caramel.brightness)}set brightness(e){this.setAttribute(`brightness`,String(e))}get contrast(){return N(Number.parseFloat(this.getAttribute(`contrast`)??``),.5,2,M.caramel.contrast)}set contrast(e){this.setAttribute(`contrast`,String(e))}get noise(){return N(Number.parseFloat(this.getAttribute(`noise`)??``),0,.3,M.caramel.noise)}set noise(e){this.setAttribute(`noise`,String(e))}get blurAmount(){return N(Number.parseFloat(this.getAttribute(`blur`)??``),0,1,M.caramel.blur)}set blurAmount(e){this.setAttribute(`blur`,String(e))}get speed(){return N(Number.parseFloat(this.getAttribute(`speed`)??``),0,2,M.caramel.speed)}set speed(e){this.setAttribute(`speed`,String(e))}get noWebgl(){return this.hasAttribute(`no-webgl`)}pulse(e=1){this.#u=Math.min(1.4,this.#u+e),this.#f&&this.#F()}#S(){let e=this.#e.querySelector(`.fallback`);e&&(e.style.background=Wr[this.mode])}#C(){this.#f&&this.#n&&this.#F()}#w(){let e=this.getAttribute(`tint`)??(this.mode===`cone`?M.caramel.tint:``);this.#p=Yr(e,[.545,.361,.965]),this.#m=Yr(e,[.957,.247,.369]),this.#h=this.#P()}#T(){let e=()=>{this.#w(),this.#C()};if(typeof MutationObserver<`u`){this.#g=new MutationObserver(e);for(let e of[document.documentElement,document.body])e&&this.#g.observe(e,{attributes:!0,attributeFilter:[`class`,`data-theme`]})}typeof matchMedia==`function`&&(this.#_=matchMedia(`(prefers-color-scheme: dark)`),this.#v=e,this.#_.addEventListener(`change`,this.#v))}#E(e,t,n){let r=e.createShader(t);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(e.deleteShader(r),null)):null}#D(e){let t=this.#n;if(!t)return null;let n=this.#E(t,t.VERTEX_SHADER,Ir),r=this.#E(t,t.FRAGMENT_SHADER,Hr[e]);if(!n||!r)return n&&t.deleteShader(n),r&&t.deleteShader(r),null;let i=t.createProgram();if(!i)return t.deleteShader(n),t.deleteShader(r),null;if(t.attachShader(i,n),t.attachShader(i,r),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))return t.deleteProgram(i),t.deleteShader(n),t.deleteShader(r),null;let a=t.getAttribLocation(i,`a_pos`),o={};for(let e of Jr)o[e]=t.getUniformLocation(i,e);return{program:i,vs:n,fs:r,aPos:a,loc:o}}#O(){let e=this.#n;if(!e)return!1;let t=this.mode,n=this.#i[t];if(!n){let e=this.#D(t);if(!e)return!1;this.#i[t]=e,n=e}return this.#r=n.program,this.#s=n.aPos,this.#o=n.loc,e.useProgram(n.program),this.#y=t,!0}#k(){let e=this.#t;if(!e)return!1;let t={premultipliedAlpha:!0,alpha:!0,antialias:!0},n=null;try{n=e.getContext(`webgl`,t)??e.getContext(`experimental-webgl`,t)}catch{n=null}return n?(this.#n=n,this.#j(e),this.#A()?!0:(this.#R(),!1)):!1}#A(){let e=this.#n;if(!e||!this.#O())return!1;let t=e.createBuffer();return t?(this.#a=t,e.bindBuffer(e.ARRAY_BUFFER,t),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),e.STATIC_DRAW),!0):!1}#j(e){this.#M(e),this.#b=e=>{e.preventDefault(),this.#L(),this.#i={},this.#r=null,this.#y=null,this.#o={},this.#a=null},this.#x=()=>{!this.isConnected||!this.#n||(this.#i={},this.#A()&&(this.#l=performance.now()/1e3,this.#f?this.#F():this.#I()))},e.addEventListener(`webglcontextlost`,this.#b,!1),e.addEventListener(`webglcontextrestored`,this.#x,!1)}#M(e){this.#b&&e.removeEventListener(`webglcontextlost`,this.#b),this.#x&&e.removeEventListener(`webglcontextrestored`,this.#x),this.#b=null,this.#x=null}#N(){let e=this.#t;if(!e)return;let t=Math.min(Kr,typeof window<`u`&&window.devicePixelRatio||1),n=Math.max(1,e.clientWidth*t|0),r=Math.max(1,e.clientHeight*t|0);(e.width!==n||e.height!==r)&&(e.width=n,e.height=r)}#P(){if(typeof getComputedStyle!=`function`)return 0;let e=getComputedStyle(this).getPropertyValue(`--ink`).trim();if(!e)return 0;let[t,n,r]=Yr(e,[0,0,0]);return+(.2126*t+.7152*n+.0722*r>.5)}#F(){let e=this.#n,t=this.#t,n=this.#r;if(!e||!t||!n||!this.#a)return;this.#N();let r=performance.now()/1e3-this.#l,i=.5+.5*Math.sin(r*.12),a=.5+.5*Math.sin(r*.097+1),o=.2*(1-i)+.46*i,s=.74*(1-a)+.3*a,c=this.#h,l=this.#p,u=this.#m;e.viewport(0,0,t.width,t.height),e.useProgram(n),e.bindBuffer(e.ARRAY_BUFFER,this.#a),e.enableVertexAttribArray(this.#s),e.vertexAttribPointer(this.#s,2,e.FLOAT,!1,0,0);let d=this.#o;e.uniform2f(d.u_res??null,t.width,t.height),e.uniform1f(d.u_time??null,r),e.uniform1f(d.u_energy??null,this.#u),e.uniform2f(d.u_center??null,o,s),e.uniform3f(d.u_evt??null,u[0],u[1],u[2]),e.uniform1f(d.u_freeze??null,N(this.coverage*this.intensity,0,1,.66)*2.2),e.uniform1f(d.u_dark??null,c),e.uniform1f(d.u_scroll??null,this.scrollOffset*qr/Math.max(1,t.clientHeight||t.height)),e.uniform1f(d.u_falloff??null,.3),e.uniform1f(d.u_life??null,.35),e.uniform3f(d.u_tint??null,l[0],l[1],l[2]),e.uniform1f(d.u_brightness??null,this.brightness),e.uniform1f(d.u_contrast??null,this.contrast),e.uniform1f(d.u_noise??null,this.noise),e.uniform1f(d.u_blur??null,this.blurAmount),e.uniform1f(d.u_speed??null,this.speed),e.drawArrays(e.TRIANGLES,0,3),this.#u*=.95,this.#u<.001&&(this.#u=0)}#I(){if(this.#c)return;let e=()=>{this.#F(),this.#c=requestAnimationFrame(e)};this.#c=requestAnimationFrame(e)}#L(){this.#c&&cancelAnimationFrame(this.#c),this.#c=0}#R(){let e=this.#n,t=this.#t;if(t&&this.#M(t),e){this.#a&&e.deleteBuffer(this.#a);for(let t of Object.values(this.#i))t&&(e.deleteProgram(t.program),e.deleteShader(t.vs),e.deleteShader(t.fs));e.getExtension(`WEBGL_lose_context`)?.loseContext()}this.#n=null,this.#r=null,this.#i={},this.#o={},this.#a=null,this.#y=null}};S(`slicc-shader`,Xr),S(`slicc-frost-shader`,class extends Xr{connectedCallback(){this.getAttribute(`mode`)!==`freezer`&&this.setAttribute(`mode`,`freezer`),super.connectedCallback()}});var Zr=`# Memory
|
|
2933
2933
|
|
|
2934
|
-
`,
|
|
2934
|
+
`,Qr=[`**Evidence first:** inspect the smallest relevant surface before editing and record the observed state.`,`**Narrow plans:** keep one measurable outcome, one implementation pass, and one verification pass.`,`**Runtime state:** prefer browser-owned storage and keep the relay stateless whenever practical.`,`**Failure boundaries:** external work needs a timeout, a useful error category, and an explicit retry decision.`,"**Keyboard parity:** interactive rows remain focusable and respond to both `Enter` and `Space`.",`**Memory rendering:** preserve Markdown meaning while sanitizing untrusted tags at the DOM boundary.`,`**Cross-runtime parity:** shared events need matching page, worker, extension, and follower handling.`,`**Verification records:** report the exact command, outcome, and scope instead of writing only “tests pass”.`,`**Synthetic data:** use neutral paths, reserved domains, and conspicuously invented identifiers in fixtures.`,`**Collaboration:** coordinate public-barrel edits before overlapping with another active implementation.`],$r=["Keep the durable rule beside `packages/example.ts` so later work can reproduce the decision without a transcript.",`Preserve selection, expansion, and scroll state when a refresh replaces visible children.`,`Run the focused regression first; broaden to package and repository gates only after the hypothesis holds.`,'Treat A & B, “quoted labels”, arrows →, and `<preview mode="safe">` as text rather than executable markup.',`Prefer a reversible patch over a destructive command when the target was inferred rather than supplied.`,`Stop exploring when another read no longer changes the hypothesis; switch to a test or focused question.`,`Document the invalidation trigger when cached data can become stale, and retain a correctness bypass.`,`Release every listener, timer, observer, channel, and object URL during the matching teardown path.`,`Keep logs to operation name, duration, status, and a synthetic correlation label; omit payload contents.`],ei=Qr.flatMap(e=>$r.map(t=>`- ${e} ${t}`)),ti=[`- Keep diffs small.`,`- Prefer native APIs.`,`- Ship docs with code.`,`- No surprise deploys.`,"- **Continuation stress:** preserve one logical memory across source lines,\n carrying `inline-code`, emphasis, and an arrow → without creating another row.",'- **Escaping stress:** render `<preview mode="safe">`, A & B, “quotes”, and `score > threshold` as inert content.',`- **Reserved link:** [the synthetic reference](https://example.invalid/memory) exists only to exercise link rendering.`,`- **Medium tail:** before rebuilding a filtered collection, capture the query, focused control, selected row, group expansion, and scroll anchor; restore only state that still refers to surviving items.`,`- **Long tail:** ${`A long-lived panel decision was reviewed in sequence: a compact sample initially hid scale problems; a larger dataset exposed discarded provenance and summaries cut mid-phrase; Markdown stress then revealed literal markers; keyboard review found pointer-only activation; narrow layouts showed metadata competing with the primary text; refresh testing exposed lost search, focus, expansion, and scroll state; cross-runtime review found a missing follower path; failure testing identified an unbounded request; cleanup testing found a retained observer; and final verification required the focused test, package suite, coverage gate, and build. `.repeat(2).trim()}`,`- **Folded long tail:** a remote action keeps one event contract and preserves error categories across serialization,
|
|
2935
2935
|
terminates pending requests on disconnect, and verifies timeout plus malformed-response behavior,
|
|
2936
|
-
while this third source line remains part of the same bullet and contains “quotes”, A & B, and <angle brackets>.`],
|
|
2937
|
-
`)}\n`}
|
|
2938
|
-
`),`${
|
|
2936
|
+
while this third source line remains part of the same bullet and contains “quotes”, A & B, and <angle brackets>.`],ni=[...ei,...ti],ri=[[`2099-01-03`,`compaction`],[`2099-01-10`,`new-session`],[`2099-01-18`,`compaction`],[`2099-02-02`,`pending-enrichment`],[`2099-02-14`,`new-session`],[`2099-03-01`,`compaction`],[`2099-03-21`,`pending-enrichment`],[`2099-04-05`,`compaction`],[`2099-04-19`,`new-session`],[`2099-05-07`,`compaction`]];function ii(e,t,n){return`## Auto-extracted (${e}, ${t})\n\n${n.join(`
|
|
2937
|
+
`)}\n`}Zr+ri.map(([e,t],n)=>ii(e,t,ni.slice(n*10,n*10+10))).join(`
|
|
2938
|
+
`),`${Zr}${ni.join(`
|
|
2939
2939
|
`)}`,[`# Project Northstar`,``,`Role: Kestrel (primary engineering agent)`,`Workspace: /workspaces/northstar`,`Snapshot: 2032-04-18T14:15:51.712Z`,``,`## Operating agreements`,"- **Keep Northstar changes reviewable:** issue #501 requires one concern per branch in `packages/northstar-shell/src/` with fixtures under `/workspaces/northstar/testdata/`; run `keel verify --scope shell` before asking Mina Kestrel for `review_ready` status. The branch note in `packages/northstar-shell/reviews/` explains the user-visible outcome, the measured baseline, and the exact rollback point so another engineer can judge the change without reconstructing the session.","- **Prefer evidence before edits:** issue #502 starts with traces from `packages/telemetry/src/` and a reproduction in `/workspaces/northstar/repros/`; record the failing `trace_id` and the smallest useful `fixture_seed` before changing code. The supporting report in `packages/telemetry/reports/` separates observed behavior from a proposed cause and includes the command, expected result, actual result, and environment assumptions.","- **Use the native release path:** issue #503 sends text-only patches through `packages/release-tools/src/` and stores large binary fixtures in `/workspaces/northstar/artifacts/`; invoke `keel publish --dry-run` and confirm `release_manifest_v3` before upload. The release record in `packages/release-tools/records/` names every artifact, its content digest, the verification run that produced it, and the person who approved promotion.","- **Never merge on assumption:** issue #504 leaves the candidate in `packages/change-gate/src/` until `/workspaces/northstar/reviews/` contains an explicit approval; use `keel review status` and preserve the requested `merge_strategy`. The decision log in `packages/change-gate/decisions/` states whether history must remain linear and whether a reviewer requested a merge commit for audit context.",``,`## Repository and release workflow`,"- **Branch from the verified base:** issue #505 creates work in `packages/release-tools/branches/` and writes the base proof to `/workspaces/northstar/checkpoints/`; `keel branch create` must report the expected `base_oid`. The branch receipt in `packages/release-tools/receipts/` also captures the remote name and fetch time, which makes stale-base failures obvious during review.","- **Rebase only when linear history is required:** issue #506 keeps merge-preserving work in `packages/change-gate/policies/` and conflict notes in `/workspaces/northstar/reviews/`; choose `merge_commit` or `linear_rebase` from the recorded policy, never from habit. Guidance under packages/change-gate/guides/rebase/ requires a fresh verification run after conflict resolution because a clean textual rebase does not prove unchanged behavior.","- **Treat remote deletion as a gated operation:** issue #507 resolves the exact ref through `packages/release-tools/refs/` and snapshots it in `/workspaces/northstar/checkpoints/`; call `keel ref delete --confirm` only after `ref_guard` matches. The recovery note under packages/release-tools/guides/restore/ retains the deleted object identifier and a tested restore command until the review window closes.",``,`## Aurora renderer bootstrap — desktop preview (Session April 02)`,"- **Create the preview shell:** issue #508 keeps the host in `packages/aurora-preview/src/` and its deterministic scene data in `/workspaces/northstar/fixtures/aurora/`; start `keel preview aurora` with `scene_seed_2048`. A walkthrough under packages/aurora-preview/guides/startup/ lists the expected loading, ready, degraded, and failed states so reviewers know whether the shell or renderer owns a defect.","- **Load the renderer through its public package:** issue #509 imports `@northstar/aurora` from `/workspaces/northstar/apps/desktop/` and pins `aurora_protocol_v6`; the preview must not reach the private `renderer_singleton`. Contract notes under packages/aurora-preview/guides/contracts/ describe the mount lifecycle and require the host to release observers, workers, and object URLs during teardown.","- **Keep browser and desktop entry points equivalent:** issue #510 compares `packages/aurora-preview/browser/` with `/workspaces/northstar/apps/desktop/`; both expose `mountAuroraPreview` and accept `preview_transport`. Parity evidence under packages/aurora-preview/reviews/parity/ records the same scene, viewport, theme, keyboard path, and frame checksum for each host.","- **Pass viewer identity without personal data:** issue #511 reads `packages/aurora-preview/config/` and `/workspaces/northstar/fixtures/viewers/`; use `viewer_alpha` plus `tenant_sandbox`, never an account copied from production. The fixture catalog under packages/aurora-preview/fixtures/viewers/ explains each synthetic role and deliberately omits names, credentials, message history, and customer content.","- **Document the development-only compositor:** the guide in `packages/aurora-preview/docs/` points to `/workspaces/northstar/examples/compositor/`; `keel preview --inspect` exposes `frame_budget_ms` for local diagnosis. The inspector reports dropped frames, long tasks, active workers, and selected fallback mode without changing the scheduling decisions being measured.","- **Bundle Aurora without runtime network fetches:** build `packages/aurora-preview/bundle/` into `/workspaces/northstar/artifacts/aurora/` with `rook bundle --target desktop`; the output registers `aurora_bundle_hash` and embeds shader tables, icon atlases, locale data, fallback fonts, protocol schemas, worker bootstrap code, source labels, feature defaults, accessibility metadata, safe demo accounts, and the exact scene seed used by review. The host imports one local module, validates the manifest before evaluation, rejects unknown capabilities, records a structured startup trace, and keeps every optional adapter behind a capability check. When the packager rewrites an external import, inspect the emitted dependency map rather than adding a global shim. The accepted bundle must boot with the network disabled, survive a renderer restart, restore the selected scene, preserve focus order, report missing GPU features as a visible diagnostic, and produce the same frame checksum in Chromium and the desktop shell. Store the checksum beside the manifest, not in application code, so a fixture update is reviewable without touching runtime behavior.","- **Aurora offline recovery drill for the desktop preview** uses `packages/aurora-preview/fallback/` and `/workspaces/northstar/apps/desktop/assets/` with `aurora_fallback_entry` after `gpu_probe_result` records unsupported adapter evidence then the host verifies the local manifest restores the selected scene preserves keyboard focus retains the review viewport loads bundled fonts rejects network requests emits a visible diagnostic stores the frame checksum beside the artifact compares browser and desktop output keeps the original trace identifier and leaves the normal renderer untouched for the next controlled restart",``,`## Signal audio service — capture and transcription pipeline`,"- **Keep voice fixtures synthetic:** write generated samples to `packages/signal-audio/fixtures/` and metadata to `/workspaces/northstar/testdata/audio/`; select `signal_voice_cedar` with `sample_rate_24000`. The catalog under packages/signal-audio/guides/fixtures/ states how each sample was generated and which timing, silence, overlap, and clipping cases it is meant to exercise.","- **Resolve credentials through the fixture broker:** configure `packages/signal-audio/auth/` from `/workspaces/northstar/config/local/`; `keel secret lease signal` returns `signal_lease_ref` without exposing token material. The runbook under packages/signal-audio/guides/auth/ distinguishes a missing lease, an expired lease, provider denial, and an unavailable broker so recovery remains specific.","- **Use the streaming endpoint for long utterances:** send chunks from `packages/signal-audio/stream/` through `/workspaces/northstar/repros/audio/`; the client tracks `utterance_seq` and rejects a stale `transcript_epoch`. Evidence under packages/signal-audio/reviews/streaming/ includes chunk timing and final ordering, making dropped, duplicated, and late frames visible without retaining spoken content.","- **Preserve binary audio until decoding succeeds:** `packages/signal-audio/codecs/` writes to `/workspaces/northstar/artifacts/audio/`; `signal_decode_pcm` returns `decoded_frame_count` before text normalization. Notes under packages/signal-audio/guides/codecs/ require the original byte length, channel count, sample rate, and decoder warning before any waveform is discarded.",``,`## Harbor control-plane CLI (Session April 05, #401)`,"- **Define Harbor as a thin API client:** keep commands in `packages/harbor-cli/src/` and contract fixtures in `/workspaces/northstar/testdata/harbor/`; `harbor project list` emits `harbor_result_v2`. This boundary keeps command behavior easy to inspect, lets the service remain the source of truth, and gives every failure one clear place for diagnosis.","- **Store only a broker reference:** `packages/harbor-cli/auth/` reads `/workspaces/northstar/config/local/`; `harbor auth login` persists `credential_handle`, never a bearer value. A later command can ask the broker for a short lease while the terminal, history, trace, and saved configuration remain free of secret material.","- **Normalize boolean flags at the boundary:** `packages/harbor-cli/args/` tests `/workspaces/northstar/repros/harbor/`; `--include-paused=false` becomes `include_paused` rather than a truthy string. The same rule covers an omitted flag, an explicit true value, and a false value so script behavior does not depend on parser accident.","- **Do not edit remote files with shell redirection:** fetch through `packages/harbor-cli/files/` into `/workspaces/northstar/checkpoints/`; `harbor file replace` validates `remote_etag` before committing. The client first writes a complete local draft, shows a compact difference, and sends the whole document only after the expected revision still matches.","- **Read structured responses before printing:** `packages/harbor-cli/output/` stores schemas under `/workspaces/northstar/testdata/schemas/`; `harbor --format json` preserves `error_code` and nested causes. Human output may become shorter, but machine output must retain every field needed for retry, support, audit, and a later automated decision.","- **Refresh expired leases once:** `packages/harbor-cli/retry/` records attempts in `/workspaces/northstar/traces/`; `harbor_lease_expired` may trigger one `credential_refresh`, not a loop. A second denial is returned with the first request identity and lease age so the operator sees a stable failure rather than repeated login work.","- **Map provider failures to actionable hints:** `packages/harbor-cli/errors/` uses `/workspaces/northstar/docs/runbooks/`; `deployment_policy_denied` points to `harbor deployment inspect`. Each hint names the blocked resource, the required capability, and a safe read-only command that can confirm policy state before any new request.",``,`## Atlas runtime and plugin packaging (Session April 07, #418)`,"- **Build Atlas from a readable entry module:** `packages/atlas-runtime/src/` produces `/workspaces/northstar/artifacts/atlas/`; `rook build atlas` keeps `atlas_entrypoint` stable. The entry names each adapter and capability in one visible table, which makes bundle review possible without following generated glue across many small files.","- **Install plugins into an isolated sandbox:** `packages/atlas-runtime/plugins/` expands under `/workspaces/northstar/sandboxes/atlas/`; `atlas plugin inspect` verifies `plugin_manifest_v4`. Extraction rejects parent traversal, absolute names, duplicate entries, and unsupported links before any plugin code can observe the host or write outside its assigned directory.","- **Share filesystem adapters across hosts:** `packages/atlas-runtime/adapters/` is tested against `/workspaces/northstar/testdata/files/`; `atlas_read_bytes` and `atlas_write_atomic` retain binary data. Browser and desktop implementations must agree on path normalization, missing file behavior, atomic replacement, permission denial, and the byte count returned after a write.","- **Externalize host-owned modules:** `packages/atlas-runtime/build/` writes `/workspaces/northstar/artifacts/maps/`; `rook bundle --external host` marks `host_module_table` in the manifest. The loader resolves only names declared by that table and reports an absent host module before plugin startup rather than after partial state has changed.","- **Preserve integer field types during schema conversion:** `packages/atlas-runtime/schema/` compares `/workspaces/northstar/testdata/events/`; `packet_sequence` stays numeric in `atlas_event_v3`. The conversion test also covers zero, the largest safe value, a missing optional field, and an invalid string so type loss cannot hide in ordinary data.","- **Treat unknown extensions as data:** `packages/atlas-runtime/loader/` copies `/workspaces/northstar/fixtures/plugins/`; `atlas_load_module` uses `declared_media_type` instead of filename guessing. This permits a host to choose the correct evaluator while an untrusted plugin cannot change execution mode by selecting a familiar suffix.","- **Verify large artifacts through content hashes:** `packages/atlas-runtime/cache/` indexes `/workspaces/northstar/artifacts/atlas/`; `atlas artifact verify` checks `sha256_digest` before activation. Size and digest are checked after download and again before load, with one clear error that names which step observed an unexpected value.","- **Detect build drift against one canonical artifact:** `packages/atlas-runtime/ci/` reads `/workspaces/northstar/checkpoints/builds/`; `keel drift atlas` compares `canonical_bundle_id` rather than tool banners. A green result means the committed artifact matches the verified build output, not merely that two tools printed a similar version name.",``,`## Relay deployment automation (Session April 09, #433)`,"- **Acquire deployment credentials per operation:** `packages/relay-deploy/auth/` resolves `/workspaces/northstar/config/relay/`; `relay credential lease` returns `relay_lease_id`. The lease is bound to one provider and action, expires quickly, and can be revoked without changing local configuration or any unrelated deployment session.","- **Use immutable release descriptors:** `packages/relay-deploy/manifests/` publishes `/workspaces/northstar/artifacts/releases/`; `relay deploy plan` pins `release_descriptor_sha`. Review therefore covers the exact image, configuration, migration, and rollback input that promotion will consume rather than a mutable branch or floating tag.","- **Model provider capabilities explicitly:** `packages/relay-deploy/providers/` tests `/workspaces/northstar/testdata/providers/`; `provider_capability_set` prevents unsupported preview creation. A plan can explain which feature is absent and offer a compatible path before it asks a remote service to begin work.","- **Write remote documents atomically:** `packages/relay-deploy/files/` stages `/workspaces/northstar/checkpoints/remote/`; `relay file put` requires `expected_revision`. This prevents a short replacement from leaving stale tail content and prevents a concurrent operator from losing a newer remote change.","- **Keep retry policy narrow:** `packages/relay-deploy/retry/` reads `/workspaces/northstar/docs/runbooks/`; `relay_retryable_error` excludes policy denials and invalid manifests. Delay includes a firm attempt limit and a stable request identity so a temporary transport fault cannot become duplicate provider work.","- **Promote the artifact already tested:** `packages/relay-deploy/promote/` selects `/workspaces/northstar/artifacts/releases/`; `relay promote` verifies `tested_artifact_sha`. The command refuses a rebuild during promotion because even an equivalent source revision can yield a different dependency graph or bundle digest.",``,`## Orbit browser collaboration (Session April 11, #447)`,"- **Represent each shared tab as an Orbit room:** `packages/orbit-collab/rooms/` persists `/workspaces/northstar/testdata/orbit/`; `orbit room create` returns `room_epoch` and `participant_slot`. Room identity stays stable across transport replacement, while a new epoch makes every participant reject late state from a connection that no longer owns the session.","- **Send cursor updates as replaceable state:** `packages/orbit-collab/presence/` replays `/workspaces/northstar/fixtures/presence/`; `orbit_presence_v5` coalesces superseded coordinates. Presence may be lost without harming the document because the next update replaces it, which keeps interaction smooth under delay without building an unbounded queue.","- **Keep durable messages separate from presence:** `packages/orbit-collab/messages/` writes `/workspaces/northstar/checkpoints/orbit/`; `orbit message append` assigns `message_sequence`. A message is acknowledged only after durable storage, and replay begins after the highest sequence already seen so reconnect cannot create a duplicate conversation entry.","- **Recover from a stale browser execution context:** `packages/orbit-collab/browser/` logs `/workspaces/northstar/traces/orbit/`; `orbit context renew` increments `context_generation`. The old context is detached before a new observer is added, preventing both generations from sending navigation and focus events for the same visible tab.","- **Capture collaboration evidence through the public surface:** `packages/orbit-collab/qa/` stores `/workspaces/northstar/artifacts/screens/`; `keel orbit snapshot` records `active_room_id`. Review uses the same controls available to a person, then records visible member state, selected room, pending draft, and transport health beside the image.","- **Preserve pending input during reconnect:** `packages/orbit-collab/drafts/` tests `/workspaces/northstar/repros/reconnect/`; `draft_revision` survives one `transport_rebind`. The draft remains local until send succeeds, and a successful acknowledgement clears only the revision that was actually delivered rather than newer text still being edited.",``,`## Incident review — reconnect storm (Session April 12)`,"- **Root cause was competing transport owners:** `packages/orbit-collab/transport/` and `/workspaces/northstar/repros/reconnect/` both advanced `room_epoch`; the fix elects one `transport_owner`. The incident began when a browser wake event and a network return event each created a connection before either could observe the other.","- **The retry loop hid the first useful error:** `packages/orbit-collab/retry/` now records `/workspaces/northstar/traces/incidents/`; `first_failure_code` is retained in `reconnect_report`. Later timeout noise remains available in the trace, but the summary leads with the event that first moved the room away from healthy state.","- **Recovery must preserve the draft and selected room:** `packages/orbit-collab/state/` replays `/workspaces/northstar/fixtures/recovery/`; `orbit_recover_state` restores `active_room_id`. The acceptance check covers unsent text, keyboard focus, scroll position, participant order, and exactly one successful delivery after transport recovery.",``,`## Mobile companion sync (Session April 14, #462)`,"- **Pair the companion with an ephemeral code:** `packages/mobile-sync/pairing/` verifies `/workspaces/northstar/testdata/pairing/`; `mobile_pair_code` expires with `pairing_epoch`. Approval shows the synthetic device name and requested capability before either side accepts, and cancellation invalidates the code immediately rather than waiting for normal expiry.","- `packages/mobile-sync/outbox/` mirrors `/workspaces/northstar/fixtures/offline/`; `mobile_outbox_flush` preserves ordering after a network transition. Each item carries a local sequence and stable identity, so a retry can continue after the last acknowledgement without losing or repeating an action.","- `packages/mobile-sync/media/` writes `/workspaces/northstar/artifacts/mobile/`; `mobile_media_chunk` carries a checksum before upload. The receiver verifies every chunk before assembly and reports the first damaged range, which permits a narrow retry instead of sending the complete recording again.","- `packages/mobile-sync/notifications/` reads `/workspaces/northstar/testdata/push/`; `notification_dedupe_key` prevents duplicate alerts after resume. Foreground delivery updates visible state without another banner, while background delivery presents one alert that opens the exact room named by the event.","- `packages/mobile-sync/state/` compares `/workspaces/northstar/checkpoints/mobile/`; `mobile_state_merge` rejects an older `device_epoch`. Merge keeps local draft content, accepts newer durable state, and records a conflict when both sides changed the same preference after their common revision.","- `packages/mobile-sync/diagnostics/` exports `/workspaces/northstar/traces/mobile/`; `mobile_diag_bundle` removes payload text but keeps timing. The bundle includes version, platform, connection change, queue depth, retry count, and state generation so support can reason about order without reading user content.","- `packages/mobile-sync/accessibility/` tests `/workspaces/northstar/fixtures/a11y/`; `focus_restore_target` survives a view rebuild. The check follows pairing, room choice, draft entry, send, background, and resume with a keyboard so focus order is verified through a complete task.","- `packages/mobile-sync/release/` stages `/workspaces/northstar/artifacts/mobile/`; `mobile_release_channel` defaults to the review track. Promotion requires the same signed archive that passed device smoke review, with no rebuild or configuration change between approval and publication.","- `packages/mobile-sync/qa/` records `/workspaces/northstar/reviews/mobile/`; `mobile_smoke_matrix` covers offline launch, resume, and re-pairing. Each case states the initial network and account state, the exact action, the visible result, and the durable state expected after another launch.",``,`## Release readiness (Session April 16)`,"- `packages/release-checks/lint/` scans `/workspaces/northstar/checkpoints/release/`; `keel verify lint` writes `lint_run_id` for the candidate. Review links that identity rather than a copied summary so any warning, formatter change, or excluded file remains visible in its original context.","- `packages/release-checks/types/` scans `/workspaces/northstar/checkpoints/release/`; `keel verify types` records `type_graph_hash`. A later source or dependency change invalidates that graph and requires another check before the candidate can share the earlier result.","- `packages/release-checks/tests/` reads `/workspaces/northstar/testdata/`; `keel verify tests` stores `test_matrix_id`. The matrix names every package, host, browser, and fixture group that ran, making an omitted surface as visible as a failed assertion.","- `packages/release-checks/coverage/` reads `/workspaces/northstar/artifacts/coverage/`; `keel verify coverage` compares `coverage_floor_set`.","- `packages/release-checks/build/` emits `/workspaces/northstar/artifacts/builds/`; `keel verify build` stamps `bundle_manifest_sha`.","- `packages/release-checks/smoke/` stores `/workspaces/northstar/reviews/smoke/`; `keel verify smoke` requires `reviewer_ack`.",``,`## Durable project reference`,``,`### People and product context`,"- Mina Kestrel leads Northstar product engineering; the synthetic team directory lives in `packages/project-context/people/` and uses `mina_kestrel` plus `product_lead`.","- Oren Vale owns the Aurora renderer; notes in `packages/project-context/people/` use `oren_vale` and `rendering_owner`.","- Jules Rowan owns Harbor and Relay; entries in `packages/project-context/people/` use `jules_rowan` and `control_plane_owner`.","- Nia Ember owns Signal audio; records in `packages/project-context/people/` use `nia_ember` and `audio_owner`.","- Kestrel is the primary engineering agent; `/workspaces/northstar/agents/` maps `agent_kestrel` to `northstar_generalist`.","- Northstar is a fictional collaborative desktop environment; `/workspaces/northstar/docs/` defines `northstar_product` and `desktop_collaboration`.","- Aurora renders local workspaces and review scenes; `/workspaces/northstar/docs/` defines `aurora_renderer` and `scene_protocol_v6`.","- Atlas hosts sandboxed extensions; `/workspaces/northstar/docs/` defines `atlas_runtime` and `plugin_manifest_v4`.","- Harbor manages control-plane resources; `/workspaces/northstar/docs/` defines `harbor_cli` and `harbor_result_v2`.","- Relay promotes verified artifacts; `/workspaces/northstar/docs/` defines `relay_deploy` and `release_descriptor_sha`.","- Orbit synchronizes shared browser state; `/workspaces/northstar/docs/` defines `orbit_collab` and `room_epoch`.","- Signal captures and transcribes synthetic audio; `/workspaces/northstar/docs/` defines `signal_audio` and `utterance_seq`.","- Keel is the repository and verification CLI; `/workspaces/northstar/docs/` defines `keel_cli` and `verification_run`.","- Rook is the deterministic package builder; `/workspaces/northstar/docs/` defines `rook_builder` and `bundle_manifest`.","- The demo tenant is always synthetic; `/workspaces/northstar/fixtures/` uses `tenant_sandbox` and `viewer_alpha`.","- Review accounts use the reserved invalid domain; `/workspaces/northstar/fixtures/` stores `mina@example.invalid` and `oren@example.invalid`.","- Dates and identifiers describe an invented future project; `/workspaces/northstar/docs/` labels `fixture_provenance` and `synthetic_only`.","- Product decisions favor understandable failure states; `/workspaces/northstar/docs/` records `visible_diagnostics` and `recoverable_actions`.",``,`### Engineering preferences`,"- Keep each review branch narrow; `/workspaces/northstar/reviews/` records `change_scope` and `review_owner`.","- Prefer native text patches for source changes; `/workspaces/northstar/checkpoints/` records `patch_digest` and `base_oid`.","- Wait on CI through the supported command; `/workspaces/northstar/checkpoints/` stores `verification_run` and `final_status`.","- Never commit credential material; `/workspaces/northstar/config/` contains `credential_handle` and `lease_expiry` only.","- Require explicit confirmation before production promotion; `/workspaces/northstar/reviews/` stores `promotion_approval` and `rollback_plan`.","- Reproduce failures before changing a workaround; `/workspaces/northstar/repros/` stores `fixture_seed` and `first_failure_code`.","- Diagnose invisible failures with traffic and state metrics; `/workspaces/northstar/traces/` tracks `request_count` and `state_generation`.","- Use exact units instead of ambiguous shorthand; `/workspaces/northstar/docs/` prefers `approximately` and `milliseconds`.","- Keep secrets inside the broker boundary; `/workspaces/northstar/config/` exposes `credential_handle` and `provider_scope`.","- Report regressions with measured before and after values; `/workspaces/northstar/reviews/` records `baseline_metric` and `candidate_metric`.",``,`### Repository and verification map`,"- The monorepo root is `/workspaces/northstar/`; `packages/northstar-shell` contains the desktop host and `keel verify shell` is its focused gate.","- Aurora lives in `/workspaces/northstar/packages/`; `@northstar/aurora` is the public package and `aurora_protocol_v6` is the renderer contract.","- Atlas lives in `/workspaces/northstar/packages/`; `@northstar/atlas-runtime` owns plugin loading and `plugin_manifest_v4` is its schema.","- Harbor and Relay live in `/workspaces/northstar/packages/`; `@northstar/harbor-cli` owns commands and `release_descriptor_sha` identifies promotion input.","- Orbit and Signal live in `/workspaces/northstar/packages/`; `@northstar/orbit-collab` owns shared state and `utterance_seq` orders audio text.","- All synthetic fixtures live in `/workspaces/northstar/testdata/`; `keel verify fixtures` checks privacy and `fixture_provenance` marks their source.",``,`### Infrastructure and operations`,"- The local control plane uses `/workspaces/northstar/config/`; `harbor_local_profile` selects the sandbox and `credential_handle` references broker state.","- Preview artifacts use `/workspaces/northstar/artifacts/`; `aurora_bundle_hash` identifies the renderer and `canonical_bundle_id` drives drift checks.","- Deployment manifests use `/workspaces/northstar/artifacts/`; `release_descriptor_sha` pins content and `tested_artifact_sha` gates promotion.","- Collaboration traces use `/workspaces/northstar/traces/`; `room_epoch` identifies a session and `context_generation` identifies browser renewal.","- Mobile diagnostics use `/workspaces/northstar/traces/`; `mobile_diag_bundle` strips content and `device_epoch` orders state.","- Incident runbooks use `/workspaces/northstar/docs/`; `first_failure_code` names the initiating fault and `rollback_plan` names recovery.","- Review evidence uses `/workspaces/northstar/reviews/`; `baseline_metric` and `candidate_metric` keep UI judgments quantitative.","- Production promotion remains disabled in this fixture; `/workspaces/northstar/config/` sets `production_enabled` false and `tenant_sandbox` as the only tenant."].join(`
|
|
2940
|
-
`)+``;var
|
|
2940
|
+
`)+``;var ai=new Set([`user`,`feedback`,`project`]),oi={user:{hue:`--rose`,label:`user`},feedback:{hue:`--cyan`,label:`feedback`},project:{hue:`--violet`,label:`project`}};function si(e){return e===`feedback`||e===`project`?e:`user`}var ci=T(`
|
|
2941
2941
|
:host {
|
|
2942
2942
|
display: inline-flex;
|
|
2943
2943
|
vertical-align: middle;
|
|
@@ -2959,13 +2959,13 @@ void main(){
|
|
|
2959
2959
|
background: color-mix(in srgb, var(--mtag-hue, var(--rose)) var(--mtag-fill), var(--canvas));
|
|
2960
2960
|
border: 1px solid color-mix(in srgb, var(--mtag-hue, var(--rose)) var(--mtag-border), var(--line));
|
|
2961
2961
|
}
|
|
2962
|
-
`),
|
|
2962
|
+
`),li=`slicc-memtag-dark`,ui=`
|
|
2963
2963
|
.dark slicc-memtag,
|
|
2964
2964
|
[data-theme="dark"] slicc-memtag {
|
|
2965
2965
|
--mtag-fill: 22%;
|
|
2966
2966
|
--mtag-border: 38%;
|
|
2967
2967
|
}
|
|
2968
|
-
`;function
|
|
2968
|
+
`;function di(e){if(e.getElementById(li))return;let t=e.createElement(`style`);t.id=li,t.textContent=ui,(e.head??e.documentElement).appendChild(t)}S(`slicc-memtag`,class extends HTMLElement{static observedAttributes=[`type`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ci]}connectedCallback(){di(this.ownerDocument),this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get type(){return si(this.getAttribute(`type`))}set type(e){this.setAttribute(`type`,ai.has(e)?e:`user`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let{hue:e,label:t}=oi[this.type],n=this.label??w(`slot`,null,t),r=w(`span`,{class:`mtag`,part:`tag`,style:`--mtag-hue:var(${e})`},n);this.#e.replaceChildren(r)}});var fi=`
|
|
2969
2969
|
slicc-memrow {
|
|
2970
2970
|
display: block;
|
|
2971
2971
|
border: 1px solid var(--line);
|
|
@@ -3072,7 +3072,7 @@ slicc-memrow.fresh {
|
|
|
3072
3072
|
background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
|
|
3073
3073
|
border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
|
|
3074
3074
|
}
|
|
3075
|
-
`,
|
|
3075
|
+
`,pi=`slicc-memrow-style`,mi=96,hi=12;function gi(e,t){if(e.length<=mi)return{heading:e,summary:t};let n=e.slice(0,97).lastIndexOf(` `),r=n>=hi?n:mi,i=e.slice(r).trim();return{heading:e.slice(0,r).trim(),summary:[i,t].filter(Boolean).join(` `)}}function _i(e){if(e.getElementById(pi))return;let t=e.createElement(`style`);t.id=pi,t.textContent=fi,(e.head??e.documentElement).appendChild(t)}function vi(e){return e===`feedback`||e===`project`?e:`user`}S(`slicc-memrow`,class extends HTMLElement{static get observedAttributes(){return[`heading`,`summary`,`tag`,`fresh`,`expanded`]}#e=!1;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=0;#c=!1;#l=!1;#u=null;#d=null;#f=null;connectedCallback(){_i(this.ownerDocument),this.#e||this.#p(),this.#m(),this.#y(),this.#h()}disconnectedCallback(){this.#b(),this.#o?.disconnect(),this.#o=null,this.#s&&cancelAnimationFrame(this.#s),this.#s=0}attributeChangedCallback(){this.#e&&this.#m()}get heading(){return this.getAttribute(`heading`)??``}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get summary(){return this.getAttribute(`summary`)??``}set summary(e){e==null?this.removeAttribute(`summary`):this.setAttribute(`summary`,e)}get tag(){return vi(this.getAttribute(`tag`))}set tag(e){this.setAttribute(`tag`,e)}get fresh(){return this.hasAttribute(`fresh`)}set fresh(e){this.toggleAttribute(`fresh`,e)}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}setHeadingContent(e){this.#c=!0,this.#n?this.#n.replaceChildren(e):this.#u=e}setBodyContent(e){this.#l=!0,this.#i?this.#i.replaceChildren(e):this.#d=e,this.#g()}#p(){this.#e=!0;let e=this.ownerDocument.createElement(`button`);e.className=`mt`,e.type=`button`;let t=this.ownerDocument.createElement(`b`),n=this.ownerDocument.createElement(`slicc-memtag`);e.append(t,n);let r=this.ownerDocument.createElement(`div`);for(r.className=`ms`;this.firstChild;)r.appendChild(this.firstChild);this.#u&&t.replaceChildren(this.#u),this.#d&&r.replaceChildren(this.#d),this.#u=null,this.#d=null,this.append(e,r),this.#t=e,this.#n=t,this.#r=n,this.#i=r}#m(){let e=this.#n,t=this.#r,n=this.#i;if(!e||!t||!n)return;let r=gi(this.heading,this.summary);this.#c||(e.textContent=r.heading);let i=this.tag;if(t.className=``,t.hidden=!this.hasAttribute(`tag`),t.setAttribute(`type`,i),t.textContent=``,!this.#l){let e=n.firstChild,t=r.summary;e&&e.nodeType===Node.TEXT_NODE?e.textContent=t:t&&n.insertBefore(this.ownerDocument.createTextNode(t),e)}this.classList.toggle(`fresh`,this.fresh),this.#v(),this.#g()}#h(){let e=this.#i;!e||this.#o||(this.#o=new ResizeObserver(()=>this.#g()),this.#o.observe(e),this.#g())}#g(){!this.isConnected||this.expanded||(this.#s&&cancelAnimationFrame(this.#s),this.#s=requestAnimationFrame(()=>{this.#s=0;let e=this.#i;!e||this.expanded||(e.scrollHeight>e.clientHeight+1?this.#_():this.#a?.remove(),this.#v())}))}#_(){if(!this.#a){let e=this.ownerDocument.createElement(`button`);e.className=`mexpand`,e.type=`button`,e.addEventListener(`click`,e=>{e.stopPropagation(),this.expanded=!this.expanded}),this.#a=e}this.#a.isConnected||this.append(this.#a)}#v(){let e=this.#a;if(!e?.isConnected)return;let t=this.expanded;e.textContent=t?`Show less`:`Show more`,e.setAttribute(`aria-expanded`,String(t))}#y(){this.#f||(this.#f=e=>this.#x(e),this.addEventListener(`click`,this.#f))}#b(){this.#f&&=(this.removeEventListener(`click`,this.#f),null)}#x(e){this.dispatchEvent(new CustomEvent(`select`,{bubbles:!0,composed:!0,detail:{heading:this.heading,summary:this.summary,tag:this.tag,sourceEvent:e}}))}});var yi=`
|
|
3076
3076
|
slicc-memory-panel{display:flex;flex-direction:column;min-height:0;overflow:hidden;background:var(--canvas);color:var(--ink);font-family:var(--ui)}
|
|
3077
3077
|
slicc-memory-panel .mp-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--canvas) 94%,var(--violet))}
|
|
3078
3078
|
slicc-memory-panel .mp-search{display:flex;align-items:center;min-width:0;border:1px solid var(--line);border-radius:10px;background:var(--canvas);padding:0 10px}
|
|
@@ -3105,7 +3105,7 @@ slicc-memory-panel .mp-rows{padding:0;border-top:0}
|
|
|
3105
3105
|
slicc-memory-panel slicc-memrow{border:0;border-radius:0;border-top:1px solid var(--line);margin:0;padding:7px 12px}
|
|
3106
3106
|
slicc-memory-panel slicc-memrow .mt b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
3107
3107
|
slicc-memory-panel slicc-memrow .ms{-webkit-line-clamp:1;margin-top:2px;font-size:11px}
|
|
3108
|
-
`,
|
|
3108
|
+
`,bi=`slicc-memory-panel-style`;function xi(e){if(e.getElementById(bi))return;let t=e.createElement(`style`);t.id=bi,t.textContent=yi,(e.head??e.documentElement).append(t)}function Si(e){return e.getAttribute(`section`)?.trim()||`General`}function Ci(e){let t=new Map;for(let n of e){let e=Si(n),r=t.get(e)??[];r.push(n),t.set(e,r)}return t}var wi=2,Ti=[`user`,`feedback`,`project`];function Ei(e){for(let t of Ti)if(e.filter(e=>e.getAttribute(`tag`)===t).length*2>e.length)return t;return null}function Di(e,t){let n=Ei(t);n&&e.setAttribute(`data-suppress-${n}`,``)}function Oi(e){let t=/^Auto-extracted \((?:(\d{4})-(\d{2})-(\d{2}),\s*)?([^)]+)\)$/.exec(e);if(!t){let t=/\(([^)]*\bsessions?\b[^)]*)\)/i.exec(e);return t?{name:`${e.slice(0,t.index)} ${e.slice(t.index+t[0].length)}`.replace(/\s+[—–-]\s*$/,``).replace(/\s+/g,` `).trim()||`Session memory`,source:t[1]}:{name:e,source:``}}let[,n,r,i,a]=t;if(!n||!r||!i)return{name:`Auto-extracted`,source:a};let o=new Date(Date.UTC(Number(n),Number(r)-1,Number(i)));return{name:new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,timeZone:`UTC`}).format(o),source:a.replaceAll(`-`,` `)}}S(`slicc-memory-panel`,class extends HTMLElement{#e=[];#t=null;#n=null;#r=null;#i=null;#a=``;#o=`all`;#s=new Set;#c=!1;connectedCallback(){xi(this.ownerDocument),this.#c||this.#u(),this.#h()}setRows(e){let t=new Set(Ci(this.#e).keys());this.#e=e.filter(e=>e.matches(`slicc-memrow`)),this.#l();let n=[...Ci(this.#e).keys()],r=new Set;for(let e of n)(!t.has(e)||this.#s.has(e))&&r.add(e);this.#s=r,this.#c&&this.#h()}#l(){let e=this.#i;if(e){for(let t of e.options){if(t.value===`all`)continue;let e=!this.#e.some(e=>e.getAttribute(`tag`)===t.value);t.hidden=e,t.disabled=e}e.value=this.#o}}#u(){this.#c=!0;let e=w(`input`,{type:`search`,placeholder:`Search memories…`,"aria-label":`Search memories`}),t=w(`select`,{class:`mp-filter`,"aria-label":`Filter memories by tag`},w(`option`,{value:`all`},`All tags`),w(`option`,{value:`user`},`User`),w(`option`,{value:`feedback`},`Feedback`),w(`option`,{value:`project`},`Project`)),n=w(`div`,{class:`mp-count`,role:`status`,"aria-live":`polite`}),r=w(`div`,{class:`mp-toolbar`},w(`label`,{class:`mp-search`},e),t,n),i=w(`div`,{class:`mp-body`});e.addEventListener(`input`,()=>{this.#a=e.value.trim().toLowerCase(),this.#h()}),t.addEventListener(`change`,()=>{this.#o=t.value,this.#h()}),this.replaceChildren(r,i),this.#t=i,this.#n=n,this.#r=e,this.#i=t,this.#l()}#d(){return this.#e.filter(e=>this.#o!==`all`&&e.getAttribute(`tag`)!==this.#o?!1:!this.#a||[e.getAttribute(`heading`),e.getAttribute(`summary`),e.getAttribute(`section`),e.getAttribute(`tag`),e.textContent].filter(Boolean).join(` `).toLowerCase().includes(this.#a))}#f(e){return w(`div`,{class:`mp-empty`},w(`strong`,null,e?`No matching memories`:`No memories yet`),w(`span`,null,e?`Try a different search or tag.`:`Memories extracted from conversations will appear here.`))}#p(e,t){let n=Oi(e),r=w(`details`,{class:`mp-group`},w(`summary`,{class:`mp-section`},w(`span`,{class:`mp-section-name`},n.name),...n.source?[w(`span`,{class:`mp-section-source`},n.source)]:[],w(`span`,{class:`mp-section-count`},`${t.length}`)),w(`div`,{class:`mp-rows`},...t));return r.open=this.#a?!0:this.#s.has(e),r.addEventListener(`toggle`,()=>{r.open?this.#s.add(e):this.#s.delete(e)}),Di(r,t),r}#m(e){let t=w(`div`,{class:`mp-flat`},...e);return Di(t,e),t}#h(){let e=this.#t;if(!e)return;let t=this.#d();if(this.#r&&(this.#r.placeholder=`Search ${this.#e.length} memories…`),this.#n&&(this.#n.textContent=`${t.length} of ${this.#e.length} memories`),this.#e.length===0){e.replaceChildren(this.#f(!1));return}if(t.length===0){e.replaceChildren(this.#f(!0));return}let n=Ci(t);if(n.size<wi){e.replaceChildren(this.#m(t));return}e.replaceChildren(...[...n].map(([e,t])=>this.#p(e,t)))}});var ki=`
|
|
3109
3109
|
slicc-palette-grid {
|
|
3110
3110
|
display: block;
|
|
3111
3111
|
flex: 1;
|
|
@@ -3124,7 +3124,7 @@ slicc-palette-grid .palgrid {
|
|
|
3124
3124
|
grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
|
|
3125
3125
|
gap: 10px;
|
|
3126
3126
|
}
|
|
3127
|
-
`,
|
|
3127
|
+
`,Ai=`slicc-palette-grid-style`;function ji(e){if(e.getElementById(Ai))return;let t=e.createElement(`style`);t.id=Ai,t.textContent=ki,(e.head??e.documentElement).appendChild(t)}var Mi=[{label:`canvas #faf6f1`,color:`#faf6f1`},{label:`cone #ef7000`,color:`#ef7000`},{label:`scoop #8b5cf6`,color:`#8b5cf6`},{label:`scoop #06b6d4`,color:`#06b6d4`},{label:`scoop #f43f5e`,color:`#f43f5e`},{label:`ink #0a0a0a`,color:`#0a0a0a`}],Ni=`brand palette · tokens`;S(`slicc-palette-grid`,class extends HTMLElement{static get observedAttributes(){return[`heading`]}#e=!1;#t=null;#n=null;#r=[];#i=null;#a=null;connectedCallback(){ji(this.ownerDocument),this.#e||this.#o(),this.#s(),this.#l()}disconnectedCallback(){this.#u()}attributeChangedCallback(){this.#e&&this.#s()}get heading(){return this.getAttribute(`heading`)??Ni}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tokens(){return(this.#i??Mi).map(e=>({...e}))}set tokens(e){this.#i=Array.isArray(e)?e.map(e=>({label:String(e.label??``),color:String(e.color??``)})):null,this.#e&&this.#c()}#o(){for(this.#e=!0,this.#r=[];this.firstChild;)this.#r.push(this.firstChild),this.removeChild(this.firstChild);let e=this.ownerDocument.createElement(`h4`),t=this.ownerDocument.createElement(`div`);t.className=`palgrid`,this.append(e,t),this.#t=e,this.#n=t,this.#c()}#s(){this.#t&&(this.#t.textContent=this.heading)}#c(){let e=this.#n;if(e){e.replaceChildren();for(let t of this.#r)e.appendChild(t);for(let t of this.tokens){let n=this.ownerDocument.createElement(`slicc-palette-cell`);n.setAttribute(`color`,t.color),n.setAttribute(`label`,t.label),e.appendChild(n)}}}#l(){this.#a||(this.#a=e=>{let t=e.detail??{};this.dispatchEvent(new CustomEvent(`select`,{bubbles:!0,composed:!0,detail:{label:t.label??``,color:t.color??``,sourceEvent:e}}))},this.addEventListener(`palette-select`,this.#a))}#u(){this.#a&&=(this.removeEventListener(`palette-select`,this.#a),null)}});var Pi=T(`
|
|
3128
3128
|
:host { display: inline-block; position: relative; font-family: var(--ui); }
|
|
3129
3129
|
.trigger {
|
|
3130
3130
|
display: inline-flex; align-items: center; justify-content: center;
|
|
@@ -3165,7 +3165,7 @@ slicc-palette-grid .palgrid {
|
|
|
3165
3165
|
.item .ic { flex: 0 0 auto; display: flex; color: var(--txt-2, #505050); }
|
|
3166
3166
|
.item.danger .ic { color: var(--rose, #f43f5e); }
|
|
3167
3167
|
@media (prefers-reduced-motion: reduce) { .pop { transition: none; } }
|
|
3168
|
-
`);S(`slicc-avatar-menu`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t;#n;#r=[];#i=null;#a=e=>{this.open&&!e.composedPath().includes(this)&&this.hide()};#o=e=>{e.key===`Escape`&&this.open&&(this.hide(),this.#t.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3168
|
+
`);S(`slicc-avatar-menu`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t;#n;#r=[];#i=null;#a=e=>{this.open&&!e.composedPath().includes(this)&&this.hide()};#o=e=>{e.key===`Escape`&&this.open&&(this.hide(),this.#t.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Pi],this.#t=w(`button`,{class:`trigger`,part:`trigger`,type:`button`,"aria-haspopup":`menu`,"aria-expanded":`false`},w(`slot`)),this.#n=w(`div`,{class:`pop`,part:`popover`,role:`menu`}),this.#e.replaceChildren(this.#t,this.#n),this.#t.addEventListener(`click`,()=>this.toggle())}connectedCallback(){this.#c()}disconnectedCallback(){document.removeEventListener(`mousedown`,this.#a),document.removeEventListener(`keydown`,this.#o)}attributeChangedCallback(e){if(e===`open`){let e=this.open;this.#t.setAttribute(`aria-expanded`,e?`true`:`false`),e?(document.addEventListener(`mousedown`,this.#a),document.addEventListener(`keydown`,this.#o)):(document.removeEventListener(`mousedown`,this.#a),document.removeEventListener(`keydown`,this.#o))}}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get user(){return this.#i}set user(e){this.#i=e,this.#c()}get items(){return this.#r.map(e=>({...e}))}set items(e){this.#r=Array.isArray(e)?e.map(e=>({...e})):[],this.#c()}show(){this.open||(this.open=!0,this.#s())}hide(){this.open&&(this.open=!1,this.#s())}toggle(){this.open?this.hide():this.show()}#s(){this.dispatchEvent(new CustomEvent(`slicc-avatar-menu-toggle`,{detail:{open:this.open},bubbles:!0,composed:!0}))}#c(){let e=[];if(this.#i){let t=w(`div`,{class:`user`},w(`div`,{class:`name`},this.#i.name));this.#i.provider&&t.append(w(`div`,{class:`prov`},this.#i.provider)),e.push(t)}for(let t of this.#r)if(t.kind===`separator`)e.push(w(`div`,{class:`sep`,role:`separator`}));else if(t.kind===`caption`)e.push(w(`div`,{class:`cap`},t.label??``));else{let r=w(`button`,{class:`item${t.danger?` danger`:``}`,part:`item`,type:`button`,role:`menuitem`,"data-id":t.id??``,disabled:t.disabled?!0:void 0});t.icon&&r.append(w(`span`,{class:`ic`},n(t.icon,{size:16}))),r.append(w(`span`,{class:`lb`},t.label??``)),t.disabled||r.addEventListener(`click`,()=>this.#l(t.id??``)),e.push(r)}this.#n.replaceChildren(...e)}#l(e){this.dispatchEvent(new CustomEvent(`slicc-avatar-action`,{detail:{id:e},bubbles:!0,composed:!0})),this.hide()}});var Fi=`
|
|
3169
3169
|
.slicc-nav {
|
|
3170
3170
|
display: flex;
|
|
3171
3171
|
align-items: center;
|
|
@@ -3195,7 +3195,7 @@ slicc-palette-grid .palgrid {
|
|
|
3195
3195
|
width, not the viewport, so embedded and Storybook frames behave like the
|
|
3196
3196
|
real sidebar. */
|
|
3197
3197
|
.slicc-nav[data-narrow] { gap: 8px; padding: 0 10px; }
|
|
3198
|
-
`,
|
|
3198
|
+
`,Ii=`slicc-nav-style`;function Li(e){if(e.getElementById(Ii))return;let t=e.createElement(`style`);t.id=Ii,t.textContent=Fi,(e.head??e.documentElement).appendChild(t)}S(`slicc-nav`,class extends HTMLElement{static observedAttributes=[`accent`];#e=!1;#t=null;connectedCallback(){Li(this.ownerDocument),this.classList.add(`slicc-nav`),this.setAttribute(`part`,`bar`),this.#n(),this.#r(this.getAttribute(`accent`)),typeof ResizeObserver<`u`&&(this.#t=new ResizeObserver(()=>this.#i()),this.#t.observe(this)),this.#i()}disconnectedCallback(){this.#t?.disconnect(),this.#t=null}attributeChangedCallback(e,t,n){e===`accent`&&t!==n&&this.isConnected&&(this.#r(n),this.dispatchEvent(new CustomEvent(`slicc-nav-accent-change`,{detail:{accent:n},bubbles:!0,composed:!0})))}get accent(){return this.getAttribute(`accent`)}set accent(e){e==null?this.removeAttribute(`accent`):this.setAttribute(`accent`,e)}get spacer(){return this.#n(),this.querySelector(`:scope > .slicc-nav__spacer, :scope > .spacer`)}#n(){if(this.#e||(this.#e=!0,this.querySelector(`:scope > .slicc-nav__spacer, :scope > .spacer`)))return;let e=this.ownerDocument.createElement(`div`);e.className=`slicc-nav__spacer`,e.setAttribute(`part`,`spacer`),e.setAttribute(`aria-hidden`,`true`);let t=this.querySelector(`:scope > slicc-floatbar, :scope > slicc-theme-toggle, :scope > slicc-avatar`);t?this.insertBefore(e,t):this.appendChild(e)}#r(e){e==null||e.trim()===``?this.style.removeProperty(`--ctx`):this.style.setProperty(`--ctx`,e)}#i(){this.toggleAttribute(`data-narrow`,this.getBoundingClientRect().width<=560)}});var Ri=T(`
|
|
3199
3199
|
:host {
|
|
3200
3200
|
position: fixed;
|
|
3201
3201
|
z-index: 110;
|
|
@@ -3233,7 +3233,7 @@ slicc-palette-grid .palgrid {
|
|
|
3233
3233
|
.item.destructive {
|
|
3234
3234
|
color: var(--red, #e53e3e);
|
|
3235
3235
|
}
|
|
3236
|
-
`),
|
|
3236
|
+
`),zi=null,Bi=null,Vi=null,Hi=class e extends HTMLElement{#e;#t=void 0;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ri]}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=w(`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=w(`button`,{class:t,"data-action":e.id},...r);a.appendChild(i)}r.#e.appendChild(a),document.body.appendChild(r),zi=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`,Bi=t=>{t.key===`Escape`&&e.hide()},Vi=n=>{let i=n.composedPath();!i.includes(r)&&!i.includes(t.anchor)&&e.hide()},document.addEventListener(`keydown`,Bi),document.addEventListener(`pointerdown`,Vi,{capture:!0})}static hide(){zi&&=(zi.remove(),null),Bi&&=(document.removeEventListener(`keydown`,Bi),null),Vi&&=(document.removeEventListener(`pointerdown`,Vi,{capture:!0}),null)}};S(`slicc-overflow-menu`,Hi);var Ui=T(`
|
|
3237
3237
|
:host { display: none; }
|
|
3238
3238
|
:host([open]) { display: block; }
|
|
3239
3239
|
.overlay {
|
|
@@ -3541,7 +3541,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3541
3541
|
:host(:hover) .tip[data-p="right"], :host(:focus-within) .tip[data-p="right"], :host([open]) .tip[data-p="right"] { transform: translate(0, -50%); }
|
|
3542
3542
|
.tip:empty { display: none; }
|
|
3543
3543
|
@media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
|
|
3544
|
-
`);S(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ia],this.#t=w(`span`,{class:`tip`,part:`tip`,role:`tooltip`,"aria-hidden":`true`}),this.#e.replaceChildren(w(`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&&ra.has(e)?e:`top`}set placement(e){this.setAttribute(`placement`,e)}#n(){this.#t.textContent=this.label,this.#t.setAttribute(`data-p`,this.placement)}});function
|
|
3544
|
+
`);S(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ia],this.#t=w(`span`,{class:`tip`,part:`tip`,role:`tooltip`,"aria-hidden":`true`}),this.#e.replaceChildren(w(`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&&ra.has(e)?e:`top`}set placement(e){this.setAttribute(`placement`,e)}#n(){this.#t.textContent=this.label,this.#t.setAttribute(`data-p`,this.placement)}});function aa(e,t){let n=e.base;for(let r of e.variants??[])f(r.when,t)&&(r.zones!==void 0||r.center!==void 0)&&(n=r);return n}var oa=.02,sa=48,ca={top:`Top`,left:`Left`,center:`Center`,right:`Right`,bottom:`Bottom`},la=class{#e;#t;#n;#r=null;constructor(e){this.#e=e,this.#t=I(`slicc-layout__ghost`),this.#n=I(`slicc-layout__targets`)}overlays(){return[this.#n,this.#t]}cancel(){window.removeEventListener(`pointermove`,this.#l),window.removeEventListener(`pointerup`,this.#d),this.#r=null,this.#t.classList.remove(`slicc-layout__ghost--active`),this.#n.replaceChildren(),this.#n.classList.remove(`slicc-layout__targets--active`)}decorateSlot(e,t){if(this.#e.isLocked(t))return;let r=document.createElement(`button`);r.type=`button`,r.className=`slicc-layout__move`,r.title=`Move ${t}`,r.setAttribute(`aria-label`,`Move ${t}`),r.dataset.panelId=t,r.appendChild(n(`grip-vertical`,{size:13})),r.addEventListener(`pointerdown`,e=>this.#a(e,t)),e.appendChild(r)}buildZonePanelDivider(e,t,n,r){if(r)return null;let i=t===`row`,a=I(`slicc-layout__divider slicc-layout__divider--${i?`h`:`v`}`);return a.dataset.zone=e,a.addEventListener(`pointerdown`,t=>{this.#f(t,e,i,n)}),a}buildZoneDivider(e,t,n,r,i){if(i)return null;let a=I(`slicc-layout__divider slicc-layout__divider--zone slicc-layout__divider--${n?`h`:`v`}`);return a.dataset.zoneBefore=e,a.dataset.zoneAfter=t,a.addEventListener(`pointerdown`,i=>{this.#i(i,e,t,n,r)}),a}#i(e,t,n,r,i){e.preventDefault();let a=t===`center`?n:t,o=a===t?1:-1,s=i.querySelector(`:scope > [data-zone="${a}"]`);if(!(s instanceof HTMLElement))return;this.#e.setPointerCapture(e.pointerId);let c=s.getBoundingClientRect(),l=r?c.width:c.height,u=r?e.clientX:e.clientY,d=i.getBoundingClientRect(),f=r?d.width:d.height,p=0;for(let e of Array.from(i.children)){if(!(e instanceof HTMLElement)||e===s)continue;let t=e.getBoundingClientRect(),n=r?t.width:t.height,i=e.dataset.zone===`center`||e.classList.contains(`slicc-layout__work-row`);p+=i?sa:n}let m=Math.max(sa,f-p),h=l,g=e=>{let t=r?e.clientX:e.clientY;h=Math.max(sa,Math.min(m,l+(t-u)*o)),this.#e.applyZoneResize(a,`${Math.round(h)}px`),this.#e.rerender()},_=()=>{window.removeEventListener(`pointermove`,g),window.removeEventListener(`pointerup`,_),window.removeEventListener(`pointercancel`,_),this.#e.hasPointerCapture(e.pointerId)&&this.#e.releasePointerCapture(e.pointerId),this.#e.applyZoneResize(a,`${Math.round(h)}px`),this.#e.commitResize()};window.addEventListener(`pointermove`,g),window.addEventListener(`pointerup`,_),window.addEventListener(`pointercancel`,_)}#a(e,t){this.#e.isLocked(t)||(e.preventDefault(),this.#r={panelId:t,zone:null},this.#t.textContent=t,this.#t.classList.add(`slicc-layout__ghost--active`),this.#c(e),this.#o(),window.addEventListener(`pointermove`,this.#l),window.addEventListener(`pointerup`,this.#d))}#o(){let e=this.#e.querySelector(`.slicc-layout__work`);if(!(e instanceof HTMLElement))return;let t=e.getBoundingClientRect();for(let e of h)this.#n.appendChild(pa(e,t));this.#n.classList.add(`slicc-layout__targets--active`)}#s(e){for(let t of Array.from(this.#n.children))t.classList.toggle(`slicc-layout__target--hot`,t===e)}#c(e){this.#t.style.left=`${e.clientX}px`,this.#t.style.top=`${e.clientY}px`}#l=e=>{let t=this.#r;if(!t)return;this.#c(e),t.zone=null;let n=document.elementFromPoint(e.clientX,e.clientY),r=n?.closest(`.slicc-layout__target`);if(r instanceof HTMLElement){let e=r.dataset.zone;if(e){t.zone=e,this.#s(r);return}}let i=n?.closest(`.slicc-layout__zone`),a=i instanceof HTMLElement?i.dataset.zone:null;t.zone=a,this.#s(a?this.#u(a):null)};#u(e){return this.#n.querySelector(`.slicc-layout__target[data-zone="${e}"]`)}#d=()=>{let e=this.#r;this.cancel(),e?.zone&&this.#e.applyMove(e.panelId,e.zone)};#f(e,t,n,r){e.preventDefault();let i=e.currentTarget,a=Array.from(r.querySelectorAll(`:scope > .slicc-layout__slot`)),o=Array.from(r.children).slice(0,Array.from(r.children).indexOf(i)).filter(e=>e.classList.contains(`slicc-layout__slot`)).length;if(o<1||o>=a.length)return;this.#e.setPointerCapture(e.pointerId);let s=a.map(e=>{let t=e.getBoundingClientRect();return Math.max(1,n?t.width:t.height)}),c=s.reduce((e,t)=>e+t,0),l=s.map(e=>e/c*s.length),u=r.getBoundingClientRect(),d=n?u.width:u.height,f=n?e.clientX:e.clientY,p=l.reduce((e,t)=>e+t,0),m=l[o-1]+l[o],h=m*oa,g=l[o-1],_=l,v=e=>{let r=n?e.clientX:e.clientY,i=d>0?(r-f)/d*p:0,a=Math.max(h,Math.min(m-h,g+i));_=[...l],_[o-1]=a,_[o]=m-a,this.#e.applyResize(t,_),this.#e.rerender()},y=()=>{window.removeEventListener(`pointermove`,v),window.removeEventListener(`pointerup`,y),window.removeEventListener(`pointercancel`,y),this.#e.hasPointerCapture(e.pointerId)&&this.#e.releasePointerCapture(e.pointerId),this.#e.applyResize(t,_),this.#e.commitResize()};window.addEventListener(`pointermove`,v),window.addEventListener(`pointerup`,y),window.addEventListener(`pointercancel`,y)}};function I(e){let t=document.createElement(`div`);return t.className=e,t}var ua={top:`arrow-up`,bottom:`arrow-down`,left:`arrow-left`,right:`arrow-right`,center:`square`},da=56,fa=16;function pa(e,t){let r=I(`slicc-layout__target slicc-layout__target--${e}`);r.dataset.zone=e,r.title=`Move to ${ca[e]}`,r.appendChild(n(ua[e],{size:20}));let i=I(`slicc-layout__target-label`);i.textContent=ca[e],r.appendChild(i);let a=t.left+t.width/2-da/2,o=t.top+t.height/2-da/2,[s,c]={center:[a,o],top:[a,t.top+fa],bottom:[a,t.bottom-da-fa],left:[t.left+fa,o],right:[t.right-da-fa,o]}[e];return r.style.left=`${s}px`,r.style.top=`${c}px`,r}var ma=`
|
|
3545
3545
|
/* The corner grip: hidden until the slot is hovered, mirroring the dock-tree's
|
|
3546
3546
|
(and slicc-file-tree's) hover-reveal action pattern — a persistent title bar on
|
|
3547
3547
|
every panel was the thing the redesign set out to remove. */
|
|
@@ -3647,7 +3647,7 @@ slicc-layout .slicc-layout__target--hot {
|
|
|
3647
3647
|
color: #fff;
|
|
3648
3648
|
transform: scale(1.12);
|
|
3649
3649
|
}
|
|
3650
|
-
`,
|
|
3650
|
+
`,ha=`
|
|
3651
3651
|
[data-slicc-panel] {
|
|
3652
3652
|
display: flex;
|
|
3653
3653
|
flex-direction: column;
|
|
@@ -3686,7 +3686,7 @@ slicc-layout .slicc-layout__target--hot {
|
|
|
3686
3686
|
[data-slicc-panel][presentation="floating"][anchor="center"] {
|
|
3687
3687
|
top: 50%; left: 50%; transform: translate(-50%, -50%);
|
|
3688
3688
|
}
|
|
3689
|
-
`,
|
|
3689
|
+
`,ga=`slicc-panel-style`;function _a(e){if(e.getElementById(ga))return;let t=e.createElement(`style`);t.id=ga,t.textContent=ha,(e.head??e.documentElement).appendChild(t)}var va=`data-slicc-panel`;S(`slicc-panel`,class extends HTMLElement{static observedAttributes=[`panel-id`,`hidden`,`locked`,`presentation`,`anchor`];static panelMeta;#e=null;connectedCallback(){_a(this.ownerDocument),this.setAttribute(va,``),this.setAttribute(`part`,`panel`),this.hasAttribute(`presentation`)||this.setAttribute(`presentation`,this.presentation),!this.hasAttribute(`anchor`)&&this.anchor&&this.setAttribute(`anchor`,this.anchor),this.#t(),this.visible&&this.onPanelShow?.()}disconnectedCallback(){this.#e?.disconnect(),this.#e=null}attributeChangedCallback(e,t,n){if(!this.isConnected||t===n||e!==`hidden`)return;let r=this.visible;r?this.onPanelShow?.():this.onPanelHide?.(),this.dispatchEvent(new CustomEvent(`slicc-panel-visibility`,{bubbles:!0,composed:!0,detail:{panelId:this.panelId,visible:r}}))}get panelId(){return this.getAttribute(`panel-id`)??ne(this.constructor)?.id??null}set panelId(e){e==null?this.removeAttribute(`panel-id`):this.setAttribute(`panel-id`,e)}get visible(){return!this.hasAttribute(`hidden`)}set visible(e){this.toggleAttribute(`hidden`,!e)}get locked(){return this.hasAttribute(`locked`)}set locked(e){this.toggleAttribute(`locked`,e)}get presentation(){let e=this.getAttribute(`presentation`);return e===`floating`||e===`docked`?e:ne(this.constructor)?.presentation??`docked`}set presentation(e){this.setAttribute(`presentation`,e)}get anchor(){let e=this.getAttribute(`anchor`);return te(e)?e:ne(this.constructor)?.anchor??null}set anchor(e){e==null?this.removeAttribute(`anchor`):this.setAttribute(`anchor`,e)}get meta(){return ne(this.constructor)}#t(){!this.onPanelResize||typeof ResizeObserver>`u`||(this.#e=new ResizeObserver(e=>{let t=e[0]?.contentRect;t&&this.onPanelResize?.(t)}),this.#e.observe(this))}});var ya=`
|
|
3690
3690
|
slicc-layout {
|
|
3691
3691
|
display: flex;
|
|
3692
3692
|
flex-direction: column;
|
|
@@ -3785,7 +3785,7 @@ slicc-layout .slicc-layout__zone {
|
|
|
3785
3785
|
sit side by side or stacked — see zoneAxis(). */
|
|
3786
3786
|
slicc-layout .slicc-layout__zone[data-axis='row'] { flex-direction: row; }
|
|
3787
3787
|
slicc-layout .slicc-layout__zone[data-axis='col'] { flex-direction: column; }
|
|
3788
|
-
${
|
|
3788
|
+
${ma}`,ba=`slicc-layout-style`;function xa(e){if(e.getElementById(ba))return;let t=e.createElement(`style`);t.id=ba,t.textContent=ya,(e.head??e.documentElement).appendChild(t)}function L(e,t){let n=document.createElement(e);return n.className=t,n}var Sa=class extends HTMLElement{static observedAttributes=[`platform`];#e=m();#t=null;#n=!1;#r=L(`div`,`slicc-layout__root`);#i=L(`div`,`slicc-layout__parking`);#a=new Set;#o=null;#s=null;#c=0;#l=new MutationObserver(()=>this.#f());#u=new la(this);connectedCallback(){xa(this.ownerDocument),this.#n=!0,this.#r.parentElement!==this&&this.append(this.#r),this.#i.parentElement!==this&&this.append(this.#i);for(let e of this.#u.overlays())e.parentElement!==this&&this.append(e);this.#v(),this.#f(),this.#l.observe(this,{childList:!0})}disconnectedCallback(){this.#n=!1,this.#l.disconnect(),this.#u.cancel(),this.#s?.disconnect(),this.#s=null,this.#c&&cancelAnimationFrame(this.#c),this.#c=0}attributeChangedCallback(e,t,n){e!==`platform`||t===n||!this.#n||this.#f(`environment`)}setLayout(e){this.#e=e?v(e):m(),this.#n&&this.#f(`set`)}getLayout(){return v(this.#e)}getResolved(){return this.#t?v(this.#t):null}getPlacedPanelIds(){return this.#t?g(this.#t).filter(e=>this.#a.has(e)):[]}isLocked(e){let t=this.#o??this.#t;return t?l(t,e):!1}environment(){let e=this.getBoundingClientRect(),t=this.getAttribute(`platform`);return{width:e.width,height:e.height,platform:t===`web`||t===`extension`||t===`electron`?t:void 0}}#d(){let e=new Map;for(let t of Array.from(this.querySelectorAll(`[${va}]`))){if(!(t instanceof HTMLElement)||t.parentElement?.closest(`[data-slicc-panel]`))continue;let n=t.getAttribute(`panel-id`);n&&e.set(n,t)}return e}#f(e=`set`,t){let n=y(this.#e,this.environment());this.#o=n;let r=this.#d(),i=new Set,a=e=>this.#p(n,e,r,i),o=L(`div`,`slicc-layout__row`),s=a(`left`),c=a(`right`);s&&o.appendChild(s);let l=this.#m(n,r,i);l.style.flex=`1 1 0`,o.appendChild(l),c&&o.appendChild(c);let u=[],d=a(`top`);d&&u.push(d),u.push(o);let f=a(`bottom`);f&&u.push(f);let p=this.#g(n,r,i);p&&u.push(p);for(let[e,t]of r)i.has(e)||t.parentElement!==this.#i&&this.#i.appendChild(t);this.#r.replaceChildren(...u),this.#l.takeRecords(),this.#t=n,this.#a=i,this.#o=null,!t?.silent&&this.dispatchEvent(new CustomEvent(`slicc-layout-change`,{bubbles:!0,composed:!0,detail:{layout:v(n),reason:e}}))}#p(e,t,n,r){let i=e.docks.filter(e=>e.edge===t);if(i.length===0)return null;let a=[];for(let o of i){let i=L(`div`,`slicc-layout__dock slicc-layout__dock--${t}`);i.dataset.edge=t;let s=!1;for(let t of o.panels){let a=n.get(t);!a||e.panels[t]?.visible===!1||(this.#_(a,e,t),i.appendChild(a),r.add(t),s=!0)}s&&(i.style.flex=o.size==null?`0 0 auto`:d(o.size),a.push(i))}if(a.length===0)return null;if(a.length===1)return a[0];let o=L(`div`,`slicc-layout__dockstack slicc-layout__dockstack--${t}`);return o.dataset.edge=t,o.append(...a),o.style.flex=`0 0 auto`,o}#m(e,t,n){let r=e.zones??(e.center?p(e.center):{}),i=L(`div`,`slicc-layout__work`),a=i=>{let a=e.locked||(r.locked??[]).includes(i),o=(r[i]??[]).map(r=>this.#h(r,i,e,t,n)).filter(e=>e!==null);if(o.length===0)return null;let s=L(`div`,`slicc-layout__zone slicc-layout__zone--${i}`);s.dataset.zone=i;let c=_(r,i);s.dataset.axis=c,o.forEach((e,t)=>{if(t>0){let e=this.#u.buildZonePanelDivider(i,c,s,a);e&&s.appendChild(e)}s.appendChild(e)});let l=r.sizes?.[i];return s.style.flex=i===`center`?`1 1 0`:d(l??void 0),s},o=(t,n,i)=>{let o=n.map(e=>({zone:e,element:a(e)})).filter(e=>!!e.element);o.forEach((n,a)=>{if(a>0){let s=o[a-1].zone,c=e.locked||(r.locked??[]).includes(s)||(r.locked??[]).includes(n.zone),l=this.#u.buildZoneDivider(s,n.zone,i,t,c);l&&t.appendChild(l)}t.appendChild(n.element)})},s=L(`div`,`slicc-layout__work-row`);o(s,[`left`,`center`,`right`],!0);let c=a(`top`),l=a(`bottom`),u=[];return c&&u.push({zone:`top`,element:c}),u.push({zone:`center`,element:s}),l&&u.push({zone:`bottom`,element:l}),u.forEach((t,n)=>{if(n>0){let a=u[n-1].zone,o=e.locked||(r.locked??[]).includes(a)||(r.locked??[]).includes(t.zone),s=this.#u.buildZoneDivider(a,t.zone,!1,i,o);s&&i.appendChild(s)}i.appendChild(t.element)}),i}#h(e,t,n,r,i){let a=r.get(e);if(!a||n.panels[e]?.visible===!1)return null;let o=L(`div`,`slicc-layout__slot`);return o.dataset.panelId=e,o.dataset.zone=t,o.style.flex=d(n.panels[e]?.size??void 0),this.#_(a,n,e),o.appendChild(a),this.#u.decorateSlot(o,e),i.add(e),o}applyMove(e,t){if(this.isLocked(e))return;let n=aa(this.#e,this.environment()),r=n.zones??p(n.center??null),i=u(r,e,t);i===r&&n.zones||(n.zones=i,n.center=null,this.#f(`rearrange`))}applyResize(e,t){let n=aa(this.#e,this.environment()).zones,r=n?.[e];if(!n||!r||r.length!==t.length)return;let i={...this.#e.panels??{}};r.forEach((e,n)=>{i[e]={...i[e],size:t[n]}}),this.#e.panels=i}applyZoneResize(e,t){let n=aa(this.#e,this.environment());n.zones&&(n.zones.sizes={...n.zones.sizes,[e]:t})}rerender(){this.#f(`resize`,{silent:!0})}commitResize(){this.#f(`resize`)}#g(e,t,n){if(e.floating.length===0)return null;let r=L(`div`,`slicc-layout__floating`),i=!1;for(let a of e.floating){let o=t.get(a.panel);!o||e.panels[a.panel]?.visible===!1||(this.#_(o,e,a.panel),o.setAttribute(`presentation`,`floating`),a.anchor&&o.setAttribute(`anchor`,a.anchor),a.width!=null&&(o.style.width=Ca(a.width)),a.height!=null&&(o.style.height=Ca(a.height)),r.appendChild(o),n.add(a.panel),i=!0)}return i?r:null}#_(e,t,n){e.toggleAttribute(`locked`,l(t,n)),e.removeAttribute(`hidden`),e.setAttribute(`presentation`,`docked`),e.removeAttribute(`anchor`),e.style.removeProperty(`width`),e.style.removeProperty(`height`)}#v(){typeof ResizeObserver>`u`||(this.#s=new ResizeObserver(()=>{this.#e.variants?.length&&(this.#c||=requestAnimationFrame(()=>{this.#c=0;let e=y(this.#e,this.environment()),t=this.#t?.appliedVariants.join(`,`)??``;e.appliedVariants.join(`,`)!==t&&this.#f(`viewport`)}))}),this.#s.observe(this))}};function Ca(e){return typeof e==`number`?`${e}px`:e}S(`slicc-layout`,Sa);var wa=T(`
|
|
3789
3789
|
:host {
|
|
3790
3790
|
display: inline-grid;
|
|
3791
3791
|
place-items: center;
|
|
@@ -3832,7 +3832,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
|
|
|
3832
3832
|
object-fit: cover;
|
|
3833
3833
|
display: block;
|
|
3834
3834
|
}
|
|
3835
|
-
`),
|
|
3835
|
+
`),Ta=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=[wa],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():Da(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await Ea(t)}?s=${this.#n()}&d=404`:null}#n(){let e=this.getBoundingClientRect().width;return Math.max(1,Math.round((e>0?e:30)*2))}#r(e){e==null||e.trim()===``?this.style.removeProperty(`--avatar-size`):this.style.setProperty(`--avatar-size`,e)}#i=()=>{this.dispatchEvent(new CustomEvent(`slicc-avatar-click`,{bubbles:!0,composed:!0}))};#a=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())};#o(){let e=++this.#t,t=this.src,n=this.email,r=this.resolvedInitials,i=this.label??this.name??(r===`?`?`Account`:r);this.setAttribute(`aria-label`,i);let a=[w(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=w(`img`,{class:`img`,part:`image`,src:t,alt:i});n.addEventListener(`load`,()=>{e===this.#t&&this.#e.querySelector(`.me`)?.classList.add(`has-img`)}),n.addEventListener(`error`,()=>{e===this.#t&&(n.remove(),this.#e.querySelector(`.me`)?.classList.remove(`has-img`))}),a.push(n)}let o=w(`div`,{class:`me`,part:`avatar`},w(`slot`,null,...a));this.#e.replaceChildren(o),!t&&n&&this.#s(n,e)}#s(e,t){this.gravatarUrl(e).then(e=>{if(!e||t!==this.#t)return;let n=new Image;n.onload=()=>{if(t!==this.#t||!this.isConnected)return;let n=this.#e.querySelector(`.me`);n&&(n.style.backgroundImage=`url("${e}")`,n.classList.add(`has-img`))},n.src=e}).catch(()=>{})}};async function Ea(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 Da(e){if(!e)return``;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}S(`slicc-avatar`,Ta);var Oa=5,ka=1;function Aa(e){return e.replace(`claude-`,``)}function ja(e){return e==null||e===0?``:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}function Ma(e){if(e.length<=Oa)return{individuals:e,buckets:[]};let t=[...e].sort((e,t)=>t.cost-e.cost),n=t.slice(0,Oa),r=[],i={count:0,cost:0};for(let e of t.slice(Oa))i.count+=1,i.cost+=e.cost,i.cost>=ka&&(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 Na=T(`
|
|
3836
3836
|
:host {
|
|
3837
3837
|
position: absolute;
|
|
3838
3838
|
top: calc(100% + 8px);
|
|
@@ -3956,7 +3956,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
|
|
|
3956
3956
|
font-variant-numeric: tabular-nums;
|
|
3957
3957
|
color: var(--ink);
|
|
3958
3958
|
}
|
|
3959
|
-
`);S(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3959
|
+
`);S(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Na]}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=ja(e.tokens);return w(`div`,{class:`model-row`},w(`span`,{class:`model-name`},Aa(e.model)),t?w(`span`,{class:`model-tokens`},t):!1,w(`span`,{class:`model-cost`},`$${e.cost.toFixed(2)}`))});e.push(w(`div`,{class:`section section--models`},w(`div`,{class:`section-title`},`BY MODEL`),...t))}if(this.#n.length>0){let t=Ma(this.#n),n=t.individuals.map(e=>w(`div`,{class:`scoop-row`},w(`span`,{class:`scoop-name`},e.name),w(`span`,{class:`scoop-cost`},`$${e.cost.toFixed(2)}`))),r=t.buckets.map(e=>w(`div`,{class:`bucket-row`,part:`bucket`},`${e.count} ${e.count===1?`agent`:`agents`} · $${e.cost.toFixed(2)}`));e.push(w(`div`,{class:`section section--scoops`},w(`div`,{class:`section-title`},`BY AGENT`),...n,...r))}let t=this.#r??this.#t.reduce((e,t)=>e+t.cost,0);e.push(w(`div`,{class:`total-row`},w(`span`,{class:`total-label`},`Total`),w(`span`,{class:`total-cost`},`$${t.toFixed(2)}`)));let n=w(`div`,{class:`card`},...e);this.#e.replaceChildren(n)}});var Pa=T(`
|
|
3960
3960
|
:host {
|
|
3961
3961
|
display: flex;
|
|
3962
3962
|
align-items: center;
|
|
@@ -3985,7 +3985,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
|
|
|
3985
3985
|
min-width: 0;
|
|
3986
3986
|
background: var(--line, #e5e5e5);
|
|
3987
3987
|
}
|
|
3988
|
-
`);S(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3988
|
+
`);S(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Pa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label??w(`slot`);this.#e.replaceChildren(w(`span`,{class:`label`,part:`label`},e))}});var Fa=`CLI float`;function Ia(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 La(e){let t=Ia(e);return t==null?null:`$${t.toFixed(2)}`}function Ra(e){return`${La(e)??`$0.00`}/h`}var za=720,Ba=T(`
|
|
3989
3989
|
:host {
|
|
3990
3990
|
position: relative;
|
|
3991
3991
|
display: inline-flex;
|
|
@@ -4102,7 +4102,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
|
|
|
4102
4102
|
@media (prefers-reduced-motion: reduce) {
|
|
4103
4103
|
.tip { transition: none; }
|
|
4104
4104
|
}
|
|
4105
|
-
`);S(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`rate`,`spent`];#e;#t=null;#n=null;#r=[];#i=[];#a;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4105
|
+
`);S(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`rate`,`spent`];#e;#t=null;#n=null;#r=[];#i=[];#a;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ba]}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`)??Fa}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(Ra(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)<=za?this.setAttribute(`title`,this.#o()):this.removeAttribute(`title`)}#c(){let e=[];this.online&&e.push(w(`span`,{class:`fdot`,part:`dot`}));let[t,...r]=this.label.split(` · `),i=[w(`span`,{class:`runtime`},t)];r.length>0&&i.push(w(`span`,{class:`detail`},` · ${r.join(` · `)}`)),e.push(w(`span`,{class:`label`,part:`label`},w(`slot`,null,...i))),e.push(w(`span`,{class:`sep`,part:`sep`}));let a=w(`span`,{class:`spent`,part:`spent rate`},n(`circle-dollar-sign`,{size:12}),w(`span`,{class:`amount`},Ra(this.rate)));a.addEventListener(`mouseenter`,()=>this.#l()),a.addEventListener(`mouseleave`,()=>this.#u()),e.push(a),e.push(w(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},this.#o())),this.#n=null,this.#e.replaceChildren(...e),this.#s()}#l(){if(clearTimeout(this.#a),!this.#n){let e=document.createElement(`slicc-cost-overlay`);e.models=this.#r,e.scoops=this.#i,e.total=Ia(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 Va=T(`
|
|
4106
4106
|
:host { display: inline-grid; }
|
|
4107
4107
|
:host([hidden]) { display: none; }
|
|
4108
4108
|
.iconbtn {
|
|
@@ -4131,7 +4131,7 @@ ${da}`,_a=`slicc-layout-style`;function va(e){if(e.getElementById(_a))return;let
|
|
|
4131
4131
|
.iconbtn:disabled:hover { background: var(--canvas); color: var(--txt-2); }
|
|
4132
4132
|
.icon { display: grid; place-items: center; pointer-events: none; }
|
|
4133
4133
|
.icon svg { display: block; }
|
|
4134
|
-
`),
|
|
4134
|
+
`),Ha=`plus`,Ua=16;S(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Va]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??Ha}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){e?this.setAttribute(`disabled`,``):this.removeAttribute(`disabled`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label,t=w(`slot`,null,w(`span`,{class:`icon`},n(this.icon,{size:Ua,part:`icon`}))),r=w(`button`,{type:`button`,class:`iconbtn`,part:`button`,"aria-label":e??void 0,title:e??void 0,disabled:this.disabled},t);this.#e.replaceChildren(r)}});var Wa=`
|
|
4135
4135
|
slicc-pane {
|
|
4136
4136
|
display: flex;
|
|
4137
4137
|
flex-direction: column;
|
|
@@ -4170,7 +4170,7 @@ slicc-pane .slicc-pane__body {
|
|
|
4170
4170
|
min-height: 0;
|
|
4171
4171
|
overflow: auto;
|
|
4172
4172
|
}
|
|
4173
|
-
`,
|
|
4173
|
+
`,Ga=`slicc-pane-style`;function Ka(e){if(e.getElementById(Ga))return;let t=e.createElement(`style`);t.id=Ga,t.textContent=Wa,(e.head??e.documentElement).appendChild(t)}S(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){Ka(this.ownerDocument),this.#r()}attributeChangedCallback(e,t,n){e===`elevated`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-pane-change`,{bubbles:!0,composed:!0,detail:{elevated:n!==null}}))}get elevated(){return this.hasAttribute(`elevated`)}set elevated(e){e?this.setAttribute(`elevated`,``):this.removeAttribute(`elevated`)}#r(){if(this.#n)return;this.#n=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-pane__surface`))),t=this.ownerDocument.createElement(`div`);t.className=`slicc-pane__surface`,t.setAttribute(`part`,`surface`),this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-pane__header`,this.#e.setAttribute(`part`,`header`),this.#t=this.ownerDocument.createElement(`div`),this.#t.className=`slicc-pane__body`,this.#t.setAttribute(`part`,`body`),t.append(this.#e,this.#t);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`header`?this.#e.appendChild(t):this.#t.appendChild(t);this.appendChild(t)}});var qa=`
|
|
4174
4174
|
slicc-press-button {
|
|
4175
4175
|
display: inline-flex;
|
|
4176
4176
|
}
|
|
@@ -4262,7 +4262,7 @@ slicc-press-button {
|
|
|
4262
4262
|
animation: none;
|
|
4263
4263
|
}
|
|
4264
4264
|
}
|
|
4265
|
-
`,
|
|
4265
|
+
`,Ja=`slicc-press-button-style`;function Ya(e){if(e.getElementById(Ja))return;let t=e.createElement(`style`);t.id=Ja,t.textContent=qa,(e.head??e.documentElement).appendChild(t)}var Xa=`slicc-press-btn`,Za=`is-squish`,Qa=`is-wobble`;S(`slicc-press-button`,class extends HTMLElement{static get observedAttributes(){return[`label`,`tooltip`,`tooltip-pos`,`disabled`]}innerBtn=null;pressLayer=null;handle=null;initialized=!1;pendingShortTimer=null;pendingShortEvent=null;animEndListener=null;connectedCallback(){Ya(this.ownerDocument),this.initialized?this.handle===null&&this.attachGesture():this.initialize(),this.syncAttributes()}disconnectedCallback(){this.handle?.destroy(),this.handle=null,this.clearPendingShort(),this.clearRipple(),this.clearAnimation()}attributeChangedCallback(){this.initialized&&this.syncAttributes()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get tooltip(){return this.getAttribute(`tooltip`)}set tooltip(e){e==null?this.removeAttribute(`tooltip`):this.setAttribute(`tooltip`,e)}setIcon(e){this.initialized||this.initialize();let t=this.innerBtn,n=this.pressLayer;for(let e of Array.from(t.childNodes))e!==n&&e.remove();let r=new DOMParser().parseFromString(e,`text/html`).body;for(;r.firstChild;)t.appendChild(r.firstChild)}focus(e){this.initialized||this.initialize(),this.innerBtn?.focus(e)}initialize(){this.initialized=!0;let e=w(`span`,{class:`${Xa}__press-layer`,part:`press-layer`}),t=w(`button`,{type:`button`,class:`${Xa}__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 ir;let t=Number(e);return Number.isFinite(t)&&t>0?t:ir}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(Za):e===`double-click`&&this.playAnimation(Qa);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(Za,Qa))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=ar(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=`${Xa}__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 $a=T(`
|
|
4266
4266
|
:host { display: inline-flex; }
|
|
4267
4267
|
:host([hidden]) { display: none; }
|
|
4268
4268
|
|
|
@@ -4292,7 +4292,7 @@ slicc-press-button {
|
|
|
4292
4292
|
outline: 2px solid var(--violet);
|
|
4293
4293
|
outline-offset: 2px;
|
|
4294
4294
|
}
|
|
4295
|
-
`);S(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4295
|
+
`);S(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[$a]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get hue(){return this.hasAttribute(`hue`)}set hue(e){this.toggleAttribute(`hue`,!!e)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,!!e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.color,t=[`sw`];this.hue&&t.push(`hue`),this.selected&&t.push(`on`);let n=w(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},w(`slot`));e&&n.style.setProperty(`--swatch-color`,e),n.addEventListener(`click`,this.#n),this.#e.replaceChildren(n)}#n=()=>{this.selected=!0,this.dispatchEvent(new CustomEvent(`select`,{detail:{color:this.color},bubbles:!0,composed:!0}))}});var eo=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),to=T(`
|
|
4296
4296
|
:host {
|
|
4297
4297
|
display: inline-flex;
|
|
4298
4298
|
vertical-align: middle;
|
|
@@ -4352,7 +4352,7 @@ slicc-press-button {
|
|
|
4352
4352
|
:host-context(.dark)[hue="amber"] .tag, :host-context([data-theme="dark"])[hue="amber"] .tag { background: color-mix(in srgb, var(--amber) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--amber) 38%, var(--line)); }
|
|
4353
4353
|
:host-context(.dark)[hue="waffle"] .tag, :host-context([data-theme="dark"])[hue="waffle"] .tag { background: color-mix(in srgb, var(--waffle) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--waffle) 38%, var(--line)); }
|
|
4354
4354
|
:host-context(.dark)[hue="green"] .tag, :host-context([data-theme="dark"])[hue="green"] .tag { background: color-mix(in srgb, var(--green) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--green) 38%, var(--line)); }
|
|
4355
|
-
`);S(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4355
|
+
`);S(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[to]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&eo.has(e)?e:null}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get dot(){return this.hasAttribute(`dot`)}set dot(e){e?this.setAttribute(`dot`,``):this.removeAttribute(`dot`)}#t(){let e=this.label??w(`slot`),t=w(`span`,{class:`tag`,part:`tag`},this.dot?w(`span`,{class:`dot`,part:`dot`}):null,w(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var no=T(`
|
|
4356
4356
|
:host {
|
|
4357
4357
|
position: fixed;
|
|
4358
4358
|
inset: 0;
|
|
@@ -4447,7 +4447,7 @@ video {
|
|
|
4447
4447
|
color: var(--txt-3, #717171);
|
|
4448
4448
|
font-size: 13px;
|
|
4449
4449
|
}
|
|
4450
|
-
`),
|
|
4450
|
+
`),R=null,z=null,ro=class e extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[no]}disconnectedCallback(){for(let e of this.#t)URL.revokeObjectURL(e);this.#t.length=0,R===this&&(R=null)}static open(t){e.close();let r=document.createElement(`slicc-quick-look`),i=t.path.split(`/`).pop()||t.path,a=w(`div`,{class:`backdrop`}),o=w(`button`,{class:`x`});o.appendChild(n(`x`,{size:14}));let s=w(`div`,{class:`header`},i,o),c=w(`div`,{class:`content`});c.appendChild(r.#r(t));let l=w(`div`,{class:`panel`},s,c);l.tabIndex=-1,r.#e.append(a,l),document.body.appendChild(r),R=r,l.focus(),a.addEventListener(`click`,()=>r.#n(`backdrop`)),o.addEventListener(`click`,()=>r.#n(`close-button`)),z&&document.removeEventListener(`keydown`,z),z=e=>{e.key===`Escape`&&r.#n(`escape`)},document.addEventListener(`keydown`,z)}static close(){if(R){for(let e of R.#t)URL.revokeObjectURL(e);R.remove(),R=null}z&&=(document.removeEventListener(`keydown`,z),null)}#n(t){this.dispatchEvent(new CustomEvent(`quick-look-close`,{bubbles:!0,composed:!0,detail:{reason:t}})),e.close()}#r(e){let t=e.mimeType;if(t.startsWith(`text/`)||t===`application/json`)return w(`pre`,null,typeof e.content==`string`?e.content:new TextDecoder().decode(e.content));if(t.startsWith(`image/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`img`),i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r.alt=e.path.split(`/`).pop()||``,r}if(t.startsWith(`audio/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`audio`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}if(t.startsWith(`video/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`video`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}return w(`div`,{class:`fallback`},`Preview not available for this file type (${io(typeof e.content==`string`?e.content.length:e.content.byteLength)})`)}};function io(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}S(`slicc-quick-look`,ro);var ao=`
|
|
4451
4451
|
.slicc-chatpane {
|
|
4452
4452
|
flex: 1 1 0;
|
|
4453
4453
|
width: 100%;
|
|
@@ -4488,7 +4488,7 @@ video {
|
|
|
4488
4488
|
-webkit-mask-image: none;
|
|
4489
4489
|
mask-image: none;
|
|
4490
4490
|
}
|
|
4491
|
-
`,
|
|
4491
|
+
`,oo=`slicc-chatpane-style`;function so(e){if(e.getElementById(oo))return;let t=e.createElement(`style`);t.id=oo,t.textContent=ao,(e.head??e.documentElement).appendChild(t)}var co=[`slicc-chat-thread`,`slicc-composer`];S(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){so(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 co)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 lo=`
|
|
4492
4492
|
.slicc-shell { display: flex; flex: 1; min-height: 0; }
|
|
4493
4493
|
.slicc-shell > slicc-dock-tree,
|
|
4494
4494
|
.slicc-shell > .dock-tree {
|
|
@@ -4504,18 +4504,22 @@ video {
|
|
|
4504
4504
|
and blur the rail's own opaque strip. */
|
|
4505
4505
|
.slicc-shell > slicc-dock,
|
|
4506
4506
|
.slicc-shell > .dock { flex: 0 0 48px; position: relative; z-index: 3; }
|
|
4507
|
-
`,
|
|
4507
|
+
`,uo=`slicc-shell-style`;function fo(e){if(e.getElementById(uo))return;let t=e.createElement(`style`);t.id=uo,t.textContent=lo,(e.head??e.documentElement).appendChild(t)}var po=`chat`;S(`slicc-shell`,class extends HTMLElement{#e=e=>{let t=e.detail?.placed;if(!Array.isArray(t))return;let n=t.some(e=>e!==po);this.querySelector(`slicc-chatpane`)?.toggleAttribute(`narrow`,n)};connectedCallback(){fo(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.addEventListener(`dock-tree-render`,this.#e)}disconnectedCallback(){this.removeEventListener(`dock-tree-render`,this.#e)}get dockTree(){return this.querySelector(`:scope > slicc-dock-tree, :scope > .dock-tree`)}get dock(){return this.querySelector(`:scope > slicc-dock, :scope > .dock`)}});var mo=[`idle`,`thinking`,`working`,`awaiting`],ho=.22,go=.08,_o=3400,vo=4600,yo=.38,bo=2600,xo=.22,So=1e3,Co=.1,wo=.55,To=.16,Eo={left:{raise:-9,tilt:-10},right:{raise:2,tilt:6}},Do=[{x:45,y:-15},{x:150,y:-10},{x:95,y:-25},{x:160,y:-30},{x:40,y:-28}],Oo=1300,ko=[{x:70,y:60},{x:130,y:40},{x:100,y:72},{x:55,y:30},{x:148,y:62}],Ao=4100,jo=2.2,Mo={x:100,y:66};function No(e,t,n){return e+(t-e)*n}function B(e,t,n,r){return e+(t-e)*Math.min(1,n*r)}function Po(e){return e===null?null:mo.includes(e)?e:`idle`}function Fo(e){let t=Number.parseFloat(e??``);return Number.isFinite(t)&&t>=0?t:90}function Io(e){return+(e===`working`)}function Lo(e){return No(38,10,e)}function Ro(e,t){return No(e,e*ho,t)}function zo(e){return e<=50?1:e>=85?2.2:1+(e-50)/35*1.2}function Bo(e){return e<=0?1:1+To*Math.min(1,e/350)}function Vo(e){return Math.max(2,Math.min(16,38-e-4))}function Ho(e){return e>.001?12+e*2*38:9}function Uo(e){return e>.001?88-e*2*38:91}function Wo(e,t){let n=e-50;return No(Math.sqrt(Math.max(0,1444-n*n)),36,t)}function Go(e,t){return e<=t?Co:No(Co,wo,Math.min(1,(e-t)/12))}function Ko(e){return e.left.raise<0}function qo(e,t=Math.random){let n=t()<.65?!Ko(e):Ko(e),r={raise:-(7+t()*5),tilt:7+t()*5},i={raise:1+t()*2,tilt:4+t()*3};return n?{left:{raise:r.raise,tilt:-r.tilt},right:i}:{left:{raise:i.raise,tilt:-i.tilt},right:r}}function Jo(e,t,n){return t<2?0:(e+1+Math.floor(n()*(t-1)))%t}var Yo=`http://www.w3.org/2000/svg`,V={cx:55,cy:50,r:38},H={cx:145,cy:50,r:38},Xo=1,Zo=12,Qo=.72,$o=[.08,.36,.68,.94],es=1372365086,ts=2654435769,ns=2246822507,rs=Date.UTC(2001,0,1),is=500,as={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}},os={cone:`#D2691E`,scoop:`#FFB6C1`},ss=T(`
|
|
4508
4508
|
:host{display:block;width:26px;height:26px;pointer-events:none;}
|
|
4509
4509
|
.avatar{position:relative;display:block;width:100%;height:100%;overflow:hidden;border-radius:7px;background:color-mix(in srgb,var(--slicc-agent-tabs-hue) 18%,transparent);}
|
|
4510
4510
|
.icon-inner{position:absolute;inset:0;transform-origin:0 0;transform:translate(var(--tx),var(--ty)) scale(var(--zoom));}
|
|
4511
4511
|
.glyph{position:absolute;left:50%;top:50%;display:block;width:var(--g);height:var(--g);overflow:visible;transform:translate(-50%,-50%);}
|
|
4512
4512
|
.eyes{position:absolute;pointer-events:none;}
|
|
4513
4513
|
.eyes-svg{display:block;overflow:visible;}
|
|
4514
|
-
|
|
4515
|
-
|
|
4514
|
+
.eye-blink,.eye-frozen{transform-box:view-box;}
|
|
4515
|
+
@keyframes slicc-agent-avatar-blink{0%,92%,100%{transform:scaleY(1);}96%{transform:scaleY(${go});}}
|
|
4516
|
+
:host([blink]) .eye-blink{animation:slicc-agent-avatar-blink 3.4s ease-in-out infinite;}
|
|
4516
4517
|
:host([blink]) .eye-r{animation-duration:4.6s;}
|
|
4517
|
-
|
|
4518
|
-
|
|
4518
|
+
/* The engine drives blinks itself so it can commit shape changes at the apex. */
|
|
4519
|
+
.avatar[data-expressive] .eye-blink{animation:none;}
|
|
4520
|
+
.brow{transition:opacity 350ms ease,transform 350ms ease;}
|
|
4521
|
+
@media (prefers-reduced-motion:reduce){:host([blink]) .eye-blink{animation:none;}.brow{transition:none;}}
|
|
4522
|
+
`);function U(e,t,...n){let r=document.createElementNS(Yo,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function cs(e,t,n){e&&e.getAttribute(t)!==n&&e.setAttribute(t,n)}function W(e,t,n){cs(e,t,n.toFixed(2))}function ls(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 us(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])=>U(e,t));return a.push(...i.map(([e,t,r,i,a,o])=>U(`rect`,{x:e,y:t,width:r,height:i,rx:a,ry:a,transform:o,fill:n})),U(`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 ds(e,t){return[U(`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 G(e,t,n,r){return U(`rect`,{x:e-t,y:50-t,width:t*2,height:t*2,rx:n,...r})}function fs(e,t,n,r){return U(`g`,{class:`pupil pupil-${t}`},G(e,n,Ro(n,r),{fill:`#000`}),U(`circle`,{cx:e-n*.3,cy:50-n*.35,r:n*.4,fill:`#fff`}))}function ps(e,t){return U(`line`,{class:`lid-line lid-${t}`,x1:e-38,y1:50,x2:e+38,y2:50,stroke:`#000`,"stroke-width":4,"stroke-linecap":`round`,display:`none`})}function ms(e,t){let n=U(`line`,{class:`brow brow-${t}`,x1:e-22,y1:2,x2:e+22,y2:2,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`,opacity:0});return n.style.transformBox=`fill-box`,n.style.transformOrigin=`center`,n}function hs(e,t,n){let r=U(`g`,{class:`${n} eye-${t}`});return r.style.transformOrigin=`${e}px 50px`,r}function gs(e,t,n){let r=`slicc-agent-avatar-noise-${t}`;return U(`g`,{class:`eye-static eye-body-${t}`},U(`defs`,{},U(`clipPath`,{id:r},G(e,38,n,{class:`noise-clip`}))),G(e,38,n,{class:`socket`,fill:`#fff`}),U(`g`,{class:`noise noise-${t}`,"clip-path":`url(#${r})`,"data-cell-size":Xo}),G(e,38,n,{class:`eye-outline`,fill:`none`,stroke:`#000`,"stroke-width":4}))}function _s(e){return e^=e<<13,e^=e>>>17,e^=e<<5,e>>>0}function vs(e){return(es^Math.imul(e,ns))>>>0}function ys(e,t){return(vs(e)^Math.imul(t,ts))>>>0}function bs(){return Math.floor((Date.now()-rs)/1e3*Zo)>>>0}function xs(e){return[U(`circle`,{cx:e,cy:50,r:38,fill:`#fff`,stroke:`#000`,"stroke-width":4}),U(`line`,{x1:e-15,y1:35,x2:e+15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),U(`line`,{x1:e+15,y1:35,x2:e-15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function Ss(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.toFixed(2)},${u.toFixed(2)})`)}var Cs={now:()=>performance.now(),requestFrame:e=>window.requestAnimationFrame(e),cancelFrame:e=>window.cancelAnimationFrame(e),delay:(e,t)=>window.setTimeout(e,t),cancelDelay:e=>window.clearTimeout(e),repeat:(e,t)=>window.setInterval(e,t),cancelRepeat:e=>window.clearInterval(e)};S(`slicc-agent-avatar`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`fill`,`connection`,`activity`,`gaze-target`,`drowse-delay`];#e;#t=e=>this.#Oe(e);#n=()=>{this.#B(),this.#K(),this.#H()===`static`&&this.#Ce()};#r=null;#i=null;#a=null;#o=null;#s=[];#c=null;#l=16;#u=!1;#d=null;#f=!1;#p=!1;#m=0;#h=0;#g=!1;#_=0;#v=0;#y=Eo;#b={x:100,y:50};#x=0;#S=0;#C=18;#w=null;#T=0;#E=0;#D=0;#O=null;#k=0;#A=[];#j=null;#M=[];#N=Mo;#P=null;#F=Cs;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ss]}connectedCallback(){this.#r=window.matchMedia(`(prefers-reduced-motion: reduce)`),this.#r.addEventListener(`change`,this.#n),this.#L(),this.#B(),this.#K()}disconnectedCallback(){this.#V(),this.#Ee(),this.#Z(),this.#r?.removeEventListener(`change`,this.#n),this.#r=null,this.#p=!1}attributeChangedCallback(e){if(this.isConnected){if(e===`activity`||e===`gaze-target`||e===`drowse-delay`){this.#G();return}this.#L(),this.#B(),this.#K()}}get activity(){return Po(this.getAttribute(`activity`))}set activity(e){e===null?this.removeAttribute(`activity`):this.setAttribute(`activity`,e)}get gazeTarget(){return this.getAttribute(`gaze-target`)}set gazeTarget(e){e===null?this.removeAttribute(`gaze-target`):this.setAttribute(`gaze-target`,e)}get drowseDelay(){return Fo(this.getAttribute(`drowse-delay`))}set drowseDelay(e){this.setAttribute(`drowse-delay`,String(e))}get clock(){return this.#F}set clock(e){if(e===this.#F)return;this.#Z(),this.#F=e;let t=e.now();this.#k=t,this.#w!==null&&(this.#w=t),this.#T=0,this.#E=0,this.#D=0,this.#P=null,this.isConnected&&this.#K()}get expression(){return Object.freeze({activity:this.#d,shape:this.#m,lidTop:this.#_,lidBottom:this.#v,pupilRadius:this.#C,gaze:{...this.#b},brows:this.#y,browsVisible:this.#ge()})}wake(){let e=this.#F.now();this.#w=e,this.#U()||(this.#D=e+350,this.#se()),this.#J()}scrutinize(){this.#E=this.#F.now()+So,this.#J()}glower(){this.#T=this.#F.now()+bo,this.#J()}resetExpression(){this.#oe();let e=this.#F.now();this.#T=0,this.#E=0,this.#D=0,this.#_=0,this.#v=0,this.#y=Eo,this.#N=Mo,this.#P=null,this.#S=0,this.#w=this.#d===`awaiting`?e:null,this.#g=!1,this.#h=Io(this.#d),this.#m=this.#h,this.#k=e,this.#I()&&this.isConnected&&(this.#_e(),this.#K())}#I(){return this.hasAttribute(`activity`)||this.#f}#L(){this.#Ee(),this.#s=[];let e=this.getAttribute(`type`)===`cone`?`cone`:`scoop`,t=as[e],n=this.getAttribute(`color`)??os[e],r=this.#I();this.#d=Po(this.getAttribute(`activity`)),this.#d===`awaiting`&&this.#w===null&&(this.#w=this.#F.now()),this.#p||=(this.#m=this.#h=Io(this.#d),!0);let i=U(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...e===`cone`?us(n,ls(n,-.38),ls(n,.3)):ds(n,ls(n,-.32)));this.#o=U(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...this.#R(r));let a=w(`span`,{class:`eyes`,style:`top:${t.eyes.top}%;left:${t.eyes.left}%;width:${t.eyes.width}%;height:${t.eyes.height}%`});a.append(this.#o);let o=w(`span`,{class:`icon-inner`,style:`--tx:${((.5-t.zoom*((t.eyes.left+t.eyes.width/2)/100))*100).toFixed(2)}%;--ty:${((.5-t.zoom*((t.eyes.top+t.eyes.height/2)/100))*100).toFixed(2)}%;--zoom:${t.zoom}`},i,a);this.#e.replaceChildren(w(`span`,{class:`avatar`,"aria-hidden":`true`,"data-expressive":r||null},o)),this.#i=this.#e.querySelector(`.pupil-l`),this.#a=this.#e.querySelector(`.pupil-r`),this.#H()===`static`&&this.#Ce(),r&&this.#_e()}#R(e){let t=this.#H();if(t===`none`)return[];if(t===`dead`)return[...xs(V.cx),...xs(H.cx)];this.#C=this.#z(),this.#l=Vo(this.#C);let n=Lo(this.#m);return[V.cx,H.cx].map((r,i)=>{let a=i===0?`l`:`r`,o=t===`static`,s=hs(r,a,o?`eye-frozen`:`eye-blink`),c=o?gs(r,a,n):U(`g`,{class:`eye-body eye-body-${a}`},G(r,38,n,{class:`socket`,fill:`#fff`,stroke:`#000`,"stroke-width":4}),fs(r,a,this.#C,this.#m));if(s.append(c),!e)return s;let l=`slicc-agent-avatar-lid-${a}`;return s.append(U(`defs`,{},U(`clipPath`,{id:l},U(`rect`,{class:`lid-clip`,x:r-38-3,y:9,width:82,height:82}))),ps(r,`top`),ps(r,`bottom`),ms(r,a)),c.setAttribute(`clip-path`,`url(#${l})`),s})}#z(){return 18*zo(Math.max(0,Math.min(100,Number.parseFloat(this.getAttribute(`fill`)??`0`)||0)))}#B(){let e=this.#H()===`open`&&!this.#r?.matches&&(this.#d===null||this.#d===`working`);e&&!this.#u?(this.ownerDocument.addEventListener(`pointermove`,this.#t),this.#u=!0):e||(this.#V(),(this.#d===null||this.#d===`working`)&&this.#De())}#V(){this.#u&&=(this.ownerDocument.removeEventListener(`pointermove`,this.#t),!1)}#H(){let e=this.getAttribute(`connection`);if(e!==null&&e!==`connected`)return`static`;let t=this.getAttribute(`eyes`);return t===`dead`||t===`none`||t===`static`?t:`open`}#U(){return this.#r?.matches===!0||this.#H()!==`open`||!this.isConnected||!this.#p}#W(){return this.#H()!==`open`}#G(){let e=Po(this.getAttribute(`activity`)),t=this.#e.querySelector(`.avatar[data-expressive]`)!==null;e===`awaiting`&&this.#d!==`awaiting`?this.#w=this.#F.now():e!==`awaiting`&&(this.#w=null),this.#P=null,this.#d=e,this.#I()!==t&&this.#L(),this.#B(),this.#K()}#K(){if(!this.#I()||!this.isConnected){this.#Z();return}if(this.#W()||this.#r?.matches){this.#X(),this.#q(),this.#ee();return}this.#le(),this.#Y()}#q(){for(let e of this.#M)this.#F.cancelRepeat(e);this.#M=[]}#J(){this.#I()||(this.#f=!0,this.isConnected&&this.#L()),this.#K()}#Y(){this.#O===null&&(this.#k=this.#F.now(),this.#O=this.#F.requestFrame(this.#Q))}#X(){this.#O!==null&&(this.#F.cancelFrame(this.#O),this.#O=null)}#Z(){this.#X();for(let e of this.#A)this.#F.cancelDelay(e);this.#A=[],this.#j!==null&&this.#F.cancelDelay(this.#j),this.#j=null;for(let e of this.#M)this.#F.cancelRepeat(e);this.#M=[]}#Q=e=>{this.#O=this.#F.requestFrame(this.#Q);let t=Math.min(.05,Math.max(0,(e-this.#k)/1e3));this.#k=e,this.#$(e,t),this.#_e()};#$(e,t){let n=Io(this.#d);n!==this.#h&&!this.#g&&this.#ie(n),this.#m=B(this.#m,this.#h,6,t),this.#_=B(this.#_,this.#ne(e,!1),5,t),this.#v=B(this.#v,this.#re(e),5,t),this.#fe(e,t)}#ee(){let e=this.#F.now();this.#W()||(this.#h=this.#m=Io(this.#d),this.#_=this.#ne(e,!0),this.#v=this.#re(e),this.#pe()),this.#_e(),this.#te(e)}#te(e){if(this.#j!==null&&this.#F.cancelDelay(this.#j),this.#j=null,this.#W())return;let t=this.#d===`awaiting`&&this.#w!==null?this.#w+this.drowseDelay*1e3:1/0,n=Math.min(this.#T>e?this.#T:1/0,this.#E>e?this.#E:1/0,t>e?t:1/0);Number.isFinite(n)&&(this.#j=this.#F.delay(()=>this.#ee(),Math.max(0,n-e)+1))}#ne(e,t){let n=this.#T>e?yo:0;if(this.#d!==`awaiting`)return n;let r=this.#w===null?0:(e-this.#w)/1e3,i=this.drowseDelay;return Math.max(n,Go(t&&r>i?i+12:r,i))}#re(e){return this.#E>e?xo:0}#ie(e){if(this.#U()){this.#h=this.#m=e;return}this.#g=!0,this.#se(()=>{this.#h=this.#m=e,this.#g=!1})}#ae(){return[...this.#e.querySelectorAll(`.eye-blink`)]}#oe(){for(let e of this.#A)this.#F.cancelDelay(e);this.#A=[];for(let e of this.#ae())e.style.transition=`none`,e.style.transform=`scaleY(1)`}#se(e){let t=this.#ae();if(t.length===0){e?.();return}t.forEach((t,n)=>{this.#ce(t,n===0?e:void 0)})}#ce(e,t){e.style.transition=`transform 110ms ease-in`,e.style.transform=`scaleY(${go})`,this.#A.push(this.#F.delay(()=>{t?.(),this.#d===`thinking`&&!this.#W()&&(this.#y=qo(this.#y)),e.style.transition=`transform 130ms ease-out`,e.style.transform=`scaleY(1)`},120))}#le(){this.#M.length>0||this.#U()||this.#W()||[_o,vo].forEach((e,t)=>{this.#M.push(this.#F.repeat(()=>{let e=this.#ae()[t];e&&this.hasAttribute(`blink`)&&!this.#W()&&this.#ce(e)},e))})}#ue(e){return this.#d===`thinking`?{target:this.#de(e,Do,Oo),rate:9}:this.#d===`idle`?{target:this.#de(e,ko,Ao),rate:jo}:this.#d===`awaiting`?{target:this.#he(e),rate:6}:null}#de(e,t,n){return e-this.#S>n&&(this.#S=e,this.#x=Jo(this.#x,t.length,Math.random)),t[this.#x]??Mo}#fe(e,t){let n=this.#ue(e);n&&(this.#b={x:B(this.#b.x,n.target.x,n.rate,t),y:B(this.#b.y,n.target.y,n.rate,t)},this.#me())}#pe(){this.#d===`awaiting`?(this.#b=this.#he(this.#F.now()),this.#me()):(this.#d===`thinking`||this.#d===`idle`)&&this.#De()}#me(){this.#i&&Ss(this.#i,V.cx,this.#b.x,this.#b.y,this.#l),this.#a&&Ss(this.#a,H.cx,this.#b.x,this.#b.y,this.#l)}#he(e){if(this.#P!==null&&e-this.#P<is)return this.#N;this.#P=e;let t=this.getAttribute(`gaze-target`),n=t?this.ownerDocument.querySelector(t):null,r=this.#o?.getBoundingClientRect();if(!n||!r?.width||!r.height)return this.#N=Mo,this.#N;let i=n.getBoundingClientRect();return this.#N={x:(i.left+i.width/2-r.left)*(200/r.width),y:(i.top+i.height/2-r.top)*(100/r.height)},this.#N}#ge(){return this.#d===`thinking`}#_e(){let e=this.#F.now(),t=this.#m,n=Lo(t),r=this.#z()*Bo(this.#D-e);this.#C=r,this.#l=Vo(r);for(let[e,i]of[`l`,`r`].entries()){let a=e===0?V.cx:H.cx;this.#ve(i,n),this.#ye(i,a,r,t),this.#be(i,a,t),this.#Se(i)}}#ve(e,t){for(let n of this.#e.querySelectorAll(`.eye-body-${e} .socket, .eye-body-${e} .eye-outline, .eye-body-${e} .noise-clip`))W(n,`rx`,t)}#ye(e,t,n,r){let i=this.#e.querySelector(`.pupil-${e} rect`);if(!i)return;W(i,`x`,t-n),W(i,`y`,50-n),W(i,`width`,n*2),W(i,`height`,n*2),W(i,`rx`,Ro(n,r));let a=this.#e.querySelector(`.pupil-${e} circle`);W(a,`cx`,t-n*.3),W(a,`cy`,50-n*.35),W(a,`r`,n*.4)}#be(e,t,n){let r=this.#e.querySelector(`.eye-${e} .lid-clip`);if(!r)return;let i=Ho(this.#_),a=Uo(this.#v);W(r,`y`,i),W(r,`height`,Math.max(0,a-i)),this.#xe(`.eye-${e} .lid-top`,t,i,n,this.#_),this.#xe(`.eye-${e} .lid-bottom`,t,a,n,this.#v)}#xe(e,t,n,r,i){let a=this.#e.querySelector(e);if(!a)return;let o=Wo(n,r);W(a,`x1`,t-o),W(a,`x2`,t+o),W(a,`y1`,n),W(a,`y2`,n),cs(a,`display`,i>.02?`inline`:`none`)}#Se(e){let t=this.#e.querySelector(`.brow-${e}`);if(!t)return;let n=this.#ge(),r=e===`l`?this.#y.left:this.#y.right;cs(t,`opacity`,n?`1`:`0`),t.style.transform=n?`translateY(${r.raise.toFixed(2)}px) rotate(${r.tilt.toFixed(2)}deg)`:`translateY(6px)`}#Ce(){if(this.#Ee(),this.#s.length===0&&this.#we(),this.#r?.matches){this.#Te(null);return}this.#Te(bs()),this.#c=window.setInterval(()=>{this.#Te(bs())},1e3/Zo)}#we(){let e=this.#o?.getBoundingClientRect(),t=e?Math.min(e.width/200,e.height/100):0,n=Xo/(t>0?t:.25);this.#s=[...this.#e.querySelectorAll(`.noise`)].map((e,t)=>{let r=t===0?V.cx:H.cx,i=[],a=r-V.r,o=r+V.r,s=50-V.r,c=50+V.r;for(let e=s;e<c;e+=n)for(let t=a;t<o;t+=n){let r=U(`rect`,{x:t,y:e,width:Math.min(n,o-t),height:Math.min(n,c-e),opacity:Qo});i.push(r)}return e.replaceChildren(...i),i})}#Te(e){this.#s.forEach((t,n)=>{let r=e===null?vs(n):ys(n,e),i=r===0?es:r;(t[0]?.parentElement)?.setAttribute(`data-seed`,String(i));for(let e of t){i=_s(i);let t=`${$o[i%$o.length]*100}%`;e.setAttribute(`fill`,`rgb(${t} ${t} ${t})`)}})}#Ee(){this.#c!==null&&(window.clearInterval(this.#c),this.#c=null)}#De(){this.#i?.setAttribute(`transform`,`translate(0,0)`),this.#a?.setAttribute(`transform`,`translate(0,0)`)}#Oe(e){if(!this.#o||!this.#i||!this.#a)return;let t=this.#o.getBoundingClientRect();!t.width||!t.height||(this.#b={x:(e.clientX-t.left)*(200/t.width),y:(e.clientY-t.top)*(100/t.height)},this.#me())}});var ws=T(`
|
|
4519
4523
|
:host{display:inline-block;}
|
|
4520
4524
|
.switcher-more{position:relative;}
|
|
4521
4525
|
.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;}
|
|
@@ -4547,14 +4551,14 @@ video {
|
|
|
4547
4551
|
@keyframes scoopReveal{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
|
|
4548
4552
|
@keyframes scoopArc{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}
|
|
4549
4553
|
@media (prefers-reduced-motion:reduce){.popup-row{animation:none;}.popup-row[data-state="working"] .glyph-arc{animation:none;transform:rotate(-90deg);}}
|
|
4550
|
-
`),
|
|
4551
|
-
.slicc-agent-tabs{display:flex;align-items:center;gap:${
|
|
4554
|
+
`),Ts=[4,5,3,7,1,6,2,0,8],Es=`http://www.w3.org/2000/svg`,Ds=5,Os=2*Math.PI*Ds;function K(e,t,...n){let r=document.createElementNS(Es,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function ks(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function As(e){return e.state??`idle`}function js(e){return(90+ks(e)*2.7)/360*Os}function Ms(e,t){let n=[];return e===`initializing`?n.push(K(`circle`,{class:`initializing-ring`,cx:7,cy:7,r:Ds,"stroke-width":1.7})):n.push(K(`circle`,{class:`glyph-base`,cx:7,cy:7,r:Ds,"stroke-width":1.5})),(e===`working`||e===`idle`)&&n.push(K(`circle`,{class:`glyph-arc`,cx:7,cy:7,r:Ds,"stroke-width":2,"stroke-dasharray":`${js(t).toFixed(3)} ${Os.toFixed(3)}`,"stroke-dashoffset":0})),e===`working`&&n.push(K(`circle`,{class:`glyph-pin`,cx:7,cy:7,r:1.25})),e===`broken`&&n.push(K(`line`,{class:`broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),K(`line`,{class:`broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8})),K(`svg`,{class:`status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...n)}function Ns(e){return e.state===`broken`?`broken`:(e.fill??0)>=75?`near-limit`:e.state===`working`?`working`:`idle`}function Ps(e){return e===`broken`?3:e===`near-limit`?2:+(e===`working`)}function Fs(e){let t=e.reduce((e,t)=>{let n=Ns(t);return Ps(n)>Ps(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 Is(e,t=!1){if(t)return w(`span`,{class:`overflow-grid-cell overflow-grid-cell--plus`,"aria-hidden":`true`},w(`span`,{class:`overflow-plus-bar overflow-plus-bar--horizontal`}),w(`span`,{class:`overflow-plus-bar overflow-plus-bar--vertical`}));let n={class:`overflow-grid-cell`,"aria-hidden":`true`};return e&&(n[`data-dot-state`]=e),w(`span`,n)}function Ls(e){let t=e.map((e,t)=>({order:t,state:Ns(e)})).sort((e,t)=>Ps(t.state)-Ps(e.state)||e.order-t.order).slice(0,e.length>9?8:9),n=Array.from({length:Ts.length},()=>Is());return t.forEach((e,t)=>{n[Ts[t]]=Is(e.state)}),e.length>9&&(n[Ts.at(-1)]=Is(void 0,!0)),w(`span`,{class:`overflow-grid`,role:`img`,"aria-label":Fs(e),"data-hidden-count":String(e.length)},...n)}S(`slicc-scoop-overflow`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n;#r;#i;#a;#o=e=>{this.open&&!this.contains(e.target)&&this.close()};#s=e=>{!this.open||e.key!==`Escape`||(e.preventDefault(),this.close(),this.#r.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ws]}connectedCallback(){this.#c()}disconnectedCallback(){document.removeEventListener(`click`,this.#o),document.removeEventListener(`keydown`,this.#s)}attributeChangedCallback(e){e===`open`&&this.#n&&this.#u()}get items(){return this.#t}set items(e){this.#t=Array.isArray(e)?e:[],this.isConnected&&this.#l()}get count(){return this.#t.length}get hasOverflow(){return this.#t.length>0}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}show(){this.open||=!0}close(){this.open&&=!1}toggle(){this.open=!this.open}#c(){this.#i=w(`slot`,{name:`more`},Ls(this.#t)),this.#r=w(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},this.#i),this.#a=w(`div`,{class:`pop`,part:`pop`,role:`menu`}),this.#n=w(`div`,{class:`switcher-more`,part:`wrap`},this.#r,this.#a),this.#r.addEventListener(`click`,e=>{e.stopPropagation(),this.toggle()}),this.#e.replaceChildren(this.#n),this.#l(),this.#u()}#l(){let e=this.#t.length;e>0?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`),this.#n.classList.toggle(`has-overflow`,e>0),this.#r.setAttribute(`aria-haspopup`,`true`);let t=Fs(this.#t);if(this.#r.setAttribute(`aria-label`,`${t}. Show hidden scoops`),this.#i.replaceChildren(Ls(this.#t)),e===0){this.#a.replaceChildren(w(`slot`,{name:`empty`})),this.open&&this.close();return}let n=[];this.#t.forEach((e,t)=>{let r=e.id,i=e.label??e.id,a=As(e),o=ks(e.fill),s=w(`button`,{class:`popup-row`,part:`row`,type:`button`,role:`menuitem`,"aria-label":`${i}: ${a}, ${o}% context fill`,"data-state":a,"data-k":r,style:`--hue:${e.color??`var(--rose)`};--i:${t}`},Ms(a,o),w(`span`,{class:`popup-label`},i),w(`span`,{class:`popup-state`},`${a} · ${o}%`));s.addEventListener(`click`,()=>{let e=s.dataset.k??``,t=this.#t.find(t=>t.id===e);this.#d(e,t?.label??e)}),n.push(s)}),this.#a.replaceChildren(...n)}#u(){let e=this.open;this.#n.classList.toggle(`open`,e),this.#r.setAttribute(`aria-expanded`,e?`true`:`false`),document.removeEventListener(`click`,this.#o),document.removeEventListener(`keydown`,this.#s),e&&(document.addEventListener(`click`,this.#o),document.addEventListener(`keydown`,this.#s))}#d(e,t){this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0})),this.close()}});var q=`slicc-agent-tabs`,Rs=`${q}-style`,zs=`http://www.w3.org/2000/svg`,J=5,Bs=2*Math.PI*J,Vs=26,Hs=8,Us=6,Ws=39,Gs=`sliccy`,Ks=14,qs=5,Js=16,Ys=4,Xs=65,Zs={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},Qs=`
|
|
4555
|
+
.slicc-agent-tabs{display:flex;align-items:center;gap:${Hs}px;min-width:0;overflow:visible;color:var(--ink);font-family:var(--ui);}
|
|
4552
4556
|
.slicc-agent-tabs *{box-sizing:border-box;}
|
|
4553
|
-
.slicc-agent-tabs__focus-avatar{display:block;flex:0 0 ${
|
|
4557
|
+
.slicc-agent-tabs__focus-avatar{display:block;flex:0 0 ${Vs}px;width:${Vs}px;height:${Vs}px;pointer-events:none;}
|
|
4554
4558
|
.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);}
|
|
4555
4559
|
.slicc-agent-tabs__track{display:flex;align-items:center;min-width:0;height:100%;padding:2px;overflow:hidden;}
|
|
4556
4560
|
.slicc-agent-tabs.has-overflow .slicc-agent-tabs__track{padding-right:41px;}
|
|
4557
|
-
.slicc-agent-tabs__segment{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;gap:${
|
|
4561
|
+
.slicc-agent-tabs__segment{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;gap:${qs}px;width:max-content;min-width:var(--slicc-agent-tabs-segment-floor,${Xs}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;}
|
|
4558
4562
|
.slicc-agent-tabs__segment:hover{color:var(--ink);}
|
|
4559
4563
|
.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);}
|
|
4560
4564
|
.slicc-agent-tabs__segment.hide{display:none;}
|
|
@@ -4583,7 +4587,7 @@ video {
|
|
|
4583
4587
|
.slicc-agent-tabs slicc-scoop-overflow::part(pop){right:0;left:auto;}
|
|
4584
4588
|
@keyframes slicc-agent-tabs-arc{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}
|
|
4585
4589
|
@media (prefers-reduced-motion:reduce){.slicc-agent-tabs__glyph-arc{animation:none;transform:rotate(-90deg);}.slicc-agent-tabs__glyph-glow{transition:none;}}
|
|
4586
|
-
`;function
|
|
4590
|
+
`;function $s(e){if(e.getElementById(Rs))return;let t=e.createElement(`style`);t.id=Rs,t.textContent=Qs,(e.head??e.documentElement).append(t)}function Y(e,t,...n){let r=document.createElementNS(zs,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 ec(e){let t=e.ownerDocument.createElement(`canvas`).getContext(`2d`),n=e.ownerDocument.defaultView?.getComputedStyle(e);return!t||!n?Xs:(t.font=n.font,Math.ceil(t.measureText(Gs).width+Ks+qs+Js)+Ys)}function tc(e){return(90+X(e)*2.7)/360*Bs}function nc(e,t){return t===`working`?e.phase===`tool`?`tool`:`thinking`:null}function rc(e,t){return t===`working`?nc(e,t)===`tool`?`working`:`thinking`:t===`idle`?e.awaiting?`awaiting`:`idle`:null}function ic(e,t){return e.state?e.state:e.eyes===`dead`?`broken`:t===e.key?`working`:`idle`}function ac(e){return e.type===`cone`||e.key===`cone`?`cone`:`scoop`}function oc(e){return e.eyes??`open`}function sc(e){return Zs[e.key]??e.color??`var(--rose)`}function cc(e){let t=[Y(`circle`,{class:`${q}__glyph-glow`,cx:7,cy:7,r:J,"stroke-width":1.5}),Y(`circle`,{class:`${q}__glyph-base`,cx:7,cy:7,r:J,"stroke-width":1.5}),Y(`circle`,{class:`${q}__glyph-arc`,cx:7,cy:7,r:J,"stroke-width":2,"stroke-dasharray":`${tc(X(e.fill)).toFixed(3)} ${Bs.toFixed(3)}`,"stroke-dashoffset":0}),Y(`circle`,{class:`${q}__glyph-pin`,cx:7,cy:7,r:1.25}),Y(`rect`,{class:`${q}__glyph-pin-square`,x:5.5,y:5.5,width:3,height:3,rx:.15}),Y(`line`,{class:`${q}__broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),Y(`line`,{class:`${q}__broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8}),Y(`circle`,{class:`${q}__initializing-ring`,cx:7,cy:7,r:J,"stroke-width":1.7})];return Y(`svg`,{class:`${q}__status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...t)}S(`slicc-agent-tabs`,class extends HTMLElement{static observedAttributes=[`active`,`attention`,`connection`,`gaze-target`,`drowse-delay`];#e=[];#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=!1;#c=null;#l=!1;#u=null;#d=e=>this.#w(e);#f=e=>this.#T(e);connectedCallback(){$s(this.ownerDocument),this.classList.add(q),this.setAttribute(`part`,`row`),this.#l||=!0,this.addEventListener(`click`,this.#d),this.addEventListener(`keydown`,this.#f),this.#m(),this.#O(),requestAnimationFrame(()=>this.reflow())}disconnectedCallback(){this.#o?.disconnect(),this.#o=null,this.#c!==null&&cancelAnimationFrame(this.#c),this.#c=null,this.removeEventListener(`click`,this.#d),this.removeEventListener(`keydown`,this.#f)}attributeChangedCallback(){!this.#l||!this.isConnected||(this.#m(),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.#l&&this.isConnected&&(this.#m(),this.reflow())}get attention(){return this.getAttribute(`attention`)}set attention(e){e==null?this.removeAttribute(`attention`):this.setAttribute(`attention`,e)}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get connection(){return this.getAttribute(`connection`)===`disconnected`?`disconnected`:`connected`}set connection(e){this.setAttribute(`connection`,e)}get gazeTarget(){return this.getAttribute(`gaze-target`)}set gazeTarget(e){e==null?this.removeAttribute(`gaze-target`):this.setAttribute(`gaze-target`,e)}get drowseDelay(){let e=this.getAttribute(`drowse-delay`);if(e===null)return null;let t=Number.parseFloat(e);return Number.isFinite(t)?t:null}set drowseDelay(e){e==null?this.removeAttribute(`drowse-delay`):this.setAttribute(`drowse-delay`,String(e))}scrutinize(){this.#t?.scrutinize()}glower(){this.#t?.glower()}wake(){this.#t?.wake()}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.#s)){this.#s=!0;try{this.#p()}finally{this.#s=!1}}}#p(){let e=[...this.querySelectorAll(`.${q}__segment`)];for(let t of e)t.classList.remove(`hide`);if(this.classList.remove(`has-overflow`),e.length===0){this.#C([]);return}this.#u===null&&(this.#u=ec(e[0]),this.style.setProperty(`--slicc-agent-tabs-segment-floor`,`${this.#u}px`));let t=this.clientWidth;if(t<=0){this.#C([]),requestAnimationFrame(()=>{this.isConnected&&this.clientWidth>0&&this.reflow()});return}let n=Math.max(0,t-Vs-Hs-Us),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?Ws:0));if(!a){this.#C([]);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.#C(c)}#m(){let e=this.#E(),t=this.#e.find(e=>e.key===this.active)??this.#e.at(0)??null;this.#h(),this.#v(t),this.#x(t?.key??null),e!=null&&!this.#e.some(t=>t.key===e)&&this.#D(t?.key??null)?.focus()}#h(){if(this.#r&&this.#i&&this.#a&&this.contains(this.#i))return;this.#r=w(`div`,{class:`${q}__track`,part:`track`,role:`tablist`,"aria-label":`Agents`});let e=this.ownerDocument.createElement(`slicc-scoop-overflow`);e.setAttribute(`part`,`overflow`),e.addEventListener(`slicc-scoop-select`,e=>{let t=e.detail?.id;typeof t==`string`&&(e.stopPropagation(),this.select(t))}),this.#a=e,this.#i=w(`div`,{class:`${q}__track-frame`,part:`track-frame`},this.#r,e),this.replaceChildren(this.#i)}#g(e){let t=w(`slicc-agent-avatar`,{class:`${q}__focus-avatar`,part:`avatar`,role:`img`});return this.#_(t,e),t}#_(e,t){let n=ic(t,this.attention);this.#S(e,`type`,ac(t)),this.#S(e,`color`,t.color??null),this.#S(e,`eyes`,oc(t)),this.#S(e,`connection`,this.getAttribute(`connection`)),this.#S(e,`fill`,String(Math.round(X(t.fill)))),this.#S(e,`blink`,n===`working`),this.#S(e,`activity`,rc(t,n)),this.#S(e,`gaze-target`,this.getAttribute(`gaze-target`)),this.#S(e,`drowse-delay`,this.getAttribute(`drowse-delay`)),this.#S(e,`aria-label`,`${t.label??t.key} focused agent`),e.style.setProperty(`--slicc-agent-tabs-hue`,sc(t))}#v(e){if(!e){this.#t?.remove(),this.#t=null,this.#n=null;return}let t=this.#t??this.#g(e);this.#t=t;let n=this.#n!==null&&this.#n!==e.key;this.#n=e.key,this.#_(t,e),n&&t.resetExpression(),(t.parentElement!==this||t.nextElementSibling!==this.#i)&&this.insertBefore(t,this.#i)}#y(e,t){let n=w(`button`,{part:`segment`,type:`button`,role:`tab`},cc(e),w(`span`,{class:`${q}__label`},e.label??e.key));return this.#b(n,e,t),n}#b(e,t,n){let r=ic(t,this.attention),i=nc(t,r),a=X(t.fill),o=this.attention===t.key;e.className=`${q}__segment${t.ephemeral?` ephemeral`:``}`,e.setAttribute(`aria-selected`,String(t.key===n)),e.tabIndex=t.key===n?0:-1;let s=i===`tool`?` (running a tool)`:i?` (thinking)`:``;e.setAttribute(`aria-label`,`${t.label??t.key}: ${r}${s}, ${Math.round(a)}% context fill${o?`, spoke most recently`:``}`),e.dataset.k=t.key,e.dataset.state=r,this.#S(e,`data-phase`,i),this.#S(e,`data-attention`,o?`true`:null),e.style.setProperty(`--slicc-agent-tabs-hue`,sc(t));let c=e.querySelector(`.${q}__label`);c&&(c.textContent=t.label??t.key),e.querySelector(`.${q}__glyph-arc`)?.setAttribute(`stroke-dasharray`,`${tc(a).toFixed(3)} ${Bs.toFixed(3)}`)}#x(e){if(!this.#r)return;let t=new Map;for(let e of this.#r.querySelectorAll(`:scope > .${q}__segment`)){let n=e.dataset.k??``;t.has(n)?e.remove():t.set(n,e)}let n=this.#e.map(n=>{let r=t.get(n.key)??this.#y(n,e);return t.delete(n.key),this.#b(r,n,e),r});for(let e of t.values())e.remove();n.forEach((e,t)=>{let n=this.#r?.children.item(t)??null;n!==e&&this.#r?.insertBefore(e,n)})}#S(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)}#C(e){if(!this.#a)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:ac(n),color:n.color,eyes:oc(n),state:ic(n,this.attention),fill:X(n.fill)}});this.#a.items=t}#w(e){let t=e.target?.closest(`.${q}__segment`);t&&this.contains(t)&&t.dataset.k&&this.select(t.dataset.k)}#T(e){let t=e.target?.closest(`.${q}__segment`);if(!t||!this.contains(t))return;if(e.key===`Enter`||e.key===` `){if(!t.dataset.k)return;e.preventDefault(),this.select(t.dataset.k);return}let n=[...this.querySelectorAll(`.${q}__segment:not(.hide)`)].filter(e=>!e.disabled),r=n.indexOf(t);if(r<0||n.length===0)return;let i;if(e.key===`ArrowLeft`)i=n[(r-1+n.length)%n.length];else if(e.key===`ArrowRight`)i=n[(r+1)%n.length];else if(e.key===`Home`)i=n[0];else if(e.key===`End`)i=n.at(-1);else return;e.preventDefault(),i?.focus()}#E(){let e=this.ownerDocument.activeElement;return!(e instanceof Element)||!this.contains(e)?null:e.closest(`.${q}__segment`)?.dataset.k??null}#D(e){return e==null?null:[...this.querySelectorAll(`.${q}__segment`)].find(t=>t.dataset.k===e)??null}#O(){this.#o||typeof ResizeObserver>`u`||(this.#o=new ResizeObserver(()=>{this.#c===null&&(this.#c=requestAnimationFrame(()=>{this.#c=null,this.reflow()}))}),this.#o.observe(this),this.parentElement&&this.#o.observe(this.parentElement))}});var lc=`/**
|
|
4587
4591
|
* SLICC design tokens — lifted verbatim from the prototype
|
|
4588
4592
|
* (proto/StellarRubySwift.html :root + body.dark). Light is the default; dark is
|
|
4589
4593
|
* opt-in. Per project decision the prototype's token vocabulary and light-default
|
|
@@ -4647,7 +4651,7 @@ video {
|
|
|
4647
4651
|
--shaderbg: #171410;
|
|
4648
4652
|
--shadow-pane: rgba(0, 0, 0, 0.35) 0 8px 26px -10px;
|
|
4649
4653
|
}
|
|
4650
|
-
`,
|
|
4654
|
+
`,uc=`slicc-tokens`;function dc(e=document){if(e.getElementById(uc))return;let t=e.createElement(`style`);t.id=uc,t.textContent=lc,(e.head??e.documentElement).appendChild(t)}function fc(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function pc(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>fc(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var mc=T(`
|
|
4651
4655
|
:host { display: inline-flex; flex: 0 0 auto; }
|
|
4652
4656
|
.themetgl {
|
|
4653
4657
|
font: inherit; font-family: var(--ui); font-size: 14px; line-height: 1;
|
|
@@ -4659,7 +4663,7 @@ video {
|
|
|
4659
4663
|
}
|
|
4660
4664
|
.themetgl:hover { background: color-mix(in srgb, var(--ink) 8%, var(--ghost)); }
|
|
4661
4665
|
.themetgl svg { display: block; }
|
|
4662
|
-
`),
|
|
4666
|
+
`),hc=16,gc={light:`moon`,dark:`sun`},_c={light:`Switch to dark mode`,dark:`Switch to light mode`};S(`slicc-theme-toggle`,class extends HTMLElement{static observedAttributes=[`theme`];#e;#t=null;#n=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[mc];let e=w(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},w(`slot`,{name:`glyph-light`},n(gc.light,{size:hc})),w(`slot`,{name:`glyph-dark`,hidden:!0},n(gc.dark,{size:hc})));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(fc(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=_c[e];let t=this.#e.querySelector(`slot[name="glyph-light"]`),n=this.#e.querySelector(`slot[name="glyph-dark"]`);t?.toggleAttribute(`hidden`,e===`dark`),n?.toggleAttribute(`hidden`,e===`light`)}for(let t of document.querySelectorAll(`slicc-add-menu`))t.setAttribute(`theme`,e)}finally{this.#n=!1}t.silent||this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}}),S(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){dc(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;fc(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});var vc=`
|
|
4663
4667
|
slicc-dock-tree {
|
|
4664
4668
|
display: block;
|
|
4665
4669
|
/* Fill the parent shell's flex column. Without this the host collapses to
|
|
@@ -4882,7 +4886,7 @@ slicc-dock-tree .dock-tree__preview {
|
|
|
4882
4886
|
slicc-dock-tree .dock-tree__preview--active {
|
|
4883
4887
|
display: block;
|
|
4884
4888
|
}
|
|
4885
|
-
`,Ms=`slicc-dock-tree-style`;function Ns(e){if(e.getElementById(Ms))return;let t=e.createElement(`style`);t.id=Ms,t.textContent=js,(e.head??e.documentElement).appendChild(t)}var Ps=`slicc-surface`,Fs=`chat`,Is=`sprinkle:`;function Ls(e){return typeof e==`string`&&e.trim().toLowerCase()===`false`}function Rs(e){return e===`chat`?`Chat`:e.startsWith(Is)?e.slice(9):e}var zs=[`top`,`left`,`middle`,`right`,`bottom`],Z=[`left`,`middle`,`right`],Bs=[`top`,`center`,`bottom`],Vs=.02;function Hs(){return{zones:{top:null,left:null,middle:null,right:null,bottom:null},rowFr:{top:1,center:1,bottom:1},colFr:{left:1,middle:1,right:1}}}function Us(e){return JSON.parse(JSON.stringify(e))}function Ws(e,t){if(e.type===`leaf`){t.push(e.surfaceId);return}for(let n of e.children)Ws(n,t)}function Gs(e,t){if(e.type===`leaf`)return e.surfaceId===t?e:null;for(let n of e.children){let e=Gs(n,t);if(e)return e}return null}function Ks(e,t,n){if(n)return!0;function r(e,n){let i=n||e.locked===!0;if(e===t)return i;if(e.type!==`split`)return null;for(let t of e.children){let e=r(t,i);if(e!=null)return e}return null}return r(e,!1)??!1}function qs(e){return e.locked===!0||e.type===`split`&&e.children.some(qs)}function Js(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id||null}function Ys(e){e.style.position=`relative`,e.style.inset=`auto`,e.style.display=`flex`,e.style.flex=`1 1 auto`,e.style.minWidth=`0`,e.style.minHeight=`0`}function Xs(e){e.style.removeProperty(`position`),e.style.removeProperty(`inset`),e.style.removeProperty(`flex`),e.style.removeProperty(`min-width`),e.style.removeProperty(`min-height`),e.style.display=`none`}function Zs(e,t){return{type:`split`,dir:e,children:t,sizes:t.map(()=>1)}}function Qs(e,t,n){e.type===`split`&&e.children.forEach((r,i)=>{r===t?n(e,i):Qs(r,t,n)})}function $s(e,t){if(e.type!==`split`)return null;for(let n=0;n<e.children.length;n++){let r=e.children[n];if(r===t)return{parent:e,index:n};let i=$s(r,t);if(i)return i}return null}function ec(e){if(!e)return null;if(e.type!==`split`)return e;e.children=e.children.map(ec).filter(e=>e!=null);let t=[],n=[];return e.children.forEach((r,i)=>{r.type===`split`&&r.dir===e.dir?r.children.forEach((a,o)=>{t.push(a),n.push((e.sizes[i]||1)*(r.sizes[o]||1))}):(t.push(r),n.push(e.sizes[i]||1))}),e.children=t,e.sizes=n,e.children.length===0?null:e.children.length===1?e.children[0]:e}function tc(e,t,n){let r=e[t];if(r){if(r===n){e[t]=null;return}Qs(r,n,(e,t)=>{e.children.splice(t,1),e.sizes.splice(t,1)}),e[t]=ec(r)}}function nc(e,t,n,r){if(e[t]===n){e[t]=r;return}let i=e[t];i&&Qs(i,n,(e,t)=>{e.children[t]=r})}function rc(e,t,n){let r=t.reduce((e,t)=>e+t,0)-e;if(r<=0)return null;let i=Math.min(.98,Math.max(Vs,n));return i*r/(1-i)}function ic(e,t,n){let r=(t-e.left)/e.width,i=(n-e.top)/e.height;if(r>.34&&r<.66&&i>.34&&i<.66)return`center`;let a={n:i,s:1-i,w:r,e:1-r},o=Object.entries(a);return o.sort((e,t)=>e[1]-t[1]),o[0][0]}function ac(e){let t=document.createElement(`div`);return t.className=`dock-tree__divider dock-tree__divider--${e}`,t}function oc(){let e=document.createElement(`div`);return e.className=`dock-tree__root`,e}function sc(){let e=document.createElement(`div`);return e.className=`dock-tree__parking`,e.hidden=!0,e}function cc(){let e=document.createElement(`div`);return e.className=`dock-tree__ghost`,e}function lc(){let e=document.createElement(`div`);return e.className=`dock-tree__preview`,e}S(`slicc-dock-tree`,class extends HTMLElement{static observedAttributes=[`tiles-movable`];#e=Hs();#t=!1;#n=!1;#r=new Set;#i=null;#a=null;#o=new WeakMap;#s=new Set;#c=oc();#l=sc();#u=cc();#d=lc();#f=new MutationObserver(()=>this.#x());connectedCallback(){Ns(this.ownerDocument),this.#n=!0,this.#c.parentElement!==this&&this.append(this.#c),this.#l.parentElement!==this&&this.append(this.#l),this.#u.parentElement!==this&&this.append(this.#u),this.#d.parentElement!==this&&this.append(this.#d),this.#x(),this.#f.observe(this,{childList:!0})}disconnectedCallback(){this.#n=!1,this.#f.disconnect(),this.#L()}attributeChangedCallback(e,t,n){e!==`tiles-movable`||t===n||!this.#n||(this.tilesMovable||this.#L(),this.#x())}get tilesMovable(){let e=this.getAttribute(`tiles-movable`);return e!==null&&!Ls(e)}set tilesMovable(e){this.toggleAttribute(`tiles-movable`,!!e&&!Ls(e))}setTree(e){this.#e=e?Us(e):Hs(),this.#n&&this.#x()}getTree(){return Us(this.#e)}setPinned(e){this.#r=new Set(e)}getSurfaceIds(){let e=[];for(let t of zs){let n=this.#e.zones[t];n&&Ws(n,e)}return e}#p(e){return this.#e.zones[e]!=null||this.#t}#m(e,t){let n=this.#e.zones[t];return n?Ks(n,e,this.#e.locked===!0):!1}#h(e){if(this.#e.locked===!0)return!0;let t=this.#e.zones[e];return t!=null&&qs(t)}#g(e){return this.#e.locked===!0?!0:e===`center`?Z.some(e=>this.#h(e)):this.#h(e)}placeSurface(e,t){if(this.getSurfaceIds().includes(e))return;let n={type:`leaf`,surfaceId:e},r=this.#e.zones[t];this.#e.zones[t]=r==null?n:ec(Zs(`col`,[r,n])),this.#n&&this.#x(),this.#R()}removeSurface(e){if(!this.#r.has(e))for(let t of zs){let n=this.#e.zones[t];if(!n)continue;let r=Gs(n,e);if(r){if(this.#m(r,t))return;tc(this.#e.zones,t,r),this.#n&&this.#x(),this.#R();return}}}moveSurfaceToZone(e,t){let n=!1;for(let r of zs){let i=this.#e.zones[r];if(!i)continue;let a=Gs(i,e);if(a){if(n=!0,this.#m(a,r)||r===t&&i===a)return;tc(this.#e.zones,r,a);break}}if(!n){this.placeSurface(e,t);return}let r={type:`leaf`,surfaceId:e};this.#e.zones[t]=r,this.#n&&this.#x(),this.#R()}setSurfaceSize(e,t){let n=this.#_(e);if(!n)return!1;let r=this.#z().get(e)??null,i=r?.getBoundingClientRect()??null,a=r?.closest(`.dock-tree__leaf`)?.getBoundingClientRect()??i,o=!1;if(n.width&&(t.widthPx!=null||t.widthPercent!=null)){let e=a&&i?Math.max(0,a.width-i.width):0;o=this.#b(n.width,t.widthPx==null?void 0:t.widthPx+e,t.widthPercent,a?.width)||o}if(n.height&&(t.heightPx!=null||t.heightPercent!=null)){let e=a&&i?Math.max(0,a.height-i.height):0;o=this.#b(n.height,t.heightPx==null?void 0:t.heightPx+e,t.heightPercent,a?.height)||o}return o&&(this.#x(),this.#k()),o}#_(e){for(let t of zs){let n=this.#e.zones[t];if(!n)continue;let r=Gs(n,e);if(!r)continue;if(this.#m(r,t))return{width:null,height:null};let i=$s(n,r);if(i){let{parent:e,index:t}=i,n={currentFr:e.sizes[t]??1,groupFr:e.sizes,apply:n=>{e.sizes[t]=n}};return{width:e.dir===`row`?n:null,height:e.dir===`col`?n:null}}let a=t===`left`||t===`middle`||t===`right`,o=null;if(a){let e=t,n=this.#y();o={currentFr:this.#e.colFr[e],groupFr:n.map(e=>this.#e.colFr[e]),apply:t=>{this.#e.colFr[e]=t}}}let s=a?`center`:t,c=this.#v(),l={currentFr:this.#e.rowFr[s],groupFr:c.map(e=>this.#e.rowFr[e]),apply:e=>{this.#e.rowFr[s]=e}};return{width:o,height:l}}return null}#v(){let e=[];return this.#p(`top`)&&e.push(`top`),Z.some(e=>this.#p(e))&&e.push(`center`),this.#p(`bottom`)&&e.push(`bottom`),e}#y(){return Z.filter(e=>this.#p(e))}#b(e,t,n,r){let i=null;if(n!=null)i=n/100;else if(t!=null&&r!=null&&r>0&&e.currentFr>0){let n=r*e.groupFr.reduce((e,t)=>e+t,0)/e.currentFr;n>0&&(i=t/n)}if(i==null)return!1;let a=rc(e.currentFr,e.groupFr,i);return a!=null&&(e.apply(a),!0)}#x(){let e=this.#e,t=this.#z(),n=new Set(this.getSurfaceIds()),r=this.#S(e,t),i=[];if(this.#p(`top`)){let n=this.#C(`top`,t);n.style.flex=`${e.rowFr.top} 1 0`,i.push({key:`top`,el:n})}if(r&&i.push({key:`center`,el:r}),this.#p(`bottom`)){let n=this.#C(`bottom`,t);n.style.flex=`${e.rowFr.bottom} 1 0`,i.push({key:`bottom`,el:n})}let a=[];i.forEach((t,n)=>{a.push(t.el),n<i.length-1&&!this.#g(t.key)&&!this.#g(i[n+1].key)&&a.push(this.#E(`v`,t.key,i[n+1].key,this.#c,e.rowFr,Bs))}),this.#c.replaceChildren(...a);for(let[e,r]of t)n.has(e)||(Xs(r),r.parentElement!==this.#l&&this.#l.appendChild(r));this.#s=n,this.dispatchEvent(new CustomEvent(`dock-tree-render`,{detail:{placed:[...n]},bubbles:!0,composed:!0}))}#S(e,t){let n=Z.filter(e=>this.#p(e));if(n.length===0)return null;let r=document.createElement(`div`);return r.className=`dock-tree__row`,r.style.flex=`${e.rowFr.center} 1 0`,n.forEach((i,a)=>{let o=this.#C(i,t);o.style.flex=`${e.colFr[i]} 1 0`,r.appendChild(o),a<n.length-1&&!this.#h(i)&&!this.#h(n[a+1])&&r.appendChild(this.#E(`h`,i,n[a+1],r,e.colFr,Z))}),r}#C(e,t){let n=document.createElement(`div`);n.className=`dock-tree__zone`,this.#t&&n.classList.add(`dock-tree__zone--droppable`),n.dataset.zone=e;let r=this.#e.zones[e];if(r==null){let t=document.createElement(`div`);return t.className=`dock-tree__empty`,t.textContent=`${e} (drop here)`,n.appendChild(t),n}let i=this.#w(r,t,e);return i.style.flex=`1 1 0`,n.appendChild(i),n}#w(e,t,n){if(e.type===`leaf`){let r=document.createElement(`div`);r.className=`dock-tree__leaf`;let i=t.get(e.surfaceId);return i&&r.appendChild(this.#T(e,n,e.surfaceId,i)),r}let r=document.createElement(`div`);r.className=`dock-tree__split dock-tree__split--${e.dir}`;let i=this.#e.locked===!0||e.locked===!0;return e.children.forEach((a,o)=>{let s=this.#w(a,t,n);s.style.flex=`${e.sizes[o]??1} 1 0`,r.appendChild(s),o<e.children.length-1&&!i&&r.appendChild(this.#D(e,o,r))}),r}#T(e,t,r,i){let a=document.createElement(`div`);if(a.className=`dock-tree__tile`,r!==`chat`&&(a.classList.add(`dock-tree__tile--chrome`),this.#s.has(r)||a.classList.add(`dock-tree__tile--enter`)),this.tilesMovable&&!this.#m(e,t)){let i=Rs(r),o=document.createElement(`button`);o.type=`button`,o.className=`dock-tree__tile-move`,o.setAttribute(`aria-label`,`Move ${i}`),o.title=i,o.appendChild(n(`grip-vertical`,{size:13})),o.addEventListener(`pointerdown`,n=>this.#A(n,e,t)),a.appendChild(o)}let o=document.createElement(`div`);return o.className=`dock-tree__tile-body`,Ys(i),o.appendChild(i),a.appendChild(o),this.#o.set(a,e),a}#E(e,t,n,r,i,a){let o=ac(e);return this.#O(o,e===`h`,r,()=>i[t]??1,()=>i[n]??1,(e,r)=>{i[t]=e,i[n]=r},()=>a.reduce((e,t)=>e+(i[t]??1),0)),o}#D(e,t,n){let r=e.dir===`row`,i=ac(r?`h`:`v`);return this.#O(i,r,n,()=>e.sizes[t]??1,()=>e.sizes[t+1]??1,(n,r)=>{e.sizes[t]=n,e.sizes[t+1]=r},()=>e.sizes.reduce((e,t)=>e+(t??1),0)),i}#O(e,t,n,r,i,a,o){e.addEventListener(`pointerdown`,e=>{e.preventDefault(),this.setPointerCapture(e.pointerId);let s=n.getBoundingClientRect(),c=r()+i(),l=c*Vs,u=o(),d=t?s.width:s.height,f=t?e.clientX:e.clientY,p=r(),m=e=>{let n=t?e.clientX:e.clientY,r=d>0?(n-f)/d*u:0,i=Math.max(l,Math.min(c-l,p+r));a(i,c-i),this.#x()},h=()=>{window.removeEventListener(`pointermove`,m),window.removeEventListener(`pointerup`,h),window.removeEventListener(`pointercancel`,h),this.hasPointerCapture(e.pointerId)&&this.releasePointerCapture(e.pointerId),this.#k()};window.addEventListener(`pointermove`,m),window.addEventListener(`pointerup`,h),window.addEventListener(`pointercancel`,h)})}#k(){this.dispatchEvent(new CustomEvent(`dock-tree-resize`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#A(e,t,n){!this.tilesMovable||this.#m(t,n)||(e.preventDefault(),this.#j({kind:`internal`,node:t,fromZone:n},t.type===`leaf`?t.surfaceId:`panel`),this.#M(e))}beginExternalDrag(e,t){this.tilesMovable&&this.#j({kind:`external`,surfaceId:e},e)}#j(e,t){this.#i=e,this.#a=null,this.#t=!0,this.#x(),this.#u.textContent=t,this.#u.classList.add(`dock-tree__ghost--active`),window.addEventListener(`pointermove`,this.#N),window.addEventListener(`pointerup`,this.#I)}#M(e){this.#u.style.left=`${e.clientX}px`,this.#u.style.top=`${e.clientY}px`}#N=e=>{this.#M(e),this.#a=null,this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let t=this.#i;if(!t)return;let n=document.elementFromPoint(e.clientX,e.clientY);if(!n)return;let r=n.closest(`.dock-tree__zone`);if(!(r instanceof HTMLElement))return;let i=r.dataset.zone;if(!i)return;r.classList.add(`dock-tree__zone--hot`);let a=n.closest(`.dock-tree__tile`),o=a instanceof HTMLElement?this.#o.get(a):void 0,s=t.kind===`internal`&&o===t.node,c=!!o&&this.#m(o,i);if(a instanceof HTMLElement&&o&&!s&&!c){let t=a.getBoundingClientRect(),n=ic(t,e.clientX,e.clientY);this.#a={zone:i,leaf:o,region:n},this.#P(t,n)}else a||(this.#a={zone:i,empty:!0},this.#F(r.getBoundingClientRect()))};#P(e,t){let{left:n,top:r,width:i,height:a}=e;t===`n`?a=e.height/2:t===`s`?(r=e.top+e.height/2,a=e.height/2):t===`w`?i=e.width/2:t===`e`&&(n=e.left+e.width/2,i=e.width/2),this.#F(new DOMRect(n,r,i,a))}#F(e){this.#d.style.left=`${e.left}px`,this.#d.style.top=`${e.top}px`,this.#d.style.width=`${e.width}px`,this.#d.style.height=`${e.height}px`,this.#d.classList.add(`dock-tree__preview--active`)}#I=()=>{window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let e=this.#a,t=this.#i;this.#a=null,this.#i=null,this.#t=!1;let n=!!t&&t.kind===`internal`&&!!e&&!e.empty&&e.leaf===t.node,r=!!t&&t.kind===`external`&&this.getSurfaceIds().includes(t.surfaceId);if(!t||!e||n||r){this.#x();return}let i;if(t.kind===`internal`?(tc(this.#e.zones,t.fromZone,t.node),i=t.node):i={type:`leaf`,surfaceId:t.surfaceId},e.empty||this.#e.zones[e.zone]==null)this.#e.zones[e.zone]=i;else{let{region:t,leaf:n}=e,r=Zs(t===`e`||t===`w`?`row`:`col`,t===`n`||t===`w`?[i,n]:[n,i]);nc(this.#e.zones,e.zone,n,r),this.#e.zones[e.zone]=ec(this.#e.zones[e.zone])}this.#x(),this.#R()};#L(){this.#i&&(window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#i=null,this.#a=null,this.#t=!1,this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`))}#R(){this.dispatchEvent(new CustomEvent(`dock-tree-change`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#z(){let e=new Map;for(let t of Array.from(this.querySelectorAll(Ps))){if(!(t instanceof HTMLElement)||t.parentElement?.closest(Ps))continue;let n=Js(t);n&&e.set(n,t)}return e}});function uc(e){switch(e.slice(e.lastIndexOf(`.`)).toLowerCase()){case`.png`:case`.jpg`:case`.jpeg`:case`.gif`:case`.webp`:case`.svg`:return`image`;case`.mp3`:case`.wav`:case`.ogg`:case`.m4a`:case`.flac`:return`music`;case`.mp4`:case`.webm`:case`.mov`:case`.avi`:return`film`;case`.json`:return`braces`;case`.md`:return`file-text`;case`.html`:case`.htm`:return`globe`;case`.css`:return`palette`;case`.ts`:case`.js`:case`.tsx`:case`.jsx`:case`.mjs`:case`.cjs`:return`file-code`;case`.zip`:case`.tar`:case`.gz`:case`.bz2`:return`file-archive`;case`.pdf`:return`file-text`;default:return`file`}}function dc(e){return e<1024?e+` B`:e<1048576?(e/1024).toFixed(1)+`K`:e<1073741824?(e/1048576).toFixed(1)+`M`:(e/1073741824).toFixed(1)+`G`}var fc=`
|
|
4889
|
+
`,yc=`slicc-dock-tree-style`;function bc(e){if(e.getElementById(yc))return;let t=e.createElement(`style`);t.id=yc,t.textContent=vc,(e.head??e.documentElement).appendChild(t)}var xc=`slicc-surface`,Sc=`chat`,Cc=`sprinkle:`;function wc(e){return typeof e==`string`&&e.trim().toLowerCase()===`false`}function Tc(e){return e===`chat`?`Chat`:e.startsWith(Cc)?e.slice(9):e}var Ec=[`top`,`left`,`middle`,`right`,`bottom`],Z=[`left`,`middle`,`right`],Dc=[`top`,`center`,`bottom`],Oc=.02;function kc(){return{zones:{top:null,left:null,middle:null,right:null,bottom:null},rowFr:{top:1,center:1,bottom:1},colFr:{left:1,middle:1,right:1}}}function Ac(e){return JSON.parse(JSON.stringify(e))}function jc(e,t){if(e.type===`leaf`){t.push(e.surfaceId);return}for(let n of e.children)jc(n,t)}function Mc(e,t){if(e.type===`leaf`)return e.surfaceId===t?e:null;for(let n of e.children){let e=Mc(n,t);if(e)return e}return null}function Nc(e,t,n){if(n)return!0;function r(e,n){let i=n||e.locked===!0;if(e===t)return i;if(e.type!==`split`)return null;for(let t of e.children){let e=r(t,i);if(e!=null)return e}return null}return r(e,!1)??!1}function Pc(e){return e.locked===!0||e.type===`split`&&e.children.some(Pc)}function Fc(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id||null}function Ic(e){e.style.position=`relative`,e.style.inset=`auto`,e.style.display=`flex`,e.style.flex=`1 1 auto`,e.style.minWidth=`0`,e.style.minHeight=`0`}function Lc(e){e.style.removeProperty(`position`),e.style.removeProperty(`inset`),e.style.removeProperty(`flex`),e.style.removeProperty(`min-width`),e.style.removeProperty(`min-height`),e.style.display=`none`}function Rc(e,t){return{type:`split`,dir:e,children:t,sizes:t.map(()=>1)}}function zc(e,t,n){e.type===`split`&&e.children.forEach((r,i)=>{r===t?n(e,i):zc(r,t,n)})}function Bc(e,t){if(e.type!==`split`)return null;for(let n=0;n<e.children.length;n++){let r=e.children[n];if(r===t)return{parent:e,index:n};let i=Bc(r,t);if(i)return i}return null}function Q(e){if(!e)return null;if(e.type!==`split`)return e;e.children=e.children.map(Q).filter(e=>e!=null);let t=[],n=[];return e.children.forEach((r,i)=>{r.type===`split`&&r.dir===e.dir?r.children.forEach((a,o)=>{t.push(a),n.push((e.sizes[i]||1)*(r.sizes[o]||1))}):(t.push(r),n.push(e.sizes[i]||1))}),e.children=t,e.sizes=n,e.children.length===0?null:e.children.length===1?e.children[0]:e}function Vc(e,t,n){let r=e[t];if(r){if(r===n){e[t]=null;return}zc(r,n,(e,t)=>{e.children.splice(t,1),e.sizes.splice(t,1)}),e[t]=Q(r)}}function Hc(e,t,n,r){if(e[t]===n){e[t]=r;return}let i=e[t];i&&zc(i,n,(e,t)=>{e.children[t]=r})}function Uc(e,t,n){let r=t.reduce((e,t)=>e+t,0)-e;if(r<=0)return null;let i=Math.min(.98,Math.max(Oc,n));return i*r/(1-i)}function Wc(e,t,n){let r=(t-e.left)/e.width,i=(n-e.top)/e.height;if(r>.34&&r<.66&&i>.34&&i<.66)return`center`;let a={n:i,s:1-i,w:r,e:1-r},o=Object.entries(a);return o.sort((e,t)=>e[1]-t[1]),o[0][0]}function Gc(e){let t=document.createElement(`div`);return t.className=`dock-tree__divider dock-tree__divider--${e}`,t}function Kc(){let e=document.createElement(`div`);return e.className=`dock-tree__root`,e}function qc(){let e=document.createElement(`div`);return e.className=`dock-tree__parking`,e.hidden=!0,e}function Jc(){let e=document.createElement(`div`);return e.className=`dock-tree__ghost`,e}function Yc(){let e=document.createElement(`div`);return e.className=`dock-tree__preview`,e}S(`slicc-dock-tree`,class extends HTMLElement{static observedAttributes=[`tiles-movable`];#e=kc();#t=!1;#n=!1;#r=new Set;#i=null;#a=null;#o=new WeakMap;#s=new Set;#c=Kc();#l=qc();#u=Jc();#d=Yc();#f=new MutationObserver(()=>this.#x());connectedCallback(){bc(this.ownerDocument),this.#n=!0,this.#c.parentElement!==this&&this.append(this.#c),this.#l.parentElement!==this&&this.append(this.#l),this.#u.parentElement!==this&&this.append(this.#u),this.#d.parentElement!==this&&this.append(this.#d),this.#x(),this.#f.observe(this,{childList:!0})}disconnectedCallback(){this.#n=!1,this.#f.disconnect(),this.#L()}attributeChangedCallback(e,t,n){e!==`tiles-movable`||t===n||!this.#n||(this.tilesMovable||this.#L(),this.#x())}get tilesMovable(){let e=this.getAttribute(`tiles-movable`);return e!==null&&!wc(e)}set tilesMovable(e){this.toggleAttribute(`tiles-movable`,!!e&&!wc(e))}setTree(e){this.#e=e?Ac(e):kc(),this.#n&&this.#x()}getTree(){return Ac(this.#e)}setPinned(e){this.#r=new Set(e)}getSurfaceIds(){let e=[];for(let t of Ec){let n=this.#e.zones[t];n&&jc(n,e)}return e}#p(e){return this.#e.zones[e]!=null||this.#t}#m(e,t){let n=this.#e.zones[t];return n?Nc(n,e,this.#e.locked===!0):!1}#h(e){if(this.#e.locked===!0)return!0;let t=this.#e.zones[e];return t!=null&&Pc(t)}#g(e){return this.#e.locked===!0?!0:e===`center`?Z.some(e=>this.#h(e)):this.#h(e)}placeSurface(e,t){if(this.getSurfaceIds().includes(e))return;let n={type:`leaf`,surfaceId:e},r=this.#e.zones[t];this.#e.zones[t]=r==null?n:Q(Rc(`col`,[r,n])),this.#n&&this.#x(),this.#R()}removeSurface(e){if(!this.#r.has(e))for(let t of Ec){let n=this.#e.zones[t];if(!n)continue;let r=Mc(n,e);if(r){if(this.#m(r,t))return;Vc(this.#e.zones,t,r),this.#n&&this.#x(),this.#R();return}}}moveSurfaceToZone(e,t){let n=!1;for(let r of Ec){let i=this.#e.zones[r];if(!i)continue;let a=Mc(i,e);if(a){if(n=!0,this.#m(a,r)||r===t&&i===a)return;Vc(this.#e.zones,r,a);break}}if(!n){this.placeSurface(e,t);return}let r={type:`leaf`,surfaceId:e};this.#e.zones[t]=r,this.#n&&this.#x(),this.#R()}setSurfaceSize(e,t){let n=this.#_(e);if(!n)return!1;let r=this.#z().get(e)??null,i=r?.getBoundingClientRect()??null,a=r?.closest(`.dock-tree__leaf`)?.getBoundingClientRect()??i,o=!1;if(n.width&&(t.widthPx!=null||t.widthPercent!=null)){let e=a&&i?Math.max(0,a.width-i.width):0;o=this.#b(n.width,t.widthPx==null?void 0:t.widthPx+e,t.widthPercent,a?.width)||o}if(n.height&&(t.heightPx!=null||t.heightPercent!=null)){let e=a&&i?Math.max(0,a.height-i.height):0;o=this.#b(n.height,t.heightPx==null?void 0:t.heightPx+e,t.heightPercent,a?.height)||o}return o&&(this.#x(),this.#k()),o}#_(e){for(let t of Ec){let n=this.#e.zones[t];if(!n)continue;let r=Mc(n,e);if(!r)continue;if(this.#m(r,t))return{width:null,height:null};let i=Bc(n,r);if(i){let{parent:e,index:t}=i,n={currentFr:e.sizes[t]??1,groupFr:e.sizes,apply:n=>{e.sizes[t]=n}};return{width:e.dir===`row`?n:null,height:e.dir===`col`?n:null}}let a=t===`left`||t===`middle`||t===`right`,o=null;if(a){let e=t,n=this.#y();o={currentFr:this.#e.colFr[e],groupFr:n.map(e=>this.#e.colFr[e]),apply:t=>{this.#e.colFr[e]=t}}}let s=a?`center`:t,c=this.#v(),l={currentFr:this.#e.rowFr[s],groupFr:c.map(e=>this.#e.rowFr[e]),apply:e=>{this.#e.rowFr[s]=e}};return{width:o,height:l}}return null}#v(){let e=[];return this.#p(`top`)&&e.push(`top`),Z.some(e=>this.#p(e))&&e.push(`center`),this.#p(`bottom`)&&e.push(`bottom`),e}#y(){return Z.filter(e=>this.#p(e))}#b(e,t,n,r){let i=null;if(n!=null)i=n/100;else if(t!=null&&r!=null&&r>0&&e.currentFr>0){let n=r*e.groupFr.reduce((e,t)=>e+t,0)/e.currentFr;n>0&&(i=t/n)}if(i==null)return!1;let a=Uc(e.currentFr,e.groupFr,i);return a!=null&&(e.apply(a),!0)}#x(){let e=this.#e,t=this.#z(),n=new Set(this.getSurfaceIds()),r=this.#S(e,t),i=[];if(this.#p(`top`)){let n=this.#C(`top`,t);n.style.flex=`${e.rowFr.top} 1 0`,i.push({key:`top`,el:n})}if(r&&i.push({key:`center`,el:r}),this.#p(`bottom`)){let n=this.#C(`bottom`,t);n.style.flex=`${e.rowFr.bottom} 1 0`,i.push({key:`bottom`,el:n})}let a=[];i.forEach((t,n)=>{a.push(t.el),n<i.length-1&&!this.#g(t.key)&&!this.#g(i[n+1].key)&&a.push(this.#E(`v`,t.key,i[n+1].key,this.#c,e.rowFr,Dc))}),this.#c.replaceChildren(...a);for(let[e,r]of t)n.has(e)||(Lc(r),r.parentElement!==this.#l&&this.#l.appendChild(r));this.#s=n,this.dispatchEvent(new CustomEvent(`dock-tree-render`,{detail:{placed:[...n]},bubbles:!0,composed:!0}))}#S(e,t){let n=Z.filter(e=>this.#p(e));if(n.length===0)return null;let r=document.createElement(`div`);return r.className=`dock-tree__row`,r.style.flex=`${e.rowFr.center} 1 0`,n.forEach((i,a)=>{let o=this.#C(i,t);o.style.flex=`${e.colFr[i]} 1 0`,r.appendChild(o),a<n.length-1&&!this.#h(i)&&!this.#h(n[a+1])&&r.appendChild(this.#E(`h`,i,n[a+1],r,e.colFr,Z))}),r}#C(e,t){let n=document.createElement(`div`);n.className=`dock-tree__zone`,this.#t&&n.classList.add(`dock-tree__zone--droppable`),n.dataset.zone=e;let r=this.#e.zones[e];if(r==null){let t=document.createElement(`div`);return t.className=`dock-tree__empty`,t.textContent=`${e} (drop here)`,n.appendChild(t),n}let i=this.#w(r,t,e);return i.style.flex=`1 1 0`,n.appendChild(i),n}#w(e,t,n){if(e.type===`leaf`){let r=document.createElement(`div`);r.className=`dock-tree__leaf`;let i=t.get(e.surfaceId);return i&&r.appendChild(this.#T(e,n,e.surfaceId,i)),r}let r=document.createElement(`div`);r.className=`dock-tree__split dock-tree__split--${e.dir}`;let i=this.#e.locked===!0||e.locked===!0;return e.children.forEach((a,o)=>{let s=this.#w(a,t,n);s.style.flex=`${e.sizes[o]??1} 1 0`,r.appendChild(s),o<e.children.length-1&&!i&&r.appendChild(this.#D(e,o,r))}),r}#T(e,t,r,i){let a=document.createElement(`div`);if(a.className=`dock-tree__tile`,r!==`chat`&&(a.classList.add(`dock-tree__tile--chrome`),this.#s.has(r)||a.classList.add(`dock-tree__tile--enter`)),this.tilesMovable&&!this.#m(e,t)){let i=Tc(r),o=document.createElement(`button`);o.type=`button`,o.className=`dock-tree__tile-move`,o.setAttribute(`aria-label`,`Move ${i}`),o.title=i,o.appendChild(n(`grip-vertical`,{size:13})),o.addEventListener(`pointerdown`,n=>this.#A(n,e,t)),a.appendChild(o)}let o=document.createElement(`div`);return o.className=`dock-tree__tile-body`,Ic(i),o.appendChild(i),a.appendChild(o),this.#o.set(a,e),a}#E(e,t,n,r,i,a){let o=Gc(e);return this.#O(o,e===`h`,r,()=>i[t]??1,()=>i[n]??1,(e,r)=>{i[t]=e,i[n]=r},()=>a.reduce((e,t)=>e+(i[t]??1),0)),o}#D(e,t,n){let r=e.dir===`row`,i=Gc(r?`h`:`v`);return this.#O(i,r,n,()=>e.sizes[t]??1,()=>e.sizes[t+1]??1,(n,r)=>{e.sizes[t]=n,e.sizes[t+1]=r},()=>e.sizes.reduce((e,t)=>e+(t??1),0)),i}#O(e,t,n,r,i,a,o){e.addEventListener(`pointerdown`,e=>{e.preventDefault(),this.setPointerCapture(e.pointerId);let s=n.getBoundingClientRect(),c=r()+i(),l=c*Oc,u=o(),d=t?s.width:s.height,f=t?e.clientX:e.clientY,p=r(),m=e=>{let n=t?e.clientX:e.clientY,r=d>0?(n-f)/d*u:0,i=Math.max(l,Math.min(c-l,p+r));a(i,c-i),this.#x()},h=()=>{window.removeEventListener(`pointermove`,m),window.removeEventListener(`pointerup`,h),window.removeEventListener(`pointercancel`,h),this.hasPointerCapture(e.pointerId)&&this.releasePointerCapture(e.pointerId),this.#k()};window.addEventListener(`pointermove`,m),window.addEventListener(`pointerup`,h),window.addEventListener(`pointercancel`,h)})}#k(){this.dispatchEvent(new CustomEvent(`dock-tree-resize`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#A(e,t,n){!this.tilesMovable||this.#m(t,n)||(e.preventDefault(),this.#j({kind:`internal`,node:t,fromZone:n},t.type===`leaf`?t.surfaceId:`panel`),this.#M(e))}beginExternalDrag(e,t){this.tilesMovable&&this.#j({kind:`external`,surfaceId:e},e)}#j(e,t){this.#i=e,this.#a=null,this.#t=!0,this.#x(),this.#u.textContent=t,this.#u.classList.add(`dock-tree__ghost--active`),window.addEventListener(`pointermove`,this.#N),window.addEventListener(`pointerup`,this.#I)}#M(e){this.#u.style.left=`${e.clientX}px`,this.#u.style.top=`${e.clientY}px`}#N=e=>{this.#M(e),this.#a=null,this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let t=this.#i;if(!t)return;let n=document.elementFromPoint(e.clientX,e.clientY);if(!n)return;let r=n.closest(`.dock-tree__zone`);if(!(r instanceof HTMLElement))return;let i=r.dataset.zone;if(!i)return;r.classList.add(`dock-tree__zone--hot`);let a=n.closest(`.dock-tree__tile`),o=a instanceof HTMLElement?this.#o.get(a):void 0,s=t.kind===`internal`&&o===t.node,c=!!o&&this.#m(o,i);if(a instanceof HTMLElement&&o&&!s&&!c){let t=a.getBoundingClientRect(),n=Wc(t,e.clientX,e.clientY);this.#a={zone:i,leaf:o,region:n},this.#P(t,n)}else a||(this.#a={zone:i,empty:!0},this.#F(r.getBoundingClientRect()))};#P(e,t){let{left:n,top:r,width:i,height:a}=e;t===`n`?a=e.height/2:t===`s`?(r=e.top+e.height/2,a=e.height/2):t===`w`?i=e.width/2:t===`e`&&(n=e.left+e.width/2,i=e.width/2),this.#F(new DOMRect(n,r,i,a))}#F(e){this.#d.style.left=`${e.left}px`,this.#d.style.top=`${e.top}px`,this.#d.style.width=`${e.width}px`,this.#d.style.height=`${e.height}px`,this.#d.classList.add(`dock-tree__preview--active`)}#I=()=>{window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let e=this.#a,t=this.#i;this.#a=null,this.#i=null,this.#t=!1;let n=!!t&&t.kind===`internal`&&!!e&&!e.empty&&e.leaf===t.node,r=!!t&&t.kind===`external`&&this.getSurfaceIds().includes(t.surfaceId);if(!t||!e||n||r){this.#x();return}let i;if(t.kind===`internal`?(Vc(this.#e.zones,t.fromZone,t.node),i=t.node):i={type:`leaf`,surfaceId:t.surfaceId},e.empty||this.#e.zones[e.zone]==null)this.#e.zones[e.zone]=i;else{let{region:t,leaf:n}=e,r=Rc(t===`e`||t===`w`?`row`:`col`,t===`n`||t===`w`?[i,n]:[n,i]);Hc(this.#e.zones,e.zone,n,r),this.#e.zones[e.zone]=Q(this.#e.zones[e.zone])}this.#x(),this.#R()};#L(){this.#i&&(window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#i=null,this.#a=null,this.#t=!1,this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`))}#R(){this.dispatchEvent(new CustomEvent(`dock-tree-change`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#z(){let e=new Map;for(let t of Array.from(this.querySelectorAll(xc))){if(!(t instanceof HTMLElement)||t.parentElement?.closest(xc))continue;let n=Fc(t);n&&e.set(n,t)}return e}});function Xc(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 Zc(e){return e<1024?e+` B`:e<1048576?(e/1024).toFixed(1)+`K`:e<1073741824?(e/1048576).toFixed(1)+`M`:(e/1073741824).toFixed(1)+`G`}var Qc=`
|
|
4886
4890
|
slicc-file-tree {
|
|
4887
4891
|
width: 190px;
|
|
4888
4892
|
flex: 0 0 auto;
|
|
@@ -5030,7 +5034,7 @@ slicc-file-tree .actions button:active {
|
|
|
5030
5034
|
[data-theme="dark"] slicc-file-tree .dir.on {
|
|
5031
5035
|
background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
|
|
5032
5036
|
}
|
|
5033
|
-
|
|
5037
|
+
`,$c=`slicc-file-tree-style`;function el(e){if(e.getElementById($c))return;let t=e.createElement(`style`);t.id=$c,t.textContent=Qc,(e.head??e.documentElement).appendChild(t)}function tl(e,t){let r=[];for(let i of e)if(i.kind===`group`)r.push(w(`div`,{class:`grp`},i.label));else if(i.kind===`dir`){let e=t.has(i.id);r.push(w(`div`,{class:e?`dir open`:`dir`,"data-dir-id":i.id,"aria-expanded":e?`true`:`false`,tabindex:`0`},n(`chevron-right`,{size:14,class:`chev`}),i.label));let a=w(`div`,{class:`children`,hidden:!e||void 0});C(a,tl(i.children??[],t)),r.push(a)}else{let e=w(`div`,{class:`actions`},w(`button`,{"data-action":`preview`,type:`button`},n(`eye`,{size:14})),w(`button`,{"data-action":`reference`,type:`button`},n(`at-sign`,{size:14})),w(`button`,{"data-action":`download`,type:`button`},n(`arrow-down-to-line`,{size:14})),w(`button`,{"data-action":`overflow`,type:`button`},n(`ellipsis`,{size:14}))),t=w(`div`,{class:`f`,"data-id":i.id,tabindex:`0`},n(Xc(i.label),{size:12,class:`ficon`}),i.label,e);i.size!=null&&t.appendChild(w(`span`,{class:`sz`},Zc(i.size))),r.push(t)}return r}var nl=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(){el(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="${$(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(...tl(t,this.#n)),this.#c();let n=this.getAttribute(`selected`);e&&n!=null&&this.querySelector(`.f[data-id="${$(n)}"], .dir[data-dir-id="${$(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="${$(t)}"], .dir[data-dir-id="${$(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 $(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}S(`slicc-file-tree`,nl);var rl=`
|
|
5034
5038
|
slicc-surface {
|
|
5035
5039
|
position: absolute;
|
|
5036
5040
|
inset: 0;
|
|
@@ -5062,7 +5066,7 @@ slicc-surface:fullscreen {
|
|
|
5062
5066
|
background: var(--canvas, #fff);
|
|
5063
5067
|
position: fixed;
|
|
5064
5068
|
}
|
|
5065
|
-
`,
|
|
5069
|
+
`,il=`slicc-surface-style`;function al(e){if(e.getElementById(il))return;let t=e.createElement(`style`);t.id=il,t.textContent=rl,(e.head??e.documentElement).appendChild(t)}function ol(e){return e===`block`||e===`column`?e:`flex`}S(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){al(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 ol(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,ol(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var sl=`/**
|
|
5066
5070
|
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
5067
5071
|
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
5068
5072
|
* https://github.com/chjj/term.js
|
|
@@ -5347,7 +5351,7 @@ slicc-surface:fullscreen {
|
|
|
5347
5351
|
.xterm .xterm-scrollable-element > .shadow.top.left {
|
|
5348
5352
|
box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
|
|
5349
5353
|
}
|
|
5350
|
-
`,
|
|
5354
|
+
`,cl={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`},ll=`
|
|
5351
5355
|
:host {
|
|
5352
5356
|
display: flex;
|
|
5353
5357
|
flex-direction: column;
|
|
@@ -5388,7 +5392,7 @@ slicc-surface:fullscreen {
|
|
|
5388
5392
|
/* xterm.js wants its container to size the canvas; let it fill. */
|
|
5389
5393
|
.host .xterm { height: 100%; }
|
|
5390
5394
|
.host .xterm-viewport { overflow-y: auto; }
|
|
5391
|
-
`,
|
|
5395
|
+
`,ul=null;function dl(){return ul||=[T(sl),T(ll)],ul}var fl=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=dl();let e=w(`div`,{class:`hd`,part:`header`},n(`terminal`,{size:14}),w(`span`,{class:`title`},this.label),w(`span`,{class:`spacer`})),t=w(`div`,{class:`host`,part:`host`});this.#e.replaceChildren(e,t),this.#t=t}async#c(){if(this.#n||this.#o)return;let[{Terminal:e},{FitAddon:n}]=await Promise.all([t(()=>import(`./xterm-BSL5rRqA.js`),[]),t(()=>import(`./addon-fit-DIOBYJe3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!pl(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:cl,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 pl(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}S(`slicc-terminal`,fl);var ml=`slicc_monitor_collapsed`;function hl(){try{let e=localStorage.getItem(ml);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function gl(e){try{localStorage.setItem(ml,JSON.stringify([...e]))}catch{}}var _l=`
|
|
5392
5396
|
slicc-monitor {
|
|
5393
5397
|
display: block;
|
|
5394
5398
|
box-sizing: border-box;
|
|
@@ -5804,4 +5808,4 @@ slicc-monitor {
|
|
|
5804
5808
|
transition-duration: 0.01ms;
|
|
5805
5809
|
}
|
|
5806
5810
|
}
|
|
5807
|
-
`,
|
|
5811
|
+
`,vl=`slicc-monitor-style`;function yl(e){if(e.getElementById(vl))return;let t=e.createElement(`style`);t.id=vl,t.textContent=_l,(e.head??e.documentElement).appendChild(t)}function bl(e){return e.status?e.status:e.error?`error`:e.active?`active`:`idle`}function xl(e){return e===`active`?`Active`:e===`error`?`Error`:e===`warn`?`Warning`:`Idle`}function Sl(e){let t=bl(e),r=w(`span`,{class:`monitor-row__badges`});for(let t of e.badges??[])r.appendChild(w(`span`,{class:`monitor-row__badge`},t));let i=w(`span`,{class:`monitor-row__headline`},w(`span`,{class:`monitor-row__name`},e.name));r.childElementCount>0&&i.appendChild(r);let a=w(`span`,{class:`monitor-row__content`},i);return e.sublabel&&a.appendChild(w(`span`,{class:`monitor-row__sublabel`},e.sublabel)),w(`li`,{class:`monitor-row`,"data-status":t},w(`span`,{class:`monitor-row__icon`},n(e.icon??`box`,{size:16})),a,w(`span`,{class:`monitor-row__aside`},w(`span`,{class:`monitor-row__meta`},e.meta),w(`span`,{class:`monitor-row__state monitor-row__state--${t}`},w(`span`,{class:`monitor-row__dot`,"aria-hidden":`true`}),xl(t))))}function Cl(e){return w(`div`,{class:`monitor-empty`,role:`status`},w(`span`,{class:`monitor-empty__icon`},n(`inbox`,{size:18})),w(`span`,{class:`monitor-empty__title`},`No ${e.label.toLocaleLowerCase()} yet`),w(`span`,{class:`monitor-empty__text`},e.emptyText??`${e.label} will appear here when available.`))}function wl(e,t,r,i){let a=t.has(e.id),o=e.count===0?`monitor-section monitor-section--empty`:`monitor-section`,s=[w(`span`,{class:`monitor-section__toggle`,"aria-hidden":`true`},n(a?`chevron-right`:`chevron-down`,{size:15})),w(`span`,{class:`monitor-section__heading`},w(`span`,{class:`monitor-section__title`},e.label),e.meta?w(`span`,{class:`monitor-section__meta`},e.meta):null)];s.push(w(`span`,{class:`monitor-section__count`},String(e.count)));let c=w(`button`,{class:`monitor-section__header`,type:`button`},...s);c.setAttribute(`aria-expanded`,String(!a)),c.setAttribute(`aria-controls`,i),c.addEventListener(`click`,()=>r(e.id));let l=w(`div`,{class:`monitor-section__body`,id:i});if(a&&l.setAttribute(`hidden`,``),e.rows.length===0)l.appendChild(Cl(e));else{let t=w(`ul`,{class:`monitor-section__list`});for(let n of e.rows)t.appendChild(Sl(n));l.appendChild(t)}return w(`section`,{class:o,"data-section":e.id,"data-accent":e.accent??`neutral`},c,l)}function Tl(e,t){return w(`div`,{class:`monitor-summary__metric`},w(`dt`,null,e),w(`dd`,null,t))}function El(e,t){let r=e.flatMap(e=>e.rows),i=r.filter(e=>bl(e)===`active`).length,a=r.filter(e=>[`warn`,`error`].includes(bl(e))).length,o=e.reduce((e,t)=>e+(t.id===`cost`?0:t.count),0),s=e.find(e=>e.id===`cost`)?.meta??`—`,c=w(`button`,{class:`monitor-summary__refresh`,type:`button`,"aria-label":`Refresh monitor data`},n(`refresh-cw`,{size:15}),w(`span`,null,`Refresh`));return c.addEventListener(`click`,t),w(`header`,{class:`monitor-summary`},w(`div`,{class:`monitor-summary__topline`},w(`span`,{class:`monitor-summary__mark`},n(`activity`,{size:19})),w(`div`,{class:`monitor-summary__copy`},w(`h2`,{class:`monitor-summary__title`},`Live monitor`),w(`p`,{class:`monitor-summary__subtitle`},`System activity and connections at a glance`)),c),w(`dl`,{class:`monitor-summary__metrics`},Tl(`Tracked`,String(o)),Tl(`Active`,String(i)),Tl(`Attention`,String(a)),Tl(`Session cost`,s)))}function Dl(e){return{...e,rows:e.rows.map(e=>({...e,badges:e.badges?.slice()}))}}var Ol=0;S(`slicc-monitor`,class extends HTMLElement{#e=[];#t=new Set;#n=!1;#r=++Ol;connectedCallback(){yl(this.ownerDocument),this.#n||=(this.#t=hl(),!0),this.#e.length>0&&this.#i()}get sections(){return this.#e.map(Dl)}set sections(e){this.#e=Array.isArray(e)?e.map(Dl):[],this.isConnected&&this.#i()}#i(){let e=El(this.#e,()=>{this.dispatchEvent(new CustomEvent(`slicc-monitor-refresh`,{bubbles:!0,composed:!0}))}),t=w(`div`,{class:`monitor-sections`});for(let e of this.#e){let n=e.id.replace(/[^a-z0-9_-]/gi,`-`);t.appendChild(wl(e,this.#t,e=>{this.#t.has(e)?this.#t.delete(e):this.#t.add(e),gl(this.#t),this.#i()},`monitor-${this.#r}-${n}`))}this.replaceChildren(),C(this,[e,t])}});var kl=e({CHAT_SURFACE_ID:()=>Sc,DEFAULT_LAUNCHER_CORNER:()=>ie,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>se,HOLD_TO_ENABLE_MS:()=>un,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>b,LAYOUT_SCHEMA_VERSION:()=>1,MACHINE_WRITTEN_MEMORY_PATH:()=>MACHINE_WRITTEN_MEMORY_PATH,PANEL_MARKER_ATTR:()=>va,REDACTED_REAL_WORLD_MEMORY_PATH:()=>REDACTED_REAL_WORLD_MEMORY_PATH,SYNTHETIC_MEMORY_PATH:()=>SYNTHETIC_MEMORY_PATH,SliccImagePreview:()=>nn,TOKENS_CSS:()=>lc,ensureGlobalTokens:()=>dc,followSystemTheme:()=>pc,setTheme:()=>fc});export{aa as a,ro as i,dc as n,Hi as o,pc as r,kl as t};
|